PageSourceSearch

https://eatnaya.netlify.app/js/home.64a06160.js

js eatnaya.netlify.app collected 2026-10-03 10:41:00 UTC 41,504 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunklunchbox_storefront"]=self["webpackChunklunchbox_storefront"]||[]).push([[962],{27175:function(e,t,s){s(44114),s(18111),s(7588);var r=s(55112);const i={$:"USD",US$:"USD",C$:"CAD",CA$:"CAD",A$:"AUD","€":"EUR","£":"GBP","₺":"TRY","₸":"KZT","₽":"RUB","₹":"INR","¥":"JPY","₩":"KRW","₪":"ILS","₦":"NGN","₱":"PHP",R$:"BRL","﷼":"SAR","د.إ":"AED"};t.A={methods:{metaPixelReady(){return"function"===typeof fbq},metaCurrency(){const e=r["default"].state.storeConfig?.localization,t=e?.currency_code||e?.currency;if(t)return String(t).toUpperCase();const s=r["default"].state.orderData?.order?.payment_request?.details?.total?.amount?.currency;return s?String(s).toUpperCase():i[e?.currency_symbol]||"USD"},metaValue(e){const t=Number(e);return Number.isFinite(t)?Number((t/100).toFixed(2)):0},metaItemTotalCents(e){let t=Number(e?.extended_price)||0;const s=e?.child_items||[];return s.forEach(e=>{t+=this.metaItemTotalCents(e)}),t},metaStoreParams(){const e=r["default"].state.selectedStore,t=r["default"].state.orderData?.restaurant,s=e?.store_id??t?.store_id,i=e?.name??t?.name;let o={};return null!=s&&(o.store_id=String(s)),i&&(o.store_name=i),o},metaContentsFromOrderItems(e){const t=e||[];let s=[],r=0;return t.forEach(e=>{const t=Number(e.quantity??e.display_quantity??1)||1,i=this.metaItemTotalCents(e);r+=t,s.push({id:String(e.item_id),quantity:t,item_price:this.metaValue(i/t),title:e.item_name})}),{contents:s,content_ids:s.map(e=>e.id),content_type:"product",num_items:r}},trackMetaEvent(e,t,s){if(this.metaPixelReady())try{s?fbq("track",e,t,{eventID:String(s)}):fbq("track",e,t)}catch(r){console.log("Meta Pixel tracking error:",r)}},trackMetaViewContent(e){this.metaPixelReady()&&this.trackMetaEvent("ViewContent",{currency:this.metaCurrency(),...this.metaStoreParams(),...e||{}})},trackMetaAddToCart(e,t,s){if(!this.metaPixelReady())return;const r=Number(s)||1,i=this.metaValue(t);this.trackMetaEvent("AddToCart",{content_type:"product",content_ids:[String(e?.item_id??"")],content_name:e?.item_name??"",contents:[{id:String(e?.item_id??""),quantity:r,item_price:this.metaValue(t/r),title:e?.item_name??""}],num_items:r,currency:this.metaCurrency(),value:i,...this.metaStoreParams()})},trackMetaInitiateCheckout(e,t){if(!this.metaPixelReady())return;const s=e||r["default"].state.orderData?.order;if(!s)return;const i=s.charges||{},o=i.total_cents??i.subtotal_cents;this.trackMetaEvent("InitiateCheckout",{...this.metaContentsFromOrderItems(s.items),...t?{delivery_category:t}:{},currency:this.metaCurrency(),value:this.metaValue(o),...this.metaStoreParams()})},trackMetaPurchase(e,t){if(!this.metaPixelReady())return;const s=e||r["default"].state.orderData?.order;if(!s)return;const i=s.charges||{};this.trackMetaEvent("Purchase",{...this.metaContentsFromOrderItems(s.items),...t?{delivery_category:t}:{},order_id:String(s.order_id??""),currency:this.metaCurrency(),value:this.metaValue(i.total_cents),...this.metaStoreParams()},s.order_id)}}}},79653:function(e,t,s){s.r(t),s.d(t,{default:function(){return Ve}});s(18111),s(61701);var r=s(56768),i=s(5688),o=s(95187);const a={class:"home"},d={class:"rightPart"},l={class:"locations"},n={key:0,class:"serviceTypeSelection"},c={class:"orderTypesWrapper"},h={class:"addressDetails"},u={key:0,class:"remove"},p={key:2,class:"loader smallLoader"},g={key:5,class:"validation"},m={key:0,class:"savedAddresses"},S={class:"addresses"},_=["onClick"],v={key:1,class:"results"},L={key:0},y=["onClick"],E={class:"storeInfoWrapper"},f=["src"],T={key:1,class:"testStore"},C={class:"storeNameWrapper"},A=["onClick"],k={key:0,class:"favoriteEmpty",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"28.043",viewBox:"0 0 32 28.043"},I={key:1,class:"favoriteFill",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"25.832",viewBox:"0 0 30 25.832"},w={key:2,class:"distance"},M={key:3,class:"address1"},O={key:4},D={key:5,class:"line"},b={class:"storeInfo"},R={class:"line"},x=["onClick"],F={key:0},P={key:0},V={key:0,class:"daysAndHours"},$={class:"serviceTypeHoursHeader"},H=["onClick","disabled"],U={key:0,class:"loader buttonLoader"},N={key:1,class:"deliveryAddressMessage"},X=["src"],q={key:2,class:"results"},W={class:"storeInfoWrapper"},Q={class:"storeNameWrapper"},G={class:"storeInfo"},B={class:"line"},K={key:3,class:"error"};function Z(e,t,s,Z,Y,z){const J=(0,r.g2)("CustomPopup"),j=(0,r.g2)("ChangeLocationModal"),ee=(0,r.g2)("ChangeServiceTypeModal"),te=(0,r.g2)("RadarMapView"),se=(0,r.g2)("MapView"),re=(0,r.g2)("SegmentedControl"),ie=(0,r.g2)("RadarAutoComplete"),oe=(0,r.g2)("AutoComplete"),ae=(0,r.g2)("ShimmerView");return(0,r.uX)(),(0,r.CE)("div",a,[(0,r.bF)(i.eB,{name:"fade"},{default:(0,r.k6)(()=>[Y.customPopUpIsVisible?((0,r.uX)(),(0,r.Wv)(J,{key:0,onCloseModal:z.toggleCustomPopUpModal},null,8,["onCloseModal"])):(0,r.Q3)("",!0)]),_:1}),(0,r.bF)(i.eB,{name:"fade"},{default:(0,r.k6)(()=>[Y.changeLocationModalIsOpen?((0,r.uX)(),(0,r.Wv)(j,{key:0,onChangeStore:z.changeStore,onCloseModal:z.toggleChangeLocationModal},null,8,["onChangeStore","onCloseModal"])):(0,r.Q3)("",!0)]),_:1}),(0,r.bF)(i.eB,{name:"fade"},{default:(0,r.k6)(()=>[Y.changeServiceTypeModalIsOpen?((0,r.uX)(),(0,r.Wv)(ee,{key:0,onCloseModal:z.toggleChangeServiceTypeModal,updatedService:Y.updatedService,onChangeServiceType:z.changeServiceType},null,8,["onCloseModal","updatedService","onChangeServiceType"])):(0,r.Q3)("",!0)]),_:1}),"RADAR"==e.mapType?((0,r.uX)(),(0,r.Wv)(te,{key:0,ref:"radarMap",selectedService:e.selectedService,fitBounds:!0,favoriteStoreIds:Y.favoriteLocations?Y.favoriteLocations.map(e=>e.store_id):[],onClickedStoreId:z.scrollToTheStore,onSelectStore:z.selectStore},null,8,["selectedService","favoriteStoreIds","onClickedStoreId","onSelectStore"])):(0,r.Q3)("",!0),"GOOGLE"==e.mapType?((0,r.uX)(),(0,r.Wv)(se,{key:1,ref:"map",selectedService:e.selectedService,fitBounds:!0,onClickedStoreId:z.scrollToTheStore,onSelectStore:z.selectStore},null,8,["selectedService","onClickedStoreId","onSelectStore"])):(0,r.Q3)("",!0),(0,r.Lk)("div",d,[(0,r.Lk)("div",l,[e.storeConfig&&z.visibleServices.length?((0,r.uX)(),(0,r.CE)("div",n,[(0,r.Lk)("div",c,[(0,r.bF)(re,{elements:z.visibleServices,elementId:"service_type_id",selectedId:e.selectedService?.service_type_id,elementName:"display_name",onChange:z.changeService,loading:Y.loading},null,8,["elements","selectedId","onChange","loading"])]),(0,r.Lk)("div",h,[(0,r.Lk)("div",{class:"addressWrapper",style:(0,o.Tr)({"grid-column":e.selectedService&&!e.selectedService.requires_address?"span 2":""})},[Y.selectedAddressLat&&Y.selectedAddressLng&&Y.addressTyped?((0,r.uX)(),(0,r.CE)("div",u,[(0,r.Lk)("a",{onClick:t[0]||(t[0]=e=>z.addressValue("")),href:"#"},[...t[3]||(t[3]=[(0,r.Lk)("svg",{class:"clearSearchIcon",width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,r.Lk)("path",{d:"M8.1161 6.6228L7.75908 6.97635L8.11437 7.33163L13.4572 12.6745L12.6745 13.4572L11.8466 12.6294L11.8449 12.6277L7.37718 8.11608L7.02364 7.75906L6.66835 8.11435L1.32551 13.4572L0.542786 12.6745L5.88563 7.33163L6.24062 6.97664L5.8842 6.62309L0.543158 
11.32514L1.32551 0.542787L6.66835 5.88563L7.02334 6.24061L7.37689 5.88419L12.6748 0.543155L13.4572 1.32551L12.6294 2.15333L12.6277 2.15504L8.1161 6.6228ZM12.7648 13.5475C12.7649 13.5476 12.765 13.5478 12.7651 13.5479L12.7648 13.5475ZM0.452113 12.7651L0.452145 12.7651C0.452134 12.7651 0.452123 12.7651 0.452113 12.7651Z",fill:"black",stroke:"black"})],-1)])])])):(0,r.Q3)("",!0),e.selectedService&&!e.selectedService.requires_address&&(!Y.selectedAddressLat&&!Y.selectedAddressLng)&!Y.getLocationLoader?((0,r.uX)(),(0,r.CE)("div",{key:1,onClick:t[1]||(t[1]=(...e)=>z.getUsersLocation&&z.getUsersLocation(...e)),class:"locationButton"},[...t[4]||(t[4]=[(0,r.Lk)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"470.392",height:"470.502",viewBox:"0 0 470.392 470.502"},[(0,r.Lk)("path",{id:"Path_19600","data-name":"Path 19600",d:"M567,44.875a16.687,16.687,0,0,0-5.773,1.574l-436.8,207.2a16.8,16.8,0,0,0,.7,30.625l155.93,64.574,64.574,155.93a16.8,16.8,0,0,0,30.8.875l207.2-436.8a16.8,16.8,0,0,0-16.625-23.976ZM532.875,97.023l-170.62,359.8-52.676-127.23a16.778,16.778,0,0,0-9.1-9.1L172.9,267.643Z",transform:"translate(-114.879 -44.813)"})],-1)])])):(0,r.Q3)("",!0),Y.getLocationLoader?((0,r.uX)(),(0,r.CE)("div",p)):(0,r.Q3)("",!0),"RADAR"==e.autoCompleteType?((0,r.uX)(),(0,r.Wv)(ie,{key:3,placeholder:e.selectedService?.requires_address?"Enter your address":"Enter your city, state or zip",from:"home",reqiresAddress:e.selectedService?.requires_address,onAddressSelected:z.getLatAndLng,ref:"radarAutoComplete"},null,8,["placeholder","reqiresAddress","onAddressSelected"])):(0,r.Q3)("",!0),"GOOGLE"==e.autoCompleteType?((0,r.uX)(),(0,r.Wv)(oe,{key:4,onPlaceChanged:z.getLatAndLng,onInput:z.addressValue,placeholder:e.selectedService&&e.selectedService?.requires_address?"Enter your address":"Enter your city, state or zip",requiresAddress:e.selectedService&&e.selectedService?.requires_address,ref:"autoComplete"},null,8,["onPlaceChanged","onInput","placeholder","requiresAddress"])):(0,r.Q3)("",!0),Y.validAddressError?((0,r.uX)(),(0,r.CE)("p",g,(0,o.v_)(Y.validAddressError),1)):(0,r.Q3)("",!0)],4),e.selectedService&&e.selectedService?.requires_address?(0,r.bo)(((0,r.uX)(),(0,r.CE)("input",{key:0,type:"text",placeholder:"Apt/Suite","onUpdate:modelValue":t[2]||(t[2]=e=>Y.aptSuite=e)},null,512)),[[i.Jo,Y.aptSuite]]):(0,r.Q3)("",!0)]),Y.addresses&&0!=Y.addresses.length&&e.selectedService&&e.selectedService?.requires_address&&e.loggedIn?((0,r.uX)(),(0,r.CE)("div",m,[t[6]||(t[6]=(0,r.Lk)("label",null,"Or Select Saved Address",-1)),(0,r.Lk)("div",S,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(z.firstTwoAddresses,s=>((0,r.uX)(),(0,r.CE)("div",{key:s.address_id,class:"address",style:(0,o.Tr)({backgroundColor:e.branding.dark_mode_enabled?"var(--background-color)":"#FFFFFF"})},[(0,r.Lk)("p",null,(0,o.v_)(s.address1)+", "+(0,o.v_)(s.city)+", "+(0,o.v_)(s.state_code)+" "+(0,o.v_)(s.postal_code),1),(0,r.Lk)("a",{onClick:e=>z.selectAddress(s),class:"selectAddress",href:"javascript:;"},[...t[5]||(t[5]=[(0,r.Lk)("p",null,"SELECT",-1)])],8,_)],4))),128))])])):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0),e.storeConfig?((0,r.uX)(),(0,r.CE)("div",v,[Y.stores?((0,r.uX)(),(0,r.CE)("div",L,[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(z.filteredStores,s=>((0,r.uX)(),(0,r.CE)("div",{class:"store",key:s.store_id,onClick:e=>z.openInfoWindow(s)},[(0,r.Lk)("div",E,[s?.extra?.store_image?((0,r.uX)(),(0,r.CE)("img",{key:0,class:"storeImage",src:s?.extra?.store_image,alt:"store"},null,8,f)):(0,r.Q3)("",!0),s.test_store?((0,r.uX)(),(0,r.CE)("p",T,"Test Store")):(0,r.Q3)("",!0),(0,r.Lk)("div",C,[(0,r.Lk)("h3",null,(0,o.v_)(s.name),1),e.loggedIn?((0,r.uX)(),(0,r.CE)("a",{key:0,onClick:(0,i.D$)(e=>z.checkIfLocationIsFavorited(s)?z.removeFromFavorites(s):z.addToFavorites(s),["stop"]),class:"favorite"},[z.checkIfLocationIsFavorited(s)?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("svg",k,[...t[7]||(t[7]=[(0,r.Lk)("path",{id:"heart",d:"M46.654,0A7.425,7.425,0,0,0,39.83,4.53,7.422,7.422,0,0,0,33.006,0C27.9,0,24.83,4.864,\n                            24.83,8.874c0,6.719,15,16.959,15,16.959s15-10.238,15-16.958C54.83,4.864,51.758,0,46.654,0Z",transform:"translate(-23.83 1)",fill:"none",stroke:"#000","stroke-width":"3"},null,-1)])])),z.checkIfLocationIsFavorited(s)?((0,r.uX)(),(0,r.CE)("svg",I,[...t[8]||(t[8]=[(0,r.Lk)("path",{id:"heart-fill",d:"M46.654,0A7.425,7.425,0,0,0,39.83,4.53,7.422,7.422,0,0,0,33.006,0C27.9,0,24.83,\n                      4.864,24.83,8.874c0,6.719,15,16.959,15,16.959s15-10.238,15-16.958C54.83,4.864,51.758,0,46.654,0Z",transform:"translate(-24.83)",fill:"#010101"},null,-1)])])):(0,r.Q3)("",!0)],8,A)):(0,r.Q3)("",!0)]),Y.selectedAddressLat&&Y.selectedAddressLng?((0,r.uX)(),(0,r.CE)("p",w,(0,o.v_)(z.getDistance(Y.selectedAddressLat,Y.selectedAddressLng,s.latitude,s.longitude))+" miles away ",1)):(0,r.Q3)("",!0),e.branding.display_options.hide_store_address?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("p",M,(0,o.v_)(s.address1)+", "+(0,o.v_)(s.city)+", "+(0,o.v_)(s.state)+" "+(0,o.v_)(s.postal_code),1)),s?.subtitle?((0,r.uX)(),(0,r.CE)("p",O,(0,o.v_)(s.subtitle),
11)):(0,r.Q3)("",!0),e.branding.display_options?.hide_restaurant_phone_number?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("div",D,[(0,r.Lk)("p",null,(0,o.v_)(e.formatPhoneNumber(s.phone)),1)])),(0,r.Lk)("div",b,[(0,r.Lk)("div",R,[(0,r.Lk)("p",{style:(0,o.Tr)({color:z.isStoreOpenForService(s)?"var(--custom-green-color)":"var(--red-color)"})},(0,o.v_)(z.isStoreOpenForService(s)?"Open Now":"Closed"),5),(0,r.Lk)("a",{onClick:e=>z.expandViewHours(s),class:"hours",href:"javascript:;"},[(0,r.Lk)("p",null,(0,o.v_)(z.checkExpandedHours(s)?"Hide":"View")+" Hours",1)],8,x),z.isStoreOpenForService(s)&&e.selectedService?((0,r.uX)(),(0,r.CE)("p",F,[(0,r.eW)((0,o.v_)(e.selectedService.display_name?e.selectedService.display_name:e.selectedService.name)+" ",1),z.getServiceEstimates(s)?((0,r.uX)(),(0,r.CE)("span",P," Time: "+(0,o.v_)(z.getServiceEstimates(s)),1)):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0)]),z.checkExpandedHours(s)?((0,r.uX)(),(0,r.CE)("div",V,[(0,r.Lk)("p",$,(0,o.v_)(e.selectedService&&(e.selectedService.display_name||e.selectedService.name)||"")+" Hours ",1),((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)(z.getWorkingTimeForDay(s.hours),e=>((0,r.uX)(),(0,r.CE)("div",{key:e,class:"day"},[(0,r.Lk)("p",{style:(0,o.Tr)({"font-family":z.isToday(e.day)?"var(--regular-bold-font)":"var(--regular-font)","text-decoration":z.isToday(e.day)?"underline":"none"})},(0,o.v_)(e.day),5),(0,r.Lk)("div",null,[(0,r.Lk)("p",{style:(0,o.Tr)({"font-family":z.isToday(e.day)?"var(--regular-bold-font)":"var(--regular-font)","text-decoration":z.isToday(e.day)?"underline":"none"})},(0,o.v_)(z.isToday(e.day)&&z.getStoreService(s)?.offline_today||!e.start_time||!e.end_time?"Closed":e.start_time+" - "+e.end_time),5)])]))),128))])):(0,r.Q3)("",!0)])]),z.storeHasVisibleService(s)?((0,r.uX)(),(0,r.CE)("button",{key:0,onClick:(0,i.D$)(e=>z.selectStore(s,"list",!1,z.isBrowseOnly(s)),["stop"]),disabled:!z.isBrowseOnly(s)&&!z.canStartOrder(s)||e.buttonLoader&&Y.clickedStoreId==s.store_id&&"list"==Y.from},[e.buttonLoader&&Y.clickedStoreId==s.store_id&&"list"==Y.from?((0,r.uX)(),(0,r.CE)("div",U)):((0,r.uX)(),(0,r.CE)(r.FK,{key:1},[(0,r.eW)((0,o.v_)(z.getStoreCtaText(s)),1)],64))],8,H)):(0,r.Q3)("",!0)],8,y))),128))])):(0,r.Q3)("",!0),Y.stores||Y.loading||!e.selectedService?.requires_address?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("div",N,[(0,r.Lk)("img",{src:e.branding.menu_logo_url,alt:"companyLogo"},null,8,X),t[9]||(t[9]=(0,r.Lk)("p",null,"Enter delivery address to get started",-1))]))])):(0,r.Q3)("",!0),Y.loading||!e.storeConfig?((0,r.uX)(),(0,r.CE)("div",q,[(0,r.Lk)("div",null,[((0,r.uX)(),(0,r.CE)(r.FK,null,(0,r.pI)(8,e=>(0,r.Lk)("div",{key:e,class:"store"},[(0,r.Lk)("div",W,[(0,r.Lk)("div",Q,[(0,r.bF)(ae,{height:"16px",width:"200px"}),(0,r.bF)(ae,{height:"16px",width:"16px",margin:"0px 0px 0px 0px"})]),(0,r.bF)(ae,{height:"16px",width:"160px",margin:"5px 0px 0px 0px"}),(0,r.bF)(ae,{height:"16px",width:"100px",margin:"5px 0px 5px 0px"}),(0,r.Lk)("div",G,[(0,r.Lk)("div",B,[(0,r.bF)(ae,{height:"16px",width:"80px"}),(0,r.bF)(ae,{height:"16px",width:"80px"}),(0,r.bF)(ae,{height:"16px",width:"80px"})])]),(0,r.bF)(ae,{height:"50px",width:"100%",margin:"20px 0px 0px 0px"})])])),64))])])):(0,r.Q3)("",!0),Y.errorMessage?((0,r.uX)(),(0,r.CE)("p",K,(0,o.v_)(Y.errorMessage),1)):(0,r.Q3)("",!0)])])])}s(44114),s(22489),s(20116),s(7588),s(13579);var Y=s(39325),z=s(49148),J=s.n(z),j=s(79634),ee=s(60782);const te={class:"modalWrapper"};function se(e,t,s,o,a,d){return(0,r.uX)(),(0,r.CE)("div",{onClick:t[2]||(t[2]=(0,i.D$)((...e)=>d.closeModal&&d.closeModal(...e),["self"])),class:"modalContainer"},[(0,r.Lk)("div",te,[(0,r.Lk)("div",{onClick:t[0]||(t[0]=(...e)=>d.closeModal&&d.closeModal(...e)),class:"close"},[...t[3]||(t[3]=[(0,r.Lk)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,r.Lk)("path",{d:"M8.1161 6.6228L7.75908 6.97635L8.11437 7.33163L13.4572 12.6745L12.6745 13.4572L11.8466 12.6294L11.8449 12.6277L7.37718 8.11608L7.02364 7.75906L6.66835 8.11435L1.32551 13.4572L0.542786 12.6745L5.88563 7.33163L6.24062 6.97664L5.8842 6.62309L0.543158 1.32514L1.32551 0.542787L6.66835 5.88563L7.02334 6.24061L7.37689 5.88419
1L12.6748 0.543155L13.4572 1.32551L12.6294 2.15333L12.6277 2.15504L8.1161 6.6228ZM12.7648 13.5475C12.7649 13.5476 12.765 13.5478 12.7651 13.5479L12.7648 13.5475ZM0.452113 12.7651L0.452145 12.7651C0.452134 12.7651 0.452123 12.7651 0.452113 12.7651Z",fill:"black",stroke:"black"})],-1)])]),t[4]||(t[4]=(0,r.Lk)("h2",null,"Select New Location",-1)),t[5]||(t[5]=(0,r.Lk)("p",null,[(0,r.eW)(" Are you sure you want to select a new location? If you have items in your cart, "),(0,r.Lk)("span",{class:"bold"},"some items may not be available and will be removed from your order.")],-1)),(0,r.Lk)("button",{onClick:t[1]||(t[1]=(...e)=>d.changeStore&&d.changeStore(...e))},"CHANGE LOCATION")])])}var re=s(10957),ie={mixins:[re.A],computed:{...(0,ee.aH)(["orderData"])},methods:{closeModal(){this.$emit("closeModal")},changeStore(){this.$emit("changeStore")}}},oe=s(71241);const ae=(0,oe.A)(ie,[["render",se],["__scopeId","data-v-916965c2"]]);var de=ae;const le={class:"modalWrapper"};function ne(e,t,s,o,a,d){return(0,r.uX)(),(0,r.CE)("div",{onClick:t[2]||(t[2]=(0,i.D$)((...e)=>d.closeModal&&d.closeModal(...e),["self"])),class:"modalContainer"},[(0,r.Lk)("div",le,[(0,r.Lk)("div",{onClick:t[0]||(t[0]=(...e)=>d.closeModal&&d.closeModal(...e)),class:"close"},[...t[3]||(t[3]=[(0,r.Lk)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,r.Lk)("path",{d:"M8.1161 6.6228L7.75908 6.97635L8.11437 7.33163L13.4572 12.6745L12.6745 13.4572L11.8466 12.6294L11.8449 12.6277L7.37718 8.11608L7.02364 7.75906L6.66835 8.11435L1.32551 13.4572L0.542786 12.6745L5.88563 7.33163L6.24062 6.97664L5.8842 6.62309L0.543158 1.32514L1.32551 0.542787L6.66835 5.88563L7.02334 6.24061L7.37689 5.88419L12.6748 0.543155L13.4572 1.32551L12.6294 2.15333L12.6277 2.15504L8.1161 6.6228ZM12.7648 13.5475C12.7649 13.5476 12.765 13.5478 12.7651 13.5479L12.7648 13.5475ZM0.452113 12.7651L0.452145 12.7651C0.452134 12.7651 0.452123 12.7651 0.452113 12.7651Z",fill:"black",stroke:"black"})],-1)])]),t[4]||(t[4]=(0,r.Lk)("h2",null,"Change Service Type",-1)),t[5]||(t[5]=(0,r.Lk)("p",null,[(0,r.eW)(" Are you sure you want to change your service type? If you have items in your cart, "),(0,r.Lk)("span",{class:"bold"},"some items may not be available and may be removed from your order.")],-1)),(0,r.Lk)("button",{onClick:t[1]||(t[1]=(...e)=>d.changeServiceType&&d.changeServiceType(...e))},"CHANGE SERVICE TYPE")])])}var ce={props:["updatedService"],mixins:[re.A],methods:{closeModal(){this.$emit("closeModal")},changeServiceType(){this.$emit("changeServiceType",this.updatedService)}}};const he=(0,oe.A)(ce,[["render",ne],["__scopeId","data-v-0f4ffa05"]]);var ue=he;const pe={class:"modalWrapper"},ge=["innerHTML"],me=["src"];function Se(e,t,s,a,d,l){return(0,r.uX)(),(0,r.CE)("div",{onClick:t[1]||(t[1]=(0,i.D$)((...e)=>l.closeModal&&l.closeModal(...e),["self"])),class:"modalContainer","data-cy":"custom-popup"},[(0,r.Lk)("div",pe,[(0,r.Lk)("div",{onClick:t[0]||(t[0]=(...e)=>l.closeModal&&l.closeModal(...e)),class:"close","data-cy":"close-popup"},[...t[2]||(t[2]=[(0,r.Lk)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[(0,r.Lk)("path",{d:"M8.1161 6.6228L7.75908 6.97635L8.11437 7.33163L13.4572 12.6745L12.6745 13.4572L11.8466 12.6294L11.8449 12.6277L7.37718 8.11608L7.02364 7.75906L6.66835 8.11435L1.32551 13.4572L0.542786 12.6745L5.88563 7.33163L6.24062 6.97664L5.8842 6.62309L0.543158 1.32514L1.32551 0.542787L6.66835 5.88563L7.02334 6.24061L7.37689 5.88419L12.6748 0.543155L13.4572 1.32551L12.6294 2.15333L12.6277 2.15504L8.1161 6.6228ZM12.7648 13.5475C12.7649 13.5476 12.765 13.5478 12.7651 13.5479L12.7648 13.5475ZM0.452113 12.7651L0.452145 12.7651C0.452134 12.7651 0.452123 12.7651 0.452113 12.7651Z",fill:"black",stroke:"black"})],-1)])]),(0,r.Lk)("h2",null,(0,o.v_)(e.branding.display_options?.pop_up.header),1),(0,r.Lk)("p",{innerHTML:l.getPurifiedBody,style:(0,o.Tr)({"margin-bottom":l.customImageUrl?"20px":"0"})},null,12,ge),l.customImageUrl?((0,r.uX)(),(0,r.CE)("img",{key:0,src:l.customImageUrl,alt:"Custom Image",class:"customImage"},null,8,me)):(0,r.Q3)("",!0)])])}var _e=s(18353),ve={mixins:[re.A],computed:{...(0,ee.aH)(["branding"]),getPurifiedBody(){const e=["br","strong","a"],t=["href","target"],s=_e["default"].sanitize(this.branding.display_options?.pop_up.body,{ALLOWED_TAGS:e,ALLOWED_ATTR:t});return s},customImageUrl(){return this.branding.display_options?.pop_up.image||""}},methods:{closeModal(){this.$emit("closeModal")}}};const Le=(0,oe.A)(ve,[["render",Se],["__scopeId","data-v-a4988f94"]]);var ye=Le,Ee=s(34420),fe=s(20556),Te=s(35846),Ce=s(52140),Ae=s(79907),ke=s(76936),Ie=s(79281),we=s(69356),Me=s(18554),Oe=s(33822),De=s(27175),be=s(18325),Re=s(31006),xe=s(7721),Fe={name:"HomeView",data(){return{stores:null,errorMessage:null,selectedStoreData:null,selectedStoreIndex:null,loading:!1,selectedAddressLat:null,selectedAddressLng:null,viewHoursIsOpen:!1,addresses:null,from:null,newAddress:null,addressData:null,serviceTypeListIsVisible:!1,
1changeLocationModalIsOpen:!1,newStoreId:null,changeServiceTypeModalIsOpen:!1,updatedService:null,openViewHoursStoreIds:[],validAddressError:null,customPopUpIsVisible:!1,aptSuite:"",addressTyped:!1,getLocationLoader:!1,selectedLocationTab:"all",favoriteLocations:null,clickedStoreId:null,sortedStoreList:[],queryApplied:!1,storesInitialized:!1}},components:{ChangeLocationModal:de,ChangeServiceTypeModal:ue,CustomPopup:ye,AutoComplete:Ee.A,RadarAutoComplete:fe.A,MapView:Te.A,RadarMapView:Ce.A,SegmentedControl:Ae.A,ShimmerView:ke.A},mixins:[Ie.A,we.A,Oe.A,De.A],...Me.Ay,watch:{favoriteLocations(){this.sortStores()},selectedService(e,t){null!=t||e.requires_address||this.displayStores()},loggedIn(e,t){0==t&&1==e&&this.selectedService.requires_address&&this.getAddresses(),0!=t||1!=e||this.selectedService.requires_address||this.displayStores(!0)},storeConfig(e){e&&!this.queryApplied&&this.applyServiceTypeFromQuery(),this.ensureStoresLoaded()},filteredStores(){this.refreshMapMarkers()}},computed:{...(0,ee.aH)(["storeConfig","selectedService","selectedStore","buttonLoader","loggedIn","selectedAddress","customerData","orderData","branding","cookies","mapType","autoCompleteType"]),visibleServices(){return this.storeConfig&&this.storeConfig.services?this.storeConfig.services.filter(e=>e.is_visible).sort((e,t)=>(e.display_order??0)-(t.display_order??0)):[]},firstTwoAddresses(){return this.addresses?this.addresses.slice(0,2):null},filteredStores(){return(this.sortedStoreList||[]).filter(e=>!e.test_store||this.loggedIn&&this.customerData?.is_mgmt)}},methods:{...(0,ee.PY)(["SET_STORE_CONFIG","SET_SELECTED_SERVICE","SET_SELECTED_STORE","SET_BUTTON_LOADER","SET_SELECTED_STORE_DAYS","SET_SELECTED_ADDRESS","SET_SELECTED_DAY","SET_SELECTED_HOUR","SET_DAY_AND_TIME_SELECTED","SET_TOASTER","SET_COOKIES","SET_ORDER_DATA","SET_AUTO_COMPLETE_TYPE","SET_MAP_TYPE","SET_LOGGED_IN","SET_CUSTOMER_DATA","SET_PHONE_VERIFIED"]),toggleServiceTypeList(){this.serviceTypeListIsVisible=!this.serviceTypeListIsVisible},toggleChangeLocationModal(){this.changeLocationModalIsOpen=!this.changeLocationModalIsOpen},toggleChangeServiceTypeModal(){this.changeServiceTypeModalIsOpen=!this.changeServiceTypeModalIsOpen},toggleCustomPopUpModal(){this.customPopUpIsVisible=!this.customPopUpIsVisible},sortStores(){this.selectedAddressLat||this.selectedAddressLng?this.sortedStoreList=this.stores:this.sortedStoreList=this.stores?.slice().sort((e,t)=>{const s=this.checkIfLocationIsFavorited(e),r=this.checkIfLocationIsFavorited(t);return s&&!r?-1:!s&&r?1:e.name.localeCompare(t.name)})},scrollToTheStore(e){let t=this.sortedStoreList.find(t=>t.store_id==e),s=this.sortedStoreList.indexOf(t),r=document.getElementsByClassName("store")[s];r.scrollIntoView({behavior:"smooth",block:"center"})},checkIfLocationIsFavorited(e){if(this.favoriteLocations){let t=this.favoriteLocations.find(t=>t.store_id==e.store_id);return!!t}return!1},openInfoWindow(e){"GOOGLE"==this.mapType&&this.$refs.map&&this.$refs.map.openInfoWindow(e,e.store_id),"RADAR"==this.mapType&&this.$refs.radarMap&&this.$refs.radarMap.openInfoWindow(e,e.store_id)},async selectLocationTab(e){if(this.selectedLocationTab=e,"favorite"==e){localStorage.removeItem("selectedAddress"),this.addressData=null,this.SET_SELECTED_ADDRESS(null);for(const e of this.favoriteLocations){let t=this.stores?.find(t=>t.store_id===e.store_id);if(t)e.store=t;
1else{let t=await this.getStoreData(e.store_id);e.store=t}}}},async addToFavorites(e){let t=localStorage.getItem("customerId"),s={store_name:e.name,store_id:e.store_id};be.A.addFavoriteStore(s,t).then(async t=>{let s={show:!0,message:e.name+" added to your favorites"};this.SET_TOASTER(s);let r={store_id:e.store_id,restaurant_name:e.name},i=this.stores.find(e=>e.store_id===r.store_id);if(i)r.store=i;else{let e=await this.getStoreData(r.store_id);r.store=e}this.favoriteLocations.push(r),this.SET_COOKIES(t.data.cookies)}).catch(e=>{console.log(e)})},removeFromFavorites(e){let t=localStorage.getItem("customerId"),s={store_id:e.store_id};be.A.removeFavoriteStore(s,t).then(t=>{let s=e.name?e.name:e.restaurant_name,r={show:!0,message:s+" removed from your favorites"};this.SET_TOASTER(r);let i=this.favoriteLocations.find(t=>t.store_id==e.store_id),o=this.favoriteLocations.indexOf(i);this.favoriteLocations.splice(o,1),this.SET_COOKIES(t.data.cookies)}).catch(e=>{console.log(e)})},getUsersLocation(){this.getLocationLoader=!0,navigator.geolocation&&navigator.geolocation.getCurrentPosition(e=>{this.selectedAddressLat=e.coords.latitude,this.selectedAddressLng=e.co
1ords.longitude,this.$refs.radarMap&&this.$refs.radarMap.addUserMarker(this.selectedAddressLat,this.selectedAddressLng),this.$refs.map&&this.$refs.map.addUserMarker(this.selectedAddressLat,this.selectedAddressLng),this.getStores(this.selectedService),this.getLocationLoader=!1},()=>{this.getLocationLoader=!1})},getWorkingTimeForDay(e){let t=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],s=t.map(e=>({day:e,start_times:[],end_times:[]}));e.forEach(e=>{let t=e.iso_dow-1;if("00:00"===e.start_time&&e.end_time&&J()(e.end_time,"HH:mm").isSameOrBefore(J()("05:00","HH:mm"))){let r=(t-1+7)%7;s[r].start_times.push(e.start_time),s[r].end_times.push(e.end_time)}else s[t].start_times.push(e.start_time),s[t].end_times.push(e.end_time)});let r=s.map(e=>{let t,s,r=e.start_times.slice().sort(),i=e.end_times.slice().sort();if(0===r.length)t=null,s=null;else if(1===r.length)t=r[0],s=i[0];else{t=r.find(e=>e>="05:00")||r[0];const e=[...i].sort(),o=e.filter(e=>e<="05:00");s=o.length>0?o[o.length-1]:e[e.length-1]}return{day:e.day,start_time:this.formatTime(t),end_time:this.formatTime(s)}});return r},isToday(e){let t=J()().format("dddd");return e===t},formatTime(e){return e?(0,j.Wk)(J()(e,"HH:mm")):null},changeStore(){this.toggleChangeLocationModal(),this.SET_ORDER_DATA(null),localStorage.removeItem("orderId"),localStorage.removeItem("dayAndTimeSelected"),this.SET_DAY_AND_TIME_SELECTED(!1),localStorage.removeItem("selectedDay"),this.SET_SELECTED_DAY(null),localStorage.removeItem("selectedHour"),this.SET_SELECTED_HOUR(null),localStorage.removeItem("selectedTip"),localStorage.removeItem("tipSelected"),this.selectStore(this.newStoreData,"list",!0)},getStoreService(e){return e?.services&&this.selectedService&&e.services.find(e=>e.service_type_id===this.selectedService.service_type_id)||null},storeHasVisibleService(e){return Array.isArray(e?.services)&&e.services.some(e=>e.is_visible)},isBrowseOnly(e){return!e?.active},getStoreCtaText(e){return this.isBrowseOnly(e)?"VIEW MENU":this.isStoreOpenForService(e)||this.storeConfig?.disable_future_orders?this.getOrderNowCtaText():this.getOrderAheadCtaText()},getOrderNowCtaText(){const e=this.branding?.display_options;if(!e?.change_order_cta_text)return"ORDER NOW";const t=e?.order_now_cta_text?.trim();return t||"ORDER NOW"},getOrderAheadCtaText(){const e=this.branding?.display_options;if(!e?.change_order_cta_text)return"ORDER AHEAD";const t=e?.order_ahead_cta_text?.trim();return t||"ORDER AHEAD"},isStoreOpenForService(e){const t=this.getStoreService(e);return e.is_open&&!t?.offline_today},canStartOrder(e){return this.isStoreOpenForService(e)||!this.storeConfig?.disable_future_orders},checkExpandedHours(e){let t=this.openViewHoursStoreIds.find(t=>t.id===e.store_id);return!!t},expandViewHours(e){let t=this.openViewHoursStoreIds.find(t=>t.id===e.store_id);t?this.openViewHoursStoreIds=this.openViewHoursStoreIds.filter(t=>t.id!==e.store_id):this.openViewHoursStoreIds.push({id:e.store_id})},refreshMapMarkers(){this.$refs.map&&this.$refs.map.createMarkers(this.filteredStores,this.selectedAddressLat,this.selectedAddressLng),this.$refs.radarMap&&this.$refs.radarMap.createMarkers(this.filteredStores,this.selectedAddressLat,this.selectedAddressLng)},async getStores(e){this.stores=null,this.sortedStoreList=[],this.loading=!0,this.errorMessage=null,e&&(this.SET_SELECTED_SERVICE(e),localStorage.setItem("selectedServiceId",e.service_type_id));let t={all_stores:!0,service_schedule:!0};e&&void 0!==e.service_type_id&&null!==e.service_type_id&&(t.service_type_id=e.service_type_id),e&&e.requires_address&&delete t.all_stores,this.selectedAddressLat&&this.selectedAddressLng&&(t.latitude=this.selectedAddressLat,t.longitude=this.selectedAddressLng),await Re.A.getStores(t).then(async e=>{this.loading=!1,this.errorMessage=null,this.SET_COOKIES(e.data.cookies),this.stores=e.data.data,this.sortStores(),this.refreshMapMarkers()}).catch(t=>{console.log(t),this.loading=!1;const s=e?.requires_address??this.selectedService?.requires_address??!1;400!=t.response?.data.status||"no stores found"!=t.response?.data.data.error||s?(this.errorMessage="There are no locations delivering to your address",this.stores=[],this.sortedStoreList=[]):(this.errorMessage="There are no locations within 25 miles",this.stores=[],this.sortedStoreList=[])})},async getFavoriteLocations(){let e=localStorage.getItem("customerId");await be.A.getFavoriteStores(e).then(async e=>{this.favoriteLocations=e.data.data,this.SET_COOKIES(e.data.cookies)}).catch(e=>{console.log(e)})},async getStoreData(e){let t=null;return await Re.A.getStore(e).then(e=>{t=e.data.data,this.SET_COOKIES(e.data.cookies)}).catch(e=>{console.log(e)}),t},async guestCustomerLogin(){await be.A.guestLogin().then(e=>{1==e.data.data.ok&&localStorage.setItem("guestCustomerId",e.data.data.customer_id),this.SET_COOKIES(e.data.cookies)}).catch(e=>{console.log(e)})},async selectStore(e,t,s,r=!1){if(!r&&!this.canStartOrder(e))return void this.SET_TOASTER({show:!0,message:"This store is currently closed. Please try again during business hours."});if(this.trackMetaViewContent({content_name:e.name,...null!=e.store_id?{store_id:String(e.store_id),store_name:e.name}:{}}),!r&&this.orderData&&this.orderData.restaurant.store_id!=e.store_id&&!s)return this.newStoreData=e,void this.toggleChangeLocationModal();this.from=t,this.clickedStoreId=e.store_id,this.SET_BUTTON_LOADER(!0),!r&&this.addressData&&this.selectedService.requires_address&&!this.loggedIn&&(await this.guestCustomerLogin(),await this.saveAddress());let i={service_schedule:!0,service_type_id:this.selectedService.service_type_id,store_id:e.store_id};this.addressData&&this.selectedService.requires_address&&!this.newAddress?(i.latitude=this.selectedAddress.latitude,i.longitude=this.selectedAddress.longitude):this.addressData&&this.selectedService.requires_address&&this.newAddress&&(i.latitude=this.selectedAddressLat,i.longitude=this.selectedAddressLng),Re.A.getStore(null,i).then(t=>{this.SET_SELECTED_STORE(t.data.data[0]),this.SET_COOKIES(t.data.cookies),localStorage.setItem("selectedStoreId",t.data.data[0].store_id),localStorage.setItem("timeZoneOffset",t.data.data[0].timezone_offset_mins),localStorage.setItem("deliveryInfo",JSON.stringify(t.data.data[0].delivery_info)),this.addressData&&this.newAddress&&this.selectedService.requires_address&&this.saveAddress(),this.SET_BUTTON_LOADER(!1);let s=localStorage.getItem("selectedStoreId"),i=e.name?e.name:e.restaurant_name,o=i.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"");Y["default"].push({name:"MenuView",params:{storeId:s,storeName:o},query:r?{browse:"1"}:{}}),localStorage.setItem("selectedStoreName",i)}).catch(e=>{console.log(e),this.SET_BUTTON_LOADER(!1),this.loading=!1;let t={show:!0,message:"Something went wrong. Please try again later"};this.SET_TOASTER(t)})},async saveAddress(){let e=this.loggedIn?localStorage.getItem("customerId"):localStorage.getItem("guestCustomerId");this.addressData.phone=this.customerData?this.customerData.phone:null,this.addressData.contact_phone=this.customerData?this.customerData.phone:null,this.addressData.address2=this.aptSuite?this.aptSuite:"",await be.A.saveAddress(this.addressData,e).then(e=>{localStorage.setItem("selectedAddress",JSON.stringify(e.data.data)),this.SET_SELECTED_ADDRESS(e.data.data),this.SET_COOKIES(e.data.cookies)}).catch(()=>{let e={show:!0,message:"Something went wrong. Please try again later"};this.SET_TOASTER(e)})},zoomChanged(e){this.zoom=e}
1,addressValue(e){""===e&&("GOOGLE"==this.autoCompleteType&&this.$refs.autoComplete.resetInput(),"RADAR"==this.autoCompleteType&&this.$refs.radarAutoComplete.resetAddressInput(),this.selectedAddressLat=null,this.selectedAddressLng=null,this.aptSuite="",this.errorMessage=null,this.validAddressError=null,this.stores=null,this.sortedStoreList=[],this.addressTyped=!1,this.selectedService.requires_address||this.displayStores())},getLatAndLng(e){e&&("GOOGLE"==this.autoCompleteType&&this.getAddressComponents(e,!1,!0),"RADAR"==this.autoCompleteType&&this.getRadarAddressComponents(e,!1,!0),this.validAddressError||(this.stores=null,this.sortedStoreList=[],"GOOGLE"==this.autoCompleteType&&(this.selectedAddressLat=e.geometry.location.lat(),this.selectedAddressLng=e.geometry.location.lng()),"RADAR"==this.autoCompleteType&&(this.selectedAddressLat=e.latitude,this.selectedAddressLng=e.longitude),this.addressTyped=!0,this.SET_SELECTED_ADDRESS(null),this.newAddress=!0,localStorage.removeItem("selectedAddress"),this.getStores(this.selectedService)))},changeServiceType(e){this.toggleChangeServiceTypeModal(),this.SET_ORDER_DATA(null),localStorage.removeItem("orderId"),localStorage.removeItem("dayAndTimeSelected"),this.SET_DAY_AND_TIME_SELECTED(!1),localStorage.removeItem("selectedDay"),this.SET_SELECTED_DAY(null),localStorage.removeItem("selectedHour"),localStorage.removeItem("selectedTip"),localStorage.removeItem("tipSelected"),this.SET_SELECTED_HOUR(null),this.selectedAddressLat=null,this.selectedAddressLng=null,this.aptSuite="",this.changeService(e,!0),this.validAddressError=null},changeService(e,t){try{if(this.serviceTypeListIsVisible=!1,this.updatedService=e,this.orderData&&e.service_type_id!=this.selectedService.service_type_id&&!t)return void this.toggleChangeServiceTypeModal();try{"GOOGLE"==this.mapType&&this.$refs.map&&this.$refs.map.closeAllInfoWindows(),"RADAR"==this.mapType&&this.$refs.radarMap&&this.$refs.radarMap.closeAllInfoWindows()}catch(s){console.warn("[HomeView] Error closing map info windows:",s)}if(this.SET_SELECTED_SERVICE(e),localStorage.setItem("selectedServiceId",e.service_type_id),e.requires_address){this.stores=null,this.sortedStoreList=[];try{"GOOGLE"==this.mapType&&this.$refs.map&&this.$refs.map.removeMarkers(),"RADAR"==this.mapType&&this.$refs.radarMap&&this.$refs.radarMap.removeMarkers()}catch(s){console.warn("[HomeView] Error removing markers:",s)}this.loggedIn&&this.getAddresses()}else this.stores=null,this.sortedStoreList=[],this.selectedAddressLat=null,this.selectedAddressLng=null,this.displayStores();this.errorMessage=null;try{"GOOGLE"==this.autoCompleteType&&this.$refs.autoComplete&&this.$refs.autoComplete.resetInput(),"RADAR"==this.autoCompleteType&&this.$refs.radarAutoComplete&&this.$refs.radarAutoComplete.resetAddressInput()}catch(r){console.warn("[HomeView] Error resetting autocomplete:",r)}this.selectedAddressLat=null,this.selectedAddressLng=null,this.validAddressError=null}catch(i){throw console.error("[HomeView] Error in changeService:",i),i}},getDistance(e,t,s,r){var i=6371,o=this.deg2rad(s-e),a=this.deg2rad(r-t),d=Math.sin(o/2)*Math.sin(o/2)+Math.cos(this.deg2rad(e))*Math.cos(this.deg2rad(s))*Math.sin(a/2)*Math.sin(a/2),l=2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d)),n=i*l;return n*=.621371,n.toFixed(2)},deg2rad(e){return e*(Math.PI/180)},getServiceEstimates(e){if(!e?.services||!this.selectedService)return"";const t=e.services.findIndex(e=>e.service_type_id===this.selectedService?.service_type_id),s=e.services[t];if(!s)return"";let r=(s?.lead_time??0)+(s?.order_time_precision??0);return r>120?(r=J().duration(r,"minutes").asHours(),r=Math.round(2*r)/2,r+=" hours"):r+=" mins",r},toggleViewHours(e){this.selectedStoreData=e,this.viewHoursIsOpen=!this.viewHoursIsOpen},getAddresses(){let e=localStorage.getItem("customerId");be.A.getAddresses(e).then(e=>{this.addresses=e.data.data,this.SET_COOKIES(e.data.cookies)}).catch(e=>{console.log(e)})},selectAddress(e){this.SET_SELECTED_ADDRESS(e),localStorage.setItem("selectedAddress",JSON.stringify(e)),this.newAddress=!1,this.stores=null,this.sortedStoreList=[],this.selectedAddressLat=e.latitude,this.selectedAddressLng=e.longitude,this.$refs.map&&this.$refs.map.addUserMarker(this.selectedAddressLat,this.selectedAddressLng),this.$refs.radarMap&&this.$refs.radarMap.addUserMarker(this.selectedAddressLat,this.selectedAddressLng),this.get
1Stores(this.selectedService);let t=e.address1+", "+e.city+", "+e.state_code+" "+e.postal_code;this.$refs.autoComplete.addInputValue(t),this.aptSuite=e.address2},showCustomPopup(){let e=!!localStorage.getItem("popUpShowed");this.branding.display_options?.pop_up?.enable&&!e&&(this.toggleCustomPopUpModal(),this.branding.display_options?.pop_up?.show_once&&localStorage.setItem("popUpShowed",!0))},moveFavoriteLocationsToTop(){if(!this.loggedIn)return;let e=[],t=[];this.stores.forEach(s=>{this.favoriteLocations?.find(e=>e.store_id==s.store_id)?e.push(s):t.push(s)}),this.stores=e.concat(t)},async displayStores(e){this.loading=!0,xe.A.getLocationByIp().then(async t=>{let s={lat:t.data.latitude,lng:t.data.longitude};this.loggedIn&&await this.getFavoriteLocations(),e||await this.getStores(this.selectedService),t.data&&(this.stores.forEach(e=>{e.distance=this.getDistance(s.lat,s.lng,e.latitude,e.longitude)}),this.stores.sort((e,t)=>e.distance-t.distance)),this.moveFavoriteLocationsToTop(),this.loading=!1}).catch(async e=>{console.log(e),this.loggedIn&&await this.getFavoriteLocations(),await this.get
1Stores(this.selectedService),this.moveFavoriteLocationsToTop(),this.loading=!1})},setAutoCompleteType(){this.storeConfig?.enable_google_places_api?this.SET_AUTO_COMPLETE_TYPE("GOOGLE"):this.SET_AUTO_COMPLETE_TYPE("RADAR")},setMapType(){this.storeConfig?.enable_google_maps_api?this.SET_MAP_TYPE("GOOGLE"):this.SET_MAP_TYPE("RADAR")},foreignAuthLoginIfNeeded(){if(this.loggedIn)return;const e=new URLSearchParams(window.location.search),t=e.get("auth_provider"),s=e.get("auth_access_token");if(t&&s){const e={provider:t,auth_info:{access_token:s}};be.A.foreignAuth(e).then(e=>{localStorage.setItem("customerId",e.data.data.customer_id),this.SET_COOKIES(e.data.cookies),this.getCustomerInfo()}).catch(e=>{console.log(e),this.$emit("ssoError")})}},applyServiceTypeFromQuery(){if(this.queryApplied)return;const e=this.$route?.query?.service_type_id;if(!e)return;if(!this.visibleServices||0===this.visibleServices.length)return;const t=parseInt(e),s=this.visibleServices.find(e=>e.service_type_id==t);this.queryApplied=!0,s&&this.changeService(s,!0),this.$nextTick(()=>{this.cleanServiceTypeIdFromUrl()})},cleanServiceTypeIdFromUrl(){const e={...this.$route.query};"service_type_id"in e&&(delete e.service_type_id,this.$router.replace({query:e}))},getCustomerInfo(){this.SET_BUTTON_LOADER(!0),be.A.getCustomerInfo().then(e=>{let t={show:!0,message:"Welcome back"};this.SET_TOASTER(t),this.SET_CUSTOMER_DATA(e.data.data),this.identifyUser(e.data.data),this.SET_PHONE_VERIFIED(e.data.data.is_phone_verified),localStorage.setItem("phoneVerified",e.data.data.is_phone_verified),this.SET_LOGGED_IN(!0),this.SET_BUTTON_LOADER(!1),this.SET_COOKIES(e.data.cookies)}).catch(e=>{console.log(e)})},ensureStoresLoaded(){if(this.storesInitialized)return;if(!this.storeConfig)return;const e=this.$route?.query?.service_type_id,t=Array.isArray(this.storeConfig.services)&&this.storeConfig.services.length>0;if(t&&this.selectedService&&!this.selectedService.requires_address&&!e)return this.displayStores(),void(this.storesInitialized=!0);t||(this.displayStores(),this.storesInitialized=!0)}},created(){this.loggedIn&&this.getAddresses(),localStorage.removeItem("selectedStoreName");let e=localStorage.getItem("title");!e&&this.branding&&this.branding.title&&(e=this.branding.title,localStorage.setItem("title",e)),document.title=e,this.setAutoCompleteType(),this.setMapType(),this.ensureStoresLoaded()},mounted(){this.showCustomPopup(),this.foreignAuthLoginIfNeeded(),this.applyServiceTypeFromQuery()}};const Pe=(0,oe.A)(Fe,[["render",Z],["__scopeId","data-v-65c3a6a0"]]);var Ve=Pe}}]);
2//# sourceMappingURL=home.64a06160.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.