PageSourceSearch

https://petwantschisholmtrail.com/_next/static/chunks/b253f1de583c8105.js

js petwantschisholmtrail.com collected 2026-10-04 13:52:38 UTC 49,777 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,902923,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var l="grip",o=[58119,"grid-horizontal","grip-horizontal"],i="f58d",r="M88 96c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0zM280 224l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40zm192 0l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40zm0 192l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40zM280 288c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0zM88 416l-48 0c-22.1 0-40-17.9-40-40l0-48c0-22.1 17.9-40 40-40l48 0c22.1 0 40 17.9 40 40l0 48c0 22.1-17.9 40-40 40z";a.definition={prefix:"fas",iconName:l,icon:[512,512,o,i,r]},a.faGrip=a.definition,a.prefix="fas",a.iconName=l,a.width=512,a.height=512,a.ligatures=o,a.unicode=i,a.svgPathData=r,a.aliases=o},832924,e=>{e.v({backButtonImage:"CatalogMobileMenuComponent-module__AxoBwq__backButtonImage",backButtonImageRoot:"CatalogMobileMenuComponent-module__AxoBwq__backButtonImageRoot",categories:"CatalogMobileMenuComponent-module__AxoBwq__categories",categoriesIcon:"CatalogMobileMenuComponent-module__AxoBwq__categoriesIcon",categoriesList:"CatalogMobileMenuComponent-module__AxoBwq__categoriesList",categoriesListItem:"CatalogMobileMenuComponent-module__AxoBwq__categoriesListItem",categoriesListItemActive:"CatalogMobileMenuComponent-module__AxoBwq__categoriesListItemActive",categorySection:"CatalogMobileMenuComponent-module__AxoBwq__categorySection",popupCategoriesList:"CatalogMobileMenuComponent-module__AxoBwq__popupCategoriesList",popupCategoriesListItem:"CatalogMobileMenuComponent-module__AxoBwq__popupCategoriesListItem",search:"CatalogMobileMenuComponent-module__AxoBwq__search",searchRoot:"CatalogMobileMenuComponent-module__AxoBwq__searchRoot",titleLine:"CatalogMobileMenuComponent-module__AxoBwq__titleLine",titleSpacer:"CatalogMobileMenuComponent-module__AxoBwq__titleSpacer",titleText:"CatalogMobileMenuComponent-module__AxoBwq__titleText"})},581431,e=>{e.v({category:"CategoryChildrenComponent-module__TAHhTG__category",categoryHideImage:"CategoryChildrenComponent-module__TAHhTG__categoryHideImage",categoryImage:"CategoryChildrenComponent-module__TAHhTG__categoryImage",categoryImageWrapper:"CategoryChildrenComponent-module__TAHhTG__categoryImageWrapper",categoryTitle:"CategoryChildrenComponent-module__TAHhTG__categoryTitle",categoryTitleHideImage:"CategoryChildrenComponent-module__TAHhTG__categoryTitleHideImage",childCategories:"CategoryChildrenComponent-module__TAHhTG__childCategories"})},888556,e=>{e.v({categoryName:"ProductListComponent-module__t7mN8G__categoryName",filters:"ProductListComponent-module__t7mN8G__filters",filtersItem:"ProductListComponent-module__t7mN8G__filtersItem",filtersItemIconWrapper:"ProductListComponent-module__t7mN8G__filtersItemIconWrapper",filtersTitle:"ProductListComponent-module__t7mN8G__filtersTitle",header:"ProductListComponent-module__t7mN8G__header",loading:"ProductListComponent-module__t7mN8G__loading",product:"ProductListComponent-module__t7mN8G__product",productImage:"ProductListComponent-module__t7mN8G__productImage",productList:"ProductListComponent-module__t7mN8G__productList",productListLoader:"ProductListComponent-module__t7mN8G__productListLoader",productListLoaderBackground:"ProductListComponent-module__t7mN8G__productListLoaderBackground",productPrice:"ProductListComponent-module__t7mN8G__productPrice",productTitle:"ProductListComponent-module__t7mN8G__productTitle",productsListGrid:"ProductListComponent-module__t7mN8G__productsListGrid",productsNotFound:"ProductListComponent-module__t7mN8G__productsNotFound",sale:"ProductListComponent-module__t7mN8G__sale",search:"ProductListComponent-module__t7mN8G__search",searchResults:"ProductListComponent-module__t7mN8G__searchResults",searchResultsWrapper:"ProductListComponent-module__t7mN8G__searchResultsWrapper",sortByDropdown:"ProductListComponent-module__t7mN8G__sortByDropdown",toolbar:"ProductListComponent-module__t7mN8G__toolbar",totalRows:"ProductListComponent-module__t7mN8G__totalRows"})},367217,e=>{e.v({buttonsWrapper:"Pagination-module__SKh-na__buttonsWrapper",dots:"Pagination-module__SKh-na__dots",pageNumbersWrapper:"Pagination-module__SKh-na__pageNumbersWrapper",pageNumbersWrapperSmallView:"Pagination-module__SKh-na__pageNumbersWrapperSmallView",paginationButton:"Pagination-module__SKh-na__paginationButton",paginationDesktopView:"Pagination-module__SKh-na__paginationDesktopView",paginationMobileView:"Pagination-module__SKh-na__paginationMobileView",paginationNumberButton:"Pagination-module__SKh-na__paginationNumberButton"})},293848,e=>{e.v({category:"FiltersList-module__dYq2rG__category",categoryActive:"FiltersList-module__dYq2rG__categoryActive",categoryName:"FiltersList-module__dYq2rG__categoryName",categoryNameRoot:"FiltersList-module__dYq2rG__categoryNameRoot",checkbox:"FiltersList-module__dYq2rG__checkbox",checkboxActive:"FiltersList-module__dYq2rG__checkboxActive",checkboxImage:"FiltersList-module__dYq2rG__checkboxImage",expandArrow:"FiltersList-module__dYq2rG__expandArrow",inputSearch:"FiltersList-module__dYq2rG__inputSearch",inputWrapper:"FiltersList-module__dYq2rG__inputWrapper",list:"FiltersList-module__dYq2rG__list",menuRoot:"FiltersList-module__dYq2rG__menuRoot",open:"FiltersList-module__dYq2rG__open",title:"FiltersList-module__dYq2rG__title",titleWrapper:"FiltersList-module__dYq2rG__titleWrapper"})},877774,e=>{e.v({checkbox:"TagItem-module__Ahk0YG__checkbox",checkboxActive:"TagItem-module__Ahk0YG__checkboxActive",checkboxImage:"TagItem-module__Ahk0YG__checkboxImage",checkboxWrapper:"TagItem-module__Ahk0YG__checkboxWrapper",tag:"TagItem-module__Ahk0YG__tag",tagName:"TagItem-module__Ahk0YG__tagName",tagNameActive:"TagItem-module__Ahk0YG__tagNameActive"})},788215,e=>{e.v({expandArrow:"TagsList-module__ygFkPW__expandArrow",list:"TagsList-module__ygFkPW__list",open:"TagsList-module__ygFkPW__open",title:"TagsList-module__ygFkPW__title",titleWrapper:"TagsList-module__ygFkPW__titleWrapper",wrapper:"TagsList-module__ygFkPW__wrapper"})},813411,e=>{e.v({category:"CategoriesList-module__rVzfcq__category",categoryActive:"CategoriesList-module__rVzfcq__categoryActive",categoryName:"CategoriesList-module__rVzfcq__categoryName",categoryNameRoot:"CategoriesList-module__rVzfcq__categoryNameRoot",emptyPlaceholder:"CategoriesList-module__rVzfcq__emptyPlaceholder",expandArrow:"CategoriesList-module__rVzfcq__expandArrow",list:"CategoriesList-module__rVzfcq__list",menuRoot:"CategoriesList-module__rVzfcq__menuRoot",open:"CategoriesList-module__rVzfcq__open",title:"CategoriesList-module__rVzfcq__title",titleWrapper:"CategoriesList-module__rVzfcq__titleWrapper"})},5574,e=>{e.v({category:"ProductTag-module__b81bQq__category",categoryActive:"ProductTag-module__b81bQq__categoryActive",categoryName:"ProductTag-module__b81bQq__categoryName",categoryNameRoot:"ProductTag-module__b81bQq__categoryNameRoot",checkbox:"ProductTag-module__b81bQq__checkbox",checkboxActive:"ProductTag-module__b81bQq__checkboxActive",checkboxImage:"ProductTag-module__b81bQq__checkboxImage",expandArrow:"ProductTag-module__b81bQq__expandArrow",inputSearch:"ProductTag-module__b81bQq__inputSearch",inputWrapper:"ProductTag-module__b81bQq__inputWrapper",list:"ProductTag-module__b81bQq__list",menuRoot:"ProductTag-module__b81bQq__menuRoot",open:"ProductTag-module__b81bQq__open",title:"ProductTag-module__b81bQq__title",titleWrapper:"ProductTag-module__b81bQq__titleWrapper"})},96567,e=>{e.v({filtersTitle:"DesktopSidebar-module__3PD1_G__filtersTitle",hideScrollbar:"DesktopSidebar-module__3PD1_G__hideScrollbar",sidebar:"DesktopSidebar-module__3PD1_G__sidebar"})},523550,e=>{e.v({actionButton:"MobileFilter-module__dBnWSq__actionButton",body:"MobileFilter-module__dBnWSq__body",checkbox:"MobileFilter-module__dBnWSq__checkbox",checkboxActive:"MobileFilter-module__dBnWSq__checkboxActive",checkboxImage:"MobileFilter-module__dBnWSq__checkboxImage",close:"MobileFilter-module__dBnWSq__close",list:"MobileFilter-module__dBnWSq__list",listItem:"MobileFilter-module__dBnWSq__listItem",listItems:"MobileFilter-module__dBnWSq__listItems",listName:"MobileFilter-module__dBnWSq__listName",root:"MobileFilter-module__dBnWSq__root"})},123721,e=>{e.v({banner:"CatalogInfo-module__ln306G__banner",bannerModal:"CatalogInfo-module__ln306G__bannerModal",bannerModalBackgroun
1d:"CatalogInfo-module__ln306G__bannerModalBackground",bannerModalCloseButton:"CatalogInfo-module__ln306G__bannerModalCloseButton",bannerModalImageWrapper:"CatalogInfo-module__ln306G__bannerModalImageWrapper",description:"CatalogInfo-module__ln306G__description",desktopChildCategories:"CatalogInfo-module__ln306G__desktopChildCategories",mobileFiltersAndSortBy:"CatalogInfo-module__ln306G__mobileFiltersAndSortBy",mobileFiltersButton:"CatalogInfo-module__ln306G__mobileFiltersButton"})},620149,e=>{e.v({body:"MobileSortBy-module__PY6F3q__body",checkbox:"MobileSortBy-module__PY6F3q__checkbox",checkboxActive:"MobileSortBy-module__PY6F3q__checkboxActive",checkboxImage:"MobileSortBy-module__PY6F3q__checkboxImage",close:"MobileSortBy-module__PY6F3q__close",list:"MobileSortBy-module__PY6F3q__list",listItem:"MobileSortBy-module__PY6F3q__listItem",root:"MobileSortBy-module__PY6F3q__root"})},182938,e=>{e.v({catalogInner:"CatalogComponent-module__mCKxya__catalogInner",catalogRoot:"CatalogComponent-module__mCKxya__catalogRoot",catalogRootQsr:"CatalogComponent-module__mCKxya__catalogRootQsr",childCategories:"CatalogComponent-module__mCKxya__childCategories",mobileMenu:"CatalogComponent-module__mCKxya__mobileMenu",mobileMenuSticky:"CatalogComponent-module__mCKxya__mobileMenuSticky",productsSection:"CatalogComponent-module__mCKxya__productsSection"})},142283,e=>{"use strict";var t,a=e.i(391398),l=e.i(191788),o=e.i(203828),i=e.i(56206),r=e.i(85047),s=e.i(726784),n=e.i(390717),d=e.i(126019),c=e.i(248492),u=e.i(174208),m=e.i(222266),g=e.i(476154),_=e.i(902923),h=e.i(832924),p=e.i(783771),f=e.i(581431);let C=({store:e,selectedCatalogBranch:t,onCategorySelected:l})=>{let o=t?.getBranchMenuItem().subMenus;return o&&0!==o.length?e.showSubcategoryImages?(0,a.jsx)("ul",{className:f.default.childCategories,children:o.map(e=>(0,a.jsxs)("li",{className:f.default.category,onClick:()=>l(new s.default(e)),children:[(0,a.jsx)("div",{className:f.default.categoryImageWrapper,children:(0,a.jsx)("img",{className:f.default.categoryImage,src:e.imageUrl||p.IMAGE_NOT_FOUND_URL,alt:e.name||"",loading:"lazy"})}),(0,a.jsx)("h4",{className:f.default.categoryTitle,children:e.name})]},`sub_menu_${e.id}`))}):(0,a.jsx)("ul",{className:f.default.childCategories,children:o.map(e=>(0,a.jsx)("li",{className:`${f.default.category} ${f.default.categoryHideImage} subcategory-card`,onClick:()=>l(new s.default(e)),children:(0,a.jsx)("h4",{className:`${f.default.categoryTitle} ${f.default.categoryTitleHideImage} subcategory-card-title`,children:e.name})},`sub_menu_${e.id}`))}):null};var N=e.i(487617);let T=({searchQuery:e,menuTree:t,selectedMenuItem:o,onCategorySelected:r})=>{let[n,f]=(0,l.useState)(!1),T=(0,l.useRef)(null),{store:v,settings:x}=(0,c.useStoreAndSettings)();return((0,l.useEffect)(()=>{x.businessCategoryId!==m.BusinessCategory.QSR||T.current&&T.current.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[o]),x.businessCategoryId===m.BusinessCategory.QSR)?(0,a.jsxs)("div",{children:[(0,a.jsx)(N.Container,{paddingY:!1,children:(0,a.jsxs)("div",{className:h.default.categories,children:[(0,a.jsx)(g.FontAwesomeIcon,{className:h.default.categoriesIcon,icon:_.faGrip,size:"xl",onClick:()=>f(!0)}),(0,a.jsx)("div",{className:h.default.categoriesList,children:t.getMenuBranches().map(e=>{let t=e.getBranchMenuItem().id===o?.getBranchMenuItem().id;return(0,a.jsx)("h4",{ref:t?T:null,className:(0,i.default)(h.default.categoriesListItem,{[h.default.categoriesListItemActive]:t}),onClick:()=>r(e),children:e.getBranchMenuItem().name},e.getBranchMenuItem().id)})})]})}),(0,a.jsx)(u.Popup,{direction:"bottom",title:v.isRestaurant?"Menus":"Categories",initialHeight:"60dvh",isActive:n,onClose:()=>f(!1),children:(0,a.jsx)("div",{className:h.default.popupCategoriesList,children:t.getMenuBranches().map(e=>(0,a.jsx)("div",{className:h.default.popupCategoriesListItem,onClick:()=>{r(e),f(!1)},children:e.getBranchMenuItem().name},e.getBranchMenuItem().id))})})]}):(0,a.jsx)("div",{children:(0,a.jsxs)(N.Container,{paddingY:!1,children:[o&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:h.default.titleLine,children:[(0,a.jsx)("div",{className:`${h.default.titleText} notranslate`,children:o.getBranchMenuItem().name}),(0,a.jsx)("div",{className:h.default.backButtonImageRoot,onClick:()=>(()=>
1{if(o){let e=t.getMenuByMatcher({isMatches:e=>{let t=!1;return e.subMenus.forEach(e=>{e.id===o.getBranchMenuItem()?.id&&(t=!0)}),t}});r(e?new s.default(e):void 0)}})(),children:(0,a.jsx)("div",{className:h.default.backButtonImage,children:(0,a.jsx)(d.default,{loading:"lazy",src:`${p.PATH_TO_STATIC_CONTENT}/img/back-image.svg`,width:"20",height:"20",alt:"Back arrow",className:"invert"})})})]}),(0,a.jsx)("div",{className:h.default.titleSpacer})]}),!e&&(0,a.jsxs)(a.Fragment,{children:[o?(0,a.jsx)(C,{store:v,onCategorySelected:e=>r(e),selectedCatalogBranch:o}):(0,a.jsx)("div",{className:h.default.allCategoriesDiv,children:t.getMenuBranches().map(e=>(0,a.jsxs)("div",{onClick:()=>r(e),className:h.default.categorySection,children:[e.getBranchMenuItem().name," ",(0,a.jsx)("img",{src:`${p.PATH_TO_STATIC_CONTENT}/img/arrow-right.svg`})]},`branch_${e.getBranchMenuItem().id}`))})," "]})]})})};var v=e.i(422443),x=e.i(469516),b=e.i(560044),y=e.i(888556),I=e.i(833212),B=e.i(683459),S=e.i(515045),A=e.i(367217);let M=({currentPage:e,totalPages:t,onPageChange:l})=>{let o=()=>{e>1&&l(e-1)},r=()=>{e<t&&l(e+1)},s=t=>{t!==e&&l(t)},n=()=>{let l=[];if(t<=7)for(let o=1;o<=t;o++)l.push((0,a.jsx)(S.Button,{type:"light",className:`${A.default.paginationNumberButton} ${o===e?`${A.default.buttonActive} button-light-active`:""}`,onClick:()=>s(o),testInfo:`pagination-page-${o}-button`,children:o},o));else if(e<=4){for(let t=1;t<=5;t++)l.push((0,a.jsx)(S.Button,{type:"light",className:`${A.default.paginationNumberButton} ${t===e?`${A.default.buttonActive} button-light-active`:""}`,onClick:()=>s(t),testInfo:`pagination-page-${t}-button`,children:t},t));l.push((0,a.jsx)("span",{className:A.default.dots,children:"..."},"dots")),l.push((0,a.jsx)(S.Button,{type:"light",className:A.default.paginationNumberButton,onClick:()=>s(t),testInfo:`pagination-page-${t}-button`,children:t},t))}else if(e>=t-3){l.push((0,a.jsx)(S.Button,{type:"light",className:A.default.paginationNumberButton,onClick:()=>s(1),testInfo:"pagination-page-1-button",children:"1"},1)),l.push((0,a.jsx)("span",{className:A.default.dots,children:"..."},"dots-start"));for(let o=t-4;o<=t;o++)l.push((0,a.jsx)(S.Button,{type:"light",className:`${A.default.paginationNumberButton} ${o===e?`${A.default.buttonActive} button-light-active`:""}`,onClick:()=>s(o),testInfo:`pagination-page-${o}-button`,children:o},o))}else{l.push((0,a.jsx)(S.Button,{type:"light",className:A.default.paginationNumberButton,onClick:()=>s(1),testInfo:"pagination-page-1-button",children:"1"},1)),l.push((0,a.jsx)("span",{className:A.default.dots,children:"..."},"dots-start"));for(let t=e-2;t<=e+2;t++)l.push((0,a.jsx)(S.Button,{type:"light",className:`${A.default.paginationNumberButton} ${t===e?`${A.default.buttonActive} button-light-active`:""}`,onClick:()=>s(t),testInfo:`pagination-page-${t}-button`,children:t},t));l.push((0,a.jsx)("span",{className:A.default.dots,children:"..."},"dots-end")),l.push((0,a.jsx)(S.Button,{type:"light",className:A.default.paginationNumberButton,onClick:()=>s(t),testInfo:`pagination-page-${t}-button`,children:t},t))}return l};return(0,a.jsxs)("div",{className:A.default.pagination,id:"pagination",children:[(0,a.jsxs)("div",{className:A.default.paginationMobileView,id:"pagination-mobile",children:[(0,a.jsxs)("div",{className:A.default.buttonsWrapper,children:[(0,a.jsxs)(S.Button,{type:"light",className:A.default.paginationButton,onClick:o,disabled:1===e,testInfo:"pagination-previous-button",children:[(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-left-blue.svg`,width:"20",height:"25",alt:"previous-arrow-icon"}),"Previous"]}),(0,a.jsxs)(S.Button,{type:"light",className:A.default.paginationButton,onClick:r,disabled:e===t,testInfo:"pagination-next-button",children:["Next",(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-right-black.svg`,width:"20",height:"25",alt:"next-arrow-icon"})]})]}),(0,a.jsx)("div",{className:(0,i.default)(A.default.pageNumbersWrapper,{[A.default.pageNumbersWrapperSmallView]:t<=7}),children:n()})]}),(0,a.jsxs)("div",{className:A.default.paginationDesktopView,id:"pagination-desktop",children:[(0,a.jsxs)(S.Button,{type:"light",className:A.default.paginationButton,onClick:o,disabled:1===e,testInfo:"pagination-previous-button",children:[(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-left-blue.svg`,width:"20",height:"25",alt:"previous-arrow-icon"}),"Previous"]}),n(),(0,a.jsxs)(S.Button,{type:"light",className:A.default.paginationButton,onClick:r,disabled:e===t,testInfo:"pagination-next-button",children:["Next",(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-right-black.svg`,width:"20",height:"25",alt:"next-arrow-icon"})]})]})]})};var j=((t={})[t.BRANCH=0]="BRANCH",t[t.ON_SALE=1]="ON_SALE",t[t.PRODUCT_TAG=2]="PRODUCT_TAG",t[t.PRODUCT=3]="PRODUCT",t),w=e.i(701509),k=e.i(151818);let R=0,P=({storeRepository:e,cart:t,store:o,settings:i,searchQuery:r,onProductClicked:s,selectedCatalogType:n,selectedCatalogBranch:c,onFilterRemoved:u,selectedFilters:g,catalogTree:_,brandTree:h,vendorTree:p,currentPage:f,onCurrentPageChange:C,totalPages:N,setTotalPages:T,sortOption:S,onSortByOptionSelected:A,clearSearch:P})=>{let L,O,F,$,U,E,G,[q,W]=(0,l.useState)([]),[D,H]=(0,l.useState)(0),[V,Y]=(0,l.useState)(!1),[z,Q]=(0,l.useState)(!1),[K,J]=(0,l.useState)([]),X=(0,l.useRef)(null),{dependencyInjector:Z}=(0,B.useAppProvider)();(0,l.useEffect)(()=>{let e={name:"ProductListComponent.ordersListener",onChanged:()=>{J(t.getOrders().filter(e=>!e.isBundleChild&&!e.isMealChild))}};return e.onChanged(),t.addOrdersChangeListener(e),()=>t.removeOrdersChangeListener(e)},[Z]),(0,l.useEffect)(()=>{(async()=>{let t=Date.now();R=t,Y(!0);let{categoryIdAsBranch:a,brandIdAsBranch:l,vendorIdAsBranch:i}=et(),s=ee(b.CatalogType.BRAND),n=ee(b.CatalogType.VENDOR),d=g.some(e=>e.tagName===b.CatalogType.ON_SALE),c=(e=>{if(0===e.length)return[];let t=[b.CatalogType.BRAND,b.CatalogType.VENDOR,b.CatalogType.ON_SALE],a=e.filter(e=>!t.includes(e.tagName)),l=new Map;for(let{tagName:e,id:t}of a){let a=l.get(e)||[];l.set(e,[...a,t])}return Array.from(l.values())})(g),{data:u}=await e.getCategoriesProducts_v2(o.id,a,0,r||void 0,void 0,l?[l]:s.length>0?s:void 0,i?[i]:n.length>0?n:void 0,48,c.length>0?c:void 0,d||void 0,f-1,S.mode,S.direction);if(t===R){if(0===(u.data||[]).length&&(s.length>0||n.length>0||d||r||c.length>0)){Q(!0);let{data:t}=await e.getCategoriesProducts_v2(o.id,a,0,void 0,void 0,void 0,void 0,48,void 0,void 0,f-1);0===(t.data||[]).length?Q(!1):Q(!0),W(t.data||[]),T(t.totalPages),H(t.totalRows)}else Q(!1),W(u.data||[]),T(u.totalPages),H(u.totalRows);Y(!1)}})()},[c,r,g,f,S]);let ee=e=>g.filter(t=>t.tagName===e).map(e=>e.id),et=()=>{let e=c.getBranchMenuItem().id,t=t=>n===t?e:void 0;return{categoryIdAsBranch:t(b.CatalogType.CATEGORY),brandIdAsBranch:t(b.CatalogType.BRAND),vendorIdAsBranch:t(b.CatalogType.VENDOR)}};return(0,a.jsxs)("div",{ref:X,children:[o.isRestaurant?(0,a.jsx)("h1",{className:y.default.categoryName,children:c?.getBranchMenuItem()?.name??""}):(0,a.jsx)("h1",{className:y.default.header,children:(L=c?.getBranchMenuItem()?.name,i.businessCategoryId===m.BusinessCategory.QSR?L??"":`All products ${L?n===b.CatalogType.BRAND?`from ${L}`:`in ${L}`:""}`)}),g.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{className:y.default.filtersTitle,children:"Currently filtered by:"}),(0,a.jsx)("div",{className:y.default.filters,children:g.map(e=>{let t="brand"===e.tagName,l="vendor"===e.tagName,i="on_sale"===e.tagName,r="brand"!==e.tagName&&"vendor"!==e.tagName&&"on_sale"!==e.tagName;return i?(0,a.jsxs)("div",{className:y.default.filtersItem,children:[(0,a.jsx)("p",{children:o.onSaleFilterName||"On sale"}),(0,a.jsx)("div",{className:y.default.filtersItemIconWrapper,onClick:()=>u(j.ON_SALE,e),children:(0,a.jsx)(d.default,{src:"/img/close.svg",alt:"remove-filter-img",width:16,height:16})})]},e.id):(0,a.jsxs)("div",{className:`notranslate ${y.default.filtersItem}`,children:[(0,a.jsx)("p",{children:e.valueToDisplay}),(0,a.jsx)("div",{className:y.default.filtersItemIconWrapper,onClick:()=>{t?u(j.BRANCH,e,b.CatalogType.BRAND):l?u(j.BRANCH,e,b.CatalogType.VENDOR):r&&u(j.PRODUCT_TAG,e,void 0,e.tagName,`${e.valueForUrl}`)},children:(0,a.jsx)(d.default,{src:"/img/close.svg",alt:"remove-filter-img",width:16,height:16})})]},`${e.tagName}-${e.valueToDisplay}`)})})]}),(0,a.jsxs)("div",{className:y.default.toolbar,children:[c&&(0,a.jsxs)("div",{className:y.default.search,children:[r&&(0,a.jsxs)("div",{className:y.default.searchResultsWrapper,children:[(0,a.jsxs)("div",{className:y.default.searchResults,children:[(0,a.jsx)("span",{children:"Results for"})," ",(0,a.jsx)("span",{children:`"${r}"`})]}),(0,a.jsx)(d.default,{onClick:()=>P(),src:"/img/clean.svg",alt:"remove-filter-img",width:25,height:25})]}),D>0&&i.businessCategoryId!==m.BusinessCategory.QSR&&(0,a.jsx)("div",{className:y.default.totalRows,children:(O=new Intl.NumberFormat("en-US"),F=(f-1)*48+1,$=Math.min(48*f,D),U=O.format(F),E=O.format($),G=O.format(D),`${U} - ${E} of ${G} results`)})]}),(0,a.jsx)(v.Dropdown,{className:y.default.sortByDropdown,label:"Sort by",value:JSON.stringify(S),options:k.sortByOptions.map(e=>({value:JSON.stringify(e),label:e.label})),onSelect:e=>{A(JSON.parse(e))}
1,hideSearch:!0,hideDefaultOption:!0,showFullHeight:!0,testInfo:["sort-by-dropdown","sort-by-dropdown-option-"]})]}),!V&&!z&&0===q.length&&(0,a.jsx)("div",{className:y.default.productsNotFound,children:"Unfortunately, there are no products in this category, but you might find something similar in other categories"}),z&&(0,a.jsx)("div",{className:y.default.productsNotFound,children:(0,a.jsx)("p",{children:"We apologize that we could not find what you were searching for. But here are some suggestions for you to consider."})}),(0,a.jsxs)("div",{className:y.default.productList,children:[V&&(0,a.jsx)("div",{className:y.default.productListLoaderBackground,children:(0,a.jsx)("div",{className:y.default.productListLoader,children:(0,a.jsx)(x.Loader,{size:"sm"})})}),(0,a.jsx)("div",{className:y.default.productsListGrid,children:q.map((e,t)=>{let l;return(0,a.jsx)(w.ProductListItem,{dependencyInjector:Z,productItem:e,onClick:s,store:o,settings:i,productCategoryId:(n===b.CatalogType.CATEGORY&&(l=_.getMenuByMatcher({isMatches:t=>t.id===e.menuId})),n===b.CatalogType.BRAND&&(l=h.getMenuByMatcher({isMatches:t=>t.id===e.menuId})),n===b.CatalogType.VENDOR&&p&&(l=p.getMenuByMatcher({isMatches:t=>t.id===e.menuId})),l?.id),isConsumer:i.siteType===I.SiteType.CONSUMER,isFirst:0===t,isProductInCart:K.some(t=>t.itemId===e.id),isPreviewEnabled:i.siteType!==I.SiteType.GLOBAL_MARKETPLACE,vendorId:i.siteType===I.SiteType.GLOBAL_MARKETPLACE?et().vendorIdAsBranch||ee(b.CatalogType.VENDOR)[0]:void 0},`${e.id}-${e.menuId}-${t}`)})})]}),N>1&&(0,a.jsx)(M,{currentPage:f,totalPages:N,onPageChange:e=>{X.current?.scrollIntoView({behavior:"smooth"}),C(e)}})]})};var L=e.i(571152),O=e.i(917295);class F{select({categoryTree:e,brandTree:t,vendorTree:a,onCategorySelected:l,menuCode:o}){if(!o||"undefined"===o||"null"===o)return!1;let i={isMatches:e=>o===e.code?.trim()},r=e.getMenuByMatcher(i);if(r)return l(b.CatalogType.CATEGORY,new s.default(r)),!0;let n=t.getMenuByMatcher(i);if(n)return l(b.CatalogType.BRAND,new s.default(n)),!0;let d=a.getMenuByMatcher(i);return!!d&&(l(b.CatalogType.VENDOR,new s.default(d)),!0)}}class ${async select({store:e,settings:t,categoryTree:a,vendorTree:l,storeRepository:o,onProductClicked:i,productId:r,menuCode:s}){let n;if(r){let a=e.menus.find(e=>e.code===s);if(!a||!a.id){window.location.href=O.UrlUtils.getLink(e,t,"shop/_?productNotFound=true");return}let{data:l,error:i}=await o.getMenuItem(e.id,a.id,Number(r),void 0,e.isRestaurant);if(i?.message){window.location.href=O.UrlUtils.getLink(e,t,"shop/_?productNotFound=true");return}(n=l).menuId=a.id}if(void 0===n)return;let d={isMatches:e=>n?.menuId===e.id},c=a.getMenuByMatcher(d);c||(c=l.getMenuByMatcher(d)),i(n,!e.isRestaurant,c)}}var U=e.i(442501),E=e.i(820204),G=e.i(683520),q=e.i(788563),W=e.i(173179),D=e.i(293848);let H=(0,l.forwardRef)(({listTitle:e,catalogType:t,tree:o,selectedCatalogBranch:r,onFilterSelected:s,selectedFilters:n,onMouseEnter:c,onMouseLeave:u},m)=>{let[g,_]=(0,l.useState)(""),[h,f]=(0,l.useState)(!0),C=o.getMenuBranches(),N=C.filter(e=>(e.getBranchMenuItem().name||"").toLocaleLowerCase().includes(g.toLocaleLowerCase()));return(0,a.jsxs)("div",{className:D.default.menuRoot,children:[(0,a.jsxs)("div",{className:D.default.titleWrapper,onClick:()=>f(e=>!e),children:[(0,a.jsx)("h2",{className:D.default.title,children:e}),(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-right-gray.svg`,width:"12",height:"12",alt:"Arrow",className:(0,i.default)(D.default.expandArrow,{[D.default.open]:h})})]}),C.length>10&&(0,a.jsx)("div",{className:(0,i.default)(D.default.inputWrapper,{[D.default.open]:h}),children:(0,a.jsx)(W.InputSearch,{className:D.default.inputSearch,value:g,onChange:e=>_(e.target.value),placeholder:"Search"})}),(0,a.jsx)("div",{className:(0,i.default)(D.default.list,{[D.default.open]:h}),onMouseEnter:c,onMouseLeave:u,ref:m,children:N.map(e=>{let l=r?.getBranchMenuItem().id===e.getBranchMenuItem().id,o=n.some(a=>a.tagName===t&&a.id===e?.getBranchMenuItem().id),c=l||o||e.isBranchSelected();return(0,a.jsx)("div",{className:D.default.category,"test-info":`menu-item-id-${e.getBranchMenuItem().id}`,onClick:()=>s(j.BRANCH,t,e),children:(0,a.jsxs)("div",{className:D.default.categoryNameRoot,children:[(0,a.jsx)("div",{className:(0,i.default)(D.default.checkbox,{[D.default.checkboxActive]:c}),children:(0,a.jsx)("div",{className:D.default.checkboxImage,children:(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/check-white.svg`,width:"12",height:"12",alt:"Checked",className:"invert"})})}),(0,a.jsx)("div",{className:(0,i.default)(D.default.categoryName,{[D.default.categoryActive]:c},"notranslate"),children:e.getBranchMenuItem().name})]})},e.getBranchMenuItem().id)})})]})});var V=e.i(877774);let Y=({tagName:e,isSelected:t,onFilterSelected:l})=>(0,a.jsxs)("div",{className:V.default.tag,onClick:l,"test-info":"on_sale-filter",children:[(0,a.jsx)("div",{className:V.default.checkboxWrapper,children:(0,a.jsx)("div",{className:`${V.default.checkbox} ${t?V.default.checkboxActive:""}`,children:(0,a.jsx)("div",{className:V.default.checkboxImage,children:(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/check-white.svg`,width:"12",height:"12",alt:"Checked",className:"invert"})})})}),(0,a.jsx)("div",{className:`${V.default.tagName} ${t?V.default.tagNameActive:""}`,children:e})]});var z=e.i(788215);let Q=({sectionTitle:e,tagName:t,isSelected:o,onFilterSelected:r,isLast:s=!1})=>{let[n,c]=(0,l.useState)(!0);return(0,a.jsxs)("div",{className:z.default.wrapper,style:{borderBottom:s?"none":"1px solid #e9e9e9"},children:[(0,a.jsxs)("div",{className:z.default.titleWrapper,onClick:()=>c(e=>!e),children:[(0,a.jsx)("h2",{className:z.default.title,children:e}),(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-right-gray.svg`,width:"12",height:"12",alt:"Arrow",className:(0,i.default)(z.default.expandArrow,{[z.default.open]:n})})]}),(0,a.jsx)("div",{className:(0,i.default)(z.default.list,{[z.default.open]:n}),children:(0,a.jsx)(Y,{tagName:t,isSelected:o,onFilterSelected:()=>r(j.ON_SALE)})})]})};var K=e.i(813411);let J=(e,t,o,r,s=0)=>(0,a.jsxs)(l.default.Fragment,{children:[(0,a.jsxs)("div",{className:`${K.default.category}`,style:{marginLeft:`${s}px`},"test-info":`menu-item-id-${e.getBranchMenuItem().id}`,onClick:()=>o(e),children:[(0,a.jsx)("div",{className:K.default.categoryNameRoot,children:(0,a.jsx)("div",{className:(0,i.default)(K.default.categoryName,{[K.default.categoryActive]:r?.getBranchMenuItem().id===e.getBranchMenuItem().id||e.isBranchSelected()}),children:e.getBranchMenuItem().name})}),e.getChildren().length>0&&(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-right-gray.svg`,width:"12",height:"12",alt:"Category arrow"})]}),e.isBranchSelected()&&e.getChildren().map(e=>J(e,t,o,r,s+15))]},e.getBranchMenuItem().id),X=(0,l.forwardRef)(({listTitle:e,menuTree:t,selectedMenuItem:o,onCategorySelected:r,filteringVendor:s,onMouseEnter:n,onMouseLeave:c},u)=>{let[m,g]=(0,l.useState)(!0);return t.getMenuBranches().length?(0,a.jsxs)("div",{className:K.default.menuRoot,children:[(0,a.jsxs)("div",{className:K.default.titleWrapper,onClick:()=>g(e=>!e),children:[(0,a.jsx)("h2",{className:K.default.title,children:e}),(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-right-gray.svg`,width:"12",height:"12",alt:"Arrow",className:(0,i.default)(K.default.expandArrow,{[K.default.open]:m})})]}),(0,a.jsx)("div",{className:(0,i.default)(K.default.list,{[K.default.open]:m}),onMouseEnter:n,onMouseLeave:c,ref:u,children:t.getMenuBranches().map(e=>J(e,o?o.getBranchMenuItem():void 0,r,s,0))})]}):(0,a.jsx)("div",{className:K.default.emptyPlaceholder,children:"There are no categories, or they are turned off"})});var Z=e.i(5574);let ee=(0,l.forwardRef)(({productTag:e,selectedFilters:t,onFilterSelected:o,onMouseEnter:r,onMouseLeave:s},n)=>{let[c,u]=(0,l.useState)(""),[m,g]=(0,l.useState)(e.values),[_,h]=(0,l.useState)(!0);return(0,l.useEffect)(()=>{g(e.values.filter(e=>e.name.toLocaleLowerCase().includes(c.toLocaleLowerCase())))},[c]),(0,a.jsxs)("div",{className:Z.default.menuRoot,children:[e.values.length?(0,a.jsxs)("div",{className:Z.default.titleWrapper,onClick:()=>h(e=>!e),children:[(0,a.jsx)("h2",{className:Z.default.title,children:e.name}),(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/arrow-right-gray.svg`,width:"12",height:"12",alt:"Arrow",className:(0,i.default)(Z.default.expandArrow,{[Z.default.open]:_})})]}):(0,a.jsx)("div",{className:Z.default.titleWrapper,children:(0,a.jsx)("h2",{className:Z.default.title,children:e.name})}),e.values.length>10&&(0,a.jsx)("div",{className:(0,i.default)(Z.default.inputWrapper,{[Z.default.open]:_}),children:(0,a.jsx)(W.InputSearch,{className:Z.default.inputSearch,value:c,onChange:e=>u(e.target.value),placeholder:"Search"})}),(0,a.jsx)("div",{className:(0,i.default)(Z.default.list,{[Z.default.open]:_}),onMouseEnter:r,onMouseLeave:s,ref:n,children:m.map(l=>{let r=t.find(e=>e.id===l.id);return(0,a.jsx)("div",{className:Z.default.category,onClick:()=>o(j.PRODUCT_TAG,void 0,void 0,e.name,l),"test-info":`productTag-${e.name}-value-${l.id}`,children:(0,a.jsxs)("div",{className:Z.default.categoryNameRoot,children:[(0,a.jsx)("div",{className:(0,i.default)(Z.default.checkbox,{[Z.default.checkboxActive]:r}),children:(0,a.jsx)("div",{className:Z.default.checkboxImage,children:(0,a.jsx)(d.default,{src:`${p.PATH_TO_STATIC_CONTENT}/icons/check-white.svg`,width:"12",height:"12",alt:"Checked",className:"invert"})})}),(0,a.jsx)("div",{className:(0,i.default)(Z.default.categoryName,{[Z.default.categoryActive]:r}),children:l.name})]})},l.id)})})]})});var et=e.i(96567);let ea=({store:e,settings:t,categoryTree:o,brandTree:r,vendorTree:s,selectedCatalogBranch:n,selectedFilters:d,onCategorySelected:c,onFilterSelected:u})=>{let[m,g]=(0,l.useState)(!1),_=(0,l.useRef)(null),h=(0,l.useRef)(null),p=(0,l.useRef)(null),f=(0,l.useRef)([]),C=e.isRestaurant||!r.getMenuBranches().length&&!s.getMenuBranches().length&&!e.showOnSaleFilter,N=d.some(e=>"on_sale"===e.tagName),T=e=>{g(!!(e.current&&e.current.scrollHeight>e.current.clientHeight))};return(0,a.jsxs)("aside",{className:(0,i.default)(et.default.sidebar,{[et.default.hideScrollbar]:m}),children:[(0,a.jsx)(X,{listTitle:e.isRestaurant?"Menu":"Categories",menuTree:o,selectedMenuItem:n,onCategorySelected:c,onMouseEnter:()=>T(_),onMouseLeave:()=>g(!1),ref:_}),!C&&(0,a.jsxs)(a.Fragment,{children:[e.showOnSaleFilter&&(0,a.jsx)(Q,{tagName:e.onSaleFilterName||"On sale",isSelected:N,onFilterSelected:u,sectionTitle:"Price"}),r.getMenuBranches().length>0&&(0,a.jsx)(H,{listTitle:"Brands",catalogType:b.CatalogType.BRAND,tree:r,selectedCatalogBranch:n,onFilterSelected:u,selectedFilters:d,onMouseEnter:()=>T(h),onMouseLeave:()=>g(!1),ref:h}),t.siteType!==I.SiteType.CONSUMER&&s.getMenuBranches().length>0&&(0,a.jsx)(H,{listTitle:"Vendors",catalogType:b.CatalogType.VENDOR,tree:s,selectedCatalogBranch:n,onFilterSelected:u,selectedFilters:d,onMouseEnter:()=>T(p),onMouseLeave:()=>g(!1),ref:p})]}),e.productTags.length>0&&e.productTags.filter(e=>e.values.length>0).map((e,t)=>(0,a.jsx)(ee,{productTag:e,selectedFilters:d,onFilterSelected:u,onMouseEnter:()=>{var e;g(!!((e=f.current[t])&&e.scrollHeight>e.clientHeight))},onMouseLeave:()=>g(!1),ref:e=>{f.current[t]=e}},e.id))]})};var el=e.i(523550);let eo=({store:e,isPopupActive:t,brandTree:l,vendorTree:o,selectedFilters:i,onFilterSelected:r,onClose:s,onSaleTitle:n})=>{let d=i.some(e=>"on_sale"===e.tagName);return(0,a.jsx)(u.Popup,{direction:"bottom",title:"Filter By",initialHeight:"60dvh",isActive:t,onClose:s,confirmButtonText:"Apply",onConfirmButtonClick:s,children:(0,a.jsxs)("div",{className:el.default.body,children:[l&&l.getMenuBranches().length>0&&(0,a.jsxs)("div",{className:el.default.list,children:[(0,a.jsx)("div",{className:el.default.listName,children:"Brands"}),(0,a.jsx)("div",{className:el.default.listItems,children:l.getChildren().map(e=>{let t=i.some(t=>t.tagName===b.CatalogType.BRAND&&t.id===e?.getBranchMenuItem().id);return(0,a.jsxs)("div",{onClick:()=>r(j.BRANCH,b.CatalogType.BRAND,e),className:`${el.default.listItem} notranslate`,children:[(0,a.jsx)("div",{className:`${el.default.checkbox} ${t?el.default.checkboxActive:""}`,children:(0,a.jsx)("img",{className:el.default.checkboxImage,loading:"lazy",src:`${p.PATH_TO_STATIC_CONTENT}/icons/check-white.svg`,width:"12",height:"12",alt:"Checked"})}),e.getBranchMenuItem().name]},`brand_mobile_branch_${e.getBranchMenuItem().id}`)})})]}),o&&o.getChildren().length>0&&(0,a.jsxs)("div",{className:el.default.list,children:[(0,a.jsx)("div",{className:el.default.listName,children:"Vendors"}),(0,a.jsx)("div",{className:el.default.listItems,children:o.getChildren().map(e=>{let t=i.some(t=>t.tagName===b.CatalogType.VENDOR&&t.id===e?.getBranchMenuItem().id);return(0,a.jsxs)("div",{onClick:()=>r(j.BRANCH,b.CatalogType.VENDOR,e),className:el.default.listItem,children:[(0,a.jsx)("div",{className:`${el.default.checkbox} ${t?el.default.checkboxActive:""}`,children:(0,a.jsx)("img",{className:el.default.checkboxImage,loading:"lazy",src:`${p.PATH_TO_STATIC_CONTENT}/icons/check-white.svg`,width:"12",height:"12",alt:"Checked"})}),e.getBranchMenuItem().name]},`vendor_mobile_branch_${e.getBranchMenuItem().id}`)})})]}),e.showOnSaleFilter&&(0,a.jsxs)("div",{className:el.default.list,children:[(0,a.jsx)("div",{className:el.default.listName,children:n}),(0,a.jsx)("div",{className:el.default.listItems,children:(0,a.jsxs)("div",{onClick:()=>r(j.ON_SALE),className:el.default.listItem,children:[(0,a.jsx)("div",{className:`${el.default.checkbox} ${d?el.default.checkboxActive:""}`,children:(0,a.jsx)("img",{className:el.default.checkboxImage,loading:"lazy",src:`${p.PATH_TO_STATIC_CONTENT}/icons/check-white.svg`,width:"12",height:"12",alt:"Checked"})}),e.onSaleFilterName||"On sale"]})})]}),e.productTags.length>0&&e.productTags.filter(e=>e.values.length>0).map(e=>(0,a.jsxs)("div",{className:el.default.list,children:[(0,a.jsx)("div",{className:el.default.listName,children:e.name}),(0,a.jsx)("div",{className:el.default.listItems,children:e.values.map(t=>{let l=i.find(e=>e.id===t.id);return(0,a.jsxs)("div",{onClick:()=>r(j.PRODUCT_TAG,void 0,void 0,e.name,t),className:el.default.listItem,children:[(0,a.jsx)("div",{className:`${el.default.checkbox} ${l?el.default.checkboxActive:""}`,children:(0,a.jsx)("img",{className:el.default.checkboxImage,loading:"lazy",src:`${p.PATH_TO_STATIC_CONTENT}/icons/check-white.svg`,width:"12",height:"12",alt:"Checked"})}),t.name]},t.id)})})]},e.id))]})})};var ei=e.i(737871),er=e.i(123721);let es=({selectedCatalogBranch:e,categoryTree:t,onCategorySelected:o,isShowBrandSearch:i,setIsMobileFiltersShown:r,setIsMobileSortByShown:s})=>{let[n,d]=(0,l.useState)(!1),{store:u,settings:_}=(0,c.useStoreAndSettings)();return(0,a.jsxs)(a.Fragment,{children:[e&&e.getBranchMenuItem().bannerUrl&&(0,a.jsx)("img",{loading:"lazy",className:er.default.banner,alt:"Banner",src:e?.getBranchMenuItem().bannerUrl||"",onClick:()=>d(!0)}),n&&(0,a.jsxs)("div",{className:er.default.bannerModal,children:[(0,a.jsx)("div",{className:er.default.bannerModalBackgroun
1d,onClick:()=>d(!1)}),(0,a.jsxs)("div",{className:er.default.bannerModalImageWrapper,children:[(0,a.jsx)("img",{loading:"lazy",alt:"Banner",src:e?.getBranchMenuItem().bannerUrl||""}),(0,a.jsx)("button",{className:er.default.bannerModalCloseButton,onClick:()=>d(!1),children:"×"})]})]}),e&&!!e.getBranchMenuItem().description&&(0,a.jsx)("div",{className:er.default.description,dangerouslySetInnerHTML:{__html:e.getBranchMenuItem().description||""}}),(0,a.jsx)("div",{className:er.default.desktopChildCategories,children:e&&e?.getBranchMenuItem().id!==t.getBranchMenuItem().id&&(0,a.jsx)(C,{store:u,onCategorySelected:e=>o(e),selectedCatalogBranch:e})}),e&&_.businessCategoryId!==m.BusinessCategory.QSR&&(0,a.jsxs)("div",{className:er.default.mobileFiltersAndSortBy,children:[i&&(0,a.jsxs)("div",{onClick:()=>r(!0),className:er.default.mobileFiltersButton,children:[(0,a.jsx)(g.FontAwesomeIcon,{icon:ei.faFilter})," Filters"]}),(0,a.jsxs)("div",{onClick:()=>s(!0),className:er.default.mobileFiltersButton,children:[(0,a.jsx)(g.FontAwesomeIcon,{icon:ei.faArrowUpWideShort})," Sort by"]})]})]})};var en=e.i(352819),ed=e.i(654099),ec=e.i(620149);let eu=({isPopupActive:e,sortOption:t,onSortByOptionSelected:l,onClose:o})=>(0,a.jsx)(u.Popup,{direction:"bottom",title:"Sort By",initialHeight:"45dvh",isActive:e,onClose:o,children:(0,a.jsx)("div",{className:ec.default.body,children:(0,a.jsx)("div",{className:ec.default.list,children:k.sortByOptions.map(e=>{let i=t.mode===e.mode&&t.direction===e.direction;return(0,a.jsxs)("div",{className:ec.default.listItem,onClick:()=>{l(e),o()},children:[(0,a.jsx)("div",{className:`${ec.default.checkbox} ${i?ec.default.checkboxActive:""}`,children:(0,a.jsx)("img",{className:ec.default.checkboxImage,loading:"lazy",src:`${p.PATH_TO_STATIC_CONTENT}/icons/check-white.svg`,width:"12",height:"12",alt:"checkbox"})}),e.label]},`${e.mode}-${e.direction}`)})})})});var em=e.i(182938);e.s(["CatalogComponent",0,({ssrUrl:e})=>{let{store:t,settings:d}=(0,c.useStoreAndSettings)(),u=k.sortByOptions.find(e=>e.mode===t.defaultSortMode&&e.direction===t.defaultSortDirection)||k.sortByOptions[0],[g,_]=(0,l.useState)(new r.default(t.menus)),[h,p]=(0,l.useState)(new r.default(t.brands)),[f,C]=(0,l.useState)(new r.default(t.vendors)),[v,x]=(0,l.useState)(b.CatalogType.CATEGORY),[y,I]=(0,l.useState)(),S=(0,l.useRef)(null),A=(0,l.useRef)(null),[M,w]=(0,l.useState)([]),[R,W]=(0,l.useState)(),[D,H]=(0,l.useState)(!1),[V,Y]=(0,l.useState)(""),[z,Q]=(0,l.useState)(u),[K,J]=(0,l.useState)(1),[X,Z]=(0,l.useState)(1),[ee,et]=(0,l.useState)(!1),[el,ei]=(0,l.useState)(!1),[er,ec]=(0,l.useState)(!1),eg=(0,o.useRouter)(),{dependencyInjector:e_,dataDependencies:eh,domainDependencies:ep}=(0,B.useAppProvider)(),{storeRepository:ef,errorLogger:eC,localStorageAccessor:eN,authRepository:eT,sourceHelper:ev}=eh,{screenChangeHelper:ex,shopHolder:eb,currencyHelper:ey}=ep,{analyticsHelper:eI}=ep,eB=e_.domain.getCart(t.id),eS=new n.BrowserHistoryHelper(eC,eg,eN),eA=e=>!!e.current&&e.current.getBoundingClientRect().top<0,eM=(e,t)=>{W(e),t&&H(!0),ej(b.CatalogType.PRODUCT,y,e,!1)},ej=async(t,a,l,o,i,r)=>{let s,n,d=U.EcommerceEventSubmitter.grabUtmsIntoString("&");a&&(s=O.UrlUtils.getFormattedIdentifier(a.getBranchMenuItem().code||"",a.getBranchMenuItem().name||"")),l&&(n=O.UrlUtils.getFormattedIdentifier(l.id,l.name)),"-"===s&&(s="_");let c=O.UrlUtils.updateUrlForCatalogPage(t,s,n,V,e,o,i,r);return eS.replaceCurrectUrlInHistory(`${c}${d}`)},ew=(e,t,a,l)=>{if(eA(S)&&S.current?.scrollIntoView({behavior:"smooth"}),J(1),ej(e,t,void 0,a,!1,l),x(e),I(t),g&&_(g.getTreeWithoutSelection()),h&&p(h.getTreeWithoutSelection()),f&&C(f.getTreeWithoutSelection()),t){let a=t.getBranchMenuItem().id===y?.getBranchMenuItem().id;if(e===b.CatalogType.CATEGORY)return _(g.getTreeWithoutSelection().selectMenuBranchInTree(t.getBranchMenuItem()));if(e===b.CatalogType.BRAND)return a?(w(e=>e.filter(e=>e.tagName!==b.CatalogType.BRAND)),I(h.getTreeWithoutSelection())):p(h.getTreeWithoutSelection().selectMenuBranchInTree(t.getBranchMenuItem()));if(e===b.CatalogType.VENDOR&&f)return a?(w(e=>e.filter(e=>e.tagName!==b.CatalogType.VENDOR)),I(f.getTreeWithoutSelection())):C(f.getTreeWithoutSelection().selectMenuBranchInTree(t.getBranchMenuItem()))}else I(void 0);Y("")};(0,l.useEffect)(()=>{(async()=>{ex.initialize(),"true"===new L.CaseInsensitiveUrlParams(new URLSearchParams(window.location.search)).get("productNotFound")&&setTimeout(()=>{E.toast.danger("Product has not been found. Please choose an another one",3e3)},0);let{category:e,filters:a}=eg.query,{brand:l,vendor:o,search:i,product:r}=a?O.UrlUtils.parseFilters(a):{},s="",n="";if("string"==typeof e&&"_"!==e&&(s=O.UrlUtils.getIdentifierCode(e)),"_"===e&&(l&&(s=O.UrlUtils.getIdentifierCode(l)),o&&(s=O.UrlUtils.getIdentifierCode(o))),r&&(n=r.split("-")[0]),i)new F().select({vendorTree:f,brandTree:h,categoryTree:g,onCategorySelected:ew,menuCode:s})||ew(b.CatalogType.CATEGORY,g);else{let a=!1;new F().select({vendorTree:f,brandTree:h,categoryTree:g,onCategorySelected:(e,t)=>{a=!0,ew(e,t)},menuCode:s}),await new $().select({vendorTree:f,store:t,settings:d,categoryTree:g,storeRepository:ef,onProductClicked:eM,productId:n,menuCode:s}),a||"mobile"===ex.getScreenType()&&d.businessCategoryId!==m.BusinessCategory.QSR||("_"===e&&l?ew(b.CatalogType.BRAND,h.getMenuBranches()[0]):ew(b.CatalogType.CATEGORY,g.getMenuBranches()[0]))}})(),ec(ev.isSourceApp())},[]),(0,l.useEffect)(()=>{V&&ej(b.CatalogType.SEARCH)},[V]),(0,l.useEffect)(()=>{let{filters:e}=eg.query,t=e?O.UrlUtils.parseFilters(e):{},{brand:a,vendor:l,page:o,search:i,on_sale:r,sort:n}=t;if(ek(t),J(Number(o)||1),Q(k.sortByOptions.find(e=>
1e.urlValue===n)||u),a&&a.split(",").forEach(e=>{let t=O.UrlUtils.getIdentifierCode(e),a=h.getMenuByMatcher({isMatches:e=>t===e.code});a&&eR(j.BRANCH,b.CatalogType.BRAND,new s.default(a))}),l&&l.split(",").forEach(e=>{let t=O.UrlUtils.getIdentifierCode(e),a=f.getMenuByMatcher({isMatches:e=>t===e.code});a&&eR(j.BRANCH,b.CatalogType.VENDOR,new s.default(a))}),Y(i||""),r){if(M.some(e=>"on_sale"===e.tagName))return;let e={id:-2,name:"on_sale",valueToDisplay:"On sale",valueForUrl:"true",tagName:"on_sale"};w(t=>[...t,e])}},[]),(0,l.useEffect)(()=>{document.body.style.overflow=ee||el?"hidden":"visible"},[ee,el]);let ek=e=>{0===Object.keys(e).length||w(Object.entries(e).flatMap(([e,t])=>t.split(",").map(t=>({id:-1,name:e,valueToDisplay:t.trim(),valueForUrl:t.trim(),tagName:e}))).map(e=>{let a=t.productTags.find(t=>t.name===e.tagName);if(a){let t=a.values.find(t=>t.name===e.valueToDisplay);if(t)return{...e,id:t.id}}return e}).filter(e=>-1!==e.id))},eR=async(t,a,l,o,i)=>{eA(A)&&A.current?.scrollIntoView({behavior:"smooth"}),J(1);let r=U.EcommerceEventSubmitter.grabUtmsIntoString("&");switch(t){case j.BRANCH:{if(!a||!l)return;let t=M.find(e=>e.tagName===a&&e.id===l?.getBranchMenuItem().id),o=y?.getBranchMenuItem().id===l?.getBranchMenuItem().id;if(t)eP(j.BRANCH,t,a);else if(o)ew(b.CatalogType.CATEGORY,g.getMenuBranches()[0],!1,!0);else{let{category:t,filters:o}=eg.query,{search:i}=o?O.UrlUtils.parseFilters(o):{};if("_"!==t||i){let t=O.UrlUtils.getFormattedIdentifier(l.getBranchMenuItem().code||"",l.getBranchMenuItem().name||""),o={id:l.getBranchMenuItem().id||0,name:a,valueToDisplay:l.getBranchMenuItem().name||"",valueForUrl:t,tagName:a},i=!1;w(e=>e.some(e=>e.tagName===o.tagName&&e.id===o.id)?(i=!0,e.filter(e=>e.tagName!==o.tagName||e.id!==o.id)):[...e,o]);let s=O.UrlUtils.updateUrlForCatalogPageWithProductTags(a,t,e,i);eS.replaceCurrectUrlInHistory(`${s}${r}`)}else ew(a,l)}break}case j.ON_SALE:{let t=M.find(e=>"on_sale"===e.tagName),a=!1;if(t)w(e=>{let t=e.filter(e=>"on_sale"!==e.tagName);return t.length!==e.length&&(a=!0),t});else{let e={id:-2,name:"on_sale",valueToDisplay:"On sale",valueForUrl:"true",tagName:"on_sale"};w(t=>[...t,e])}let l=O.UrlUtils.updateUrlForCatalogPageWithOnSale("on_sale",!0,e,a);eS.replaceCurrectUrlInHistory(`${l}${r}`);break}case j.PRODUCT_TAG:{if(!o||!i)return;let t=M.find(e=>e.tagName===o&&e.id===i.id),a=!1,l={id:i.id,name:o,valueToDisplay:i.name,valueForUrl:i.name,tagName:o};t?(a=!0,w(e=>e.filter(e=>e.tagName!==o||e.id!==i.id))):w(e=>[...e,l]);let s=O.UrlUtils.updateUrlForCatalogPageWithProductTags(o,i.name,e,a);eS.replaceCurrectUrlInHistory(`${s}${r}`)}}},eP=(t,a,l,o,i,r=!0)=>{r&&eA(A)&&A.current?.scrollIntoView({behavior:"smooth"}),J(1);let s=U.EcommerceEventSubmitter.grabUtmsIntoString("&");switch(t){case j.BRANCH:if(!l)return;if(R)ej(l,y,void 0,!1,!0);else{a&&w(e=>e.filter(e=>e.id!==a.id));let{category:t,filters:l}=eg.query;if("_"===t&&0===l.length)ew(b.CatalogType.CATEGORY,g.getMenuBranches()[0]);else{let t=O.UrlUtils.updateUrlForCatalogPageWithProductTags(a?.name||"",String(a?.valueForUrl||""),e,!0);eS.replaceCurrectUrlInHistory(`${t}${s}`)}}break;case j.ON_SALE:{w(e=>e.filter(e=>"on_sale"!==e.tagName));let t=O.UrlUtils.updateUrlForCatalogPageWithOnSale("on_sale",!0,e,!0);eS.replaceCurrectUrlInHistory(`${t}${s}`);break}case j.PRODUCT_TAG:{if(!o||!i)return;w(e=>e.filter(e=>e.tagName!==o||e.valueToDisplay!==i));let t=O.UrlUtils.updateUrlForCatalogPageWithProductTags(o,i,e,!0);eS.replaceCurrectUrlInHistory(`${t}${s}`)}}},eL=t=>{eA(A)&&A.current?.scrollIntoView({behavior:"smooth"}),J(1),Q(t);let a=U.EcommerceEventSubmitter.grabUtmsIntoString("&"),l=t.mode===u.mode&&t.direction===u.direction,o=O.UrlUtils.updateUrlForCatalogPageWithSortBy("sort",t.urlValue,e,l);eS.replaceCurrectUrlInHistory(`${o}${a}`)},eO=v!==b.CatalogType.BRAND&&!t.isRestaurant,eF=(0,en.useTranslations)();return(0,a.jsxs)("main",{className:(0,i.default)(em.default.catalogRoot,{[em.default.catalogRootQsr]:d.businessCategoryId===m.BusinessCategory.QSR}),id:"catalog-page",children:[(0,a.jsx)("div",{className:`${em.default.mobileMenu} ${er?`${em.default.mobileMenuSticky}`:""}`,children:(v!==b.CatalogType.VENDOR||f)&&(0,a.jsx)(T,{searchQuery:V,menuTree:v===b.CatalogType.CATEGORY?g:v===b.CatalogType.BRAND?h:f,selectedMenuItem:y,onCategorySelected:e=>ew(v,e)})}),(0,a.jsx)(N.Container,{children:(0,a.jsxs)("div",{className:em.default.catalogInner,ref:S,
1children:[(0,a.jsx)(ea,{store:t,settings:d,categoryTree:g,brandTree:h,vendorTree:f,selectedCatalogBranch:y,selectedFilters:M,onFilterSelected:eR,onCategorySelected:e=>{if(y&&v===b.CatalogType.BRAND){let{code:t,name:a,id:l}=y.getBranchMenuItem(),o=O.UrlUtils.getFormattedIdentifier(t||"",a||""),i={id:l||0,name:b.CatalogType.BRAND,valueToDisplay:a||"",valueForUrl:o,tagName:b.CatalogType.BRAND};ew(b.CatalogType.CATEGORY,e),w(e=>[...e,i])}else ew(b.CatalogType.CATEGORY,e)}}),(0,a.jsxs)("div",{className:em.default.productsSection,children:[(0,a.jsx)(es,{selectedCatalogBranch:y,categoryTree:g,onCategorySelected:e=>ew(v,e),isShowBrandSearch:eO,setIsMobileFiltersShown:et,setIsMobileSortByShown:ei}),(y||V)&&(v!==b.CatalogType.VENDOR||f)&&(0,a.jsx)("div",{ref:A,children:(0,a.jsx)(P,{storeRepository:ef,cart:eB,store:t,settings:d,searchQuery:V,onProductClicked:eM,selectedCatalogBranch:y||(v===b.CatalogType.CATEGORY?g:v===b.CatalogType.BRAND?h:f),selectedCatalogType:v,selectedFilters:M,onFilterSelected:eR,onFilterRemoved:eP,catalogTree:g,brandTree:h,vendorTree:f,clearSearch:()=>{Y(""),J(1),y?.getBranchMenuItem().name?ej(b.CatalogType.SEARCH,void 0,void 0,!0):ew(b.CatalogType.CATEGORY,g.getMenuBranches()[0],!0)},currentPage:K,onCurrentPageChange:t=>{J(t);let a=U.EcommerceEventSubmitter.grabUtmsIntoString("&"),l=O.UrlUtils.updateUrlWithPageNumber(t,e);return eS.replaceCurrectUrlInHistory(`${l}${a}`)},totalPages:X,setTotalPages:Z,sortOption:z,onSortByOptionSelected:eL})})]})]})}),(0,a.jsx)(ed.CartComponent,{utmParams:U.EcommerceEventSubmitter.grabUtmsIntoString("?"),isFixed:!0}),(0,a.jsx)(eo,{store:t,isPopupActive:ee,brandTree:h,vendorTree:f,selectedFilters:M,onFilterSelected:eR,onClose:()=>et(!1),onSaleTitle:"Price"}),(0,a.jsx)(eu,{isPopupActive:el,sortOption:z,onSortByOptionSelected:eL,onClose:()=>ei(!1)}),R&&(0,a.jsx)(G.default,{store:t,settings:d,dependencyInjector:e_,productOrderViewModel:new q.default(eB,ef,eT,eb,eS,eI,eC,t,d,e_,void 0,D),menuId:R.menuId,productId:R.id,isDialog:!0,isShow:!0,setShow:()=>{eP(j.BRANCH,void 0,b.CatalogType.PRODUCT,void 0,void 0,!1),W(void 0),H(!1)},onProductAdded:()=>E.toast.success("Item has been added to the cart!"),cart:eB,currencyHelper:ey,isProductPreview:D,isProductImageShown:!0,isRetailProduct:!t.isRestaurant,nextTranslate:eF,router:eg})]})}],142283)}]);

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.