import*as e from"@wordpress/interactivity";var t={438:e=>{e.exports=import("@wordpress/interactivity-router")}},r={};function a(e){var i=r[e];if(void 0!==i)return i.exports;var o=r[e]={exports:{}};return t[e](o,o.exports,a),o.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const t=(p={getContext:()=>e.getContext,getServerContext:()=>e.getServerContext,store:()=>e.store},v={},a.d(v,p),v),{getContext:r,store:i,getServerContext:o}=t,n=window.wc.wcSettings.getSetting,s=n("isBlockTheme"),c=n("isProductArchive"),l=n("needsRefreshForInteractivityAPI",!1);var p,v;const m=i("woocommerce/product-filters",{state:{get params(){const{activeFilters:e}=r(),t={};function a(e,r){if(e in t&&t[e].length>0)return t[e]=`${t[e]},${r}`;t[e]=r}return e.forEach((e=>{const{type:r,value:i}=e;i&&("price"===r&&"price"in e&&(e.price.min&&(t.min_price=e.price.min.toString()),e.price.max&&(t.max_price=e.price.max.toString())),"status"===r&&a("filter_stock_status",i),"rating"===r&&a("rating_filter",i),"attribute"===r&&"attribute"in e&&(a(`filter_${e.attribute.slug}`,i),t[`query_type_${e.attribute.slug}`]=e.attribute.queryType))})),t},get activeFilters(){const{activeFilters:e}=r();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(r().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:()=>{r().isOverlayOpened=!1},closeOverlayOnEscape:e=>{r().isOverlayOpened&&"Escape"===e.key&&m.actions.closeOverlay()},setActiveFilter:e=>{const{value:t,type:a}=e,i=r(),o=i.activeFilters.filter((e=>!(e.value===t&&e.type===a)));o.push(e),i.activeFilters=o},removeActiveFiltersBy:e=>{const t=r();t.activeFilters=t.activeFilters.filter((t=>!e(t)))},removeActiveFiltersByType:e=>{m.actions.removeActiveFiltersBy((t=>t.type===e))},removeActiveFilter:(e,t)=>{m.actions.removeActiveFiltersBy((r=>r.type===e&&r.value===t))},*navigate(){const{originalParams:e}=o?o():r();if(function(e,t){const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;for(const a of r)if(e[a]!==t[a])return!1;return!0}(m.state.params,e))return;const t=new URL(window.location.href),{searchParams:i}=t;for(const t in e)i.delete(t);for(const e in m.state.params)i.set(e,m.state.params[e]);yield async function(e,t={}){const r=new URL(e);if(r.pathname=r.pathname.replace(/\/page\/[0-9]+/i,""),r.searchParams.delete("paged"),r.searchParams.forEach(((e,t)=>{t.match(/^query(?:-[0-9]+)?-page$/)&&r.searchParams.delete(t)})),e=r.href,l||!s&&c)return window.location.href=e;const{actions:i}=await Promise.resolve().then(a.bind(a,438));return i.navigate(e,t)}(t.href)}},callbacks:{scrollLimit:()=>{const{isOverlayOpened:e}=r();document.body.style.overflow=e?"hidden":"auto"}}})})();