PageSourceSearch

https://foodmaxx.com/build/_shared/chunk-YTAGTQ56.js

js foodmaxx.com collected 2026-09-24 11:45:24 UTC 5,008 bytes, 1 lines download raw bytes

1import{a as tt,b as et}from"/build/_shared/chunk-H2TVMI6R.js";import{a as X,b as Y,d as rt}from"/build/_shared/chunk-N6WFVNIT.js";import{d as R,i as ot}from"/build/_shared/chunk-DZR267BD.js";import{a as S}from"/build/_shared/chunk-DEEIYPRZ.js";import{b as W}from"/build/_shared/chunk-MPUKDBDL.js";import{f as Z}from"/build/_shared/chunk-Y567UESH.js";import{a as Q}from"/build/_shared/chunk-CCXUG7EA.js";import{b as x}from"/build/_shared/chunk-GLNX7PBK.js";import{a as q}from"/build/_shared/chunk-7UGNA4DO.js";import{f as J}from"/build/_shared/chunk-2CT7LA4X.js";import{b as at}from"/build/_shared/chunk-CQIKKB4W.js";import{_ as K}from"/build/_shared/chunk-JDCYZ4LL.js";import{c as L}from"/build/_shared/chunk-BTADOTLT.js";import{G as H,K as P,O as i,U,V as $,aa as V,e as D,sa as j,t as d,wa as G}from"/build/_shared/chunk-FES3B5QL.js";import{g as M}from"/build/_shared/chunk-XC7SPKRF.js";import{a as O}from"/build/_shared/chunk-G3QUQOKW.js";import{a as Nt}from"/build/_shared/chunk-F3RAJA4O.js";import{e as v}from"/build/_shared/chunk-O3BUCIVF.js";var p=v(Nt());var it="/build/_assets/styles-5KJ2RZRG.css";var t=v(O()),Rt=()=>[{rel:"stylesheet",href:it},...X()];function y({basePrice:h,brand:w,cardScreenReaderText:zt,description:Et,hasCoupon:nt,highlight:I,id:n,imageAlt:ct,imageScreenReaderText:dt,imageUrl:l,isInLastRow:st,mobileUI:pt,name:c,offerPrice:Bt,onAddToCart:m,onAddToList:u,onClickNewTab:lt=!1,onclickRoute:s,position:b,priceBanner:Ft,priceErrType:k,priceResults:o,salePrice:T,tag:mt,title:ut,titleOrder:At=3}){let{setShowStoreDrawer:ft}=J(),{addShoppingItemAPI:gt,removeShoppingItemAPI:xt,shoppingList:f}=ot(),ht=L(),a=q(),{ecomFeatureFlag:wt,productsProductPricingEnabled:C,shoppingListFeatureFlag:bt}=at(),[vt,Pt]=(0,p.useState)(!1),N=Z(),g=(0,p.useMemo)(()=>{let e=f==null?void 0:f.findIndex(r=>R(r)&&r.attributes.productId===n);return typeof e!="undefined"&&e!==-1},[f,n]),St=M(`(max-width: ${Q.MOBILE})`),yt=rt(C,k),It=(0,p.useMemo)(()=>{var e,r,_,z,E,B;switch((e=o==null?void 0:o.ok)==null?void 0:e.template){case"OnPromo":let F=(_=(r=o.ok)==null?void 0:r.regPriceText)!=null?_:"",A=(z=o.ok.promoArea.promoText)!=null?z:"";return(0,t.jsxs)(d,{mt:"xs",children:[A&&(0,t.jsx)(d,{mb:0,children:(0,t.jsx)(Y,{c:"accents-accent.2",fw:"600",fz:"lg",highlight:I,className:"price-discount-value",children:A})}),F&&(0,t.jsx)(d,{children:(0,t.jsx)(i,{c:"accents-neutral.2",fw:500,fz:"md",td:"line-through",tabIndex:0,children:F})})]});default:return(0,t.jsx)(i,{fw:600,mt:"xs",size:D(18),tabIndex:0,children:(B=(E=o==null?void 0:o.ok)==null?void 0:E.regPriceText)!=null?B:"-"})}},[o,I]),kt=()=>{let e={id:n,name:c!=null?c:"",imageUrl:l,basePrice:h,hasCoupon:nt,brand:w};gt(e,"PRODUCT")},Tt=()=>{var r;let e={id:n,name:c,imageUrl:l,basePrice:h};xt(e.id,(r=e.name)!=null?r:"","PRODUCT")},Ct=e=>{e.stopPropagation(),m==null||m()};return(0,t.jsx)(d,{className:x("product-card",(pt||St)&&"mobile",st&&"last-card"),"data-testid":"product-card",children:(0,t.jsx)(d,{className:x("product-card-link",s&&"pointer"),onClick:()=>{var e,r;N({eventName:S.product_tap,logType:"AMPLITUDE",faroEventProperties:{productId:n}}),N({eventName:S.clicked_item_position,logType:"AMPLITUDE",faroEventProperties:{productId:n,position:(e=b==null?void 0:b.toString())!=null?e:""}}),s&&s!==""&&(lt?(r=window==null?void 0:window.open(s,"_blank"))==null||r.focus():ht(s))},children:(0,t.jsx)($,{className:"card",children:(0,t.jsxs)(P,{className:"product-card-detail",gap:"sm",children:[(0,t.jsx)("div",{className:"image-container",children:(0,t.jsx)(V,{alt:ct||dt||`${ut}:${c}`,className:"image",srcSet:!vt&&l?`${l}?imgeng=w_200`:void 0,fallbackSrc:W,w:80,h:80,role:"presentation",loading:"lazy",onError:()=>{Pt(!0)}})}),(0,t.jsxs)(j,{gap:0,w:"100%",children:[(0,t.jsxs)(i,{className:"product-description",lineClamp:3,fw:500,tabIndex:0,children:[w&&`${w}, `,c]}),k==="StoreNotSelected"&&C?(0,t.jsx)(G,{className:"select-store",order:6,onClick:e=>{e.stopPropagation(),ft(!0)},children:a==null?void 0:a.product_details_select_a_store_button}):yt?(0,t.jsx)(i,{fw:500,mt:"xs",fz:"sm",c:"layout-on-surface-secondary.0",children:a==null?void 0:a.product_card_price_off}):(0,t.jsxs)(t.Fragment,{children:[T&&(0,t.jsxs)(P,{align:"center",className:"sale-price-container",gap:8,justify:"start",mt:4,children:[(0,t.jsx)(i,{className:"sale-price-text",children:T}),(0,t.jsx)(i,{className:"sale-base-price-text",children:h||"base price"})]}),It]}),(0,t.jsx)(i,{c:"layout-on-surface-secondary.0",fz:"sm",children:mt}),wt&&m&&(0,t.jsx)(U,{className:"add-to-cart-btn",leftSection:(0,t.jsx)(K,{role:"presentation"}),onClick:Ct,children:a==null?void 0:a.cart_add_to_title})]}),bt&&(0,t.jsx)(H,{variant:"filled","aria-label":g?"Remove from Shopping list":"Add to Shopping list",className:x(g&&"added-icon-container","add-container "),onClick:e=>{e.stopPropagation(),u==null||u(n),typeof u=="undefined"&&(g?Tt():kt())},children:g?(0,t.jsx)(et,{role:"presentation"}):(0,t.jsx)(tt,{role:"presentation"})})]})})})})}var re=y;export{Rt as a,re as b};

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.