var wc;(()=>{"use strict";var e={};(e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(e);const t=window.wc.__experimentalInteractivity,r=window.wc.wcSettings,i=(0,r.getSetting)("isBlockTheme"),a=(0,r.getSetting)("isProductArchive"),n=(0,r.getSetting)("needsRefreshForInteractivityAPI",!1),o=(0,t.store)("woocommerce/product-filters",{state:{get params(){const{activeFilters:e}=(0,t.getContext)(),r={};function i(e,t){if(e in r&&r[e].length>0)return r[e]=`${r[e]},${t}`;r[e]=t}return e.forEach((e=>{const{type:t,value:a}=e;a&&("price"===t&&"price"in e&&(e.price.min&&(r.min_price=e.price.min.toString()),e.price.max&&(r.max_price=e.price.max.toString())),"status"===t&&i("filter_stock_status",a),"rating"===t&&i("rating_filter",a),"attribute"===t&&"attribute"in e&&(i(`filter_${e.attribute.slug}`,a),r[`query_type_${e.attribute.slug}`]=e.attribute.queryType))})),r},get activeFilters(){const{activeFilters:e}=(0,t.getContext)();return e.filter((e=>!!e.value)).sort(((e,t)=>e.label.toLowerCase().localeCompare(t.label.toLowerCase()))).map((e=>({...e,uid:`${e.type}/${e.value}`})))}},actions:{openOverlay:()=>{if((0,t.getContext)().isOverlayOpened=!0,document.getElementById("wpadminbar")){const e=(document.documentElement||document.body.parentNode||document.body).scrollTop;document.body.style.setProperty("--adminbar-mobile-padding",`max(calc(var(--wp-admin--admin-bar--height) - ${e}px), 0px)`)}},closeOverlay:()=>{(0,t.getContext)().isOverlayOpened=!1},closeOverlayOnEscape:e=>{(0,t.getContext)().isOverlayOpened&&"Escape"===e.key&&o.actions.closeOverlay()},setActiveFilter:e=>{const{value:r,type:i}=e,a=(0,t.getContext)(),n=a.activeFilters.filter((e=>!(e.value===r&&e.type===i)));n.push(e),a.activeFilters=n},removeActiveFiltersBy:e=>{const r=(0,t.getContext)();r.activeFilters=r.activeFilters.filter((t=>!e(t)))},removeActiveFiltersByType:e=>{o.actions.removeActiveFiltersBy((t=>t.type===e))},removeActiveFilter:(e,t)=>{o.actions.removeActiveFiltersBy((r=>r.type===e&&r.value===t))},navigate:()=>{const{originalParams:e}=(0,t.getContext)();if(function(e,t){const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(const i of r)if(e[i]!==t[i])return!1;return!0}(o.state.params,e))return;const r=new URL(window.location.href),{searchParams:c}=r;for(const t in e)c.delete(t,e[t]);for(const e in o.state.params)c.set(e,o.state.params[e]);!function(e,r={}){const o=new URL(e);o.pathname=o.pathname.replace(/\/page\/[0-9]+/i,""),o.searchParams.delete("paged"),o.searchParams.forEach(((e,t)=>{t.match(/^query(?:-[0-9]+)?-page$/)&&o.searchParams.delete(t)})),e=o.href,n||!i&&a?window.location.href=e:(0,t.navigate)(e,r)}(r.href)}},callbacks:{scrollLimit:()=>{const{isOverlayOpened:e}=(0,t.getContext)();document.body.style.overflow=e?"hidden":"auto"}}});(wc=void 0===wc?{}:wc)["product-filters"]=e})();