PageSourceSearch

https://homefoodsapp.com/_next/static/chunks/a3b4cf9e6bbb8dac.js

js homefoodsapp.com collected 2026-10-02 00:51:44 UTC 15,928 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,588537,e=>{"use strict";var t=e.i(843476),s=e.i(271645),a=e.i(618566);e.i(657688);var r=e.i(522016);e.i(463983),e.i(28856),e.i(468695);var n=e.i(28928),l=e.i(430094),i=e.i(407174),o=e.i(40632);e.i(662593),e.i(997582),e.i(320305);var c=e.i(386556),d=e.i(555436),u=e.i(346897),m=e.i(245423),h=e.i(201928),f=e.i(284614),x=e.i(664659),p=e.i(492161),g=e.i(37727),b=e.i(150965),v=e.i(561659),j=e.i(686311),w=e.i(178583),y=e.i(98919),N=e.i(292270),k=e.i(694351),C=e.i(767507),S=e.i(291121),_=e.i(975928),L=e.i(772469),P=e.i(361143),E=e.i(401337),A=e.i(282421),U=e.i(799676);e.i(501082);var z=e.i(774539);e.i(281174);var I=e.i(270958);function R({isOpen:e,onClose:a,currentUser:l,onLogout:i,isLoggingOut:c}){let d=(0,E.useCartIconHref)();(0,s.useEffect)(()=>{if(!e)return;let t=document.documentElement,{overflow:s,paddingRight:a}=document.body.style,r=t.style.overflow,n=window.innerWidth-t.clientWidth;return t.style.overflow="hidden",document.body.style.overflow="hidden",n>0&&(document.body.style.paddingRight=`${n}px`),()=>{t.style.overflow=r,document.body.style.overflow=s,document.body.style.paddingRight=a}},[e]);let x=[{href:"/home",icon:k.Home,label:"Home"},{href:d,icon:h.ShoppingCart,label:"Cart"},{href:"/orders",icon:b.ShoppingBag,label:"Orders"},{href:"/notifications",icon:m.Bell,label:"Notifications"},{href:"/account",icon:f.User,label:"Account"},{href:"/account/payments",icon:v.CreditCard,label:"Payment Methods"},{href:"/account/addresses",icon:u.MapPin,label:"Addresses"},{href:"/support",icon:j.MessageSquare,label:"Support"}],p=[{href:"/terms",icon:w.FileText,label:"Terms of Service"},{href:"/privacy",icon:y.Shield,label:"Privacy Policy"}];return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:`fixed inset-0 z-50 bg-black/50 overscroll-none transition-opacity duration-300 ${e?"opacity-100":"opacity-0 pointer-events-none"}`,onClick:a}),(0,t.jsxs)("div",{className:`fixed inset-y-0 right-0 z-50 flex h-dvh w-80 max-w-[85vw] transform flex-col overflow-hidden bg-white shadow-xl transition-transform duration-300 ease-out ${e?"translate-x-0":"translate-x-full"}`,children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between px-4 py-4 border-b border-neutral-100",children:[(0,t.jsx)("button",{onClick:a,className:"p-2 rounded-full hover:bg-neutral-100 transition-colors",children:(0,t.jsx)(g.X,{className:"h-5 w-5 text-neutral-600"})}),(0,t.jsx)(o.Logo,{size:"md",href:"/home"})]}),l&&(0,t.jsx)("div",{className:"shrink-0 px-4 py-4 border-b border-neutral-100",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)(U.Avatar,{className:"h-10 w-10",children:[(0,t.jsx)(U.AvatarImage,{src:l.profile_picture?.filepath?(0,n.getProfileImageUrl)(l.profile_picture.filepath,80,80):void 0,alt:l.first_name||"Profile"}),(0,t.jsx)(U.AvatarFallback,{className:"bg-neutral-200 text-neutral-600 text-lg font-semibold",children:l.first_name?.[0]?l.first_name[0].toUpperCase():(0,t.jsx)(f.User,{className:"h-5 w-5"})})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("p",{className:"font-medium text-neutral-900 truncate",children:[l.first_name," ",l.last_name]}),(0,t.jsx)("p",{className:"text-sm text-neutral-500 truncate",children:l.phone_number})]})]})}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain",children:[(0,t.jsx)("nav",{className:"py-2",children:x.map(e=>(0,t.jsxs)(r.default,{href:e.href,onClick:a,className:"flex items-center gap-3 px-4 py-3 hover:bg-neutral-50 transition-colors",children:[(0,t.jsx)(e.icon,{className:"h-5 w-5 text-neutral-500"}),(0,t.jsx)("span",{className:"text-neutral-700",children:e.label})]},e.href))}),(0,t.jsxs)("div",{className:"border-t border-neutral-100 py-2",children:[(0,t.jsx)("p",{className:"px-4 py-2 text-xs font-medium text-neutral-400 uppercase tracking-wider",children:"Legal"}),p.map(e=>(0,t.jsxs)(r.default,{href:e.href,onClick:a,className:"flex items-center gap-3 px-4 py-3 hover:bg-neutral-50 transition-colors",children:[(0,t.jsx)(e.icon,{className:"h-5 w-5 text-neutral-500"}),(0,t.jsx)("span",{className:"text-neutral-700",children:e.label})]},e.href))]}),(0,t.jsx)("div",{className:"border-t border-neutral-100 py-2",children:(0,t.jsxs)("button",{onClick:()=>{i(),a()}
1,disabled:c,className:"flex items-center gap-3 px-4 py-3 w-full hover:bg-red-50 transition-colors text-red-600 disabled:opacity-50",children:[(0,t.jsx)(N.LogOut,{className:"h-5 w-5"}),(0,t.jsx)("span",{className:"font-medium",children:c?"Signing out...":"Sign Out"})]})})]})]})]})}function O(){let e=(0,a.usePathname)(),n=(0,C.useAuthStore)(e=>e.isAuthenticated),l=(0,C.useAuthStore)(e=>e.isHydrated),i=(0,S.useLocationStore)(e=>e.address),f=(0,S.useIsLocationSet)(),{data:g}=(0,L.useCurrentUser)(),b=(0,P.useLogout)(),{data:v}=(0,E.useCarts)(),w=v?.length??0,y=(0,_.useGuestCartHydrated)(),N=(0,_.useGuestCartCount)(),k=l&&n,U=(0,E.useCartIconHref)(),O=k?w:y?N:0,{data:T}=(0,A.useNotifications)(),F=T?.length??0,H=(0,I.useStreamUnreadCount)(),[M,$]=(0,s.useState)(!1),[B,q]=(0,s.useState)(!1),[K,Y]=(0,s.useState)(!1),[W,G]=(0,s.useState)(!0),D=(0,s.useRef)(null),X=(0,s.useRef)(0),J=(0,s.useRef)(null);(0,s.useEffect)(()=>{function e(){let e=window.scrollY,t=e-X.current;10>Math.abs(t)||(t>0&&e>80?G(!1):G(!0),X.current=e)}function t(e){e.clientY<=40&&G(!0)}return window.addEventListener("scroll",e,{passive:!0}),window.addEventListener("mousemove",t,{passive:!0}),()=>{window.removeEventListener("scroll",e),window.removeEventListener("mousemove",t)}},[]),(0,s.useEffect)(()=>{let e=J.current;if(!e)return;let t=()=>{document.documentElement.style.setProperty("--browse-header-offset",W?`${e.offsetHeight}px`:"max(3.25rem, env(safe-area-inset-top, 0px))")};t();let s=new ResizeObserver(t);return s.observe(e),()=>{s.disconnect(),document.documentElement.style.setProperty("--browse-header-offset","0px")}},[W]),(0,s.useEffect)(()=>{function e(e){D.current&&!D.current.contains(e.target)&&q(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Q=i?i.length>30?i.substring(0,30)+"...":i:"Enter your address";return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("header",{ref:J,className:`sticky top-0 z-40 bg-white border-b border-neutral-100 pt-[env(safe-area-inset-top)] transition-transform duration-300 ${W?"translate-y-0":"-translate-y-full"}`,children:(0,t.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 px-4 py-3 lg:px-6 min-w-0",children:[(0,t.jsx)("div",{className:"hidden lg:block shrink-0",children:(0,t.jsx)(o.Logo,{size:"md",href:"/home"})}),(0,t.jsx)("div",{className:"shrink-0 lg:hidden",children:(0,t.jsx)(o.Logo,{size:"sm",showText:!1,href:"/home"})}),(0,t.jsxs)("button",{onClick:()=>{c.posthog.capture("home:location_button_click"),$(!0)},className:`group flex items-center gap-1.5 sm:gap-2 px-2.5 sm:px-3 py-2 rounded-full transition-all duration-200 active:scale-95 shrink min-w-0 lg:shrink-0 ${f?"hover:bg-neutral-50":"bg-neutral-50 ring-1 ring-neutral-200 hover:bg-neutral-100"}`,children:[(0,t.jsx)(u.MapPin,{className:"h-4 w-4 shrink-0 text-neutral-500 transition-colors group-hover:text-primary"}),(0,t.jsx)("span",{className:"hidden sm:block text-sm font-medium min-w-0 truncate text-left max-w-[160px] lg:max-w-[200px] text-neutral-700",children:Q}),(0,t.jsx)(x.ChevronDown,{className:"hidden sm:block h-4 w-4 shrink-0 text-neutral-400"})]}),(0,t.jsxs)(r.default,{href:"/search",onClick:()=>{if(c.posthog.capture("home:search_button_click"),"/search"===e){for(let e of document.querySelectorAll("[data-hf-search-input]"))if(null!==e.offsetParent)return void e.focus()}},"aria-label":"Search",className:"group flex items-center gap-2 shrink-0 h-10 px-3.5 rounded-full bg-neutral-100 text-sm font-medium text-neutral-600 transition-all duration-200 hover:bg-neutral-200 hover:text-neutral-900 active:scale-95",children:[(0,t.jsx)(d.Search,{className:"h-4 w-4 text-neutral-400 transition-colors group-hover:text-primary"}),(0,t.jsx)("span",{children:"Search"})]}),(0,t.jsx)("div",{className:"ml-auto flex items-center gap-1",children:k?(0,t.jsxs)("div",{className:"flex items-center gap-1 animate-fade-in",children:[(0,t.jsxs)(r.default,{href:"/inbox",onClick:()=>c.posthog.capture("home:inbox_button_click"),"aria-label":H>0?`Inbox, ${H} unread`:"Inbox",className:"p-2 rounded-full hover:bg-neutral-50 transition-all duration-200 hover:scale-110 active:scale-90 relative",children:[(0,t.jsx)(j.MessageSquare,{className:"h-5 w-5 text-neutral-600"}),H>0&&(0,t.jsx)("span",{className:"absolute -top-0.5 -right-0.5 min-w-5 min-h-5 flex items-center justify-center bg-primary text-primary-foreground text-xs font-bold rounded-full leading-none tabular-nums",children:H>9?"9+":H})]}),(0,t.jsxs)(r.default,{href:"/notifications",onClick:()=>c.posthog.capture("home:notifications_button_click"),className:"p-2 rounded-full hover:bg-neutral-50 transition-all duration-200 hover:scale-110 active:scale-90 relative",children:[(0,t.jsx)(m.Bell,{className:"h-5 w-5 text-neutral-600"}),F>0&&(0,t.jsx)("span",{className:"absolute -top-0.5 -right-0.5 min-w-5 min-h-5 flex items-center justify-center bg-red-500 text-white text-xs font-bold rounded-full leading-none tabular-nums",children:F>9?"9+":F})]}),(0,t.jsxs)(r.default,{href:U,onClick:()=>c.posthog.capture("tabs:carts_tab_button_click"),className:"relative p-2 rounded-full hover:bg-neutral-50 transition-all duration-200 hover:scale-110 active:scale-90","aria-label":"Cart",children:[(0,t.jsx)(h.ShoppingCart,{className:"h-5 w-5 text-neutral-600"}),O>0&&(0,t.jsx)("span",{className:"absolute -top-0.5 -right-0.5 min-w-5 min-h-5 flex items-center justify-center bg-primary text-primary-foreground text-xs font-bold rounded-full leading-none tabular-nums",children:O>9?"9+":O})]}),(0,t.jsx)("button",{onClick:()=>Y(!0),className:"p-2 rounded-full hover:bg-neutral-100 transition-all duration-200 hover:scale-110 active:scale-90","aria-label":"Open navigation menu",children:(0,t.jsx)(p.Menu,{className:"h-5 w-5 text-neutral-600"})})]}):(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0 animate-fade-in",children:[(0,t.jsxs)(r.default,{href:U,onClick:()=>c.posthog.capture("tabs:carts_tab_button_click"),className:"relative p-2 rounded-full hover:bg-neutral-50 transition-all duration-200 hover:scale-110 active:scale-90","aria-label":"Cart",children:[(0,t.jsx)(h.ShoppingCart,{className:"h-5 w-5 text-neutral-600"}),O>0&&(0,t.jsx)("span",{className:"absolute -top-0.5 -right-0.5 min-w-5 min-h-5 flex items-center justify-center bg-primary text-primary-foreground text-xs font-bold rounded-full leading-none tabular-nums",children:O>9?"9+":O})]}),(0,t.jsx)(r.default,{href:`/signin${"/home"!==e?`?callbackUrl=${encodeURIComponent(e)}`:""}`,onClick:()=>c.posthog.capture("home:sign_in_button_click"),className:"px-3.5 py-1.5 text-xs font-medium text-white bg-neutral-900 rounded-full hover:bg-neutral-800 transition-all duration-200 hover:scale-[1.03] active:scale-95 sm:px-5 sm:py-2 sm:text-sm",children:"Sign in"})]})})]})}),(0,t.jsx)(z.AddressSelectModal,{isOpen:M,onClose:()=>$(!1)}),l&&n&&(0,t.jsx)(R,{isOpen:K,onClose:()=>Y(!1),currentUser:g,onLogout:()=>{c.posthog.capture("account:sign_out_button_click"),b.mutate()},isLoggingOut:b.isPending})]})}
1function T(){return(0,t.jsx)("header",{"aria-hidden":!0,className:"sticky top-0 z-40 bg-white border-b border-neutral-100",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 px-4 py-3 lg:px-6 min-w-0",children:[(0,t.jsxs)("div",{className:"hidden lg:flex items-center gap-2.5 shrink-0",children:[(0,t.jsx)("div",{className:"h-8 w-8 rounded-lg bg-muted animate-pulse"}),(0,t.jsx)("div",{className:"h-7 w-36 rounded-md bg-muted animate-pulse"})]}),(0,t.jsx)("div",{className:"shrink-0 lg:hidden",children:(0,t.jsx)("div",{className:"h-7 w-7 rounded-lg bg-muted animate-pulse"})}),(0,t.jsx)("div",{className:"h-9 w-9 sm:w-[230px] rounded-full bg-muted animate-pulse shrink-0"}),(0,t.jsx)("div",{className:"h-10 w-28 rounded-full bg-muted animate-pulse shrink-0"}),(0,t.jsx)("div",{className:"flex items-center ml-auto shrink-0",children:(0,t.jsx)("div",{className:"h-8 w-16 sm:w-20 rounded-full bg-muted animate-pulse"})})]})})}k.Home,j.MessageSquare,b.ShoppingBag,f.User;var F=e.i(511152);let H=[{type:"simple",icon:"instagram",label:"Instagram",href:"https://www.instagram.com/homefoodsapp"},{type:"simple",icon:"x",label:"Twitter",href:"https://www.twitter.com/homefoodsapp"},{type:"simple",icon:"facebook",label:"Facebook",href:"https://www.facebook.com/homefoodsapp"},{type:"linkedin",label:"Linkedin",href:"https://www.linkedin.com/company/homefoods"},{type:"simple",icon:"youtube",label:"Youtube",href:"https://www.youtube.com/@homefoodsapp"}],M=[{label:"Terms of Service",href:"/terms"},{label:"Privacy Policy",href:"/privacy"},{label:"Become a Chef",href:"/chefs"},{label:"Careers",href:"/careers"}];function $({link:e}){return"linkedin"===e.type?(0,t.jsx)(F.FaLinkedinIn,{size:24}):(0,t.jsx)(l.default,{name:e.icon,size:24})}function B(){return(0,t.jsx)("footer",{className:"w-full border-t border-neutral-100 py-12",children:(0,t.jsx)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:(0,t.jsxs)("div",{className:"flex flex-col items-center",children:[(0,t.jsx)(o.Logo,{size:"md",href:"/"}),(0,t.jsx)("nav",{className:"mt-8 flex flex-wrap justify-center gap-x-8 gap-y-4",children:M.map(e=>(0,t.jsx)(r.default,{href:e.href,className:"text-sm text-neutral-600 transition-colors hover:text-neutral-900",children:e.label},e.href))}),(0,t.jsx)("div",{className:"mt-8 flex space-x-6",children:H.map(e=>(0,t.jsxs)(r.default,{href:e.href,className:"text-neutral-400 transition-colors hover:text-neutral-900",children:[(0,t.jsx)("span",{className:"sr-only",children:e.label}),(0,t.jsx)($,{link:e})]},e.href))}),(0,t.jsxs)("p",{className:"mt-8 text-center text-sm text-neutral-500",children:["If you have any questions, please contact us at ",(0,t.jsx)(r.default,{href:"mailto:[email protected]",children:"[email protected]"})]}),(0,t.jsxs)("p",{className:"mt-8 text-center text-sm text-neutral-500",children:["© ",(0,t.jsx)(i.CopyrightYear,{})," HomeFoods. All rights reserved."]})]})})})}var q=e.i(132923),K=e.i(555392),Y=e.i(469735);function W(){let e=(0,a.usePathname)(),t=(0,a.useSearchParams)().toString();return(0,s.useLayoutEffect)(()=>{(0,q.initLiveScrollTracking)()},[]),(0,s.useLayoutEffect)(()=>{(0,Y.isFeedScrollPath)(e)&&(0,K.scheduleFeedScrollRestore)(e,t)},[e,t]),null}let G=/^\/(listing|chef)\//;function D(){let e=(0,a.usePathname)(),[r,n]=(0,s.useState)(!1);return((0,s.useEffect)(()=>{n(!1)},[e]),(0,s.useEffect)(()=>{let e=e=>{let t=e.target.closest("a");t?.href&&"_blank"!==t.target&&!e.metaKey&&!e.ctrlKey&&function(e){try{let t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)return!1;return G.test(t.pathname)}catch{return!1}}(t.href)&&n(!0)};return document.addEventListener("click",e,!0),()=>document.removeEventListener("click",e,!0)},[]),r)?(0,t.jsx)("div",{className:"pointer-events-none fixed inset-x-0 top-0 z-[100] h-0.5 overflow-hidden bg-primary/20","aria-hidden":!0,children:(0,t.jsx)("div",{className:"h-full w-1/3 animate-shimmer bg-primary"})}):null}function X({children:e}){var r;let n="/inbox"===(r=(0,a.usePathname)())||r.startsWith("/inbox/");return(0,t.jsxs)("div",{className:n?"h-screen-safe flex flex-col overflow-hidden bg-background":"min-h-screen-safe flex flex-col bg-background",children:[(0,t.jsx)(s.Suspense,{fallback:null,children:(0,t.jsx)(W,{})}),(0,t.jsx)(D,{}),(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(T,{}),children:(0,t.jsx)(O,{})}),(0,t.jsx)("main",{className:n?"flex min-h-0 flex-1 flex-col overflow-hidden":"flex-1",children:e}),n?null:(0,t.jsx)(s.Suspense,{fallback:null,children:(0,t.jsx)(B,{})})]})}e.s(["default",()=>X],588537)}]);

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.