PageSourceSearch

https://www.chicastacos.com/_next/static/chunks/pages/account-62927a35f6760056.js

js chicastacos.com collected 2026-09-29 08:46:44 UTC 27,969 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[966],{32907:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account",function(){return n(62815)}])},62815:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return tr}});var i=n(52322),r=n(56580),o=n(38726),s=n(5632),l=n(2784),a=n(85787),c=n(94004),d=n(5288),u=n(97421),h=n(89601);let p=(0,r.connect)(e=>({me:e.app.me.data}))(e=>{let{me:t}=e,[n,r]=(0,l.useState)(null);return((0,l.useEffect)(()=>{n&&((0,h.vQ)(n).catch(e=>console.log(e)),setTimeout(()=>r(null),3e3))},[n]),null==t?void 0:t.referral_code)?(0,i.jsx)(c.rY,{$enabled:!0,"data-testid":"referral-code-container",children:(0,i.jsxs)(a.S,{children:[(0,i.jsx)(d.Z,{accessor:"account.referral_code_instructions_header",tag:c.le}),(0,i.jsx)(d.Z,{accessor:"account.referral_code_instructions",tag:a.f6}),(0,i.jsxs)(a._A,{children:[(0,i.jsxs)(a.xw,{children:[(0,i.jsx)(d.Z,{tag:"p",accessor:"account.referral_code_header"}),(0,i.jsx)(a.k6,{children:t.referral_code})]}),(0,i.jsxs)(a.qt,{children:[(0,i.jsx)(u.Db,{"data-css-override":"StyledPrimaryButton",size:"small",onClick:()=>r(t.referral_code),children:"Copy"}),(0,h.vQ)(n)&&(0,i.jsx)(a.If,{children:"Copied!"})]})]})]})}):null});var x=n(43580),f=n(96337),b=n(8373),m=n(44483),g=n(34843),v=n(23643),j=n(3776),_=n(15066);let y={fetchMeFavoriteLocations:_.default.fetchMeFavoriteLocations},C=(0,r.connect)(e=>({meFavoriteLocations:e.app.me.favoriteLocations}),y),w=(0,o.qC)(x.Zz,C)(e=>{let{meFavoriteLocations:t,fetchMeFavoriteLocations:n}=e;return(0,l.useEffect)(()=>{n()},[]),(0,i.jsx)(m.R,{featureFlag:j.y8.ACCOUNT__FAVORITE_LOCATIONS_ENABLED,children:(0,i.jsxs)(c.rY,{"data-testid":"favorite-location-container",$enabled:!0,children:[(0,i.jsx)(a.S,{children:(0,i.jsx)(c.le,{children:"Favorite Location"})}),t&&t.length?t.map(e=>(0,i.jsx)(g.b,{location:e,favorites:!0,editFavoriteLocation:!0},e.id)):(0,i.jsx)(v.u.Container,{trigger:e=>(0,i.jsx)(f.UN,{onClick:e,$bold:!0,children:(0,i.jsx)(d.Z,{accessor:"account.add_favorite_location_button",tag:a.f6})}),children:e=>(0,i.jsx)(b.j,{onToggle:e})})]})})});var E=n(81334),R=n(47141),S=n(73695),Z=n(92240),k=n(20051);let I=()=>{var e;let t=(0,S.JR)(),n=(0,r.useSelector)(Z.F5),o="disabled"!==t.accounts.favorite_location,s=(0,k.A5)(null==n?void 0:null===(e=n.organization)||void 0===e?void 0:e.loyalty_driver_id),l=t.accounts.punchh_referral_code_field&&s.includes(R.ZV.REFERRAL_CODE);return l||o?(0,i.jsxs)(c.Sn,{"data-testid":"account-information-container",children:[(0,i.jsx)(c.k$,{"data-testid":"account-information-header-container",$enabled:!0,children:(0,i.jsx)(c.jc,{children:"Account Information"})}),l&&(0,i.jsx)(p,{}),(0,i.jsx)(E.Ot,{}),(0,i.jsx)(w,{})]}):null};var P=n(63602),D=n(65413),O=n(29126),A=n(34183),$=n(92122),T=n(2111),L=n(75470);let M=e=>{var t,n,r,o,s;let{close:l}=e,a=(0,L.I0)(),{data:c,loading:d}=(0,L.v9)(e=>e.app.me),u=(0,L.v9)(e=>e.app.organization.external_auth),h="disabled"!==(0,L.v9)(e=>e.app.cmsConfig.webConfig).accounts.zip_code&&(null==c?void 0:c.zip_code)!==null,p=u.updatable_fields.user,x=u.readonly_fields.user,b={first_name:null!==(t=null==c?void 0:c.first_name)&&void 0!==t?t:"",last_name:null!==(n=null==c?void 0:c.last_name)&&void 0!==n?n:"",email:null!==(r=null==c?void 0:c.email)&&void 0!==r?r:"",phone:null!==(o=null==c?void 0:c.phone)&&void 0!==o?o:"",zip_code:null!==(s=null==c?void 0:c.zip_code)&&void 0!==s?s:""},m=(0,D.Ry)({first_name:(0,D.Z_)().required(T.xz.REQUIRED),last_name:(0,D.Z_)().required(T.xz.REQUIRED),email:(0,D.Z_)().email(T.xz.EMAIL).required(T.xz.REQUIRED),phone:(0,D.Z_)().required(T.xz.REQUIRED).matches(T.mL.PHONE,T.r7.PHONE),zip_code:(0,D.Vo)(()=>h?(0,D.Z_)().required(T.xz.REQUIRED).matches(T.mL.ZIP_CODE_USA_AND_POSTAL_CODE_CANADA,{message:T.r7.ZIP_CODE_USA_AND_POSTAL_CODE_CANADA}):(0,D.Z_)().optional())}),g=e=>x.includes(e)||!p.includes(e);return(0,i.jsx)(P.J9,{validateOnBlur:!0,validateOnChange:!1,onSubmit:(e,t)=>{let{resetForm:n}=t;a(_.default.updateMe(e)),n(),l()},initialValues:b,validationSchema:m,children:e=>{let{dirty:t,isValid:n}=e;return(0,i.jsxs)($.l,{"data-testid":"contact-info-form",children:[(0,i.jsx)(A.Ll,{children:(0,i.jsx)($.I,{label:"",id:"first_name",name:"first_name",placeholder:"First Name",type:"text",disabled:g("first_name")}
1)}),(0,i.jsx)(A.Ll,{children:(0,i.jsx)($.I,{label:"",id:"last_name",name:"last_name",placeholder:"Last Name",type:"text",disabled:g("last_name")})}),(0,i.jsx)(A.Ll,{children:(0,i.jsx)($.I,{label:"",id:"email",name:"email",placeholder:"Email",type:"text",disabled:g("email")})}),(0,i.jsx)(A.Ll,{children:(0,i.jsx)($.I,{label:"",id:"phone",name:"phone",type:"tel",placeholder:"Phone Number",disabled:g("phone")})}),h&&(null==c?void 0:c.zip_code)!==null?(0,i.jsx)(A.Ll,{children:(0,i.jsx)($.I,{label:"",id:"zip_code",name:"zip_code",type:"text",placeholder:"Zip Code",maxLength:10,disabled:g("zip_code")})}):null,(0,i.jsxs)(z,{children:[(0,i.jsx)(f.Mo,{children:(0,i.jsx)(f.UN,{onClick:l,"aria-label":"Hide personal info form",children:"Cancel"})}),(0,i.jsx)(O.Z,{type:"submit",theme:"secondary",$submitting:d,handleClick:()=>null,$minWidth:150,disabled:!t||!n,"aria-label":"Submit Updated Contact Info",children:d?"Loading":"Submit"})]})]})}})},z=(0,x.ZP)(f.VX).withConfig({componentId:"sc-d63088af-0"})(["margin-left:auto;"]);var N=n(26508);let U=()=>{let e=(0,r.useDispatch)(),[t,n]=(0,l.useState)(!1),o=(0,L.v9)(e=>e.app.me.data),s="disabled"!==(0,L.v9)(e=>e.app.cmsConfig.webConfig).accounts.zip_code;return(0,l.useEffect)(()=>{o||e(_.default.fetchMe())},[o]),(0,i.jsxs)(c.Sn,{children:[(0,i.jsx)(c.k$,{$enabled:!0,children:(0,i.jsx)(d.Z,{accessor:"account.contact_info_header",tag:c.jc})}),t?(0,i.jsx)(c.rY,{$enabled:!0,children:(0,i.jsx)(M,{close:()=>n(!1)})}):(0,i.jsx)(f.$3,{children:(0,i.jsxs)(f.Ji,{children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("p",{children:[null==o?void 0:o.first_name," ",null==o?void 0:o.last_name]}),(null==o?void 0:o.email)&&(0,i.jsx)("p",{children:o.email}),(null==o?void 0:o.phone)&&(0,i.jsx)("p",{children:(0,k.ni)(o.phone)}),s&&(null==o?void 0:o.zip_code)&&(0,i.jsx)("p",{children:o.zip_code})]}),(0,i.jsx)(f.UN,{onClick:()=>{n(!0),(0,N.d4)(N.m1.account,N.cE.editContactInfo)},$bold:!0,"aria-label":"Click to edit personal info",children:(0,i.jsx)(d.Z,{accessor:"account.contact_info_edit_button"})})]})})]})};var F=n(95782),V=n(96748),W=n(81854),q=n(36525);let H=x.ZP.div.withConfig({componentId:"sc-6c12e5b7-0"})(["border:1px solid ",";border-radius:","px;display:flex;flex-direction:column;background:",";position:relative;bottom:","px;right:0;z-index:",";"],e=>{let{isActive:t,theme:n}=e;return t?n.global.primary_active_color:n.location_card.border_color},e=>{let{theme:t}=e;return t.location_card.border_radius},e=>{let{theme:t}=e;return t.location_card.background_color},q._.GUTTER/2,q.kl.STORE_CARD_MENU),B=x.ZP.button.withConfig({componentId:"sc-6c12e5b7-1"})(["background:none;border:none;cursor:pointer;font-family:",";padding:","px ","px;"," text-decoration:none;&:not(:first-child){border-top:1px solid ",";}"],e=>{let{theme:t}=e;return t.primary_font.bold.font_family},q._.GUTTER/2,q._.GUTTER,W.x,e=>{let{theme:t}=e;return t.location_card.border_color}),G=e=>{let{address:t}=e,n=(0,r.useDispatch)();return(0,i.jsxs)(H,{children:[!t.default&&(0,i.jsx)(B,{onClick:()=>{var e;return n(_.default.defaultAddress(null!==(e=null==t?void 0:t.id)&&void 0!==e?e:0))},children:(0,i.jsx)(d.Z,{accessor:"account.addresses_default_button"})}),(0,i.jsx)(B,{onClick:()=>{var e;return n(_.default.deleteAddress(null!==(e=null==t?void 0:t.id)&&void 0!==e?e:0))},children:(0,i.jsx)(d.Z,{accessor:"account.addresses_delete_button"})})]})};var Y=n(8782),Q=n(46956),K=n(30686);let X=x.ZP.p.withConfig({componentId:"sc-7300380c-0"})(e=>{let{theme:t}=e;return{fontSize:"12px",marginTop:"20px",...(0,Q.l)(t.text.primary_font,["color"],{color:e=>e?(0,K.F)(Y.DZ)("0.1",e):"inherit"})}}),J=x.ZP.div.withConfig({componentId:"sc-7300380c-1"})(["padding:0 ","px;position:relative;&:not(:last-child){","}"],q._.GUTTER,e=>{let{theme:t}=e;return"\n    border-bottom: 1px solid ".concat(t.checkout.border_color,";\n  ")}),ee=x.ZP.div.withConfig({componentId:"sc-7300380c-2"})(["position:absolute;top:-4px;right:","px;display:flex;flex-direction:column;"],q._.GUTTER/2);var et=n(124);let en={fetchAddresses:_.default.fetchAddresses,toggleStoredAddressesMenu:_.default.toggleStoredAddressesMenu,setActiveStoredAddress:_.default.setActiveStoredAddress},ei=(0,r.connect)(e=>({myAddresses:e.app.me.myAddresses}),en),er=(0,o.qC)(x.Zz,ei)(e=>{var t;let{myAddresses:n,fetchAddresses:r,toggleStoredAddressesMenu:o,setActiveStoredAddress:s,theme:a}=e;return(null===(t=a.accounts)||void 0===t?void 0:t.stored_addresses)?((0,l.useEffect)(()=>(r(),()=>{o(!1),s(null)}),[]),(null==n?void 0:n.length)<1)?null:(0,i.jsxs)(c.Sn,{children:[(0,i.jsx)(c.k$,{$enabled:!0,children:(0,i.jsx)(d.Z,{tag:c.jc,accessor:"account.addresses_header",html:!0})}),n.map(e=>(0,i.jsx)(l.Fragment,{children:(0,i.jsxs)(J,{children:[(0,i.jsxs)("p",{children:[e.default&&(0,i.jsx)(V.D,{}),e.street_address,(0,i.jsx)("br",{}),e.street_address_2&&(0,i.jsxs)(i.Fragment,{children:[e.street_address_2,(0,i.jsx)("br",{})]}),(0,i.jsx)("span",{title:"".concat(e.id),children:e.city}),", ",e.state," ",null==e?void 0:e.zip_code]}),e.special_instructions&&(0,i.jsx)(d.Z,{tag:X,accessor:"account.addresses_special_instructions_text",html:!0,dataObj:{specialInstructions:e.special_instructions}}),(0,i.jsx)(ee,{children:(0,i.jsxs)(F.fC,{children:[(0,i.jsx)(eo,{children:(0,i.jsx)(et.Z.Ellipsis,{title:"Edit favorite location"})}),(0,i.jsx)(F.VY,{children:(0,i.jsx)(G,{address:e})})]})})]})},e.id))]}):null}),eo=(0,x.ZP)(F.xz).withConfig({componentId:"sc-38d9365b-0"})(["appearance:none;background:none;border:none;cursor:pointer;"]);var es=n(63955),el=e=>{let{updateMe:t}=e,{register:n,handleSubmit:r,reset:o,watch:s}=(0,es.cI)(),[a,c]=(0,l.useState)(!1),{current_password:u,password:h,password_confirmation:p}=s();return(0,l.useEffect)(()=>
1{c(""!=="".concat(u).concat(h).concat(p))},[u,h,p]),(0,i.jsxs)(f.Gq,{onSubmit:r(e=>{t(e),o()}),children:[(0,i.jsxs)(f.fb,{children:[(0,i.jsx)(f.Ll,{children:(0,i.jsx)(f.yt,{...n("current_password"),type:"password",placeholder:"Current Password",autoComplete:"current-password",className:"input"})}),(0,i.jsx)(f.Ll,{children:(0,i.jsx)(f.yt,{...n("password"),type:"password",placeholder:"New Password",autoComplete:"new-password",className:"input"})}),(0,i.jsx)(f.Ll,{children:(0,i.jsx)(f.yt,{...n("password_confirmation"),type:"password",placeholder:"Confirm New Password",autoComplete:"confirm-new-password",className:"input"})})]}),(0,i.jsxs)(f.VX,{children:[a&&(0,i.jsx)(f.Mo,{children:(0,i.jsx)(f.UN,{type:"button",onClick:()=>{o(),c(!1)},"aria-label":"Clear password form",children:"Clear"})}),(0,i.jsx)(O.Z,{type:"submit",theme:"secondary",$submitting:!1,handleClick:()=>null,$minWidth:150,"aria-label":"Submit Password Form",children:(0,i.jsx)(d.Z,{accessor:"account.change_password_button"})})]})]})};let ea={updateMe:_.default.updateMe};var ec=(0,r.connect)(e=>({me:e.app.me.data}),ea)(e=>{let{me:t,updateMe:n}=e;return(0,i.jsxs)(c.Sn,{children:[(0,i.jsx)(c.k$,{$enabled:!0,children:(0,i.jsx)(d.Z,{accessor:"account.change_password_header",tag:c.jc})}),(0,i.jsx)(c.rY,{$enabled:!0,children:t&&(0,i.jsx)(el,{me:t,updateMe:n})})]})}),ed=n(22601);let eu=(0,D.Ry)({birthday:(0,D.Z_)().required(T.xz.REQUIRED)}),eh=e=>{var t;let n=(0,r.useDispatch)(),{loading:o,data:s}=(0,r.useSelector)(e=>e.app.me),{readonly_fields:l}=(0,r.useSelector)(e=>e.app.organization.external_auth),a=l.user,c=e=>{n(_.default.updateMe({birthday:e.birthday}))};return(0,i.jsx)(P.J9,{validateOnBlur:!0,validateOnChange:!1,onSubmit:(t,n)=>{let{resetForm:i}=n;c(t),i(),e.onCancel()},initialValues:{birthday:null!==(t=s.birthday)&&void 0!==t?t:""},validationSchema:eu,children:t=>{let{dirty:n,isValid:r}=t;return(0,i.jsxs)($.l,{children:[(0,i.jsx)(A.Ll,{children:(0,i.jsx)($.I,{"data-testid":"birthday-input",autoFocus:!0,id:"birthday",name:"birthday",type:"date",label:"",width:"50%",disabled:a.includes("birthday")})}),(0,i.jsxs)(f.Dk,{children:[(0,i.jsx)(f.Mo,{children:(0,i.jsx)(ep,{onClick:e.onCancel,"aria-label":"Hide birthday form",children:"Cancel"})}),(0,i.jsx)(O.Z,{type:"submit",theme:"secondary",disabled:!n||!r,$submitting:o,handleClick:()=>null,$minWidth:150,"aria-label":"Submit Birthday",children:o?"Loading":"Submit"})]})]})}})},ep=(0,x.ZP)(f.UN).withConfig({componentId:"sc-f33df9c1-0"})(["margin:'0px';"]);var ex=n(23314),ef=n(16251);let eb=()=>{let[e,t]=(0,l.useState)(!1),[n,r]=(0,l.useState)(!1),o=(0,L.v9)(e=>e.app.me.data),s=(0,L.v9)(e=>e.app.cmsConfig.webConfig.accounts.birthday);return((0,l.useEffect)(()=>{r("disabled"===s)},[s]),n)?null:(0,i.jsxs)(c.Sn,{children:[(0,i.jsx)(c.k$,{$enabled:!0,children:(0,i.jsx)(d.Z,{accessor:"account.birthday_header",tag:c.jc})}),(null==o?void 0:o.birthday)&&(0,i.jsx)(f.$3,{children:(0,i.jsx)(f.Ji,{children:(0,i.jsx)("div",{children:(0,i.jsx)("p",{children:(0,ef.p6)((0,ed.zonedTimeToUtc)(o.birthday,(0,ef.QK)()),ex.z.MONTH_DAY_YEAR)})})})}),!(null==o?void 0:o.birthday)&&!e&&(0,i.jsx)(f.UN,{onClick:()=>t(!0),$bold:!0,children:(0,i.jsx)(f.$3,{children:(0,i.jsx)(d.Z,{accessor:"account.birthday_instructions"})})}),!(null==o?void 0:o.birthday)&&e&&(0,i.jsx)(c.rY,{$enabled:!0,"data-testid":"birthday-form-step-content",children:(0,i.jsx)(eh,{onCancel:()=>{t(!1)}})})]})};var em=n(55354),eg=n(29652),ev=n(53908),ej=n(78754),e_=n(48994),ey=n(40024);let eC=x.ZP.div.withConfig({componentId:"sc-82f8a80a-0"})(["display:flex;align-items:center;padding:4px 32px 24px 32px;"]),ew=x.ZP.div.withConfig({componentId:"sc-82f8a80a-1"})(["font-weight:bold;display:flex;padding:44px 10px 0px 0px;justify-content:center;align-items:flex-start;align-self:stretch;font-size:16px;"]),eE=(0,x.ZP)(ew).withConfig({componentId:"sc-82f8a80a-2"})(["padding-bottom:24px;"]),eR=x.ZP.div.withConfig({componentId:"sc-82f8a80a-3"})(["text-align:center;"]),eS=(0,x.ZP)(v.u.Footer).withConfig({componentId:"sc-82f8a80a-4"})(["border:none;flex-direction:column;padding-bottom:24px;"]),eZ=(0,x.ZP)(u.KM).withConfig({componentId:"sc-82f8a80a-5"})(["background-color:#da1e28;color:white;width:100%;"]),ek=(0,x.ZP)(u.KM).withConfig({componentId:"sc-82f8a80a-6"})(["color:white;width:100%;"]);var eI=n(97549),eP=n(38801),eD=n(17609),eO=()=>{let[e,t]=(0,l.useState)(!1),[n,o]=(0,l.useState)(!1),s=(0,r.useDispatch)(),{displayErrorToast:a}=(0,eP.xP)(),c=async()=>{let e;e=(0,eI.P$)(window.location.host);let t=(0,ey.Pc)({origin:e}),n=(0,eD.XN)({origin:e,token:t});return await n.delete("/v1/ordering/loyalty/me/delete").res()},d=async()=>{try{let e=await c();t(!1),e.ok?(o(!0),s(e_.Z.logout())):s(a("Sorry, something went wrong. We were not able to delete your account."))}catch(e){s(a("Sorry, something went wrong. We were not able to delete your account.")),t(!1)}};return(0,i.jsxs)("div",{children:[(0,i.jsx)(u.KM,{onClick:()=>t(!0),children:"Delete Account"}),e&&(0,i.jsx)(v.u.Container,{onCancel:()=>t(!1),requestVisibility:e,children:()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ew,{children:"Are You Sure You Want To Delete?"}),(0,i.jsx)(eC,{children:(0,i.jsx)(eR,{children:"By confirming, you agree to delete your account, which will result in all data and account details being lost."})}),(0,i.jsxs)(eS,{children:[(0,i.jsx)(eZ,{onClick:d,children:"Confirm & Delete"}),(0,i.jsx)(v.u.Cancel,{onClick:()=>t(!1),children:"Cancel"})]})]})}),n&&(0,i.jsx)(v.u.Container,{onCancel:()=>o(!1),requestVisibility:n,children:()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eE,{children:"Account Has Been Deleted"}),(0,i.jsx)(eS,{children:(0,i.jsx)(ek,{onClick:()=>o(!1),children:"OK"})})]})})]})},eA=n(47661),e$=n(55830),eT=n(62350),eL=n(41291),eM=n(20496);let ez="stored-cards",eN=()=>{let e=(0,L.v9)(e=>{var t;return null===(t=e.app.me.data)||void 0===t?void 0:t.id}),t=(0,eD.d9)({origin:(0,eI.P$)(window.location.host)});return(0,eA.a)({queryKey:[ez,e],queryFn:()=>(0,ey.Gu)({client:t}),enabled:!!e,refetchOnWindowFocus:!1,onError:e=>{eM.Tb(e,"error",{eventName:eL.RZ.FETCH_SAVED_CARDS_FAILURE})}})},eU=()=>{let e=(0,e$.NL)(),t=(0,L.v9)(e=>e.app.me.data),{dispatch:n,displayErrorToast:i,displayToast:r}=(0,eP.xP)(),o=(0,eD.d9)({origin:(0,eI.P$)(window.location.host)});return(0,eT.D)(e=>(0,ey.yo)(e,{client:o}),{onSuccess:()=>
1{e.invalidateQueries([ez,null==t?void 0:t.id]),n(r("Card removed successfully."))},onError:async e=>{eM.Tb(e),n(i((await (0,h.Xr)("Failed to remove card. Please try again.",e)).message))}})};var eF=n(89432),eV=n(93719);let eW=e=>e.global.error_color||q.DM.ERROR_RED,eq=(0,x.ZP)(c.k$).withConfig({componentId:"sc-b2f71b06-0"})(["display:flex;align-items:center;gap:8px;justify-content:left;"]),eH=(0,x.ZP)(eV.$).withConfig({componentId:"sc-b2f71b06-1"})(["position:relative;"]),eB=x.ZP.div.withConfig({componentId:"sc-b2f71b06-2"})({padding:"".concat(q._.GUTTER,"px"),p:{margin:"".concat(q._.GUTTER/4,"px 0"),fontSize:"16px"}}),eG=x.ZP.div.withConfig({componentId:"sc-b2f71b06-3"})(e=>{var t;let{theme:n}=e;return{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"".concat(q._.GUTTER/2,"px 0"),borderBottom:"1px solid ".concat((0,Y.$n)(.2,null!==(t=n.forms.border_color)&&void 0!==t?t:"#a7a7a7")),"&:last-child":{borderBottom:"none"}}}),eY=x.ZP.div.withConfig({componentId:"sc-b2f71b06-4"})({display:"flex",alignItems:"center",gap:"12px"}),eQ=x.ZP.div.withConfig({componentId:"sc-b2f71b06-5"})({display:"flex",flexDirection:"column"}),eK=x.ZP.span.withConfig({componentId:"sc-b2f71b06-6"})({fontSize:"13px",fontWeight:500,lineHeight:"19.5px"}),eX=x.ZP.span.withConfig({componentId:"sc-b2f71b06-7"})(e=>{let{theme:t}=e;return{display:"inline-block",background:(0,Y.$n)(.46,eW(t)),color:eW(t),fontSize:"10px",fontWeight:700,lineHeight:"15px",padding:"2px 4px",borderRadius:"4px",marginLeft:"8px"}}),eJ=x.ZP.span.withConfig({componentId:"sc-b2f71b06-8"})(e=>{let{$expired:t,theme:n}=e;return{color:t?eW(n):(0,Q.l)(n.checkout.secondary_font).color,fontSize:"11px",fontWeight:500,lineHeight:"16.5px"}}),e0=(0,x.ZP)(u.Db).withConfig({componentId:"sc-b2f71b06-9"})(e=>{var t;let{theme:n}=e;return{fontSize:"11px",fontWeight:600,lineHeight:"16.5px",color:eW(n),background:"none",padding:"6px 8px",borderColor:eW(n),height:"33px","&:hover":{background:eW(n),color:(0,h._T)(eW(n))?q.DM.WHITE:null!==(t=n.text.primary_font.color)&&void 0!==t?t:"",borderColor:eW(n)}}}),e1=(0,x.ZP)(eF.iC).withConfig({componentId:"sc-b2f71b06-10"})(()=>({padding:"0 ".concat(q._.GUTTER,"px"),textAlign:"left"})),e2=x.ZP.p.withConfig({componentId:"sc-b2f71b06-11"})(()=>({margin:0,fontSize:"14px",lineHeight:"21px",padding:"16px 0"})),e8=(0,x.ZP)(u.Db).withConfig({componentId:"sc-b2f71b06-12"})(e=>{var t;let{theme:n}=e;return{width:"100%",background:"transparent",color:n.buttons.primary_button_background_color,borderColor:n.buttons.primary_button_background_color,"&:hover":{background:n.buttons.primary_button_background_color,color:(0,h._T)(n.buttons.primary_button_background_color)?q.DM.WHITE:null!==(t=n.text.primary_font.color)&&void 0!==t?t:""},"&:disabled":{opacity:.7,border:"solid 1px ".concat(n.buttons.primary_button_background_color)}}}),e6=(0,x.ZP)(u.Db).withConfig({componentId:"sc-b2f71b06-13"})(e=>{var t;let{theme:n}=e;return{width:"100%",background:eW(n),borderColor:eW(n),color:(0,h._T)(eW(n))?q.DM.WHITE:null!==(t=n.text.primary_font.color)&&void 0!==t?t:"","&:hover":{background:eW(n)},"&:disabled":{opacity:.7}}});var e3=n(53168);let e7=e=>{let{isOpen:t,cardType:n,cardSuffix:r,isLoading:o,onKeep:s,onRemove:l}=e;return(0,i.jsxs)(e3.Z,{modalOpen:t,name:eL.zr.REMOVE_SAVED_CARD,title:"Remove this card?",toggleModal:e=>{e||s()},children:[(0,i.jsx)(e1,{children:(0,i.jsxs)(e2,{children:[(0,i.jsxs)("b",{children:[n," •••• ",r]})," ","will be removed from your account."]})}),(0,i.jsxs)(eF.vy,{children:[(0,i.jsx)(e8,{type:"button",onClick:s,disabled:o,children:"Keep card"}),(0,i.jsx)(e6,{type:"button",onClick:l,disabled:o,children:o?"Removing...":"Remove card"})]})]})};var e5=n(62907),e9=n(86586),e4=n(79455),te=n(98122);let tt=()=>{var e,t;let{data:n,isInitialLoading:r,isError:o,error:s,refetch:a}=eN(),d=eU(),[u,h]=(0,l.useState)(null);return o&&(0,e4.eE)(s)?(0,i.jsxs)(e9.Sn,{children:[(0,i.jsx)(eq,{$enabled:!0,children:(0,i.jsx)(c.jc,{children:"Saved payment methods"})}),(0,i.jsx)(e5.Gz,{"data-testid":"wallet-connection-error",onRetry:()=>void a()})]}):r||n&&0!==n.length?(0,i.jsxs)(e9.Sn,{children:[(0,i.jsxs)(eq,{$enabled:!0,children:[(0,i.jsx)(c.jc,{children:"Saved payment methods"}),r&&(0,i.jsx)(eH,{role:"status","aria-label":"Loading saved cards"})]}),(0,i.jsx)(eB,{children:null==n?void 0:n.map(e=>{var t,n,r,o,s;let l=e.is_expired||function(e){if(!e)return!1;let[t,n]=e.split("-");if(!t||!n)return!1;let i=new Date;return new Date(Number(t),Number(n),1)<i}(e.expires);return(0,i.jsxs)(eG,{children:[(0,i.jsxs)(eY,{children:[(0,i.jsx)(c._K,{icon:(0,te.Pg)(null!==(t=e.card_type)&&void 0!==t?t:""),type:"placeholder"}),(0,i.jsxs)(eQ,{children:[(0,i.jsxs)(eK,{"aria-label":"".concat(null!==(n=e.card_type)&&void 0!==n?n:"Card"," ending in ").concat(null!==(r=e.suffix)&&void 0!==r?r:""),children:[e.card_type," ",(0,i.jsx)("span",{"aria-hidden":"true",children:"••••"})," ",e.suffix," ",l&&(0,i.jsx)(eX,{children:"Expired"})]}),(0,i.jsxs)(eJ,{$expired:l,children:[l?"Expired":"Expires"," ",function(e){if(!e)return"";let[t,n]=e.split("-");return n&&t?"".concat(n,"/").concat(t):e}(e.expires)]})]})]}),e.is_removable&&(0,i.jsx)(e0,{"aria-label":"Remove ".concat(null!==(o=e.card_type)&&void 0!==o?o:"card"," ending in ").concat(null!==(s=e.suffix)&&void 0!==s?s:""),onClick:()=>{var t,n;return h({id:e.id,card_type:null!==(t=e.card_type)&&void 0!==t?t:"Card",suffix:null!==(n=e.suffix)&&void 0!==n?n:"****"})},children:"Remove"})]},e.id)})}),(0,i.jsx)(e7,{isOpen:!!u,cardType:null!==(e=null==u?void 0:u.card_type)&&void 0!==e?e:"",cardSuffix:null!==(t=null==u?void 0:u.suffix)&&void 0!==t?t:"",isLoading:d.isLoading,onKeep:()=>h(null),onRemove:()=>{u&&d.mutate(u.id,{onSettled:()=>h(null)})}})]}):null},tn={logout:e_.Z.logout},ti=(0,r.connect)(e=>({authLoading:e.app.auth.loading}),tn);var tr=(0,o.qC)(ti,s.withRouter)(e=>{let{logout:t,authLoading:n}=e;return(0,i.jsx)(eg.Q,{children:(0,i.jsx)(em.Z,{$backgroundOverride:!0,children:(0,i.jsx)(f.t9,{children:(0,i.jsxs)(ev.hX,{children:[(0,i.jsxs)(f.Pw,{className:ej.Y.LOYALTY.PAGE_HEADER,children:[(0,i.jsx)(d.Z,{tag:"h2",accessor:"account.header",html:!0}),(0,i.jsx)(u.Db,{"data-css-override":"StyledPrimaryButton","aria-label":"Click to Sign Out",onClick:()=>t(),$buttonTheme:"knockout",$submitting:n,children:(0,i.jsx)(d.Z,{accessor:"account.sign_out_button"})})]}),(0,i.jsxs)(f.aN,{children:[(0,i.jsx)(U,{}),(0,i.jsx)(tt,{}),(0,i.jsx)(I,{}),(0,i.jsx)(er,{}),(0,i.jsx)(eb,{}),(0,i.jsx)(ec,{}),(0,i.jsx)(eO,{})]})]})})})})})},29126:function(e,t,n){"use strict";var i=n(52322),r=n(97421);t.Z=e=>{let{children:t,theme:n,type:o,$submitting:s,handleClick:l,$minWidth:a,disabled:c}=e;return(0,i.jsx)(r.Db,{"data-css-override":"StyledPrimaryButton",$buttonTheme:n,type:o,$submitting:s,$minWidth:a,onClick:l,disabled:c,
1children:t})}},41969:function(e,t,n){"use strict";n.d(t,{f:function(){return s}});var i=n(7896),r=n(2784),o=n(72714);let s=(0,r.forwardRef)((e,t)=>(0,r.createElement)(o.WV.span,(0,i.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))},15612:function(e,t,n){"use strict";n.d(t,{u:function(){return c}});var i=n(41690),r=n(86239),o=n(81880),s=n(86651),l=n(87980);async function a(){try{l.X&&s.fF.log("Flushing events..."),await (0,r.yl)(2e3),l.X&&s.fF.log("Done flushing events")}catch(e){l.X&&s.fF.log("Error while flushing events:\n",e)}}async function c(e){let{req:t,res:n,err:s}=e,l=n?.statusCode||e.statusCode;if(l&&l<500||!e.pathname)return Promise.resolve();(0,i.$e)(e=>{if(t){let n=function(e){let t=e.headers||{},n=("string"==typeof t["x-forwarded-host"]?t["x-forwarded-host"]:void 0)||("string"==typeof t.host?t.host:void 0),i=("string"==typeof t["x-forwarded-proto"]?t["x-forwarded-proto"]:void 0)||e.protocol||(e.socket?.encrypted?"https":"http"),r=e.url||"",o=function({url:e,protocol:t,host:n}){return e?.startsWith("http")?e:e&&n?`${t}://${n}${e}`:void 0}({url:r,host:n,protocol:i}
1),s=e.body||void 0,l=e.cookies;return{url:o,method:e.method,query_string:function(e){if(e)try{let t=new URL(e,"http://s.io").search.slice(1);return t.length?t:void 0}catch{return}}(r),headers:function(e){let t=Object.create(null);try{Object.entries(e).forEach(([e,n])=>{"string"==typeof n&&(t[e]=n)})}catch{}return t}(t),cookies:l,data:s}}(t);e.setSDKProcessingMetadata({normalizedRequest:n})}(0,r.Tb)(s||`_error.js called with falsy error (${s})`,{mechanism:{type:"instrument",handled:!1,data:{function:"_error.getInitialProps"}}})}),function(e){let t=o.GLOBAL_OBJ[Symbol.for("@vercel/request-context")],n=t?.get?.();n?.waitUntil&&n.waitUntil(e)}(a())}},62350:function(e,t,n){"use strict";n.d(t,{D:function(){return h}});var i=n(2784),r=n(36370),o=n(96278),s=n(3709),l=n(22436);class a extends l.l{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let n=this.options;this.options=this.client.defaultMutationOptions(e),(0,r.VS)(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:(0,o.R)(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){s.V.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var t,n,i,r,o,s,l,a;e.onSuccess?(null==(t=(n=this.mutateOptions).onSuccess)||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(i=(r=this.mutateOptions).onSettled)||i.call(r,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(o=(s=this.mutateOptions).onError)||o.call(s,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(l=(a=this.mutateOptions).onSettled)||l.call(a,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)})})}}var c=n(29930),d=n(55830),u=n(99189);function h(e,t,n){let o=(0,r.lV)(e,t,n),l=(0,d.NL)({context:o.context}),[h]=i.useState(()=>new a(l,o));i.useEffect(()=>{h.setOptions(o)},[h,o]);let x=(0,c.$)(i.useCallback(e=>h.subscribe(s.V.batchCalls(e)),[h]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),f=i.useCallback((e,t)=>{h.mutate(e,t).catch(p)},[h]);if(x.error&&(0,u.L)(h.options.useErrorBoundary,[x.error]))throw x.error;return{...x,mutate:f,mutateAsync:x.mutate}}function p(){}}},function(e){e.O(0,[688,462,553,270,593,623,412,955,807,354,762,573,888,774,179],function(){return e(e.s=32907)}),_N_E=e.O()}]);
2//# sourceMappingURL=account-62927a35f6760056.js.map

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.