"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4874],{64305:function(e,n,t){t.d(n,{q:function(){return In},S:function(){return Rn}});var r=t(13706),i=t(90581),o=t(27805),s=t(21218),l=t(92228),a=t(88673),c=t(52322),u=t(55281),d=t.n(u),f=t(11886),h=t.n(f),p=t(7978),m=t.n(p),v=t(45455),g=t.n(v),x=t(1842),y=t.n(x),b=t(85505),C=t.n(b),R=t(87622),S=t.n(R),j=t(51746),w=t.n(j),I=t(16760),P=t.n(I),k=t(34519),T=t.n(k),E=t(55324),A=t.n(E),Z=t(12436),_=t.n(Z),O=t(80075),D=t(18495),L=t(5632),q=t(13980),N=t.n(q),W=t(2784),M=t(70423),U=t(73091),Y=t(89559),F=t(20539),V=t(76837),H=t(48778),G=t(52303),B=t(77994),z=t(40544),X=t(25237),J=t.n(X),K=t(28955),Q=t(70865),$=t(96670),ee=t(36402),ne=t.n(ee),te=t(78545),re=t(85206);function ie(){var e=(0,l.Z)(["\n  width: fit-content;\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  color: ",";\n"]);return ie=function(){return e},e}function oe(){var e=(0,l.Z)(["\n  border-radius: 4px;\n\n  padding: 3px 12px;\n\n  @media (min-width: ",") {\n    padding: 5px 14px;\n  }\n\n  @media (min-width: ",") {\n    padding: 8px 16px;\n  }\n\n  ","\n\n  ",";\n"]);return oe=function(){return e},e}function se(){var e=(0,l.Z)(["\n  border-radius: 30px;\n\n  padding: 5px 12px;\n\n  @media (min-width: ",") {\n    padding: 7px 14px;\n  }\n\n  @media (min-width: ",") {\n    padding: 10px 16px;\n  }\n\n  ","\n\n  ",";\n"]);return se=function(){return e},e}function le(){var e=(0,l.Z)(["\n  white-space: nowrap;\n  line-height: 1;\n"]);return le=function(){return e},e}var ae={backgroundColor:F.colors.neonTeal100,color:F.colors.neonTeal800,border:"1px solid ".concat(F.colors.neonTeal100)},ce=(0,te.bU)({variants:{default:{backgroundColor:F.colors.grey50,border:"1px solid ".concat(F.colors.grey300),"&:hover":ae},active:{backgroundColor:F.colors.black,border:"1px solid ".concat(F.colors.black),color:F.colors.white},plain:{backgroundColor:F.colors.grey50,border:"1px solid ".concat(F.colors.grey50),"&:hover":ae}}}),ue=(0,te.bU)({variants:{default:{backgroundColor:F.colors.white,border:"1px solid ".concat(F.colors.grey700),"&:hover":{border:"1px solid ".concat(F.colors.neonTeal400)}},active:{backgroundColor:F.colors.black,border:"1px solid ".concat(F.colors.black),color:F.colors.white},plain:{border:"1px solid ".concat(F.colors.white),backgroundColor:F.colors.white,"&:hover":ae}}}),de=(0,U.iv)(ie(),F.colors.grey700),fe=U.ZP.button.withConfig({componentId:"sc-23d99611-0"})(oe(),(function(e){return e.theme.breakpoints.md}),(function(e){return e.theme.breakpoints.lg}),de,ue),he=U.ZP.button.withConfig({componentId:"sc-23d99611-1"})(se(),(function(e){return e.theme.breakpoints.md}),(function(e){return e.theme.breakpoints.lg}),de,ce),pe=(0,U.ZP)(re.P).withConfig({componentId:"sc-23d99611-2"})(le()),me=(0,D.Pi)((function(e){var n=e.choices,t=e.initialText,r=e.onClick,i=e.overflowText,o=e.isActive,s=e.isButtonStyled,l=e.forwardedRef,a=e.outline,u=e.leftIcon,d=e.rightIcon,f=function(e){var n=e.hasChoices,t=e.isActive,r=e.outline;return n||t?"active":r?"default":"plain"}({hasChoices:!g()(n),isActive:o,outline:a}),h=function(e){var n=e.choices,t=e.initialText,r=e.overflowText;return g()(n)?t:"".concat(r||t," (").concat(ne()(n),")")}({choices:n,initialText:t,overflowText:i}),p=s?fe:he;return(0,c.jsxs)(p,{onClick:r,variant:f,ref:l,children:[u&&u,(0,c.jsx)(pe,{variant:3,children:h}),d&&d]})}));me.propTypes={choices:N().arrayOf(N().string),variant:N().oneOf(["default","active","plain","primary"]),initialText:N().string.isRequired,isActive:N().bool,isButtonStyled:N().bool,onClick:N().func.isRequired,overflowText:N().string,outline:N().bool,leftIcon:N().node,rightIcon:N().node},me.defaultProps={choices:[],variant:void 0,isActive:!1,isButtonStyled:!1,overflowText:"",outline:!0,leftIcon:void 0,rightIcon:void 0};var ve=(0,W.forwardRef)((function(e,n){return(0,c.jsx)(me,(0,$.Z)((0,Q.Z)({},e),{forwardedRef:n}))})),ge=t(75644),xe=(0,D.Pi)((function(e){var n=e.children,r=e.onApply,i=e.pillText,o=e.initialFormState,s=(0,W.useState)(!1),l=s[0],a=s[1],u=(0,W.useRef)(null),d=!(0,ge.x)("lg"),f=(0,B.Z)().DietaryPreferencesStore.dietaryPreferencesList,h=function(){return a(!1)},p=J()((function(){return d?t.e(8586).then(t.bind(t,38586)).then((function(e){return e.FilterPanelMobile})):t.e(5441).then(t.bind(t,45441)).then((function(e){return e.FilterPanelDesktopAndTablet}))}),{loadableGenerated:{webpack:function(){return[45441]}},ssr:!1});return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(ve,{isButtonStyled:!0,choices:f,initialText:i,onClick:function(){a(!l),V.c.track(F.ANALYTICS_EVENTS.DIETARY_PREFERENCES_OPENED)},ref:u,isActive:l,rightIcon:g()(f)?(0,c.jsx)(K.J,{name:"filter",ml:"0.5rem",fill:"currentColor",height:"20px",width:"20px"}):(0,c.jsx)(z.xu,{height:"20px"})}),l&&(0,c.jsx)(p,{pillRef:u,isVisible:l,onClose:h,onSaveAndApply:function(e){r(e),h()},initialFormState:o,children:n})]})}));xe.propTypes={children:N().node.isRequired,initialFormState:N().shape({}).isRequired,onApply:N().func.isRequired,pillAnalytics:N().shape({}),pillText:N().string.isRequired},xe.defaultProps={pillAnalytics:void 0};var ye=t(96009),be=t.n(ye),Ce=t(72579),Re=t.n(Ce),Se=t(63397),je=t(66383);function we(){var e=(0,l.Z)(["\n  /* Hide checkbox visually but remain accessible to screen readers. */\n  position: absolute;\n  opacity: 0;\n  z-index: -1;\n"]);return we=function(){return e},e}function Ie(){var e=(0,l.Z)(["\n  cursor: pointer;\n"]);return Ie=function(){return e},e}var Pe=function(e){var n=e.name,t=e.label,r=e.subtitle,i=e.optionValues,o=e.iconName,s=e.onChecked,l=(0,je.Z)((0,Se.U$)({name:n,type:"checkbox"}),3),a=l[0],u=l[1],d=l[2],f=u.value!==i.off;return(0,c.jsxs)(Te,{mb:{xs:1,md:"0.5rem"},as:"label",htmlFor:n,alignItems:"center",justifyContent:"flex-start",flex:1,border:f?"2px solid ".concat(H.O9.success600):"1px solid ".concat(H.O9.grey100),borderRadius:"4px",children:[o&&(0,c.jsx)(z.xu,{as:"span",display:"block",p:"24px",children:(0,c.jsx)(K.J,{name:o,height:"32px",width:"32px"})}),(0,c.jsxs)(z.kC,{height:"75px",alignItems:"center",py:f?"0.5rem":0,children:[(0,c.jsxs)(z.xu,{flex:5,as:"span",display:"block",children:[t&&(0,c.jsx)(re.P,{as:"span",display:"block",variant:2,pr:1,fontWeight:"bold",children:t}),f&&r&&(0,c.jsx)(re.P,{as:"span",display:"block",mt:"0.2rem",variant:4,pr:1,children:r})]}),(0,c.jsx)(ke,(0,$.Z)((0,Q.Z)({},a),{id:n,type:"checkbox",checked:f,onChange:function(e){return function(e){e?(d.setValue(Re()(i,"on",e)),s(n)):d.setValue(Re()(i,"off",e))}(e.target.checked)}}))]})]})},ke=U.ZP.input.attrs({type:"checkbox"}).withConfig({componentId:"sc-5d50fcbb-0"})(we()),Te=(0,U.ZP)(z.kC).withConfig({componentId:"sc-5d50fcbb-1"})(Ie());Pe.propTypes={label:N().string,name:N().string.isRequired,optionValues:N().shape({on:N().string,off:N().string}).isRequired,subtitle:N().string,iconName:N().string.isRequired,onChecked:N().func.isRequired},Pe.defaultProps={label:null,subtitle:null};var Ee=function(){var e=(0,Se.u6)(),n=e.values,t=e.setFieldValue,r=function(e){var r=be()(F.DIETARY_TYPES.VEGAN),i=be()(F.DIETARY_TYPES.VEGETARIAN);e===r&&Re()(n,i)===F.DIETARY_STATUS.YES&&t(i,F.DIETARY_STATUS.NO),e===i&&Re()(n,r)===F.DIETARY_STATUS.YES&&t(r,F.DIETARY_STATUS.NO)};return P()(F.DIETARY_PREFERENCES_OPTIONS,(function(e,n){var t=e.label,i=e.description,o=e.iconName,s=be()(n);return(0,c.jsx)(W.Fragment,{children:(0,c.jsx)(Pe,{label:t,name:s,iconName:o,subtitle:i,optionValues:{on:F.DIETARY_STATUS.YES,off:F.DIETARY_STATUS.NO},onChecked:r})},s)}))},Ae=t(85186),Ze=(0,D.Pi)((function(){var e=(0,B.Z)(),n=e.MenuStore,t=e.DietaryPreferencesStore,r=!(0,ge.x)("lg"),i=n.allergenLink;return(0,c.jsx)(xe,{onApply:function(e){t.saveDietaryPreferences(e),window.scrollTo(0,0),V.c.track(F.ANALYTICS_EVENTS.DIETARY_PREFERENCES_UPDATED,{dietaryPreferences:t.dietaryPreferencesList})},pillText:"Dietary Preferences",initialFormState:t,children:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)(z.xu,{textAlign:"center",mb:{_:2,lg:1},children:[(0,c.jsx)(re.pm,{variant:3,mb:1,children:"Dietary preferences"}),(0,c.jsx)(re.P,{variant:r?2:4,children:"Setting these will hide things you can\u2019t eat from the menu. Some items will have Veg options but need customisation."})]}),(0,c.jsx)(Ee,{}),(0,c.jsxs)(re.P,{variant:4,mt:{xs:"0.5rem",md:1},textAlign:"center",color:"grey700",children:["These filters should be only used for dietary preferences, not dietary requirements due to allergens. We can\u2019t guarantee our products are free from allergens as there\u2019s always a risk of allergen traces due to cross-contact. If you have a food allergy, please tell us when ordering and read our full allergen information",i&&(0,c.jsxs)(Ae.r,{href:i.url,target:"_blank",variant:4,onClick:function(){return V.c.track(F.ANALYTICS_EVENTS.ALLERGEN_DOCUMENT_VIEWED)},children:[" ","here"]}),"."]})]})})})),_e=t(74599),Oe=function(e){var n=(0,W.useRef)();return(0,W.useEffect)((function(){n.current=e}),[e]),n.current};function De(){var e=(0,l.Z)(["\n  position: absolute;\n  top: calc(100% + 6px);\n  right: 0;\n  white-space: nowrap;\n  box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);\n"]);return De=function(){return e},e}var Le=(0,U.ZP)(z.xu).withConfig({componentId:"sc-4e71b6c3-0"})(De()),qe=(0,D.Pi)((function(){var e=(0,B.Z)(),n=e.CartStore,t=e.PerksShopStore,r=(0,W.useState)(!1),i=r[0],o=r[1],s=n.itemCount,l=t.cartItemsCount,a=Oe(s),u=Oe(l);return(0,W.useEffect)((function(){(s>a||l>u)&&o(!0);var e=setTimeout((function(){o(!1)}),1600);return function(){return clearTimeout(e)}}),[s,a,l,u]),(0,c.jsx)(_e.E.div,{initial:i,animate:i?"visible":"hidden",variants:{visible:{opacity:1,height:"auto"},hidden:{opacity:0}},transition:{delay:.2,duration:.3,ease:"easeOut"},"aria-hidden":!i,children:(0,c.jsx)(Le,{py:"0.5rem",px:1,backgroundColor:"white",children:(0,c.jsx)(re.P,{variant:3,color:"pink700",children:"Added to your order"})})})})),Ne=t(47361),We=t(26297),Me={handleItemClick:N().func.isRequired,handlePageScroll:N().func.isRequired,itemRefs:N().objectOf(N().oneOfType([N().func,N().shape({current:N().any})])).isRequired,navItems:N().array.isRequired,selectedSectionId:N().string},Ue={selectedSectionId:null},Ye=t(89554);function Fe(){var e=(0,l.Z)(["\n  @media (min-width: ",") {\n    width: 100%;\n  }\n"]);return Fe=function(){return e},e}function Ve(){var e=(0,l.Z)(["\n  ",";\n  background-color: transparent;\n  border: none;\n  color: ",";\n  height: 100%;\n  line-height: 1;\n  outline: none;\n  padding: 0;\n  text-decoration: none;\n  transition: ease 0.1s;\n  white-space: nowrap;\n"]);return Ve=function(){return e},e}function He(){var e=(0,l.Z)(["\n  ","\n  align-items: center;\n  border-bottom: 2px solid transparent;\n  display: flex;\n  transition: border-bottom 0.2s ease;\n  user-select: none;\n\n  ","\n\n  &:hover {\n    "," {\n      color: ",";\n    }\n  }\n"]);return He=function(){return e},e}var Ge=(0,U.ZP)(z.kC).withConfig({componentId:"sc-bd2c0fec-0"})(Fe(),H.AV.lg),Be=U.ZP.button.withConfig({componentId:"sc-bd2c0fec-1"})(Ve(),(0,Ye.k)(3),H.O9.greyPrimary),ze=U.ZP.div.withConfig({componentId:"sc-bd2c0fec-2"})(He(),te.Dh,(function(e){return e.active&&"\n      border-color: ".concat(H.O9.neonTeal400,";\n\n      ").concat(Be," {\n        color: ").concat(H.O9.grey800,";\n        outline: none;\n      }\n  ")}),Be,H.O9.grey800);function Xe(){var e=(0,l.Z)(["\n  align-items: flex-start;\n  background-color: white;\n  border-radius: 2px;\n  box-shadow: 0px 10px 30px 10px rgba(43, 43, 43, 0.3);\n  display: ",";\n  flex-direction: column;\n  padding: 0.25rem 0 1rem;\n  position: absolute;\n  right: 0;\n  top: 2.5rem;\n  z-index: 30;\n"]);return Xe=function(){return e},e}function Je(){var e=(0,l.Z)(["\n  margin-left: 0.25rem;\n  height: 10px;\n  width: 10px;\n  transform: scale(2.4);\n"]);return Je=function(){return e},e}function Ke(){var e=(0,l.Z)(["\n  display: flex;\n  position: relative;\n\n  "," {\n    ",":first-child {\n      margin-left: 1rem;\n    }\n  }\n"]);return Ke=function(){return e},e}var Qe=function(e){var n=e.selectRef,t=e.selectedSectionId,r=e.navItems,i=e.children,o=e.isOpen,s=e.onClick;return i?(0,c.jsxs)(nn,{children:[(0,c.jsx)(ve,{initialText:"More",isActive:!!d()(r,(function(e){return e.id===t})),onClick:function(){return s()},rightIcon:(0,c.jsx)(en,{name:"chevron",fill:"currentColor","aria-hidden":"true"}),outline:!1},"more"),(0,c.jsx)($e,{ref:n,isOpen:o,children:i})]}):null},$e=U.ZP.div.withConfig({componentId:"sc-e9ed43eb-0"})(Xe(),(function(e){return e.isOpen?"flex":"none"})),en=(0,U.ZP)(K.J).withConfig({componentId:"sc-e9ed43eb-1"})(Je()),nn=U.ZP.div.withConfig({componentId:"sc-e9ed43eb-2"})(Ke(),$e,ze);function tn(){var e=(0,l.Z)(["\n  display: none;\n\n  ",":first-child {\n    margin-left: 0;\n  }\n\n  @media (min-width: ",") {\n    display: flex;\n    align-items: center;\n    justify-content: flex-start;\n  }\n"]);return tn=function(){return e},e}Qe.propTypes={children:N().node.isRequired,isOpen:N().bool.isRequired,navItems:N().array.isRequired,onClick:N().func.isRequired,selectRef:N().oneOfType([N().func,N().shape({current:N().any})]).isRequired,selectedSectionId:N().string},Qe.defaultProps=Ue;var rn=function(e){var n=e.selectedSectionId,t=e.handlePageScroll,r=e.navItems,i=e.navItemsCount,o=e.itemRefs,s=e.handleItemClick,l=(0,W.useState)(!1),a=l[0],u=l[1],d=(0,W.useRef)(null),f=function(e){u(!a),e&&s(e)},h=function(e){d.current&&!d.current.contains(e.target)&&u(!1)};return(0,W.useEffect)((function(){return document.addEventListener("mousedown",h),function(){document.removeEventListener("mousedown",h)}})),(0,c.jsxs)(on,{onScroll:t,gap:1,children:[r.slice(0,i).map((function(e){return(0,c.jsx)(ve,{isActive:n===e.id,initialText:e.label,outline:!1,onClick:function(){return s(e.id)},ref:o[e.id]},e.id)})),r.length>i&&(0,c.jsx)(Qe,{isOpen:a,navItems:r.slice(i),onClick:f,selectRef:d,selectedSectionId:n,children:r.slice(i).map((function(e){return e&&(0,c.jsx)(ze,{pb:".25rem",pt:"1.25rem",mx:"1rem",active:n===e.id,children:(0,c.jsx)(Be,{onClick:function(){return f(e.id)},children:e.label})},e.id)}))})]})},on=(0,U.ZP)(Ge).withConfig({componentId:"sc-4e37c908-0"})(tn(),ze,H.AV.lg);rn.propTypes=(0,$.Z)((0,Q.Z)({},Me),{navItemsCount:N().number.isRequired}),rn.defaultProps=Ue;var sn=function(e){var n=e.selectedSectionId,t=e.handlePageScroll,r=e.navItems,i=e.itemRefs,o=e.handleItemClick;return(0,c.jsx)(z.xu,{display:{_:"flex",lg:"none"},alignItems:"center",px:{_:"1.5rem",md:2},gap:"12px",onScroll:t,children:r.map((function(e){return(0,c.jsx)(ve,{isActive:n===e.id,initialText:e.label,outline:!1,onClick:function(){return o(e.id)},ref:i[e.id]},e.id)}))})};function ln(){var e=(0,l.Z)(["\n  display: flex;\n  height: 4rem;\n  overflow-y: hidden;\n  scrollbar-width: none;\n\n  &::-webkit-scrollbar {\n    display: none;\n  }\n\n  @media (min-width: ",") {\n    overflow-y: inherit;\n  }\n\n  @media (min-width: ",") {\n    height: 3.5rem;\n  }\n\n  @media (min-width: ",") {\n    height: 2.5rem;\n  }\n"]);return ln=function(){return e},e}sn.propTypes=Me,sn.defaultProps=Ue;var an=function(e){var n=e.itemsWrapperRef,t=e.navItemsCount,r=(0,We.Z)(e,["itemsWrapperRef","navItemsCount"]);return(0,c.jsxs)(cn,{ref:n,children:[(0,c.jsx)(rn,(0,Q.Z)({navItemsCount:t},r)),(0,c.jsx)(sn,(0,Q.Z)({},r))]})},cn=U.ZP.div.withConfig({componentId:"sc-1a64168d-0"})(ln(),H.AV.lg,H.AV.xl,H.AV.xxl);an.propTypes={itemsWrapperRef:N().oneOfType([N().func,N().shape({current:N().any})]).isRequired,navItemsCount:N().number.isRequired};var un=(0,D.Pi)(an),dn=t(25877),fn=t.n(dn),hn=t(71644),pn=t.n(hn),mn=t(65680),vn=t.n(mn),gn=t(16765),xn=t.n(gn),yn=function(e){if(y()(document))return null;var n=document.getElementById(e);if(y()(n))return null;var t=n.getBoundingClientRect(),r=0;return t.top>0?t.top+t.height<window.innerHeight?r=t.height:t.top<window.innerHeight&&(r=window.innerHeight-t.top):t.top+t.height>window.innerHeight?r=window.innerHeight:t.top+t.height>0&&(r=t.top+t.height),r};function bn(){var e=(0,l.Z)(["\n  margin-top: -4px;\n  background-color: ",";\n  overflow: hidden;\n  position: sticky;\n  top: 0;\n  z-index: 20;\n  border-bottom: 1px solid ",";\n\n  @media (min-width: ",") {\n    overflow: visible;\n  }\n"]);return bn=function(){return e},e}function Cn(){var e=(0,l.Z)(["\n  flex-direction: column;\n  justify-content: center;\n  overflow-y: hidden;\n\n  @media (min-width: ",") {\n    overflow-y: visible;\n  }\n"]);return Cn=function(){return e},e}var Rn={LG:4,XL:5},Sn=function(e){(0,s.Z)(t,e);var n=(0,a.Z)(t);function t(e){var o;return(0,i.Z)(this,t),(o=n.call(this,e)).state={isScrolling:!1,scrollListener:null,isMouseDown:!1,startX:null,scrollLeft:null,mouseMoveListener:null,selectedSectionId:null,isItemClick:!1},(0,O.makeObservable)((0,r.Z)(o),{navItems:O.computed}),o.inPageNavRef=(0,W.createRef)(),o.itemsWrapperRef=(0,W.createRef)(),o.navMouseDown=o.navMouseDown.bind((0,r.Z)(o)),o.navMouseUp=o.navMouseUp.bind((0,r.Z)(o)),o.handleNavScroll=o.handleNavScroll.bind((0,r.Z)(o)),o.handleScrollBegin=o.handleScrollBegin.bind((0,r.Z)(o)),o.handleScrollEnd=o.handleScrollEnd.bind((0,r.Z)(o)),o.handlePageScroll=o.handlePageScroll.bind((0,r.Z)(o)),o.scrollToSection=o.scrollToSection.bind((0,r.Z)(o)),o.selectItem=o.selectItem.bind((0,r.Z)(o)),o.itemRefs=T()(S()(o.navItems.filter((function(e){var n=e.id;return C()(n)&&!g()(n)})),"id"),W.createRef),o}return(0,o.Z)(t,[{key:"componentDidMount",value:function(){this.itemsWrapperRef.current.addEventListener("mousedown",this.navMouseDown,!1),this.itemsWrapperRef.current.addEventListener("mouseup",this.navMouseUp,!1);var e=_()(this.handleNavScroll,20);m()(this.itemsWrapperRef.current,"addEventListener","mousemove",e);var n=_()(this.handlePageScroll,150);m()(window,"addEventListener","scroll",n),this.setState({mouseMoveListener:e,scrollListener:n}),M.zW.scrollEvent.register("begin",this.handleScrollBegin),M.zW.scrollEvent.register("end",this.handleScrollEnd),this.performInitialCategoryScroll()}},{key:"componentDidUpdate",value:function(e){var n=this.props.router;e.router!==n&&this.performInitialCategoryScroll()}},{key:"componentWillUnmount",value:function(){var e=this.state,n=e.scrollListener,t=e.mouseMoveListener;m()(window,"removeEventListener","scroll",n),m()(this.itemsWrapperRef.current,"removeEventListener","mousemove",t),this.itemsWrapperRef.current.removeEventListener("mousedown",this.navMouseDown,!1),this.itemsWrapperRef.current.removeEventListener("mouseup",this.navMouseUp,!1),M.zW.scrollEvent.remove("begin"),M.zW.scrollEvent.remove("end")}},{key:"handleNavScroll",value:function(e){var n=this.state,t=n.isMouseDown,r=n.startX,i=n.scrollLeft;if(t){e.preventDefault();var o=e.pageX-this.itemsWrapperRef.current.offsetLeft-r;this.itemsWrapperRef.current.scrollLeft=i-o}}},{key:"handleScrollBegin",value:function(){this.setState({isScrolling:!0})}},{key:"handleScrollEnd",value:function(){this.setState({isScrolling:!1}),function(e){var n=m()(document,"getElementById",e),t=Re()(document,"body.scrollTop");xn()(n,"tabIndex",0),m()(n,"focus",{preventScroll:!0}),m()(n,"removeAttribute","tabIndex"),xn()(document,"body.scrollTop",t)}(this.state.selectedSectionId)}},{key:"handlePageScroll",value:function(){var e=this.state,n=e.isScrolling,t=e.selectedSectionId,r=e.isItemClick,i=A()(P()(this.navItems,"id"),yn);i===t||n||r||this.selectItem(i),n||this.setState({isItemClick:!1})}},{key:"navItems",get:function(){var e=this.props.sections;return(0,G.d)(e)}},{key:"navMouseUp",value:function(){this.setState({isMouseDown:!1})}},{key:"navMouseDown",value:function(e){this.setState({isMouseDown:!0,startX:e.pageX-this.itemsWrapperRef.current.offsetLeft,scrollLeft:this.itemsWrapperRef.current.scrollLeft})}},{key:"selectItem",value:function(e){if(!y()(this.itemsWrapperRef)&&!y()(this.itemRefs[e])){var n=this.itemsWrapperRef.current,t=this.itemRefs[e].current;n&&t&&(!function(e,n){var t=e.scrollWidth-e.offsetWidth,r=Math.round(e.offsetWidth/2),i=Math.round(n.offsetWidth/2)+n.offsetLeft,o=vn()([pn()([i-r,0]),t]);fn()(n.nextSibling)?o=t:fn()(n.previousSibling)&&(o=0),xn()(e,"scrollLeft",o)}(n,t),this.setState({selectedSectionId:e}))}}},{key:"scrollToSection",value:function(e){var n=d()(this.navItems,{id:e});n&&(M.OK.scrollTo(e,{duration:800,offset:-(this.inPageNavRef.current.clientHeight+40),smooth:!0}),g()(n.label)||V.c.track(F.ANALYTICS_EVENTS.MENU_CATEGORY_NAVIGATION_CLICKED,{category:n.label}),this.setState({isItemClick:!0}),this.selectItem(e))}},{key:"performInitialCategoryScroll",value:function(){var e=this.props.router,n=null===e||void 0===e?void 0:e.asPath.substring(w()(null===e||void 0===e?void 0:e.asPath,"#")),t=P()(this.navItems,"id");h()(t,n)&&this.scrollToSection(n)}},{key:"render",value:function(){var e=this.state.selectedSectionId,n=this.props,t=n.cartOnClick,r=n.quantity,i=n.showDietaryPreferences,o=n.sections,s=n.showGroupInfoButton,l=n.groupInfoOnClick,a=n.navItemsCount;return(0,c.jsx)(jn,{children:(0,c.jsx)(z.W2,{children:(0,c.jsx)(z.xu,{ref:this.inPageNavRef,mx:{_:"-1.5rem",md:-2,lg:0},children:(0,c.jsxs)(z.X2,{flexWrap:{_:"wrap",lg:"nowrap"},justifyContent:"space-between",children:[(0,c.jsx)(wn,{width:{_:1,lg:.75},offset:i?[]:[0,0,0,1/12],children:(0,c.jsx)(un,{handleItemClick:this.scrollToSection,handlePageScroll:this.handlePageScroll,itemRefs:this.itemRefs,itemsWrapperRef:this.itemsWrapperRef,navItems:(0,G.d)(o),navItemsCount:a,selectedSectionId:e})}),s&&(0,c.jsx)(wn,{order:{_:2,lg:"unset"},width:{_:.5,lg:"fit-content"},display:"flex",children:(0,c.jsx)(z.xu,{alignItems:"center",justifyContent:"center",display:"flex",position:"relative",children:(0,c.jsx)(Y.t,{onClick:l})})}),t&&(0,c.jsx)(wn,{width:"fit-content",display:{xs:"none",lg:"flex"},children:(0,c.jsxs)(z.xu,{alignItems:"center",position:"relative",children:[(0,c.jsx)(Ne.W,{onClick:t,quantity:r}),(0,c.jsx)(qe,{})]})}),i&&(0,c.jsx)(wn,{order:{lg:-1},width:{_:s?.5:1,lg:"fit-content"},children:(0,c.jsx)(z.xu,{display:"flex",py:{_:"12px",lg:0},alignItems:"center",justifyContent:"center",height:"100%",children:(0,c.jsx)(Ze,{})})})]})})})})}}]),t}(W.PureComponent),jn=U.ZP.div.withConfig({componentId:"sc-c14fedc9-0"})(bn(),H.O9.white,H.O9.grey100,H.AV.lg),wn=(0,U.ZP)(z.JX).withConfig({componentId:"sc-c14fedc9-1"})(Cn(),H.AV.md);Sn.propTypes={cartOnClick:N().func,quantity:N().number,router:N().shape({asPath:N().string}).isRequired,sections:N().arrayOf(N().shape({id:N().string}).isRequired).isRequired,showDietaryPreferences:N().bool,showGroupInfoButton:N().bool,groupInfoOnClick:N().func,navItemsCount:N().number.isRequired},Sn.defaultProps={cartOnClick:null,quantity:0,showDietaryPreferences:!1,showGroupInfoButton:!1,groupInfoOnClick:function(){}};var In=(0,D.Pi)((0,L.withRouter)(Sn))},41541:function(e,n,t){t.d(n,{A:function(){return p}});var r=t(92228),i=t(52322),o=t(20539),s=t(13980),l=t.n(s),a=t(73091),c=t(40544),u=t(85206),d=t(53582),f=t(50157);function h(){var e=(0,r.Z)(["\n  justify-content: space-between;\n"]);return h=function(){return e},e}var p=function(e){var n=e.deliveryCost,t=e.subtotalPrices,r=e.discountPrices,s=e.totalPrices,l=e.showDisclaimer,a=e.isDiscountApplied,d=e.deliverySponsor,h=e.surcharges,p=e.smallTotal,v=(0,f.A)(),g=h.find((function(e){return e.type===o.SURCHARGE_TYPE.HOLIDAY_SURCHARGE})),x=!!g,y=v===o.MARKET.AUSTRALIA&&l;return(0,i.jsxs)(c.xu,{display:"grid",rowGap:"0.5rem",py:1,children:[(0,i.jsxs)(m,{children:[(0,i.jsx)(u.P,{variant:4,color:"greyPrimary",children:"Subtotal"}),(0,i.jsx)(u.P,{variant:4,color:"greyPrimary",children:t.formattedPrice})]}),h.map((function(e){return(0,i.jsxs)(m,{children:[(0,i.jsx)(u.P,{variant:4,color:"greyPrimary",children:e.description}),(0,i.jsx)(u.P,{variant:4,color:"greyPrimary",children:e.formattedAmount})]},e.type)})),!!n&&(0,i.jsxs)(m,{mt:"0.75rem",children:[(0,i.jsx)(u.P,{variant:4,color:"greyPrimary",children:"Delivery"}),a?(0,i.jsx)(c.kC,{bg:"red500",borderRadius:"2px",children:(0,i.jsxs)(u.__,{px:"0.5rem",py:"0.25rem",variant:2,fontWeight:"bold",color:"white",children:["Free",d?" with ".concat(d.name):""]})}):(0,i.jsx)(u.P,{variant:4,color:"greyPrimary",children:n})]}),0!==r.cents&&(0,i.jsxs)(m,{children:[(0,i.jsx)(u.P,{variant:4,color:"orange500",children:"Discount"}),(0,i.jsx)(u.P,{variant:4,color:"orange500",children:r.formattedPrice})]}),s&&p&&(0,i.jsxs)(m,{children:[(0,i.jsx)(u.P,{variant:3,children:"Total"}),(0,i.jsx)(u.P,{variant:3,children:s.formattedPrice})]}),s&&!p&&(0,i.jsxs)(m,{children:[(0,i.jsx)(u.pm,{variant:4,children:"Total"}),(0,i.jsx)(u.pm,{variant:4,children:s.formattedPrice})]}),(x||y)&&(0,i.jsxs)(c.xu,{display:"grid",pt:"1rem",gap:"0.5rem",children:[x&&(0,i.jsxs)(u.P,{variant:4,color:"greyPrimary",textAlign:"center",children:["A surcharge of ",g.formattedSurcharge," applies on public holidays."]}),y&&(0,i.jsx)(u.P,{variant:4,color:"greyPrimary",textAlign:"center",children:"Kilojoule calculations do not include drinks or customisations to menu items. The average adult daily energy intake is 8,700 kJ."})]})]})},m=(0,a.ZP)(c.kC).withConfig({componentId:"sc-8beda964-0"})(h());p.propTypes={deliveryCost:l().string,discountPrices:d.cQ,subtotalPrices:l().oneOfType([d.cQ,l().shape({formattedPrices:l().string})]).isRequired,totalPrices:d.cQ,showDisclaimer:l().bool,surcharges:l().arrayOf(l().shape({type:l().string,name:l().string,description:l().string,formattedAmount:l().string,formattedSurcharge:l().string})),isDiscountApplied:l().bool,deliverySponsor:l().shape({name:l().string}),smallTotal:l().bool},p.defaultProps={discountPrices:{points:0,cents:0},deliveryCost:null,showDisclaimer:!0,totalPrices:null,surcharges:[],isDiscountApplied:!1,deliverySponsor:null,smallTotal:!1}},90418:function(e,n,t){t.d(n,{X:function(){return Y}});var r=t(47842),i=t(70865),o=t(96670),s=t(52322),l=t(90882),a=t.n(l),c=t(20539),u=t(18495),d=t(71152),f=t(13980),h=t.n(f),p=t(26297),m=t(66383),v=t(77994),g=t(2784),x=t(76837),y=t(40544),b=t(13247),C=t(73299),R=t(85206),S=t(36964),j=t(53582),w=t(45455),I=t.n(w),P=t(21302),k=t(28966),T=function(e){var n=e.heading,t=e.color,r=e.backgroundColor,l=e.borderRadius,a=e.mt,c=e.mb,u=e.headingLevel,d=e.lineHeight,f=e.textAlign,h=e.justifyContent,m=e.flameDecalColor,v=(0,p.Z)(e,["heading","color","backgroundColor","borderRadius","mt","mb","headingLevel","lineHeight","textAlign","justifyContent","flameDecalColor"]);return n?(0,s.jsxs)(y.kC,(0,o.Z)((0,i.Z)({mt:a,mb:c,px:"0.6rem",position:"relative",justifyContent:h,borderRadius:l||"4px",maxWidth:"100%",width:{_:"100%",sm:"fit-content"},backgroundColor:r},v),{children:[(0,s.jsx)(u,{textAlign:f,color:t,maxWidth:"fit-content",lineHeight:d,pr:m?{_:"calc(1.5rem + ".concat(k.z._,")"),md:"calc(1.5rem + ".concat(k.z.md,")")}:void 0,children:n}),m&&(0,s.jsx)(y.xu,{position:"absolute",bottom:"0.5rem",right:"0.5rem",children:(0,s.jsx)(k.t,{fill:m,isResponsive:!0})})]})):null};T.propTypes={heading:h().string.isRequired,backgroundColor:P.ZP.color.backgroundColor,borderRadius:P.ZP.border.border,color:P.ZP.color.color,mt:P.y3,mb:P.y3,headingLevel:h().object,textAlign:h().string,lineHeight:P.ZP.typography.lineHeight,justifyContent:h().string,flameDecalColor:h().string},T.defaultProps={backgroundColor:null,borderRadius:null,color:null,headingLevel:R.H2,mb:"1.5rem",mt:null,lineHeight:1.4,textAlign:"left",justifyContent:"left",flameDecalColor:null};var E=t(19948),A=t(78585),Z=t(53015),_=function(e){var n,t,r=e.category,i=e.viewProduct,o=e.CardComponent,l=(0,Z.S)("menu-category-descriptions"),a=!I()(r.description),u=r.brazeLogImpression;return(0,E.I)({brazeLogImpression:u}),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(T,{backgroundColor:null!==(n=c.MENU_CATEGORY_COLOURS[r.handle])&&void 0!==n?n:c.MENU_CATEGORY_COLOURS.default,color:"white",headingLevel:R.H2,heading:r.name,flameDecalColor:null!==(t=c.MENU_CATEGORY_FLAME_COLOURS[r.handle])&&void 0!==t?t:c.MENU_CATEGORY_FLAME_COLOURS.default,mt:{_:"5rem",md:"2rem",lg:"1rem"},mb:"2rem"}),l&&a&&(0,s.jsx)(R.P,{variant:2,mb:{_:"1.5rem",lg:"2rem"},width:{xl:.75},children:r.description}),(0,s.jsx)(A.r,{shouldKeepVertical:!0,CardComponent:o,cardWidth:{xs:.5,sm:4/12,xxl:.25},categoryName:r.name,items:r.products,onClick:function(e){var n;i(e),null===r||void 0===r||null===(n=r.brazeLogClick)||void 0===n||n.call(r)},cardBackgroundColor:"transparent"})]})};_.propTypes={CardComponent:h().oneOfType([h().object,h().func]).isRequired,category:h().shape({name:h().string.isRequired,handle:h().string.isRequired,description:h().oneOfType([h().string,h().element]),products:h().oneOfType([d.cv.isRequired,j.kA.isRequired]),brazeLogImpression:h().func,brazeLogClick:h().func}).isRequired,viewProduct:h().func.isRequired};var O=(0,u.Pi)(_),D=t(71975),L=function(e){var n,t,r=e.category,l=(0,p.Z)(e,["category"]),a=(0,v.Z)().OrderingContextStore,u=(0,g.useState)(!1),d=u[0],f=u[1],h=(0,g.useState)(!1),j=h[0],w=h[1],I=(0,m.Z)((0,D.B)("age-verified"),2),P=I[0],k=I[1],T=c.ALCOHOL_DISCLAIMERS_BY_STATE[null===a||void 0===a||null===(n=a.restaurant)||void 0===n||null===(t=n.address)||void 0===t?void 0:t.state]||c.ALCOHOL_DISCLAIMERS_BY_STATE.VIC;return P?(0,s.jsx)(O,(0,i.Z)({category:(0,o.Z)((0,i.Z)({},r),{description:T})},l)):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(y.X2,{mb:4,justifyContent:"center",children:(0,s.jsx)(y.JX,{width:{xs:1,xxl:10/12},children:(0,s.jsxs)(y.xu,{py:2,px:2,children:[(0,s.jsx)(y.kC,{justifyContent:"center",mb:{_:"0.5rem",md:1},children:(0,s.jsx)(R.H2,{children:r.name})}),(0,s.jsx)(y.X2,{justifyContent:"center",children:(0,s.jsxs)(y.JX,{width:{_:1,md:8/12,lg:8/12},justifyContent:"center",children:[(0,s.jsx)(R.P,{variant:3,textAlign:"center",children:T}),(0,s.jsx)(y.xu,{mt:{_:1,md:2},display:"flex",justifyContent:"center",children:(0,s.jsx)(b.z,{onClick:function(){return f(!0)},children:"Verify Age"})})]})})]})})}),(0,s.jsx)(S.u,{isDividerHidden:!0,open:d,handleClose:function(){return f(!1)},children:(0,s.jsx)(y.xu,{display:"flex",justifyContent:"center",pb:3,children:(0,s.jsxs)(y.xu,{maxWidth:"350px",textAlign:"center",children:[(0,s.jsx)(R.P,{mb:2,children:"You must be of legal age to view & purchase alcohol products."}),(0,s.jsx)(R.H3,{mb:2,children:"Are you over 18?"}),(0,s.jsxs)(y.xu,{display:"flex",flexGrow:1,gap:"0.5rem",mb:2,children:[(0,s.jsx)(b.z,{isFullWidth:!0,variant:"secondary",onClick:function(){return f(!1)},children:"No"}),(0,s.jsx)(b.z,{isFullWidth:!0,onClick:function(){k(!0,{expires:j?90:1}),f(!1),x.c.track(c.ANALYTICS_EVENTS.USER_ALCOHOL_AGE_VERIFIED)},children:"Yes"})]}),(0,s.jsx)(C.XZ,{name:"rememberMe",label:(0,s.jsx)(R.P,{variant:4,children:"Remember me for next time"}),checked:j,onChange:function(e){return w(!!e.target.checked)}})]})})})]})};L.propTypes={CardComponent:h().oneOfType([h().object,h().func]).isRequired,category:h().shape({name:h().string.isRequired,handle:h().string.isRequired,description:h().string,products:h().oneOfType([d.cv.isRequired,j.kA.isRequired])}).isRequired,viewProduct:h().func.isRequired};var q=(0,u.Pi)(L),N=t(52303),W=function(){return(0,s.jsxs)(s.Fragment,{children:["Purchase any Coke variety online for 1-in-4 chances to win an epic prize!",(0,s.jsx)("br",{}),c.DELIVERY_DISCOUNT_CATEGORY_DESCRIPTIONS.COKE]})},M=(0,r.Z)({},c.MENU_CATEGORIES.ALCOHOL,q),U=function(e){var n=e.CardComponent,t=e.categories,r=e.viewProduct,l=e.isDelivery,u=e.isDeliveryDiscountActive,d=a()(t,(function(e){return 0!==e.products.length}));return(0,s.jsx)(s.Fragment,{children:d.map((function(e){var t=(0,N.w)(e.name),a=M[e.handle]||O,d=e.handle===c.MENU_CATEGORIES.SPIN_TO_WIN&&l&&u;return(0,s.jsx)(y.W2,{mt:{_:0,sm:"2rem",lg:"3.5rem"},mb:{_:"1.5rem",lg:"2.5rem"},id:t,children:(0,s.jsx)(a,{category:(0,o.Z)((0,i.Z)({},e),{description:d?(0,s.jsx)(W,{}):e.description}),CardComponent:n,viewProduct:r})},t)}))})};U.propTypes={CardComponent:h().oneOfType([h().object,h().func]).isRequired,categories:h().arrayOf(h().shape({name:h().string.isRequired,handle:h().string.isRequired,description:h().string,products:h().oneOfType([d.cv.isRequired,j.kA.isRequired])})).isRequired,viewProduct:h().func.isRequired,isDelivery:h().bool.isRequired,isDeliveryDiscountActive:h().bool},U.defaultProps={isDeliveryDiscountActive:!1};var Y=(0,u.Pi)(U)},71975:function(e,n,t){t.d(n,{B:function(){return o}});var r=t(2784),i=t(21805),o=function(e){var n=(0,r.useState)((function(){return i.Z.get(e)})),t=n[0],o=n[1],s=(0,r.useCallback)((function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.Z.set(e,n,t),o(n)}),[e]);return[t,s,(0,r.useCallback)((function(n){i.Z.remove(e,n),o(null)}),[e])]}},25759:function(e,n,t){t.d(n,{B:function(){return u}});var r=t(98788),i=t(92228),o=t(22970),s=t(84176),l=t(46622),a=t(61282);function c(){var e=(0,i.Z)(["\n        query launchDarklyFeatureFlags($platform: String!) {\n          launchDarklyFeatureFlags(platform: $platform) {\n            name\n            value\n            type\n          }\n        }\n      "]);return c=function(){return e},e}var u=function(){var e=(0,r.Z)((function(){var e,n,t,r;return(0,o.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),[4,(0,l.h)({query:(0,s.ZP)(c()),variables:{platform:"Web"}})];case 1:return e=i.sent(),n=e.launchDarklyFeatureFlags,t={},null===n||void 0===n||n.forEach((function(e){var n=e.name,r=e.value;t[n]=JSON.parse(r)})),[2,{launchDarklyEnabled:!0,flags:t}];case 2:return r=i.sent(),a.kg.error("Error initialising server side feature flags",{error:r.errors}),[3,3];case 3:return[2,{}]}}))}));return function(){return e.apply(this,arguments)}}()}}]);
//# sourceMappingURL=4874-06fef18f40277bc0.js.map