(()=>{"use strict";var e={1287:(e,t,o)=>{o.d(t,{c:()=>i});var r=o(5133);const c=window.wc.wcSettings,n=(0,c.getSetting)("isBlockTheme"),s=(0,c.getSetting)("isProductArchive");function i(e,t={}){return!n&&s?window.location.href=e:(0,r.navigate)(e,t)}},5133:e=>{e.exports=window.wc.__experimentalInteractivity}},t={};function o(r){var c=t[r];if(void 0!==c)return c.exports;var n=t[r]={exports:{}};return e[r](n,n.exports,o),n.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e=o(5133),t=o(1287);const r=e=>{const t=new URL(window.location.href),{searchParams:o}=t;return""!==e?o.set("filter_stock_status",e):o.delete("filter_stock_status"),t.href};(0,e.store)("woocommerce/product-filter-stock-status",{actions:{onCheckboxChange:()=>{const o=(0,e.getContext)("woocommerce/interactivity-checkbox-list").items.filter((e=>e.checked)).map((e=>e.value));(0,t.c)(r(o.join(",")))},onDropdownChange:()=>{const o=((0,e.getContext)("woocommerce/interactivity-dropdown").selectedItems||[]).map((e=>e.value));(0,t.c)(r(o.join(",")))},updateProducts:e=>{const o=new URL(window.location.href).searchParams.get("filter_stock_status")||"",c=""===o?[]:o.split(",");if(e.target.checked)o.includes(e.target.value)||c.push(e.target.value);else{const t=c.indexOf(e.target.value);t>-1&&c.splice(t,1)}(0,t.c)(r(c.join(",")))},removeFilter:()=>{const{value:o}=(0,e.getContext)(),c=new URL(window.location.href).searchParams.get("filter_stock_status")||"",n=""===c?[]:c.split(","),s=n.indexOf(o);s>-1&&n.splice(s,1),(0,t.c)(r(n.join(",")))}}})})()})();