1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="5d72379b-e456-a06f-b97b-75b74c446ce4")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,296626,e=>{"use strict";var t=e.i(271645),i=e.i(174080),r=e.i(820783),s=e.i(934620),a=e=>{var a;let n,l,{present:d,children:c}=e,m=function(e){var r,a;let[n,l]=t.useState(),d=t.useRef({}),c=t.useRef(e),m=t.useRef("none"),[u,f]=(r=e?"mounted":"unmounted",a={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},t.useReducer((e,t)=>a[e][t]??e,r));return t.useEffect(()=>{let e=o(d.current);m.current="mounted"===u?e:"none"},[u]),(0,s.useLayoutEffect)(()=>{let t=d.current,i=c.current;if(i!==e){let r=m.current,s=o(t);e?f("MOUNT"):"none"===s||t?.display==="none"?f("UNMOUNT"):i&&r!==s?f("ANIMATION_OUT"):f("UNMOUNT"),c.current=e}},[e,f]),(0,s.useLayoutEffect)(()=>{if(n){let e=e=>{let t=o(d.current).includes(e.animationName);e.target===n&&t&&i.flushSync(()=>f("ANIMATION_END"))},t=e=>{e.target===n&&(m.current=o(d.current))};return n.addEventListener("animationstart",t),n.addEventListener("animationcancel",e),n.addEventListener("animationend",e),()=>{n.removeEventListener("animationstart",t),n.removeEventListener("animationcancel",e),n.removeEventListener("animationend",e)}}f("ANIMATION_END")},[n,f]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:t.useCallback(e=>{e&&(d.current=getComputedStyle(e)),l(e)},[])}}(d),u="function"==typeof c?c({present:m.isPresent}):t.Children.only(c),f=(0,r.useComposedRefs)(m.ref,(a=u,(l=(n=Object.getOwnPropertyDescriptor(a.props,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?a.ref:(l=(n=Object.getOwnPropertyDescriptor(a,"ref")?.get)&&"isReactWarning"in n&&n.isReactWarning)?a.props.ref:a.props.ref||a.ref));return"function"==typeof c||m.isPresent?t.cloneElement(u,{ref:f}):null};function o(e){return e?.animationName||"none"}a.displayName="Presence",e.s(["Presence",0,a])},431343,e=>{"use strict";let t=(0,e.i(475254).default)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["Play",0,t],431343)},859682,e=>{"use strict";var t=e.i(843476);e.s(["default",0,({minutes:e})=>(0,t.jsx)("span",{children:(e=>{if(e<60)return`${e} min`;{let t=Math.floor(e/60),i=e%60;return`${t} hr${t>1?"s":""}${i>0?` ${i} min`:""}`}})(e)})])},410949,e=>{"use strict";let t="https://storage.googleapis.com/foodie-menu-videos",i=["mp4","mov","webm","mkv","avi","m4v"];e.s(["getRecipeVideoUrls",0,function(e){let r=e.toLowerCase().replace(/[^a-zA-Z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||e,s=`${t}/videos/${r}/${r}`,a=`${t}/${r}`,o=`${t}/${e}`,n=`${s}.mp4`,l=`${a}.mp4`,d=[];return i.forEach(e=>{d.push(`${s}.${e}`)}),i.forEach(e=>{d.push(`${a}.${e}`)}),i.forEach(e=>{d.push(`${o}.${e}`)}),{primary:n,fallback:l,candidates:d}},"getStepVideoUrls",0,function(e){if(e.startsWith("http"))return{primary:e,fallback:null};if(e.startsWith("videos/"))return{primary:`${t}/${e}`,fallback:null};if(e.match(/-step-\d+/)){let i=e.match(/\.(mp4|mov|avi|webm)$/i),r=e.replace(/-step-\d+.*$/,"");if(i)return{primary:`${t}/videos/${r}/${e}`,fallback:`${t}/${e}`};let s=`${t}/videos/${r}/${e}`,a=`${t}/${e}`,o=[];return o.push(`${s}.mp4`),o.push(`${s}.mov`),o.push(`${a}.mp4`),o.push(`${a}.mov`),{primary:`${s}.mp4`,fallback:`${a}.mp4`,candidates:o}}let i=e.match(/\.(mp4|mov|avi|webm)$/i)?e:`${e}.mp4`;return{primary:`${t}/${i}`,fallback:null}}])},123560,e=>{"use strict";function t(e,t){if(t){let i=e.split("/").pop();return`${t}/${i}.png`}return`${e}.png`}e.i(410949);let i=`${"https://jhsnzyqggpslvlbzypef.supabase.co".replace(/\/+$/,"")}/storage/v1/object/public/recipe-images`;e.s(["PLACEHOLDER_RECIPE_IMAGE",0,"/placeholder-recipe.svg","imageFromPath",0,(e,r,s)=>{let a=t(e,r),o=`${i}/${a}`;return s?`${o}?v=${new Date(s).getTime()}`:o},"recipeImageStoragePath",0,t,"sourceImageUrl",0,function(e,t){return`${i}/${e}/${t}`},"titleFromPath",0,e=>(e.includes("/")?e.split("/").pop():e).replace(/-/g," ").replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase())])},706482,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=(e,t,i,r,s,a,o,n)=>
2{let l=document.documentElement,d=["light","dark"];function c(t){var i;(Array.isArray(e)?e:[e]).forEach(e=>{let i="class"===e,r=i&&a?s.map(e=>a[e]||e):s;i?(l.classList.remove(...r),l.classList.add(a&&a[t]?a[t]:t)):l.setAttribute(e,t)}),i=t,n&&d.includes(i)&&(l.style.colorScheme=i)}if(r)c(r);else try{let e=localStorage.getItem(t)||i,r=o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(r)}catch(e){}},s=i.createContext(void 0),a={setTheme:e=>{},themes:[]};i.memo(({forcedTheme:e,storageKey:t,attribute:s,enableSystem:a,enableColorScheme:o,defaultTheme:n,value:l,themes:d,nonce:c,scriptProps:m})=>{let u=JSON.stringify([s,t,n,e,d,l,a,o]).slice(1,-1);return i.createElement("script",{...m,suppressHydrationWarning:!0,nonce:"u"<typeof window?c:"",dangerouslySetInnerHTML:{__html:`(${r.toString()})(${u})`}})});var o=e.i(846696);let n={"--normal-bg":"#ffffff","--normal-text":"#6c3f18","--normal-border":"rgba(108, 63, 24, 0.18)","--success-bg":"#ffffff","--success-text":"#6c3f18","--success-border":"rgba(234, 96, 47, 0.32)","--error-bg":"#ffffff","--error-text":"#6c3f18","--error-border":"rgba(220, 38, 38, 0.32)"};e.s(["Toaster",0,({...e})=>{var r;let{theme:l="system"}=null!=(r=i.useContext(s))?r:a,{richColors:d,toastOptions:c,style:m,...u}=e;return(0,t.jsx)(o.Toaster,{theme:l,className:"toaster group",style:{...n,...m},toastOptions:{classNames:{icon:"[&_svg]:fill-foodie-orange [&_svg]:text-foodie-orange data-[type=error]:[&_svg]:fill-red-600 data-[type=error]:[&_svg]:text-red-600",description:"text-foodie-brown/70",actionButton:"!bg-foodie-orange !text-white hover:!bg-foodie-orange/90",cancelButton:"!bg-foodie-light-brown !text-foodie-brown hover:!bg-foodie-light-brown/90"},...c},...u})}],706482)},166385,e=>{"use strict";var t=e.i(266027),i=e.i(151288),r=e.i(656135);let s=e=>["user-lists",e];e.s(["useUserLists",0,function(e){return(0,t.useQuery)({queryKey:s(e),enabled:!!e,queryFn:async()=>{let t=(0,i.createClient)(),{data:s,error:a}=await t.from("lists").select("id, name, created_at, list_recipes(recipe_id)").eq("user_id",e).order("created_at");if(a)throw console.error("Error fetching user lists:",a),(0,r.captureError)(a,{flow:"lists",surface:"client",operation:"useUserLists",userId:e}),a;return s.map(e=>({id:String(e.id),name:e.name,recipeIds:e.list_recipes.map(e=>e.recipe_id)}))}})},"userListsQueryKey",0,s])},331261,e=>{"use strict";var t=e.i(843476),i=e.i(225913),r=e.i(647163);let s=(0,i.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});e.s(["Badge",0,function({className:e,variant:i,...a}){return(0,t.jsx)("div",{className:(0,r.cn)(s({variant:i}),e),...a})}])},166489,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(647163);let s=i.forwardRef(({className:e,type:i,...s},a)=>(0,t.jsx)("input",{type:i,className:(0,r.cn)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
2ing-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...s}));s.displayName="Input",e.s(["Input",0,s])},453842,e=>{"use strict";var t=e.i(843476),i=e.i(271645);e.i(174080);var r=e.i(991918),s=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,s)=>{let a=i.forwardRef((e,i)=>{let{asChild:a,...o}=e,n=a?r.Slot:s;return"u">typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,t.jsx)(n,{...o,ref:i})});return a.displayName=`Primitive.${s}`,{...e,[s]:a}},{}),a=i.forwardRef((e,i)=>(0,t.jsx)(s.label,{...e,ref:i,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var o=e.i(225913),n=e.i(647163);let l=(0,o.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=i.forwardRef(({className:e,...i},r)=>(0,t.jsx)(a,{ref:r,className:(0,n.cn)(l(),e),...i}));d.displayName=a.displayName,e.s(["Label",0,d],453842)},221345,e=>{"use strict";let t=(0,e.i(475254).default)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);e.s(["Link",0,t],221345)},729607,571930,626761,e=>{"use strict";var t=e.i(843476),i=e.i(123560),r=e.i(522016),s=e.i(859682),a=e.i(511152),o=e.i(563181),n=e.i(991279),l=e.i(911321),d=e.i(453842),c=e.i(271645),m=e.i(814489),u=e.i(151288),f=e.i(818344),p=e.i(912598),h=e.i(166385),x=e.i(166489),g=e.i(706482),b=e.i(846696),y=e.i(278669),v=e.i(475254);let w=(0,v.default)("Bookmark",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]]);e.s(["Bookmark",0,w],571930);let N=(0,v.default)("BookmarkCheck",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z",key:"169p4p"}],["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}]]);var j=e.i(662434),C=e.i(552105);let S=e=>{var i,r;let s=(0,u.createClient)(),{foodieUser:a}=(0,f.useFoodieUser)(),[v,S]=(0,c.useState)(""),[$,I]=(0,c.useState)((i=e.lists||[],r=e.recipeId,i?i.map(e=>({id:e.id,name:e.name,isIncluded:e.recipes?.some(e=>e.id===r)||!1})):[])),[R,T]=(0,c.useState)(!1),[P,E]=(0,c.useState)(!1),[_,k]=(0,c.useState)(!1),[A,F]=(0,c.useState)(!1),O=a?.authUser?.id,L=(0,p.useQueryClient)(),{data:U}=(0,h.useUserLists)(e.lists?void 0:O);(0,c.useEffect)(()=>{U&&I(U.map(t=>({id:t.id,name:t.name,isIncluded:t.recipeIds.includes(e.recipeId)})))},[U,e.recipeId]);let D=()=>L.invalidateQueries({queryKey:(0,h.userListsQueryKey)(O)}),B=async()=>{if((0,y.track)("Create Saved Recipes"),0===$.length)try{let t=a?.authUser;if(t){let i=await (0,m.createList)(s,t.id,{name:"Saved Recipes"});I(e=>[...e,{id:i.id,name:i.name,isIncluded:!1}]),await (0,m.addRecipeToList)(s,i.id,e.recipeId),D()}}catch(e){console.error("Error Adding List:",e)}},M=e.open??_,W=t=>{t&&B(),e.onOpenChange?e.onOpenChange(t):k(t)},Y=()=>{T(!1),E(!1),W(!1)},z=async t=>{(0,y.track)("List Toggle");try{t.isIncluded?(q(t.id,!1),b.toast.success(`Recipe removed from ${t.name}`),await (0,m.removeRecipeFromList)(s,t.id,e.recipeId)):(q(t.id,!0),b.toast.success(`Recipe saved to ${t.name}`),await (0,m.addRecipeToList)(s,t.id,e.recipeId)),D(),Y()}catch(e){console.error("Error adding recipe to list:",e)}},q=(e,t)=>{I(i=>i.map(i=>i.id===e?{...i,isIncluded:t}:i))},H=async()=>{(0,y.track)("Create New List");try{if(!a?.authUser?.id)throw Error("User not authenticated");let t=await (0,m.createList)(s,a.authUser.id,{name:v});await (0,m.addRecipeToList)(s,t.id,e.recipeId),D(),I(e=>[...e,{id:t.id,name:v,isIncluded:!0}]),b.toast.success(`Recipe saved to ${v}`),Y(),S("")}catch(e){console.error("Error creating new list:",e),"23505"===e.code&&b.toast.error("You already have a list with that name")}},V=()=>(0,t.jsx)("div",{className:"cursor-pointer",children:$.some(e=>e.isIncluded)?(0,t.jsx)(N,{className:"mx-auto w-full h-full text-foodie-orange"}):(0,t.jsx)(w,{className:"mx-auto w-full h-full text-foodie-orange"})}),K=()=>(0,t.jsx)("div",{className:"grid gap-4",children:(0,t.jsx)("div",{className:"grid divide-y divide-foodie-beige/80",children:a?.user?(0,t.jsxs)(t.Fragment,{children:[$?.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded-md",children:[(0,t.jsx)(d.Label,{htmlFor:`list-${e.id}`,className:"flex-grow p-4 text-sm sm:text-base font-light text-foodie-brown cursor-pointer",children:e.name}),(0,t.jsx)(l.Checkbox,{id:`list-${e.id}`,checked:e.isIncluded,onCheckedChange:t=>z(e),className:"h-6 w-6 rounded-full border m-4 border-foodie-brown text-white data-[state=checked]:border-2 data-[state=checked]:bg-foodie-orange data-[state=checked]:border-foodie-orange data-[state=checked]:text-white focus:ring-foodie-orange focus-visible:ring-transparent"})]},e.id)),(0,t.jsxs)("div",{className:"flex w-full items-center space-x-2",children:[(0,t.jsx)(x.Input,{placeholder:"New List Name",value:v,onCh
2ange:e=>S(e.target.value),className:"flex-grow p-4 border-0 text-foodie-brown text-sm sm:text-base font-light focus-visible:ring-0 !ring-offset-0 placeholder:text-foodie-light-brown",onKeyDown:e=>{"Enter"===e.key&&H()}}),(0,t.jsx)("button",{className:"p-4 text-sm sm:text-base text-foodie-brown disabled:opacity-50 disabled:cursor-not-allowed",type:"submit",disabled:!v,onClick:H,children:"Add"})]})]}):(0,t.jsx)("div",{className:"p-4",children:(0,t.jsxs)("p",{className:"text-lg",children:[(0,t.jsx)("button",{onClick:()=>F(!0),className:"font-bold text-foodie-brown hover:underline hover:text-foodie-brown active:text-foodie-brown focus:ring-0 hover:ring-0 focus:outline-none",children:"Create an account"})," ","to save recipes!"]})})})});return e.hideTrigger?(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Toaster,{richColors:!0,expand:!0,position:"top-right",className:"text-foodie-brown"}),(0,t.jsx)(C.Dialog,{open:M,onOpenChange:W,children:(0,t.jsxs)(C.DialogContent,{className:"rounded-md border-foodie-brown/20 bg-white text-foodie-brown",onOpenAutoFocus:B,children:[(0,t.jsxs)(C.DialogHeader,{children:[(0,t.jsx)(C.DialogTitle,{children:"Save recipe"}),(0,t.jsx)(C.DialogDescription,{className:"text-foodie-brown/70",children:"Choose a list or create a new one."})]}),K(),(0,t.jsx)(C.DialogFooter,{children:(0,t.jsx)("button",{type:"button",onClick:()=>W(!1),className:"rounded-md border border-foodie-brown/30 px-4 py-2 text-sm font-medium text-foodie-brown transition-colors hover:bg-foodie-beige/60",children:"Close"})})]})}),(0,t.jsx)(j.default,{isOpen:A,onOpenChange:F,showUpsell:!1})]}):(0,t.jsxs)("div",{children:[(0,t.jsx)(g.Toaster,{richColors:!0,expand:!0,position:"top-right",className:"text-foodie-brown"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"md:hidden",children:(0,t.jsxs)(n.Drawer,{open:R,onOpenChange:T,preventScrollRestoration:!1,children:[(0,t.jsx)(n.DrawerTrigger,{asChild:!0,children:V()}),(0,t.jsxs)(n.DrawerContent,{className:"focus:outline-none",onCloseAutoFocus:Y,onOpenAutoFocus:B,children:[K(),(0,t.jsx)(n.DrawerFooter,{children:(0,t.jsx)(n.DrawerClose,{children:(0,t.jsx)("button",{children:"Close"})})})]})]})}),(0,t.jsx)("div",{className:"hidden md:inline",children:(0,t.jsxs)(o.Popover,{open:P,onOpenChange:E,children:[(0,t.jsx)(o.PopoverTrigger,{asChild:!0,children:V()}),(0,t.jsx)(o.PopoverContent,{className:"w-64 p-0",align:"end",onCloseAutoFocus:Y,onOpenAutoFocus:B,children:K()})]})})]}),(0,t.jsx)(j.default,{isOpen:A,onOpenChange:F,showUpsell:!1})]})};e.s(["RecipeSave",0,S],626761);var $=e.i(331261),I=e.i(431343);let R=({size:e="medium"})=>{let i={medium:{container:"px-2 py-1 top-2 right-2",icon:"w-3 h-3 mr-1",text:"text-xs"},large:{container:"px-3 py-1.5 top-4 right-4",icon:"w-4 h-4 mr-1.5",text:"text-sm"}},{container:r,icon:s,text:a}=i[e]||i.medium;return(0,t.jsxs)("div",{className:`absolute bg-foodie-orange text-white rounded-full flex items-center ${r}`,children:[(0,t.jsx)(I.Play,{className:s}),(0,t.jsx)("span",{className:a,children:"Video Guides"})]})};var T=e.i(567593),P=e.i(221345),E=e.i(532932),_=e.i(536849);e.s(["RecipeItem",0,e=>{let[o,n]=(0,c.useState)(!1),[l,d]=(0,c.useState)(!1),[m,u]=(0,c.useState)(!1),f=e.recipe,p=!!f.user_id,h="url"===f.source_type?(0,_.getFaviconUrl)(f.source_url):null,x="url"===f.source_type?(0,_.getProvenanceLabel)(f.source_url):null,g=!!(h&&x),b=e.completionFade?"opacity-0 animate-fade-in":"";return(0,t.jsx)("li",{children:(0,t.jsx)(E.TooltipProvider,{delayDuration:200,children:(0,t.jsxs)("div",{className:`relative group ${e.skipAnimation?"opacity-100":"opacity-0 animate-fade-in"}`,style:{...!e.skipAnimation&&{animationDelay:`${Math.min(50*e.index,200)}ms`,animationFillMode:"forwards"}},children:[(0,t.jsx)(r.default,{href:`/recipes/${e.recipe.path}`,onClick:()=>{n(!0)},className:"block",children:(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("img",{src:p&&l?i.PLACEHOLDER_RECIPE_IMAGE:(0,i.imageFromPath)(e.recipe.path,f.user_id,f.updated_at),alt:(0,i.titleFromPath)(e.recipe.path),loading:"lazy",className:`w-full aspect-square object-cover border-2 border-solid rounded-md border-foodie-brown shadow-foodie-card-shadow-yellow ${b}`,onError:()=>{p&&d(!0)}}),o&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black bg-opacity-20 rounded-md",children:(0,t.jsx)(T.FoodieLoaderCircle,{size:"md",className:"text-white"})}),f.has_video&&!e.listsEnabled&&(0,t.jsx)(R,{}),g&&(0,t.jsxs)(E.Tooltip,{children:[(0,t.jsx)(E.TooltipTrigger,{asChild:!0,children:(0,t.jsx)("div",{role:"img","aria-label":`Imported from ${x}`,className:"absolute bottom-2 left-2 w-7 h-7 bg-white border border-foodie-brown/25 rounded-md shadow-md flex items-center justify-center p-1",children:m?(0,t.jsx)(P.Link,{className:"w-full h-full text-foodie-brown"}):(0,t.jsx)("img",{src:h,alt:"",loading:"lazy",className:"w-full h-full object-contain",onError:()=>u(!0)})})}),(0,t.jsxs)(E.TooltipContent,{side:"top",className:"bg-white text-foodie-brown border-foodie-brown/25 font-body",children:["Imported from ",x]})]})]}),(0,t.jsxs)("div",{className:"flex-1 text-foodie-orange pt-4 text-left",children:[(0,t.jsx)("div",{className:`text-foodie-brown whitespace-normal overflow-hidden line-clamp-2 font-body text-fluid-body-lg ${b}`,style:e.completionFade?{animationDelay:"120ms",animationFillMode:"forwards"}:void 0,children:e.recipe.title}),(0,t.jsx)("div",{className:"font-body text-foodie-brown text-fluid-sm flex items-center pt-2",children:(0,t.jsxs)("div",{className:"flex items-center",children:[(()=>{if(e.badgeEnabled&&!f.premium&&!p)return(0,t.jsx)($.Badge,{className:"mr-4 bg-foodie-yellow text-xs font-light rounded-md",children:"Free!"})})(),(0,t.jsx)(a.FaClock,{className:"mr-2"}),(0,t.jsx)(s.default,{minutes:e.recipe.minutes})]})})]})]})}),(0,t.jsx)("div",{className:"absolute top-2 right-2 size-6",children:e.listsEnabled&&!p&&(0,t.jsx)(S,{recipeId:e.recipe.id,isEnabled:e.listsEnabled})})]})})})}],729607)},784661,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(647163);let s=i.forwardRef(({className:e,...i},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("rounded-lg border bg-card text-card-foreground shadow-sm",e),...i}));
2s.displayName="Card";let a=i.forwardRef(({className:e,...i},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("flex flex-col space-y-1.5 p-6",e),...i}));a.displayName="CardHeader";let o=i.forwardRef(({className:e,...i},s)=>(0,t.jsx)("h3",{ref:s,className:(0,r.cn)("text-2xl font-semibold leading-none tracking-tight",e),...i}));o.displayName="CardTitle";let n=i.forwardRef(({className:e,...i},s)=>(0,t.jsx)("p",{ref:s,className:(0,r.cn)("text-sm text-muted-foreground",e),...i}));n.displayName="CardDescription";let l=i.forwardRef(({className:e,...i},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("p-6 pt-0",e),...i}));l.displayName="CardContent";let d=i.forwardRef(({className:e,...i},s)=>(0,t.jsx)("div",{ref:s,className:(0,r.cn)("flex items-center p-6 pt-0",e),...i}));d.displayName="CardFooter",e.s(["Card",0,s,"CardContent",0,l,"CardDescription",0,n,"CardFooter",0,d,"CardHeader",0,a,"CardTitle",0,o])},987586,e=>{"use strict";e.s(["SUBSCRIPTION_PRICE_CONTRACTS",0,{founding:{amount:499,currency:"usd",interval:"month"},monthly:{amount:799,currency:"usd",interval:"month"},yearly:{amount:6399,currency:"usd",interval:"year"}}])},132902,e=>{"use strict";e.s(["WEB_STRIPE_TRIAL_DAYS",0,7])},557021,e=>{"use strict";var t=e.i(987586),i=e.i(132902);let r={founding:{label:"Founding",price:"$4.99",amount:t.SUBSCRIPTION_PRICE_CONTRACTS.founding.amount,interval:t.SUBSCRIPTION_PRICE_CONTRACTS.founding.interval,suffix:"/month",detail:"Founding Foodie price",terms:`${i.WEB_STRIPE_TRIAL_DAYS}-day free trial, then $4.99 per month.`,immediateTerms:"$4.99 per month, billed today.",paymentDescription:"Foodie Plus Monthly Subscription",billingAgreement:`Start your ${i.WEB_STRIPE_TRIAL_DAYS}-day free trial now. After the trial, Foodie Plus is $4.99 per month and automatically renews monthly. Cancel anytime in your account settings.`,immediateBillingAgreement:"Foodie Plus is $4.99 per month, billed today, and automatically renews monthly. Cancel anytime in your account settings."},monthly:{label:"Monthly",price:"$7.99",amount:t.SUBSCRIPTION_PRICE_CONTRACTS.monthly.amount,interval:t.SUBSCRIPTION_PRICE_CONTRACTS.monthly.interval,suffix:"/month",detail:"Same Plus experience, for $0.25 a day",terms:`Monthly: ${i.WEB_STRIPE_TRIAL_DAYS}-day free trial, then $7.99 per month.`,immediateTerms:"Monthly: $7.99 per month, billed today.",paymentDescription:"Foodie Plus Monthly Subscription",billingAgreement:`Start your ${i.WEB_STRIPE_TRIAL_DAYS}-day free trial now. After the trial, Foodie Plus is $7.99 per month and automatically renews monthly. Cancel anytime in your account settings.`,immediateBillingAgreement:"Foodie Plus is $7.99 per month, billed today, and automatically renews monthly. Cancel anytime in your account settings."},yearly:{label:"Yearly",price:"$63.99",amount:t.SUBSCRIPTION_PRICE_CONTRACTS.yearly.amount,interval:t.SUBSCRIPTION_PRICE_CONTRACTS.yearly.interval,suffix:"/year",detail:"$5.33 /mo. Save $32 compared to monthly",terms:`Yearly: ${i.WEB_STRIPE_TRIAL_DAYS}-day free trial, then $63.99 per year.`,immediateTerms:"Yearly: $63.99 per year, billed today.",paymentDescription:"Foodie Plus Yearly Subscription",billingAgreement:`Start your ${i.WEB_STRIPE_TRIAL_DAYS}-day free trial now. After the trial, Foodie Plus is $63.99 per year and automatically renews annually. Cancel anytime in your account settings.`,immediateBillingAgreement:"Foodie Plus is $63.99 per year, billed today, and automatically renews annually. Cancel anytime in your account settings.",regularPrice:"$96",regularPriceAriaLabel:"Regular price $96 per year",savingsBadge:"Save 33%"}};e.s(["SUBSCRIPTION_OFFERS",0,r])},272022,587764,429323,e=>{"use strict";e.s(["FREE_FEATURES",0,["Weekly curated menus delivered to your inbox","Smart grocery lists with ingredient overlap suggestions","See similar recipes based on what you have","Ad-free recipe experience","Adjust serving sizes easily"],"PLUS_FEATURES",0,["Unlimited recipe saves from any social media post, photo, or link","Access to our premium recipe collection","Personalized substitutions, adjustments, and answers on all your recipes","Hands-free voice cooking guidance","Grocery delivery or pick-up","Detailed nutrition information"]],272022);var t=e.i(843476);e.s(["BillingPeriodToggle",0,function({selected:e,onSelect:i,disabled:r=!1}){return(0,t.jsx)("div",{role:"group","aria-label":"Billing period",className:"inline-flex w-full rounded-md border border-foodie-brown/30 bg-foodie-beige/40 p-1",children:["monthly","yearly"].map(s=>(0,t.jsx)("button",{type:"button","aria-pressed":e===s,disabled:r,onClick:()=>i(s),className:`flex-1 rounded-md py-2 font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-foodie-brown/50 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${e===s?"bg-foodie-orange text-white":"text-foodie-brown/70 hover:bg-white/70"}`,children:"monthly"===s?"Monthly":"Yearly"},s))})}],587764);var i=e.i(557021);e.s(["SubscriptionOfferPrice",0,function({plan:e}){let r=i.SUBSCRIPTION_OFFERS[e];return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline gap-2",children:[r.regularPrice&&(0,t.jsx)("span",{className:"font-display text-fluid-h3 font-bold text-foodie-brown/40 line-through","aria-label":r.regularPriceAriaLabel,children:r.regularPrice}),(0,t.jsx)("span",{className:"font-display text-fluid-h2 font-extrabold text-foodie-brown",children:r.price}),(0,t.jsx)("span",{className:"text-fluid-body font-medium text-foodie-brown/50",children:r.suffix}),r.savingsBadge&&(0,t.jsx)("span",{className:"rounded-full bg-foodie-green px-2 py-0.5 text-xs text-white",children:r.savingsBadge})]}),(0,t.jsx)("div",{className:"mt-1 text-sm text-foodie-brown/70",children:r.detail})]})}],429323)},935258,e=>{"use strict";var t=e.i(843476),i=e.i(271645),r=e.i(643531),s=e.i(522016),a=e.i(578925),o=e.i(187491),n=e.i(784661),l=e.i(278669),d=e.i(272022),c=e.i(803594),m=e.i(557021),u=e.i(132902),f=e.i(587764),p=e.i(429323);let h=["Everything in Foodie Free",...d.PLUS_FEATURES];e.s(["PricingToggle",0,function({subscription:e=null,trialEligible:x=!0}){let[g,b]=(0,i.useState)("yearly"),{openPaymentModal:y}=(0,c.usePaymentModal)(),v=m.SUBSCRIPTION_OFFERS[g];return(0,t.jsx)("div",{className:"mx-auto max-w-6xl",children:(0,t.jsxs)("div",{className:"grid gap-8 lg:grid-cols-2",children:[(0,t.jsx)("section",{"aria-labelledby":"foodie-free-tier-title",className:"rounded-md border-2 border-solid border-foodie-brown bg-white p-4 shadow-foodie-card-shadow-yellow sm:p-6",children:(0,t.jsxs)(n.Card,{className:"flex h-full flex-col border-0 bg-transparent shadow-none",children:[(0,t.jsxs)(n.CardHeader,{className:"p-4 sm:p-6",children:[(0,t.jsx)(n.CardTitle,{id:"foodie-free-tier-title",className:"font-display text-fluid-h3 sm:text-fluid-h2",children:"Foodie Free"}),(0,t.jsx)("p",{className:"font-body text-fluid-body text-foodie-brown sm:text-fluid-body-lg",children:"Great cooking starts here"})]}),(0,t.jsxs)(n.CardContent,{className:"flex-grow p-4 pt-0 sm:p-6 sm:pt-0",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-fluid-h3 font-extrabold text-foodie-brown sm:text-fluid-h2",children:"$0"}),(0,t.jsx)("span",{className:"text-fluid-body font-medium text-foodie-brown/50 sm:text-fluid-body-lg",children:"/mo"})]}),(0,t.jsx)("ul",{className:"mt-4 space-y-3 sm:mt-6 sm:space-y-4",children:d.FREE_FEATURES.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-3",children:[(0,t.jsx)(r.Check,{className:"h-5 w-5 flex-shrink-0 text-foodie-green","aria-hidden":"true"}),(0,t.jsx)("span",{className:"text-foodie-brown",children:e})]},e))})]}),(0,t.jsx)(n.CardFooter,{className:"mt-2 grid grid-rows-[auto_minmax(2rem,auto)] gap-3 p-4 pt-0 sm:p-6 sm:pt-0",children:(0,t.jsx)(a.Button,{asChild:!0,variant:"outline",className:"h-[46px] w-full border-foodie-brown/50 text-fluid-body font-medium text-foodie-brown hover:bg-foodie-brown/10 hover:text-foodie-brown sm:text-fluid-body-lg",children:(0,t.jsx)(s.default,{href:"/recipes",className:"w-full",children:"Get Started"})})})]})}),(0,t.jsx)("section",{"aria-labelledby":"foodie-plus-tier-title",className:"rounded-md border-2 border-solid border-foodie-brown bg-white p-4 shadow-foodie-card-shadow-yellow sm:p-6",children:(0,t.jsxs)(n.Card,{className:"flex h-full flex-col border-0 bg-transparent shadow-none",children:[(0,t.jsxs)(n.CardHeader,{className:"p-4 sm:p-6",children:[(0,t.jsx)(n.CardTitle,{id:"foodie-plus-tier-title",className:"font-display text-fluid-h3 sm:text-fluid-h2",children:"Foodie Plus"}),(0,t.jsx)("p",{className:"font-body text-fluid-body text-foodie-brown sm:text-fluid-body-lg",children:"Your complete cooking companion"})]}
2),(0,t.jsxs)(n.CardContent,{className:"flex-grow space-y-6 p-4 pt-0 sm:p-6 sm:pt-0",children:[(0,t.jsx)(f.BillingPeriodToggle,{selected:g,onSelect:b}),(0,t.jsx)(p.SubscriptionOfferPrice,{plan:g}),(0,t.jsx)("ul",{className:"space-y-3",children:h.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-3",children:[(0,t.jsx)(r.Check,{className:"h-5 w-5 flex-shrink-0 text-foodie-green","aria-hidden":"true"}),(0,t.jsx)("span",{className:"text-foodie-brown",children:e})]},e))})]}),(0,t.jsxs)(n.CardFooter,{className:"mt-2 grid grid-rows-[auto_minmax(2rem,auto)] gap-3 p-4 pt-0 sm:p-6 sm:pt-0",children:[(0,t.jsx)(o.FoodieButton,{appearance:"accent",disabled:e?.is_active===!0,onClick:()=>{(0,l.track)("Subscribe Clicked",{plan:g,path:"Pricing Toggle"}),y({plan:g})},className:"h-[46px] w-full font-medium [&]:text-fluid-body sm:[&]:text-fluid-body-lg",children:e?.is_active||x?`Start your ${u.WEB_STRIPE_TRIAL_DAYS}-day free trial`:"Subscribe to Foodie Plus"}),!e?.is_active&&(0,t.jsxs)("p",{className:"text-center text-xs text-foodie-brown/60",children:[(0,t.jsx)("span",{children:x?v.terms:v.immediateTerms})," ","Cancel anytime."]})]})]})})]})})}])},715722,e=>{"use strict";var t=e.i(843476),i=e.i(846932),r=e.i(387652),s=e.i(729607),a=e.i(814489),o=e.i(151288),n=e.i(271645),l=e.i(192199);let d="grid grid-cols-2 gap-4",c={hidden:{opacity:0},visible:{opacity:1,transition:{duration:.7,ease:"easeIn"}}},m="h-[1.275em]";function u({count:e=4}){return(0,t.jsx)("ul",{className:d,children:Array.from({length:e}).map((e,i)=>(0,t.jsx)("li",{children:(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:"w-full aspect-square bg-foodie-light-brown rounded-md border-[0.1em] border-foodie-brown shadow-foodie-card-shadow-yellow animate-pulse"}),(0,t.jsxs)("div",{className:"flex-1 pt-4 text-left",children:[(0,t.jsxs)("div",{className:"space-y-0.5",children:[(0,t.jsx)("div",{className:`${m} text-fluid-body-lg bg-foodie-light-brown rounded animate-pulse`}),(0,t.jsx)("div",{className:`${m} text-fluid-body-lg bg-foodie-light-brown rounded animate-pulse w-3/4`})]}),(0,t.jsx)("div",{className:"flex items-center pt-2",children:(0,t.jsx)("div",{className:"h-[1em] text-fluid-sm w-20 bg-foodie-light-brown rounded animate-pulse"})})]})]})},i))})}e.s(["GroceryListPreview",0,()=>{let e=(0,n.useRef)(null),s=(0,r.useInView)(e,{once:!0}),a={hidden:{opacity:0,x:50},visible:{opacity:1,x:0,transition:{ease:"easeIn",duration:.4}}},o=({title:e,items:r})=>(0,t.jsxs)(i.motion.div,{className:"mb-4",variants:a,children:[(0,t.jsx)(i.motion.h2,{className:"text-2xl sm:text-4xl font-semibold mb-2",variants:a,children:e}),r.map((e,r)=>(0,t.jsxs)(i.motion.p,{className:"text-lg sm:text-2xl",variants:a,children:[(0,t.jsx)("span",{className:"font-bold",children:e.amount})," ",e.name,(0,t.jsxs)("span",{className:"italic text-foodie-light-brown",children:[" ","(",e.weight,")"]})]},r)),(0,t.jsx)(i.motion.div,{className:"bg-foodie-light-brown mt-4 h-2 max-w-96 rounded-full",variants:a})]});return(0,t.jsx)(i.motion.div,{ref:e,className:"border-solid border-2 rounded-md border-foodie-brown shadow-foodie-card-shadow-yellow bg-white mb-4",initial:"hidden",animate:s?"visible":"hidden",variants:{hidden:{opacity:0,x:100},visible:{opacity:1,x:0,transition:{staggerChildren:.2,duration:.5,ease:"easeIn"}}},children:(0,t.jsx)("div",{className:"p-8 grid grid-y-4",children:[{title:"Meat",items:[{amount:"2 lb",name:"beef",weight:"900g"},{amount:"1.5 lb",name:"chicken, thighs",weight:"675g"}]},{title:"Dairy",items:[{amount:"4 cups",name:"milk",weight:"1000g"}]},{title:"Produce",items:[{amount:"12 cloves",name:"garlic",weight:"48g"}]}].map((e,i)=>(0,t.jsx)(o,{title:e.title,items:e.items},i))})})},"NutritionInfoPreview",0,()=>{let e=(0,n.useRef)(null),s=(0,r.useInView)(e,{once:!0}),a={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeIn"}}};return(0,t.jsx)(i.motion.div,{ref:e,className:"border-solid border-2 rounded-md border-foodie-brown shadow-foodie-card-shadow-yellow bg-white mb-4",initial:"hidden",animate:s?"visible":"hidden",variants:a,children:(0,t.jsxs)("div",{className:"p-8",children:[(0,t.jsx)("h2",{className:"text-2xl sm:text-4xl font-bold mb-4",children:"Beef Pepper Rice"}),(0,t.jsxs)("table",{className:"w-full",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-foodie-brown",children:[(0,t.jsx)("th",{className:"text-left text-xl sm:text-2xl py-2",children:"Nutrient"}),(0,t.jsx)("th",{className:"text-right text-xl sm:text-2xl py-2",children:"Amount"})]})}),(0,t.jsx)("tbody",{children:[{name:"Calories",amount:"250",unit:"kcal"},{name:"Protein",amount:"15",unit:"g"},{name:"Carbohydrates",amount:"30",unit:"g"},{name:"Fat",amount:"10",unit:"g"}].map((e,r)=>(0,t.jsxs)(i.motion.tr,{className:"border-b border-foodie-light-brown",variants:a,children:[(0,t.jsx)("td",{className:"py-2 text-lg sm:text-xl",children:e.name}),(0,t.jsxs)("td",{className:"text-right text-lg sm:text-xl py-2",children:[e.amount," ",e.unit]})]},r))})]})]})})},"SearchByIngredientPreview",0,()=>{let e=(0,o.createClient)(),m=(0,n.useRef)(null),f=(0,r.useInView)(m,{once:!0}),p=[{title:"beef-pepper-rice",ingredients:["beef","rice","soy sauce","green onions"]},{title:"rice-cooker-hainanese-chicken-rice",ingredients:["chicken","soy sauce","rice","green onions"]},{title:"nobu-miso-cod",ingredients:["black cod"]},{title:"dan-dan-noodles",ingredients:["noodles","green onions"]}
2],[h,x]=(0,n.useState)([]),[g,b]=(0,n.useState)([]),[y]=(0,n.useState)(["green onions","rice","chicken"]),[v,w]=(0,n.useState)([]),[N,j]=(0,n.useState)(!0),[C,S]=(0,n.useState)(!0);(0,n.useEffect)(()=>{$()},[]);let $=async()=>{try{let t=await (0,a.getRecipes)(e,["beef-pepper-rice","rice-cooker-hainanese-chicken-rice","nobu-miso-cod","dan-dan-noodles"]);t.sort((e,t)=>e.created_at.localeCompare(t.created_at)),b(t),x(t)}catch(e){return console.error(e),[]}finally{S(!1)}},I=e=>{if(0===e.length)return void x(g);let t=p.filter(t=>e.every(e=>t.ingredients.includes(e)));x(g.filter(e=>t.some(t=>e.path.includes(t.title))))};return(0,t.jsxs)(i.motion.div,{ref:m,className:"bg-transparent",initial:"hidden",animate:f?"visible":"hidden",variants:{hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.5,ease:"easeIn"}}},children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("div",{className:`bg-foodie-gray border border-foodie-light-brown overflow-hidden 3 ${N&&y.length>0?"rounded-t-lg border-b-0":"rounded-lg"}`,children:(0,t.jsxs)("form",{className:"flex items-center",noValidate:!0,autoComplete:"off",children:[(0,t.jsx)("label",{htmlFor:"simple-search",className:"sr-only",children:"Search by Ingredient"}),(0,t.jsxs)("div",{className:"relative w-full",children:[(0,t.jsx)("div",{className:"absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none",children:(0,t.jsx)(l.FiSearch,{className:"text-foodie-light-brown"})}),(0,t.jsx)("input",{type:"text",id:"simple-search",className:"bg-foodie-gray font-body text-foodie-brown placeholder-foodie-light-brown border-0 text-lg sm:text-xl focus:ring-none focus:outline-none block w-full ps-10 p-2.5 caret-foodie-brown",placeholder:"Search recipes by ingredient",onClick:()=>j(!0),autoComplete:"off",readOnly:!0,required:!0})]})]})}),N&&y.length>0&&(0,t.jsxs)("div",{className:"absolute z-10 w-full bg-foodie-gray border border-foodie-light-brown border-t-0 rounded-b-lg shadow-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"px-4",children:(0,t.jsx)("hr",{className:"border-t border-foodie-light-brown opacity-50"})}),(0,t.jsx)("ul",{children:y.map((e,i)=>(0,t.jsx)("li",{className:"px-4 py-2 text-lg sm:text-xl hover:bg-foodie-dark-gray cursor-pointer truncate",onClick:()=>{var t=e;let i=t.trim().toLowerCase();if(!v.includes(i)){let e=[...v,i];w(e),I(e)}},children:e},i))})]}),(0,t.jsx)("div",{className:"mt-40 flex flex-wrap gap-2",children:v.map((e,i)=>(0,t.jsxs)("div",{className:"inline-flex items-center px-3 py-1 bg-foodie-light-brown rounded-full text-sm text-foodie-brown",children:[(0,t.jsx)("span",{className:"text-lg sm:text-xl",children:e}),(0,t.jsx)("button",{onClick:()=>{let t;w(t=v.filter(t=>t!==e.toLowerCase())),I(t)},className:"ml-2 text-foodie-brown focus:outline-none","aria-label":`Remove ${e}`,children:(0,t.jsx)(l.FiX,{size:16})})]},i))})]}),(0,t.jsx)("div",{className:"pt-4",children:C?(0,t.jsx)(u,{count:4}):(0,t.jsx)(i.motion.ul,{className:d,initial:"hidden",animate:f?"visible":"hidden",variants:c,children:h.map((e,i)=>(0,t.jsx)(s.RecipeItem,{recipe:e,index:i,listsEnabled:!1,badgeEnabled:!1},e.path))})})]})}],715722)}]); 4 5//# debugId=5d72379b-e456-a06f-b97b-75b74c446ce4
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.