1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[110],{10110:(e,t,a)=>{a.r(t),a.d(t,{MarketHome:()=>T});var s=a(54568),i=a(95532),l=a(7620),n=a(6158),r=a(94193),o=a(18080),c=a(73774),d=a(43002),u=a(64858),m=a(15578),g=a(12051),p=a(95355),h=a(98075),x=a(51166),y=a(85973),v=a(14486),f=a(58997),j=a(65202),b=a(70415),k=a(889),w=a(26862),N=a(19760),_=a(22995),A=a(90008),C=a(60538),S=a(24734),z=a(51080),D=a(90647),E=a(94971),q=a(4518);a(99411);let I=[{id:"all",name:"All Products",icon:(0,s.jsx)(r.A,{size:16}),subcategories:[]},{id:"electronics",name:"Electronics & Tech",icon:(0,s.jsx)(o.A,{size:16}),subcategories:["Computers & Laptops","Mobile Phones","Audio & Headphones","Smart Home","Cameras","Gaming"]},{id:"fashion",name:"Fashion & Apparel",icon:(0,s.jsx)(c.A,{size:16}),subcategories:["Men's Clothing","Women's Clothing","Kids & Baby","Shoes","Accessories","Jewelry"]},{id:"home",name:"Home & Kitchen",icon:(0,s.jsx)(d.A,{size:16}),subcategories:["Furniture","Decor","Appliances","Bedding & Bath","Cookware","Outdoor Living"]},{id:"beauty",name:"Beauty & Personal Care",icon:(0,s.jsx)(u.A,{size:16}),subcategories:["Skincare","Haircare","Makeup","Fragrance","Men's Grooming","Wellness"]},{id:"toys",name:"Toys & Games",icon:(0,s.jsx)(m.A,{size:16}),subcategories:["Action Figures","Board Games","Educational Toys","Video Games","Outdoor Play","Arts & Crafts"]},{id:"sports",name:"Sports & Outdoors",icon:(0,s.jsx)(g.A,{size:16}),subcategories:["Exercise & Fitness","Camping & Hiking","Team Sports","Fishing & Hunting","Cycling","Water Sports"]}],F=[{id:"all",name:"All Stores",icon:(0,s.jsx)(p.A,{size:16})},{id:"retail",name:"Retail",icon:(0,s.jsx)(r.A,{size:16})},{id:"boutiques",name:"Boutiques",icon:(0,s.jsx)(c.A,{size:16})},{id:"tech",name:"Tech & Electronics",icon:(0,s.jsx)(o.A,{size:16})},{id:"home_goods",name:"Home Goods",icon:(0,s.jsx)(d.A,{size:16})},{id:"artisan",name:"Artisanal & Handmade",icon:(0,s.jsx)(h.A,{size:16})},{id:"local",name:"SETX Only",icon:(0,s.jsx)(x.A,{size:16})}],T=e=>{var t,a,o,c,d,u,m,g,h,T,R,V,O;let{user:L,scope:H="state",onNavigateToStore:B}=e,{theme:K,setActiveTab:M,localSearchQuery:W,setLocalSearchQuery:J,activeCounty:P,isDemoMode:G}=(0,n.n)(),{addToCart:U}=(0,E._)(),[X,$]=(0,l.useState)("all"),[Q,Y]=(0,l.useState)("all"),[Z,ee]=(0,l.useState)("products"),[et,ea]=(0,l.useState)(""),[es,ei]=(0,l.useState)(null);(0,l.useEffect)(()=>{"undefined"!=typeof navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition(e=>ei({lat:e.coords.latitude,lng:e.coords.longitude}),()=>ei(null),{timeout:8e3,maximumAge:3e5})},[]);let el=e=>"$".concat((e||0).toFixed(2)),en=()=>(0,s.jsx)("div",{className:"product-premium-grid",children:[1,2,3,4,5,6].map(e=>(0,s.jsxs)("div",{className:"product-premium-card card",style:{height:"320px",padding:"var(--sp-4)"},children:[(0,s.jsx)("div",{className:"skeleton",style:{width:"100%",height:"180px",marginBottom:"var(--sp-3)"}}),(0,s.jsx)("div",{className:"skeleton",style:{width:"40%",height:"12px",marginBottom:"var(--sp-2)"}}),(0,s.jsx)("div",{className:"skeleton",style:{width:"80%",height:"16px",marginBottom:"var(--sp-3)"}}),(0,s.jsx)("div",{className:"skeleton",style:{width:"30%",height:"20px"}})]},e))}),er=(e,t)=>{let a=document.getElementById(e);a&&a.scrollBy({left:"left"===t?-400:400,behavior:"smooth"})},eo=async()=>{let e=L&&"national"!==H,t=e&&!!es,a=A.supabase.from("products").select("*, ".concat(t?"stores!inner ( *, seller:profiles!owner_id ( community, county, state, country ) )":e?"stores!inner ( *, seller:profiles!owner_id!inner ( community, county, state, country ) )":"stores!inner ( *, seller:profiles!owner_id ( community, county, state, country ) )")).not("product_type","in","(service,donation_tier,real_estate)").eq("status","active").eq("stores.category","Retail");if(W&&""!==W.trim()&&(a=a.ilike("name","%".concat(W.trim(),"%"))),"all"!==X&&("local"===X?a=a.in("stores.seller.county",["Jefferson","Orange","Jefferson County","Orange County"]):(a=a.eq("category",X),"all"!==Q&&(a=a.eq("subcategory",Q)))),t&&"local"!==X)a=a.not("stores.lat","is",null).not("stores.lng","is",null).gte("stores.lat",es.lat-.15).lte("stores.lat",es.lat+.15).gte("stores.lng",es.lng-.15).lte("stores.lng",es.lng+.15);else if(e&&"local"!==X){let e=K.startsWith("setx-");"city"===H&&(null==L?void 0:L.community)?a=a.eq("stores.seller.community",L.community):"county"===H&&(e?(a=a.in("stores.seller.county",["Jefferson","Orange","Jefferson County","Orange County"]),(P||(null==L?void 0:L.county))&&(a=a.eq("tenant_id",P||(null==L?void 0:L.county)))):((null==L?void 0:L.county)||P)&&(a=a.eq("stores.seller.county",(null==L?void 0:L.county)||P).eq("tenant_id",P||(null==L?void 0:L.county))))}let{data:s,error:i}=await a.limit(50),l=s||[],n=K.startsWith("setx-")?P||(null==L?void 0:L.county):void 0,r=(await (0,S.xy)("product",{table:"products",select:"*, stores(*)",tenantField:n?"tenant_id":void 0},n?{tenantId:n}:void 0)).filter(e=>{var t;return(null==(t=e.stores)?void 0:t.category)==="Retail"}),o=new Set(r.map(e=>e.id));l=[...r,...l.filter(e=>!o.has(e.id))];let c=null;if(e&&l.length<3){let e=K.startsWith("setx-"),t={city:{filterKey:"stores.seller.county",filterValue:(null==L?void 0:L.county)||"",label:"".concat((null==L?void 0:L.county)||"your"," C
1ounty")},...!e?{county:{filterKey:"stores.seller.state",filterValue:(null==L?void 0:L.state)||"",label:(null==L?void 0:L.state)||"your state"}}:{}}[H];if(null==t?void 0:t.filterValue){let{data:e}=await A.supabase.from("products").select("*, stores!inner ( *, seller:profiles!owner_id!inner ( community, county, state, country ) )").not("product_type","in","(service,donation_tier,real_estate)").eq("status","active").eq(t.filterKey,t.filterValue).limit(50);if(null==e?void 0:e.length){let a=new Set(l.map(e=>e.id));l=[...l,...e.filter(e=>!a.has(e.id))],c=t.label}}else if(e&&"county"===H&&0===l.length){let{data:e}=await A.supabase.from("products").select("*, stores!inner ( *, seller:profiles!owner_id!inner ( community, county, state, country ) )").not("product_type","in","(service,donation_tier,real_estate)").eq("status","active").in("stores.seller.county",["Jefferson","Orange","Jefferson County","Orange County"]).limit(50);(null==e?void 0:e.length)&&(l=e,c="Southeast Texas")}}if(i)throw i;let d=[...l].filter(e=>e.discount_percent&&e.discount_percent>0).sort((e,t)=>(t.discount_percent||0)-(e.discount_percent||0));0===d.length&&(d=[...l].sort((e,t)=>e.price-t.price));let u=[...l].sort((e,t)=>(t.views||0)-(e.views||0)),m=[...l].filter(e=>e.avg_rating&&e.avg_rating>0).sort((e,t)=>(t.avg_rating||0)-(e.avg_rating||0)),g=[...l].sort((e,t)=>new Date(t.created_at||0).getTime()-new Date(e.created_at||0).getTime()),{data:p}=await A.supabase.from("gigs").select("*").eq("status","Active").order("created_at",{ascending:!1}).limit(10),{data:h}=await A.supabase.schema("pro").from("classified_items").select("*").eq("status","active").order("created_at",{ascending:!1}).limit(10);return{products:l,deals:d.slice(0,10),trending:u.slice(0,10),topRated:m.slice(0,10),newArrivals:g.slice(0,10),gigs:p||[],classifieds:
1h||[],escalatedScope:c}},ec=async()=>{let{data:e}=await A.supabase.from("demo_products").select("*, stores:demo_stores!inner(*)").eq("stores.category","Retail").order("created_at",{ascending:!1}).limit(50),t=e||[];return{products:t,deals:[],trending:t.slice(0,5),topRated:t.slice(0,5),newArrivals:t,gigs:[],classifieds:[],escalatedScope:null}},{data:ed,isLoading:eu}=(0,_.I)({queryKey:[...C.l.stores.list(H),X,Q,W,es,G],queryFn:G?ec:eo}),em=null!=(u=null==ed?void 0:ed.products)?u:[],eg=l.useRef("");(0,l.useEffect)(()=>{let e=(W||"").trim();G||eu||!ed||!e||em.length>0||eg.current===e||(eg.current=e,(0,z.j)("market",e).catch(()=>{}))},[W,G,eu,ed,em.length]);let ep=null!=(m=null==ed?void 0:ed.deals)?m:[],eh=null!=(g=null==ed?void 0:ed.trending)?g:[],ex=null!=(h=null==ed?void 0:ed.topRated)?h:[],ey=null!=(T=null==ed?void 0:ed.newArrivals)?T:[],ev=null!=(R=null==ed?void 0:ed.gigs)?R:[],ef=null!=(V=null==ed?void 0:ed.classifieds)?V:[],ej=null!=(O=null==ed?void 0:ed.escalatedScope)?O:null,eb=async()=>{let{data:e,error:t}=await A.supabase.from("stores").select("*").eq("status","active").eq("category","Retail").order("is_verified",{ascending:!1}).order("avg_rating",{ascending:!1,nullsFirst:!1}).limit(10);if(t)throw t;return e||[]},ek=async()=>{let{data:e}=await A.supabase.from("demo_stores").select("*").eq("category","Retail").order("created_at",{ascending:!1}).limit(10);return e||[]},{data:ew=[],isLoading:eN}=(0,_.I)({queryKey:["stores","spotlight",G],queryFn:G?ek:eb}),e_=async()=>{let e=L&&"national"!==H,t=e&&!!es,a=A.supabase.from("stores").select("*, seller:profiles!owner_id!inner(community, county, state, country)").eq("status","active").eq("category","Retail");if(W&&""!==W.trim()&&(a=a.ilike("name","%".concat(W.trim(),"%"))),"all"!==X)if("local"===X)a=a.in("seller.county",["Jefferson","Orange","Jefferson County","Orange County"]);else{let e={artisan:"Artisan",retail:"Retail",boutiques:"Boutique",tech:"Tech",home_goods:"Home"};e[X]&&(a=a.ilike("category","%".concat(e[X],"%")))}if(t&&"local"!==X)a=a.not("lat","is",null).not("lng","is",null).gte("lat",es.lat-.15).lte("lat",es.lat+.15).gte("lng",es.lng-.15).lte("lng",es.lng+.15);else if(e&&"local"!==X){let e=K.startsWith("setx-");"city"===H&&(null==L?void 0:L.community)?a=a.eq("seller.community",L.community):"county"===H&&(e?(a=a.in("seller.county",["Jefferson","Orange","Jefferson County","Orange County"]),(P||(null==L?void 0:L.county))&&(a=a.eq("tenant_id",P||(null==L?void 0:L.county)))):(P||(null==L?void 0:L.county))&&(a=a.eq("seller.county",(null==L?void 0:L.county)||P).eq("tenant_id",P||(null==L?void 0:L.county))))}let{data:s,error:i}=await a.order("avg_rating",{ascending:!1,nullsFirst:!1}).limit(50);if(i)throw i;return s||[]},{data:eA=[],isLoading:eC}=(0,_.I)({queryKey:["stores","all",H,X,W,es,G],queryFn:G?ek:e_,enabled:"stores"===Z}),eS=ep.length>0?ep[0]:em.length>0?em[0]:null,ez=e=>{window.dispatchEvent(new CustomEvent("NAVIGATE_TO_PRODUCT",{detail:e}))},eD=(e,t)=>0===e.length?(0,s.jsx)("div",{className:"carousel-empty-state",children:(0,s.jsx)("p",{children:"No products found under this section."})}):(0,s.jsxs)("div",{className:"carousel-relative-container",children:[(0,s.jsx)("button",{className:"lane-arrow-btn left",onClick:()=>er(t,"left"),"aria-label":"Scroll Left",children:(0,s.jsx)(y.A,{size:20})}),(0,s.jsx)("button",{className:"lane-arrow-btn right",onClick:()=>er(t,"right"),"aria-label":"Scroll Right",children:(0,s.jsx)(v.A,{size:20})}),(0,s.jsx)("div",{id:t,className:"elite-product-carousel no-scrollbar",children:e.map(e=>{var t;let a={id:e.id,name:e.name,price:e.price,image_urls:e.image_urls||[],stock_quantity:e.stock_quantity,is_sponsored:e.is_sponsored,priority:e.priority,store_id:e.store_id,store_name:null==(t=e.stores)?void 0:t.name,avg_rating:e.avg_rating,eligible_for_sameday:!0};return(0,s.jsx)("div",{className:"elite-carousel-item",children:(0,s.jsx)(D.P,{product:a,onSelect:()=>ez(e),onNavigateToStore:B,onQuickBuy:async e=>{await (0,i.I)(e,U)&&M(3)}})},e.id)})})]});return(0,s.jsxs)("div",{className:"market-home",children:[(0,s.jsx)(q.Y,{placement:"market"}),(0,s.jsxs)("div",{className:"market-hero elite-hero",children:[(0,s.jsx)("img",{src:"https://images.unsplash.com/photo-1526170375885-4d8ecf77b99f?auto=format&fit=crop&q=80&w=1200",alt:"Market Hero",className:"market-hero-img",loading:"eager"}),(0,s.jsx)("div",{className:"elite-hero-gradient"}),(0,s.jsxs)("div",{className:"market-hero-content",children:[(0,s.jsxs)("div",{className:"elite-delivery-badge",children:[(0,s.jsx)(f.A,{size:14,fill:"currentColor"})," Same-Day Delivery in ",(null==L?void 0:L.county)||"SETX"]}),(0,s.jsxs)("h2",{className:"fade-in",children:["Hyper-Local.",(0,s.jsx)("br",{}),"Hyper-Fast."]}),(0,s.jsx)("p",{className:"fade-in",children:"Discover extraordinary local merchants. Delivered to your doorstep today."}),(0,s.jsxs)("div",{className:"hero-search-container fade-in",children:[(0,s.jsxs)("div",{className:"hero-search-wrapper",children:[(0,s.jsx)(j.A,{className:"hero-search-icon",size:18}),(0,s.jsx)("input",{type:"text",placeholder:"Search products, local shops, artisans...",value:et,onChange:e=>ea(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(J(et),M(1))}}),(0,s.jsx)("button",{className:"hero-search-btn",onClick:()=>{J(et),M(1)},children:"Search"})]}),(0,s.jsxs)("div",{className:"hero-search-tags",children:[(0,s.jsx)("span",{children:"Trending:"}),(0,s.jsx)("button",{onClick:()=>{ea("Honey"),J("Honey"),M(1)},children:"Artisan Honey"}),(0,s.jsx)("button",{onClick:()=>{ea("Salsa"),J("Salsa"),M(1)},children:"Local Salsa"}),(0,s.jsx)("button",{onClick:()=>{ea("Handmade"),J("Handmade"),M(1)},children:"Handmade Decor"})]})]})]})]}),(0,s.jsx)("div",{className:"market-tabs-container",style:{display:"flex",justifyContent:"center",padding:"16px 20px 0"},children:(0,s.jsxs)("div",{className:"market-tabs-segmented",style:{display:"flex",background:"rgba(255, 255, 255, 0.05)",borderRadius:"30px",padding:"4px",width:"100%",maxWidth:"400px",border:"1px solid rgba(255, 255, 255, 0.1)"},children:[(0,s.jsxs)("button",{className:"segmented-tab ".concat("products"===Z?"active":""),onClick:()=>{ee("products"),$("all"),Y("all")},style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"10px",borderRadius:"26px",background:"products"===Z?"var(--primary)":"transparent",color:"products"===Z?"#fff":"var(--text-muted)",border:"none",fontWeight:600,fontSize:"0.9rem",cursor:"pointer",transition:"all 0.3s ease"},children:[(0,s.jsx)(b.A,{size:16})," Shop Products"]}),(0,s.jsxs)("button",{className:"segmented-tab ".concat("stores"===Z?"active":""),onClick:()=>{ee("stores"),$("all"),Y("all")},style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",padding:"10px",borderRadius:"26px",background:"stores"===Z?"var(--secondary)":"transparent",color:"stores"===Z?"#fff":"var(--text-muted)",border:"none",fontWeight:600,fontSize:"0.9rem",cursor:"pointer",transition:"all 0.3s ease"},children:[(0,s.jsx)(p.A,{size:16})," Explore Stores"]})]})}),(0,s.jsxs)("div",{className:"category-scroller-section",children:[(0,s.jsx)("h4",{className:"market-section-title",children:"products"===Z?"Shop by Category":"Browse Local Shops"}),(0,s.jsx)("div",{className:"category-scroller no-scrollbar",children:("products"===Z?I:F).map(e=>(0,s.jsxs)("button",{className:"category-pill ".concat(X===e.id?"active":""),onClick:()=>{$(e.id),Y("all")},children:[e.icon,(0,s.jsx)("span",{children:e.name})]},e.id))}),"products"===Z&&"all"!==X&&(0,s.jsxs)("div",{className:"category-scroller subcategory-scroller no-scrollbar",style:{marginTop:"12px"},children:[(0,s.jsx)("button",{className:"category-pill sub-pill ".concat("all"===Q?"active":""),onClick:()=>Y("all"),children:(0,s.jsxs)("span",{children:["All ",(null==(t=I.find(e=>e.id===X))?void 0:t.name)||""]})}),null==(o=I.find(e=>e.id===X))||null==(a=o.subcategories)?void 0:a.map(e=>(0,s.jsx)("button",{className:"category-pill sub-pill ".concat(Q===e?"active":""),onClick:()=>Y(e),children:(0,s.jsx)("span",{children:e})},e))]})]}),"products"===Z&&(0,s.jsxs)(s.Fragment,{children:[eS&&"all"===X&&(0,s.jsxs)("div",{className:"deal-of-the-day-section fade-in",children:[(0,s.jsx)("div",{className:"market-section-header",children:(0,s.jsxs)("h4",{children:[(0,s.jsx)(k.A,{size:18,className:"sparkle-icon"})," Featured Local Spotlight"]})}),(0,s.jsxs)("div",{className:"deal-of-the-day-card glass",role:"button",tabIndex:0,"aria-label":eS.name,onClick:()=>ez(eS),onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ez(eS))},children:[(0,s.jsxs)("div",{className:"deal-image-container",children:[(0,s.jsx)("img",{src:(null==(c=eS.image_urls)?void 0:c[0])||"https://images.unsplash.com/photo-1544816155-12df9643f363?w=600&h=600&fit=crop",alt:eS.name}),(0,s.jsx)("div",{className:"deal-discount-badge",children:eS.discount_percent?"".concat(Math.round(eS.discount_percent),"% OFF"):"Best Value"})]}),(0,s.jsxs)("div",{className:"deal-details",children:[(0,s.jsx)("h3",{className:"deal-title",children:eS.name}),(0,s.jsxs)("p",{className:"deal-store",onClick:e=>{e.stopPropagation(),eS.store_id&&(null==B||B(eS.store_id))},children:[(0,s.jsx)(x.A,{size:12})," Sold by ",(null==(d=eS.stores)?void 0:d.name)||"Local Verified Merchant"]}),(0,s.jsx)("p",{className:"deal-description",children:eS.description||"Exclusive local product available for same-day delivery. Secure yours before the deal expires."}),(0,s.jsxs)("div",{className:"deal-pricing-row",children:[(0,s.jsxs)("div",{className:"deal-price-block",children:[(0,s.jsx)("span",{className:"deal-current-price",children:el(eS.price)}),eS.original_price&&(0,s.jsx)("span",{className:"deal-original-price",children:el(eS.original_price)})]}),eS.avg_rating&&(0,s.jsxs)("div",{className:"deal-rating",children:[(0,s.jsx)(w.A,{size:14,fill:"currentColor"}),(0,s.jsxs)("span",{children:[eS.avg_rating.toFixed(1)," (",eS.review_count||0," reviews)"]})]})]}),(0,s.jsxs)("button",{className:"claim-deal-btn",children:["Claim Same-Day Deal ",(0,s.jsx)(N.A,{size:16})]})]})]})]}),ej&&(0,s.jsxs)("div",{className:"geo-escalation-banner fade-in",children:[(0,s.jsx)(x.A,{size:16}),(0,s.jsxs)("span",{children:["Showing results from ",(0,s.jsx)("strong",{children:ej})," due to local availability."]})]}),eu?(0,s.jsxs)("div",{style:{marginTop:"24px"},children:[(0,s.jsx)("h4",{className:"market-section-title",children:"Loading the Best of SETX..."}),en()]}):0===em.length?(0,s.jsxs)("div",{className:"premium-card empty-market-state",style:{textAlign:"center",padding:"60px",borderRadius:"32px",marginTop:"24px"},children:[(0,s.jsx)(r.A,{size:48,className:"empty-icon",style:{opacity:.3,marginBottom:"16px"}}),(0,s.jsx)("h4",{style:{fontWeight:800,marginBottom:"8px"},children:"No products found"}),(0,s.jsx)("p",{style:{color:"var(--text-muted)",fontSize:"0.9rem"},children:"Try broadening your search, changing categories, or updating your scope."})]}):(0,s.jsxs)(s.Fragment,{children:[eh.length>0&&(0,s.jsxs)("div",{className:"market-lane-section fade-in",children:[(0,s.jsxs)("div",{className:"market-section-header",children:[(0,s.jsx)("h4",{children:"\uD83D\uDD25 Trending Locally"}),(0,s.jsxs)("div",{className:"see-all-link",role:"button",tabIndex:0,"aria-label":"View all",onClick:()=>M(1),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),M(1))},children:["View All ",(0,s.jsx)(N.A,{size:14})]})]}),eD(eh,"lane-trending")]}),ep.length>0&&(0,s.jsxs)("div",{className:"market-lane-section fade-in",children:[(0,s.jsxs)("div",{className:"market-section-header",children:[(0,s.jsx)("h4",{children:"\uD83D\uDCB0 Steals & Deals"}),(0,s.jsxs)("div",{className:"see-all-link",role:"button",tabIndex:0,"aria-label":"View all",onClick:()=>M(1),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),M(1))},children:["View All ",(0,s.jsx)(N.A,{size:14})]})]}),eD(ep,"lane-deals")]}),ex.length>0&&(0,s.jsxs)("div",{className:"market-lane-section fade-in",children:[(0,s.jsxs)("div",{className:"market-section-header",children:[(0,s.jsx)("h4",{children:"â Top Rated"}),(0,s.jsxs)("div",{className:"see-all-link",role:"button",tabIndex:0,"aria-label":"View all",onClick:()=>M(1),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),M(1))},children:["View All ",(0,s.jsx)(N.A,{size:14})]})]}),eD(ex,"lane-top-rated")]}),ey.length>0&&(0,s.jsxs)("div",{className:"market-lane-section fade-in",children:[(0,s.jsxs)("div",{className:"market-section-header",children:[(0,s.jsx)("h4",{children:"\uD83C\uDD95 Fresh Arrivals"}),(0,s.jsxs)("div",{className:"see-all-link",role:"button",tabIndex:0,"aria-label":"View all",onClick:()=>M(1),onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),M(1))},children:["View All ",(0,s.jsx)(N.A,{size:14})]})]}),eD(ey,"lane-new-arrivals")]}),ev.length>0&&"all"===X&&(0,s.jsxs)("div",{className:"market-lane-section fade-in",style:{background:"linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent)",padding:"24px 20px",margin:"24px -20px"},children:[(0,s.jsxs)("div",{className:"market-section-header",children:[(0,s.jsx)("h4",{style:{color:"var(--gigs-green)"},children:"\uD83D\uDE80 Urgent Local Gigs"}),(0,s.jsxs)("div",{className:"see-all-link",role:"button",tabIndex:0,"aria-label":"View all gigs",onClick:()=>window.dispatchEvent(new CustomEvent("navigate",{detail:{env:"gigs"}})),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),window.dispatchEvent(new CustomEvent("navigate",{detail:{env:"gigs"}})))},style:{color:"var(--gigs-green)"},children:["View All ",(0,s.jsx)(N.A,{size:14})]})]}),(0,s.jsx)("div",{className:"carousel-relative-container",children:(0,s.jsx)("div",{id:"lane-gigs",className:"elite-product-carousel no-scrollbar",children:ev.map(e=>(0,s.jsx)("div",{className:"elite-carousel-item",role:"button",tabIndex:0,"aria-label":e.title,style:{minWidth:"280px"},onClick:()=>window.dispatchEvent(new CustomEvent("navigate",{detail:{env:"gigs",tab:0}})),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),window.dispatchEvent(new CustomEvent("navigate",{detail:{env:"gigs",tab:0}})))},children:(0,s.jsxs)("div",{className:"glass",style:{padding:"20px",borderRadius:"16px",border:"1px solid rgba(16, 185, 129, 0.3)",cursor:"pointer",height:"100%"},children:[(0,s.jsx)("h3",{style:{margin:"0 0 8px 0",fontSize:"1.1rem"},children:e.title}),(0,s.jsxs)("p",{style:{margin:"0 0 16px 0",fontSize:"1.2rem",fontWeight:"bold",color:"var(--gigs-green)"},children:["$",e.compensation_amount," ",e.compensation_type]}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"0.85rem",color:"var(--text-secondary)"},children:[(0,s.jsx)(x.A,{size:12})," ",e.location||"Remote"]})]})},e.id))})})]}),ef.length>0&&"all"===X&&(0,s.jsxs)("div",{className:"market-lane-section fade-in",style:{background:"linear-gradient(to right, rgba(236, 72, 153, 0.05), transparent)",padding:"24px 20px",margin:"24px -20px"},children:[(0,s.jsxs)("div",{className:"market-section-header",children:[(0,s.jsx)("h4",{style:{color:"#ec4899"},children:"\uD83D\uDCF0 Hot Classifieds"}),(0,s.jsxs)("div",{className:"see-all-link",role:"button",tabIndex:0,"aria-label":"View all classifieds",onClick:()=>window.dispatchEvent(new CustomEvent("navigate",{detail:{env:"market",tab:0}})),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),window.dispatchEvent(new CustomEvent("navigate",{detail:{env:"market",tab:0}})))},style:{color:"#ec4899"},children:["View All ",(0,s.jsx)(N.A,{size:14})]})]}),(0,s.jsx)("div",{className:"carousel-relative-container",children:(0,s.jsx)("div",{id:"lane-classifieds",className:"elite-product-carousel no-scrollbar",children:ef.map(e=>{var t;return(0,s.jsx)("div",{className:"elite-carousel-item",role:"button",tabIndex:0,"aria-label":e.title,style:{minWidth:"240px"},onClick:()=>{localStorage.setItem("pendingClassifiedItem",JSON.stringify(e)),window.dispatchEvent(new CustomEvent("navigate",{detail:{env:"market",tab:0}}))},onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),localStorage.setItem("pendingClassifiedItem",JSON.stringify(e)),window.dispatchEvent(new CustomEvent("navigate",{detail:{env:"market",tab:0}})))},children:(0,s.jsxs)("div",{className:"glass",style:{borderRadius:"16px",border:"1px solid rgba(236, 72, 153, 0.3)",cursor:"pointer",overflow:"hidden",height:"100%"},children:[e.images&&e.images.length>0?(0,s.jsx)("img",{src:e.images[0],alt:e.title,style:{width:"100%",height:"140px",objectFit:"cover"}}):(0,s.jsx)("div",{style:{width:"100%",height:"140px",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255, 255, 255, 0.05)"},children:(0,s.jsx)(p.A,{size:32,style:{opacity:.3}})}),(0,s.jsxs)("div",{style:{padding:"16px"},children:[(0,s.jsx)("h3",{style:{margin:"0 0 4px 0",fontSize:"1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.title}),(0,s.jsxs)("p",{style:{margin:"0 0 8px 0",fontSize:"1.1rem",fontWeight:"bold",color:"#ec4899"}
1,children:["$",(null==(t=e.price)?void 0:t.toLocaleString())||0]}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"4px",fontSize:"0.75rem",color:"var(--text-secondary)"},children:[(0,s.jsx)(x.A,{size:10})," ",e.location]})]})]})},e.id)})})})]})]})]}),"stores"===Z&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"market-section-header verified-store-header fade-in",children:[(0,s.jsx)("h4",{children:"Verified Storefronts"}),(0,s.jsxs)("div",{className:"see-all-link",role:"button",tabIndex:0,"aria-label":"View Directory",onClick:()=>null==B?void 0:B("all"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),null==B||B("all"))},children:["View Directory ",(0,s.jsx)(N.A,{size:14})]})]}),(0,s.jsx)("div",{className:"spotlight-container no-scrollbar fade-in",children:eN?(0,s.jsx)("div",{style:{padding:"24px",textAlign:"center",opacity:.5,width:"100%"},children:"Loading storefronts..."}):0===ew.length?(0,s.jsx)("div",{style:{padding:"24px",textAlign:"center",opacity:.5,width:"100%"},children:"No storefronts found."}):ew.map(e=>(0,s.jsxs)("div",{className:"store-card-premium",role:"button",tabIndex:0,"aria-label":e.name,onClick:()=>null==B?void 0:B(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),null==B||B(e.id))},children:[(0,s.jsx)("div",{className:"store-logo-wrapper",children:e.logo_url?(0,s.jsx)("img",{src:e.logo_url,alt:e.name,style:{width:"100%",height:"100%",borderRadius:"50%",objectFit:"cover"}}):e.name[0]}),(0,s.jsxs)("div",{className:"store-info",children:[(0,s.jsxs)("h5",{style:{display:"flex",alignItems:"center",gap:6,margin:0},children:[e.name,e.is_verified&&(0,s.jsx)("span",{style:{fontSize:"10px",background:"rgba(251, 191, 36, 0.1)",color:"#fbbf24",padding:"1px 6px",borderRadius:"10px",fontWeight:600},children:"Verified"})]}),(0,s.jsxs)("p",{style:{margin:"4px 0 0 0"},children:[e.category||"Local Merchant",null!=e.avg_rating||e.trust_score?(0,s.jsxs)(s.Fragment,{children:[" ","⢠",(null!=e.avg_rating?Number(e.avg_rating):e.trust_score/20).toFixed(1)," ",(0,s.jsx)(w.A,{size:10,fill:"var(--market-secondary)",color:"var(--market-secondary)"})]}):null]})]}),(0,s.jsx)(v.A,{size:18,style:{marginLeft:"auto",opacity:.3}})]},e.id))}),(0,s.jsx)("div",{className:"market-section-header verified-store-header fade-in",style:{marginTop:"32px"},children:(0,s.jsx)("h4",{children:"Local Merchants"})}),(0,s.jsx)("div",{className:"product-premium-grid fade-in",children:eC?en():0===eA.length?(0,s.jsx)("div",{className:"empty-market-state",style:{gridColumn:"1 / -1",textAlign:"center",padding:"40px"},children:"No local merchants found in this category."}):eA.map(e=>(0,s.jsxs)("div",{className:"product-premium-card",role:"button",tabIndex:0,"aria-label":e.name,onClick:()=>null==B?void 0:B(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),null==B||B(e.id))},style:{cursor:"pointer",padding:"16px"},children:[(0,s.jsx)("div",{style:{width:"100%",height:"140px",background:"rgba(255, 255, 255, 0.05)",borderRadius:"12px",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"16px",overflow:"hidden"},children:e.logo_url?(0,s.jsx)("img",{src:e.logo_url,alt:e.name,style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,s.jsx)(p.A,{size:48,style:{opacity:.2}})}),(0,s.jsxs)("h3",{style:{fontSize:"1.1rem",margin:"0 0 8px 0",display:"flex",alignItems:"center",gap:"6px"},children:[e.name,e.is_verified&&(0,s.jsx)(k.A,{size:12,color:"#fbbf24"})]}),(0,s.jsx)("p",{style:{margin:"0 0 12px 0",fontSize:"0.85rem",color:"var(--text-muted)"},children:e.category||"Retail Shop"}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"0.85rem"},children:[null!=e.avg_rating||e.trust_score?(0,s.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"4px",color:"var(--market-secondary)"},children:[(0,s.jsx)(w.A,{size:12,fill:"currentColor"})," ",(null!=e.avg_rating?Number(e.avg_rating):e.trust_score/20).toFixed(1)]}):(0,s.jsx)("span",{}),(0,s.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:"4px",color:"var(--text-muted)"},children:[(0,s.jsx)(x.A,{size:12})," ",e.county||"Local"]})]})]},"grid-".concat(e.id)))})]})]})}},12051:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(12119).A)("dumbbell",[["path",{d:"M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z",key:"9m4mmf"}],["path",{d:"m2.5 21.5 1.4-1.4",key:"17g3f0"}],["path",{d:"m20.1 3.9 1.4-1.4",key:"1qn309"}],["path",{d:"M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z",key:"1t2c92"}
1],["path",{d:"m9.6 14.4 4.8-4.8",key:"6umqxw"}]])},15578:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(12119).A)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]])},18080:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(12119).A)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]])},51080:(e,t,a)=>{a.d(t,{j:()=>i});var s=a(90008);async function i(e,t){let{data:{session:a}}=await s.supabase.auth.getSession();await fetch("/api/search/missed-demand",{method:"POST",headers:{"Content-Type":"application/json",...a?{Authorization:"Bearer ".concat(a.access_token)}:{}},body:JSON.stringify({vertical:e,query:t})})}},64858:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(12119).A)("smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]])},70415:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(12119).A)("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]])},73774:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(12119).A)("shirt",[["path",{d:"M20.38 3.46 16 2a4 4 0 0 1-8 0L3.62 3.46a2 2 0 0 0-1.34 2.23l.58 3.47a1 1 0 0 0 .99.84H6v10c0 1.1.9 2 2 2h8a2 2 0 0 0 2-2V10h2.15a1 1 0 0 0 .99-.84l.58-3.47a2 2 0 0 0-1.34-2.23z",key:"1wgbhj"}]])},95532:(e,t,a)=>{a.d(t,{I:()=>i});var s=a(90008);async function i(e,t){let{count:a}=await s.supabase.from("product_variants").select("id",{count:"exact",head:!0}).eq("product_id",e.id);return(null!=a?a:0)>0?(window.dispatchEvent(new CustomEvent("NAVIGATE_TO_PRODUCT",{detail:e})),!1):(t(e,1),!0)}},98075:(e,t,a)=>{a.d(t,{A:()=>s});let s=(0,a(12119).A)("award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]])}}]);
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.