1(self.webpackChunkappfront_ordering=self.webpackChunkappfront_ordering||[]).push([[7229],{14130:function(e,t,n){"use strict";n.r(t);var r=n(87462),o=n(67294),a=n(71082),i=n(43434),l=n(26098),u=n(48804),c=n(67148),d=n(61962),s=n(32069),m=n(50758),f=n(6782),g=n(67947),v=n(43607),p=n(97321),h=n(86791);function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var x={light:{sectionBackground:"#ffffff",cardBackground:"#ffffff",text:"#1f1f1f",textSecondary:"#555",textMuted:"#999",border:"rgba(0,0,0,0.08)",shadow:"rgba(0,0,0,0.1)"},dark:{sectionBackground:"#0b0b0b",cardBackground:"#1e1e1e",text:"#e0e0e0",textSecondary:"#b0b0b0",textMuted:"#666",border:"rgba(255,255,255,0.08)",shadow:"rgba(0,0,0,0.3)"}};t.default=(0,i.$j)((function(e,t){return{appStyles:(0,u.Wi)(e,t),app:e.app,locations:e.locations}}),(function(e,t){return{setUserSelectedLocationAndServingOption:function(n){var r=n.servingOption,o=n.locationId,a=n.firstAvailableDate,i=n.userAddress,l=n.defaultTip;return e((0,p.Vc)({servingOption:r,locationId:o,firstAvailableDate:a,userAddress:i,defaultTip:l,props:t}))},loadBranchAvailability:function(){return e((0,h.Fs)())}}}))((0,l.Z)((function(e){var t=e.pageContext,n=void 0===t?{}:t,i=e.location,l=e.appStyles,u=e.T,p=e.setUserSelectedLocationAndServingOption,h=e.locations,b=e.loadBranchAvailability,S=n.menuData,w=void 0===S?[]:S,E=(n.business,n.branches),I=void 0===E?[]:E,k=n.menuItem;(0,o.useEffect)((function(){b()}),[b]);var C=((null==l?void 0:l.newWebsite)||{}).design||{},B="light"===(null==C?void 0:C.theme)?"light":"dark",M=function(e){return x[e]||x.light}(B),O=(0,o.useMemo)((function(){if(k)return k;if(!w.length)return null;var e=((null==i?void 0:i.pathname)||"").match(/\/menu\/item\/([^/]+)/),t=e?decodeURIComponent(e[1]):null;if(t){var n=(0,c.findMenuItemBySlug)(w,t);if(n)return n}var r=(null==i?void 0:i.search)||"",o=new URLSearchParams(r).get("id");if(o){var a=(0,c.findMenuItemById)(w,o);if(a)return a}return null}),[k,w,null==i?void 0:i.pathname,null==i?void 0:i.search]),A=(0,o.useMemo)((function(){if(!O||!w.length)return null;for(var e,t=y(w);!(e=t()).done;){var n=e.value;if(null!=n&&n.items)if(n.items.find((function(e){return e.id===O.id})))return n}return null}),[O,w]),T=(0,o.useMemo)((function(){if(null==O||!O.name||!w.length)return[];for(var e,t=[],n=O.name.toLowerCase().trim(),r=y(w);!(e=r()).done;){var o=e.value;if(null!=o&&o.items)for(var a,i=y(o.items);!(a=i()).done;){var l=a.value;null!=l&&l.name&&(l.name.toLowerCase().trim()===n&&t.push(l))}}return t}),[null==O?void 0:O.name,w]),z=(0,o.useMemo)((function(){var e={};if(!I.length||!T.length)return e;for(var t,n=y(I);!(t=n()).done;){var r=t.value;!1!==r.isDisplayed&&(e[r.id]={available:!1,items:[]})}for(var o,a=y(T);!(o=a()).done;)for(var i=o.value,l=i.unavailableInBranches||[],u=0,c=Object.keys(e);u<c.length;u++){var d=c[u];l.includes(d)||(e[d].available=!0,e[d].items.push(i))}return e}),[I,T]),W=(0,o.useMemo)((function(){return I.filter((function(e){var t;return!1!==e.isDisplayed&&!0===(null===(t=z[e.id])||void 0===t?void 0:t.available)}))}),[I,z]),j=(0,o.useState)((function(){return W.length>0?W[0].id:""})),F=j[0],D=j[1],N=F,R=(0,o.useMemo)((function(){if(!N||!z[N])return O;var e=z[N].items;if(!e.length)return O;var t=e.find((function(e){return e.id===(null==O?void 0:O.id)}));return t||e[0]}),[N,z,O]),U=(0,o.useMemo)((function(){var e;if(!N||!R)return!1;var t=null==h||null===(e=h.branchesAvailability)||void 0===e?void 0:e[N],n=(null==t?void 0:t.temporarilyUnavailablePosItems)||[],r=function(e){var t,n,r,o;
1if(!e)return[];if(null!==(t=e.sizeOptionsPosItemIds)&&void 0!==t&&t.length)return e.sizeOptionsPosItemIds;if(null!==(n=e.servingOptions)&&void 0!==n&&n.length){for(var a,i=[],l=y(e.servingOptions);!(a=l()).done;){var u,c=a.value;if(null!==(u=c.sizeOptions)&&void 0!==u&&u.length)for(var d,s=y(c.sizeOptions);!(d=s()).done;){var m=d.value;m.posItemId&&i.push(m.posItemId)}}if(i.length)return i}var f=null===(r=e.menuItemOrderData)||void 0===r?void 0:r.menuItemServingOptions;if(null!=f&&null!==(o=f.servingOptions)&&void 0!==o&&o.length){for(var g,v=[],p=y(f.servingOptions);!(g=p()).done;){var h,b=g.value;if(null!==(h=b.sizeOptions)&&void 0!==h&&h.length)for(var x,S=y(b.sizeOptions);!(x=S()).done;){var w=x.value;w.posItemId&&v.push(w.posItemId)}}if(v.length)return v}return e.posItemId?[e.posItemId]:[]}(R);return!!n.length&&(!!r.length&&r.every((function(e){return n.includes(e)})))}),[N,R,null==h?void 0:h.branchesAvailability]),L=!O,P=(null==O?void 0:O.name)||"",H=(null==O?void 0:O.description)||"",Z=null==O?void 0:O.imageKey,$=null==O?void 0:O.imagePreview;return o.createElement(o.Fragment,null,o.createElement(g.Z,{pageContext:n,pageType:"menuItem",menuItem:O,location:i,T:u}),o.createElement(f.Z,{pageContext:n,appStyles:l,T:u},(function(e){var t=e.colors,n=e.orderButtonBackgroundColor,i=e.orderButtonTextColor,f=(0,r.Z)({},M,t);return o.createElement("section",{className:"nw-menu-item-main",style:{backgroundColor:f.sectionBackground,minHeight:"60vh",boxSizing:"border-box"}},o.createElement("div",{style:{margin:"0 auto",maxWidth:1200}},!L&&o.createElement(o.Fragment,null,o.createElement("nav",{className:"nw-menu-item-breadcrumbs","aria-label":"Breadcrumb",style:{marginBottom:24,fontSize:14}},o.createElement("ol",{style:{display:"flex",alignItems:"center",gap:8,margin:0,padding:0,listStyle:"none",flexWrap:"wrap"}},o.createElement("li",null,o.createElement(a.rU,{to:"/menu",style:{color:f.textSecondary,textDecoration:"none"}},u("Menu"))),A&&o.createElement(o.Fragment,null,o.createElement("li",{style:{color:f.textMuted}},"/"),o.createElement("li",null,o.createElement(a.rU,{to:"/menu/category/"+(0,c.computeCategorySlug)(A.name,A.id),style:{color:f.textSecondary,textDecoration:"none"}},u(A.name)))),o.createElement("li",{style:{color:f.textMuted}},"/"),o.createElement("li",{style:{color:f.text,fontWeight:500},"aria-current":"page"},P))),o.createElement("div",{className:"nw-menu-item-row",style:{display:"flex",alignItems:"flex-start"}},o.createElement("div",{className:"nw-menu-item-image",style:{width:"100%"}},o.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:"100%",borderRadius:16,overflow:"hidden",backgroundColor:f.cardBackground,boxShadow:"0 8px 32px "+f.shadow}},Z?o.createElement(m.Z,{mediaType:s.Ok.menuItem,mediaKey:Z,imagePreview:$,alt:P,wrapperStyle:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},imgStyle:{objectFit:"cover"}}):$?o.createElement("img",{src:$,alt:P,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},onError:function(e){null!=e&&e.target&&(e.target.src=v.WF)}}):o.createElement("img",{src:v.WF,alt:P,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"}}))),o.createElement("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:24}},o.createElement("h1",{className:"nw-menu-item-title",style:{fontWeight:700,color:f.text,margin:0,lineHeight:1.2}},P),H&&o.createElement("p",{className:"nw-menu-item-price",style:{color:f.textSecondary,margin:0,lineHeight:1.6}},u(H)),W.length>0&&o.createElement("div",{style:{marginTop:8}},o.createElement("label",{htmlFor:"location-select",style:{display:"block",fontSize:14,fontWeight:600,color:f.textSecondary,marginBottom:8}},u("Select Location")),o.createElement("select",{id:"location-select",value:N,onChange:function(e){return D(e.target.value)},style:{width:"100%",maxWidth:300,padding:"12px 16px",fontSize:16,borderRadius:8,border:"1px solid "+f.border,backgroundColor:f.cardBackground,color:f.text,cursor:"pointer",appearance:"none",backgroundImage:"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E\")",backgroundRepeat:"no-repeat",backgroundPosition:"right 12px center",paddingRight:40}},W.map((function(e){return o.createElement("option",{key:e.id,value:e.id},e.name)})))),0===W.length&&I.length>0&&o.createElement("p",{style:{fontSize:14,color:f.textMuted,margin:"8px 0 0 0",fontStyle:"italic"}},u("This item is currently unavailable at all locations.")),U&&W.length>0&&o.createElement("div",{style:{padding:"12px 16px",backgroundColor:"dark"===B?"rgba(239, 68, 68, 0.15)":"rgba(239, 68, 68, 0.1)",borderRadius:8,border:"1px solid "+("dark"===B?"rgba(239, 68, 68, 0.3)":"rgba(239, 68, 68, 0.2)")}},o.createElement("p",{style:{fontSize:14,color:"dark"===B?"#fca5a5":"#dc2626",margin:0,fontWeight:500}},u("This item is temporarily out of stock at this location."))),o.createElement("div",{style:{marginTop:16}},o.createElement("button",{onClick:function(){var e="/order/items/"+(R||O).id+"/?branchId="+F+"&servingOptionType=pickup/";p({locationId:F}),(0,d.T8)(e)},disabled:0===W.length||U,style:{padding:"16px 32px",borderRadius:12,border:"none",backgroundColor:0===W.length||U?f.textMuted:n||(null==l?void 0:l.actionColor)||"#ff6b2c",color:i||"#ffffff",fontSize:18,fontWeight:600,cursor:0===W.length||U?"not-allowed":"pointer",boxShadow:"0 8px 24px "+f.shadow,transition:"transform 0.2s ease, box-shadow 0.2s ease",opacity:0===W.length||U?.6:1},onMouseEnter:function(e){W.length>0&&!U&&(e.currentTarget.style.transform="translateY(-2px)",e.currentTarget.style.boxShadow="0 12px 32px "+f.shadow)},onMouseLeave:function(e){e.currentTarget.style.transform="translateY(0)",e.currentTarget.style.boxShadow="0 8px 24px "+f.shadow}},u("Order Now")))))),L&&o.createElement("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",minHeight:"40vh",gap:24}},o.createElement("div",{style:{fontSize:64}},"ð½ï¸"),o.createElement("h1",{className:"nw-menu-item-related-title",style:{fontWeight:600,color:f.text,margin:0}},u("Item Not Found")),o.createElement("p",{style:{fontSize:18,color:f.textSecondary,margin:0,maxWidth:400}},u("Sorry, we couldn't find the menu item you're looking for.")),o.createElement("button",{onClick:function(){return(0,d.T8)("/")},style:{marginTop:16,padding:"14px 32px",borderRadius:8,border:"none",backgroundColor:(null==l?void 0:l.actionColor)||"#ff6b2c",color:i||"#ffffff",fontSize:16,fontWeight:600,cursor:"pointer"}}
1,u("Back to Home")))))})))})))},67148:function(e,t,n){function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=n(51174).slugify;function i(e,t){return e?a(e):t}function l(e,t){return e?a(e):t}function u(e,t){return e?a(e):t}e.exports={computeMenuItemSlug:i,findMenuItemBySlug:function(e,t){if(!e||!t)return null;for(var n,o=r(e);!(n=o()).done;){var a=n.value;if(a&&a.items)for(var l,u=r(a.items);!(l=u()).done;){var c=l.value;if(c&&i(c.name,c.id)===t)return c}}return null},findMenuItemById:function(e,t){if(!e||!t)return null;for(var n,o=r(e);!(n=o()).done;){var a=n.value;if(a&&a.items)for(var i,l=r(a.items);!(i=l()).done;){var u=i.value;if(u&&u.id===t)return u}}return null},computeCategorySlug:l,findCategoryBySlug:function(e,t){if(!e||!t)return null;for(var n,o=r(e);!(n=o()).done;){var a=n.value;if(a&&l(a.name,a.id)===t)return a}return null},computeBranchSlug:u,findBranchBySlug:function(e,t){if(!e||!t)return null;for(var n,o=r(e);!(n=o()).done;){var a=n.value;if(a&&u(a.name,a.id)===t)return a}return null}}}}]); 2//# sourceMappingURL=component---src-templates-new-website-menu-item-detail-js-5137986bd3563031176d.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.