var wc;(()=>{"use strict";var t={};(t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(t);const e=window.wc.__experimentalInteractivity,n=t=>{const e=(t=>{var e;return null===(e=t.target.parentElement)||void 0===e?void 0:e.querySelector(".input-text.qty.text")})(t);if(!e)return;const n=parseInt(e.value,10),a=parseInt(e.min,10),r=parseInt(e.max,10),i=parseInt(e.step,10);return{currentValue:isNaN(n)?0:n,minValue:isNaN(a)?1:a,maxValue:isNaN(r)?void 0:r,step:isNaN(i)?1:i,inputElement:e}},a=t=>{const e=new Event("change");t.dispatchEvent(e)};(0,e.store)("woocommerce/add-to-cart-with-options",{state:{},actions:{addQuantity:t=>{const e=n(t);if(!e)return;const{currentValue:r,maxValue:i,step:o,inputElement:u}=e,s=r+o;(void 0===i||s<=i)&&(u.value=s.toString(),a(u))},removeQuantity:t=>{const e=n(t);if(!e)return;const{currentValue:r,minValue:i,step:o,inputElement:u}=e,s=r-o;s>=i&&(u.value=s.toString(),a(u))}}}),(wc=void 0===wc?{}:wc)["add-to-cart-with-options-quantity-selector"]=t})();