PageSourceSearch

https://www.theculinistas.com/_next/static/chunks/8342-6371ca7c274d2998.js

js theculinistas.com collected 2026-10-04 16:35:43 UTC 51,390 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8342],{48695:function(e,t,i){var s,l,a=i(52983);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(this,arguments)}t.Z=function(e){return a.createElement("svg",n({width:11,height:11,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=a.createElement("g",{clipPath:"url(#icon-promo-tag_svg__a)"},a.createElement("path",{d:"M10.1.5 6 .3l-6 6 4.2 4.2 6-6-.1-4ZM6.7 3.9c-.5-.5-.5-1.2 0-1.7s1.2-.5 1.7 0 .5 1.2 0 1.7-1.3.5-1.7 0Z",fill:"currentColor"}))),l||(l=a.createElement("defs",null,a.createElement("clipPath",{id:"icon-promo-tag_svg__a"},a.createElement("path",{fill:"#fff",d:"M0 0h11v11H0z"})))))}},16265:function(e,t,i){var s,l=i(52983);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(this,arguments)}t.Z=function(e){return l.createElement("svg",a({viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=l.createElement("path",{d:"m10.862 10.659-.772.772-2.878-2.878a4.35 4.35 0 0 1-2.748.944 4.479 4.479 0 0 1-1.71-.335 4.55 4.55 0 0 1-1.448-.971c-.42-.42-.743-.9-.971-1.442A4.496 4.496 0 0 1 0 5.033c0-.597.112-1.167.335-1.71A4.452 4.452 0 0 1 2.755.912 4.4 4.4 0 0 1 4.464.569c.597 0 1.167.114 1.709.342.547.223 1.03.544 1.45.964.423.419.746.902.97 1.449.228.542.342 1.112.342 1.709a4.35 4.35 0 0 1-.95 2.748l2.877 2.878Zm-8.79-3.24a3.26 3.26 0 0 0 2.392.99 3.26 3.26 0 0 0 2.392-.99 3.249 3.249 0 0 0 .985-2.386c0-.93-.328-1.728-.985-2.393a3.286 3.286 0 0 0-2.392-.984c-.934 0-1.73.328-2.386.984a3.26 3.26 0 0 0-.991 2.393c0 .934.328 1.73.984 2.385Z",fill:"currentColor"})))}},15219:function(e,t,i){i.d(t,{u:function(){return a}});var s=i(70967),l=i(52983);function a(){let{data:e}=(0,s.NTg)();return(0,l.useMemo)(()=>(null==e?void 0:e.allAllergen.filter(e=>!!e.smlenum))||[],[e])}},61844:function(e,t,i){i.d(t,{E:function(){return em}});var s,l,a=i(97458),n=i(14517),r=i(39957),o=i(35031),d=i(52983),c=i(85517),h=i(11158),u=i(7644),m=i(42424),p=i.n(m),x=i(92156);function f(e){let{textColor:t,backgroundColor:i}=e,{activeBookingStepIndex:s,activeServiceData:l,cartData:d,removeCartItem:m,goToStepIndex:f,activeService:g,setSubmitDisabled:v}=(0,u.m)(),y=(0,o.M)("text",t),j=(0,o.M)("bg",i),b=(0,o.M)("border-r",t),N=e=>()=>{d.items[0]&&e<1&&"mealPrep"!==g&&m(d.items[0].uuid),f(e),v(!1)};return"steps"in l?(0,a.jsxs)("div",{className:(0,n.Z)(y,j,"sticky top-0 z-20 flex h-[50px] items-center overflow-hidden sm:h-[60px]"),children:[(0,a.jsx)(p(),{className:"h-full min-w-[54px] max-w-[54px] flex-1 sm:min-w-[119px] sm:max-w-[119px]",href:x.y.home(),children:(0,a.jsx)("div",{className:(0,n.Z)(b,"flex h-full w-full items-center border-r border-opacity-40 px-3 sm:px-11"),children:(0,a.jsx)(r.k,{icon:(0,a.jsx)(c.Z,{}),size:30})})}),(0,a.jsx)("nav",{className:"flex gap-x-4 px-4 sm:px-8",children:null==l?void 0:l.steps.map((e,t)=>{let i=l.steps.length-1===t;return(0,a.jsxs)("div",{className:(0,n.Z)("flex items-center gap-x-3 sm:gap-x-4",{"opacity-40":t!==s}),children:[t<s?(0,a.jsx)("button",{type:"button",onClick:N(t),children:(0,a.jsx)("span",{className:"helvetica-12-500 sm:helvetica-14-500 whitespace-nowrap",children:e.title})}):(0,a.jsx)("span",{className:"helvetica-12-500 sm:helvetica-14-500 whitespace-nowrap",children:e.title}),(0,a.jsx)(r.k,{icon:(0,a.jsx)(h.Z,{}),size:8,className:(0,n.Z)({hidden:i})})]},e.id)})})]}):null}var g=i(1137),v=i(78778),y=i(77413),j=i.n(y),b=i(12496),N=i(25489),w=i(70967),S=i(6241),C=i(47748),k=i(93427);function M(){return(M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(this,arguments)}var E=function(e){return d.createElement("svg",M({viewBox:"0 0 11 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),s||(s=d.createElement("path",{d:"M.5 5.75h10M5.5.75v10M.5 5.75h10",stroke:"currentColor"})))};function I(){return(I=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e}).apply(this,arguments)}var Z=function(e){return d.createElement("svg",I({viewBox:"0 0 10 1",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),l||(l=d.createElement("path",{d:"M0 .5h10",stroke:"currentColor"})))},P=i(17111),D=i(18844),T=i(15783);function O(e){var t;let{dish:i,allergens:s,primaryColor:l,secondaryColor:c,onCloseClick:h}=e,{activeService:m,cartData:p,updateCartItemSelection:x}=(0,u.m)(),f=p.items[0].selectedItems.find(e=>e.referenceId===i.id),y=(null==f?void 0:f.portions)?P.F0.indexOf(P.F0.find(e=>e.slug===(null==f?void 0:f.portions))):P.F0.indexOf(P.F0.find(e=>{var t;return e.slug===(null===(t=p.householdSettings)||void 0===t?void 0:t.portions)})),[b,N]=(0,d.useState)(Math.max(y,0)),[w,S]=(0,d.useState)(null===(t=P.F0[b])||void 0===t?void 0:t.slug),[C,M]=(0,d.useState)([]),[I,O]=(0,d.useState)(""),[F,L]=(0,d.useState)(!1),[A,_]=(0,d.useState)(""),z=e=>{C.find(t=>t===e.currentTarget.id)?M([...C.filter(t=>t!==e.currentTarget.id)]):M([...C,e.currentTarget.id])},B=e=>"others"===e?F:C.find(t=>t===e.id);return(0,d.useEffect)(()=>{S(P.F0[b].slug)},[b]),(0,d.useEffect)(()=>{f.restrictions&&f.restrictions.length>0&&M(f.restrictions.filter(e=>s.find(t=>
1t.id===e)))},[f.restrictions,s]),(0,d.useEffect)(()=>{f.additionalInformation&&O(f.additionalInformation)},[f.additionalInformation]),(0,d.useEffect)(()=>{f.othersNote&&_(f.othersNote)},[f.othersNote]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:(0,n.Z)((0,o.M)("bg",c),"flex flex-col p-[30px]"),children:[(0,a.jsx)("button",{type:"button",className:"mb-14 -ml-4 flex aspect-1 w-10 items-center justify-center",onClick:h,children:(0,a.jsx)(r.k,{width:10,height:10,icon:(0,a.jsx)(k.Z,{})})}),(0,a.jsx)("h2",{className:"editorial-32 mb-[10px]",children:i.title}),(0,a.jsx)("p",{className:"garamond-16 pr-{70px} mb-5",children:i.ingredients}),(0,a.jsx)("div",{className:"helvetica-10-500 flex flex-row",children:i.diets.map(e=>(0,a.jsx)("div",{className:(0,n.Z)((0,o.M)("border",l),"border-l border-t border-b border-opacity-40 px-3 py-1 last:border-r md:border-t md:border-b first:md:border-l last:md:border-r"),children:e.abbreviation},e.title))})]}),(0,a.jsxs)("div",{className:"flex flex-col px-[30px] py-10",children:["mealPrep"===m&&(0,a.jsxs)("div",{className:"helvetica-14-500 mb-10 flex justify-between",children:[(0,a.jsx)("h3",{children:"Portions"}),(0,a.jsx)(g.M,{mode:"wait",initial:!1,children:(0,a.jsxs)(v.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"flex gap-3",children:[(0,a.jsx)("button",{disabled:0===b,type:"button",onClick:()=>{N(e=>e-1)},className:0===b?"opacity-40":"opacity-100",children:(0,a.jsx)(r.k,{width:10,height:10,icon:(0,a.jsx)(Z,{})})}),(0,a.jsx)("p",{children:P.F0[b].title}),(0,a.jsx)("button",{disabled:2===b,type:"button",onClick:()=>{N(e=>e+1)},className:2===b?"opacity-40":"opacity-100",children:(0,a.jsx)(r.k,{width:10,height:10,icon:(0,a.jsx)(E,{})})})]},b)})]}),(0,a.jsx)("h3",{className:"helvetica-14-500 mb-[6px]",children:"Customizations"}),(0,a.jsx)("p",{className:"helvetica-14-400 mb-5 pr-[53px] md:pr-[60px]",children:"Do you need to modify this dish?"}),(0,a.jsxs)("div",{className:"mb-10 grid grid-cols-3 gap-[30px]",children:[null==s?void 0:s.map(e=>(0,a.jsxs)("button",{id:e.id,type:"button",className:(0,n.Z)((0,o.M)("border",l),"helvetica-12-400 relative border-b py-[6px] text-left transition-all duration-300 ease-in-out",{"border-opacity-100":B(e),"border-opacity-40":!B(e)}),onClick:z,children:[(0,a.jsx)("span",{className:"opacity-0",children:e.title}),(0,a.jsx)(g.M,{mode:"sync",initial:!1,children:(0,a.jsxs)(v.E.p,{className:(0,n.Z)("absolute top-1.5 left-0 flex"),initial:{opacity:0}
1,animate:{opacity:B(e)?1:.4},exit:{opacity:0},transition:{duration:.3},children:[B(e)&&(0,a.jsx)(a.Fragment,{children:"No"})," ",e.title]},B(e)?"No ".concat(e.title):e.title)})]},e.id)),(0,a.jsx)("input",{placeholder:!F||A?"Other":"Answer here",onFocus:()=>{L(!0)},onBlur:()=>{L(!1)},value:A,onChange:e=>{_(e.target.value)},className:(0,n.Z)((0,o.M)("placeholder:text",l),(0,o.M)("border",l),"helvetica-12-400 form-input rounded-none border-0 border-b bg-transparent py-[6px] text-left outline-none",{"w-28 opacity-100":F||A,"opacity-40":!F&&!A})})]}),(0,a.jsx)("h3",{className:"helvetica-14-500 mb-5",children:"Additional requests"}),(0,a.jsx)("textarea",{placeholder:"Anything else you’d like to request for this dish (e.g. “no garlic,” “wild salmon only,” or “please cook steak to medium rare”)?   ",value:I,onChange:e=>{O(e.target.value)},className:(0,n.Z)((0,o.M)("placeholder:text",l),(0,o.M)("border",l),(0,o.M)("focus:border",l),"helvetica-12-400 form-textarea mb-10 h-[117px] border border-opacity-40 bg-transparent p-5 pr-10 placeholder:opacity-40 focus:border-opacity-40 focus:outline-none focus:ring-0")}),(0,a.jsx)(D.k,{backgroundColor:l,textColor:T.bG.White,className:"helvetica-12-500 h-11",onClick:e=>{e.preventDefault(),x({courseId:f.courseId,parentUuid:f.parentUuid,referenceId:f.referenceId,othersNote:A,additionalInformation:I,restrictions:C,portions:w}),j().replace(j().pathname,void 0,{shallow:!0,scroll:!1})},children:"Save"})]})]})}function F(e){let{dish:t,allergens:i,primaryColor:s,secondaryColor:l}=e,r=(0,y.useRouter)(),d=e=>{e.preventDefault(),r.push({pathname:r.pathname,query:{}},void 0,{shallow:!0,scroll:!1})};return(0,a.jsx)(C.O,{onCloseClick:d,show:!!t,themeColor:s,contentContainerClassName:"scrollbar-hidden",hideButton:!0,variant:C.V.DishCustomizer,children:(0,a.jsx)("article",{className:(0,n.Z)((0,o.M)("text",s),"pb-24"),children:(0,a.jsx)(O,{dish:t,allergens:i,primaryColor:s,secondaryColor:l,onCloseClick:d})})})}var L=i(45826),A=i(2059),_=i(1530),z=i(44274),B=i(66467);function H(e){let{allergens:t,diets:i,primaryColor:s,secondaryColor:l}=e,{closeModal:c,openedModals:h}=(0,L.vR)(),{cartData:m,updateCartSettings:p}=(0,u.m)(),x=(0,_.i)(),[f,y]=(0,d.useState)(!1),[j,b]=(0,d.useState)(!1),[N,w]=(0,d.useState)(0),[S,C]=(0,d.useState)(P.F0[N].slug),[k,M]=(0,d.useState)([]),[I,O]=(0,d.useState)([]),[F,H]=(0,d.useState)(""),[q,R]=(0,d.useState)(!1),[Y,G]=(0,d.useState)(""),U=(0,o.M)("bg",l),K=(0,o.M)("text",s),J=(0,o.M)("border",s),X=(0,o.M)("focus:border",s),Q=(0,o.M)("placeholder:text",s),V=x.height,W=x.width<768,$=()=>{setTimeout(()=>{p({zipCode:m.zipCode,numberOfPeople:m.numberOfPeople,householdSettings:{portions:S,diets:I,restrictions:k,othersNote:Y,additionalInformation:F},startDate:m.startDate,endDate:m.endDate,time:m.time})},1)},ee=()=>{m.householdSettings||p({householdSettings:{portions:S,diets:[],restrictions:[],othersNote:"",additionalInformation:""}}),y(!1);let e=setTimeout(()=>{c(L.Ti.HouseHoldSettings)},300);return()=>{clearTimeout(e)}},et=e=>{I.find(t=>t===e.currentTarget.id)?O([...I.filter(t=>t!==e.currentTarget.id)]):O([...I,e.currentTarget.id])},ei=e=>{k.find(t=>t===e.currentTarget.id)?M([...k.filter(t=>t!==e.currentTarget.id)]):M([...k,e.currentTarget.id])};return(0,d.useEffect)(()=>{h.includes(L.Ti.HouseHoldSettings)&&y(!0)},[h]),(0,d.useEffect)(()=>{m.householdSettings&&m.householdSettings.portions&&(C(m.householdSettings.portions),w(P.F0.indexOf(P.F0.find(e=>e.slug===m.householdSettings.portions))))},[m.householdSettings]),(0,d.useEffect)(()=>{C(P.F0[N].slug)},[N]),(0,d.useEffect)(()=>{i&&m.householdSettings&&m.householdSettings.diets&&m.householdSettings.diets.length>0&&O(m.householdSettings.diets.filter(e=>i.find(t=>t.id===e)))},[i,m.householdSettings]),(0,d.useEffect)(()=>{t&&m.householdSettings&&m.householdSettings.restrictions&&m.householdSettings.restrictions.length>0&&M(m.householdSettings.restrictions.filter(e=>t.find(t=>t.id===e)))},[t,m.householdSettings]),(0,d.useEffect)(()=>{m.householdSettings&&m.householdSettings.othersNote&&G(m.householdSettings.othersNote)},[m.householdSettings]),(0,d.useEffect)(()=>{m.householdSettings&&m.householdSettings.additionalInformation&&H(m.householdSettings.additionalInformation)},[m.householdSettings]),(0,a.jsxs)(B.k,{modalId:L.Ti.HouseHoldSettings,handleClose:ee,contentContainerStyle:{height:"".concat(V,"px")}
1,children:[(0,a.jsx)(v.E.div,{initial:{opacity:0},animate:{opacity:1,transition:{duration:0}},exit:{opacity:0,transition:{duration:.3}},className:"relative flex h-[50px] justify-end bg-transparent md:h-[60px]",children:!W&&(0,a.jsxs)("div",{className:(0,n.Z)(U,K,"helvetica-14-500 flex w-[381px] content-center justify-between px-[30px] py-5"),children:[(0,a.jsx)("p",{children:"Household settings"}),(0,a.jsx)("button",{type:"button",onClick:ee,children:(0,a.jsx)(r.k,{icon:(0,a.jsx)(A.Z,{}),size:10})})]})}),(0,a.jsx)(g.M,{children:f&&(0,a.jsx)(v.E.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.3},className:(0,n.Z)(U,K),children:(0,a.jsxs)(v.E.div,{initial:{opacity:0},animate:{opacity:1,transition:{delay:.1}},exit:{opacity:0,transition:{duration:.15}},transition:{duration:.3},className:"relative flex flex-col gap-8 px-8 py-5 pb-[30px] md:flex-row md:justify-around md:py-14",children:[W&&(0,a.jsx)("p",{className:"helvetica-12-500",children:"Household settings"}),(0,a.jsxs)("div",{className:"flex grow basis-1 flex-col gap-[10px] md:max-w-[315px] md:gap-5",children:[(0,a.jsx)("h2",{className:"editorial-24 md:editorial-32",children:"Set Your Household Dietary Settings"}),(0,a.jsx)("p",{className:"garamond-16 md:garamond-18",children:"Tell us how many eaters we'll be cooking for each week, along with any dietary restrictions or allergies. Your service is automatically set to once per week. Once you create an account, you can update this frequency through your dashboard."})]}),(0,a.jsxs)("div",{className:"flex max-w-[675px] grow-[2] basis-2 flex-col gap-[30px] md:gap-10",children:[(0,a.jsxs)("div",{className:(0,n.Z)(J,"w-full border-t border-opacity-40 pt-5"),children:[(0,a.jsxs)("div",{className:"helvetica-14-500 grid w-full grid-cols-[1fr_2fr]",children:[(0,a.jsx)("h3",{children:"Portions"}),(0,a.jsxs)("div",{className:"justify-self-end md:justify-self-start",children:[(0,a.jsx)(g.M,{mode:"wait",initial:!1,children:(0,a.jsxs)(v.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"mb-5 flex gap-3 md:gap-6",children:[(0,a.jsx)("button",{disabled:0===N,type:"button",onClick:()=>{w(e=>Math.max(e-1,0))},className:0===N?"opacity-40":"opacity-100",children:(0,a.jsx)(r.k,{size:10,icon:(0,a.jsx)(Z,{})})}),(0,a.jsx)("p",{children:P.F0[N].title}),(0,a.jsx)("button",{disabled:2===N,type:"button",onClick:()=>{w(e=>Math.min(e+1,2))},className:2===N?"opacity-40":"opacity-100",children:(0,a.jsx)(r.k,{size:10,icon:(0,a.jsx)(E,{})})})]},N)}),!W&&(0,a.jsxs)("p",{className:"helvetica-12-400 leading-4 opacity-60",children:["Our sizing is based on number of people in your household, but you can adjust your selection based on appetites. Regardless of your selection here, you can size up or down any individual dish in your menu. If your family is larger than six people, please"," ",(0,a.jsx)(z.X,{color:T.bG.CulinistaBlack,href:"/booking-old/a-season-or-long-term",children:"reach out"})," ","and we will provide you with a custom quote."]})]})]}),W&&(0,a.jsxs)("p",{className:"helvetica-12-400 leading-4 opacity-60",children:["Our sizing is based on number of people in your household, but you can adjust your selection based on appetites. Regardless of your selection here, you can size up or down any individual dish in your menu. If your family is larger than six people, please"," ",(0,a.jsx)(z.X,{color:T.bG.CulinistaBlack,href:"/booking-old/a-season-or-long-term",children:"reach out"})," ","and we will provide you with a custom quote."]})]}),(0,a.jsxs)("div",{className:(0,n.Z)(J,"w-full border-t border-opacity-40 pt-5"),children:[(0,a.jsxs)("div",{className:"helvetica-14-500 grid w-full grid-cols-[1fr_2fr]",children:[(0,a.jsx)("h3",{children:"Diets & Allergies"}),(0,a.jsxs)("div",{className:"text-right md:text-left",children:[(0,a.jsx)("button",{type:"button",onClick:()=>{b(!0)},children:"Add"}),!W&&(0,a.jsx)(g.M,{initial:!1,children:!j&&(0,a.jsx)(v.E.p,{initial:{opacity:0}
1,animate:{opacity:.6},exit:{opacity:0},className:"helvetica-12-400 mt-5 leading-4 opacity-60",children:"Your household preferences will be saved and applied to your selected dishes. You can manually edit these preferences on each dish or modify your household preferences at any time."},"desktop description")})]})]}),(0,a.jsxs)(g.M,{initial:!1,children:[W&&(0,a.jsx)(v.E.p,{initial:{opacity:0},animate:{opacity:.6},exit:{opacity:0},className:"helvetica-12-400 mt-5 leading-4 opacity-60",children:"Your household preferences will be saved and applied to your selected dishes. You can manually edit these preferences on each dish or modify your household preferences at any time."},"mobile description"),j&&(0,a.jsxs)(v.E.div,{initial:"collapsed",animate:"open",exit:"collapsed",variants:{open:{opacity:1,height:"auto"},collapsed:{opacity:0,height:0}},transition:{duration:.3},className:"helvetica-12-400 mt-10 opacity-60 md:mt-12",children:[i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{className:"helvetica-10-500 mb-5 uppercase tracking-widest",children:"Diets"}),(0,a.jsx)("div",{className:"mb-10 grid grid-cols-3 gap-x-[30px] gap-y-5 md:mb-12 md:grid-cols-6",children:(0,a.jsx)(g.M,{mode:"popLayout",initial:!1,children:i.map(e=>(0,a.jsx)(v.E.button,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},id:e.id,type:"button",className:(0,n.Z)(J,"helvetica-12-400 border-b py-[6px] text-left",{"border-opacity-100":I.find(t=>t===e.id),"border-opacity-40":!I.find(t=>t===e.id)}),onClick:et,children:(0,a.jsx)("span",{className:I.find(t=>t===e.id)?"opacity-100":"opacity-40",children:e.title})},I.find(t=>t===e.id)?"No ".concat(e.title):e.title))})})]}),t&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h4",{className:"helvetica-10-500 mb-5 uppercase tracking-widest",children:"Allergies"}),(0,a.jsxs)("div",{className:"mb-10 grid grid-cols-3 gap-x-[30px] gap-y-5 md:mb-12 md:grid-cols-6",children:[(0,a.jsx)(g.M,{mode:"popLayout",initial:!1,children:t.map(e=>(0,a.jsxs)(v.E.button,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},id:e.id,type:"button",className:(0,n.Z)(J,"helvetica-12-400 border-b py-[6px] text-left",{"border-opacity-100":k.find(t=>t===e.id),"border-opacity-40":!k.find(t=>t===e.id)}),onClick:ei,children:[k.find(t=>t===e.id)&&(0,a.jsx)("span",{children:"No "}),(0,a.jsx)("span",{className:k.find(t=>t===e.id)?"opacity-100":"opacity-40",children:e.title})]},k.find(t=>t===e.id)?"No ".concat(e.title):e.title))}),(0,a.jsx)("input",{placeholder:!q||Y?"Other":"Answer here",onFocus:()=>{R(!0)},onBlur:()=>{R(!1)},value:Y,onChange:e=>{G(e.target.value)},className:(0,n.Z)(Q,J,"helvetica-12-400 form-input border-b bg-transparent py-[6px] text-left outline-none",{"w-28 opacity-100":q||Y,"opacity-40":!q&&!Y})})]})]}),(0,a.jsx)("h3",{className:"helvetica-10-500 mb-5 uppercase tracking-widest",children:"Additional Instructions"}),(0,a.jsx)("textarea",{placeholder:"Enter any other preferences about your menu, groceries, chef, or service here.",value:F,onChange:e=>{H(e.target.value)},className:(0,n.Z)(Q,J,X,"helvetica-12-400 form-textarea h-[117px] w-full border border-opacity-40 bg-transparent p-5 pr-10 placeholder:opacity-60 focus:border-opacity-40 focus:shadow-none focus:outline-none focus:ring-0 md:mb-2")})]})]})]}),(0,a.jsx)(D.k,{className:"helvetica-12-500 h-[34px] min-w-[108px] max-w-[108px] md:h-11",textColor:l,backgroundColor:s,onClick:e=>{e.preventDefault(),$(),ee()},children:"Save"})]})]})})})]})}var q=i(43359),R=i(11479),Y=i(98644),G=i(73628);function U(e){let{placeholder:t,item:i,primaryColor:s,selection:l,allergens:d,disableEdit:c,isSelectedFromDishLibrary:h=!1,courseId:m}=e,p=(0,y.useRouter)(),{removeCartItemSelection:x,activeService:f,setDishLibraryCourseId:g,cartData:v,updateCartSettings:j}=(0,u.m)();return(0,a.jsxs)("div",{className:(0,n.Z)("editorial-16 flex-gap-x-2.5 flex flex-col border-b-2 border-dotted border-opacity-40 py-4",(0,o.M)("text",s),(0,o.M)("border",s),{"text-opacity-60":!i}),children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(null==i?void 0:i.title)||t,i&&(0,a.jsxs)("div",{className:(0,n.Z)("flex gap-x-2.5",(0,o.M)("fill",s),(0,o.M)("text",s)),children:[h&&(0,a.jsx)("button",{className:"helvetica-12-500",type:"button",onClick:()=>{m&&g(m)},children:"replace"}),!c&&(0,a.jsx)("button",{className:"helvetica-12-500",type:"button",onClick:()=>{p.push({pathname:p.pathname,query:{dish:i.slug}},void 0,{shallow:!0,scroll:!1})},children:"edit"}),(0,a.jsx)("button",{type:"button",onClick:()=>{var e;x(l),j({dishesSelectedFromLibrary:null==v?void 0:null===(e=v.dishesSelectedFromLibrary)||void 0===e?void 0:e.filter(e=>e.id!==i.id)})},children:(0,a.jsx)(r.k,{size:8,icon:(0,a.jsx)(k.Z,{})})})]})]}),(0,a.jsxs)("div",{className:(0,n.Z)("helvetica-12-400 flex flex-col gap-x-1.5 text-opacity-60",(0,o.M)("text",s)),children:["mealPrep"===f&&(null==l?void 0:l.portions)&&(0,a.jsxs)("p",{children:["Portion: ",l.portions]}),(null==l?void 0:l.restrictions.length)>0&&d&&(0,a.jsx)("p",{children:(0,Y.E)(l.restrictions,d,"No")+(0,G.J)(null==l?void 0:l.othersNote,"No")}),(null==l?void 0:l.restrictions.length)<=0&&(null==l?void 0:l.othersNote)&&(0,a.jsx)("p",{children:"No ".concat(l.othersNote)}),(null==l?void 0:l.additionalInformation)&&(0,a.jsx)("p",{children:l.additionalInformation.substring(0,50)})]})]})}var K=i(54100),J=i.n(K),X=i(13916),Q=i(2448),V=i(48695),W=i(90015);function $(e){let{bgColor:t=T.bG.NavyLight,className:i,textColor:s}=e,{dict:l}=(0,W.K)();return(0,a.jsxs)("div",{className:(0,n.Z)(i,(0,o.M)("bg",t),(0,o.M)("text",s),"flex w-fit items-center gap-1.5 p-2"),children:[(0,a.jsx)(r.k,{size:11,icon:(0,a.jsx)(V.Z,{})}),(0,a.jsx)("p",{role:"alert",className:"helvetica-12-400",children:l(T.FC.BookingPromotion,"Spring Promotion for 12+ party")})]})}var ee=i(85494);function et(e){let{primaryColor:t,className:i,disabled:s,onClick:l}=e,{submitFormButton:r,submitDisabled:o,submitLoading:d,activeStepData:c,activeService:h}=(0,u.m)(),{type:m,form:p,onClick:x}=r();return(0,a.jsx)(D.k,{className:(0,n.Z)(i,"w-full !min-w-0 max-w-[163px] xs:max-w-full",{"text-opacity-60":s||o,"text-opacity-100":!s&&!o}),backgroundColor:(0,ee._)(t),textColor:t,disabled:s||o,loading:d,type:m,form:p,onClick:()=>{null==l||l(),null==x||x()},children:"payment"===c.id?"Checkout":"mealPrep"===h?"Book Meal Prep":"Book This Menu"})}function ei(e){var t;let{section:i,primaryColor:s,allergens:l}=e,{cartData:n,activeStepData:r}=(0,u.m)(),o=n.items.map(e=>e.selectedItems).flat().filter(e=>e.courseId===i.id),d=null===(t=i.data)||void 0===t?void 0:t.length;d=n.items[0].isExtendedMenu?null==i?void 0:i.numberOfDishesExt:null==i?void 0:i.numberOfDishes,o=o.slice(0,d);let c=d?d-o.length:0,h=o.map(e=>{var t;return{selectedItem:e,dish:i.data.find(t=>
1t.id===e.referenceId)||(null===(t=n.dishesSelectedFromLibrary)||void 0===t?void 0:t.find(t=>t.id===e.referenceId)),isSelectedFromDishLibrary:!i.data.find(t=>t.id===e.referenceId)}}),m=i.isDrinkSection&&(!i.numberOfDishes||i.isOptional);return(0,a.jsxs)("div",{className:"flex flex-col",children:[h.map(e=>(0,a.jsx)(U,{item:e.dish,selection:e.selectedItem,primaryColor:s,allergens:l,disableEdit:i.isDrinkSection,isSelectedFromDishLibrary:e.isSelectedFromDishLibrary,courseId:e.selectedItem.courseId},"".concat(i.id,"-dish-").concat(e.dish.id))),!d&&0===o.length&&(0,a.jsx)(U,{placeholder:"Pick a dish",primaryColor:s,allergens:l}),c>0&&"dishes"===r.id&&Array(c).fill(0).map((e,t)=>(0,a.jsx)(U,{placeholder:m?"Drink ".concat(t+o.length+1):"Dish ".concat(t+o.length+1),primaryColor:s,allergens:l},"".concat(i.id,"-dish-").concat(t))),0===o.length&&"dishes"!==r.id&&(0,a.jsx)(U,{placeholder:"None",primaryColor:s,allergens:l})]})}function es(e){let{primaryColor:t,promoNoteBgColor:i,promoNoteTextColor:s,selectedItems:l,menu:c,dishes:h,cookingClass:m,activeService:p,allergens:x}=e,{estimations:f,cartData:y}=(0,u.m)(),j=(0,_.i)(),[b,N]=(0,d.useState)(!1),[w,C]=(0,d.useState)(!1),k="gatherings"===p?c:m;return(0,d.useEffect)(()=>{let e=0;(null==k?void 0:k.sections)?k.sections.forEach(t=>{if(t.isOptional)return;let i=y.items[0].isExtendedMenu?null==t?void 0:t.numberOfDishesExt:null==t?void 0:t.numberOfDishes;i&&(e=Math.max(i-l.filter(e=>e.courseId===t.id).length,e))}):e=Math.max(6-l.length,e),C(e>0)},[y.items,l,null==k?void 0:k.sections]),(0,a.jsxs)("div",{className:(0,n.Z)("fixed bottom-0 right-0 z-30 w-full",{"flex h-full flex-col justify-end":b}),children:[(0,a.jsxs)("div",{className:(0,n.Z)((0,o.M)("border",t),"flex h-[60px] gap-x-3 border-t border-opacity-40 bg-ar-beige-light p-3"),children:[(0,a.jsxs)("div",{className:"flex flex-1 justify-between gap-x-2",children:["mealPrep"!==p&&(0,a.jsx)("div",{className:"relative h-9 w-9",children:(0,a.jsx)(J(),{src:k.mainImage.image.asset.url,alt:k.mainImage.alt,blurDataURL:k.mainImage.image.asset.metadata.lqip,placeholder:"blur",fill:!0,style:{objectFit:"cover"}})}),(0,a.jsxs)("button",{type:"button",className:(0,n.Z)("helvetica-12-500 flex flex-1 items-center justify-between",(0,o.M)("text",t)),onClick:()=>{N(!b)},children:["mealPrep"!==p?(0,a.jsxs)("div",{className:"flex flex-col items-start",children:[(0,a.jsx)("p",{children:"Your Menu"}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"font-normal",children:"Starting at: "}),(0,a.jsx)("span",{children:(0,X.T)(f.total)})]})]}):(0,a.jsxs)("div",{className:"flex flex-col items-start",children:[(0,a.jsx)("p",{children:"".concat(l.length," of ").concat(6," dishes selected")}),(0,a.jsxs)("p",{children:[(0,a.jsx)("span",{className:"font-normal",children:"est. "}),(0,a.jsx)("span",{children:(0,X.T)(f.total)})]})]}),(0,a.jsx)(r.k,{icon:(0,a.jsx)(A.Z,{}),width:9,height:6,className:(0,n.Z)("transition-transform duration-300",(0,o.M)("stroke",t),{"rotate-180":!b})})]})]}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsx)(et,{primaryColor:t,className:"h-9",disabled:w,onClick:()=>{N(!1)}})})]},1),(0,a.jsx)(g.M,{mode:"sync",children:b&&(0,a.jsx)(v.E.div,{layout:!0,className:"overflow-y-auto bg-white",initial:"close",animate:"open",exit:"close",variants:{open:{height:"calc(".concat(j.height,"px - 60px)")},close:{height:0}},transition:{duration:.7,ease:"easeInOut"},children:(0,a.jsxs)("div",{className:"flex flex-col p-[30px]",children:[(0,a.jsx)(v.E.p,{className:(0,n.Z)("mb-7",(0,o.M)("text",t),"mealPrep"!==p&&'before:float-right before:h-5 before:w-20 before:content-[""]',{"editorial-20 w-2/3 pl-8 -indent-8 leading-6":"mealPrep"!==p,"helvetica-14-500":"mealPrep"===p}),children:"mealPrep"!==p?k.title:"Your Dishes"}),(0,a.jsx)(v.E.div,{className:"flex flex-1 flex-col gap-y-[30px]",children:"mealPrep"!==p?k.sections.map(e=>(0,a.jsxs)("div",{className:"flex flex-col gap-y-[30px]",children:[(0,a.jsx)("p",{className:(0,n.Z)("helvetica-10-400 uppercase",(0,o.M)("text",t)),children:e.title}),(0,a.jsx)(ei,{section:e,allergens:x,primaryColor:t})]},e.id)):(0,a.jsx)("div",{children:(()=>{let e=l;l.length>6&&(e=l.slice(0,6));let i=e.map(e=>({selectedItem:e,dish:h.find(t=>t._id===e.referenceId)})),s=6-e.length;return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"flex flex-col",children:[i.map(e=>(0,a.jsx)(U,{item:(0,S.T3)(e.dish),selection:e.selectedItem,primaryColor:t,allergens:x},"dish-".concat(e.dish._id))),Array(s).fill(0).map((e,i)=>(0,a.jsx)(U,{placeholder:"Dish ".concat(i+l.length+1),primaryColor:t,allergens:x},"empty-dish-".concat(i)))]})})})()})}),(0,a.jsxs)("div",{className:"mb-10 mt-16",children:[(0,a.jsx)(Q.E,{primaryColor:t}),f.discount<0&&(0,a.jsx)($,{bgColor:i,textColor:s})]})]})})})]})}var el=i(71977);function ea(e){var t,i,s,l,c,h,m,p;let{primaryColor:x,promoNoteBgColor:f,promoNoteTextColor:y,selectedItems:j,menu:b,dishes:N,cookingClass:w,activeService:C,activeStep:k,diets:M,allergens:E}=e,{openModal:I}=(0,L.vR)(),{cartData:Z,estimations:D,goToPrevStep:T}=(0,u.m)(),[O,F]=(0,d.useState)(!0),[_,z]=(0,d.useState)(!1),[B,H]=(0,d.useState)(!1),[q,R]=(0,d.useState)(!0),[
1K,V]=(0,d.useState)(!1),W="gatherings"===C?b:w,ee=new Date(null==Z?void 0:Z.date),es="mealPrep"!==C?[{title:"Number of Guests",value:null==Z?void 0:Z.numberOfPeople},{title:"Date",value:ee?(0,el.pI)(ee):null},{title:"Guest Arrival Time",value:(0,el.hK)(null==Z?void 0:Z.arrivalTime)},{title:"Table Time",value:(0,el.hK)(null==Z?void 0:Z.dinnerTime)}]:[{title:"Day",value:(0,el.$G)(Number(null==Z?void 0:Z.selectDay))},{title:"Time",value:(0,el.Os)(Number(null==Z?void 0:Z.time))},{title:"Start Date",value:ee?(0,el.pI)(ee):null},{title:"Address",value:"".concat(Z.address,",\n            ").concat((null==Z?void 0:Z.secondaryAddress)&&" ".concat(Z.secondaryAddress,","),"\n\n            ").concat(Z.city,", \n            ").concat(Z.state,", \n            ").concat(Z.zipCode," ")}],ea=Z.householdSettings&&Z.householdSettings.diets&&M?(0,Y.E)(Z.householdSettings.diets,M):null,en=Z.householdSettings&&Z.householdSettings.restrictions&&E?(0,Y.E)(Z.householdSettings.restrictions,E):null;return(0,d.useEffect)(()=>{let e=0;(null==W?void 0:W.sections)?W.sections.forEach(t=>{if(t.isOptional)return;let i=Z.items[0].isExtendedMenu?null==t?void 0:t.numberOfDishesExt:null==t?void 0:t.numberOfDishes;i&&(e=Math.max(i-j.filter(e=>e.courseId===t.id).length,e))}):e=Math.max(6-j.length,e),V(e>0)},[Z.items,j,null==W?void 0:W.sections]),(0,d.useEffect)(()=>{F("payment"!==k)},[k]),(0,a.jsxs)("div",{className:(0,n.Z)("fixed right-0 top-0 z-30 flex h-full w-[382px] flex-col justify-between overflow-y-auto border-l border-opacity-40 bg-ar-beige-light",(0,o.M)("border",x)),children:[(0,a.jsxs)("div",{children:["mealPrep"===C&&(0,a.jsxs)("div",{className:(0,n.Z)("mx-[30px] flex flex-col border-b border-opacity-40 pb-5 pt-5",(0,o.M)("border",x)),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{H(!B)},className:"flex w-full items-center justify-between",children:[(0,a.jsx)("p",{className:(0,n.Z)("helvetica-14-500",(0,o.M)("text",x)),children:"Household settings"}),(0,a.jsx)(r.k,{icon:(0,a.jsx)(A.Z,{}),width:9,height:6,className:(0,n.Z)("transition-transform duration-300",(0,o.M)("stroke",x),{"rotate-180":B})})]}),(0,a.jsx)(g.M,{mode:"sync",children:B&&(0,a.jsx)(v.E.div,{layout:!0,className:"overflow-hidden",initial:"close",animate:"open",exit:"close",variants:{open:{height:"auto"},close:{height:0}},transition:{duration:.3},children:(0,a.jsxs)("div",{className:(0,n.Z)("flex flex-1 flex-col gap-y-10 pt-7",(0,o.M)("text",x)),children:[(0,a.jsxs)("div",{className:"helvetica-12-400 flex flex-col gap-2.5",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("p",{className:"opacity-60",children:"Portions"}),(null===(t=Z.householdSettings)||void 0===t?void 0:t.portions)&&(0,a.jsx)("p",{className:"reverse max-w-[160px]",children:P.F0.find(e=>e.slug===Z.householdSettings.portions).title})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("p",{className:"opacity-60",children:"Diets"}),(null===(i=Z.householdSettings)||void 0===i?void 0:i.diets)&&(0,a.jsx)("p",{className:"reverse max-w-[160px]",children:ea})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("p",{className:"opacity-60",children:"Allergies"}),(null===(s=Z.householdSettings)||void 0===s?void 0:s.restrictions.length)>0&&(0,a.jsx)("p",{className:"reverse max-w-[160px]",children:en+(0,G.J)(null===(l=Z.householdSettings)||void 0===l?void 0:l.othersNote)}),(null===(c=Z.householdSettings)||void 0===c?void 0:c.restrictions.length)<=0&&(null===(h=Z.householdSettings)||void 0===h?void 0:h.othersNote)&&(0,a.jsx)("p",{className:"reverse max-w-[160px]",children:null===(m=Z.householdSettings)||void 0===m?void 0:m.othersNote})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("p",{className:"opacity-60",children:"Additional"}),(null===(p=Z.householdSettings)||void 0===p?void 0:p.additionalInformation)&&(0,a.jsx)("p",{className:"reverse max-w-[160px]",children:Z.householdSettings.additionalInformation.substring(0,50)})]})]}),(0,a.jsx)("button",{className:"helvetica-12-500 w-fit self-end",type:"button",onClick:()=>{I(L.Ti.HouseHoldSettings)},children:"edit"})]})})})]}),(0,a.jsxs)("div",{className:(0,n.Z)("flex flex-col py-5",(0,o.M)("border",x),{"mx-[30px] border-b border-opacity-40":"payment"===k&&!O,"px-[30px]":"payment"!==k||O}),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{F(!O)},className:"flex w-full items-center justify-between",children:["mealPrep"!==C&&"payment"!==k?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"relative h-16 w-[85px] overflow-hidden",children:(0,a.jsx)(J(),{src:W.mainImage.image.asset.url,alt:W.mainImage.alt,blurDataURL:W.mainImage.image.asset.metadata.lqip,placeholder:"blur",fill:!0,style:{objectFit:"cover"}})}),(0,a.jsx)("p",{className:(0,n.Z)('before:float-right before:h-5 before:w-20 before:content-[""]',"editorial-18 max-w-[200px] pl-8 text-left -indent-8",(0,o.M)("text",x)),children:W.title})]}):(0,a.jsx)("p",{className:(0,n.Z)("helvetica-14-500",(0,o.M)("text",x)),children:"mealPrep"===C?"".concat("payment"!==k?"Your ":"","Dishes"):"Menu"}),(0,a.jsx)(r.k,{icon:(0,a.jsx)(A.Z,{}),width:9,height:6,className:(0,n.Z)("transition-transform duration-300",(0,o.M)("stroke",x),{"rotate-180":O})})]}),(0,a.jsx)(g.M,{mode:"sync",children:O&&(0,a.jsx)(v.E.div,{className:"overflow-hidden",initial:"close",animate:"open",exit:"close",variants:{open:{height:"auto"},close:{height:0}},transition:{duration:.3},children:(0,a.jsx)("div",{className:"flex flex-1 flex-col gap-y-10 pt-7",children:"mealPrep"!==C?W.sections.map(e=>(0,a.jsxs)("div",{className:"flex flex-col gap-y-[30px]",children:[(0,a.jsx)("p",{className:(0,n.Z)("helvetica-10-400 uppercase",(0,o.M)("text",x)),children:e.title}),(0,a.jsx)(ei,{section:e,allergens:E,primaryColor:x})]},e.id)):(0,a.jsx)("div",{children:(()=>{let e=j;j.length>6&&(e=j.slice(0,6));let t=e.map(e=>({selectedItem:e,dish:N.find(t=>t._id===e.referenceId)})),i=6-e.length;return(0,a.jsxs)(v.E.div,{className:"flex flex-col",children:[t.map(e=>(0,a.jsx)(U,{item:(0,S.T3)(e.dish),selection:e.selectedItem,primaryColor:x,allergens:E},"dish-".concat(e.dish._id))),Array(i).fill(0).map((e,t)=>(0,a.jsx)(U,{placeholder:"Dish ".concat(t+j.length+1),primaryColor:x,allergens:E},"empty-dish-".concat(t)))]})})()})})})})]}),"payment"===k&&(0,a.jsxs)("div",{className:(0,n.Z)("mx-[30px] mb-5 flex flex-col border-b border-opacity-40 pb-5 pt-5",{"pb-2.5":q},(0,o.M)("border",x)),children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{R(!q)},className:"flex w-full items-center justify-between",children:[(0,a.jsx)("p",{className:(0,n.Z)("helvetica-14-500",(0,o.M)("text",x)),children:"cookingClasses"===C?"Class Details":"Services"}),(0,a.jsx)(r.k,{icon:(0,a.jsx)(A.Z,{}),width:9,height:6,className:(0,n.Z)("transition-transform duration-300",(0,o.M)("stroke",x),{"rotate-180":q})})]}),(0,a.jsx)(g.M,{mode:"sync",children:q&&(0,a.jsx)(v.E.div,{layout:!0,className:"overflow-hidden",initial:"close",animate:"open",exit:"close",variants:{open:{height:"auto"},close:{height:0}},transition:{duration:.3},children:(0,a.jsxs)("div",{className:(0,n.Z)("flex flex-1 flex-col ",(0,o.M)("text",x)),children:[(0,a.jsx)("div",{className:"helvetica-12-400 flex flex-col justify-between gap-y-2.5 py-[30px]",children:es.map(e=>(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("p",{className:"opacity-60",children:e.title}),(0,a.jsx)("p",{className:"max-w-[160px] text-right",children:e.value})]},e.title))}
1),(0,a.jsx)("button",{className:"helvetica-12-500 w-fit self-end",type:"button",onClick:()=>{T()},children:"edit"})]})})})]})]}),(0,a.jsxs)("div",{className:(0,n.Z)("sticky bottom-0 flex flex-col bg-ar-beige-light px-[30px] py-3 shadow-[2px_-1px_6px_rgba(0,0,0,0.12)]"),children:[(0,a.jsxs)("button",{className:(0,n.Z)("helvetica-14-500 flex items-center justify-between pb-4",(0,o.M)("text",x)),type:"button",onClick:()=>{z(!_)},children:[(0,a.jsx)("p",{children:"Estimated Total"}),(0,a.jsxs)("div",{className:"flex items-center gap-x-2",children:[!_&&(0,a.jsx)("p",{children:(0,X.T)(D.total)}),(0,a.jsx)(r.k,{icon:(0,a.jsx)(A.Z,{}),width:9,height:6,className:(0,n.Z)("transition-transform duration-300",(0,o.M)("stroke",x),{"rotate-180":!_})})]})]}),(0,a.jsx)(g.M,{mode:"sync",children:_&&(0,a.jsx)(v.E.div,{className:"flex flex-col gap-y-4 overflow-hidden",layout:!0,initial:"close",animate:"open",exit:"close",variants:{open:{opacity:1,height:"auto"},close:{opacity:0,height:0}},transition:{duration:.3},children:(0,a.jsx)(Q.E,{hasTitle:!1,primaryColor:x})})}),(0,a.jsx)(g.M,{mode:"sync",children:D.discount<0&&(0,a.jsx)(v.E.div,{initial:"close",animate:"open",exit:"close",variants:{open:{opacity:1,height:"auto"},close:{opacity:0,height:0}},transition:{duration:.3},children:(0,a.jsx)($,{bgColor:f,textColor:y,className:"mb-4"})})}),(0,a.jsx)(et,{primaryColor:x,disabled:K})]})]})}function en(e){var t,i,s;let l,n,{primaryColor:r,promoNoteBgColor:o,promoNoteTextColor:d,diets:c,allergens:h}=e,{cartData:m,activeService:p,activeStepData:x}=(0,u.m)(),f=(0,q.a)("mealPrep"===p&&"dishes"===x.id?1e3:1024),{data:g,loading:v}=(0,w.TvZ)({skip:"gatherings"!==p,variables:{id:null===(t=m.items[0])||void 0===t?void 0:t.referenceId}}),{data:y,loading:j}=(0,w.KQ6)({skip:"cookingClasses"!==p||!(null===(i=m.items[0])||void 0===i?void 0:i.referenceId),variables:{id:null===(s=m.items[0])||void 0===s?void 0:s.referenceId}}),{data:b,loading:N}=(0,w.Shs)({skip:"mealPrep"!==p});if(!(!(v||j||N)&&(g||y||b))||!x.showSummarySidebar)return(0,a.jsx)(a.Fragment,{});"gatherings"===p&&(l=(0,R.o)(g.menu[0])),"cookingClasses"===p&&(n=(0,R.p)(y.cookingClasses[0]));let S=m.items.map(e=>e.selectedItems).flat();return(0,a.jsx)(a.Fragment,{children:f?(0,a.jsx)(es,{primaryColor:r,promoNoteBgColor:o,promoNoteTextColor:d,selectedItems:S,menu:l,dishes:null==b?void 0:b.dishes,cookingClass:n,activeService:p,activeStep:x.id,allergens:h}):(0,a.jsx)(ea,{primaryColor:r,promoNoteBgColor:o,promoNoteTextColor:d,selectedItems:S,menu:l,dishes:null==b?void 0:b.dishes,cookingClass:n,activeService:p,activeStep:x.id,diets:c,allergens:h})})}var er=i(16265),eo=i(1978);function ed(e){let{primaryColor:t,secondaryColor:i}=e,{dishLibraryCourseId:s,setDishLibraryCourseId:l,addCartItemSelection:c,removeCartItemSelection:h,cartData:m,updateCartSettings:p}=(0,u.m)(),x=(0,q.a)(768),f=(0,_.i)(),[y,j]=(0,d.useState)([]),[b,N]=(0,d.useState)([]),[M,E]=(0,d.useState)([]),[I,Z]=(0,d.useState)([]),[P,D]=(0,d.useState)([]),[T,O]=(0,d.useState)(""),[F,L]=(0,d.useState)(null),[A]=(0,w.rMg)(),[z]=(0,w.NfB)(),[B]=(0,w.USf)(),H=(0,o.M)("text",t),R=(0,o.M)("bg",i),Y=(0,o.M)("border",t),G=(0,o.M)("placeholder:text",t),U=f.height,K=(0,d.useMemo)(()=>{var e;return(null===(e=m.items[0])||void 0===e?void 0:e.selectedItems.filter(e=>{var t;return e.courseId===s&&(null===(t=m.dishesSelectedFromLibrary)||void 0===t?void 0:t.some(t=>t.id===e.referenceId))}).length)>0},[m.dishesSelectedFromLibrary,m.items,s]),J=(0,d.useCallback)(async()=>{var e;let{data:t}=await A({variables:{id:m.items[0].referenceId}});E((null==t?void 0:null===(e=t.cuisine[0])||void 0===e?void 0:e.cuisine)?null==t?void 0:t.cuisine[0].cuisine.map(e=>e.title):[])},[m.items,A]),X=(0,d.useCallback)(async()=>{var e;let{data:t}=await z({variables:{id:m.items[0].referenceId}});Z((null==t?void 0:null===(e=t.seasonality[0])||void 0===e?void 0:e.seasonality)?null==t?void 0:t.seasonality[0].seasonality.map(e=>e.title):[])},[m.items,z]),Q=(0,d.useCallback)(()=>{let e=y.filter(e=>!e.title.startsWith("1"));N(M&&M.length>0||I&&I.length>0?e.filter(e=>{let t=0===M.length||(null==M?void 0:M.some(t=>e.cuisine.includes(t))),i=0===I.length||(null==I?void 0:I.some(t=>e.seasonality.includes(t)));return t&&i}):e)},[y,M,I]),V=e=>()=>{L(e)},W=()=>{L(null)},$=e=>{e.preventDefault(),l(""),O(""),L("")},ee=e=>{var t,i,a,n,r,o;
1if((null===(t=m.items[0])||void 0===t?void 0:t.selectedItems.filter(t=>t.courseId===s&&t.referenceId===e.currentTarget.id).length)===0){let t=null===(i=m.items[0])||void 0===i?void 0:i.uuid,l=null===(n=m.items[0])||void 0===n?void 0:null===(a=n.selectedItems.find(e=>{var t;return e.courseId===s&&(null===(t=m.dishesSelectedFromLibrary)||void 0===t?void 0:t.some(t=>t.id===e.referenceId))}))||void 0===a?void 0:a.referenceId;K&&(h((0,eo.m)(l,t,s)),p({dishesSelectedFromLibrary:null===(o=m.dishesSelectedFromLibrary)||void 0===o?void 0:o.filter(e=>e.id!==l)})),c((0,eo.m)(e.currentTarget.id,t,s));let d=P.filter(t=>t.id===e.currentTarget.id),u=(null===(r=m.dishesSelectedFromLibrary)||void 0===r?void 0:r.filter(e=>e.id!==l))||[];u.push({id:d[0].id,slug:d[0].slug,title:d[0].title,ingredients:d[0].ingredients,diet:d[0].diets}),p({dishesSelectedFromLibrary:u})}l(""),O(""),L("")};return(0,d.useEffect)(()=>{m.items[0]&&(E([]),Z([]),J(),X())},[m.items,J,X]),(0,d.useEffect)(()=>{(async()=>{let{data:e}=await B();j((0,S.s9)(e.dishes).map(S.T3))})()},[B]),(0,d.useEffect)(()=>{Q()},[M,Q,I]),(0,d.useEffect)(()=>{D([...b.filter(e=>e.title.toLowerCase().includes(T.toLowerCase())).sort((e,t)=>e.title.localeCompare(t.title)),...b.filter(e=>!e.title.toLowerCase().includes(T.toLowerCase())).filter(e=>{var t;return null===(t=e.ingredients)||void 0===t?void 0:t.toLowerCase().includes(T.toLowerCase())}).sort((e,t)=>e.title.localeCompare(t.title))])},[b,T]),(0,a.jsx)(C.O,{onCloseClick:$,show:!!s,themeColor:t,contentContainerClassName:"scrollbar-hidden",contentContainerStyle:{height:"".concat(U,"px")},hideButton:!0,variant:C.V.DishLibrary,children:(0,a.jsxs)("article",{className:(0,n.Z)(H,R,"flex min-h-full flex-col items-center gap-7 md:gap-16"),children:[(0,a.jsx)("button",{type:"button",onClick:$,className:"self-end p-[30px]",children:(0,a.jsx)(r.k,{width:x?10:14,height:x?10:14,icon:(0,a.jsx)(k.Z,{})})}),(0,a.jsxs)("div",{className:"flex max-w-[675px] flex-col px-[30px] pb-[60px] md:w-[675px]",children:[(0,a.jsx)("p",{className:"editorial-32",children:"Select from off menu dishes"}),(0,a.jsx)("p",{className:"garamond-16 mt-[5px]",children:"Don't see what you want? Choose something else from our curated dish library."}),(0,a.jsxs)("div",{className:(0,n.Z)(Y,"mt-10 flex flex-row items-center gap-x-3 border-b border-opacity-80 pb-[10px]"),children:[(0,a.jsx)(r.k,{width:x?10:14,height:x?10:14,icon:(0,a.jsx)(er.Z,{})}),(0,a.jsx)("input",{value:T,onChange:e=>{O(e.target.value)},placeholder:"Search by ingredient or dish",className:(0,n.Z)(G,"helvetica-14-500 form-input w-full rounded-none bg-transparent outline-none")})]}),(0,a.jsxs)("div",{className:"mt-5",children:[T&&P&&P.length>0&&P.map(e=>(0,a.jsxs)("div",{id:e.id,onPointerOver:V(e.id),onPointerOut:W,className:(0,n.Z)(Y,"relative border-b border-opacity-40 py-5"),children:[(0,a.jsxs)("div",{className:"flex flex-col justify-between gap-1 md:flex-row",children:[(0,a.jsxs)("div",{className:"max-w-[calc(100%-60px)] gap-1 md:max-w-[440px]",children:[(0,a.jsx)("p",{className:"helvetica-14-500",children:e.title}),(0,a.jsx)("p",{className:"garamond-16",children:e.ingredients})]}),e.diets&&!(e.id===F&&!x)&&(0,a.jsx)("ul",{className:"helvetica-10-400 flex h-fit",children:e.diets.map(e=>(0,a.jsx)("li",{className:(0,n.Z)(Y,"border-l border-opacity-40 px-2 first:border-l-0 first:pl-0"),children:e.abbreviation},e.id))})]}),(0,a.jsx)(g.M,{initial:!x,children:(e.id===F||x)&&(0,a.jsx)(v.E.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},className:"absolute right-0 top-5",children:(0,a.jsx)("button",{id:e.id,type:"button",className:(0,n.Z)(H,R,Y,"helvetica-12-500 z-1 h-[26px] w-[47px] border border-opacity-60 md:h-9 md:w-[131px]"),onClick:ee,children:x?"Add":"Add Dish"})},e.id)})]},e.id)),T&&P&&0===P.length&&(0,a.jsx)("p",{className:"garamond-14 pt-5",children:'None of our dishes match your request. Try searching another dish or ingredient, e.g. "salad," "salmon," or "Pork & Peaches.'})]})]})]})})}var ec=i(15219),eh=i(5037);function eu(e){var t,i,s;let{pageData:l}=e,{activeStepData:r,activeService:c,cartData:h}=(0,u.m)(),[m,p]=(0,d.useState)(""),x=null===(t=h.items[0])||void 0===t?void 0:t.referenceId,[f]=(0,w.trH)(),[y]=(0,w.Q$i)(),j=(0,d.useCallback)(async()=>{var e,t,i,s;let l;if("gatherings"===c){let{data:i}=await f({variables:{id:x}});l=null===(t=i.menu)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.title}else if("cookingClasses"===c){let{data:e}=await y({variables:{id:x}});l=null===(s=e.cookingClasses)||void 0===s?void 0:null===(i=s[0])||void 0===i?void 0:i.title}l&&p(l)},[c,y,f,x]);(0,d.useEffect)(()=>{x&&j()},[j,x]);let{primaryColor:N,secondaryColor:S,noteFontColor:C,noteBackgroun
1dColor:k,serviceDescription:M,menuHeader:E,menuSubheader:I,dishesHeader:Z,dishesSubheader:D,serviceHeader:T,serviceSubheader:O,paymentHeader:F,paymentSubheader:L}=(0,b.n)(c,l.allBookingServiceSettings),A=(0,o.M)("text",N),_=(e,t)=>{switch(e){case"menu":case"cooking-classes":return"header"===t?E:I;case"dishes":return"header"===t?Z:D;case"service":return"header"===t?T:O;case"payment":return"header"===t?F:L;default:return""}},z=(_(r.id,"header")||P.jp[r.heading]).replace("menuTitle",m),B=null===(i=_(r.id,"subheader")||P.jp[r.subheader])||void 0===i?void 0:i.replace("menuTitle",m);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eh.U,{title:r.seoTitle||l.metaData.title,description:l.metaData.description,images:(null===(s=l.metaData)||void 0===s?void 0:s.image)?[l.metaData.image]:[],noIndex:!0}),(0,a.jsxs)("div",{className:(0,n.Z)(A,"relative bg-ar-beige-light",{"mb-[60px] lg:w-[calc(100vw-384px)]":(null==r?void 0:r.id)!=="menu"&&(null==r?void 0:r.id)!=="cooking-classes"&&!("mealPrep"===c&&"dishes"===r.id),"mb-[60px] small-lg:w-[calc(100vw-384px)]":"mealPrep"===c&&"dishes"===r.id}),children:[(0,a.jsx)("div",{className:"flex justify-center",children:(0,a.jsxs)("header",{className:(0,n.Z)("relative flex w-full flex-col py-8 px-8 md:py-14 xl:px-0",{"max-w-[1206px]":!r.showSummarySidebar,"max-w-[792px] 3xl:max-w-[1060px]":r.showSummarySidebar}),children:[(0,a.jsx)("h1",{className:"editorial-32 sm:editorial-48 max-w-[650px] opacity-0",children:z}),B&&(0,a.jsx)("h5",{className:"garamond-18 mt-5 max-w-[650px] opacity-0",children:B}),(0,a.jsx)(g.M,{mode:"sync",children:(0,a.jsxs)(v.E.div,{className:"absolute max-w-[650px] pr-8",initial:{opacity:0,x:100},animate:{opacity:1,x:0},exit:{opacity:0,x:-100},transition:{duration:.3},children:[(0,a.jsx)("h1",{className:"editorial-32 sm:editorial-48",children:z}),B&&(0,a.jsx)("h5",{className:"garamond-18 mt-5",children:B})]},null==r?void 0:r.id)})]})}),(0,a.jsx)("div",{className:(0,n.Z)("flex",{"justify-center":!("mealPrep"===c&&"dishes"===r.id)}),children:(0,a.jsx)(g.M,{mode:"wait",children:(0,a.jsx)(v.E.div,{className:(0,n.Z)("w-full",{"max-w-[1206px] px-8 xl:px-0":!r.showSummarySidebar&&!("mealPrep"===c&&"dishes"===r.id),"max-w-[792px] px-8 xl:px-0 3xl:max-w-[1060px]":r.showSummarySidebar&&!("mealPrep"===c&&"dishes"===r.id),"px-0":"mealPrep"===c&&"dishes"===r.id}),initial:{opacity:0,x:100},animate:{opacity:1,x:0},exit:{opacity:0,x:-100},transition:{duration:.3},children:r.component&&r.component({primaryColor:N,secondaryColor:S,serviceDescription:M,pageData:l,noteFontColor:C,noteBackgroun
1dColor:k})},null==r?void 0:r.id)})})]})]})}function em(e){let{pageData:t}=e;return(0,a.jsx)(eu,{pageData:t})}em.Layout=function(e){var t,i;let s,{children:l,pageData:n}=e,{openModal:r}=(0,L.vR)(),o=(0,y.useRouter)(),{cartData:c,activeBookingStepIndex:h,activeService:m,activeServiceData:p,isContextDataLoaded:j,goToNextStep:C,dishLibraryCourseId:k}=(0,u.m)(),[M,E]=(0,d.useState)(!0),I=(()=>{if(o.query){let e=o.query.item;return Array.isArray(e)?e[0]:e}return null})(),{data:Z}=(0,w.NlI)({skip:!I,variables:{slug:I}});s=Z&&Z.menuPost.length>0?(0,S.d6)((0,S.s9)(Z.menuPost[0])):Z&&Z.classPost.length>0?(0,S.tj)((0,S.s9)(Z.classPost[0])):null;let P=(()=>{if(o.query){let e=o.query.dish;return Array.isArray(e)?e[0]:e}return null})(),D=(0,w.sLD)({skip:!P,variables:{slug:P}}).data,T=D?(0,S.T3)((0,S.s9)(D.dish[0])):null,O=(0,ec.u)(),A=O?null===(t=(0,S.s9)(O))||void 0===t?void 0:t.map(e=>(0,S.Y)(e)):null,_=(0,w.vtL)().data,z=_?null===(i=(0,S.s9)(_.diets))||void 0===i?void 0:i.map(e=>(0,S.p0)(e)):null;if((0,d.useEffect)(()=>{"mealPrep"===m&&M&&r(L.Ti.HouseHoldSettings),E(!1)},[m,M,r]),(0,d.useEffect)(()=>{("gatherings"===m||"cookingClasses"===m)&&M&&c.items.length>0&&0===h&&C()},[h,m,c.items.length,C,M]),!j||!m)return null;if("gatherings"===m&&!c.numberOfPeople)return o.push("".concat(x.y.home({bookService:null}))),null;
1let{primaryColor:B,secondaryColor:q,noteBackgroundColor:R,noteFontColor:Y}=(0,b.n)(m,n.allBookingServiceSettings);return(0,a.jsxs)(a.Fragment,{children:[k&&(0,a.jsx)(ed,{primaryColor:B,secondaryColor:q}),(0,a.jsx)(N._,{post:s}),(0,a.jsx)(F,{dish:T,allergens:A,primaryColor:B,secondaryColor:q}),(0,a.jsx)(H,{allergens:A,diets:z,primaryColor:B,secondaryColor:q}),(0,a.jsx)(en,{primaryColor:B,promoNoteBgColor:R,promoNoteTextColor:Y,allergens:A,diets:z}),(0,a.jsxs)("div",{className:"flex min-h-screen flex-col overflow-hidden bg-ar-beige-light",children:[p&&"steps"in p&&(0,a.jsx)(f,{backgroundColor:B,textColor:q,breadcrumbs:p.steps,activeStepIndex:h}),(0,a.jsx)(g.M,{initial:!1,mode:"popLayout",children:(0,a.jsx)(v.E.main,{className:"flex flex-1 flex-col",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3},children:l},o.pathname)})]})]})}},5037:function(e,t,i){i.d(t,{U:function(){return r}});var s=i(97458);i(52983);var l=i(74870),a=i(37249),n=i(90015);function r(e){let{title:t,description:i,images:r,article:o,recipe:d,noIndex:c,openGraphTitle:h,openGraphDescription:u}=e,{siteName:m,siteDescription:p}=(0,n.K)(),x={noIndex:c,description:i||p,images:r||l.nI.images,url:l.nI.url,siteName:m,ogTitle:"".concat(l.nI.siteName," | ").concat(t||l.nI.title)},f=Array.isArray(x.images)?x.images.filter(e=>!!e&&"object"==typeof e&&"string"==typeof e.url&&!!e.url).map(e=>({url:e.url,alt:e.alt||x.description||l.nI.description})):[],g=null,v=null;return o&&(g={url:"",title:"",images:[],datePublished:"",authorName:"",description:""}),d&&(v={name:"",description:"",authorName:"",ingredients:[],instructions:[]}),(0,s.jsxs)(s.Fragment,{children:[g&&(0,s.jsx)(a.dX,{...g}),v&&(0,s.jsx)(a.P8,{...v}),(0,s.jsx)(a.PB,{title:t,titleTemplate:"%s | ".concat(x.siteName),defaultTitle:"".concat(l.nI.title," | ").concat(x.siteName),description:x.description,noindex:c,nofollow:c,openGraph:{url:x.url,title:h||x.ogTitle,description:u||x.description,images:f.length?f:void 0,siteName:l.nI.siteName,locale:"en_US"},twitter:{site:l.nI.twitterSite,cardType:"summary_large_image"}})]})}},12496:function(e,t,i){i.d(t,{n:function(){return l}});var s=i(17111);function l(e,t){let i=s.DM.services[e].slug,l=(null==t?void 0:t.find(e=>e.pageSlug===i))||s.DM.services[e];return l?{...l}:null}},98644:function(e,t,i){i.d(t,{E:function(){return s}});function s(e,t,i){let s=t.filter(e=>e.title);return e.map(e=>{let t=s.find(t=>t.id===e),l=t?t.title:null;return i?"".concat(i," ").concat(l):l}).join(", ")}},73628:function(e,t,i){i.d(t,{J:function(){return s}});let s=(e,t)=>"".concat(e?", ".concat(t||""," ").concat(e):"")}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.