(()=>{var t,e,o,i={4587:(t,e,o)=>{"use strict";const i=window.wp.blocks,r=window.wp.data,n=window.wp.editor,s=window.wc.wcTypes;class c{blocks=new Map;initialized=!1;attemptedRegisteredBlocks=new Set;constructor(){this.initializeSubscriptions()}static getInstance(){return c.instance||(c.instance=new c),c.instance}initializeSubscriptions(){if(this.initialized)return;const t=(0,r.subscribe)((()=>{const e=(0,r.select)(n.store);if(!e)return;const o=e.getCurrentPostType();if(o)if("post"===o||"page"===o)t(),this.blocks.forEach((t=>{if(t.isAvailableOnPostEditor){const e=t.variationName||t.blockName;this.hasAttemptedRegistration(e)||this.registerBlock(t)}})),this.initialized=!0;else{t();const o=String(e.getEditedPostSlug());this.currentTemplateId=o,this.handleTemplateChange(void 0),(0,r.subscribe)((()=>{const t=this.currentTemplateId;this.currentTemplateId=String(e.getEditedPostSlug()),t!==this.currentTemplateId&&this.handleTemplateChange(t)}),n.store),this.initialized=!0}}))}handleTemplateChange(t){(this.currentTemplateId?.includes("single-product")||t?.includes("single-product"))&&this.blocks.forEach((t=>{this.unregisterBlock(t),this.registerBlock(t)}))}hasAttemptedRegistration(t){return this.attemptedRegisteredBlocks.has(t)}unregisterBlock(t){const{blockName:e,isVariationBlock:o,variationName:r}=t;try{o&&r?((0,i.unregisterBlockVariation)(e,r),this.attemptedRegisteredBlocks.delete(r)):((0,i.unregisterBlockType)(e),this.attemptedRegisteredBlocks.delete(e))}catch(t){console.debug(`Failed to unregister block ${e}:`,t)}}registerBlock(t){const{blockName:e,settings:o,isVariationBlock:n,variationName:c,isAvailableOnPostEditor:a}=t;try{const t=c||e;if(this.hasAttemptedRegistration(t))return;const l=(0,r.select)("core/edit-site");if(!l&&!a)return;if(n)(0,i.registerBlockVariation)(e,o);else{const t=(0,s.isEmpty)(o?.ancestor)?["woocommerce/single-product"]:o?.ancestor,r=l&&this.currentTemplateId?.includes("single-product");(0,i.registerBlockType)(e,{...o,ancestor:r?void 0:t})}this.attemptedRegisteredBlocks.add(t)}catch(t){console.error(`Failed to register block ${e}:`,t)}}registerBlockConfig(t){const e=t.variationName||t.blockName;this.blocks.set(e,t),this.registerBlock(t)}}var a=o(4530),l=o(6012);const d=JSON.parse('{"name":"woocommerce/add-to-cart-form","title":"Add to Cart with Options","description":"Display a button that lets customers add a product to their cart. Use the added options to optimize for different product types.","category":"woocommerce-product-elements","attributes":{"quantitySelectorStyle":{"type":"string","enum":["input","stepper"],"default":"input"}},"keywords":["WooCommerce"],"usesContext":["postId"],"textdomain":"woocommerce","supports":{"interactivity":true},"apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json","viewScriptModule":"woocommerce/add-to-cart-form","style":"file:../woocommerce/add-to-cart-form-style.css","editorStyle":"file:../woocommerce/add-to-cart-form-editor.css"}'),u=window.wp.blockEditor;var p=o(7723),m=o(4921),b=(o(2405),o(790));const w=({tag:t="div",width:e="100%",height:o="8px",maxWidth:i="",className:r="",borderRadius:n="",isStatic:s=!1,ariaMessage:c})=>(0,b.jsx)(t,{className:(0,m.A)("wc-block-components-skeleton__element",{"wc-block-components-skeleton__element--static":s},r),...c?{"aria-live":"polite","aria-label":c}:{"aria-hidden":"true"},style:{width:e,height:o,borderRadius:n,maxWidth:i}}),h=({isStatic:t=!1})=>(0,b.jsxs)("div",{className:"wc-block-components-skeleton",children:[(0,b.jsx)(w,{height:"16px",isStatic:t}),(0,b.jsx)(w,{height:"16px",isStatic:t}),(0,b.jsx)(w,{height:"16px",width:"80%",isStatic:t})]}),k=window.wp.components,g=window.wc.wcSettings;let f=function(t){return t.Input="input",t.Stepper="stepper",t}({});const _=t=>t===f.Input?(0,p.__)("Shoppers can enter a number of items to add to cart.","woocommerce"):t===f.Stepper?(0,p.__)("Shoppers can use buttons to change the number of items to add to cart.","woocommerce"):void 0,y=({quantitySelectorStyle:t,setAttributes:e})=>(0,b.jsx)(u.InspectorControls,{children:(0,b.jsx)(k.PanelBody,{title:(0,p.__)("Quantity Selector","woocommerce"),children:(0,b.jsxs)(k.__experimentalToggleGroupControl,{__nextHasNoMarginBottom:!0,value:t,isBlock:!0,onChange:t=>{e({quantitySelectorStyle:t})},help:_(t),children:[(0,b.jsx)(k.__experimentalToggleGroupControlOption,{label:(0,p.__)("Input","woocommerce"),value:f.Input}),(0,b.jsx)(k.__experimentalToggleGroupControlOption,{label:(0,p.__)("Stepper","woocommerce"),value:f.Stepper})]})})});var x=o(6087),v=o(2381),j=o.n(v);j()("wc-admin:tracks:stats");const S=j()("wc-admin:tracks");function B({children:t,className:e,actionLabel:o,onActionClick:i,...r}){return(0,b.jsx)(k.Notice,{...r,className:(0,m.$)("wc-block-editor-components-upgrade-downgrade-notice",e),actions:[{label:o,onClick:i,noDefaultClasses:!0,variant:"link"}],children:(0,b.jsx)("div",{className:"wc-block-editor-components-upgrade-downgrade-notice__text",children:t})})}o(9969);const N=({blocks:t,findCondition:e})=>{for(const o of t){if(e(o))return o;if(o.innerBlocks){const t=N({blocks:o.innerBlocks,findCondition:e});if(t)return t}}},O=({blockClientId:t})=>{const e=(0,x.createInterpolateElement)((0,p.__)("Upgrade to the 0&&t[d-1][2]>r;d--)t[d]=t[d-1];t[d]=[o,i,r]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},o=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,n.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.__esModule)return t;if(16&i&&"function"==typeof t.then)return t}var r=Object.create(null);n.r(r);var s={};e=e||[null,o({}),o([]),o(o)];for(var c=2&i&&t;"object"==typeof c&&!~e.indexOf(c);c=o(c))Object.getOwnPropertyNames(c).forEach((e=>s[e]=()=>t[e]));return s.default=()=>t,n.d(r,s),r},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.j=2100,(()=>{var t={2100:0};n.O.j=e=>0===t[e];var e=(e,o)=>{var i,r,[s,c,a]=o,l=0;if(s.some((e=>0!==t[e]))){for(i in c)n.o(c,i)&&(n.m[i]=c[i]);if(a)var d=a(n)}for(e&&e(o);l