1"use strict";(self["webpackChunklunchbox_storefront"]=self["webpackChunklunchbox_storefront"]||[]).push([[644],{89387:function(e,t,i){i(44114),i(18111),i(13579);t.A={methods:{shouldAllowAccess(){const{require_phone_verification:e,require_email_verification:t}=this.storeConfig||{},{is_phone_verified:i,is_verified:a}=this.customerData||{};return!(e&&!i)&&!(t&&!a)},guardProfileAccess(e,t=null){const i=t?()=>[this.storeConfig,this.customerData,this.branding]:()=>[this.storeConfig,this.customerData];this.$watch(i,i=>{i.some(e=>!e)||((!t||t())&&this.shouldAllowAccess()?e():this.$router.push({name:"ProfileView"}))},{immediate:!0})}}}},9646:function(e,t,i){i.r(t),i.d(t,{default:function(){return y}});var a=i(56768),o=i(5688),l=i(95187);const r={class:"profile"},s={key:0,class:"left"},n={key:1,class:"left"},c={class:"topPart"},u={key:0},d={key:0,class:"pages","aria-label":"Account navigation"},h=["data-cy"],m=["onClick","aria-current"],f=["onClick"],g={class:"right"},C={class:"topInfo"},v={class:"topPart"},k={key:0};function p(e,t,i,p,b,O){const E=(0,a.g2)("PhoneVerificationModal"),_=(0,a.g2)("EmailVerificationModal"),A=(0,a.g2)("BackButton"),T=(0,a.g2)("router-view");return(0,a.uX)(),(0,a.CE)("div",r,[(0,a.bF)(o.eB,{name:"fade"},{default:(0,a.k6)(()=>[b.phoneVerificationModalIsOpen?((0,a.uX)(),(0,a.Wv)(E,{key:0,onCloseModal:O.togglePhoneVerificationModal},null,8,["onCloseModal"])):(0,a.Q3)("",!0)]),_:1}),(0,a.bF)(o.eB,{name:"fade"},{default:(0,a.k6)(()=>[b.emailVerificationModalIsOpen?((0,a.uX)(),(0,a.Wv)(_,{key:0,onCloseModal:O.toggleEmailVerificationModal},null,8,["onCloseModal"])):(0,a.Q3)("",!0)]),_:1}),e.storeConfig?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.CE)("div",s)),e.storeConfig?((0,a.uX)(),(0,a.CE)("div",n,[(0,a.bF)(A,{label:O.getBackButtonText,onClick:O.backButtonClicked},null,8,["label","onClick"]),(0,a.Lk)("div",c,[t[2]||(t[2]=(0,a.Lk)("h3",null,"Your Account",-1)),e.customerData?.email?((0,a.uX)(),(0,a.CE)("p",u,(0,l.v_)(e.customerData.email),1)):(0,a.Q3)("",!0)]),e.customerData?((0,a.uX)(),(0,a.CE)("nav",d,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(O.visiblePages,t=>((0,a.uX)(),(0,a.CE)("div",{key:t.label,class:"page","data-cy":t.dataCy},[t.route?((0,a.uX)(),(0,a.CE)("a",{key:0,href:"javascript:;",onClick:e=>O.setSelectedComponent(t.route),class:(0,l.C4)({active:e.$route.name===t.route}),"aria-current":e.$route.name===t.route?"page":null},(0,l.v_)(t.label),11,m)):((0,a.uX)(),(0,a.CE)("a",{key:1,href:"javascript:;",onClick:e=>t.action()},(0,l.v_)(t.label),9,f))],8,h))),128))])):(0,a.Q3)("",!0),(0,a.Lk)("a",{onClick:t[0]||(t[0]=(...e)=>O.logOut&&O.logOut(...e)),class:"logOut",href:"javascript:;","aria-label":"Log out"},[...t[3]||(t[3]=[(0,a.Lk)("p",null,"LOG OUT",-1)])])])):(0,a.Q3)("",!0),(0,a.Lk)("div",g,[(0,a.Lk)("div",C,[(0,a.Lk)("div",v,[(0,a.bF)(A,{label:O.getBackButtonText,onClick:O.backButtonClicked},null,8,["label","onClick"]),t[4]||(t[4]=(0,a.Lk)("h3",null,"Your Account",-1)),e.customerData?.email?((0,a.uX)(),(0,a.CE)("p",k,(0,l.v_)(e.customerData.email),1)):(0,a.Q3)("",!0)]),(0,a.Lk)("a",{onClick:t[1]||(t[1]=(...e)=>O.logOut&&O.logOut(...e)),class:"logOut",href:"javascript:;","aria-label":"Log out"},[...t[5]||(t[5]=[(0,a.Lk)("p",null,"LOG OUT",-1)])])]),(0,a.Lk)("div",{class:"profilePages",style:(0,l.Tr)({margin:"RewardsView"==e.$route.name?"0":"20px"})},[(0,a.bF)(T,{class:"content"},{default:(0,a.k6)(({Component:e})=>[((0,a.uX)(),(0,a.Wv)((0,a.$y)(e)))]),_:1})],4)])])}i(44114);var b=i(18325),O=i(60782),E=i(54647),_=i(50643);function A(e,t,i,o,r,s){return(0,a.uX)(),(0,a.CE)("a",{onClick:t[0]||(t[0]=t=>e.$emit("click")),class:"back",href:"javascript:;","aria-label":"Go back"},[t[1]||(t[1]=(0,a.Lk)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 241.521 415.783"},[(0,a.Lk)("path",{d:"M460.94,81.871a33.6,33.6,0,0,0-47.546,0l-174.33,174.39a33.6,33.6,0,0,0,0,47.484l174.39,174.39A33.6,\n 33.6,0,0,0,461,430.647L310.3,280.007l150.64-150.64a33.605,33.605,0,0,0,0-47.488Z",transform:"translate(-229.24 -72.016)"})],-1)),(0,a.Lk)("p",null,(0,l.v_)(i.label),1)])}var T={props:{label:{type:String,required:!0}},emits:["click"]},V=i(71241);const I=(0,V.A)(T,[["render",A],["__scopeId","data-v-66495afc"]]);var S=I,w=i(18554),L=i(67158),M=i(89387),B={data(){return{phoneVerificationModalIsOpen:!1,emailVerificationModalIsOpen:!1}},components:{PhoneVerificationModal:E.A,EmailVerificationModal:_.A,BackButton:S},...w.Ay,mixins:[L.A,M.A],computed:{...(0,O.aH)(["customerData","phoneVerified","selectedStore","branding","storeConfig"]),getPreviousRoute(){let e=this.$router.options.history.state.back;return e},getBackButtonText(){this.$route.name;let e=JSON.parse(localStorage.getItem("backToRoute"));if(!e)return"BACK TO LOCATIONS";switch(e.name){case"HomeView":return"BACK TO LOCATIONS";case"MenuView":return"BACK TO MENU";case"AccountView":return"BACK TO PROFILE";case"CheckoutView":return"BACK TO CHECKOUT";case"ContentHubView":return"BACK TO CONTENT HUB";default:return"BACK TO LOCATIONS"}},shouldShow(){return this.shouldAllowAccess()},visiblePages(){const e=this.shouldShow,t=[{label:"Profile",route:"ProfileView",visible:!0},{label:"Order History",route:"OrderHistoryView",visible:e},{label:"Addresses",route:"AddressesView",visible:e&&this.addressesIsVisible,dataCy:"account-addresses-link"},{label:"Rewards",route:"RewardsView",visible:e&&this.rewardsIsVisible},{label:"Verify Phone",action:this.togglePhoneVerificationModal,visible:!this.customerData?.is_phone_verified&&!!this.storeConfig?.require_phone_verification},{label:"Verify Email",action:this.toggleEmailVerificationModal,visible:!this.customerData?.is_verified&&!!this.storeConfig?.require_email_verification},{label:"Favorite Items",route:"FavoriteItemsView",visible:e&&this.visibleServices.length>0},{label:"Payment Methods",route:"ManageCardsView",visible:e&&this.manageCardsIsVisible},{label:"Gift Cards",route:"GiftCardsView",visible:e&&this.giftCardsIsVisible},{label:"External Links",route:"ExternalLinksView",visible:this.branding?.external_links?.length>0}];return t.filter(e=>e.visible)}},methods:{...(0,O.PY)(["SET_LOGGED_IN","SET_ORDER_DATA","SET_DAY_AND_TIME_SELECTED","SET_CUSTOMER_DATA","SET_COOKIES","RESET_COOKIES"]),togglePhoneVerificationModal(){this.phoneVerificationModalIsOpen=!this.phoneVerificationModalIsOpen},toggleEmailVerificationModal(){this.emailVerificationModalIsOpen=!this.emailVerificationModalIsOpen},setSelectedComponent(e){this.$router.push({name:e})},logOut(){b.A.logout().then(e=>{"Logged out"==e.data.data.ok&&(this.SET_LOGGED_IN(!1),this.SET_ORDER_DATA(null),localStorage.removeItem("customerId"),localStorage.removeItem("orderId"),localStorage.removeItem("selectedTip"),localStorage.removeItem("dayAndTimeSelected"),localStorage.removeItem("auth"),localStorage.removeItem("loggedIn"),localStorage.removeItem("phoneVerified"),localStorage.removeItem("newCardData"),localStorage.removeItem("otherTipAmount"),this.RESET_COOKIES(),this.SET_DAY_AND_TIME_SELECTED(!1),this.SET_CUSTOMER_DATA(null),this.$router.push("/"))}).catch(e=>{console.log(e)})},backButtonClicked(){if("BACK TO LOCATIONS"===this.getBackButtonText)return void this.$router.push({name:"HomeView"});let e=JSON.parse(localStorage.getItem("backToRoute"));if(e)switch(e.name){case"ConfirmationView":this.$router.push({name:"HomeView"});break;default:this.$router.push(e.path);break}else this.$router.push({name:"HomeView"})}}};const D=(0,V.A)(B,[["render",p],["__scopeId","data-v-4746f115"]]);var y=D}}]); 2//# sourceMappingURL=account.3986b5d4.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.