(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"+89e":function(e,t){},"+9EZ":function(e,t,n){"use strict";n.r(t),n.d(t,"mapResponsiveImageSetContentModelToResponsiveImageProps",(function(){return r}));var r=function(e){return{src:e.small.file.url,mdSrc:e.medium&&e.medium.file.url,lgSrc:e.large&&e.large.file.url}}},"+hSc":function(e,t){},"//bI":function(e,t){},"/u5P":function(e,t){},"02Mq":function(e,t){},"0bbM":function(e,t){},"0dqJ":function(e,t,n){"use strict";n.r(t);var r=n("p+7n"),o=n("q1tI"),a=n("AxPg");t.default=function(e){var t=e.baseModel;return o.createElement("div",{className:"flex-grow-1",style:{maxWidth:r.breakpoints.large,margin:"0 auto"}},o.createElement(r.ResponsiveVideoEmbed,{src:Object(a.buildVideoUrl)(t.source,t.videoId),allowFullScreen:!0}))}},"1+pq":function(e,t,n){"use strict";n.r(t);var r,o=n("p+7n"),a=n("q1tI"),i=n("TSYQ"),c=n.n(i),l=n("IujW"),u=n.n(l),s=n("AxPg"),d=n("CQ3q"),m=n("9538");!function(e){e.Video="Leading",e.Text="Trailing",e.Equal="None"}(r||(r={}));var f=function(e,t){return e===r.Equal?"col-12 col-lg-6":e===t?"col-12 col-lg-8":"col-12 col-lg-4"},p=function(e){var t=e.id,n=e.title,i=e.backgroundColor,l=e.text,p=e.textColor,g=e.textAlignment,b=void 0===g?o.Alignment.Left:g,h=e.button,v=e.videoSource,C=e.videoId,S=e.videoOnRight,y=e.skew,k=void 0===y?r.Equal:y,w=Object(m.a)(),x="py-0",P="py-4 py-lg-5";n&&(x=void 0,P="py-4 py-lg-0");var E="px-0 px-lg-4";return i&&(E="px-3 px-lg-4"),a.createElement(o.PageSection,{id:t,title:n,verticalSpaceClassName:x,childrenContainerClassName:S?"flex-lg-row-reverse":""},a.createElement("div",{className:c()("d-flex flex-column",E,P,f(k,r.Video),Object(o.getFlexAlignmentClasses)(o.Alignment.Center,"col")),style:{color:p,backgroundColor:i}},a.createElement(o.ResponsiveVideoEmbed,{src:Object(s.buildVideoUrl)(Object(s.stringToVideoSource)(v),C)})),a.createElement("div",{className:c()("d-flex flex-column",E,P,f(k,r.Text),Object(o.getFlexAlignmentClasses)(b,"col")),style:{color:p,backgroundColor:i}},a.createElement(u.a,{className:"w-100",source:l,allowedTypes:["root","text","break","paragraph","emphasis","strong","thematicBreak","blockquote","delete","link","image","linkReference","list","listItem","heading"],unwrapDisallowed:!0,renderers:w}),h&&a.createElement(d.a,h)))},g=n("wlLi"),b=n("RJQD");t.default=function(e){var t,n=e.baseModel,i=n.callToAction&&Object(g.mapActionButton)(n.callToAction),c=n.childContentfulVideoTwoColumnSectionTextTextNode?n.childContentfulVideoTwoColumnSectionTextTextNode.text:"";return a.createElement(p,{id:n.id,backgroundColor:Object(b.getColor)(n.backgroundColor),title:n.title,text:c,button:i,textAlignment:Object(o.mapAlignment)(n.textAlignment),textColor:Object(b.getColor)(n.textColor),skew:(t=n.skew,r[t]),videoOnRight:n.videoOnRight,videoId:n.videoId,videoSource:n.videoSource})}},"2Kix":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return u}));var r=n("mNz5"),o=n.n(r),a=n("Yfyt"),i="//via.placeholder.com",c={small:"576x300",medium:a.a.Medium+"x400",large:a.a.Large+"x650"},l=o()("picture"),u={large:{src:i+"/"+c.large,id:l+"-fallback-lg"},medium:{src:i+"/"+c.medium,id:l+"-fallback-md"},small:{src:i+"/"+c.small,id:l+"-fallback-sm"}}},"2xBr":function(e,t,n){"use strict";n.r(t),n.d(t,"getSelectedBrand",(function(){return o})),n.d(t,"getSelectedSku",(function(){return a}));var r=n("FFKw"),o=function(){if("undefined"!=typeof window)try{return new URLSearchParams(window.location.search).get(r.QueryParams.selectedBrand)}catch(e){console.error(e)}},a=function(){if("undefined"!=typeof window)try{return new URLSearchParams(window.location.search).get(r.QueryParams.sku)}catch(e){console.error(e)}}},"3L66":function(e,t,n){var r=n("MMmD"),o=n("ExA7");e.exports=function(e){return o(e)&&r(e)}},"3RUi":function(e,t){},"3cYt":function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},"3vk5":function(e,t){},"3y7o":function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=function(e){var t=e.question,n=e.answer;return r.createElement("div",{className:"col-12 col-md-6 py-4 px-0 px-md-3"},r.createElement("h4",null,t),r.createElement("p",{className:"m-0"},n))};t.default=function(e){var t=e.baseModel;return r.createElement(o,{question:t.question,answer:t.answer.answer})}},"40Is":function(e,t){},"4rPF":function(e,t,n){"use strict";n.r(t);for(var r=n("q1tI"),o=n("T33S"),a={},i=o.default.length-1;i>=0;i--)a[o.default[i].name]=n("epGF")(""+o.default[i].path).default;t.default=function(e,t,n){return e&&e.map((function(e,o){return function(e,t,n,o){if(a.hasOwnProperty(e.__typename)){var i=a[e.__typename];e.position=o;var c={baseModel:e};t&&(c.pageSettings=t),n&&(c.navProps=n);var l=9999*Math.random();return r.createElement(i,Object.assign({key:e.__typename+"-"+e.id+"-"+l},c))}return null}(e,t,n,o+1)})).filter((function(e){return e}))}},"5Yvf":function(e,t){},"5npC":function(e,t){},"6E1d":function(e,t){},"6FQD":function(e,t,n){"use strict";n.r(t)},"6IB/":function(e,t,n){"use strict";n.r(t)},"6nK8":function(e,t,n){var r=n("dVn5"),o=n("fo6e"),a=n("dt0z"),i=n("9NmV");e.exports=function(e,t,n){return e=a(e),void 0===(t=n?void 0:t)?o(e)?i(e):r(e):e.match(t)||[]}},"6rZg":function(e,t){},"7bJe":function(e,t,n){"use strict";n.r(t)},"8q8R":function(e,t,n){"use strict";n.r(t);var r=n("afOK"),o=n.n(r),a=n("VX4z"),i=n("p+7n"),c=n("Wbzz"),l=n("q1tI"),u=n("QWMy"),s=n("ZmDi"),d=n("Vjiz"),m=n("MIz4"),f=function(e){var t=e.baseModel,n=e.pageSettings,r=e.renderAs,c=e.site,f=e.allProductDb,p=t,g=l.useState((function(){return p.products.map((function(e){return Object(s.getProductModel)(e,f,c.siteMetadata.gatewayUrl)})).filter(i.isNotNullOrUndefined)}))[0],b="section"===r||!1,h=o()(g),v=h&&h.availableFrequency,C=Object(a.useStock)()[1];if(l.useEffect((function(){v&&v===a.AvailableFrequency.OneOff&&g.forEach((function(e){return C({type:a.StockActionType.registerOneOff,sku:e.sku})}))}),[v,C,g]),l.useEffect((function(){v&&v===a.AvailableFrequency.OneOff&&h&&h.productType===a.ProductType.Primary&&(localStorage.removeItem(u.c),localStorage.removeItem(u.b))}),[v,h]),!h)return null;var S=h.productType===a.ProductType.Primary,y=Object(d.getProductGroupModel)(p,g);y.products.map((function(e){var t;return e.recipeCollections=null===(t=e.recipeCollections)||void 0===t?void 0:t.map((function(e){return e.collections=e.collections.map((function(e){return e.recipes=e.recipes.filter((function(e){return 0===e.surcharge})),e})),e})),e}));var k={generateLink:function(e){var t=g.find((function(t){return t.sku===e})),n=c.siteMetadata.accountUrl+"/manage/subscriptions/extras/addbysku/"+e;return Object(m.getProductSelectEventPath)(n,S,t)}},w=Object.assign({},y,{preselectedPeople:n&&n.preselectedPeople,preselectedDinners:n&&n.preselectedDinners,productType:h.productType,productSelectEvent:k,position:p.position}),x={showSelector:!1,products:w.products.map((function(e){return Object.assign({},e,{description:""})}))};return b?l.createElement(l.Fragment,null,l.createElement(a.ProductGroupSection,Object.assign({},w,{isRecipeModalEnabled:!0}))):l.createElement(a.ProductGroupCard,Object.assign({},w,S?{}:x,{cardType:a.ProductGroupCardLayout[p.cardType]}))};t.default=function(e){return l.createElement(c.b,{query:"3353766699",render:function(t){return l.createElement(f,Object.assign({},e,t))}})}},9538:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("q1tI"),o=n("IujW"),a=n.n(o).a.renderers.heading,i=function(){return{heading:function(e){var t;switch(e.level){case 1:t="display-3";break;case 2:t="display-4"}return r.cloneElement(a(e),{className:t})}}}},"9NmV":function(e,t){var n="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",r="["+n+"]",o="\\d+",a="[\\u2700-\\u27bf]",i="[a-z\\xdf-\\xf6\\xf8-\\xff]",c="[^\\ud800-\\udfff"+n+o+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="[A-Z\\xc0-\\xd6\\xd8-\\xde]",d="(?:"+i+"|"+c+")",m="(?:"+s+"|"+c+")",f="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",p="[\\ufe0e\\ufe0f]?"+f+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",l,u].join("|")+")[\\ufe0e\\ufe0f]?"+f+")*"),g="(?:"+[a,l,u].join("|")+")"+p,b=RegExp([s+"?"+i+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[r,s,"$"].join("|")+")",m+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[r,s+d,"$"].join("|")+")",s+"?"+d+"+(?:['’](?:d|ll|m|re|s|t|ve))?",s+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",o,g].join("|"),"g");e.exports=function(e){return e.match(b)||[]}},"9PsL":function(e,t,n){"use strict";n.r(t);var r=n("7tbW"),o=n.n(r),a=n("q1tI"),i=n("p+7n"),c=n("AVYR"),l=n("OQbj"),u=function(e){var t=e.shortCode,n=e.style,r="https://instagram.com/p/"+t+"/media/?size=m";return a.createElement("a",{href:"https://instagram.com/p/"+t+"/",target:"_blank",rel:"noopener noreferrer"},a.createElement("img",{src:r,alt:t,width:"100%",style:n}))},s=function(e){var t=e.id,n=e.title,r=e.shortCodes,o=e.iconUrl,s=e.profileHandle;return a.createElement(i.PageSection,{id:t,wrap:!0},a.createElement(c.a,{classNames:"d-flex flex-wrap justify-content-center align-items-center",link:"https://instagram.com/"+s+"/"},o&&a.createElement(l.a,{classNames:"pr-3",image:o,style:{maxHeight:"3em",maxWidth:"3em"}}),n&&a.createElement("h1",{className:"display-3 mx-auto text-center "},n)),r&&r.length>1&&a.createElement("div",{className:"d-flex justify-content-center flex-wrap pt-4 w-100"},r.map((function(e,t){return a.createElement("div",{className:"col-6 p-1 col-md-3 p-md-0",key:"instagram-"+t+"-"+e},a.createElement(u,{shortCode:e}))}))))};t.default=function(e){var t=e.baseModel,n=new RegExp("/p/([^/]+)/"),r=t.postLinks&&t.postLinks.length>=4&&o()(t.postLinks),i=r&&r.map((function(e){var t=n.exec(e);return t&&t[t.length-1]||""})).filter((function(e){return""!==e})),c=i&&i.length>=4?i.slice(0,4):[];return a.createElement(s,{id:t.id,profileHandle:t.profileHandle,shortCodes:c,title:t.title,iconUrl:t.icon&&t.icon.file.url})}},AVYR:function(e,t,n){"use strict";var r=n("p+7n"),o=n("q1tI");t.a=function(e){var t=e.link,n=e.classNames,a=e.style,i=e.children;return o.createElement(r.SmartLink,{className:n,href:t,style:Object.assign({},a,{textDecoration:"inherit",color:"inherit",cursor:t?"pointer":"default"})},i&&o.createElement(o.Fragment,null,i))}},AxPg:function(e,t,n){"use strict";var r;n.r(t),n.d(t,"VideoSource",(function(){return r})),n.d(t,"stringToVideoSource",(function(){return o})),n.d(t,"buildVideoUrl",(function(){return a})),function(e){e.YouTube="YouTube",e.Vimeo="Vimeo"}(r||(r={}));var o=function(e){return r[e]},a=function(e,t){switch(e){case r.YouTube:return"https://youtube.com/embed/"+t+"?rel=0";case r.Vimeo:return"https://player.vimeo.com/video/"+t+"?title=0&portrait=0&byline=0"}}},BTFV:function(e,t){},Bqjl:function(e,t){},BsSj:function(e,t){},Bw8J:function(e,t,n){"use strict";n.r(t)},"C+De":function(e,t){},CQ3q:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n("dI71"),o=n("p+7n"),a=n("TSYQ"),i=n.n(a),c=n("q1tI"),l=n("pg3q"),u=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var n=t.prototype;return n.handleClick=function(){var e=this.props.scrollTarget;e&&Object(l.b)(e)},n.render=function(){var e=this,t=this.props,n=t.url,r=t.label,a=t.scrollTarget,l=t.buttonType,u=t.className,s="";switch(l){case"Primary":s="btn-primary";break;case"Secondary":s="btn-secondary";break;case"Made":s="btn-made";break;default:s="btn-primary"}return c.createElement(c.Fragment,null,n&&c.createElement(o.SmartLink,{className:i()("btn",s,u),href:n},r),a&&c.createElement("button",{name:"button",type:"button",value:r,onClick:function(){return e.handleClick()},className:i()("btn",s,u)},r))},t}(c.PureComponent)},CaaT:function(e,t){},ChCS:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t){var n=e&&e.edges.find((function(e){return e.node.sku===t}));return n&&n.node}},"D56/":function(e,t,n){"use strict";n.r(t)},DU8A:function(e,t){},F17q:function(e,t,n){"use strict";n.r(t),n.d(t,"handleCampaignToggleDefaultState",(function(){return o})),n.d(t,"handleCampaignToggle",(function(){return a})),n.d(t,"removeCampaignCodeFromUrl",(function(){return i}));var r=n("FFKw"),o=function(e){if("undefined"!=typeof window)try{var t=new URLSearchParams(window.location.search).get(r.QueryParams.campaignCode);return!(!t||t!==e)}catch(n){console.error(n)}},a=function(e,t){if("undefined"!=typeof window)try{var n=new URL(window.location.origin),o=new URLSearchParams(window.location.search);t?(o.delete(r.QueryParams.campaignCode),o.append(r.QueryParams.campaignCode,e)):o.has(r.QueryParams.campaignCode)&&o.delete(r.QueryParams.campaignCode),o.forEach((function(e,t){n.searchParams.append(t,e)})),window.history.pushState({},"",n)}catch(a){console.error(a)}},i=function(e){if("undefined"!=typeof window)try{var t=new URL(window.location.origin),n=new URLSearchParams(window.location.search),o=n.get(r.QueryParams.campaignCode);o&&o===e&&n.delete(r.QueryParams.campaignCode),n.forEach((function(e,n){t.searchParams.append(n,e)})),window.history.pushState({},"",t)}catch(a){console.error(a)}}},FFKw:function(e,t,n){"use strict";n.r(t),n.d(t,"QueryParams",(function(){return o}));var r,o,a=n("HaE+"),i=n("7tbW"),c=n.n(i),l=n("FyPc"),u=n.n(l),s=n("noZS"),d=n.n(s),m=n("zZ0H"),f=n.n(m),p=n("TYy9"),g=n.n(p),b=n("afOK"),h=n.n(b),v=n("J2m7"),C=n.n(v),S=n("zqxM"),y=n.n(S),k=n("o0o1"),w=n.n(k),x=(n("XbcX"),n("c9m3"),n("VX4z")),P=n("p+7n"),E=n("Wbzz"),O=n("q1tI"),M=n("vOnD"),T=n("RJQD"),j=n("ZmDi"),N=n("MIz4"),I=n("TSYQ"),A=n.n(I),F=n("TJpk"),L=n.n(F),R=M.default.div.withConfig({displayName:"ratingsReviewsIo__StyledRatingsWidgetMedium",componentId:"sc-18pu5t9-0"})(["@media (max-width:1024px){display:none;}height:67px;pointer-events:none;"]),B=M.default.div.withConfig({displayName:"ratingsReviewsIo__StyledRatingsWidgetSmall",componentId:"sc-18pu5t9-1"})(["@media (min-width:1024px){display:none;}height:61px;pointer-events:none;"]),D=function(){var e=O.useState(""),t=e[0],n=e[1],r=O.useState(""),o=r[0],a=r[1];return O.useEffect((function(){var e,t;null!==(e=document.getElementById("ratings-widget-medium"))&&void 0!==e&&e.hasChildNodes()||n('\n reviewsBadgeRibbon("ratings-widget-medium", {\n store: "myfoodbag-co-nz",\n size: "medium",\n });\n '),null!==(t=document.getElementById("ratings-widget-small"))&&void 0!==t&&t.hasChildNodes()||a('\n reviewsBadgeRibbon("ratings-widget-small", {\n store: "myfoodbag-co-nz",\n size: "small",\n });\n ')}),[]),O.createElement(O.Fragment,null,O.createElement(L.a,null,O.createElement("script",null,t),O.createElement("script",null,o)),O.createElement("div",{className:"d-flex w-100 justify-content-center flex-wrap"},O.createElement(R,{id:"ratings-widget-medium"}),O.createElement(B,{id:"ratings-widget-small"})))},q=n("eZYV"),H=n("F17q"),G=n("2xBr"),V=((r={})[P.Brand.MFB]="My Choice",r[P.Brand.RMM]="My Choice",r[P.Brand.FS]="Fresh Start",r[P.Brand.BB]="Bargain Box",r);!function(e){e.campaignCode="campaignCode",e.selectedBrand="selectedBrand",e.sku="sku"}(o||(o={}));var U="17",z="33",J="34",K={17:"Veggie & Plant Based",33:"Gluten Free",34:"Gourmet"},Q={"My Choice":{blurb:"Something for everyone with 30+ delicious recipes.",skus:["K00000005","K00000008","K00000006","K00000009","K00000007","K00000010","K00000041","K00000042","K00000043"]},"Fresh Start":{blurb:"Deliciously healthy calorie-controlled meals for weight loss.",skus:["K00000020","K00000021","K00000022","K00000023","K00000024","K00000025","K00000032","K00000033","K00000034"]},"Veggie & Plant Based":{blurb:"A delicious variety of vegetarian and plant-based recipes.",skus:["K00000026","K00000027","K00000028","K00000029","K00000030","K00000031"]},"Bargain Box":{blurb:"Choose from our range of family faves and crowd pleasers.",skus:["K00000017","K00000011","K00000014","K00000018","K00000012","K00000015","K00000019","K00000013","K00000016"]},"Gluten Free":{blurb:"Gluten free recipes.",skus:["K00000049","K00000050","K00000051","K00000052","K00000053","K00000054"]},Gourmet:{blurb:"Gourmet dishes.",skus:["M00000019","M00000157"]}},W=Object(M.default)(x.BagSelector).withConfig({displayName:"ContentfulBagSelector__StyledBagSelector",componentId:"sc-1igsgxv-0"})(["&&{[role='toolbar']{&.btn-toolbar{@media ","{margin-right:3em;}}}}"],P.LegoBaseTheme.layout.deviceMediaQueries.min.lg),_=M.default.div.withConfig({displayName:"ContentfulBagSelector__RatingsWrapper",componentId:"sc-1igsgxv-1"})(["margin-top:48px;@media ","{margin-top:32px;}"],(function(e){return e.theme.layout.deviceMediaQueries.max.md}));t.default=function(e){var t,n,r,o,i,l,s=e.baseModel,m=e.pageSettings,p=void 0===m?{}:m,b=Object(q.c)().sortByArray,v=s,S=Object(G.getSelectedSku)(),k=Object(G.getSelectedBrand)(),M={},I=v.bagSelectorVariant!==x.BagSelectorLayoutVariant.default,F=O.useState(),L=F[0],R=F[1];v.abTestId&&(M["data-ab-test-id"]=v.abTestId),v.isHidden&&(M.role="presentation");var B=O.useState({recipeCollections:[],showDateSelector:null!==(t=v.carouselWeekSelector)&&void 0!==t&&t,disableDetails:null!==(n=v.carouselDisableRecipeDetail)&&void 0!==n&&n,carouselItemVariant:null!==(r=h()(v.carouselItemStyle))&&void 0!==r?r:P.RecipeCarouselItemVariants.Default,showEmptySrcImages:!1}),Y=B[0],Z=B[1],X=Object(x.useDiscountContext)(),$=X.discount,ee=X.isLoading,te=Object(q.a)().trackDataLayerEvent,ne=O.useState(),re=ne[0],oe=ne[1],ae=O.useState([]),ie=ae[0],ce=ae[1],le=Object(E.e)("3680153258"),ue=le.allProductDb,se=le.site,de=le.allPreferences,me=v.brand,fe="e88abcd7-6ca8-4334-90a0-2b27658629a8",pe=O.useState("default"===me?se.siteMetadata.brand:me),ge=pe[0],be=pe[1],he=((o={})[P.Brand.BB]="BARGAIN",o[P.Brand.FS]="FRESH",o[P.Brand.MFB]="MFB",o[P.Brand.RMM]="MFB",o),ve=de.edges.flatMap((function(e){return e.node})),Ce=ve.map((function(e){var t;return{brand:e.brand,sortOrder:e.sortOrder,preferenceId:null!==(t=e.preferenceId)&&void 0!==t?t:0,displayName:e.displayName,description:e.description,preferenceName:e.preferenceName,iconSvg:e.iconSvg,state:P.StateType.default,brandHero:e.brandHero,pillBadge:e.preferenceId===Number(J)?"Premium option":void 0}})),Se=ve.filter((function(e){return e.brand===he[ge]})),ye=ue.edges.flatMap((function(e){return e.node})).map((function(e){return Object(j.getProductModel)({__typename:v.__typename,description:"",sku:e.sku,dinners:e.numberOfNights,people:e.numberOfPeopleToFeed,id:e.id,hideServingPrice:!1,isSoldOut:!1},ue,se.siteMetadata.gatewayUrl)})).filter((function(e){return Boolean(e)})),ke=d()(Q,(function(e){return v.disabledSkus?e.skus.filter((function(e){return!v.disabledSkus.includes(e)})):e.skus})),we=(new x.ProductsMappingService).groupProductModelCollectionByItemNumber(ye,ke),xe=new x.BagSelectorStateService(we),Pe=p.preselectedPeople,Ee=we.filter((function(e){return e.productGroupName===V[ge]})).flatMap((function(e){return e.products})).find((function(e){return e.itemNumber===S})),Oe=we.filter((function(e){return e.productGroupName===V[ge]})).flatMap((function(e){return e.products})).filter((function(e){return e.serves===Pe})),Me=null!==(i=null==Ee?void 0:Ee.sku)&&void 0!==i?i:null===(l=u()(Oe,(function(e){return e.night})))||void 0===l?void 0:l.sku,Te=O.useState({title:"Select your plan",skuSelectorService:xe,productsLabel:"Tell us what you like.",nightsLabel:I?"Meals per week":"How many nights?",servingsLabel:I?"Number of people":"Number of people?",skuOverride:Me,hideDisabled:{nights:v.hideDisabledStateForNights,servings:v.hideDisabledStateForServings}}),je=Te[0],Ne=Te[1];O.useEffect((function(){k&&be(k)}),[k]),O.useEffect((function(){Ne(Object.assign({},je,{productOverride:L||V[ge]}))}),[L,ge]);var Ie=O.useState(),Ae=Ie[0],Fe=Ie[1],Le=O.useCallback((function(e){var t,n=ye.find((function(t){return t.itemNumber===e})),r=C()(Q,(function(e){return e.skus.findIndex((function(e){return e===(null==n?void 0:n.itemNumber)}))>=0})),o=null!==(t=null==n?void 0:n.recipeCollections)&&void 0!==t?t:[],a=g()(o.map((function(e){return e.collections})));return{product:n,productMetadata:r,recipeCollections:a}}),[]),Re=O.useCallback((function(e){var t,n,r=Le(null==e?void 0:e.itemNumber),o=r.product,a=r.productMetadata,i=r.recipeCollections;if(I&&!L||(Z(Object.assign({},Y,{recipeCollections:i})),Ne(Object.assign({},je,{productsLabel:v.productBlurb||(null==a?void 0:a.blurb)}))),o){var c=Object(x.calculateDiscount)($,o),l=c.price,u=c.serving,s=null!==(t=o.productType)&&void 0!==t?t:x.ProductType.Primary,d=l.original!==l.discounted,m=Boolean(u&&s===x.ProductType.Primary),f=o.deliveryPrice,p=f>0,g=(parseFloat(l.discounted)+f).toFixed(2),b={showPricePerPlateDiscount:d,showPricePerWeekDiscount:d,pricePerWeek:"$"+l.discounted,pricePerWeekBeforeDiscount:"$"+l.original,pricePerPlate:m?"$"+(null==u?void 0:u.discounted):void 0,pricePerPlateBeforeDiscount:m?"$"+(null==u?void 0:u.original):void 0,deliveryPrice:p?"$"+f.toFixed(2):void 0,totalPrice:p?"$"+g:void 0,primaryButtonText:null!==(n=v.productPurchaseCtaText)&&void 0!==n?n:"Continue",pricePerPlateStringFormat:"Per Plate",pricePerWeekStringFormat:"Per Week"};Fe(b),oe(e)}}),[v,$,ee,Le,ge,L,je.productOverride]),Be=function(e){var t=ye.find((function(t){return t.sku===e})),n=Boolean(t&&t.productType===x.ProductType.Primary),r=se.siteMetadata.accountUrl+"/manage/subscriptions/extras/addbysku/"+e,o=Se.filter((function(e){return ie.find((function(t){return t&&e&&t===""+e.preferenceId}))})).filter(f.a),a=new URLSearchParams,i=De();if(i&&a.set("campaignCode",i),I){var c=o.filter((function(e){return""+e.preferenceId!==J}));a.set("prefs",c.map((function(e){return e.preferenceId})).join(",")),a.set("ss","1")}te("add_to_cart",{campaign_code:i,subscription_people:null==t?void 0:t.people.toString(),subscription_nights:null==t?void 0:t.dinners.toString(),selected_brand:ge,bag_sku:e,preferences:o.map((function(e){return null==e?void 0:e.displayName})).join("|")});var l=a.toString();return Object(N.getProductSelectEventPath)(r,n,t,l)},De=function(){var e=window.location.search;return new URLSearchParams(e).get("campaignCode")},qe=function(){var e=Object(a.a)(w.a.mark((function e(){var t;return w.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:re&&(t=v.useV4OrderForm?"/signup/personal-details?sku="+re.sku:Be(re.sku),window.open(t,"_self"));case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),He=O.useCallback((function(e){var t,n,r=Se.filter((function(t){return e.includes(""+t.preferenceId)})),o=(null===(t=r[0])||void 0===t?void 0:t.brandHero)||(null===(n=Se[0])||void 0===n?void 0:n.brandHero)||(null==re?void 0:re.itemNumber),a=r.flatMap((function(e){return e.filters})).flatMap((function(e){return null==e?void 0:e.recipes})).flatMap((function(e){return null==e?void 0:e.items})).map((function(e){var t;return null!==(t=null==e?void 0:e.itemNumber)&&void 0!==t?t:""})).filter(f.a);return{heroSku:o,recipeNumbers:c()(a)}}),[null==re?void 0:re.itemNumber]);O.useEffect((function(){if(I&&!L){var e=He(ie),t=e.heroSku,n=e.recipeNumbers,r=Le(t).recipeCollections.map((function(e){return Object.assign({},e,{recipes:b(e.recipes,n,(function(e){return e.rnumber}))})}));Z(Object.assign({},Y,{recipeCollections:r}))}}),[ie,He,I]);var Ge={title:I?v.title:"Let's get cooking!",blurb:function(){var e;if("MFB"===P.Brand.MFB&&I)return null===(e=Object.entries(Q).map((function(e){return{groupName:e[0],data:e[1]}})).find((function(e){return e.groupName===V[ge]})))||void 0===e?void 0:e.data.blurb}(),recipeCarouselContext:Y,productPriceDisplayContext:Ae,variant:v.bagSelectorVariant,primaryCtaLabel:{desktop:"Continue this plan",mobile:"Continue"},reviews:O.createElement(_,null,O.createElement(D,null)),preferenceSelectorContext:{selectedBrand:he[ge],title:"Choose your preference",preferenceSelections:Ce,onClick:function(e){void 0===e&&(e=[]);var t=e.map((function(e){return e.toString()})),n=y()(t,ie)[0],r=y()(ie,t)[0];if(n||r){var o=n?"selected":"unselected",a="selected"===o?n:r,i=Ce.find((function(e){return e.preferenceId===Number(a)})),c=Ce.filter((function(e){return t.find((function(t){return t===""+e.preferenceId}))})).filter((function(e){return e&&e.brand===he[ge]})).filter(f.a);te("preferences_"+o,{preferences:c.map((function(e){return null==e?void 0:e.displayName})).join("|"),preference_modified:null==i?void 0:i.displayName}),"singleSelectHardPreference"===v.bagSelectorVariant?(R("Veggie & Plant Based"),t.includes(U)?R(K[U]):t.includes(z)?R(K[z]):t.includes(J)?R(K[J]):R(void 0)):R(void 0),ce(t)}},useQueryParams:!0,isSingleSelect:v.bagSelectorVariant===x.BagSelectorLayoutVariant.singleSelectHardPreference||v.bagSelectorVariant===x.BagSelectorLayoutVariant.singleSelectPreference},recipeSurchargeNotice:"Please note that certain recipes featured may be subject to a surcharge. Pricing information will be clearly displayed in your account area when selecting recipes.",mealPreferenceSelectorLayoutOptions:{isPrimaryCtaOffset:!0},skuSelectorContext:je,skuSelectorOnResult:Re,campaignToggle:"FS"===ge?{ribbonText:"GET RESULTS FASTER",header:"Join The 8-week Reset",description:"Get 50% off your 8th bag",termsAndConditions:"T&C's apply",onChange:function(e){return Object(H.handleCampaignToggle)(fe,e)},defaultChecked:Object(H.handleCampaignToggleDefaultState)(fe)}:void 0,productPricePrimaryOnClickAsync:qe};return O.createElement("div",Object.assign({className:A()("container-fluid",v.isHidden?"d-none":"d-flex","justify-content-center p-0")},M,{style:{backgroundColor:I?"transparent":Object(T.getColor)(v.backgroundColor)}}),O.createElement("div",{style:{width:"100%",maxWidth:"1370px"}},O.createElement(P.BrandSelector,{visible:"default"!==me&&v.bagSelectorVariant!==x.BagSelectorLayoutVariant.default,selectedBrand:ge,onClickCallback:function(e){e!==P.Brand.FS&&De()===fe&&Object(H.removeCampaignCodeFromUrl)(fe),be(e)}},O.createElement(W,Object.assign({},Ge,{className:"px-4 my-0 my-md-3"})))))}},FKh5:function(e,t){},Fn46:function(e,t,n){"use strict";n.r(t);var r=n("q1tI");t.default=function(){return r.createElement("div",{className:"w-100"})}},FyPc:function(e,t,n){var r=n("dunj"),o=n("V9xz"),a=n("ut/Y");e.exports=function(e,t){return e&&e.length?r(e,a(t,2),o):void 0}},G4GL:function(e,t,n){"use strict";n.r(t)},GCAQ:function(e,t,n){"use strict";n.r(t)},GN6j:function(e,t){},GZDz:function(e,t,n){"use strict";n.r(t)},GoNP:function(e,t){},"H+ae":function(e,t,n){"use strict";n.r(t)},HEOd:function(e,t){},IDh5:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("2Kix"),a=n("OQbj"),i=n("E8HI");t.default=function(e){var t=e.baseModel,n=t?{small:Object(i.getImageModel)(t.small),medium:Object(i.getImageModel)(t.medium),large:Object(i.getImageModel)(t.large)}:o.c;return r.createElement(a.a,{imageSet:n,alt:t.alternateText})}},Jl6Y:function(e,t){},Jz4a:function(e,t,n){"use strict";n.r(t)},KR7t:function(e,t){},Kecl:function(e,t){},Kf58:function(e,t,n){"use strict";n.r(t)},KtLF:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("p+7n"),a=n("A3CJ"),i=n("CQ3q"),c=n("TSYQ"),l=n.n(c),u=function(e){var t=e.classNames,n=e.style,o=e.children,a=e.width,i=Object.assign({boxShadow:"0 5px 0 #d5d0c9"},n),c=l()(t,"card mx-md-2 mb-4 rounded-0 border-0");if(!o)return null;var u=r.createElement(r.Fragment,null,o);return r.createElement(r.Fragment,null,r.createElement("div",{className:l()("d-md-block d-none",c),style:Object.assign({width:a||"20em"},i)},u),r.createElement("div",{className:l()("d-block d-md-none w-100",c),style:i},u))},s=function(e){var t=e.id,n=e.title,c=e.description,l=e.button,s=e.image;return r.createElement(u,null,r.createElement("div",{className:"d-md-flex h-100 flex-column"},s&&r.createElement(o.ResponsiveSquare,{id:t,paddingSizes:{small:"60%"}},r.createElement(a,{src:s.src,alt:s.alt,loader:r.createElement(o.Placeholder,{outerWidth:360,id:"placeholder-image-"+t}),className:"h-100 w-100",style:o.imageFillStyle})),r.createElement("div",{className:"d-flex flex-column justify-content-md-between p-3 pb-2 w-100 h-100"},r.createElement("div",{className:"d-flex flex-column align-items-center justify-content-start text-center w-100"},r.createElement("h4",null,n),r.createElement("p",{className:"w-75 mb-0 mb-lg-3"},c)),r.createElement("div",{className:"text-center w-100 mt-2"},l&&r.createElement(i.a,Object.assign({},l,{className:"btn-block"}))))))},d=n("wlLi");t.default=function(e){var t=e.baseModel,n={id:t.id,title:t.title,button:t.callToAction&&Object(d.mapActionButton)(t.callToAction),description:t.description,image:{src:t.image.file.url,alt:t.image.description,id:t.image.id,caption:t.image.description}};return r.createElement(s,n)}},LAUS:function(e,t){},LCEI:function(e,t){},LbEA:function(e,t,n){"use strict";n.r(t),n.d(t,"PureContentfulProductCartSection",(function(){return R}));var r=n("Wbzz"),o=n("q1tI"),a=n("HaE+"),i=n("dI71"),c=n("o0o1"),l=n.n(c),u=n("VX4z"),s=n("bTjV"),d=n("4wU3"),m=n("kHIg");function f(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 p(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 p(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 p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=200&&(d=l,m=!1,t=new r(t));e:for(;++s({TICK}|{CROSS}|{GIFT}))(?(?:{BOLD})?)(?[a-zA-Z0-9-/].+)");t.default=function(e){var t,n,r,c=e.baseModel,l={id:c.id,ribbonText:c.ribbonText,header:c.title,subheader:c.description,price:c.price,pricePrefix:c.pricePrefix,pricePostfix:c.pricePostfix,valuePropositions:(t=c.valuePropositions,n=function(e){return{"{TICK}":o.a.createElement(a.SvgSubscriptionPlanTick,null),"{CROSS}":o.a.createElement(a.SvgSubscriptionPlanCross,null),"{GIFT}":o.a.createElement(a.SvgSubscriptionPlanGift,null)}[e]},r=[],t.map((function(e){var t=i.exec(e);if(t&&t.groups){var o=t.groups,a=o.icon,c=o.transform,l=o.proposition;try{r.push({prefixIcon:n(a),proposition:l,isBold:!!c})}catch(u){console.error("Invalid value proposition for "+e+" "+u.message)}}})),r),action:{label:c.actionButton.label||"",onAction:function(){var e,t,n;e=c.actionButton.link.relativePath,t=window.location.href,n=new URL(t).searchParams.toString(),e&&""!==n?window.location.href=e+"&"+n:e&&(window.location.href=e)}},sortOrder:c.sortOrder,sortOrderMobile:c.sortOrderMobile};return o.a.createElement(a.SubscriptionPlanCard,{subscription:l,header:o.a.createElement(a.SubscriptionPlanCard.Header,null),info:o.a.createElement(a.SubscriptionPlanCard.Info,null,o.a.createElement(a.SubscriptionPlanCard.Price,null),o.a.createElement(a.SubscriptionPlanCard.ValuePropositions,null)),action:o.a.createElement(a.SubscriptionPlanCard.Action,null),variant:c.isHero?"hero":"default"})}},T33S:function(e,t,n){"use strict";n.r(t),t.default=[{name:"ContentfulJumbotron",path:"./jumbotron/ContentfulJumbotron"},{name:"ContentfulSimpleJumbotron",path:"./jumbotron/ContentfulSimpleJumbotron"},{name:"ContentfulPageSection",path:"./pageSection/ContentfulPageSection"},{name:"ContentfulFaqCard",path:"./faqCard/ContentfulFaqCard"},{name:"ContentfulHeroCard",path:"./heroCard/ContentfulHeroCard"},{name:"ContentfulRenderRawHtml",path:"./calorieCalculatorRender/ContentfulRawHtmlRender"},{name:"ContentfulMerchandising",path:"./merchandising/ContentfulMerchandising"},{name:"ContentfulLineBreak",path:"./lineBreak/ContentfulLineBreak"},{name:"ContentfulResponsiveImageSet",path:"./responsiveImageSet/ContentfulResponsiveImageSet"},{name:"ContentfulInstagramSection",path:"./instagramSection/ContentfulInstagramSection"},{name:"ContentfulProductGroup",path:"./productGroup/ContentfulProductGroup"},{name:"ContentfulProductGroupHero",path:"./productGroupHero/ContentfulProductGroupHero"},{name:"ContentfulSimpleHeader",path:"./simpleHeader/ContentfulSimpleHeader"},{name:"ContentfulTermsAndConditionsSection",path:"./termsAndConditionsSection/ContentfulTermsAndConditionsSection"},{name:"ContentfulBulletPointCard",path:"./bulletPointCard/ContentfulBulletPointCard"},{name:"ContentfulProduct",path:"./product/ContentfulProduct"},{name:"ContentfulTwoColumnSection",path:"./twoColumnSection/ContentfulTwoColumnSection"},{name:"ContentfulVideoTwoColumnSection",path:"./twoColumnSection/ContentfulVideoTwoColumnSection"},{name:"ContentfulRecipeCarousel",path:"./recipeCarousel/ContentfulRecipeCarousel"},{name:"ContentfulMealSelector",path:"./mealSelector/ContentfulMealSelector"},{name:"ContentfulCallToActionCard",path:"./callToActionCard/ContentfulCallToActionCard"},{name:"ContentfulProductCartSection",path:"./productCartSection/ContentfulProductCartSection"},{name:"ContentfulMarkdown",path:"./markdown/ContentfulMarkdown"},{name:"ContentfulVideoEmbed",path:"./videoEmbed/ContentfulVideoEmbed"},{name:"ContentfulMerchSlot",path:"./merchSlot/ContentfulMerchSlot"},{name:"ContentfulDoubleMerchSlot",path:"./doubleMerchSlot/ContentfulDoubleMerchSlot"},{name:"ContentfulBagSelector",path:"./bagSelector/ContentfulBagSelector"},{name:"ContentfulSubscriptionPlan",path:"./subscriptionPlan/ContentfulSubscriptionPlan"}]},T71h:function(e,t,n){"use strict";n.r(t)},TKrE:function(e,t,n){var r=n("qRkn"),o=n("dt0z"),a=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");e.exports=function(e){return(e=o(e))&&e.replace(a,r).replace(i,"")}},TpFE:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n.n(r);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,i),c=Object(r.useRef)(null),l=Object(r.useRef)(!0);return Object(r.useEffect)((function(){if(!t||!c.current)throw new Error("html prop cant't be null");if(l.current){l.current=!1;var e=document.createRange().createContextualFragment(t);c.current.innerHTML="",c.current.appendChild(e)}}),[t,c]),o.a.createElement("div",a({},n,{ref:c}))},l=n("vOnD"),u=Object(l.default)(c).withConfig({displayName:"ContentfulRawHtmlRender__RenderHtml",componentId:"sc-1x2uey4-0"})(["width:100%;"]);t.default=function(e){var t,n,o=e.baseModel;return r.createElement(u,{html:null!==(t=null===(n=o.html)||void 0===n?void 0:n.html)&&void 0!==t?t:"
"})}},U2oN:function(e,t){},UGk3:function(e,t){},UOL7:function(e,t,n){"use strict";n.r(t);var r=n("p+7n"),o=n("q1tI"),a=n("wlLi"),i=n("RJQD");t.default=function(e){var t=e.baseModel,n=t.backgroundImage&&{small:t.backgroundImage.small&&t.backgroundImage.small.file.url,medium:t.backgroundImage.medium&&t.backgroundImage.medium.file.url,large:t.backgroundImage.large&&t.backgroundImage.large.file.url},c=t.actionButton&&Object(a.mapActionButton)(t.actionButton);return o.createElement(r.Jumbotron,{id:t.id,title:t.title,logo:t.logo&&t.logo.file.url,description:t.childContentfulJumbotronSubtitleTextNode&&t.childContentfulJumbotronSubtitleTextNode.subtitle,img:n,button:c,minHeight:t.minHeight,backgroundColor:Object(i.getColor)(t.backgroundColor),textColor:Object(i.getColor)(t.textColor),alignment:Object(r.mapAlignment)(t.alignment),splitOnMobile:t.useAlternateMobileLayout})}},Uskz:function(e,t){},V8Yo:function(e,t,n){"use strict";n.r(t);var r=n("TYy9"),o=n.n(r),a=n("VX4z"),i=n("p+7n"),c=n("Wbzz"),l=n("q1tI"),u=n("ChCS"),s=n("wlLi"),d=n("RJQD");t.default=function(e){var t=e.baseModel;return l.createElement(c.b,{query:"3593756770",render:function(e){var n,r=Object(u.a)(e.allProductDb,t.sku),c=r&&r.recipeCollections&&r.recipeCollections.length>0&&r.recipeCollections[0].productName||"",m=r&&r.recipeCollections&&r.recipeCollections.length>0&&r.recipeCollections;if((null==r?void 0:r.brand)===i.Brand.RMM){var f,p=m&&m.map((function(e,t){if(0!==t)return e.collections[0]})).filter((function(e){return void 0!==e}));return l.createElement(l.Fragment,null,l.createElement("div",{className:"w-100 mx-auto",style:{maxWidth:"1600px"}},l.createElement("h1",{className:"display-3 w-100 mx-auto text-center"},"What we're serving up"),l.createElement("div",{className:"w-100 d-flex flex-column align-items-center justify-content-center p-5 pl-2"},p&&p.length>0&&l.createElement(a.RecipeWeeks,{key:r.id,id:r.id,title:r.name,showWeekSelector:!1,recipeCollections:p,isRecipeModalEnabled:!0,selectedDate:p&&(null===(f=p[0])||void 0===f?void 0:f.date.toString())}))))}var g=function(){var e,t;if(m&&0!==m.length){var n=m[1];if(null===(e=n.collections)||void 0===e?void 0:e.map((function(e){return e.recipes.length>0})).some((function(e){return e})))return n.collections.map((function(e){return e.recipes=e.recipes.filter((function(e){return 0===e.surcharge})),e}));var r=m.find((function(e){return e.collections.find((function(e){return e.recipes.length>0}))}));return null==r||null===(t=r.collections)||void 0===t?void 0:t.map((function(e){return e.recipes=e.recipes.filter((function(e){return 0===e.surcharge})),e}))}}();return console.log(g),g&&g.length>0&&l.createElement(a.RecipeWeeks,{id:t.id,title:t.autoGenerateTitle?c:t.titleOverride,backgroundColor:Object(d.getColor)(t.backgroundColor),recipeCollections:o()(g),button:t.button&&Object(s.mapActionButton)(t.button),showWeekSelector:!t.hideWeekSelector,isRecipeModalEnabled:!0,selectedDate:g&&(null===(n=g[0])||void 0===n?void 0:n.date.toString())})}})}},V9xz:function(e,t){e.exports=function(e,t){return e>t}},VUwh:function(e,t){},Vjiz:function(e,t,n){"use strict";n.r(t),n.d(t,"getProductGroupModel",(function(){return u}));var r=n("afOK"),o=n.n(r),a=n("VX4z"),i=n("p+7n"),c=n("E8HI"),l=n("RJQD"),u=function(e,t){var n={text:e.tabText,color:Object(l.getColor)(e.tabColor)},r=e.images&&e.images.map(c.getImageModel).filter(i.isNotNullOrUndefined)||[],u=e.recipeImages&&e.recipeImages.map(c.getImageModel).filter(i.isNotNullOrUndefined)||[],s=e.additionalPaths?e.additionalPaths.map((function(e){return e.relativePath||""})).filter((function(e){return""!==e})):[],d=o()(t),m=d&&d.availableFrequency,f=d&&d.productType===a.ProductType.Primary,p=m===a.AvailableFrequency.OneOff,g=1===t.length&&f&&p;return{id:e.id,title:e.title,subtitle:e.subtitle,tag:n,images:r,products:t,defaultPath:e.relativePath.relativePath||"",additionalPaths:s,overcomingHesitation:e.overcomingHesitation,recipeImages:u,showSelector:!g,isCollapseDisabled:e.isCollapseDisabled,isSoldOut:e.isSoldOut,disclaimer:e.disclaimer,shouldHideSeeMenuLink:e.shouldHideSeeMenuLink}}},WPtl:function(e,t,n){"use strict";n.r(t)},Wa6b:function(e,t){},X21I:function(e,t){},XKfS:function(e,t){},Yfyt:function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Medium="768px",e.Large="992px"}(r||(r={}))},ZVYO:function(e,t){},ZlMb:function(e,t,n){"use strict";n.r(t)},ZmDi:function(e,t,n){"use strict";n.r(t),n.d(t,"getProductModel",(function(){return p}));var r=n("44Ds"),o=n.n(r),a=n("VX4z"),i=n("p+7n"),c=n("O2s4"),l=n("ChCS"),u=n("Bjc/"),s=n("WLZk"),d=n("E8HI"),m=n("RJQD"),f=n("dvv6"),p=(o()((function(e){return e.map((function(e){var t=Object(s.a)(),n=Object(u.a)(e.collections).filter((function(e){return e!==t})),r=e.collections.filter((function(e){return n.includes(e.day)}));return Object.assign({},e,{collections:r})}))})),function(e,t,n){var r=e.id,o=e.sku,u=e.dinners,s=e.people,p=e.description,g=e.productOverview,b=e.tabText,h=e.tabColor,v=e.image,C=e.productPageLink,S=e.isSkipRecipeSelection,y=e.variant,k=Object(l.a)(t,o);if(void 0!==k){var w=k.price,x=k.recipeCollections,P=k.deliveryPrice,E=k.quantityPerLine,O=k.brand,M=k.productType,T=k.availableFrequency,j=k.recipeSelectionMode,N=k.name,I=k.itemNumber,A=new URLSearchParams,F=g&&{title:g.title,image:Object(d.getImageModel)(g.image),pointsAsMarkdown:g.pointsAsMarkdown.pointsAsMarkdown},L=null==x?void 0:x.slice(1),R=u,B=s,D=M===c.a.Extra||M===c.a.OneOff||M===c.a.Donation;if(O===i.Brand.RMM)R=E,B=1;else if(!(u>0&&s>0||D))return;return S&&A.set("ss","1"),{id:r,people:B,dinners:R,description:p,sku:o,itemNumber:I,price:w,recipeCollections:L,cardTag:{text:b,color:Object(m.getColor)(h)},deliveryPrice:P,productOverview:F,cartLink:Object(f.getContentfulLink)(C),orderLink:(n||"")+"/order/"+o+"?"+A.toString(),image:Object(d.getImageModel)(v),brand:O,productType:D?a.ProductType.Extra:a.ProductType.Primary,showServingPrice:!e.hideServingPrice,availableFrequency:T,recipeSelectionMode:j,isSoldOut:e.isSoldOut,name:N,variant:y}}})},a8bL:function(e,t){},asDA:function(e,t){e.exports=function(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o0})),n=function(){return e.sectionNumber+=1,e.sectionNumber};return r.createElement("article",{className:i()("container pt-4 px-5")},t.map((function(e,t){return r.createElement(f,{key:e.id+"-"+t,id:e.id,title:e.title,subsections:e.subsections,onSectionNumberAssignment:n})})))},t}(r.Component);t.default=function(e){var t=e.baseModel,n=t.terms.map((function(e){return{subsections:e.subsections.map((function(e){return{id:e.id,title:e.title,text:e.childContentfulTermsSubsectionTextTextNode&&e.childContentfulTermsSubsectionTextTextNode.text||""}})),title:e.title,id:e.id}}));return r.createElement(p,{id:t.id,title:t.title,sections:n})}},qRkn:function(e,t,n){var r=n("3cYt")({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"});e.exports=r},"rEa+":function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("p+7n"),a=n("OQbj"),i=function(){return r.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},r.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),r.createElement("path",{fill:"white",d:"M10 16.5l6-4.5-6-4.5v9zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"}))},c=function(e){var t=e.img,n=e.tag,c=e.title,l=e.subtitle,u=e.backgroundColor,s=e.mediaLink;return r.createElement("div",{className:"row w-100",style:{backgroundColor:u}},r.createElement("div",{className:"col-12 col-lg-6 text-white px-0"},r.createElement(o.CardTag,Object.assign({className:"mx-5 p-1 rounded-bottom"},n)),r.createElement("div",{className:"m-5 my-lg-0 row pt-4"},r.createElement("div",{className:"col-md-10 px-0"},r.createElement("h1",{className:"display-3 px-0 mb-4"},c),r.createElement("p",{className:"px-0 mb-2"},l),s&&s.url&&r.createElement("a",{rel:"noopener noreferrer",href:s.url,target:"_blank",className:"d-flex align-items-center text-uppercase text-white"},r.createElement("small",{className:"mr-1"},r.createElement(o.Bold,null,s.label)," "),r.createElement(i,null))))),r.createElement("div",{className:"col-12 col-lg-6 px-0"},r.createElement(a.a,{alt:c,image:t})))},l=n("AVYR"),u=function(e){var t=e.id,n=e.img,a=e.title,i=e.subtitle,c=e.backgroundColor,u=e.mediaLink,s=u&&u.url;return r.createElement("div",{className:"col-12 col-md-4 px-0 py-2 text-white p-md-2"},r.createElement(l.a,{link:s,style:{backgroundColor:c}},r.createElement(o.ResponsiveSquare,{id:t},r.createElement(o.ResponsiveBackground,{className:"justify-content-end align-items-center w-100 h-100 p-2",id:t,image:n,backgroundStyle:{gradient:"linear-gradient(to top, rgba(33,33,33,0.6) 0%, rgba(0,0,0,0) 75%)"}},r.createElement(r.Fragment,null,r.createElement("h1",{className:"h4 pb-2 p-lg-4 text-center"},i),r.createElement(o.ResponsiveTitle,{id:t,text:a,className:"text-center display-1 pb-0 pb-md-2",fontSizes:{small:"4rem",large:"5.5rem"}}))))))},s=n("wlLi"),d=n("RJQD"),m="Full-Width Video",f="Square";t.default=function(e){var t=e.baseModel,n=t.mediaLink&&Object(s.mapActionButton)(t.mediaLink),o={text:t.tabText,color:Object(d.getColor)(t.tabColor)},a={id:t.id,title:t.title,tag:o,subtitle:t.subtitle,img:t.image.file.url,backgroundColor:t.backgroundColor.colorHex,mediaLink:t.mediaLink&&n};switch(t.cardType){case m:return r.createElement(c,a);case f:return r.createElement(u,a);default:return null}}},"s+QH":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));var r=n("dI71"),o=n("Wbzz"),a=n("q1tI"),i=n("HaE+"),c=n("o0o1"),l=n.n(c),u=n("VX4z"),s=n("p+7n"),d=n("bTjV"),m=n("O2s4"),f=n("4wU3"),p=n("APsI"),g=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={recipes:[],isLoading:!0,deliveryDateDescription:void 0,productName:void 0},n}Object(r.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=Object(i.a)(l.a.mark((function e(){var t;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,new f.e("").upcomingSelectionRecipes(this.props.sku);case 3:t=e.sent,e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.log("Failed to load recipe information. "+e.t0.message);case 9:return e.prev=9,t&&t.recipes&&t.recipes.length>0?this.setState({recipes:t.recipes,isLoading:!1,deliveryDateDescription:t.deliveryDateDescription,productName:t.productName}):this.setState({recipes:[],isLoading:!1},(function(){Object(o.d)("/error",{replace:!0})})),e.finish(9);case 12:case"end":return e.stop()}}),e,this,[[0,6,9,12]])})));return function(){return e.apply(this,arguments)}}(),n.handleMealsSelected=function(){var e=Object(i.a)(l.a.mark((function e(t){var n,r=this;return l.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.setState({isLoading:!0}),e.prev=1,e.next=4,new f.a("").createCart({lines:[{sku:this.props.sku,quantity:1,selectedRecipes:Object.keys(t).map((function(e){var n=r.state.recipes.find((function(t){return t.recipeGroupRecipeId===e}));if(n)return{recipeCategoryId:n.recipeCategoryId,quantity:t[e],recipeNumber:n.recipeNumber,recipeVersion:n.recipeVersion,recipePartition:n.recipePartition}})).filter(s.isNotNullOrUndefined)}]});case 4:n=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.log("Failed to create cart. "+e.t0.message);case 10:return e.prev=10,n&&n.id?window.location.assign(this.props.orderLink+"?cart="+n.id):Object(o.d)("/error",{replace:!0}),e.finish(10);case 13:case"end":return e.stop()}}),e,this,[[1,7,10,13]])})));return function(t){return e.apply(this,arguments)}}(),n.handleCancel=function(){window.history.back()},n.render=function(){var e=this,t=this.state,n=t.recipes,r=t.isLoading,o=t.deliveryDateDescription,c=t.productName;if(r)return a.createElement("div",{className:"d-flex align-items-center justify-content-center",style:{height:"60vh"}},a.createElement(d.a,{style:{width:"3rem",height:"3rem"},color:"primary"}));if(0===n.length)return null;var s,f,g,b=this.props.recipeSelectionMode===m.b.Single,h=n.map((function(e){return{id:e.recipeGroupRecipeId,description:e.name||"",tags:e.recipeTagNames,badges:e.recipeBadgeNames,maxQuantity:b?1:void 0,image:{id:"img-"+e.recipeGroupRecipeId,src:e.imageUrl||"",alt:e.name||""},recipeModalModel:b?void 0:e,onOpenModal:(t=Object(i.a)(l.a.mark((function t(n){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==e.recipeId){t.next=4;break}throw new Error("onOpenModal received a recipe without a recipeId. Is this on purpose?");case 4:return t.t0=n,t.next=7,Object(p.b)(e.recipeNumber,e.recipeVersion,e.recipePartition,e.recipeId);case 7:t.t1=t.sent,t.t0.setModel.call(t.t0,t.t1);case 9:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})};var t}));if(o){var v=o.split(" ",3);s="For "+(g=v.join(" "))+" delivery",f=v[0].substring(0,3)+" "+v[1]+" "+v[2].substring(0,3)}return a.createElement(u.CartSection,{items:h,title:"Select your meals",subtitle:s,cartSubtitle:f,desktopSummaryMaxHeight:"calc(100vh - 450px)",responsiveCardsPerRow:{small:2,medium:3,large:3,extraLarge:3},disableModal:!0,cartTitle:{desktop:"Your meals",mobile:"Select meals"},selectionLimit:this.props.amountToPick,deliveryDate:g,productName:c,onSubmit:function(){var t=Object(i.a)(l.a.mark((function t(n){return l.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.handleMealsSelected(n));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),onCancel:function(){return e.handleCancel()}})},t}(a.Component),b=n("dvv6"),h=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var n=t.prototype;return n.validNavProps=function(e){return!!(e&&e.amountToPick&&e.orderLink&&e.sku)},n.componentDidMount=function(){if(!this.validNavProps(this.props.navProps)){var e=this.props.baseModel,t=Object(b.getContentfulLink)(e.returnUrl)||"/";Object(o.d)(t,{replace:!0})}},n.render=function(){var e=this.props.navProps;if(!e)return null;var t=e.sku,n=e.amountToPick,r=e.orderLink,o=e.recipeSelectionMode;return t&&n&&r&&a.createElement(g,{sku:t,amountToPick:n,orderLink:r,recipeSelectionMode:o})||null},t}(a.PureComponent)},sgoq:function(e,t,n){var r=n("asDA"),o=n("TKrE"),a=n("6nK8"),i=RegExp("['’]","g");e.exports=function(e){return function(t){return r(a(o(t).replace(i,"")),e,"")}}},tA2Z:function(e,t){},tAQo:function(e,t){},tfZ7:function(e,t,n){"use strict";n.r(t),n.d(t,"mapHeroCardType",(function(){return l}));var r=n("p+7n"),o=n("q1tI"),a=n("wlLi"),i=n("E8HI"),c=n("RJQD"),l=function(e){return r.HeroCardType[e]};t.default=function(e){var t=e.baseModel;return o.createElement(r.HeroCard,{title:t.title,image:Object(i.getImageModel)(t.image),description:t.description,color:Object(c.getColor)(t.color),type:l(t.cardType)||r.HeroCardType.Small,button:t.button&&Object(a.mapActionButton)(t.button),alignment:Object(r.mapAlignment)(t.alignment)})}},uXQ0:function(e,t){},uqsa:function(e,t,n){"use strict";n.r(t);var r=n("afOK"),o=n.n(r),a=n("VX4z"),i=n("p+7n"),c=n("Wbzz"),l=n("q1tI"),u=n("TYy9"),s=n.n(u),d=n("TSYQ"),m=n.n(d),f=n("HaE+"),p=n("o0o1"),g=n.n(p),b=n("N1om"),h=n.n(b),v=n("HMs9"),C=n.n(v),S={arrowClassNames:"mx-0 mx-md-1",arrowDistanceFromTop:"43%"},y=function(e){var t=l.useState(o()(e.recipeCollections.map((function(e){return e.day})))),n=t[0],r=t[1],c=l.useState(!1),u=c[0],d=c[1],f=l.useState(),p=f[0],g=f[1],b=l.useContext(a.CookbookStrategyContext),v=l.useCallback((function(t,n,r){var o,i;d(!0),g(void 0);var c=e.recipeCollections&&(null===(o=e.recipeCollections[0])||void 0===o?void 0:o.date.toString());b&&(null===(i=b.getRecipeDetailByWeek)||void 0===i||i.call(b,t,n,r,c?new Date(c):new Date).then((function(e){g(Object(a.mapRecipeResponseToDetailedCardProps)(e,!1))})))}),[b]),y=l.useMemo((function(){var t=e.recipeCollections.filter((function(e){return e.day===n})).map((function(e){return e.recipes=e.recipes.filter((function(e){return 0===e.surcharge})),e})),r=s()(t.map((function(e){return e.recipes.filter((function(e){return e.src})).map((function(e){return n=function(){return v(e.rnumber,e.rversion,e.partition)},{id:(t=e).id,src:t.src||"",alt:t.name,caption:t.name,showCaption:!0,captionAlignment:i.Alignment.Left,showShadow:!0,surcharge:t.surcharge,onClick:n&&function(){return n(t.rnumber,t.rversion,t.partition,t.rid)}};var t,n}))}))).map((function(e){return Object(i.mapRecipeCarouselItem)(e)}));return l.createElement(i.Carousel,{items:r,infinite:!1,responsiveSlideCount:e.responsiveSlideCount||{small:1.5,medium:1.5,large:1.5,extraLarge:1.5},showArrows:!0,itemClassName:"px-2",arrowProps:S})}),[n,e.recipeCollections]);return l.createElement(l.Fragment,null,p&&l.createElement(i.DetailedCardModal,{isOpen:u,toggle:function(){return d(!u)},headerTitle:"Meal Details"},l.createElement(i.DetailedCardContext.Provider,{value:p},l.createElement(i.DetailedCardHeader,{actionBar:void 0}),l.createElement(a.RecipeDetailedCardBody,null))),l.createElement("div",{className:"d-flex mb-4"},e.recipeCollections.map((function(e){var t=n===e.day,o=m()("mx-2 border-primary",t&&"border-bottom"),a=t?"text-primary":"";return l.createElement("div",{style:{cursor:"pointer"},onClick:function(){return r(e.day)},key:"day-"+e.id,className:o,"data-role":"tab","data-test":"RecipeWeekSelector-tab-"+h()(e.day)},l.createElement("span",{className:"MFB"===i.Brand.FS?"fs-text-dark-color-override":a,"data-test":"RecipeWeekSelector-tab-text"},e.day))}))),l.createElement("div",{className:"w-100"},l.createElement(C.a,null,y)))},k=function(e){var t,n=e.title,r=e.description,o=e.productSelectEvent,c=e.selectedProduct,u=e.selectorComponent,d=e.id,p=e.addQueryParamOnContinue,b=e.productType,h=e.tag,v=e.isSoldOut,C=(null===(t=c.recipeCollections&&s()(c.recipeCollections.map((function(e){return e.collections}))))||void 0===t?void 0:t.map((function(e){return e.recipes=e.recipes.filter((function(e){return 0===e.surcharge})),e})))||[],S=b||a.ProductType.Primary,k=function(e,t,n,r,o){var i,c;Object(a.isLinkProps)(n)?i=n.generateLink(e.sku,o):c=function(){var t=Object(f.a)(g.a.mark((function t(){return g.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.onClickAsync(e.sku);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();var l=e.sku;return{label:t,url:i,onClickAsync:c,dataCategory:"product",dataLabel:l,dataAction:r,state:{sku:l,orderLink:e.orderLink,amountToPick:e.dinners,recipeSelectionMode:e.recipeSelectionMode}}}(c,S===a.ProductType.Primary?"Order Now":"Add to my Deliveries",o,"add",p),w="product-group-hero-"+d,x=c.deliveryPrice,P=0!==x&&null!==x,E=m()("d-flex","align-items-center",{"justify-content-between":P},"mb-0");return l.createElement("div",{"data-test":w,className:"d-flex w-100 justify-content-center"},l.createElement("div",{className:m()("d-flex flex-wrap flex-md-nowrap flex-row w-100 bg-white","mb-5 py-5 px-2 px-md-4","justify-content-center"),style:{maxWidth:"62em"}},l.createElement("div",{className:m()("d-flex flex-column w-100","col-12 col-md-5")},l.createElement(i.CardTag,Object.assign({},h,{position:{top:"-48px"}})),l.createElement("h3",{className:"display-4 m-0 mb-2"},n),l.createElement("p",null,r),u,l.createElement(a.DiscountConsumer,{product:c,render:function(e,t){var n=e.original!==e.discounted,r=S===a.ProductType.Primary&&t,o=n?{color:"#0d6efd"}:{},i=(parseFloat(e.discounted)+x).toFixed(2);return l.createElement(l.Fragment,null,l.createElement("div",null,l.createElement("h4",null,l.createElement("p",{className:E,style:{width:"15em"}},P&&l.createElement("span",{className:"text-nowrap"},"Per Week"),l.createElement("span",null,n&&l.createElement("span",null,l.createElement(a.BlueCrossOutText,{className:"mr-2",text:"$"+e.original})),l.createElement("span",{style:o},"$",e.discounted)),!P&&r&&l.createElement("span",{className:"text-nowrap"}," per week"))),r&&t&&l.createElement("h4",null,l.createElement("p",{className:E,style:{width:"15em"}},P&&l.createElement("span",{className:"text-nowrap"},"Per Plate"),l.createElement("span",null,n&&l.createElement("span",null,l.createElement(a.BlueCrossOutText,{className:"mr-2",text:"$"+t.original})),l.createElement("span",{style:o},"$",t.discounted),!P&&r&&l.createElement("span",{className:"text-nowrap"}," per plate")))),P&&l.createElement("div",null,l.createElement("h4",null,l.createElement("p",{className:E,style:{width:"15em"}},l.createElement("span",{className:"text-nowrap"},"Delivery"),l.createElement("span",null,"$",x))),l.createElement("h4",null,l.createElement("br",null),l.createElement("p",{className:E,style:{width:"15em"}},l.createElement("span",{className:"text-nowrap"},"Total Price"),l.createElement("span",null,"$",i))))))}}),l.createElement("div",{className:"col mt-3 px-0"},l.createElement(a.ProductOrderButton,{sku:c.sku,productType:c.productType,className:m()("btn text-white text-nowrap mb-4 px-5","MFB"===i.Brand.BB?"rounded-pill":"rounded-lg"),actionButton:k,isSoldOut:v,isComingSoon:c.isComingSoon}))),l.createElement("div",{className:"w-100 d-flex flex-column col-12 col-md-7"},l.createElement(y,{recipeCollections:C}))))},w=Object(a.WithProductGroupSelector)(k,!0),x=Object(a.WithProductGroupSelector)(k,!1),P=function(e){var t=e.showSelector?w:x;return l.createElement(t,e)},E=n("ZmDi"),O=n("Vjiz"),M=n("MIz4"),T=function(e){var t=e.baseModel,n=e.site,r=e.pageSettings,c=e.allProductDb,u=t,s=Object(a.useStock)()[1],d=l.useState((function(){return u.productGroup.products.map((function(e){return Object(E.getProductModel)(e,c,n.siteMetadata.gatewayUrl)})).filter(i.isNotNullOrUndefined)}))[0],m=o()(d),f=m&&m.availableFrequency;if(l.useEffect((function(){f&&f===a.AvailableFrequency.OneOff&&d.forEach((function(e){return s({type:a.StockActionType.registerOneOff,sku:e.sku})}))}),[f,s,d]),!m)return null;var p=m.productType===a.ProductType.Primary,g={generateLink:function(e,t){var r=d.find((function(t){return t.sku===e})),o=n.siteMetadata.accountUrl+"/manage/subscriptions/extras/addbysku/"+e;return Object(M.getProductSelectEventPath)(o,p,r,t)}},b=Object(O.getProductGroupModel)(u.productGroup,d),h=Object.assign({},b,{id:u.id,addQueryParamOnContinue:u.addQueryParamOnContinue,preselectedPeople:r&&r.preselectedPeople,preselectedDinners:r&&r.preselectedDinners,productType:m.productType,productSelectEvent:g,position:u.position});return l.createElement("div",{className:"w-100",id:u.id},l.createElement(P,Object.assign({},h,{title:u.title,description:u.description})))};t.default=function(e){return l.createElement(c.b,{query:"3593756770",render:function(t){return l.createElement(T,Object.assign({},e,t))}})}},v277:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("AVYR"),a=n("pg3q"),i=n("OQbj"),c=function(e){var t=e.imageSet,n=e.altText,c=e.link,l=e.scrollTarget;return c?r.createElement(o.a,{link:c},r.createElement(i.a,{imageSet:t,alt:n})):l?r.createElement("div",{style:{cursor:"pointer"},onClick:function(){return Object(a.b)(l)}},r.createElement(i.a,{imageSet:t,alt:n})):r.createElement(i.a,{imageSet:t,alt:n})},l=n("E8HI"),u=n("dvv6");t.default=function(e){var t=e.baseModel,n=t.id,o=t.image,a=t.link,i=t.scrollTarget,s={small:Object(l.getImageModel)(o.small),medium:Object(l.getImageModel)(o.medium),large:Object(l.getImageModel)(o.large)};return r.createElement(c,{key:n,imageSet:s,altText:o.alternateText,link:Object(u.getContentfulLink)(a),scrollTarget:i&&i.id})}},vD5k:function(e,t,n){"use strict";n.r(t),n.d(t,"mergeToCartProducts",(function(){return a}));var r=n("p+7n"),o=n("E8HI"),a=function(e,t,n){var a=n.map((function(e){var n=t&&t.find((function(t){return t.sku===e.sku}));if(n)return{cp:e,dbp:n}})).filter(r.isNotNullOrUndefined),i=[];if(e){var c=t&&t.find((function(t){return t.sku===e})),l=n.find((function(t){return t.sku===e}));c&&i.push({id:e,sku:e,title:c.name,image:l&&Object(o.getImageModel)(l.image),price:c.price,locked:!0})}return a.forEach((function(e){var t=e.cp,n=e.dbp;i.push({id:n.sku,sku:n.sku,title:n.name,description:t.description,tags:t.tabText&&[t.tabText]||void 0,image:Object(o.getImageModel)(t.image),price:n.price})})),i};t.default={mergeToCartProducts:a}},vRIT:function(e,t){},wJr2:function(e,t,n){"use strict";n.r(t);var r=n("VX4z"),o=n("Wbzz"),a=n("q1tI"),i=n("ZmDi"),c=n("vOnD").default.div.withConfig({displayName:"ContentfulProduct__StyledContainer",componentId:"sc-xlf8z4-0"})(["margin:0 8px 24px 8px;width:326px;"]);t.default=function(e){var t=e.baseModel;return a.createElement(o.b,{query:"3593756770",render:function(e){var n=Object(i.getProductModel)(t,e.allProductDb,e.site.siteMetadata.gatewayUrl);if(!n)return null;var o=null;switch(n.variant){case"productCard":case"productCardHighlighted":o=a.createElement(c,null,a.createElement(r.ProductCard,Object.assign({},n,{variant:n.variant})));break;default:o=a.createElement(r.ProductCard,Object.assign({},n,{variant:void 0}))}return o}})}},wdn8:function(e,t,n){e.exports={condition:"TermsSubsection-module--condition--3_-UM"}},wsBB:function(e,t){},xKB1:function(e,t){},xoYE:function(e,t){e.exports={getSkuFromQueryParams:jest.fn()}},xzqD:function(e,t,n){"use strict";n.r(t);var r=n("p+7n"),o=n("q1tI"),a=n("AVYR"),i=n("dvv6"),c=n("+9EZ");t.default=function(e){var t=e.baseModel,n=t.name,l=t.link,u=t.responsiveImageSet,s=u&&Object(c.mapResponsiveImageSetContentModelToResponsiveImageProps)(u);return s?o.createElement("div",{"data-category":"merchandising","data-action":"click-single-merch-slot","data-label":n+" - merch-slot",className:"w-100 my-2 mx-lg-2"},o.createElement(a.a,{link:Object(i.getContentfulLink)(l)},o.createElement(r.ResponsiveImage,s))):null}},yO05:function(e,t){},yZTi:function(e,t){},yioD:function(e,t){},zqxM:function(e,t,n){var r=n("LqpT"),o=n("XGnz"),a=n("EA7m"),i=n("3L66"),c=a((function(e,t){return i(e)?r(e,o(t,1,i,!0)):[]}));e.exports=c}}]);