import*as e from"@wordpress/interactivity";var t={984:()=>{},438:e=>{e.exports=import("@wordpress/interactivity-router")}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var c=o[e]={exports:{}};return t[e](c,c.exports,n),c.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const t=(c={getContext:()=>e.getContext,getElement:()=>e.getElement,store:()=>e.store},i={},n.d(i,c),i),o=(e,{bubbles:t=!1,cancelable:o=!1,element:n,detail:r={}})=>{if(!CustomEvent)return;n||(n=document.body);const c=new CustomEvent(e,{bubbles:t,cancelable:o,detail:r});n.dispatchEvent(c)},r=e=>{o("wc-blocks_product_list_rendered",{bubbles:!0,cancelable:!0,detail:e})};var c,i;n(984);const l=new Map,a=document.getElementById("wp-interactivity-data");if(a){const e=JSON.parse(a.textContent);e.state?.["woocommerce/product-button"]&&(e.state["woocommerce/product-button"].addToCartText=void 0,a.textContent=JSON.stringify(e))}function s(e){return null!==e&&e instanceof window.HTMLAnchorElement&&!!e.href&&(!e.target||"_self"===e.target)&&e.origin===window.location.origin}async function d(e){if(!l.has(e)){const t=await window.fetch(e),o=await t.text(),n=(new window.DOMParser).parseFromString(o,"text/html"),r=n.getElementById("wp-interactivity-data"),c=JSON.parse(a.textContent);c.state?.["woocommerce/product-button"]&&(c.state["woocommerce/product-button"].addToCartText=void 0,r.textContent=JSON.stringify(c)),l.set(e,n.documentElement.outerHTML)}return l.get(e)||""}(0,t.store)("woocommerce/product-collection",{actions:{*navigate(e){const{ref:o}=(0,t.getElement)();if(s(o)&&function(e){return!(0!==e.button||e.metaKey||e.ctrlKey||e.altKey||e.shiftKey||e.defaultPrevented)}(e)){e.preventDefault();const c=(0,t.getContext)(),i=o.closest("[data-wp-router-region]")?.getAttribute("data-wp-router-region"),{actions:l}=yield Promise.resolve().then(n.bind(n,438));if(document.getElementById("wp-interactivity-data")){const e=yield d(o.href);yield l.navigate(o.href,{html:e})}else yield l.navigate(o.href);c.isPrefetchNextOrPreviousLink=o.href;const a=document.querySelector(`[data-wp-router-region=${i}] .wc-block-product-template .wc-block-product a`);a?.focus(),r({collection:c.collection})}},*prefetchOnHover(){const{ref:e}=(0,t.getElement)();if(s(e)){const{actions:t}=yield Promise.resolve().then(n.bind(n,438));if(document.getElementById("wp-interactivity-data")){const o=yield d(e.href);yield t.prefetch(e.href,{html:o})}else yield t.prefetch(e.href)}},*viewProduct(){const{collection:e,productId:n}=(0,t.getContext)();n&&o("wc-blocks_viewed_product",{bubbles:!0,cancelable:!0,detail:{collection:e,productId:n}})}},callbacks:{*prefetch(){const{ref:e}=(0,t.getElement)(),o=(0,t.getContext)();if(s(e)&&o.isPrefetchNextOrPreviousLink){const{actions:t}=yield Promise.resolve().then(n.bind(n,438));if(document.getElementById("wp-interactivity-data")){const o=yield d(e.href);yield t.prefetch(e.href,{html:o})}else yield t.prefetch(e.href)}},*onRender(){const{collection:e}=(0,t.getContext)();r({collection:e})}}},{lock:!0})})();