PluginProbe ʕ •ᴥ•ʔ
WooCommerce / 8.5.0-beta.1
WooCommerce v8.5.0-beta.1
10.9.1 10.9.0 10.9.0-rc.1 10.9.0-beta.2 10.9.0-beta.1 10.8.1 10.8.0 10.8.0-rc.1 10.8.0-beta.2 10.8.0-beta.1 7.8.0-beta.1 7.8.0-beta.2 7.8.0-rc.1 7.8.0-rc.2 7.8.1 7.8.2 7.8.3 7.8.4 7.9.0 7.9.0-beta.1 7.9.0-beta.2 7.9.0-rc.2 7.9.0-rc.3 7.9.1 7.9.2 8.0.0 8.0.0-beta.1 8.0.0-beta.2 8.0.0-rc.1 8.0.0-rc.2 8.0.1 8.0.2 8.0.3 8.0.4 8.0.5 8.1.0 8.1.0-beta.1 8.1.0-rc.1 8.1.0-rc.2 8.1.1 8.1.2 8.1.3 8.1.4 8.2.0 8.2.0-beta.1 8.2.0-rc.1 8.2.0-rc.2 8.2.1 8.2.2 8.2.3 8.2.4 8.2.5 8.3.0 8.3.0-beta.1 8.3.0-rc.1 8.3.0-rc.2 8.3.1 8.3.2 8.3.3 8.3.4 8.4.0 8.4.0-beta.1 8.4.0-rc.1 8.4.1 8.4.2 8.4.3 8.5.0 8.5.0-beta.1 8.5.0-rc.1 8.5.1 8.5.2 8.5.3 8.5.4 8.5.5 8.6.0 8.6.0-beta.1 8.6.0-rc.1 8.6.1 8.6.2 8.6.3 8.6.4 8.7.0 8.7.0-beta.1 8.7.0-beta.2 8.7.0-rc.1 8.7.1 8.7.2 8.7.3 8.8.0 8.8.0-beta.1 8.8.0-rc.1 8.8.1 8.8.2 8.8.3 8.8.4 8.8.5 8.8.6 8.8.7 8.9.0 8.9.0-beta.1 8.9.0-rc.1 8.9.1 8.9.2 8.9.3 8.9.4 8.9.5 9.0.0 9.0.0-beta.1 9.0.0-beta.2 9.0.0-rc.1 9.0.1 9.0.2 9.0.3 9.0.4 9.1.0 9.1.0-beta.1 9.1.0-rc.1 9.1.1 9.1.2 9.1.3 9.1.4 9.1.5 9.1.6 9.2.0 9.2.0-beta.1 9.2.0-rc.1 9.2.1 9.2.2 9.2.3 9.2.4 9.2.5 9.3.0 9.3.0-beta.1 9.3.0-rc.1 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.3.6 9.4.0 9.4.0-beta.1 9.4.0-beta.2 9.4.0-rc.1 9.4.0-rc.2 9.4.0-rc.3 9.4.0-rc.4 9.4.1 9.4.2 9.4.3 9.4.4 9.4.5 9.5.0 9.5.0-beta.1 9.5.0-beta.2 9.5.0-rc.1 9.5.1 9.5.2 9.5.3 9.5.4 9.6.0 9.6.0-beta.1 9.6.0-beta.2 9.6.0-rc.1 9.6.1 9.6.2 9.6.3 9.6.4 9.7.0 9.7.0-beta.1 9.7.0-rc.1 9.7.1 9.7.2 9.7.3 9.8.0 9.8.0-beta.1 9.8.0-rc.1 9.8.1 9.8.2 9.8.3 9.8.4 9.8.5 9.8.6 9.8.7 9.9.0 9.9.0-beta.1 9.9.0-rc.1 9.9.1 9.9.2 9.9.3 9.9.4 9.9.5 9.9.6 9.9.7 3.7.3 7.1.2 3.8.0 7.2.0 3.8.0-beta.1 7.2.0-beta.1 3.8.0-rc.1 7.2.0-beta.2 3.8.0-rc.2 7.2.0-rc.1 3.8.1 7.2.0-rc.2 3.8.2 7.2.1 3.8.3 7.2.2 3.9.0 7.2.3 3.9.0-beta.1 7.2.4 3.9.0-beta.2 7.3.0 3.9.0-rc.1 7.3.0-beta.1 3.9.0-rc.2 7.3.0-beta.2 3.9.0-rc.3 7.3.0-rc.1 3.9.0-rc.4 7.3.0-rc.2 3.9.1 7.3.1 3.9.2 7.4.0 3.9.3 7.4.0-beta.1 3.9.4 7.4.0-beta.2 3.9.5 7.4.0-rc.1 4.0.0 7.4.0-rc.2 4.0.0-beta.1 7.4.1 4.0.0-rc.1 7.4.2 4.0.0-rc.2 7.5.0 4.0.1 7.5.0-beta.1 4.0.2 7.5.0-beta.2 4.0.3 7.5.0-rc.1 4.0.4 7.5.1 4.1.0 7.5.2 4.1.0-beta.1 7.6.0 4.1.0-beta.2 7.6.0-beta.1 4.1.0-rc.1 7.6.0-beta.2 4.1.0-rc.2 7.6.0-rc.1 4.1.1 7.6.0-rc.2 4.1.2 7.6.0-rc.3 4.1.3 7.6.1 4.1.4 7.6.2 4.2.0 7.7.0 4.2.0-RC.1 7.7.0-beta.1 4.2.0-RC.2 7.7.0-beta.2 4.2.0-beta.1 7.7.0-rc.1 4.2.1 7.7.1 4.2.2 7.7.2 4.2.3 7.7.3 4.2.4 7.8.0 4.2.5 4.3.0 4.3.0-beta.1 4.3.0-rc.1 4.3.0-rc.2 4.3.0-rc.3 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.4.0 4.4.0-beta.1 4.4.0-rc.1 4.4.1 4.4.2 4.4.3 4.4.4 4.5.0 4.5.0-beta.1 4.5.0-rc.1 4.5.0-rc.3 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.0-beta.1 4.6.0-rc.1 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.7.0 4.7.0-beta.1 4.7.0-beta.2 4.7.0-rc.1 4.7.1 4.7.1-beta.1 4.7.2 4.7.3 4.7.4 4.8.0 4.8.0-beta.1 4.8.0-rc.1 4.8.0-rc.2 4.8.1 4.8.2 4.8.3 4.9.0 4.9.0-beta.1 4.9.0-rc.1 4.9.0-rc.2 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 5.0.0 5.0.0-beta.1 5.0.0-beta.2 5.0.0-rc.1 5.0.0-rc.2 5.0.0-rc.3 5.0.1 5.0.2 5.0.3 5.1.0 5.1.0-beta.1 5.1.0-rc.1 trunk 5.1.1 10.0.0 5.1.2 10.0.0-rc.1 5.1.3 10.0.0-rc.2 5.2.0 10.0.1 5.2.0-beta.1 10.0.2 5.2.0-rc.1 10.0.3 5.2.0-rc.2 10.0.4 5.2.1 10.0.5 5.2.2 10.0.6 5.2.3 10.1.0 5.2.4 10.1.0-rc.1 5.2.5 10.1.0-rc.2 5.3.0 10.1.0-rc.3 5.3.0-beta.1 10.1.0-rc.4 5.3.0-rc.1 10.1.1 5.3.0-rc.2 10.1.2 5.3.1 10.1.3 5.3.2 10.1.4 5.3.3 10.2.0 5.4.0 10.2.0-beta.1 5.4.0-beta.1 10.2.0-beta.2 5.4.0-rc.1 10.2.0-rc.1 5.4.1 10.2.1 5.4.2 10.2.2 5.4.3 10.2.3 5.4.4 10.2.4 5.4.5 10.3.0 5.5.0 10.3.0-beta.1 5.5.0-beta.1 10.3.0-beta.2 5.5.0-rc.1 10.3.0-rc.1 5.5.0-rc.2 10.3.0-rc.2 5.5.1 10.3.1 5.5.2 10.3.2 5.5.3 10.3.3 5.5.4 10.3.4 5.5.5 10.3.5 5.6.0 10.3.6 5.6.0-beta.1 10.3.7 5.6.0-rc.1 10.3.8 5.6.0-rc.2 10.4.0 5.6.1 10.4.0-beta.1 5.6.2 10.4.0-beta.2 5.6.3 10.4.0-rc.1 5.7.0 10.4.1 5.7.0-beta.1 10.4.2 5.7.0-rc.1 10.4.3 5.7.1 10.4.4 5.7.2 10.5.0 5.7.3 10.5.0-beta.1 5.8.0 10.5.0-beta.2 5.8.0-beta.1 10.5.0-rc.1 5.8.0-beta.2 10.5.0-rc.2 5.8.0-rc.1 10.5.0-rc.3 5.8.1 10.5.1 5.8.2 10.5.2 5.9.0 10.5.3 5.9.0-beta.1 10.6.0 5.9.0-rc.1 10.6.0-beta.1 5.9.0-rc.2 10.6.0-beta.2 5.9.1 10.6.0-rc.1 5.9.2 10.6.1 6.0.0 10.6.2 6.0.0-beta.1 10.7.0 6.0.0-rc.1 10.7.0-beta.1 6.0.1 10.7.0-beta.2 6.0.2 10.7.0-rc.1 6.1.0 3.0.0 6.1.0-beta.1 3.0.1 6.1.0-rc.1 3.0.2 6.1.0-rc.2 3.0.3 6.1.1 3.0.4 6.1.2 3.0.5 6.1.3 3.0.6 6.2.0 3.0.7 6.2.0-beta.1 3.0.8 6.2.0-rc.1 3.0.9 6.2.0-rc.2 3.1.0 6.2.1 3.1.1 6.2.2 3.1.2 6.2.3 3.2.0 6.3.0 3.2.1 6.3.0-beta.1 3.2.2 6.3.0-rc.1 3.2.3 6.3.0-rc.2 3.2.4 6.3.1 3.2.5 6.3.2 3.2.6 6.4.0 3.3.0 6.4.0-beta.1 3.3.1 6.4.0-rc.1 3.3.2 6.4.1 3.3.2-rc.1 6.4.2 3.3.3 6.5.0 3.3.4 6.5.0-beta.1 3.3.5 6.5.0-rc.1 3.3.6 6.5.0-rc.2 3.4.0 6.5.1 3.4.0-beta.1 6.5.2 3.4.0-rc.2 6.6.0 3.4.1 6.6.0-beta.1 3.4.2 6.6.0-rc.1 3.4.3 6.6.0-rc.2 3.4.4 6.6.1 3.4.5 6.6.2 3.4.6 6.7.0 3.4.7 6.7.0-beta.1 3.4.8 6.7.0-beta.2 3.5.0 6.7.0-rc.1 3.5.0-beta.1 6.7.1 3.5.0-rc.1 6.8.0 3.5.0-rc.2 6.8.0-beta.1 3.5.1 6.8.0-beta.2 3.5.10 6.8.0-rc.1 3.5.2 6.8.1 3.5.3 6.8.2 3.5.4 6.8.3 3.5.5 6.9.0 3.5.6 6.9.0-beta.1 3.5.7 6.9.0-beta.2 3.5.8 6.9.0-rc.1 3.5.9 6.9.1 3.6.0 6.9.2 3.6.0-beta.1 6.9.3 3.6.0-rc.1 6.9.4 3.6.0-rc.2 6.9.5 3.6.0-rc.3 7.0.0 3.6.1 7.0.0-beta.1 3.6.2 7.0.0-beta.2 3.6.3 7.0.0-beta.3 3.6.4 7.0.0-rc.1 3.6.5 7.0.0-rc.2 3.6.6 7.0.1 3.6.7 7.0.2 3.7.0 7.1.0 3.7.0-beta.1 7.1.0-beta.1 3.7.0-rc.1 7.1.0-beta.2 3.7.0-rc.2 7.1.0-rc.1 3.7.1 7.1.0-rc.2 3.7.2 7.1.1
woocommerce / assets / client / blocks / product-category.js
woocommerce / assets / client / blocks Last commit date
active-filters 2 years ago add-to-cart-form 2 years ago all-products 2 years ago attribute-filter 2 years ago base-components-mini-cart-contents-block 2 years ago base-components-product-price~mini-cart-contents-block 2 years ago breadcrumbs 2 years ago cart-blocks 2 years ago catalog-sorting 2 years ago checkout 2 years ago checkout-blocks 2 years ago classic-shortcode 2 years ago collection-active-filters 2 years ago collection-attribute-filter 2 years ago collection-filters 2 years ago collection-price-filter 2 years ago collection-rating-filter 2 years ago collection-stock-filter 2 years ago customer-account 2 years ago featured-category 2 years ago featured-product 2 years ago filter-wrapper 2 years ago handpicked-products 2 years ago inner-blocks 2 years ago mini-cart 2 years ago mini-cart-contents-block 2 years ago order-confirmation-additional-information 2 years ago order-confirmation-billing-address 2 years ago order-confirmation-billing-wrapper 2 years ago order-confirmation-downloads 2 years ago order-confirmation-downloads-wrapper 2 years ago order-confirmation-shipping-address 2 years ago order-confirmation-shipping-wrapper 2 years ago order-confirmation-status 2 years ago order-confirmation-summary 2 years ago order-confirmation-totals 2 years ago order-confirmation-totals-wrapper 2 years ago page-content-wrapper 2 years ago price-filter 2 years ago product-average-rating 2 years ago product-best-sellers 2 years ago product-button 2 years ago product-categories 2 years ago product-category 2 years ago product-collection 2 years ago product-collection-no-results 2 years ago product-details 2 years ago product-gallery 2 years ago product-gallery-large-image 2 years ago product-gallery-large-image-next-previous 2 years ago product-gallery-pager 2 years ago product-gallery-thumbnails 2 years ago product-image-gallery 2 years ago product-meta 2 years ago product-new 2 years ago product-rating 2 years ago product-rating-counter 2 years ago product-rating-stars 2 years ago product-results-count 2 years ago product-reviews 2 years ago product-tag 2 years ago product-template 2 years ago product-top-rated 2 years ago products-by-attribute 2 years ago rating-filter 2 years ago related-products 2 years ago single-product 2 years ago stock-filter 2 years ago store-notices 2 years ago active-filters-frontend.asset.php 2 years ago active-filters-frontend.js 2 years ago active-filters-frontend.js.map 2 years ago active-filters-rtl.css 2 years ago active-filters-style.asset.php 2 years ago active-filters-style.js.map 2 years ago active-filters-wrapper-frontend.js 2 years ago active-filters-wrapper-frontend.js.map 2 years ago active-filters-wrapper-rtl.css 2 years ago active-filters-wrapper-style.js.map 2 years ago active-filters-wrapper.css 2 years ago active-filters-wrapper.css.map 2 years ago active-filters.asset.php 2 years ago active-filters.css 2 years ago active-filters.css.map 2 years ago active-filters.js 2 years ago active-filters.js.map 2 years ago add-to-cart-form-rtl.css 2 years ago add-to-cart-form-style.asset.php 2 years ago add-to-cart-form-style.js.map 2 years ago add-to-cart-form.css 2 years ago add-to-cart-form.css.map 2 years ago all-products-frontend.asset.php 2 years ago all-products-frontend.js 2 years ago all-products-frontend.js.map 2 years ago all-products-rtl.css 2 years ago all-products-style.asset.php 2 years ago all-products-style.js.map 2 years ago all-products.asset.php 2 years ago all-products.css 2 years ago all-products.css.map 2 years ago all-products.js 2 years ago all-products.js.map 2 years ago all-reviews-rtl.css 2 years ago all-reviews-style.asset.php 2 years ago all-reviews-style.js.map 2 years ago all-reviews.asset.php 2 years ago all-reviews.css 2 years ago all-reviews.css.map 2 years ago all-reviews.js 2 years ago all-reviews.js.map 2 years ago assets_js_base_context_hooks_collections_use-collection_ts-assets_js_base_context_hooks_use-q-fdf7ba-style.js.map 2 years ago assets_js_base_context_hooks_use-store-add-to-cart_ts-assets_js_base_context_hooks_use-store--e30f56-style.js.map 2 years ago attribute-filter-frontend.asset.php 2 years ago attribute-filter-frontend.js 2 years ago attribute-filter-frontend.js.map 2 years ago attribute-filter-rtl.css 2 years ago attribute-filter-style.asset.php 2 years ago attribute-filter-style.js.map 2 years ago attribute-filter-wrapper-frontend.js 2 years ago attribute-filter-wrapper-frontend.js.map 2 years ago attribute-filter-wrapper-rtl.css 2 years ago attribute-filter-wrapper-style.js.map 2 years ago attribute-filter-wrapper.css 2 years ago attribute-filter-wrapper.css.map 2 years ago attribute-filter.asset.php 2 years ago attribute-filter.css 2 years ago attribute-filter.css.map 2 years ago attribute-filter.js 2 years ago attribute-filter.js.map 2 years ago base-components-attribute-filter-wrapper-index.tsx-style.js.map 2 years ago base-components-price-filter-wrapper-index.tsx-style.js.map 2 years ago base-components-price-filter-wrapper-style.scss-rtl.css 2 years ago base-components-price-filter-wrapper-style.scss.css 2 years ago base-components-price-filter-wrapper-style.scss.css.map 2 years ago base-components-rating-filter-wrapper-index.tsx-style.js.map 2 years ago base-components-rating-filter-wrapper-style.scss-rtl.css 2 years ago base-components-rating-filter-wrapper-style.scss.css 2 years ago base-components-rating-filter-wrapper-style.scss.css.map 2 years ago base-components-stock-filter-wrapper-index.tsx-style.js.map 2 years ago base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss-rtl.css 2 years ago base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss.css 2 years ago base-components-stock-filter-wrapper~attribute-filter-wrapper~rating-filter-wrapper-style.scss.css.map 2 years ago base-context-product-add-to-cart-index.js-style.js.map 2 years ago blocks-checkout.asset.php 2 years ago blocks-checkout.js 2 years ago blocks-checkout.js.map 2 years ago blocks-components.asset.php 2 years ago blocks-components.js 2 years ago blocks-components.js.map 2 years ago breadcrumbs-rtl.css 2 years ago breadcrumbs-style.asset.php 2 years ago breadcrumbs-style.js.map 2 years ago breadcrumbs.asset.php 2 years ago breadcrumbs.css 2 years ago breadcrumbs.css.map 2 years ago breadcrumbs.js 2 years ago breadcrumbs.js.map 2 years ago cart-frontend.asset.php 2 years ago cart-frontend.js 2 years ago cart-frontend.js.map 2 years ago cart-rtl.css 2 years ago cart-style.asset.php 2 years ago cart-style.js.map 2 years ago cart.asset.php 2 years ago cart.css 2 years ago cart.css.map 2 years ago cart.js 2 years ago cart.js.map 2 years ago catalog-sorting-rtl.css 2 years ago catalog-sorting-style.asset.php 2 years ago catalog-sorting-style.js.map 2 years ago catalog-sorting.asset.php 2 years ago catalog-sorting.css 2 years ago catalog-sorting.css.map 2 years ago catalog-sorting.js 2 years ago catalog-sorting.js.map 2 years ago checkout-frontend.asset.php 2 years ago checkout-frontend.js 2 years ago checkout-frontend.js.map 2 years ago checkout-rtl.css 2 years ago checkout-style.asset.php 2 years ago checkout-style.js.map 2 years ago checkout.asset.php 2 years ago checkout.css 2 years ago checkout.css.map 2 years ago checkout.js 2 years ago checkout.js.map 2 years ago classic-shortcode-rtl.css 2 years ago classic-shortcode-style.asset.php 2 years ago classic-shortcode-style.js.map 2 years ago classic-shortcode.asset.php 2 years ago classic-shortcode.css 2 years ago classic-shortcode.css.map 2 years ago classic-shortcode.js 2 years ago classic-shortcode.js.map 2 years ago collection-active-filters-frontend.asset.php 2 years ago collection-active-filters-frontend.js 2 years ago collection-active-filters-frontend.js.map 2 years ago collection-active-filters-rtl.css 2 years ago collection-active-filters-style.asset.php 2 years ago collection-active-filters-style.js.map 2 years ago collection-active-filters.asset.php 2 years ago collection-active-filters.css 2 years ago collection-active-filters.css.map 2 years ago collection-active-filters.js 2 years ago collection-active-filters.js.map 2 years ago collection-attribute-filter-frontend.asset.php 2 years ago collection-attribute-filter-frontend.js 2 years ago collection-attribute-filter-frontend.js.map 2 years ago collection-attribute-filter-rtl.css 2 years ago collection-attribute-filter-style.asset.php 2 years ago collection-attribute-filter-style.js.map 2 years ago collection-attribute-filter.asset.php 2 years ago collection-attribute-filter.css 2 years ago collection-attribute-filter.css.map 2 years ago collection-attribute-filter.js 2 years ago collection-attribute-filter.js.map 2 years ago collection-filters-style.asset.php 2 years ago collection-filters-style.js.map 2 years ago collection-filters.asset.php 2 years ago collection-filters.js 2 years ago collection-filters.js.map 2 years ago collection-price-filter-frontend.asset.php 2 years ago collection-price-filter-frontend.js 2 years ago collection-price-filter-frontend.js.map 2 years ago collection-price-filter-rtl.css 2 years ago collection-price-filter-style.asset.php 2 years ago collection-price-filter-style.js.map 2 years ago collection-price-filter.asset.php 2 years ago collection-price-filter.css 2 years ago collection-price-filter.css.map 2 years ago collection-price-filter.js 2 years ago collection-price-filter.js.map 2 years ago collection-rating-filter-frontend.asset.php 2 years ago collection-rating-filter-frontend.js 2 years ago collection-rating-filter-frontend.js.map 2 years ago collection-rating-filter-rtl.css 2 years ago collection-rating-filter-style.asset.php 2 years ago collection-rating-filter-style.js.map 2 years ago collection-rating-filter.asset.php 2 years ago collection-rating-filter.css 2 years ago collection-rating-filter.css.map 2 years ago collection-rating-filter.js 2 years ago collection-rating-filter.js.map 2 years ago collection-stock-filter-frontend.asset.php 2 years ago collection-stock-filter-frontend.js 2 years ago collection-stock-filter-frontend.js.map 2 years ago collection-stock-filter-rtl.css 2 years ago collection-stock-filter-style.asset.php 2 years ago collection-stock-filter-style.js.map 2 years ago collection-stock-filter.asset.php 2 years ago collection-stock-filter.css 2 years ago collection-stock-filter.css.map 2 years ago collection-stock-filter.js 2 years ago collection-stock-filter.js.map 2 years ago customer-account-rtl.css 2 years ago customer-account-style.asset.php 2 years ago customer-account-style.js.map 2 years ago customer-account.asset.php 2 years ago customer-account.css 2 years ago customer-account.css.map 2 years ago customer-account.js 2 years ago customer-account.js.map 2 years ago featured-category-rtl.css 2 years ago featured-category-style.asset.php 2 years ago featured-category-style.js.map 2 years ago featured-category.asset.php 2 years ago featured-category.css 2 years ago featured-category.css.map 2 years ago featured-category.js 2 years ago featured-category.js.map 2 years ago featured-product-rtl.css 2 years ago featured-product-style.asset.php 2 years ago featured-product-style.js.map 2 years ago featured-product.asset.php 2 years ago featured-product.css 2 years ago featured-product.css.map 2 years ago featured-product.js 2 years ago featured-product.js.map 2 years ago filter-wrapper-frontend.asset.php 2 years ago filter-wrapper-frontend.js 2 years ago filter-wrapper-frontend.js.map 2 years ago filter-wrapper-rtl.css 2 years ago filter-wrapper-style.asset.php 2 years ago filter-wrapper-style.js.map 2 years ago filter-wrapper.asset.php 2 years ago filter-wrapper.css 2 years ago filter-wrapper.css.map 2 years ago filter-wrapper.js 2 years ago filter-wrapper.js.map 2 years ago handpicked-products-style.asset.php 2 years ago handpicked-products-style.js.map 2 years ago handpicked-products.asset.php 2 years ago handpicked-products.js 2 years ago handpicked-products.js.map 2 years ago legacy-template-rtl.css 2 years ago legacy-template-style.asset.php 2 years ago legacy-template-style.js.map 2 years ago legacy-template.asset.php 2 years ago legacy-template.css 2 years ago legacy-template.css.map 2 years ago legacy-template.js 2 years ago legacy-template.js.map 2 years ago mini-cart-component-frontend.asset.php 2 years ago mini-cart-component-frontend.js 2 years ago mini-cart-component-frontend.js.map 2 years ago mini-cart-contents-rtl.css 2 years ago mini-cart-contents-style.asset.php 2 years ago mini-cart-contents-style.js.map 2 years ago mini-cart-contents.asset.php 2 years ago mini-cart-contents.css 2 years ago mini-cart-contents.css.map 2 years ago mini-cart-contents.js 2 years ago mini-cart-contents.js.map 2 years ago mini-cart-frontend.asset.php 2 years ago mini-cart-frontend.js 2 years ago mini-cart-frontend.js.map 2 years ago mini-cart-rtl.css 2 years ago mini-cart-style.asset.php 2 years ago mini-cart-style.js.map 2 years ago mini-cart.asset.php 2 years ago mini-cart.css 2 years ago mini-cart.css.map 2 years ago mini-cart.js 2 years ago mini-cart.js.map 2 years ago order-confirmation-additional-information-rtl.css 2 years ago order-confirmation-additional-information-style.asset.php 2 years ago order-confirmation-additional-information-style.js.map 2 years ago order-confirmation-additional-information.asset.php 2 years ago order-confirmation-additional-information.css 2 years ago order-confirmation-additional-information.css.map 2 years ago order-confirmation-additional-information.js 2 years ago order-confirmation-additional-information.js.map 2 years ago order-confirmation-billing-address-rtl.css 2 years ago order-confirmation-billing-address-style.asset.php 2 years ago order-confirmation-billing-address-style.js.map 2 years ago order-confirmation-billing-address.asset.php 2 years ago order-confirmation-billing-address.css 2 years ago order-confirmation-billing-address.css.map 2 years ago order-confirmation-billing-address.js 2 years ago order-confirmation-billing-address.js.map 2 years ago order-confirmation-billing-wrapper-style.asset.php 2 years ago order-confirmation-billing-wrapper-style.js.map 2 years ago order-confirmation-billing-wrapper.asset.php 2 years ago order-confirmation-billing-wrapper.js 2 years ago order-confirmation-billing-wrapper.js.map 2 years ago order-confirmation-downloads-rtl.css 2 years ago order-confirmation-downloads-style.asset.php 2 years ago order-confirmation-downloads-style.js.map 2 years ago order-confirmation-downloads-wrapper-style.asset.php 2 years ago order-confirmation-downloads-wrapper-style.js.map 2 years ago order-confirmation-downloads-wrapper.asset.php 2 years ago order-confirmation-downloads-wrapper.js 2 years ago order-confirmation-downloads-wrapper.js.map 2 years ago order-confirmation-downloads.asset.php 2 years ago order-confirmation-downloads.css 2 years ago order-confirmation-downloads.css.map 2 years ago order-confirmation-downloads.js 2 years ago order-confirmation-downloads.js.map 2 years ago order-confirmation-shipping-address-rtl.css 2 years ago order-confirmation-shipping-address-style.asset.php 2 years ago order-confirmation-shipping-address-style.js.map 2 years ago order-confirmation-shipping-address.asset.php 2 years ago order-confirmation-shipping-address.css 2 years ago order-confirmation-shipping-address.css.map 2 years ago order-confirmation-shipping-address.js 2 years ago order-confirmation-shipping-address.js.map 2 years ago order-confirmation-shipping-wrapper-style.asset.php 2 years ago order-confirmation-shipping-wrapper-style.js.map 2 years ago order-confirmation-shipping-wrapper.asset.php 2 years ago order-confirmation-shipping-wrapper.js 2 years ago order-confirmation-shipping-wrapper.js.map 2 years ago order-confirmation-status-rtl.css 2 years ago order-confirmation-status-style.asset.php 2 years ago order-confirmation-status-style.js.map 2 years ago order-confirmation-status.asset.php 2 years ago order-confirmation-status.css 2 years ago order-confirmation-status.css.map 2 years ago order-confirmation-status.js 2 years ago order-confirmation-status.js.map 2 years ago order-confirmation-summary-rtl.css 2 years ago order-confirmation-summary-style.asset.php 2 years ago order-confirmation-summary-style.js.map 2 years ago order-confirmation-summary.asset.php 2 years ago order-confirmation-summary.css 2 years ago order-confirmation-summary.css.map 2 years ago order-confirmation-summary.js 2 years ago order-confirmation-summary.js.map 2 years ago order-confirmation-totals-rtl.css 2 years ago order-confirmation-totals-style.asset.php 2 years ago order-confirmation-totals-style.js.map 2 years ago order-confirmation-totals-wrapper-style.asset.php 2 years ago order-confirmation-totals-wrapper-style.js.map 2 years ago order-confirmation-totals-wrapper.asset.php 2 years ago order-confirmation-totals-wrapper.js 2 years ago order-confirmation-totals-wrapper.js.map 2 years ago order-confirmation-totals.asset.php 2 years ago order-confirmation-totals.css 2 years ago order-confirmation-totals.css.map 2 years ago order-confirmation-totals.js 2 years ago order-confirmation-totals.js.map 2 years ago packages-style-rtl.css 2 years ago packages-style-style.asset.php 2 years ago packages-style-style.js.map 2 years ago packages-style.css 2 years ago packages-style.css.map 2 years ago page-content-wrapper-style.asset.php 2 years ago page-content-wrapper-style.js.map 2 years ago page-content-wrapper.asset.php 2 years ago page-content-wrapper.js 2 years ago page-content-wrapper.js.map 2 years ago price-filter-frontend.asset.php 2 years ago price-filter-frontend.js 2 years ago price-filter-frontend.js.map 2 years ago price-filter-rtl.css 2 years ago price-filter-style.asset.php 2 years ago price-filter-style.js.map 2 years ago price-filter-wrapper-frontend.js 2 years ago price-filter-wrapper-frontend.js.map 2 years ago price-filter-wrapper-rtl.css 2 years ago price-filter-wrapper-style.js.map 2 years ago price-filter-wrapper.css 2 years ago price-filter-wrapper.css.map 2 years ago price-filter.asset.php 2 years ago price-filter.css 2 years ago price-filter.css.map 2 years ago price-filter.js 2 years ago price-filter.js.map 2 years ago price-format.asset.php 2 years ago price-format.js 2 years ago price-format.js.map 2 years ago product-add-to-cart-frontend.js 2 years ago product-add-to-cart-frontend.js.map 2 years ago product-add-to-cart-rtl.css 2 years ago product-add-to-cart-style.js.map 2 years ago product-add-to-cart.css 2 years ago product-add-to-cart.css.map 2 years ago product-add-to-cart.js 2 years ago product-add-to-cart.js.map 2 years ago product-average-rating-frontend.js 2 years ago product-average-rating-frontend.js.map 2 years ago product-average-rating-style.js.map 2 years ago product-average-rating.js 2 years ago product-average-rating.js.map 2 years ago product-best-sellers-style.asset.php 2 years ago product-best-sellers-style.js.map 2 years ago product-best-sellers.asset.php 2 years ago product-best-sellers.js 2 years ago product-best-sellers.js.map 2 years ago product-button-frontend.js 2 years ago product-button-frontend.js.map 2 years ago product-button-interactivity-frontend.asset.php 2 years ago product-button-interactivity-frontend.js 2 years ago product-button-interactivity-frontend.js.map 2 years ago product-button-rtl.css 2 years ago product-button-style.js.map 2 years ago product-button.css 2 years ago product-button.css.map 2 years ago product-button.js 2 years ago product-button.js.map 2 years ago product-categories-rtl.css 2 years ago product-categories-style.asset.php 2 years ago product-categories-style.js.map 2 years ago product-categories.asset.php 2 years ago product-categories.css 2 years ago product-categories.css.map 2 years ago product-categories.js 2 years ago product-categories.js.map 2 years ago product-category-style.asset.php 2 years ago product-category-style.js.map 2 years ago product-category.asset.php 2 years ago product-category.js 2 years ago product-category.js.map 2 years ago product-collection-no-results-style.asset.php 2 years ago product-collection-no-results-style.js.map 2 years ago product-collection-no-results.asset.php 2 years ago product-collection-no-results.js 2 years ago product-collection-no-results.js.map 2 years ago product-collection-style.asset.php 2 years ago product-collection-style.js.map 2 years ago product-collection.asset.php 2 years ago product-collection.js 2 years ago product-collection.js.map 2 years ago product-details-rtl.css 2 years ago product-details-style.asset.php 2 years ago product-details-style.js.map 2 years ago product-details.css 2 years ago product-details.css.map 2 years ago product-gallery-frontend.asset.php 2 years ago product-gallery-frontend.js 2 years ago product-gallery-frontend.js.map 2 years ago product-gallery-large-image-frontend.asset.php 2 years ago product-gallery-large-image-frontend.js 2 years ago product-gallery-large-image-frontend.js.map 2 years ago product-gallery-large-image-next-previous-style.asset.php 2 years ago product-gallery-large-image-next-previous-style.js.map 2 years ago product-gallery-large-image-next-previous.asset.php 2 years ago product-gallery-large-image-next-previous.js 2 years ago product-gallery-large-image-next-previous.js.map 2 years ago product-gallery-large-image-style.asset.php 2 years ago product-gallery-large-image-style.js.map 2 years ago product-gallery-large-image.asset.php 2 years ago product-gallery-large-image.js 2 years ago product-gallery-large-image.js.map 2 years ago product-gallery-pager-style.asset.php 2 years ago product-gallery-pager-style.js.map 2 years ago product-gallery-pager.asset.php 2 years ago product-gallery-pager.js 2 years ago product-gallery-pager.js.map 2 years ago product-gallery-rtl.css 2 years ago product-gallery-style.asset.php 2 years ago product-gallery-style.js.map 2 years ago product-gallery-thumbnails-style.asset.php 2 years ago product-gallery-thumbnails-style.js.map 2 years ago product-gallery-thumbnails.asset.php 2 years ago product-gallery-thumbnails.js 2 years ago product-gallery-thumbnails.js.map 2 years ago product-gallery.asset.php 2 years ago product-gallery.css 2 years ago product-gallery.css.map 2 years ago product-gallery.js 2 years ago product-gallery.js.map 2 years ago product-image-frontend.js 2 years ago product-image-frontend.js.map 2 years ago product-image-gallery-rtl.css 2 years ago product-image-gallery-style.asset.php 2 years ago product-image-gallery-style.js.map 2 years ago product-image-gallery.css 2 years ago product-image-gallery.css.map 2 years ago product-image-rtl.css 2 years ago product-image-style.js.map 2 years ago product-image.css 2 years ago product-image.css.map 2 years ago product-image.js 2 years ago product-image.js.map 2 years ago product-new-style.asset.php 2 years ago product-new-style.js.map 2 years ago product-new.asset.php 2 years ago product-new.js 2 years ago product-new.js.map 2 years ago product-on-sale-style.asset.php 2 years ago product-on-sale-style.js.map 2 years ago product-on-sale.asset.php 2 years ago product-on-sale.js 2 years ago product-on-sale.js.map 2 years ago product-price-frontend.js 2 years ago product-price-frontend.js.map 2 years ago product-price-rtl.css 2 years ago product-price-style.js.map 2 years ago product-price.css 2 years ago product-price.css.map 2 years ago product-price.js 2 years ago product-price.js.map 2 years ago product-query-rtl.css 2 years ago product-query-style.asset.php 2 years ago product-query-style.js.map 2 years ago product-query.asset.php 2 years ago product-query.css 2 years ago product-query.css.map 2 years ago product-query.js 2 years ago product-query.js.map 2 years ago product-rating-counter-frontend.js 2 years ago product-rating-counter-frontend.js.map 2 years ago product-rating-counter-style.js.map 2 years ago product-rating-counter.js 2 years ago product-rating-counter.js.map 2 years ago product-rating-frontend.js 2 years ago product-rating-frontend.js.map 2 years ago product-rating-rtl.css 2 years ago product-rating-stars-frontend.js 2 years ago product-rating-stars-frontend.js.map 2 years ago product-rating-stars-rtl.css 2 years ago product-rating-stars-style.js.map 2 years ago product-rating-stars.css 2 years ago product-rating-stars.css.map 2 years ago product-rating-stars.js 2 years ago product-rating-stars.js.map 2 years ago product-rating-style.js.map 2 years ago product-rating.css 2 years ago product-rating.css.map 2 years ago product-rating.js 2 years ago product-rating.js.map 2 years ago product-results-count-rtl.css 2 years ago product-results-count-style.asset.php 2 years ago product-results-count-style.js.map 2 years ago product-results-count.asset.php 2 years ago product-results-count.css 2 years ago product-results-count.css.map 2 years ago product-results-count.js 2 years ago product-results-count.js.map 2 years ago product-reviews-rtl.css 2 years ago product-reviews-style.asset.php 2 years ago product-reviews-style.js.map 2 years ago product-reviews.css 2 years ago product-reviews.css.map 2 years ago product-sale-badge-frontend.js 2 years ago product-sale-badge-frontend.js.map 2 years ago product-sale-badge-rtl.css 2 years ago product-sale-badge-style.js.map 2 years ago product-sale-badge.css 2 years ago product-sale-badge.css.map 2 years ago product-sale-badge.js 2 years ago product-sale-badge.js.map 2 years ago product-search-rtl.css 2 years ago product-search-style.asset.php 2 years ago product-search-style.js.map 2 years ago product-search.asset.php 2 years ago product-search.css 2 years ago product-search.css.map 2 years ago product-search.js 2 years ago product-search.js.map 2 years ago product-sku-frontend.js 2 years ago product-sku-frontend.js.map 2 years ago product-sku-rtl.css 2 years ago product-sku-style.js.map 2 years ago product-sku.css 2 years ago product-sku.css.map 2 years ago product-sku.js 2 years ago product-sku.js.map 2 years ago product-stock-indicator-frontend.js 2 years ago product-stock-indicator-frontend.js.map 2 years ago product-stock-indicator-rtl.css 2 years ago product-stock-indicator-style.js.map 2 years ago product-stock-indicator.css 2 years ago product-stock-indicator.css.map 2 years ago product-stock-indicator.js 2 years ago product-stock-indicator.js.map 2 years ago product-summary-frontend.js 2 years ago product-summary-frontend.js.map 2 years ago product-summary-rtl.css 2 years ago product-summary-style.js.map 2 years ago product-summary.css 2 years ago product-summary.css.map 2 years ago product-summary.js 2 years ago product-summary.js.map 2 years ago product-tag-style.asset.php 2 years ago product-tag-style.js.map 2 years ago product-tag.asset.php 2 years ago product-tag.js 2 years ago product-tag.js.map 2 years ago product-template-rtl.css 2 years ago product-template-style.asset.php 2 years ago product-template-style.js.map 2 years ago product-template.asset.php 2 years ago product-template.css 2 years ago product-template.css.map 2 years ago product-template.js 2 years ago product-template.js.map 2 years ago product-title-frontend.js 2 years ago product-title-frontend.js.map 2 years ago product-title-rtl.css 2 years ago product-title-style.js.map 2 years ago product-title.css 2 years ago product-title.css.map 2 years ago product-title.js 2 years ago product-title.js.map 2 years ago product-top-rated-style.asset.php 2 years ago product-top-rated-style.js.map 2 years ago product-top-rated.asset.php 2 years ago product-top-rated.js 2 years ago product-top-rated.js.map 2 years ago products-by-attribute-style.asset.php 2 years ago products-by-attribute-style.js.map 2 years ago products-by-attribute.asset.php 2 years ago products-by-attribute.js 2 years ago products-by-attribute.js.map 2 years ago rating-filter-frontend.asset.php 2 years ago rating-filter-frontend.js 2 years ago rating-filter-frontend.js.map 2 years ago rating-filter-rtl.css 2 years ago rating-filter-style.asset.php 2 years ago rating-filter-style.js.map 2 years ago rating-filter-wrapper-frontend.js 2 years ago rating-filter-wrapper-frontend.js.map 2 years ago rating-filter-wrapper-rtl.css 2 years ago rating-filter-wrapper-style.js.map 2 years ago rating-filter-wrapper.css 2 years ago rating-filter-wrapper.css.map 2 years ago rating-filter.asset.php 2 years ago rating-filter.css 2 years ago rating-filter.css.map 2 years ago rating-filter.js 2 years ago rating-filter.js.map 2 years ago reviews-by-category-rtl.css 2 years ago reviews-by-category-style.asset.php 2 years ago reviews-by-category-style.js.map 2 years ago reviews-by-category.asset.php 2 years ago reviews-by-category.css 2 years ago reviews-by-category.css.map 2 years ago reviews-by-category.js 2 years ago reviews-by-category.js.map 2 years ago reviews-by-product-rtl.css 2 years ago reviews-by-product-style.asset.php 2 years ago reviews-by-product-style.js.map 2 years ago reviews-by-product.asset.php 2 years ago reviews-by-product.css 2 years ago reviews-by-product.css.map 2 years ago reviews-by-product.js 2 years ago reviews-by-product.js.map 2 years ago reviews-frontend.asset.php 2 years ago reviews-frontend.js 2 years ago reviews-frontend.js.map 2 years ago single-product-rtl.css 2 years ago single-product-style.asset.php 2 years ago single-product-style.js.map 2 years ago single-product.asset.php 2 years ago single-product.css 2 years ago single-product.css.map 2 years ago single-product.js 2 years ago single-product.js.map 2 years ago stock-filter-frontend.asset.php 2 years ago stock-filter-frontend.js 2 years ago stock-filter-frontend.js.map 2 years ago stock-filter-rtl.css 2 years ago stock-filter-style.asset.php 2 years ago stock-filter-style.js.map 2 years ago stock-filter-wrapper-frontend.js 2 years ago stock-filter-wrapper-frontend.js.map 2 years ago stock-filter-wrapper-rtl.css 2 years ago stock-filter-wrapper-style.js.map 2 years ago stock-filter-wrapper.css 2 years ago stock-filter-wrapper.css.map 2 years ago stock-filter.asset.php 2 years ago stock-filter.css 2 years ago stock-filter.css.map 2 years ago stock-filter.js 2 years ago stock-filter.js.map 2 years ago store-notices-rtl.css 2 years ago store-notices-style.asset.php 2 years ago store-notices-style.js.map 2 years ago store-notices.asset.php 2 years ago store-notices.css 2 years ago store-notices.css.map 2 years ago store-notices.js 2 years ago store-notices.js.map 2 years ago vendors-node_modules_pnpm_dinero_js_1_9_1_node_modules_dinero_js_build_esm_dinero_js-style.js.map 2 years ago vendors-node_modules_pnpm_param-case_3_0_4_node_modules_param-case_dist_es2015_index_js-style.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-019903-style.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-37238e-frontend.js 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-37238e-frontend.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-68c184-style.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-70a73f-frontend.js 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-70a73f-frontend.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-849324-frontend.js 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-849324-frontend.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-bab841-style.js.map 2 years ago vendors-node_modules_pnpm_wordpress_components_14_2_0__types_react_17_0_71_react-dom_17_0_2_r-c6918e-style.js.map 2 years ago wc-blocks-classic-template-revert-button-style-rtl.css 2 years ago wc-blocks-classic-template-revert-button-style-style.asset.php 2 years ago wc-blocks-classic-template-revert-button-style-style.js.map 2 years ago wc-blocks-classic-template-revert-button-style.css 2 years ago wc-blocks-classic-template-revert-button-style.css.map 2 years ago wc-blocks-classic-template-revert-button.asset.php 2 years ago wc-blocks-classic-template-revert-button.js 2 years ago wc-blocks-classic-template-revert-button.js.map 2 years ago wc-blocks-data.asset.php 2 years ago wc-blocks-data.js 2 years ago wc-blocks-data.js.map 2 years ago wc-blocks-editor-style-rtl.css 2 years ago wc-blocks-editor-style.css 2 years ago wc-blocks-editor-style.css.map 2 years ago wc-blocks-google-analytics.asset.php 2 years ago wc-blocks-google-analytics.js 2 years ago wc-blocks-google-analytics.js.map 2 years ago wc-blocks-middleware.asset.php 2 years ago wc-blocks-middleware.js 2 years ago wc-blocks-middleware.js.map 2 years ago wc-blocks-registry.asset.php 2 years ago wc-blocks-registry.js 2 years ago wc-blocks-registry.js.map 2 years ago wc-blocks-rtl.css 2 years ago wc-blocks-shared-context.asset.php 2 years ago wc-blocks-shared-context.js 2 years ago wc-blocks-shared-context.js.map 2 years ago wc-blocks-shared-hocs.asset.php 2 years ago wc-blocks-shared-hocs.js 2 years ago wc-blocks-shared-hocs.js.map 2 years ago wc-blocks-style.asset.php 2 years ago wc-blocks-style.js.map 2 years ago wc-blocks-vendors.asset.php 2 years ago wc-blocks-vendors.js 2 years ago wc-blocks-vendors.js.map 2 years ago wc-blocks.asset.php 2 years ago wc-blocks.css 2 years ago wc-blocks.css.map 2 years ago wc-blocks.js 2 years ago wc-blocks.js.map 2 years ago wc-interactivity-checkbox-list-rtl.css 2 years ago wc-interactivity-checkbox-list-style.asset.php 2 years ago wc-interactivity-checkbox-list-style.js.map 2 years ago wc-interactivity-checkbox-list.asset.php 2 years ago wc-interactivity-checkbox-list.css 2 years ago wc-interactivity-checkbox-list.css.map 2 years ago wc-interactivity-checkbox-list.js 2 years ago wc-interactivity-checkbox-list.js.map 2 years ago wc-interactivity-dropdown-rtl.css 2 years ago wc-interactivity-dropdown-style.asset.php 2 years ago wc-interactivity-dropdown-style.js.map 2 years ago wc-interactivity-dropdown.asset.php 2 years ago wc-interactivity-dropdown.css 2 years ago wc-interactivity-dropdown.css.map 2 years ago wc-interactivity-dropdown.js 2 years ago wc-interactivity-dropdown.js.map 2 years ago wc-interactivity.asset.php 2 years ago wc-interactivity.js 2 years ago wc-interactivity.js.map 2 years ago wc-payment-method-bacs.asset.php 2 years ago wc-payment-method-bacs.js 2 years ago wc-payment-method-bacs.js.map 2 years ago wc-payment-method-cheque.asset.php 2 years ago wc-payment-method-cheque.js 2 years ago wc-payment-method-cheque.js.map 2 years ago wc-payment-method-cod.asset.php 2 years ago wc-payment-method-cod.js 2 years ago wc-payment-method-cod.js.map 2 years ago wc-payment-method-paypal.asset.php 2 years ago wc-payment-method-paypal.js 2 years ago wc-payment-method-paypal.js.map 2 years ago wc-settings.asset.php 2 years ago wc-settings.js 2 years ago wc-settings.js.map 2 years ago wc-shipping-method-pickup-location.asset.php 2 years ago wc-shipping-method-pickup-location.js 2 years ago wc-shipping-method-pickup-location.js.map 2 years ago
product-category.js
3806 lines
1 /******/ (() => { // webpackBootstrap
2 /******/ var __webpack_modules__ = ({
3
4 /***/ "./assets/js/base/utils/errors.ts":
5 /*!****************************************!*\
6 !*** ./assets/js/base/utils/errors.ts ***!
7 \****************************************/
8 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
10 "use strict";
11 __webpack_require__.r(__webpack_exports__);
12 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13 /* harmony export */ formatError: () => (/* binding */ formatError)
14 /* harmony export */ });
15 const formatError = async error => {
16 if ('json' in error) {
17 try {
18 const parsedError = await error.json();
19 return {
20 message: parsedError.message,
21 type: parsedError.type || 'api'
22 };
23 } catch (e) {
24 return {
25 // We could only return this if e is instanceof Error but, to avoid changing runtime
26 // behaviour, we'll just cast it instead.
27 message: e.message,
28 type: 'general'
29 };
30 }
31 } else {
32 return {
33 message: error.message,
34 type: error.type || 'general'
35 };
36 }
37 };
38
39 /***/ }),
40
41 /***/ "./assets/js/base/utils/keyby.ts":
42 /*!***************************************!*\
43 !*** ./assets/js/base/utils/keyby.ts ***!
44 \***************************************/
45 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
46
47 "use strict";
48 __webpack_require__.r(__webpack_exports__);
49 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
50 /* harmony export */ keyBy: () => (/* binding */ keyBy)
51 /* harmony export */ });
52 const keyBy = (array, key) => {
53 return array.reduce((acc, value) => {
54 const computedKey = key ? String(value[key]) : String(value);
55 acc[computedKey] = value;
56 return acc;
57 }, {});
58 };
59
60 /***/ }),
61
62 /***/ "./assets/js/blocks/product-category/block.tsx":
63 /*!*****************************************************!*\
64 !*** ./assets/js/blocks/product-category/block.tsx ***!
65 \*****************************************************/
66 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
67
68 "use strict";
69 __webpack_require__.r(__webpack_exports__);
70 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
71 /* harmony export */ ProductByCategoryBlock: () => (/* binding */ ProductByCategoryBlock)
72 /* harmony export */ });
73 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
74 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
75 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
76 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
77 /* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
78 /* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2__);
79 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
80 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
81 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js");
82 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/file.js");
83 /* harmony import */ var _woocommerce_resource_previews__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/resource-previews */ "./assets/js/previews/grid-block.js");
84
85 /**
86 * External dependencies
87 */
88
89
90
91
92
93
94 /**
95 * Internal dependencies
96 */
97
98 const EmptyPlaceholder = () => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Placeholder, {
99 icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], {
100 icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"]
101 }),
102 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Products by Category', 'woocommerce'),
103 className: "wc-block-products-grid wc-block-products-category"
104 }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('No products were found that matched your selection.', 'woocommerce'));
105 const ProductByCategoryBlock = props => {
106 const {
107 name,
108 attributes
109 } = props;
110 const hasCategories = attributes.categories.length;
111 if (attributes.isPreview) {
112 return _woocommerce_resource_previews__WEBPACK_IMPORTED_MODULE_6__.gridBlockPreview;
113 }
114 return hasCategories ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_2___default()), {
115 block: name,
116 attributes: attributes,
117 EmptyResponsePlaceholder: EmptyPlaceholder
118 }) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Select at least one category to display its products.', 'woocommerce'));
119 };
120 ProductByCategoryBlock.__docgenInfo = {
121 "description": "",
122 "methods": [],
123 "displayName": "ProductByCategoryBlock"
124 };
125 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
126 STORYBOOK_REACT_CLASSES["assets/js/blocks/product-category/block.tsx"] = {
127 name: "ProductByCategoryBlock",
128 docgenInfo: ProductByCategoryBlock.__docgenInfo,
129 path: "assets/js/blocks/product-category/block.tsx"
130 };
131 }
132
133 /***/ }),
134
135 /***/ "./assets/js/blocks/product-category/edit-mode.tsx":
136 /*!*********************************************************!*\
137 !*** ./assets/js/blocks/product-category/edit-mode.tsx ***!
138 \*********************************************************/
139 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
140
141 "use strict";
142 __webpack_require__.r(__webpack_exports__);
143 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
144 /* harmony export */ ProductsByCategoryEditMode: () => (/* binding */ ProductsByCategoryEditMode)
145 /* harmony export */ });
146 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
147 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
148 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
149 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__);
150 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js");
151 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/file.js");
152 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
153 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
154 /* harmony import */ var _woocommerce_editor_components_product_category_control__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/editor-components/product-category-control */ "./assets/js/editor-components/product-category-control/index.tsx");
155
156 /**
157 * External dependencies
158 */
159
160
161
162
163
164 /**
165 * Internal dependencies
166 */
167
168 const ProductsByCategoryEditMode = props => {
169 const {
170 debouncedSpeak,
171 setIsEditing,
172 changedAttributes,
173 setChangedAttributes,
174 attributes
175 } = props;
176 const currentAttributes = {
177 ...attributes,
178 ...changedAttributes
179 };
180 const stopEditing = () => {
181 setIsEditing(false);
182 setChangedAttributes({});
183 };
184 const save = () => {
185 const {
186 setAttributes
187 } = props;
188 setAttributes(changedAttributes);
189 stopEditing();
190 };
191 const onDone = () => {
192 save();
193 debouncedSpeak((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Now displaying a preview of the reviews for the products in the selected categories.', 'woocommerce'));
194 };
195 const onCancel = () => {
196 stopEditing();
197 debouncedSpeak((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Now displaying a preview of the reviews for the products in the selected categories.', 'woocommerce'));
198 };
199 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Placeholder, {
200 icon: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"], {
201 icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"]
202 }),
203 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Products by Category', 'woocommerce'),
204 className: "wc-block-products-grid wc-block-products-category"
205 }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Display a grid of products from your selected categories.', 'woocommerce'), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
206 className: "wc-block-products-category__selection"
207 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_product_category_control__WEBPACK_IMPORTED_MODULE_5__["default"], {
208 selected: currentAttributes.categories,
209 onChange: (value = []) => {
210 const ids = value.map(({
211 id
212 }) => id);
213 setChangedAttributes({
214 categories: ids
215 });
216 },
217 operator: currentAttributes.catOperator,
218 onOperatorChange: (value = 'any') => setChangedAttributes({
219 catOperator: value
220 })
221 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
222 variant: "primary",
223 onClick: onDone
224 }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Done', 'woocommerce')), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, {
225 className: "wc-block-products-category__cancel-button",
226 variant: "tertiary",
227 onClick: onCancel
228 }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Cancel', 'woocommerce'))));
229 };
230 ProductsByCategoryEditMode.__docgenInfo = {
231 "description": "",
232 "methods": [],
233 "displayName": "ProductsByCategoryEditMode",
234 "props": {
235 "isEditing": {
236 "required": true,
237 "tsType": {
238 "name": "boolean"
239 },
240 "description": ""
241 },
242 "setIsEditing": {
243 "required": true,
244 "tsType": {
245 "name": "signature",
246 "type": "function",
247 "raw": "( isEditing: boolean ) => void",
248 "signature": {
249 "arguments": [{
250 "name": "isEditing",
251 "type": {
252 "name": "boolean"
253 }
254 }],
255 "return": {
256 "name": "void"
257 }
258 }
259 },
260 "description": ""
261 },
262 "changedAttributes": {
263 "required": true,
264 "tsType": {
265 "name": "Partial",
266 "elements": [{
267 "name": "Attributes"
268 }],
269 "raw": "Partial< Attributes >"
270 },
271 "description": ""
272 },
273 "setChangedAttributes": {
274 "required": true,
275 "tsType": {
276 "name": "signature",
277 "type": "function",
278 "raw": "( changedAttributes: Partial< Attributes > ) => void",
279 "signature": {
280 "arguments": [{
281 "name": "changedAttributes",
282 "type": {
283 "name": "Partial",
284 "elements": [{
285 "name": "Attributes"
286 }],
287 "raw": "Partial< Attributes >"
288 }
289 }],
290 "return": {
291 "name": "void"
292 }
293 }
294 },
295 "description": ""
296 }
297 },
298 "composes": ["Props"]
299 };
300 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
301 STORYBOOK_REACT_CLASSES["assets/js/blocks/product-category/edit-mode.tsx"] = {
302 name: "ProductsByCategoryEditMode",
303 docgenInfo: ProductsByCategoryEditMode.__docgenInfo,
304 path: "assets/js/blocks/product-category/edit-mode.tsx"
305 };
306 }
307
308 /***/ }),
309
310 /***/ "./assets/js/blocks/product-category/edit.tsx":
311 /*!****************************************************!*\
312 !*** ./assets/js/blocks/product-category/edit.tsx ***!
313 \****************************************************/
314 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
315
316 "use strict";
317 __webpack_require__.r(__webpack_exports__);
318 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
319 /* harmony export */ Edit: () => (/* binding */ Edit)
320 /* harmony export */ });
321 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
322 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
323 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
324 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
325 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
326 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
327 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
328 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
329 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
330 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
331 /* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./block */ "./assets/js/blocks/product-category/block.tsx");
332 /* harmony import */ var _inspector_controls__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./inspector-controls */ "./assets/js/blocks/product-category/inspector-controls.tsx");
333 /* harmony import */ var _edit_mode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./edit-mode */ "./assets/js/blocks/product-category/edit-mode.tsx");
334
335 /**
336 * External dependencies
337 */
338
339
340
341
342
343 /**
344 * Internal dependencies
345 */
346
347
348
349 const EditBlock = props => {
350 const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)();
351 const {
352 attributes
353 } = props;
354 const [isEditing, setIsEditing] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)(!attributes.categories.length);
355 const [changedAttributes, setChangedAttributes] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_2__.useState)({});
356 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
357 ...blockProps
358 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.BlockControls, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToolbarGroup, {
359 controls: [{
360 icon: 'edit',
361 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Edit selected categories', 'woocommerce'),
362 onClick: () => setIsEditing(!isEditing),
363 isActive: isEditing
364 }]
365 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_inspector_controls__WEBPACK_IMPORTED_MODULE_5__.ProductsByCategoryInspectorControls, {
366 isEditing: isEditing,
367 setChangedAttributes: setChangedAttributes,
368 ...props
369 }), isEditing ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_edit_mode__WEBPACK_IMPORTED_MODULE_6__.ProductsByCategoryEditMode, {
370 isEditing: isEditing,
371 setIsEditing: setIsEditing,
372 changedAttributes: changedAttributes,
373 setChangedAttributes: setChangedAttributes,
374 ...props
375 }) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Disabled, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_block__WEBPACK_IMPORTED_MODULE_7__.ProductByCategoryBlock, {
376 ...props
377 })));
378 };
379 const Edit = (0,_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.withSpokenMessages)(EditBlock);
380 EditBlock.__docgenInfo = {
381 "description": "",
382 "methods": [],
383 "displayName": "EditBlock"
384 };
385 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
386 STORYBOOK_REACT_CLASSES["assets/js/blocks/product-category/edit.tsx"] = {
387 name: "EditBlock",
388 docgenInfo: EditBlock.__docgenInfo,
389 path: "assets/js/blocks/product-category/edit.tsx"
390 };
391 }
392
393 /***/ }),
394
395 /***/ "./assets/js/blocks/product-category/index.tsx":
396 /*!*****************************************************!*\
397 !*** ./assets/js/blocks/product-category/index.tsx ***!
398 \*****************************************************/
399 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
400
401 "use strict";
402 __webpack_require__.r(__webpack_exports__);
403 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
404 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
405 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
406 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__);
407 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js");
408 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/file.js");
409 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./editor.scss */ "./assets/js/blocks/product-category/editor.scss");
410 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_editor_scss__WEBPACK_IMPORTED_MODULE_2__);
411 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./assets/js/blocks/product-category/block.json");
412 /* harmony import */ var _utils_shared_attributes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/shared-attributes */ "./assets/js/utils/shared-attributes.js");
413 /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./edit */ "./assets/js/blocks/product-category/edit.tsx");
414
415 /**
416 * External dependencies
417 */
418
419
420
421 /**
422 * Internal dependencies
423 */
424
425
426
427
428
429 /**
430 * Register and run the "Products by Category" block.
431 */
432 (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__, {
433 icon: {
434 src: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], {
435 icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
436 className: "wc-block-editor-components-block-icon"
437 })
438 },
439 attributes: {
440 ..._block_json__WEBPACK_IMPORTED_MODULE_3__.attributes,
441 ..._utils_shared_attributes__WEBPACK_IMPORTED_MODULE_6__["default"]
442 },
443 transforms: {
444 from: [{
445 type: 'block',
446 blocks: _utils_shared_attributes__WEBPACK_IMPORTED_MODULE_6__.sharedAttributeBlockTypes.filter(value => value !== 'woocommerce/product-category'),
447 transform: attributes => (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.createBlock)('woocommerce/product-category', {
448 ...attributes,
449 editMode: false
450 })
451 }]
452 },
453 edit: _edit__WEBPACK_IMPORTED_MODULE_7__.Edit,
454 save: () => {
455 return null;
456 }
457 });
458
459 /***/ }),
460
461 /***/ "./assets/js/blocks/product-category/inspector-controls.tsx":
462 /*!******************************************************************!*\
463 !*** ./assets/js/blocks/product-category/inspector-controls.tsx ***!
464 \******************************************************************/
465 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
466
467 "use strict";
468 __webpack_require__.r(__webpack_exports__);
469 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
470 /* harmony export */ ProductsByCategoryInspectorControls: () => (/* binding */ ProductsByCategoryInspectorControls)
471 /* harmony export */ });
472 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
473 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
474 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
475 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
476 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
477 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
478 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
479 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__);
480 /* harmony import */ var _woocommerce_editor_components_product_category_control__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/editor-components/product-category-control */ "./assets/js/editor-components/product-category-control/index.tsx");
481 /* harmony import */ var _woocommerce_editor_components_grid_layout_control__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/editor-components/grid-layout-control */ "./assets/js/editor-components/grid-layout-control/index.tsx");
482 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
483 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__);
484 /* harmony import */ var _woocommerce_editor_components_grid_content_control__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @woocommerce/editor-components/grid-content-control */ "./assets/js/editor-components/grid-content-control/index.tsx");
485 /* harmony import */ var _woocommerce_editor_components_product_orderby_control__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @woocommerce/editor-components/product-orderby-control */ "./assets/js/editor-components/product-orderby-control/index.tsx");
486 /* harmony import */ var _woocommerce_editor_components_product_stock_control__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @woocommerce/editor-components/product-stock-control */ "./assets/js/editor-components/product-stock-control/index.tsx");
487
488 /**
489 * External dependencies
490 */
491
492
493
494
495
496
497
498
499
500
501 /**
502 * Internal dependencies
503 */
504
505 const ProductsByCategoryInspectorControls = props => {
506 const {
507 isEditing,
508 attributes,
509 setAttributes,
510 setChangedAttributes
511 } = props;
512 const {
513 columns,
514 catOperator,
515 contentVisibility,
516 orderby,
517 rows,
518 alignButtons,
519 stockStatus
520 } = attributes;
521 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InspectorControls, {
522 key: "inspector"
523 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
524 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Product Category', 'woocommerce'),
525 initialOpen: !attributes.categories.length && !isEditing
526 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_product_category_control__WEBPACK_IMPORTED_MODULE_5__["default"], {
527 selected: attributes.categories,
528 onChange: (value = []) => {
529 const ids = value.map(({
530 id
531 }) => id);
532 const changes = {
533 categories: ids
534 };
535
536 // Changes in the sidebar save instantly and overwrite any unsaved changes.
537 setAttributes(changes);
538 setChangedAttributes(changes);
539 },
540 operator: catOperator,
541 onOperatorChange: (value = 'any') => {
542 const changes = {
543 catOperator: value
544 };
545 setAttributes(changes);
546 setChangedAttributes(changes);
547 },
548 isCompact: true
549 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
550 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Layout', 'woocommerce'),
551 initialOpen: true
552 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_grid_layout_control__WEBPACK_IMPORTED_MODULE_6__["default"], {
553 columns: columns,
554 rows: rows,
555 alignButtons: alignButtons,
556 setAttributes: setAttributes,
557 minColumns: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__.getSetting)('minColumns', 1),
558 maxColumns: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__.getSetting)('maxColumns', 6),
559 minRows: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__.getSetting)('minRows', 1),
560 maxRows: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_4__.getSetting)('maxRows', 6)
561 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
562 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Content', 'woocommerce'),
563 initialOpen: true
564 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_grid_content_control__WEBPACK_IMPORTED_MODULE_7__["default"], {
565 settings: contentVisibility,
566 onChange: value => setAttributes({
567 contentVisibility: value
568 })
569 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
570 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Order By', 'woocommerce'),
571 initialOpen: false
572 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_product_orderby_control__WEBPACK_IMPORTED_MODULE_8__["default"], {
573 setAttributes: setAttributes,
574 value: orderby
575 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
576 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Filter by stock status', 'woocommerce'),
577 initialOpen: false
578 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_product_stock_control__WEBPACK_IMPORTED_MODULE_9__["default"], {
579 setAttributes: setAttributes,
580 value: stockStatus
581 })));
582 };
583 ProductsByCategoryInspectorControls.__docgenInfo = {
584 "description": "",
585 "methods": [],
586 "displayName": "ProductsByCategoryInspectorControls",
587 "props": {
588 "isEditing": {
589 "required": true,
590 "tsType": {
591 "name": "boolean"
592 },
593 "description": ""
594 },
595 "setChangedAttributes": {
596 "required": true,
597 "tsType": {
598 "name": "signature",
599 "type": "function",
600 "raw": "( changedAttributes: Partial< Attributes > ) => void",
601 "signature": {
602 "arguments": [{
603 "name": "changedAttributes",
604 "type": {
605 "name": "Partial",
606 "elements": [{
607 "name": "Attributes"
608 }],
609 "raw": "Partial< Attributes >"
610 }
611 }],
612 "return": {
613 "name": "void"
614 }
615 }
616 },
617 "description": ""
618 }
619 },
620 "composes": ["Props"]
621 };
622 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
623 STORYBOOK_REACT_CLASSES["assets/js/blocks/product-category/inspector-controls.tsx"] = {
624 name: "ProductsByCategoryInspectorControls",
625 docgenInfo: ProductsByCategoryInspectorControls.__docgenInfo,
626 path: "assets/js/blocks/product-category/inspector-controls.tsx"
627 };
628 }
629
630 /***/ }),
631
632 /***/ "./assets/js/editor-components/error-placeholder/error-message.tsx":
633 /*!*************************************************************************!*\
634 !*** ./assets/js/editor-components/error-placeholder/error-message.tsx ***!
635 \*************************************************************************/
636 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
637
638 "use strict";
639 __webpack_require__.r(__webpack_exports__);
640 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
641 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
642 /* harmony export */ });
643 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
644 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
645 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
646 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
647 /* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/escape-html */ "@wordpress/escape-html");
648 /* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__);
649
650 /**
651 * External dependencies
652 */
653
654
655
656 /**
657 * Internal dependencies
658 */
659
660 const getErrorMessage = ({
661 message,
662 type
663 }) => {
664 if (!message) {
665 return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('An error has prevented the block from being updated.', 'woocommerce');
666 }
667 if (type === 'general') {
668 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('The following error was returned', 'woocommerce'), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.escapeHTML)(message)));
669 }
670 if (type === 'api') {
671 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('The following error was returned from the API', 'woocommerce'), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("br", null), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, (0,_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__.escapeHTML)(message)));
672 }
673 return message;
674 };
675 const ErrorMessage = ({
676 error
677 }) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
678 className: "wc-block-error-message"
679 }, getErrorMessage(error));
680 ErrorMessage.__docgenInfo = {
681 "description": "",
682 "methods": [],
683 "displayName": "ErrorMessage",
684 "props": {
685 "error": {
686 "required": true,
687 "tsType": {
688 "name": "ErrorObject"
689 },
690 "description": "The error object."
691 }
692 }
693 };
694 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ErrorMessage);
695 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
696 STORYBOOK_REACT_CLASSES["assets/js/editor-components/error-placeholder/error-message.tsx"] = {
697 name: "ErrorMessage",
698 docgenInfo: ErrorMessage.__docgenInfo,
699 path: "assets/js/editor-components/error-placeholder/error-message.tsx"
700 };
701 }
702
703 /***/ }),
704
705 /***/ "./assets/js/editor-components/grid-content-control/index.tsx":
706 /*!********************************************************************!*\
707 !*** ./assets/js/editor-components/grid-content-control/index.tsx ***!
708 \********************************************************************/
709 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
710
711 "use strict";
712 __webpack_require__.r(__webpack_exports__);
713 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
714 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
715 /* harmony export */ });
716 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
717 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
718 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
719 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
720 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
721 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
722
723 /**
724 * External dependencies
725 */
726
727
728 /**
729 * A combination of toggle controls for content visibility in product grids.
730 *
731 * @param {Object} props Incoming props for the component.
732 * @param {function(any):any} props.onChange
733 * @param {Object} props.settings
734 */
735 const GridContentControl = ({
736 onChange,
737 settings
738 }) => {
739 const {
740 image,
741 button,
742 price,
743 rating,
744 title
745 } = settings;
746 // If `image` is undefined, that might be because it's a block that was
747 // created before the `image` attribute existed, so we default to true.
748 const imageIsVisible = image !== false;
749 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
750 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product image', 'woocommerce'),
751 checked: imageIsVisible,
752 onChange: () => onChange({
753 ...settings,
754 image: !imageIsVisible
755 })
756 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
757 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product title', 'woocommerce'),
758 checked: title,
759 onChange: () => onChange({
760 ...settings,
761 title: !title
762 })
763 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
764 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product price', 'woocommerce'),
765 checked: price,
766 onChange: () => onChange({
767 ...settings,
768 price: !price
769 })
770 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
771 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product rating', 'woocommerce'),
772 checked: rating,
773 onChange: () => onChange({
774 ...settings,
775 rating: !rating
776 })
777 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
778 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Add to Cart button', 'woocommerce'),
779 checked: button,
780 onChange: () => onChange({
781 ...settings,
782 button: !button
783 })
784 }));
785 };
786 GridContentControl.__docgenInfo = {
787 "description": "A combination of toggle controls for content visibility in product grids.\n\n@param {Object} props Incoming props for the component.\n@param {function(any):any} props.onChange\n@param {Object} props.settings",
788 "methods": [],
789 "displayName": "GridContentControl",
790 "props": {
791 "onChange": {
792 "required": true,
793 "tsType": {
794 "name": "signature",
795 "type": "function",
796 "raw": "( settings: GridContentSettings ) => void",
797 "signature": {
798 "arguments": [{
799 "name": "settings",
800 "type": {
801 "name": "GridContentSettings"
802 }
803 }],
804 "return": {
805 "name": "void"
806 }
807 }
808 },
809 "description": ""
810 },
811 "settings": {
812 "required": true,
813 "tsType": {
814 "name": "GridContentSettings"
815 },
816 "description": ""
817 }
818 }
819 };
820 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GridContentControl);
821 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
822 STORYBOOK_REACT_CLASSES["assets/js/editor-components/grid-content-control/index.tsx"] = {
823 name: "GridContentControl",
824 docgenInfo: GridContentControl.__docgenInfo,
825 path: "assets/js/editor-components/grid-content-control/index.tsx"
826 };
827 }
828
829 /***/ }),
830
831 /***/ "./assets/js/editor-components/grid-layout-control/index.tsx":
832 /*!*******************************************************************!*\
833 !*** ./assets/js/editor-components/grid-layout-control/index.tsx ***!
834 \*******************************************************************/
835 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
836
837 "use strict";
838 __webpack_require__.r(__webpack_exports__);
839 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
840 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
841 /* harmony export */ });
842 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
843 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
844 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
845 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
846 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
847 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
848
849 /**
850 * External dependencies
851 */
852
853
854 const clamp = (number, boundOne, boundTwo) => {
855 if (!boundTwo) {
856 return Math.max(number, boundOne) === boundOne ? number : boundOne;
857 } else if (Math.min(number, boundOne) === number) {
858 return boundOne;
859 } else if (Math.max(number, boundTwo) === number) {
860 return boundTwo;
861 }
862 return number;
863 };
864 /**
865 * A combination of range controls for product grid layout settings.
866 *
867 * @param {Object} props Incoming props for the component.
868 * @param {number} props.columns
869 * @param {number} props.rows
870 * @param {function(any):any} props.setAttributes Setter for block attributes.
871 * @param {boolean} props.alignButtons
872 * @param {number} props.minColumns
873 * @param {number} props.maxColumns
874 * @param {number} props.minRows
875 * @param {number} props.maxRows
876 */
877 const GridLayoutControl = ({
878 columns,
879 rows,
880 setAttributes,
881 alignButtons,
882 minColumns = 1,
883 maxColumns = 6,
884 minRows = 1,
885 maxRows = 6
886 }) => {
887 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
888 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Columns', 'woocommerce'),
889 value: columns,
890 onChange: value => {
891 const newValue = clamp(value, minColumns, maxColumns);
892 setAttributes({
893 columns: Number.isNaN(newValue) ? '' : newValue
894 });
895 },
896 min: minColumns,
897 max: maxColumns
898 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
899 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Rows', 'woocommerce'),
900 value: rows,
901 onChange: value => {
902 const newValue = clamp(value, minRows, maxRows);
903 setAttributes({
904 rows: Number.isNaN(newValue) ? '' : newValue
905 });
906 },
907 min: minRows,
908 max: maxRows
909 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
910 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Align the last block to the bottom', 'woocommerce'),
911 help: alignButtons ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Align the last block to the bottom.', 'woocommerce') : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('The last inner block will follow other content.', 'woocommerce'),
912 checked: alignButtons,
913 onChange: () => setAttributes({
914 alignButtons: !alignButtons
915 })
916 }));
917 };
918 GridLayoutControl.__docgenInfo = {
919 "description": "A combination of range controls for product grid layout settings.\n\n@param {Object} props Incoming props for the component.\n@param {number} props.columns\n@param {number} props.rows\n@param {function(any):any} props.setAttributes Setter for block attributes.\n@param {boolean} props.alignButtons\n@param {number} props.minColumns\n@param {number} props.maxColumns\n@param {number} props.minRows\n@param {number} props.maxRows",
920 "methods": [],
921 "displayName": "GridLayoutControl",
922 "props": {
923 "minColumns": {
924 "defaultValue": {
925 "value": "1",
926 "computed": false
927 },
928 "required": false,
929 "tsType": {
930 "name": "number"
931 },
932 "description": ""
933 },
934 "maxColumns": {
935 "defaultValue": {
936 "value": "6",
937 "computed": false
938 },
939 "required": false,
940 "tsType": {
941 "name": "number"
942 },
943 "description": ""
944 },
945 "minRows": {
946 "defaultValue": {
947 "value": "1",
948 "computed": false
949 },
950 "required": false,
951 "tsType": {
952 "name": "number"
953 },
954 "description": ""
955 },
956 "maxRows": {
957 "defaultValue": {
958 "value": "6",
959 "computed": false
960 },
961 "required": false,
962 "tsType": {
963 "name": "number"
964 },
965 "description": ""
966 },
967 "columns": {
968 "required": true,
969 "tsType": {
970 "name": "number"
971 },
972 "description": ""
973 },
974 "rows": {
975 "required": true,
976 "tsType": {
977 "name": "number"
978 },
979 "description": ""
980 },
981 "setAttributes": {
982 "required": true,
983 "tsType": {
984 "name": "signature",
985 "type": "function",
986 "raw": "( attributes: Record< string, unknown > ) => void",
987 "signature": {
988 "arguments": [{
989 "name": "attributes",
990 "type": {
991 "name": "Record",
992 "elements": [{
993 "name": "string"
994 }, {
995 "name": "unknown"
996 }],
997 "raw": "Record< string, unknown >"
998 }
999 }],
1000 "return": {
1001 "name": "void"
1002 }
1003 }
1004 },
1005 "description": ""
1006 },
1007 "alignButtons": {
1008 "required": true,
1009 "tsType": {
1010 "name": "boolean"
1011 },
1012 "description": ""
1013 }
1014 }
1015 };
1016 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GridLayoutControl);
1017 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1018 STORYBOOK_REACT_CLASSES["assets/js/editor-components/grid-layout-control/index.tsx"] = {
1019 name: "GridLayoutControl",
1020 docgenInfo: GridLayoutControl.__docgenInfo,
1021 path: "assets/js/editor-components/grid-layout-control/index.tsx"
1022 };
1023 }
1024
1025 /***/ }),
1026
1027 /***/ "./assets/js/editor-components/product-category-control/index.tsx":
1028 /*!************************************************************************!*\
1029 !*** ./assets/js/editor-components/product-category-control/index.tsx ***!
1030 \************************************************************************/
1031 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1032
1033 "use strict";
1034 __webpack_require__.r(__webpack_exports__);
1035 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1036 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1037 /* harmony export */ });
1038 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1039 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1040 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1041 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
1042 /* harmony import */ var _woocommerce_editor_components_search_list_control__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/editor-components/search-list-control */ "./assets/js/editor-components/search-list-control/item.tsx");
1043 /* harmony import */ var _woocommerce_editor_components_search_list_control__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @woocommerce/editor-components/search-list-control */ "./assets/js/editor-components/search-list-control/search-list-control.tsx");
1044 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1045 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
1046 /* harmony import */ var _woocommerce_block_hocs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @woocommerce/block-hocs */ "./assets/js/hocs/with-searched-categories.tsx");
1047 /* harmony import */ var _woocommerce_editor_components_error_placeholder_error_message__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/editor-components/error-placeholder/error-message */ "./assets/js/editor-components/error-placeholder/error-message.tsx");
1048 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
1049 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
1050 /* harmony import */ var _woocommerce_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @woocommerce/utils */ "./assets/js/utils/products.ts");
1051 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style.scss */ "./assets/js/editor-components/product-category-control/style.scss");
1052 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_4__);
1053
1054 /**
1055 * External dependencies
1056 */
1057
1058
1059
1060
1061
1062
1063
1064
1065 /**
1066 * Internal dependencies
1067 */
1068
1069 const ProductCategoryControl = ({
1070 categories = [],
1071 error = null,
1072 isLoading = false,
1073 onChange,
1074 onOperatorChange,
1075 operator = 'any',
1076 selected,
1077 isCompact = false,
1078 isSingle = false,
1079 showReviewCount
1080 }) => {
1081 const renderItem = args => {
1082 var _item$details, _item$details2, _item$details3, _item$details4, _item$details5, _item$details6, _item$details7, _item$details8;
1083 const {
1084 item,
1085 search,
1086 depth = 0
1087 } = args;
1088 const accessibleName = !item.breadcrumbs.length ? item.name : `${item.breadcrumbs.join(', ')}, ${item.name}`;
1089 const listItemAriaLabel = showReviewCount ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %1$s is the item name, %2$d is the count of reviews for the item. */
1090 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__._n)('%1$s, has %2$d review', '%1$s, has %2$d reviews', ((_item$details = item.details) === null || _item$details === void 0 ? void 0 : _item$details.review_count) || 0, 'woocommerce'), accessibleName, ((_item$details2 = item.details) === null || _item$details2 === void 0 ? void 0 : _item$details2.review_count) || 0) : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %1$s is the item name, %2$d is the count of products for the item. */
1091 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__._n)('%1$s, has %2$d product', '%1$s, has %2$d products', ((_item$details3 = item.details) === null || _item$details3 === void 0 ? void 0 : _item$details3.count) || 0, 'woocommerce'), accessibleName, ((_item$details4 = item.details) === null || _item$details4 === void 0 ? void 0 : _item$details4.count) || 0);
1092 const listItemCountLabel = showReviewCount ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %d is the count of reviews. */
1093 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__._n)('%d review', '%d reviews', ((_item$details5 = item.details) === null || _item$details5 === void 0 ? void 0 : _item$details5.review_count) || 0, 'woocommerce'), ((_item$details6 = item.details) === null || _item$details6 === void 0 ? void 0 : _item$details6.review_count) || 0) : (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %d is the count of products. */
1094 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__._n)('%d product', '%d products', ((_item$details7 = item.details) === null || _item$details7 === void 0 ? void 0 : _item$details7.count) || 0, 'woocommerce'), ((_item$details8 = item.details) === null || _item$details8 === void 0 ? void 0 : _item$details8.count) || 0);
1095 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_search_list_control__WEBPACK_IMPORTED_MODULE_5__.SearchListItem, {
1096 className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('woocommerce-product-categories__item', 'has-count', {
1097 'is-searching': search.length > 0,
1098 'is-skip-level': depth === 0 && item.parent !== 0
1099 }),
1100 ...args,
1101 countLabel: listItemCountLabel,
1102 "aria-label": listItemAriaLabel
1103 });
1104 };
1105 const messages = {
1106 clear: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear all product categories', 'woocommerce'),
1107 list: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product Categories', 'woocommerce'),
1108 noItems: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Your store doesn't have any product categories.", 'woocommerce'),
1109 search: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search for product categories', 'woocommerce'),
1110 selected: n => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %d is the count of selected categories. */
1111 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__._n)('%d category selected', '%d categories selected', n, 'woocommerce'), n),
1112 updated: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Category search results updated.', 'woocommerce')
1113 };
1114 if (error) {
1115 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_error_placeholder_error_message__WEBPACK_IMPORTED_MODULE_6__["default"], {
1116 error: error
1117 });
1118 }
1119 const currentList = categories.map(_woocommerce_utils__WEBPACK_IMPORTED_MODULE_7__.convertProductCategoryResponseItemToSearchItem);
1120 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_search_list_control__WEBPACK_IMPORTED_MODULE_8__.SearchListControl, {
1121 className: "woocommerce-product-categories",
1122 list: currentList,
1123 isLoading: isLoading,
1124 selected: currentList.filter(({
1125 id
1126 }) => selected.includes(Number(id))),
1127 onChange: onChange,
1128 renderItem: renderItem,
1129 messages: messages,
1130 isCompact: isCompact,
1131 isHierarchical: true,
1132 isSingle: isSingle
1133 }), !!onOperatorChange && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1134 hidden: selected.length < 2
1135 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
1136 className: "woocommerce-product-categories__operator",
1137 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Display products matching', 'woocommerce'),
1138 help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Pick at least two categories to use this setting.', 'woocommerce'),
1139 value: operator,
1140 onChange: onOperatorChange,
1141 options: [{
1142 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Any selected categories', 'woocommerce'),
1143 value: 'any'
1144 }, {
1145 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('All selected categories', 'woocommerce'),
1146 value: 'all'
1147 }]
1148 })));
1149 };
1150 ProductCategoryControl.__docgenInfo = {
1151 "description": "",
1152 "methods": [],
1153 "displayName": "ProductCategoryControl",
1154 "props": {
1155 "categories": {
1156 "defaultValue": {
1157 "value": "[]",
1158 "computed": false
1159 },
1160 "required": false
1161 },
1162 "error": {
1163 "defaultValue": {
1164 "value": "null",
1165 "computed": false
1166 },
1167 "required": false
1168 },
1169 "isLoading": {
1170 "defaultValue": {
1171 "value": "false",
1172 "computed": false
1173 },
1174 "required": false
1175 },
1176 "operator": {
1177 "defaultValue": {
1178 "value": "'any'",
1179 "computed": false
1180 },
1181 "required": false,
1182 "tsType": {
1183 "name": "union",
1184 "raw": "'all' | 'any'",
1185 "elements": [{
1186 "name": "literal",
1187 "value": "'all'"
1188 }, {
1189 "name": "literal",
1190 "value": "'any'"
1191 }]
1192 },
1193 "description": "Setting for whether products should match all or any selected categories."
1194 },
1195 "isCompact": {
1196 "defaultValue": {
1197 "value": "false",
1198 "computed": false
1199 },
1200 "required": false,
1201 "tsType": {
1202 "name": "boolean"
1203 },
1204 "description": "Whether or not the search control should be displayed in a compact way, so it occupies less space."
1205 },
1206 "isSingle": {
1207 "defaultValue": {
1208 "value": "false",
1209 "computed": false
1210 },
1211 "required": false,
1212 "tsType": {
1213 "name": "boolean"
1214 },
1215 "description": "Allow only a single selection. Defaults to false."
1216 },
1217 "onChange": {
1218 "required": true,
1219 "tsType": {
1220 "name": "signature",
1221 "type": "function",
1222 "raw": "() => void",
1223 "signature": {
1224 "arguments": [],
1225 "return": {
1226 "name": "void"
1227 }
1228 }
1229 },
1230 "description": "Callback to update the selected product categories."
1231 },
1232 "onOperatorChange": {
1233 "required": false,
1234 "tsType": {
1235 "name": "signature",
1236 "type": "function",
1237 "raw": "() => void",
1238 "signature": {
1239 "arguments": [],
1240 "return": {
1241 "name": "void"
1242 }
1243 }
1244 },
1245 "description": "Callback to update the category operator. If not passed in, setting is not used."
1246 },
1247 "showReviewCount": {
1248 "required": false,
1249 "tsType": {
1250 "name": "boolean"
1251 },
1252 "description": "Whether or not to display the number of reviews for a category in the list."
1253 }
1254 }
1255 };
1256 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_woocommerce_block_hocs__WEBPACK_IMPORTED_MODULE_9__["default"])(ProductCategoryControl));
1257 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1258 STORYBOOK_REACT_CLASSES["assets/js/editor-components/product-category-control/index.tsx"] = {
1259 name: "ProductCategoryControl",
1260 docgenInfo: ProductCategoryControl.__docgenInfo,
1261 path: "assets/js/editor-components/product-category-control/index.tsx"
1262 };
1263 }
1264
1265 /***/ }),
1266
1267 /***/ "./assets/js/editor-components/product-orderby-control/index.tsx":
1268 /*!***********************************************************************!*\
1269 !*** ./assets/js/editor-components/product-orderby-control/index.tsx ***!
1270 \***********************************************************************/
1271 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1272
1273 "use strict";
1274 __webpack_require__.r(__webpack_exports__);
1275 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1276 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1277 /* harmony export */ });
1278 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1279 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1280 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1281 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
1282 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1283 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
1284
1285 /**
1286 * External dependencies
1287 */
1288
1289
1290
1291 /**
1292 * Internal dependencies
1293 */
1294
1295 /**
1296 * A pre-configured SelectControl for product orderby settings.
1297 *
1298 * @param {Object} props Incoming props for the component.
1299 * @param {string} props.value
1300 * @param {function(any):any} props.setAttributes Setter for block attributes.
1301 */
1302 const ProductOrderbyControl = ({
1303 value,
1304 setAttributes
1305 }) => {
1306 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
1307 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Order products by', 'woocommerce'),
1308 value: value,
1309 options: [{
1310 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Newness - newest first', 'woocommerce'),
1311 value: 'date'
1312 }, {
1313 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Price - low to high', 'woocommerce'),
1314 value: 'price_asc'
1315 }, {
1316 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Price - high to low', 'woocommerce'),
1317 value: 'price_desc'
1318 }, {
1319 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Rating - highest first', 'woocommerce'),
1320 value: 'rating'
1321 }, {
1322 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Sales - most first', 'woocommerce'),
1323 value: 'popularity'
1324 }, {
1325 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Title - alphabetical', 'woocommerce'),
1326 value: 'title'
1327 }, {
1328 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Menu Order', 'woocommerce'),
1329 value: 'menu_order'
1330 }],
1331 onChange: orderby => setAttributes({
1332 orderby
1333 })
1334 });
1335 };
1336 ProductOrderbyControl.__docgenInfo = {
1337 "description": "A pre-configured SelectControl for product orderby settings.\n\n@param {Object} props Incoming props for the component.\n@param {string} props.value\n@param {function(any):any} props.setAttributes Setter for block attributes.",
1338 "methods": [],
1339 "displayName": "ProductOrderbyControl"
1340 };
1341 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductOrderbyControl);
1342 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1343 STORYBOOK_REACT_CLASSES["assets/js/editor-components/product-orderby-control/index.tsx"] = {
1344 name: "ProductOrderbyControl",
1345 docgenInfo: ProductOrderbyControl.__docgenInfo,
1346 path: "assets/js/editor-components/product-orderby-control/index.tsx"
1347 };
1348 }
1349
1350 /***/ }),
1351
1352 /***/ "./assets/js/editor-components/product-stock-control/index.tsx":
1353 /*!*********************************************************************!*\
1354 !*** ./assets/js/editor-components/product-stock-control/index.tsx ***!
1355 \*********************************************************************/
1356 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1357
1358 "use strict";
1359 __webpack_require__.r(__webpack_exports__);
1360 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1361 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1362 /* harmony export */ });
1363 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1364 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1365 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1366 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
1367 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
1368 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__);
1369 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1370 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
1371 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1372 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
1373
1374 /**
1375 * External dependencies
1376 */
1377
1378
1379
1380
1381 // Look up whether or not out of stock items should be hidden globally.
1382 const hideOutOfStockItems = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSetting)('hideOutOfStockItems', false);
1383
1384 // Get the stock status options.
1385 const allStockStatusOptions = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSetting)('stockStatusOptions', {});
1386
1387 /**
1388 * A pre-configured SelectControl for product stock settings.
1389 */
1390 const ProductStockControl = ({
1391 value,
1392 setAttributes
1393 }) => {
1394 // Determine whether or not to use the out of stock status.
1395 const {
1396 outofstock,
1397 ...otherStockStatusOptions
1398 } = allStockStatusOptions;
1399 const stockStatusOptions = hideOutOfStockItems ? otherStockStatusOptions : allStockStatusOptions;
1400
1401 /**
1402 * Valid options must be in an array of [ 'value' : 'mystatus', 'label' : 'My label' ] format.
1403 * stockStatusOptions are returned as [ 'mystatus' : 'My label' ].
1404 * Formatting is corrected here.
1405 */
1406 const displayOptions = Object.entries(stockStatusOptions).map(([slug, name]) => ({
1407 value: slug,
1408 label: name
1409 })).filter(status => !!status.label);
1410 const defaultCheckedOptions = Object.keys(stockStatusOptions).filter(key => !!key);
1411
1412 // Set the initial state to the default or saved value.
1413 const [checkedOptions, setChecked] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(value || defaultCheckedOptions);
1414
1415 /**
1416 * Set attributes when checked items change.
1417 * Note: The blank stock status prevents all results returning when all options are unchecked.
1418 */
1419 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
1420 setAttributes({
1421 stockStatus: ['', ...checkedOptions]
1422 });
1423 }, [checkedOptions, setAttributes]);
1424
1425 /**
1426 * When a checkbox in the list changes, update state.
1427 */
1428 const onChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(checkedValue => {
1429 const previouslyChecked = checkedOptions.includes(checkedValue);
1430 const newChecked = checkedOptions.filter(filteredValue => filteredValue !== checkedValue);
1431 if (!previouslyChecked) {
1432 newChecked.push(checkedValue);
1433 newChecked.sort();
1434 }
1435 setChecked(newChecked);
1436 }, [checkedOptions]);
1437 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, displayOptions.map(option => {
1438 const helpText = checkedOptions.includes(option.value) ? /* translators: %s stock status. */(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Stock status "%s" visible.', 'woocommerce') : /* translators: %s stock status. */(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Stock status "%s" hidden.', 'woocommerce');
1439 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
1440 label: option.label,
1441 key: option.value,
1442 help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)(helpText, option.label),
1443 checked: checkedOptions.includes(option.value),
1444 onChange: () => onChange(option.value)
1445 });
1446 }));
1447 };
1448 ProductStockControl.__docgenInfo = {
1449 "description": "A pre-configured SelectControl for product stock settings.",
1450 "methods": [],
1451 "displayName": "ProductStockControl",
1452 "props": {
1453 "value": {
1454 "required": true,
1455 "tsType": {
1456 "name": "Array",
1457 "elements": [{
1458 "name": "string"
1459 }],
1460 "raw": "Array< string >"
1461 },
1462 "description": ""
1463 },
1464 "setAttributes": {
1465 "required": true,
1466 "tsType": {
1467 "name": "signature",
1468 "type": "function",
1469 "raw": "( attributes: Record< string, unknown > ) => void",
1470 "signature": {
1471 "arguments": [{
1472 "name": "attributes",
1473 "type": {
1474 "name": "Record",
1475 "elements": [{
1476 "name": "string"
1477 }, {
1478 "name": "unknown"
1479 }],
1480 "raw": "Record< string, unknown >"
1481 }
1482 }],
1483 "return": {
1484 "name": "void"
1485 }
1486 }
1487 },
1488 "description": ""
1489 }
1490 }
1491 };
1492 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductStockControl);
1493 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1494 STORYBOOK_REACT_CLASSES["assets/js/editor-components/product-stock-control/index.tsx"] = {
1495 name: "ProductStockControl",
1496 docgenInfo: ProductStockControl.__docgenInfo,
1497 path: "assets/js/editor-components/product-stock-control/index.tsx"
1498 };
1499 }
1500
1501 /***/ }),
1502
1503 /***/ "./assets/js/editor-components/search-list-control/item.tsx":
1504 /*!******************************************************************!*\
1505 !*** ./assets/js/editor-components/search-list-control/item.tsx ***!
1506 \******************************************************************/
1507 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1508
1509 "use strict";
1510 __webpack_require__.r(__webpack_exports__);
1511 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1512 /* harmony export */ SearchListItem: () => (/* binding */ SearchListItem),
1513 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1514 /* harmony export */ });
1515 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1516 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1517 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
1518 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
1519 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1520 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
1521 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1522 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
1523 /* harmony import */ var _woocommerce_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/utils */ "./assets/js/utils/array-operations.ts");
1524 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities");
1525 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__);
1526 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./assets/js/editor-components/search-list-control/utils.tsx");
1527
1528 /**
1529 * External dependencies
1530 */
1531
1532
1533
1534
1535
1536
1537 /**
1538 * Internal dependencies
1539 */
1540
1541
1542 const Count = ({
1543 label
1544 }) => {
1545 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1546 className: "woocommerce-search-list__item-count"
1547 }, label);
1548 };
1549 const ItemLabel = props => {
1550 const {
1551 item,
1552 search
1553 } = props;
1554 const hasBreadcrumbs = item.breadcrumbs && item.breadcrumbs.length;
1555 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1556 className: "woocommerce-search-list__item-label"
1557 }, hasBreadcrumbs ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1558 className: "woocommerce-search-list__item-prefix"
1559 }, (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getBreadcrumbsForDisplay)(item.breadcrumbs)) : null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1560 className: "woocommerce-search-list__item-name"
1561 }, (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getHighlightedName)((0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(item.name), search)));
1562 };
1563 const SearchListItem = ({
1564 countLabel,
1565 className,
1566 depth = 0,
1567 controlId = '',
1568 item,
1569 isSelected,
1570 isSingle,
1571 onSelect,
1572 search = '',
1573 selected,
1574 useExpandedPanelId,
1575 ...props
1576 }) => {
1577 var _item$breadcrumbs, _item$children;
1578 const [expandedPanelId, setExpandedPanelId] = useExpandedPanelId;
1579 const showCount = countLabel !== undefined && countLabel !== null && item.count !== undefined && item.count !== null;
1580 const hasBreadcrumbs = !!((_item$breadcrumbs = item.breadcrumbs) !== null && _item$breadcrumbs !== void 0 && _item$breadcrumbs.length);
1581 const hasChildren = !!((_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length);
1582 const isExpanded = expandedPanelId === item.id;
1583 const classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()(['woocommerce-search-list__item', `depth-${depth}`, className], {
1584 'has-breadcrumbs': hasBreadcrumbs,
1585 'has-children': hasChildren,
1586 'has-count': showCount,
1587 'is-expanded': isExpanded,
1588 'is-radio-button': isSingle
1589 });
1590 const name = props.name || `search-list-item-${controlId}`;
1591 const id = `${name}-${item.id}`;
1592 const togglePanel = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(() => {
1593 setExpandedPanelId(isExpanded ? -1 : Number(item.id));
1594 }, [isExpanded, item.id, setExpandedPanelId]);
1595 return hasChildren ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1596 className: classes,
1597 onClick: togglePanel,
1598 onKeyDown: e => e.key === 'Enter' || e.key === ' ' ? togglePanel() : null,
1599 role: "treeitem",
1600 tabIndex: 0
1601 }, isSingle ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
1602 type: "radio",
1603 id: id,
1604 name: name,
1605 value: item.value,
1606 onChange: onSelect(item),
1607 onClick: e => e.stopPropagation(),
1608 checked: isSelected,
1609 className: "woocommerce-search-list__item-input",
1610 ...props
1611 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ItemLabel, {
1612 item: item,
1613 search: search
1614 }), showCount ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Count, {
1615 label: countLabel || item.count
1616 }) : null) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, {
1617 className: "woocommerce-search-list__item-input",
1618 checked: isSelected,
1619 ...(!isSelected &&
1620 // We know that `item.children` is not `undefined` because
1621 // we are here only if `hasChildren` is `true`.
1622 item.children.some(child => selected.find(selectedItem => selectedItem.id === child.id)) ? {
1623 indeterminate: true
1624 } : {}),
1625 label: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getHighlightedName)((0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(item.name), search),
1626 onChange: () => {
1627 if (isSelected) {
1628 onSelect((0,_woocommerce_utils__WEBPACK_IMPORTED_MODULE_6__.arrayDifferenceBy)(selected, item.children, 'id'))();
1629 } else {
1630 onSelect((0,_woocommerce_utils__WEBPACK_IMPORTED_MODULE_6__.arrayUnionBy)(selected, item.children, 'id'))();
1631 }
1632 },
1633 onClick: e => e.stopPropagation()
1634 }), showCount ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Count, {
1635 label: countLabel || item.count
1636 }) : null)) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
1637 htmlFor: id,
1638 className: classes
1639 }, isSingle ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
1640 ...props,
1641 type: "radio",
1642 id: id,
1643 name: name,
1644 value: item.value,
1645 onChange: onSelect(item),
1646 checked: isSelected,
1647 className: "woocommerce-search-list__item-input"
1648 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ItemLabel, {
1649 item: item,
1650 search: search
1651 })) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, {
1652 ...props,
1653 id: id,
1654 name: name,
1655 className: "woocommerce-search-list__item-input",
1656 value: (0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(item.value),
1657 label: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getHighlightedName)((0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(item.name), search),
1658 onChange: onSelect(item),
1659 checked: isSelected
1660 }), showCount ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Count, {
1661 label: countLabel || item.count
1662 }) : null);
1663 };
1664 SearchListItem.__docgenInfo = {
1665 "description": "",
1666 "methods": [],
1667 "displayName": "SearchListItem",
1668 "props": {
1669 "depth": {
1670 "defaultValue": {
1671 "value": "0",
1672 "computed": false
1673 },
1674 "required": false
1675 },
1676 "controlId": {
1677 "defaultValue": {
1678 "value": "''",
1679 "computed": false
1680 },
1681 "required": false
1682 },
1683 "search": {
1684 "defaultValue": {
1685 "value": "''",
1686 "computed": false
1687 },
1688 "required": false
1689 }
1690 }
1691 };
1692 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchListItem);
1693 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1694 STORYBOOK_REACT_CLASSES["assets/js/editor-components/search-list-control/item.tsx"] = {
1695 name: "SearchListItem",
1696 docgenInfo: SearchListItem.__docgenInfo,
1697 path: "assets/js/editor-components/search-list-control/item.tsx"
1698 };
1699 }
1700
1701 /***/ }),
1702
1703 /***/ "./assets/js/editor-components/search-list-control/search-list-control.tsx":
1704 /*!*********************************************************************************!*\
1705 !*** ./assets/js/editor-components/search-list-control/search-list-control.tsx ***!
1706 \*********************************************************************************/
1707 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1708
1709 "use strict";
1710 __webpack_require__.r(__webpack_exports__);
1711 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1712 /* harmony export */ SearchListControl: () => (/* binding */ SearchListControl),
1713 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1714 /* harmony export */ });
1715 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1716 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1717 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1718 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
1719 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1720 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
1721 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1722 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
1723 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js");
1724 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/info.js");
1725 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
1726 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
1727 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
1728 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__);
1729 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils */ "./assets/js/editor-components/search-list-control/utils.tsx");
1730 /* harmony import */ var _item__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./item */ "./assets/js/editor-components/search-list-control/item.tsx");
1731 /* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../tag */ "./assets/js/editor-components/tag/index.tsx");
1732 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./style.scss */ "./assets/js/editor-components/search-list-control/style.scss");
1733 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_6__);
1734
1735 /**
1736 * External dependencies
1737 */
1738
1739
1740
1741
1742
1743
1744
1745 /**
1746 * Internal dependencies
1747 */
1748
1749
1750
1751
1752 const defaultRenderListItem = args => {
1753 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_item__WEBPACK_IMPORTED_MODULE_7__["default"], {
1754 ...args
1755 });
1756 };
1757 const ListItems = props => {
1758 const {
1759 list,
1760 selected,
1761 renderItem,
1762 depth = 0,
1763 onSelect,
1764 instanceId,
1765 isSingle,
1766 search,
1767 useExpandedPanelId
1768 } = props;
1769 const [expandedPanelId] = useExpandedPanelId;
1770 if (!list) {
1771 return null;
1772 }
1773 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.Fragment, null, list.map(item => {
1774 var _item$children, _item$children2;
1775 const isSelected = (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length && !isSingle ? item.children.every(({
1776 id
1777 }) => selected.find(selectedItem => selectedItem.id === id)) : !!selected.find(({
1778 id
1779 }) => id === item.id);
1780 const isExpanded = ((_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.length) && expandedPanelId === item.id;
1781 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.Fragment, {
1782 key: item.id
1783 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, renderItem({
1784 item,
1785 isSelected,
1786 onSelect,
1787 isSingle,
1788 selected,
1789 search,
1790 depth,
1791 useExpandedPanelId,
1792 controlId: instanceId
1793 })), isExpanded ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ListItems, {
1794 ...props,
1795 list: item.children,
1796 depth: depth + 1
1797 }) : null);
1798 }));
1799 };
1800 const SelectedListItems = ({
1801 isLoading,
1802 isSingle,
1803 selected,
1804 messages,
1805 onChange,
1806 onRemove
1807 }) => {
1808 if (isLoading || isSingle || !selected) {
1809 return null;
1810 }
1811 const selectedCount = selected.length;
1812 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1813 className: "woocommerce-search-list__selected"
1814 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1815 className: "woocommerce-search-list__selected-header"
1816 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, messages.selected(selectedCount)), selectedCount > 0 ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
1817 variant: "link",
1818 isDestructive: true,
1819 onClick: () => onChange([]),
1820 "aria-label": messages.clear
1821 }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear all', 'woocommerce')) : null), selectedCount > 0 ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", null, selected.map((item, i) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", {
1822 key: i
1823 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_tag__WEBPACK_IMPORTED_MODULE_8__["default"], {
1824 label: item.name,
1825 id: item.id,
1826 remove: onRemove
1827 })))) : null);
1828 };
1829 const ListItemsContainer = ({
1830 filteredList,
1831 search,
1832 onSelect,
1833 instanceId,
1834 useExpandedPanelId,
1835 ...props
1836 }) => {
1837 const {
1838 messages,
1839 renderItem,
1840 selected,
1841 isSingle
1842 } = props;
1843 const renderItemCallback = renderItem || defaultRenderListItem;
1844 if (filteredList.length === 0) {
1845 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1846 className: "woocommerce-search-list__list is-not-found"
1847 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1848 className: "woocommerce-search-list__not-found-icon"
1849 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], {
1850 icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"],
1851 role: "img"
1852 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1853 className: "woocommerce-search-list__not-found-text"
1854 }, search ?
1855 // eslint-disable-next-line @wordpress/valid-sprintf
1856 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)(messages.noResults, search) : messages.noItems));
1857 }
1858 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
1859 className: "woocommerce-search-list__list"
1860 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ListItems, {
1861 useExpandedPanelId: useExpandedPanelId,
1862 list: filteredList,
1863 selected: selected,
1864 renderItem: renderItemCallback,
1865 onSelect: onSelect,
1866 instanceId: instanceId,
1867 isSingle: isSingle,
1868 search: search
1869 }));
1870 };
1871
1872 /**
1873 * Component to display a searchable, selectable list of items.
1874 */
1875 const SearchListControl = props => {
1876 const {
1877 className = '',
1878 isCompact,
1879 isHierarchical,
1880 isLoading,
1881 isSingle,
1882 list,
1883 messages: customMessages = _utils__WEBPACK_IMPORTED_MODULE_11__.defaultMessages,
1884 onChange,
1885 onSearch,
1886 selected,
1887 type = 'text',
1888 debouncedSpeak
1889 } = props;
1890 const [search, setSearch] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('');
1891 const useExpandedPanelId = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(-1);
1892 const instanceId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__.useInstanceId)(SearchListControl);
1893 const messages = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => ({
1894 ..._utils__WEBPACK_IMPORTED_MODULE_11__.defaultMessages,
1895 ...customMessages
1896 }), [customMessages]);
1897 const filteredList = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => {
1898 return (0,_utils__WEBPACK_IMPORTED_MODULE_11__.getFilteredList)(list, search, isHierarchical);
1899 }, [list, search, isHierarchical]);
1900 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
1901 if (debouncedSpeak) {
1902 debouncedSpeak(messages.updated);
1903 }
1904 }, [debouncedSpeak, messages]);
1905 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
1906 if (typeof onSearch === 'function') {
1907 onSearch(search);
1908 }
1909 }, [search, onSearch]);
1910 const onRemove = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(itemId => () => {
1911 if (isSingle) {
1912 onChange([]);
1913 }
1914 const i = selected.findIndex(({
1915 id: selectedId
1916 }) => selectedId === itemId);
1917 onChange([...selected.slice(0, i), ...selected.slice(i + 1)]);
1918 }, [isSingle, selected, onChange]);
1919 const onSelect = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(item => () => {
1920 if (Array.isArray(item)) {
1921 onChange(item);
1922 return;
1923 }
1924 if (selected.findIndex(({
1925 id
1926 }) => id === item.id) !== -1) {
1927 onRemove(item.id)();
1928 return;
1929 }
1930 if (isSingle) {
1931 onChange([item]);
1932 } else {
1933 onChange([...selected, item]);
1934 }
1935 }, [isSingle, onRemove, onChange, selected]);
1936 const onRemoveToken = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(tokens => {
1937 const [removedItem] = selected.filter(item => !tokens.find(token => item.id === token.id));
1938 onRemove(removedItem.id)();
1939 }, [onRemove, selected]);
1940 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1941 className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('woocommerce-search-list', className, {
1942 'is-compact': isCompact,
1943 'is-loading': isLoading,
1944 'is-token': type === 'token'
1945 })
1946 }, type === 'text' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(SelectedListItems, {
1947 ...props,
1948 onRemove: onRemove,
1949 messages: messages
1950 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1951 className: "woocommerce-search-list__search"
1952 }, type === 'text' ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
1953 label: messages.search,
1954 type: "search",
1955 value: search,
1956 onChange: value => setSearch(value)
1957 }) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FormTokenField, {
1958 disabled: isLoading,
1959 label: messages.search,
1960 onChange: onRemoveToken,
1961 onInputChange: value => setSearch(value),
1962 suggestions: []
1963 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1964 // @ts-ignore - Ignoring because `__experimentalValidateInput` is not yet in the type definitions.
1965 ,
1966 __experimentalValidateInput: () => false,
1967 value: isLoading ? [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Loading…', 'woocommerce')] : selected.map(token => ({
1968 ...token,
1969 value: token.name
1970 })),
1971 __experimentalShowHowTo: false
1972 })), isLoading ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1973 className: "woocommerce-search-list__list"
1974 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Spinner, null)) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ListItemsContainer, {
1975 ...props,
1976 search: search,
1977 filteredList: filteredList,
1978 messages: messages,
1979 onSelect: onSelect,
1980 instanceId: instanceId,
1981 useExpandedPanelId: useExpandedPanelId
1982 }));
1983 };
1984 SearchListControl.__docgenInfo = {
1985 "description": "Component to display a searchable, selectable list of items.",
1986 "methods": [],
1987 "displayName": "SearchListControl"
1988 };
1989 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.withSpokenMessages)(SearchListControl));
1990 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1991 STORYBOOK_REACT_CLASSES["assets/js/editor-components/search-list-control/search-list-control.tsx"] = {
1992 name: "SearchListControl",
1993 docgenInfo: SearchListControl.__docgenInfo,
1994 path: "assets/js/editor-components/search-list-control/search-list-control.tsx"
1995 };
1996 }
1997
1998 /***/ }),
1999
2000 /***/ "./assets/js/editor-components/search-list-control/utils.tsx":
2001 /*!*******************************************************************!*\
2002 !*** ./assets/js/editor-components/search-list-control/utils.tsx ***!
2003 \*******************************************************************/
2004 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2005
2006 "use strict";
2007 __webpack_require__.r(__webpack_exports__);
2008 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2009 /* harmony export */ buildTermsTree: () => (/* binding */ buildTermsTree),
2010 /* harmony export */ defaultMessages: () => (/* binding */ defaultMessages),
2011 /* harmony export */ getBreadcrumbsForDisplay: () => (/* binding */ getBreadcrumbsForDisplay),
2012 /* harmony export */ getFilteredList: () => (/* binding */ getFilteredList),
2013 /* harmony export */ getHighlightedName: () => (/* binding */ getHighlightedName)
2014 /* harmony export */ });
2015 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2016 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2017 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
2018 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
2019 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2020 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
2021 /* harmony import */ var _woocommerce_base_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/base-utils */ "./assets/js/base/utils/keyby.ts");
2022
2023 /**
2024 * External dependencies
2025 */
2026
2027
2028
2029
2030 /**
2031 * Internal dependencies
2032 */
2033
2034 const defaultMessages = {
2035 clear: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Clear all selected items', 'woocommerce'),
2036 noItems: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No items found.', 'woocommerce'),
2037 /* Translators: %s search term */
2038 noResults: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No results for %s', 'woocommerce'),
2039 search: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search for items', 'woocommerce'),
2040 selected: n => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)( /* translators: Number of items selected from list. */
2041 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__._n)('%d item selected', '%d items selected', n, 'woocommerce'), n),
2042 updated: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search results updated.', 'woocommerce')
2043 };
2044
2045 /**
2046 * Returns terms in a tree form.
2047 *
2048 * @param {Array} filteredList Array of terms, possibly a subset of all terms, in flat format.
2049 * @param {Array} list Array of the full list of terms, defaults to the filteredList.
2050 *
2051 * @return {Array} Array of terms in tree format.
2052 */
2053 const buildTermsTree = (filteredList, list = filteredList) => {
2054 const termsByParent = filteredList.reduce((acc, currentValue) => {
2055 const key = currentValue.parent || 0;
2056 if (!acc[key]) {
2057 acc[key] = [];
2058 }
2059 acc[key].push(currentValue);
2060 return acc;
2061 }, {});
2062 const listById = (0,_woocommerce_base_utils__WEBPACK_IMPORTED_MODULE_3__.keyBy)(list, 'id');
2063 const builtParents = ['0'];
2064 const getParentsName = (term = {}) => {
2065 if (!term.parent) {
2066 return term.name ? [term.name] : [];
2067 }
2068 const parentName = getParentsName(listById[term.parent]);
2069 return [...parentName, term.name];
2070 };
2071 const fillWithChildren = terms => {
2072 return terms.map(term => {
2073 const children = termsByParent[term.id];
2074 builtParents.push('' + term.id);
2075 return {
2076 ...term,
2077 breadcrumbs: getParentsName(listById[term.parent]),
2078 children: children && children.length ? fillWithChildren(children) : []
2079 };
2080 });
2081 };
2082 const tree = fillWithChildren(termsByParent['0'] || []);
2083
2084 // Handle remaining items in termsByParent that have not been built (orphaned).
2085 Object.entries(termsByParent).forEach(([termId, terms]) => {
2086 if (!builtParents.includes(termId)) {
2087 tree.push(...fillWithChildren(terms || []));
2088 }
2089 });
2090 return tree;
2091 };
2092 const getFilteredList = (list, search, isHierarchical) => {
2093 if (!search) {
2094 return isHierarchical ? buildTermsTree(list) : list;
2095 }
2096 const re = new RegExp(search.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'i');
2097 const filteredList = list.map(item => re.test(item.name) ? item : false).filter(Boolean);
2098 return isHierarchical ? buildTermsTree(filteredList, list) : filteredList;
2099 };
2100 const getHighlightedName = (name, search) => {
2101 if (!search) {
2102 return name;
2103 }
2104 const re = new RegExp(
2105 // Escaping.
2106 `(${search.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')})`, 'ig');
2107 const nameParts = name.split(re);
2108 return nameParts.map((part, i) => {
2109 return re.test(part) ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", {
2110 key: i
2111 }, part) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
2112 key: i
2113 }, part);
2114 });
2115 };
2116 const getBreadcrumbsForDisplay = breadcrumbs => {
2117 if (breadcrumbs.length === 1) {
2118 return breadcrumbs.slice(0, 1).toString();
2119 }
2120 if (breadcrumbs.length === 2) {
2121 return breadcrumbs.slice(0, 1).toString() + '' + breadcrumbs.slice(-1).toString();
2122 }
2123 return breadcrumbs.slice(0, 1).toString() + '' + breadcrumbs.slice(-1).toString();
2124 };
2125
2126 /***/ }),
2127
2128 /***/ "./assets/js/editor-components/tag/index.tsx":
2129 /*!***************************************************!*\
2130 !*** ./assets/js/editor-components/tag/index.tsx ***!
2131 \***************************************************/
2132 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2133
2134 "use strict";
2135 __webpack_require__.r(__webpack_exports__);
2136 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2137 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2138 /* harmony export */ });
2139 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2140 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2141 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
2142 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
2143 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
2144 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
2145 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
2146 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
2147 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/icon/index.js");
2148 /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "../../node_modules/.pnpm/@wordpress+icons@9.36.0/node_modules/@wordpress/icons/build-module/library/cancel-circle-filled.js");
2149 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities");
2150 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__);
2151 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
2152 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__);
2153 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
2154 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
2155 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./editor.scss */ "./assets/js/editor-components/tag/editor.scss");
2156 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_editor_scss__WEBPACK_IMPORTED_MODULE_7__);
2157
2158 /**
2159 * External dependencies
2160 */
2161
2162
2163
2164
2165
2166
2167
2168
2169 /**
2170 * Internal dependencies
2171 */
2172
2173
2174 /**
2175 * This component can be used to show an item styled as a "tag", optionally with an `X` + "remove"
2176 * or with a popover that is shown on click.
2177 */
2178 const Tag = ({
2179 id,
2180 label,
2181 popoverContents,
2182 remove,
2183 screenReaderLabel,
2184 className = ''
2185 }) => {
2186 const [isVisible, setIsVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_6__.useState)(false);
2187 const instanceId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__.useInstanceId)(Tag);
2188 screenReaderLabel = screenReaderLabel || label;
2189 if (!label) {
2190 // A null label probably means something went wrong
2191 return null;
2192 }
2193 label = (0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(label);
2194 const classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('woocommerce-tag', className, {
2195 'has-remove': !!remove
2196 });
2197 const labelId = `woocommerce-tag__label-${instanceId}`;
2198 const labelTextNode = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
2199 className: "screen-reader-text"
2200 }, screenReaderLabel), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
2201 "aria-hidden": "true"
2202 }, label));
2203 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
2204 className: classes
2205 }, popoverContents ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
2206 className: "woocommerce-tag__text",
2207 id: labelId,
2208 onClick: () => setIsVisible(true)
2209 }, labelTextNode) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
2210 className: "woocommerce-tag__text",
2211 id: labelId
2212 }, labelTextNode), popoverContents && isVisible && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
2213 onClose: () => setIsVisible(false)
2214 }, popoverContents), remove && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
2215 className: "woocommerce-tag__remove",
2216 onClick: remove(id),
2217 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)(
2218 // Translators: %s label.
2219 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Remove %s', 'woocommerce'), label),
2220 "aria-describedby": labelId
2221 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"], {
2222 icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"],
2223 size: 20,
2224 className: "clear-icon",
2225 role: "img"
2226 })));
2227 };
2228 Tag.__docgenInfo = {
2229 "description": "This component can be used to show an item styled as a \"tag\", optionally with an `X` + \"remove\"\nor with a popover that is shown on click.",
2230 "methods": [],
2231 "displayName": "Tag",
2232 "props": {
2233 "className": {
2234 "defaultValue": {
2235 "value": "''",
2236 "computed": false
2237 },
2238 "required": false,
2239 "tsType": {
2240 "name": "string"
2241 },
2242 "description": ""
2243 },
2244 "id": {
2245 "required": true,
2246 "tsType": {
2247 "name": "union",
2248 "raw": "string | number",
2249 "elements": [{
2250 "name": "string"
2251 }, {
2252 "name": "number"
2253 }]
2254 },
2255 "description": ""
2256 },
2257 "label": {
2258 "required": true,
2259 "tsType": {
2260 "name": "string"
2261 },
2262 "description": ""
2263 },
2264 "popoverContents": {
2265 "required": false,
2266 "tsType": {
2267 "name": "JSX.Element"
2268 },
2269 "description": ""
2270 },
2271 "remove": {
2272 "required": false,
2273 "tsType": {
2274 "name": "signature",
2275 "type": "function",
2276 "raw": "( id: string | number ) => () => void",
2277 "signature": {
2278 "arguments": [{
2279 "name": "id",
2280 "type": {
2281 "name": "union",
2282 "raw": "string | number",
2283 "elements": [{
2284 "name": "string"
2285 }, {
2286 "name": "number"
2287 }]
2288 }
2289 }],
2290 "return": {
2291 "name": "signature",
2292 "type": "function",
2293 "raw": "() => void",
2294 "signature": {
2295 "arguments": [],
2296 "return": {
2297 "name": "void"
2298 }
2299 }
2300 }
2301 }
2302 },
2303 "description": ""
2304 },
2305 "screenReaderLabel": {
2306 "required": false,
2307 "tsType": {
2308 "name": "string"
2309 },
2310 "description": ""
2311 }
2312 }
2313 };
2314 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Tag);
2315 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
2316 STORYBOOK_REACT_CLASSES["assets/js/editor-components/tag/index.tsx"] = {
2317 name: "Tag",
2318 docgenInfo: Tag.__docgenInfo,
2319 path: "assets/js/editor-components/tag/index.tsx"
2320 };
2321 }
2322
2323 /***/ }),
2324
2325 /***/ "./assets/js/editor-components/utils/index.js":
2326 /*!****************************************************!*\
2327 !*** ./assets/js/editor-components/utils/index.js ***!
2328 \****************************************************/
2329 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2330
2331 "use strict";
2332 __webpack_require__.r(__webpack_exports__);
2333 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2334 /* harmony export */ formatTitle: () => (/* binding */ formatTitle),
2335 /* harmony export */ getAttributes: () => (/* binding */ getAttributes),
2336 /* harmony export */ getCategories: () => (/* binding */ getCategories),
2337 /* harmony export */ getCategory: () => (/* binding */ getCategory),
2338 /* harmony export */ getProduct: () => (/* binding */ getProduct),
2339 /* harmony export */ getProductTags: () => (/* binding */ getProductTags),
2340 /* harmony export */ getProductVariations: () => (/* binding */ getProductVariations),
2341 /* harmony export */ getProducts: () => (/* binding */ getProducts),
2342 /* harmony export */ getTerms: () => (/* binding */ getTerms)
2343 /* harmony export */ });
2344 /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
2345 /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__);
2346 /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
2347 /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__);
2348 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
2349 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__);
2350 /* harmony import */ var _woocommerce_block_settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/block-settings */ "./assets/js/settings/blocks/index.ts");
2351 /**
2352 * External dependencies
2353 */
2354
2355
2356
2357
2358
2359 /**
2360 * Get product query requests for the Store API.
2361 *
2362 * @param {Object} request A query object with the list of selected products and search term.
2363 * @param {number[]} request.selected Currently selected products.
2364 * @param {string=} request.search Search string.
2365 * @param {(Record<string, unknown>)=} request.queryArgs Query args to pass in.
2366 */
2367 const getProductsRequests = ({
2368 selected = [],
2369 search = '',
2370 queryArgs = {}
2371 }) => {
2372 const isLargeCatalog = _woocommerce_block_settings__WEBPACK_IMPORTED_MODULE_3__.blocksConfig.productCount > 100;
2373 const defaultArgs = {
2374 per_page: isLargeCatalog ? 100 : 0,
2375 catalog_visibility: 'any',
2376 search,
2377 orderby: 'title',
2378 order: 'asc'
2379 };
2380 const requests = [(0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)('/wc/store/v1/products', {
2381 ...defaultArgs,
2382 ...queryArgs
2383 })];
2384
2385 // If we have a large catalog, we might not get all selected products in the first page.
2386 if (isLargeCatalog && selected.length) {
2387 requests.push((0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)('/wc/store/v1/products', {
2388 catalog_visibility: 'any',
2389 include: selected,
2390 per_page: 0
2391 }));
2392 }
2393 return requests;
2394 };
2395 const uniqBy = (array, iteratee) => {
2396 const seen = new Map();
2397 return array.filter(item => {
2398 const key = iteratee(item);
2399 if (!seen.has(key)) {
2400 seen.set(key, item);
2401 return true;
2402 }
2403 return false;
2404 });
2405 };
2406
2407 /**
2408 * Get a promise that resolves to a list of products from the Store API.
2409 *
2410 * @param {Object} request A query object with the list of selected products and search term.
2411 * @param {number[]} request.selected Currently selected products.
2412 * @param {string=} request.search Search string.
2413 * @param {(Record<string, unknown>)=} request.queryArgs Query args to pass in.
2414 * @return {Promise<unknown>} Promise resolving to a Product list.
2415 * @throws Exception if there is an error.
2416 */
2417 const getProducts = ({
2418 selected = [],
2419 search = '',
2420 queryArgs = {}
2421 }) => {
2422 const requests = getProductsRequests({
2423 selected,
2424 search,
2425 queryArgs
2426 });
2427 return Promise.all(requests.map(path => _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2428 path
2429 }))).then(data => {
2430 const flatData = data.flat();
2431 const products = uniqBy(flatData, item => item.id);
2432 const list = products.map(product => ({
2433 ...product,
2434 parent: 0
2435 }));
2436 return list;
2437 }).catch(e => {
2438 throw e;
2439 });
2440 };
2441
2442 /**
2443 * Get a promise that resolves to a product object from the Store API.
2444 *
2445 * @param {number} productId Id of the product to retrieve.
2446 */
2447 const getProduct = productId => {
2448 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2449 path: `/wc/store/v1/products/${productId}`
2450 });
2451 };
2452
2453 /**
2454 * Get a promise that resolves to a list of attribute objects from the Store API.
2455 */
2456 const getAttributes = () => {
2457 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2458 path: `wc/store/v1/products/attributes`
2459 });
2460 };
2461
2462 /**
2463 * Get a promise that resolves to a list of attribute term objects from the Store API.
2464 *
2465 * @param {number} attribute Id of the attribute to retrieve terms for.
2466 */
2467 const getTerms = attribute => {
2468 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2469 path: `wc/store/v1/products/attributes/${attribute}/terms`
2470 });
2471 };
2472
2473 /**
2474 * Get product tag query requests for the Store API.
2475 *
2476 * @param {Object} request A query object with the list of selected products and search term.
2477 * @param {Array} request.selected Currently selected tags.
2478 * @param {string} request.search Search string.
2479 */
2480 const getProductTagsRequests = ({
2481 selected = [],
2482 search
2483 }) => {
2484 const limitTags = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSetting)('limitTags', false);
2485 const requests = [(0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(`wc/store/v1/products/tags`, {
2486 per_page: limitTags ? 100 : 0,
2487 orderby: limitTags ? 'count' : 'name',
2488 order: limitTags ? 'desc' : 'asc',
2489 search
2490 })];
2491
2492 // If we have a large catalog, we might not get all selected products in the first page.
2493 if (limitTags && selected.length) {
2494 requests.push((0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(`wc/store/v1/products/tags`, {
2495 include: selected
2496 }));
2497 }
2498 return requests;
2499 };
2500
2501 /**
2502 * Get a promise that resolves to a list of tags from the Store API.
2503 *
2504 * @param {Object} props A query object with the list of selected products and search term.
2505 * @param {Array} props.selected
2506 * @param {string} props.search
2507 */
2508 const getProductTags = ({
2509 selected = [],
2510 search
2511 }) => {
2512 const requests = getProductTagsRequests({
2513 selected,
2514 search
2515 });
2516 return Promise.all(requests.map(path => _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2517 path
2518 }))).then(data => {
2519 const flatData = data.flat();
2520 return uniqBy(flatData, item => item.id);
2521 });
2522 };
2523
2524 /**
2525 * Get a promise that resolves to a list of category objects from the Store API.
2526 *
2527 * @param {Object} queryArgs Query args to pass in.
2528 */
2529 const getCategories = queryArgs => {
2530 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2531 path: (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(`wc/store/v1/products/categories`, {
2532 per_page: 0,
2533 ...queryArgs
2534 })
2535 });
2536 };
2537
2538 /**
2539 * Get a promise that resolves to a category object from the API.
2540 *
2541 * @param {number} categoryId Id of the product to retrieve.
2542 */
2543 const getCategory = categoryId => {
2544 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2545 path: `wc/store/v1/products/categories/${categoryId}`
2546 });
2547 };
2548
2549 /**
2550 * Get a promise that resolves to a list of variation objects from the Store API.
2551 *
2552 * @param {number} product Product ID.
2553 */
2554 const getProductVariations = product => {
2555 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2556 path: (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(`wc/store/v1/products`, {
2557 per_page: 0,
2558 type: 'variation',
2559 parent: product
2560 })
2561 });
2562 };
2563
2564 /**
2565 * Given a page object and an array of page, format the title.
2566 *
2567 * @param {Object} page Page object.
2568 * @param {Object} page.title Page title object.
2569 * @param {string} page.title.raw Page title.
2570 * @param {string} page.slug Page slug.
2571 * @param {Array} pages Array of all pages.
2572 * @return {string} Formatted page title to display.
2573 */
2574 const formatTitle = (page, pages) => {
2575 if (!page.title.raw) {
2576 return page.slug;
2577 }
2578 const isUnique = pages.filter(p => p.title.raw === page.title.raw).length === 1;
2579 return page.title.raw + (!isUnique ? ` - ${page.slug}` : '');
2580 };
2581
2582 /***/ }),
2583
2584 /***/ "./assets/js/hocs/with-searched-categories.tsx":
2585 /*!*****************************************************!*\
2586 !*** ./assets/js/hocs/with-searched-categories.tsx ***!
2587 \*****************************************************/
2588 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2589
2590 "use strict";
2591 __webpack_require__.r(__webpack_exports__);
2592 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2593 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2594 /* harmony export */ });
2595 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2596 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2597 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
2598 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
2599 /* harmony import */ var _woocommerce_editor_components_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/editor-components/utils */ "./assets/js/editor-components/utils/index.js");
2600 /* harmony import */ var _base_utils_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/utils/errors */ "./assets/js/base/utils/errors.ts");
2601
2602 /**
2603 * External dependencies
2604 */
2605
2606
2607 /**
2608 * Internal dependencies
2609 */
2610
2611 /**
2612 * A higher order component that enhances the provided component with categories from a search query.
2613 */
2614 const withSearchedCategories = OriginalComponent => {
2615 return ({
2616 selected,
2617 ...props
2618 }) => {
2619 const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
2620 const [error, setError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
2621 const [categoriesList, setCategoriesList] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
2622 const setErrorState = async e => {
2623 const formattedError = await (0,_base_utils_errors__WEBPACK_IMPORTED_MODULE_2__.formatError)(e);
2624 setError(formattedError);
2625 setIsLoading(false);
2626 };
2627 const selectedRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(selected);
2628 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
2629 (0,_woocommerce_editor_components_utils__WEBPACK_IMPORTED_MODULE_3__.getCategories)({
2630 selected: selectedRef.current
2631 }).then(results => {
2632 setCategoriesList(results);
2633 setIsLoading(false);
2634 }).catch(setErrorState);
2635 }, [selectedRef]);
2636 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(OriginalComponent, {
2637 ...props,
2638 selected: selected,
2639 error: error,
2640 categories: categoriesList,
2641 isLoading: isLoading
2642 });
2643 };
2644 };
2645 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (withSearchedCategories);
2646
2647 /***/ }),
2648
2649 /***/ "./assets/js/previews/grid-block.js":
2650 /*!******************************************!*\
2651 !*** ./assets/js/previews/grid-block.js ***!
2652 \******************************************/
2653 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2654
2655 "use strict";
2656 __webpack_require__.r(__webpack_exports__);
2657 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2658 /* harmony export */ gridBlockPreview: () => (/* binding */ gridBlockPreview)
2659 /* harmony export */ });
2660 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2661 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2662
2663 /**
2664 * External dependencies
2665 */
2666 const gridBlockPreview = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
2667 xmlns: "http://www.w3.org/2000/svg",
2668 fill: "none",
2669 viewBox: "0 0 230 250",
2670 style: {
2671 width: '100%'
2672 }
2673 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("title", null, "Grid Block Preview"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2674 width: "65.374",
2675 height: "65.374",
2676 x: ".162",
2677 y: ".779",
2678 fill: "#E1E3E6",
2679 rx: "3"
2680 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2681 width: "47.266",
2682 height: "5.148",
2683 x: "9.216",
2684 y: "76.153",
2685 fill: "#E1E3E6",
2686 rx: "2.574"
2687 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2688 width: "62.8",
2689 height: "15",
2690 x: "1.565",
2691 y: "101.448",
2692 fill: "#E1E3E6",
2693 rx: "5"
2694 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2695 width: "65.374",
2696 height: "65.374",
2697 x: ".162",
2698 y: "136.277",
2699 fill: "#E1E3E6",
2700 rx: "3"
2701 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2702 width: "47.266",
2703 height: "5.148",
2704 x: "9.216",
2705 y: "211.651",
2706 fill: "#E1E3E6",
2707 rx: "2.574"
2708 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2709 width: "62.8",
2710 height: "15",
2711 x: "1.565",
2712 y: "236.946",
2713 fill: "#E1E3E6",
2714 rx: "5"
2715 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2716 width: "65.374",
2717 height: "65.374",
2718 x: "82.478",
2719 y: ".779",
2720 fill: "#E1E3E6",
2721 rx: "3"
2722 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2723 width: "47.266",
2724 height: "5.148",
2725 x: "91.532",
2726 y: "76.153",
2727 fill: "#E1E3E6",
2728 rx: "2.574"
2729 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2730 width: "62.8",
2731 height: "15",
2732 x: "83.882",
2733 y: "101.448",
2734 fill: "#E1E3E6",
2735 rx: "5"
2736 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2737 width: "65.374",
2738 height: "65.374",
2739 x: "82.478",
2740 y: "136.277",
2741 fill: "#E1E3E6",
2742 rx: "3"
2743 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2744 width: "47.266",
2745 height: "5.148",
2746 x: "91.532",
2747 y: "211.651",
2748 fill: "#E1E3E6",
2749 rx: "2.574"
2750 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2751 width: "62.8",
2752 height: "15",
2753 x: "83.882",
2754 y: "236.946",
2755 fill: "#E1E3E6",
2756 rx: "5"
2757 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2758 width: "65.374",
2759 height: "65.374",
2760 x: "164.788",
2761 y: ".779",
2762 fill: "#E1E3E6",
2763 rx: "3"
2764 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2765 width: "47.266",
2766 height: "5.148",
2767 x: "173.843",
2768 y: "76.153",
2769 fill: "#E1E3E6",
2770 rx: "2.574"
2771 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2772 width: "62.8",
2773 height: "15",
2774 x: "166.192",
2775 y: "101.448",
2776 fill: "#E1E3E6",
2777 rx: "5"
2778 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2779 width: "65.374",
2780 height: "65.374",
2781 x: "164.788",
2782 y: "136.277",
2783 fill: "#E1E3E6",
2784 rx: "3"
2785 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2786 width: "47.266",
2787 height: "5.148",
2788 x: "173.843",
2789 y: "211.651",
2790 fill: "#E1E3E6",
2791 rx: "2.574"
2792 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2793 width: "62.8",
2794 height: "15",
2795 x: "166.192",
2796 y: "236.946",
2797 fill: "#E1E3E6",
2798 rx: "5"
2799 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2800 width: "6.177",
2801 height: "6.177",
2802 x: "13.283",
2803 y: "86.301",
2804 fill: "#E1E3E6",
2805 rx: "3"
2806 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2807 width: "6.177",
2808 height: "6.177",
2809 x: "21.498",
2810 y: "86.301",
2811 fill: "#E1E3E6",
2812 rx: "3"
2813 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2814 width: "6.177",
2815 height: "6.177",
2816 x: "29.713",
2817 y: "86.301",
2818 fill: "#E1E3E6",
2819 rx: "3"
2820 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2821 width: "6.177",
2822 height: "6.177",
2823 x: "37.927",
2824 y: "86.301",
2825 fill: "#E1E3E6",
2826 rx: "3"
2827 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2828 width: "6.177",
2829 height: "6.177",
2830 x: "46.238",
2831 y: "86.301",
2832 fill: "#E1E3E6",
2833 rx: "3"
2834 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2835 width: "6.177",
2836 height: "6.177",
2837 x: "95.599",
2838 y: "86.301",
2839 fill: "#E1E3E6",
2840 rx: "3"
2841 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2842 width: "6.177",
2843 height: "6.177",
2844 x: "103.814",
2845 y: "86.301",
2846 fill: "#E1E3E6",
2847 rx: "3"
2848 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2849 width: "6.177",
2850 height: "6.177",
2851 x: "112.029",
2852 y: "86.301",
2853 fill: "#E1E3E6",
2854 rx: "3"
2855 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2856 width: "6.177",
2857 height: "6.177",
2858 x: "120.243",
2859 y: "86.301",
2860 fill: "#E1E3E6",
2861 rx: "3"
2862 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2863 width: "6.177",
2864 height: "6.177",
2865 x: "128.554",
2866 y: "86.301",
2867 fill: "#E1E3E6",
2868 rx: "3"
2869 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2870 width: "6.177",
2871 height: "6.177",
2872 x: "177.909",
2873 y: "86.301",
2874 fill: "#E1E3E6",
2875 rx: "3"
2876 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2877 width: "6.177",
2878 height: "6.177",
2879 x: "186.124",
2880 y: "86.301",
2881 fill: "#E1E3E6",
2882 rx: "3"
2883 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2884 width: "6.177",
2885 height: "6.177",
2886 x: "194.339",
2887 y: "86.301",
2888 fill: "#E1E3E6",
2889 rx: "3"
2890 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2891 width: "6.177",
2892 height: "6.177",
2893 x: "202.553",
2894 y: "86.301",
2895 fill: "#E1E3E6",
2896 rx: "3"
2897 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2898 width: "6.177",
2899 height: "6.177",
2900 x: "210.864",
2901 y: "86.301",
2902 fill: "#E1E3E6",
2903 rx: "3"
2904 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2905 width: "6.177",
2906 height: "6.177",
2907 x: "13.283",
2908 y: "221.798",
2909 fill: "#E1E3E6",
2910 rx: "3"
2911 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2912 width: "6.177",
2913 height: "6.177",
2914 x: "21.498",
2915 y: "221.798",
2916 fill: "#E1E3E6",
2917 rx: "3"
2918 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2919 width: "6.177",
2920 height: "6.177",
2921 x: "29.713",
2922 y: "221.798",
2923 fill: "#E1E3E6",
2924 rx: "3"
2925 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2926 width: "6.177",
2927 height: "6.177",
2928 x: "37.927",
2929 y: "221.798",
2930 fill: "#E1E3E6",
2931 rx: "3"
2932 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2933 width: "6.177",
2934 height: "6.177",
2935 x: "46.238",
2936 y: "221.798",
2937 fill: "#E1E3E6",
2938 rx: "3"
2939 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2940 width: "6.177",
2941 height: "6.177",
2942 x: "95.599",
2943 y: "221.798",
2944 fill: "#E1E3E6",
2945 rx: "3"
2946 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2947 width: "6.177",
2948 height: "6.177",
2949 x: "103.814",
2950 y: "221.798",
2951 fill: "#E1E3E6",
2952 rx: "3"
2953 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2954 width: "6.177",
2955 height: "6.177",
2956 x: "112.029",
2957 y: "221.798",
2958 fill: "#E1E3E6",
2959 rx: "3"
2960 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2961 width: "6.177",
2962 height: "6.177",
2963 x: "120.243",
2964 y: "221.798",
2965 fill: "#E1E3E6",
2966 rx: "3"
2967 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2968 width: "6.177",
2969 height: "6.177",
2970 x: "128.554",
2971 y: "221.798",
2972 fill: "#E1E3E6",
2973 rx: "3"
2974 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2975 width: "6.177",
2976 height: "6.177",
2977 x: "177.909",
2978 y: "221.798",
2979 fill: "#E1E3E6",
2980 rx: "3"
2981 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2982 width: "6.177",
2983 height: "6.177",
2984 x: "186.124",
2985 y: "221.798",
2986 fill: "#E1E3E6",
2987 rx: "3"
2988 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2989 width: "6.177",
2990 height: "6.177",
2991 x: "194.339",
2992 y: "221.798",
2993 fill: "#E1E3E6",
2994 rx: "3"
2995 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2996 width: "6.177",
2997 height: "6.177",
2998 x: "202.553",
2999 y: "221.798",
3000 fill: "#E1E3E6",
3001 rx: "3"
3002 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
3003 width: "6.177",
3004 height: "6.177",
3005 x: "210.864",
3006 y: "221.798",
3007 fill: "#E1E3E6",
3008 rx: "3"
3009 }));
3010
3011 /***/ }),
3012
3013 /***/ "./assets/js/settings/blocks/constants.ts":
3014 /*!************************************************!*\
3015 !*** ./assets/js/settings/blocks/constants.ts ***!
3016 \************************************************/
3017 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3018
3019 "use strict";
3020 __webpack_require__.r(__webpack_exports__);
3021 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3022 /* harmony export */ ADDITIONAL_FIELDS_KEYS: () => (/* binding */ ADDITIONAL_FIELDS_KEYS),
3023 /* harmony export */ ADDRESS_FIELDS_KEYS: () => (/* binding */ ADDRESS_FIELDS_KEYS),
3024 /* harmony export */ ALLOWED_COUNTRIES: () => (/* binding */ ALLOWED_COUNTRIES),
3025 /* harmony export */ ALLOWED_STATES: () => (/* binding */ ALLOWED_STATES),
3026 /* harmony export */ CART_PAGE_ID: () => (/* binding */ CART_PAGE_ID),
3027 /* harmony export */ CART_URL: () => (/* binding */ CART_URL),
3028 /* harmony export */ CHECKOUT_PAGE_ID: () => (/* binding */ CHECKOUT_PAGE_ID),
3029 /* harmony export */ CHECKOUT_URL: () => (/* binding */ CHECKOUT_URL),
3030 /* harmony export */ CONTACT_FIELDS_KEYS: () => (/* binding */ CONTACT_FIELDS_KEYS),
3031 /* harmony export */ COUNTRY_LOCALE: () => (/* binding */ COUNTRY_LOCALE),
3032 /* harmony export */ LOCAL_PICKUP_ENABLED: () => (/* binding */ LOCAL_PICKUP_ENABLED),
3033 /* harmony export */ LOGIN_URL: () => (/* binding */ LOGIN_URL),
3034 /* harmony export */ PRIVACY_PAGE_NAME: () => (/* binding */ PRIVACY_PAGE_NAME),
3035 /* harmony export */ PRIVACY_URL: () => (/* binding */ PRIVACY_URL),
3036 /* harmony export */ SHIPPING_COUNTRIES: () => (/* binding */ SHIPPING_COUNTRIES),
3037 /* harmony export */ SHIPPING_STATES: () => (/* binding */ SHIPPING_STATES),
3038 /* harmony export */ SHOP_URL: () => (/* binding */ SHOP_URL),
3039 /* harmony export */ TERMS_PAGE_NAME: () => (/* binding */ TERMS_PAGE_NAME),
3040 /* harmony export */ TERMS_URL: () => (/* binding */ TERMS_URL),
3041 /* harmony export */ WC_BLOCKS_BUILD_URL: () => (/* binding */ WC_BLOCKS_BUILD_URL),
3042 /* harmony export */ WC_BLOCKS_IMAGE_URL: () => (/* binding */ WC_BLOCKS_IMAGE_URL),
3043 /* harmony export */ WC_BLOCKS_PHASE: () => (/* binding */ WC_BLOCKS_PHASE),
3044 /* harmony export */ blocksConfig: () => (/* binding */ blocksConfig)
3045 /* harmony export */ });
3046 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
3047 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__);
3048 var _STORE_PAGES$shop, _STORE_PAGES$checkout, _STORE_PAGES$checkout2, _STORE_PAGES$privacy, _STORE_PAGES$privacy2, _STORE_PAGES$terms, _STORE_PAGES$terms2, _STORE_PAGES$cart, _STORE_PAGES$cart2, _STORE_PAGES$myaccoun;
3049 /**
3050 * External dependencies
3051 */
3052
3053 const blocksConfig = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('wcBlocksConfig', {
3054 buildPhase: 1,
3055 pluginUrl: '',
3056 productCount: 0,
3057 defaultAvatar: '',
3058 restApiRoutes: {},
3059 wordCountType: 'words'
3060 });
3061 const WC_BLOCKS_IMAGE_URL = blocksConfig.pluginUrl + 'assets/images/';
3062 const WC_BLOCKS_BUILD_URL = blocksConfig.pluginUrl + 'assets/client/blocks/';
3063 const WC_BLOCKS_PHASE = blocksConfig.buildPhase;
3064 const SHOP_URL = (_STORE_PAGES$shop = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.shop) === null || _STORE_PAGES$shop === void 0 ? void 0 : _STORE_PAGES$shop.permalink;
3065 const CHECKOUT_PAGE_ID = (_STORE_PAGES$checkout = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.checkout) === null || _STORE_PAGES$checkout === void 0 ? void 0 : _STORE_PAGES$checkout.id;
3066 const CHECKOUT_URL = (_STORE_PAGES$checkout2 = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.checkout) === null || _STORE_PAGES$checkout2 === void 0 ? void 0 : _STORE_PAGES$checkout2.permalink;
3067 const PRIVACY_URL = (_STORE_PAGES$privacy = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.privacy) === null || _STORE_PAGES$privacy === void 0 ? void 0 : _STORE_PAGES$privacy.permalink;
3068 const PRIVACY_PAGE_NAME = (_STORE_PAGES$privacy2 = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.privacy) === null || _STORE_PAGES$privacy2 === void 0 ? void 0 : _STORE_PAGES$privacy2.title;
3069 const TERMS_URL = (_STORE_PAGES$terms = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.terms) === null || _STORE_PAGES$terms === void 0 ? void 0 : _STORE_PAGES$terms.permalink;
3070 const TERMS_PAGE_NAME = (_STORE_PAGES$terms2 = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.terms) === null || _STORE_PAGES$terms2 === void 0 ? void 0 : _STORE_PAGES$terms2.title;
3071 const CART_PAGE_ID = (_STORE_PAGES$cart = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.cart) === null || _STORE_PAGES$cart === void 0 ? void 0 : _STORE_PAGES$cart.id;
3072 const CART_URL = (_STORE_PAGES$cart2 = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.cart) === null || _STORE_PAGES$cart2 === void 0 ? void 0 : _STORE_PAGES$cart2.permalink;
3073 const LOGIN_URL = (_STORE_PAGES$myaccoun = _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.myaccount) !== null && _STORE_PAGES$myaccoun !== void 0 && _STORE_PAGES$myaccoun.permalink ? _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.STORE_PAGES.myaccount.permalink : (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('wpLoginUrl', '/wp-login.php');
3074 const LOCAL_PICKUP_ENABLED = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('localPickupEnabled', false);
3075 // Contains country names.
3076 const countries = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('countries', {});
3077
3078 // Contains country settings.
3079 const countryData = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('countryData', {});
3080 const ALLOWED_COUNTRIES = Object.fromEntries(Object.keys(countryData).filter(countryCode => {
3081 return countryData[countryCode].allowBilling === true;
3082 }).map(countryCode => {
3083 return [countryCode, countries[countryCode] || ''];
3084 }));
3085 const ALLOWED_STATES = Object.fromEntries(Object.keys(countryData).filter(countryCode => {
3086 return countryData[countryCode].allowBilling === true;
3087 }).map(countryCode => {
3088 return [countryCode, countryData[countryCode].states || []];
3089 }));
3090 const SHIPPING_COUNTRIES = Object.fromEntries(Object.keys(countryData).filter(countryCode => {
3091 return countryData[countryCode].allowShipping === true;
3092 }).map(countryCode => {
3093 return [countryCode, countries[countryCode] || ''];
3094 }));
3095 const SHIPPING_STATES = Object.fromEntries(Object.keys(countryData).filter(countryCode => {
3096 return countryData[countryCode].allowShipping === true;
3097 }).map(countryCode => {
3098 return [countryCode, countryData[countryCode].states || []];
3099 }));
3100 const COUNTRY_LOCALE = Object.fromEntries(Object.keys(countryData).map(countryCode => {
3101 return [countryCode, countryData[countryCode].locale || []];
3102 }));
3103 const defaultFieldsLocations = {
3104 address: ['first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'postcode', 'country', 'state', 'phone'],
3105 contact: ['email'],
3106 additional: []
3107 };
3108 const ADDRESS_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).address;
3109 const CONTACT_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).contact;
3110 const ADDITIONAL_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).additional;
3111
3112 /***/ }),
3113
3114 /***/ "./assets/js/settings/blocks/feature-flags.ts":
3115 /*!****************************************************!*\
3116 !*** ./assets/js/settings/blocks/feature-flags.ts ***!
3117 \****************************************************/
3118 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3119
3120 "use strict";
3121 __webpack_require__.r(__webpack_exports__);
3122 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3123 /* harmony export */ isExperimentalBuild: () => (/* binding */ isExperimentalBuild),
3124 /* harmony export */ isFeaturePluginBuild: () => (/* binding */ isFeaturePluginBuild),
3125 /* harmony export */ registerExperimentalBlockType: () => (/* binding */ registerExperimentalBlockType),
3126 /* harmony export */ registerFeaturePluginBlockType: () => (/* binding */ registerFeaturePluginBlockType)
3127 /* harmony export */ });
3128 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
3129 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
3130 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./assets/js/settings/blocks/constants.ts");
3131 /**
3132 * External dependencies
3133 */
3134
3135 /**
3136 * Internal dependencies
3137 */
3138
3139
3140 /**
3141 * Registers a new experimental block provided a unique name and an object defining its
3142 * behavior. Once registered, the block is made available as an option to any
3143 * editor interface where blocks are implemented.
3144 */
3145 const registerExperimentalBlockType = (blockNameOrMetadata, settings) => {
3146 if (_constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 2) {
3147 return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(blockNameOrMetadata, settings);
3148 }
3149 };
3150
3151 /**
3152 * Registers a new feature plugin block provided a unique name and an object
3153 * defining its behavior. Once registered, the block is made available as an
3154 * option to any editor interface where blocks are implemented.
3155 */
3156 const registerFeaturePluginBlockType = (blockNameOrMetadata, settings) => {
3157 if (_constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 1) {
3158 return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(blockNameOrMetadata, settings);
3159 }
3160 };
3161
3162 /**
3163 * Checks if we're executing the code in an experimental build mode.
3164 *
3165 * @return {boolean} True if this is an experimental build, false otherwise.
3166 */
3167 const isExperimentalBuild = () => _constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 2;
3168
3169 /**
3170 * Checks if we're executing the code in an feature plugin or experimental build mode.
3171 *
3172 * @return {boolean} True if this is an experimental or feature plugin build, false otherwise.
3173 */
3174 const isFeaturePluginBuild = () => _constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 1;
3175
3176 /***/ }),
3177
3178 /***/ "./assets/js/settings/blocks/index.ts":
3179 /*!********************************************!*\
3180 !*** ./assets/js/settings/blocks/index.ts ***!
3181 \********************************************/
3182 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3183
3184 "use strict";
3185 __webpack_require__.r(__webpack_exports__);
3186 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3187 /* harmony export */ ADDITIONAL_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ADDITIONAL_FIELDS_KEYS),
3188 /* harmony export */ ADDRESS_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ADDRESS_FIELDS_KEYS),
3189 /* harmony export */ ALLOWED_COUNTRIES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ALLOWED_COUNTRIES),
3190 /* harmony export */ ALLOWED_STATES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ALLOWED_STATES),
3191 /* harmony export */ CART_PAGE_ID: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CART_PAGE_ID),
3192 /* harmony export */ CART_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CART_URL),
3193 /* harmony export */ CHECKOUT_PAGE_ID: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CHECKOUT_PAGE_ID),
3194 /* harmony export */ CHECKOUT_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CHECKOUT_URL),
3195 /* harmony export */ CONTACT_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CONTACT_FIELDS_KEYS),
3196 /* harmony export */ COUNTRY_LOCALE: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.COUNTRY_LOCALE),
3197 /* harmony export */ LOCAL_PICKUP_ENABLED: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.LOCAL_PICKUP_ENABLED),
3198 /* harmony export */ LOGIN_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.LOGIN_URL),
3199 /* harmony export */ PRIVACY_PAGE_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.PRIVACY_PAGE_NAME),
3200 /* harmony export */ PRIVACY_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.PRIVACY_URL),
3201 /* harmony export */ SHIPPING_COUNTRIES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHIPPING_COUNTRIES),
3202 /* harmony export */ SHIPPING_STATES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHIPPING_STATES),
3203 /* harmony export */ SHOP_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHOP_URL),
3204 /* harmony export */ TERMS_PAGE_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.TERMS_PAGE_NAME),
3205 /* harmony export */ TERMS_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.TERMS_URL),
3206 /* harmony export */ WC_BLOCKS_BUILD_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_BUILD_URL),
3207 /* harmony export */ WC_BLOCKS_IMAGE_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_IMAGE_URL),
3208 /* harmony export */ WC_BLOCKS_PHASE: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_PHASE),
3209 /* harmony export */ blocksConfig: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.blocksConfig),
3210 /* harmony export */ isExperimentalBuild: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.isExperimentalBuild),
3211 /* harmony export */ isFeaturePluginBuild: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.isFeaturePluginBuild),
3212 /* harmony export */ registerExperimentalBlockType: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.registerExperimentalBlockType),
3213 /* harmony export */ registerFeaturePluginBlockType: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.registerFeaturePluginBlockType)
3214 /* harmony export */ });
3215 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./assets/js/settings/blocks/constants.ts");
3216 /* harmony import */ var _feature_flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./feature-flags */ "./assets/js/settings/blocks/feature-flags.ts");
3217 /**
3218 * Internal dependencies
3219 */
3220
3221
3222
3223 /***/ }),
3224
3225 /***/ "./assets/js/utils/array-operations.ts":
3226 /*!*********************************************!*\
3227 !*** ./assets/js/utils/array-operations.ts ***!
3228 \*********************************************/
3229 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3230
3231 "use strict";
3232 __webpack_require__.r(__webpack_exports__);
3233 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3234 /* harmony export */ arrayDifferenceBy: () => (/* binding */ arrayDifferenceBy),
3235 /* harmony export */ arrayUnionBy: () => (/* binding */ arrayUnionBy)
3236 /* harmony export */ });
3237 /**
3238 * Returns the difference between two arrays (A - B)
3239 */
3240 function arrayDifferenceBy(a, b, key) {
3241 const keys = new Set(b.map(item => item[key]));
3242 return a.filter(item => !keys.has(item[key]));
3243 }
3244
3245 /**
3246 * Returns the union of two arrays (A ∪ B)
3247 */
3248 function arrayUnionBy(a, b, key) {
3249 const difference = arrayDifferenceBy(b, a, key);
3250 return [...a, ...difference];
3251 }
3252
3253 /***/ }),
3254
3255 /***/ "./assets/js/utils/products.ts":
3256 /*!*************************************!*\
3257 !*** ./assets/js/utils/products.ts ***!
3258 \*************************************/
3259 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3260
3261 "use strict";
3262 __webpack_require__.r(__webpack_exports__);
3263 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3264 /* harmony export */ convertProductCategoryResponseItemToSearchItem: () => (/* binding */ convertProductCategoryResponseItemToSearchItem),
3265 /* harmony export */ convertProductResponseItemToSearchItem: () => (/* binding */ convertProductResponseItemToSearchItem),
3266 /* harmony export */ getImageIdFromProduct: () => (/* binding */ getImageIdFromProduct),
3267 /* harmony export */ getImageSrcFromProduct: () => (/* binding */ getImageSrcFromProduct)
3268 /* harmony export */ });
3269 /**
3270 * External dependencies
3271 */
3272
3273 /**
3274 * Converts a Product object into a shape compatible with the `SearchListControl`
3275 */
3276 const convertProductResponseItemToSearchItem = product => {
3277 const {
3278 id,
3279 name,
3280 parent
3281 } = product;
3282 return {
3283 id,
3284 name,
3285 parent,
3286 breadcrumbs: [],
3287 children: [],
3288 details: product,
3289 value: product.slug
3290 };
3291 };
3292
3293 /**
3294 * Converts a Product Category object into a shape compatible with the `SearchListControl`
3295 */
3296 const convertProductCategoryResponseItemToSearchItem = category => {
3297 const {
3298 id,
3299 name,
3300 parent,
3301 count
3302 } = category;
3303 return {
3304 id,
3305 name,
3306 parent,
3307 count,
3308 breadcrumbs: [],
3309 children: [],
3310 details: category,
3311 value: category.slug
3312 };
3313 };
3314
3315 /**
3316 * Get the src of the first image attached to a product (the featured image).
3317 */
3318 function getImageSrcFromProduct(product) {
3319 if (!product || !product.images || !product.images.length) {
3320 return '';
3321 }
3322 return product.images[0].src || '';
3323 }
3324
3325 /**
3326 * Get the ID of the first image attached to a product (the featured image).
3327 */
3328 function getImageIdFromProduct(product) {
3329 if (!product || !product.images || !product.images.length) {
3330 return 0;
3331 }
3332 return product.images[0].id || 0;
3333 }
3334
3335 /***/ }),
3336
3337 /***/ "./assets/js/utils/shared-attributes.js":
3338 /*!**********************************************!*\
3339 !*** ./assets/js/utils/shared-attributes.js ***!
3340 \**********************************************/
3341 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3342
3343 "use strict";
3344 __webpack_require__.r(__webpack_exports__);
3345 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3346 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
3347 /* harmony export */ sharedAttributeBlockTypes: () => (/* binding */ sharedAttributeBlockTypes)
3348 /* harmony export */ });
3349 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
3350 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__);
3351 /**
3352 * External dependencies
3353 */
3354
3355 const sharedAttributeBlockTypes = ['woocommerce/product-best-sellers', 'woocommerce/product-category', 'woocommerce/product-new', 'woocommerce/product-on-sale', 'woocommerce/product-top-rated'];
3356 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
3357 /**
3358 * Number of columns.
3359 */
3360 columns: {
3361 type: 'number',
3362 default: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('defaultColumns', 3)
3363 },
3364 /**
3365 * Number of rows.
3366 */
3367 rows: {
3368 type: 'number',
3369 default: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('defaultRows', 3)
3370 },
3371 /**
3372 * How to align cart buttons.
3373 */
3374 alignButtons: {
3375 type: 'boolean',
3376 default: false
3377 },
3378 /**
3379 * Product category, used to display only products in the given categories.
3380 */
3381 categories: {
3382 type: 'array',
3383 default: []
3384 },
3385 /**
3386 * Product category operator, used to restrict to products in all or any selected categories.
3387 */
3388 catOperator: {
3389 type: 'string',
3390 default: 'any'
3391 },
3392 /**
3393 * Content visibility setting
3394 */
3395 contentVisibility: {
3396 type: 'object',
3397 default: {
3398 image: true,
3399 title: true,
3400 price: true,
3401 rating: true,
3402 button: true
3403 }
3404 },
3405 /**
3406 * Are we previewing?
3407 */
3408 isPreview: {
3409 type: 'boolean',
3410 default: false
3411 },
3412 /**
3413 * Whether to display in stock, out of stock or backorder products.
3414 */
3415 stockStatus: {
3416 type: 'array',
3417 default: Object.keys((0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('stockStatusOptions', []))
3418 }
3419 });
3420
3421 /***/ }),
3422
3423 /***/ "./assets/js/blocks/product-category/editor.scss":
3424 /*!*******************************************************!*\
3425 !*** ./assets/js/blocks/product-category/editor.scss ***!
3426 \*******************************************************/
3427 /***/ (() => {
3428
3429
3430
3431 /***/ }),
3432
3433 /***/ "./assets/js/editor-components/product-category-control/style.scss":
3434 /*!*************************************************************************!*\
3435 !*** ./assets/js/editor-components/product-category-control/style.scss ***!
3436 \*************************************************************************/
3437 /***/ (() => {
3438
3439
3440
3441 /***/ }),
3442
3443 /***/ "./assets/js/editor-components/search-list-control/style.scss":
3444 /*!********************************************************************!*\
3445 !*** ./assets/js/editor-components/search-list-control/style.scss ***!
3446 \********************************************************************/
3447 /***/ (() => {
3448
3449
3450
3451 /***/ }),
3452
3453 /***/ "./assets/js/editor-components/tag/editor.scss":
3454 /*!*****************************************************!*\
3455 !*** ./assets/js/editor-components/tag/editor.scss ***!
3456 \*****************************************************/
3457 /***/ (() => {
3458
3459
3460
3461 /***/ }),
3462
3463 /***/ "react":
3464 /*!************************!*\
3465 !*** external "React" ***!
3466 \************************/
3467 /***/ ((module) => {
3468
3469 "use strict";
3470 module.exports = window["React"];
3471
3472 /***/ }),
3473
3474 /***/ "@woocommerce/settings":
3475 /*!************************************!*\
3476 !*** external ["wc","wcSettings"] ***!
3477 \************************************/
3478 /***/ ((module) => {
3479
3480 "use strict";
3481 module.exports = window["wc"]["wcSettings"];
3482
3483 /***/ }),
3484
3485 /***/ "@wordpress/api-fetch":
3486 /*!**********************************!*\
3487 !*** external ["wp","apiFetch"] ***!
3488 \**********************************/
3489 /***/ ((module) => {
3490
3491 "use strict";
3492 module.exports = window["wp"]["apiFetch"];
3493
3494 /***/ }),
3495
3496 /***/ "@wordpress/block-editor":
3497 /*!*************************************!*\
3498 !*** external ["wp","blockEditor"] ***!
3499 \*************************************/
3500 /***/ ((module) => {
3501
3502 "use strict";
3503 module.exports = window["wp"]["blockEditor"];
3504
3505 /***/ }),
3506
3507 /***/ "@wordpress/blocks":
3508 /*!********************************!*\
3509 !*** external ["wp","blocks"] ***!
3510 \********************************/
3511 /***/ ((module) => {
3512
3513 "use strict";
3514 module.exports = window["wp"]["blocks"];
3515
3516 /***/ }),
3517
3518 /***/ "@wordpress/components":
3519 /*!************************************!*\
3520 !*** external ["wp","components"] ***!
3521 \************************************/
3522 /***/ ((module) => {
3523
3524 "use strict";
3525 module.exports = window["wp"]["components"];
3526
3527 /***/ }),
3528
3529 /***/ "@wordpress/compose":
3530 /*!*********************************!*\
3531 !*** external ["wp","compose"] ***!
3532 \*********************************/
3533 /***/ ((module) => {
3534
3535 "use strict";
3536 module.exports = window["wp"]["compose"];
3537
3538 /***/ }),
3539
3540 /***/ "@wordpress/element":
3541 /*!*********************************!*\
3542 !*** external ["wp","element"] ***!
3543 \*********************************/
3544 /***/ ((module) => {
3545
3546 "use strict";
3547 module.exports = window["wp"]["element"];
3548
3549 /***/ }),
3550
3551 /***/ "@wordpress/escape-html":
3552 /*!************************************!*\
3553 !*** external ["wp","escapeHtml"] ***!
3554 \************************************/
3555 /***/ ((module) => {
3556
3557 "use strict";
3558 module.exports = window["wp"]["escapeHtml"];
3559
3560 /***/ }),
3561
3562 /***/ "@wordpress/html-entities":
3563 /*!**************************************!*\
3564 !*** external ["wp","htmlEntities"] ***!
3565 \**************************************/
3566 /***/ ((module) => {
3567
3568 "use strict";
3569 module.exports = window["wp"]["htmlEntities"];
3570
3571 /***/ }),
3572
3573 /***/ "@wordpress/i18n":
3574 /*!******************************!*\
3575 !*** external ["wp","i18n"] ***!
3576 \******************************/
3577 /***/ ((module) => {
3578
3579 "use strict";
3580 module.exports = window["wp"]["i18n"];
3581
3582 /***/ }),
3583
3584 /***/ "@wordpress/primitives":
3585 /*!************************************!*\
3586 !*** external ["wp","primitives"] ***!
3587 \************************************/
3588 /***/ ((module) => {
3589
3590 "use strict";
3591 module.exports = window["wp"]["primitives"];
3592
3593 /***/ }),
3594
3595 /***/ "@wordpress/server-side-render":
3596 /*!******************************************!*\
3597 !*** external ["wp","serverSideRender"] ***!
3598 \******************************************/
3599 /***/ ((module) => {
3600
3601 "use strict";
3602 module.exports = window["wp"]["serverSideRender"];
3603
3604 /***/ }),
3605
3606 /***/ "@wordpress/url":
3607 /*!*****************************!*\
3608 !*** external ["wp","url"] ***!
3609 \*****************************/
3610 /***/ ((module) => {
3611
3612 "use strict";
3613 module.exports = window["wp"]["url"];
3614
3615 /***/ }),
3616
3617 /***/ "./assets/js/blocks/product-category/block.json":
3618 /*!******************************************************!*\
3619 !*** ./assets/js/blocks/product-category/block.json ***!
3620 \******************************************************/
3621 /***/ ((module) => {
3622
3623 "use strict";
3624 module.exports = JSON.parse('{"name":"woocommerce/product-category","title":"Products by Category","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of products from your selected categories.","supports":{"align":["wide","full"],"html":false},"attributes":{"columns":{"type":"number","default":3},"rows":{"type":"number","default":3},"alignButtons":{"type":"boolean","default":false},"contentVisibility":{"type":"object","default":{"image":true,"title":true,"price":true,"rating":true,"button":true},"properties":{"image":{"type":"boolean","default":true},"title":{"type":"boolean","default":true},"price":{"type":"boolean","default":true},"rating":{"type":"boolean","default":true},"button":{"type":"boolean","default":true}}},"categories":{"type":"array","default":[]},"catOperator":{"type":"string","default":"any"},"isPreview":{"type":"boolean","default":false},"stockStatus":{"type":"array"},"editMode":{"type":"boolean","default":true},"orderby":{"type":"string","enum":["date","popularity","price_asc","price_desc","rating","title","menu_order"],"default":"date"}},"textdomain":"woocommerce","apiVersion":2,"$schema":"https://schemas.wp.org/trunk/block.json"}');
3625
3626 /***/ })
3627
3628 /******/ });
3629 /************************************************************************/
3630 /******/ // The module cache
3631 /******/ var __webpack_module_cache__ = {};
3632 /******/
3633 /******/ // The require function
3634 /******/ function __webpack_require__(moduleId) {
3635 /******/ // Check if module is in cache
3636 /******/ var cachedModule = __webpack_module_cache__[moduleId];
3637 /******/ if (cachedModule !== undefined) {
3638 /******/ return cachedModule.exports;
3639 /******/ }
3640 /******/ // Create a new module (and put it into the cache)
3641 /******/ var module = __webpack_module_cache__[moduleId] = {
3642 /******/ // no module.id needed
3643 /******/ // no module.loaded needed
3644 /******/ exports: {}
3645 /******/ };
3646 /******/
3647 /******/ // Execute the module function
3648 /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
3649 /******/
3650 /******/ // Return the exports of the module
3651 /******/ return module.exports;
3652 /******/ }
3653 /******/
3654 /******/ // expose the modules object (__webpack_modules__)
3655 /******/ __webpack_require__.m = __webpack_modules__;
3656 /******/
3657 /************************************************************************/
3658 /******/ /* webpack/runtime/chunk loaded */
3659 /******/ (() => {
3660 /******/ var deferred = [];
3661 /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
3662 /******/ if(chunkIds) {
3663 /******/ priority = priority || 0;
3664 /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
3665 /******/ deferred[i] = [chunkIds, fn, priority];
3666 /******/ return;
3667 /******/ }
3668 /******/ var notFulfilled = Infinity;
3669 /******/ for (var i = 0; i < deferred.length; i++) {
3670 /******/ var [chunkIds, fn, priority] = deferred[i];
3671 /******/ var fulfilled = true;
3672 /******/ for (var j = 0; j < chunkIds.length; j++) {
3673 /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
3674 /******/ chunkIds.splice(j--, 1);
3675 /******/ } else {
3676 /******/ fulfilled = false;
3677 /******/ if(priority < notFulfilled) notFulfilled = priority;
3678 /******/ }
3679 /******/ }
3680 /******/ if(fulfilled) {
3681 /******/ deferred.splice(i--, 1)
3682 /******/ var r = fn();
3683 /******/ if (r !== undefined) result = r;
3684 /******/ }
3685 /******/ }
3686 /******/ return result;
3687 /******/ };
3688 /******/ })();
3689 /******/
3690 /******/ /* webpack/runtime/compat get default export */
3691 /******/ (() => {
3692 /******/ // getDefaultExport function for compatibility with non-harmony modules
3693 /******/ __webpack_require__.n = (module) => {
3694 /******/ var getter = module && module.__esModule ?
3695 /******/ () => (module['default']) :
3696 /******/ () => (module);
3697 /******/ __webpack_require__.d(getter, { a: getter });
3698 /******/ return getter;
3699 /******/ };
3700 /******/ })();
3701 /******/
3702 /******/ /* webpack/runtime/define property getters */
3703 /******/ (() => {
3704 /******/ // define getter functions for harmony exports
3705 /******/ __webpack_require__.d = (exports, definition) => {
3706 /******/ for(var key in definition) {
3707 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3708 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3709 /******/ }
3710 /******/ }
3711 /******/ };
3712 /******/ })();
3713 /******/
3714 /******/ /* webpack/runtime/global */
3715 /******/ (() => {
3716 /******/ __webpack_require__.g = (function() {
3717 /******/ if (typeof globalThis === 'object') return globalThis;
3718 /******/ try {
3719 /******/ return this || new Function('return this')();
3720 /******/ } catch (e) {
3721 /******/ if (typeof window === 'object') return window;
3722 /******/ }
3723 /******/ })();
3724 /******/ })();
3725 /******/
3726 /******/ /* webpack/runtime/hasOwnProperty shorthand */
3727 /******/ (() => {
3728 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
3729 /******/ })();
3730 /******/
3731 /******/ /* webpack/runtime/make namespace object */
3732 /******/ (() => {
3733 /******/ // define __esModule on exports
3734 /******/ __webpack_require__.r = (exports) => {
3735 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3736 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3737 /******/ }
3738 /******/ Object.defineProperty(exports, '__esModule', { value: true });
3739 /******/ };
3740 /******/ })();
3741 /******/
3742 /******/ /* webpack/runtime/jsonp chunk loading */
3743 /******/ (() => {
3744 /******/ // no baseURI
3745 /******/
3746 /******/ // object to store loaded and loading chunks
3747 /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
3748 /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
3749 /******/ var installedChunks = {
3750 /******/ "product-category": 0
3751 /******/ };
3752 /******/
3753 /******/ // no chunk on demand loading
3754 /******/
3755 /******/ // no prefetching
3756 /******/
3757 /******/ // no preloaded
3758 /******/
3759 /******/ // no HMR
3760 /******/
3761 /******/ // no HMR manifest
3762 /******/
3763 /******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
3764 /******/
3765 /******/ // install a JSONP callback for chunk loading
3766 /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
3767 /******/ var [chunkIds, moreModules, runtime] = data;
3768 /******/ // add "moreModules" to the modules object,
3769 /******/ // then flag all "chunkIds" as loaded and fire callback
3770 /******/ var moduleId, chunkId, i = 0;
3771 /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
3772 /******/ for(moduleId in moreModules) {
3773 /******/ if(__webpack_require__.o(moreModules, moduleId)) {
3774 /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
3775 /******/ }
3776 /******/ }
3777 /******/ if(runtime) var result = runtime(__webpack_require__);
3778 /******/ }
3779 /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
3780 /******/ for(;i < chunkIds.length; i++) {
3781 /******/ chunkId = chunkIds[i];
3782 /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
3783 /******/ installedChunks[chunkId][0]();
3784 /******/ }
3785 /******/ installedChunks[chunkId] = 0;
3786 /******/ }
3787 /******/ return __webpack_require__.O(result);
3788 /******/ }
3789 /******/
3790 /******/ var chunkLoadingGlobal = self["webpackChunkwebpackWcBlocksJsonp"] = self["webpackChunkwebpackWcBlocksJsonp"] || [];
3791 /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
3792 /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
3793 /******/ })();
3794 /******/
3795 /************************************************************************/
3796 /******/
3797 /******/ // startup
3798 /******/ // Load entry module and return exports
3799 /******/ // This entry module depends on other loaded chunks and execution need to be delayed
3800 /******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["wc-blocks-vendors"], () => (__webpack_require__("./assets/js/blocks/product-category/index.tsx")))
3801 /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
3802 /******/ ((this.wc = this.wc || {}).blocks = this.wc.blocks || {})["product-category"] = __webpack_exports__;
3803 /******/
3804 /******/ })()
3805 ;
3806 //# sourceMappingURL=product-category.js.map