1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[926],{29675:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/order-detail/[id]",function(){return n(88662)}])},40978:function(e,t,n){"use strict";n.r(t),n.d(t,{Header:function(){return h},Logo:function(){return p},default:function(){return g}});var i=n(52322),o=n(80684),r=n(15612),a=n(39097),d=n.n(a),c=n(43580),l=n(37085),s=n(36525),u=n(75470),f=n(81049);let h=c.ZP.nav.withConfig({componentId:"sc-b6bcb384-0"})(["align-items:center;background:",";border-bottom:","px solid ",";display:flex;height:","px;justify-content:flex-start;left:0;padding:0 ","px;position:relative;width:100%;z-index:",";@media (max-width:767px){height:","px;justify-content:center;}"],o.fC.header.background_color,s._.NAV_BOTTOM_BORDER_WEIGHT,s.DM.GRAY,s._.HEADERHEIGHT,s._.GUTTER,s.kl.HEADER,s._.MOBILE_HEADERHEIGHT),p=c.ZP.div.withConfig({componentId:"sc-b6bcb384-1"})(["align-items:center;display:flex;height:100%;left:","px;a{display:block;}img{display:block;max-height:","px;max-width:200px;}@media (max-width:767px){img{max-height:","px;}}"],s._.GUTTER,s._.HEADERHEIGHT-s._.GUTTER/2,s._.MOBILE_HEADERHEIGHT-s._.GUTTER/2),x=c.ZP.div.withConfig({componentId:"sc-b6bcb384-2"})(["align-items:center;font-family:'Arial','Helvetica',sans-serif;display:flex;height:calc(100vh - ","px);justify-content:center;padding:","px;text-align:center;"," @media (max-width:767px){height:calc(100vh - ","px);}a{color:#000;text-decoration:underline;&:hover{opacity:0.9;}}"],2*s._.HEADERHEIGHT,s._.GUTTER,e=>{let{isFixed:t}=e;return t&&"\n background: white;\n left: 0;\n height: 100%;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: ".concat(s.kl.HEADER,";\n ")},2*s._.MOBILE_HEADERHEIGHT);function g(e){let{statusCode:t}=e,{label:n}=(0,u.v9)(e=>e.app.organization.organization),a=!1;return a=(0,f.TE)(),r.u({statusCode:t}),(0,i.jsxs)(i.Fragment,{children:[o.fC.header.logo&&(0,i.jsx)(h,{children:(0,i.jsx)(p,{children:(0,i.jsx)(d(),{href:"/",legacyBehavior:!0,children:(0,i.jsx)(l.E,{alt:n,src:o.fC.header.logo,height:40,objectFit:"contain",width:120})})})}),(0,i.jsx)(x,{isFixed:!t,children:(0,i.jsxs)("div",{children:[(0,i.jsxs)("h1",{children:["Error ",t]}),(0,i.jsx)("h3",{children:(()=>{switch(t){case 503:return"An internet connection is needed for online ordering.";case 404:return"Sorry, we couldn't find anything here.";default:return"Sorry, something went wrong. Try refreshing or go back to the homepage below."}})()}),a?(0,i.jsx)("a",{href:"/stores",children:"Go to homepage"}):(0,i.jsx)(d(),{href:"/",passHref:!0,children:"Go to homepage"})]})})]})}g.getInitialProps=async e=>{await r.u(e);let{res:t,err:n}=e;return{statusCode:t?t.statusCode:n?n.statusCode:404}}},88662:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return I}});var i=n(52322),o=n(5632),r=n(2784),a=n(56580),d=n(55354),c=n(47484),l=n(96337),s=n(71832),u=n(61115),f=n(57951),h=n(261),p=n(89988),x=n(4507),g=n(6392),m=n(22427),_=n(15066);let b={fetchLocation:g.b.fetchLocation,fetchMeOrderDetailsSuccess:_.default.fetchMeOrderDetailsSuccess,toggleReorderReceipt:_.default.toggleReorderReceipt};var v=(0,a.connect)(e=>({locationDetail:e.app.locations.detail,me:e.app.me.data}),b)(e=>{let{orderDetails:t,menuCategories:n,locationDetail:o,fetchLocation:a,me:d,fetchMeOrderDetailsSuccess:g,toggleReorderReceipt:_}=e;(0,r.useEffect)(()=>{t&&t.store_location&&a(t.store_location.id)},[t,a]);let b=t?(0,m.W6)(t.order_data.basket,n):[],v=t&&"delivery"===t.order_data.basket.conveyance_type.type?t.order_data.basket.conveyance_type.delivery_address:void 0,w=e=>{g(e),_(!0)};return(0,i.jsx)(l.t9,{children:(null==t?void 0:t.order_data)&&(0,i.jsx)(f.AZ,{children:(0,i.jsxs)(f.EB,{children:[o&&(0,i.jsx)(h.Z,{locationDetail:o,orderDetails:t,receipt:!0,children:(0,i.jsx)(c.z,{locationDetail:o,orderDetails:t,receipt:!0})}),o&&(0,i.jsx)(f.Sn,{children:(0,i.jsx)(p.K,{receipt:!1,orderDetails:t,deliveryAddress:v,locationDetail:o,me:d||{id:0,name:"",organization_id:0,created_at:"",deleted_at:null,external_provider_id:0,updated_at:"",first_name:"",last_name:"",email:"",username:null,birthday:null,external_user_id:"",phone:"",qrcode:null,referral_code:null,external_user_fk:null}})}),(0,i.jsx)(f.Sn,{children:(0,i.jsx)(s.Z,{basketContent:t.order_data.basket,basketMenuCategories:n})}),(0,i.jsx)(f.Sn,{children:(0,i.jsx)(u.E,{basket:t.order_data.basket})}),(0,i.jsx)(f.Sn,{children:(0,i.jsx)(x.I,{payments:t.order_data.payment})}),b.length>0&&(0,i.jsx)(f.EQ,{$buttonTheme:"secondary","aria-label":"Reorder from ".concat(null==o?void 0:o.label),onClick:()=>w(t),children:"Reorder"})]})})})}),w=n(29652),E=n(50834),y=n(75470),T=n(26508);function I(){var e;let{data:t,pastOrders:n,orderDetails:c}=(0,y.v9)(e=>e.app.me),{query:l}=(0,o.useRouter)(),s=(0,a.useDispatch)(),{categories:u}=(0,E.H9)({id:null==c?void 0:null===(e=c.store_location)||void 0===e?void 0:e.id,wantedAt:(null==c?void 0:c.order_data.basket.wanted_at)==="string"?c.order_data.basket.wanted_at:void 0});return(0,r.useEffect)(()=>{s(_.default.fetchMePastOrders())},[s]),(0,r.useEffect)(()=>
1{if(n.length&&(null==l?void 0:l.id)){let e=l.id instanceof Array?l.id[0]:l.id;s(_.default.fetchMeOrderDetails(e,n)),(0,T.d4)(T.m1.account,T.cE.viewOrder)}},[n,null==l?void 0:l.id,s]),(0,i.jsx)(w.Q,{children:(0,i.jsx)(d.Z,{$backgroundOverride:!0,children:!!n.length&&(null==t?void 0:t.id)&&(0,i.jsx)(v,{orderDetails:c,menuCategories:u})})})}},96337:function(e,t,n){"use strict";n.d(t,{$3:function(){return g},Dk:function(){return x},Gq:function(){return s},JP:function(){return l},Ji:function(){return m},Ll:function(){return f},Mo:function(){return _},Pw:function(){return c},Qu:function(){return a},UN:function(){return b},VX:function(){return p},aN:function(){return r},fb:function(){return u},t9:function(){return d},yt:function(){return h}});var i=n(43580),o=n(36525);let r=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-0"})({display:"flex",flexDirection:"column",gap:"var(--size-3)",paddingTop:"var(--size-3)","@media (min-width: 768px)":{gap:"var(--size-6)",paddingTop:"var(--size-6)"}}),a=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-1"})({margin:"0 auto",maxWidth:"".concat(o._.MAX_LOYALTY_CONTAINER_WIDTH,"px"),padding:"".concat(2*o._.GUTTER,"px 0"),width:"100%"}),d=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-2"})({maxWidth:"".concat(o._.MAX_LOYALTY_CONTAINER_WIDTH,"px"),margin:"".concat(o._.LOYALTY_MENU_HEIGHT_DESKTOP,"px auto 0"),"@media (max-width: 767px)":{marginTop:"".concat(o._.LOYALTY_MENU_HEIGHT_MOBILE,"px")}}),c=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-3"})({display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"}),l=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-4"})({marginTop:"".concat(o._.LOYALTY_MENU_HEIGHT_DESKTOP,"px"),"@media (max-width: 767px)":{marginTop:"".concat(o._.LOYALTY_MENU_HEIGHT_MOBILE,"px")}}),s=i.ZP.form.withConfig({componentId:"sc-3b6e5b93-5"})({alignItems:"center",display:"flex",flexDirection:"column",margin:"0 auto",justifyContent:"center",width:"100%"}),u=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-6"})({alignItems:"center",display:"flex",flexWrap:"wrap",justifyContent:"center",width:"100%"}),f=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-7"})(e=>{let{autoHeight:t,theme:n}=e;return{flex:"1 1 33.333%",height:t?"auto":"".concat(n.forms.field_height+o._.GUTTER,"px"),overflow:"hidden",position:"relative","&:not(:first-child)":{paddingLeft:"".concat(o._.GUTTER,"px"),"@media (max-width: 767px)":{paddingLeft:0}},"@media (max-width: 767px)":{flexBasis:"100%"}}}),h=i.ZP.input.withConfig({componentId:"sc-3b6e5b93-8"})({backgroundColor:"#ffffff",borderRadius:"8px",border:"1px solid #e0ded9",height:"48px",marginBottom:"20px",padding:"0 12px",width:"100%",color:"#231f20",fontSize:"16px",fontFamily:"Jost, Arial, Helvetica"}),p=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-9"})({display:"flex",justifyContent:"right",alignSelf:"flex-end","@media (max-width: 767px)":{display:"flex",flexDirection:"column-reverse",width:"100%",margin:0,button:{width:"100%"},"> div:first-child":{margin:"".concat(o._.GUTTER,"px 0 0 0")}}}),x=(0,i.ZP)(p).withConfig({componentId:"sc-3b6e5b93-10"})({position:"relative",top:"-20px","@media (max-width: 767px)":{top:0}}),g=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-11"})({padding:"".concat(o._.GUTTER,"px"),p:{margin:"".concat(o._.GUTTER/4,"px 0"),fontSize:"16px"}}),m=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-12"})({display:"flex",justifyContent:"space-between",alignItems:"center","@media (max-width: 767px)":{display:"block"}}),_=i.ZP.div.withConfig({componentId:"sc-3b6e5b93-13"})({display:"flex",marginRight:"".concat(o._.GUTTER,"px"),alignItems:"center"}),b=i.ZP.button.withConfig({componentId:"sc-3b6e5b93-14"})(e=>{let{$bold:t,theme:n}=e;return{fontFamily:t?n.primary_font.bold.font_family:n.primary_font.regular.font_family,fontSize:"16px",color:n.global.primary_active_color,background:"none",border:"none",cursor:"pointer",padding:0,"&:hover":{opacity:.8}}})},29652:function(e,t,n){"use strict";n.d(t,{Q:function(){return f}});var i=n(52322),o=n(5632),r=n(2784),a=n(56580),d=n(90736),c=n(20051),l=n(89601),s=n(50584),u=n(40978);let f=e=>{let{children:t}=e,[n,f]=(0,r.useState)(!1),h=(0,o.useRouter)(),p=(0,a.useSelector)(e=>e.app.organization.organization.loyalty_driver_id),x=h.route,g=(0,s.kz)(p).includes(x);return((0,r.useEffect)(function(){if((0,c.nD)())f(!0);else{let e=(0,l.k5)(h);h.push("".concat(d.Z6.LOGIN,"?referrer=").concat(e))}}
1,[h]),n)?g?(0,i.jsx)(i.Fragment,{children:t}):(0,i.jsx)(u.default,{statusCode:404}):null}},15612:function(e,t,n){"use strict";n.d(t,{u:function(){return l}});var i=n(41690),o=n(86239),r=n(81880),a=n(86651),d=n(87980);async function c(){try{d.X&&a.fF.log("Flushing events..."),await (0,o.yl)(2e3),d.X&&a.fF.log("Done flushing events")}catch(e){d.X&&a.fF.log("Error while flushing events:\n",e)}}async function l(e){let{req:t,res:n,err:a}=e,d=n?.statusCode||e.statusCode;if(d&&d<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"),o=e.url||"",r=function({url:e,protocol:t,host:n}){return e?.startsWith("http")?e:e&&n?`${t}://${n}${e}`:void 0}({url:o,host:n,protocol:i}),a=e.body||void 0,d=e.cookies;return{url:r,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}}(o),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:d,data:a}}(t);e.setSDKProcessingMetadata({normalizedRequest:n})}(0,o.Tb)(a||`_error.js called with falsy error (${a})`,{mechanism:{type:"instrument",handled:!1,data:{function:"_error.getInitialProps"}}})}),function(e){let t=r.GLOBAL_OBJ[Symbol.for("@vercel/request-context")],n=t?.get?.();n?.waitUntil&&n.waitUntil(e)}(c())}}},function(e){e.O(0,[688,462,553,270,807,354,997,888,774,179],function(){return e(e.s=29675)}),_N_E=e.O()}]); 2//# sourceMappingURL=[id]-b112e12a9b42aee9.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.