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-new.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-new.js
3425 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-new/block.tsx":
63 /*!************************************************!*\
64 !*** ./assets/js/blocks/product-new/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 */ ProductNewestBlock: () => (/* binding */ ProductNewestBlock),
72 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
73 /* harmony export */ });
74 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
75 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
76 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
77 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
78 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
79 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
80 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
81 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__);
82 /* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/server-side-render */ "@wordpress/server-side-render");
83 /* harmony import */ var _wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_4__);
84 /* 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");
85 /* 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");
86 /* harmony import */ var _woocommerce_editor_components_product_category_control__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @woocommerce/editor-components/product-category-control */ "./assets/js/editor-components/product-category-control/index.tsx");
87 /* harmony import */ var _woocommerce_editor_components_product_stock_control__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @woocommerce/editor-components/product-stock-control */ "./assets/js/editor-components/product-stock-control/index.tsx");
88 /* harmony import */ var _woocommerce_resource_previews__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @woocommerce/resource-previews */ "./assets/js/previews/grid-block.js");
89 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
90 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_5__);
91
92 /**
93 * External dependencies
94 */
95
96
97
98
99
100
101
102
103
104
105
106 /**
107 * Internal dependencies
108 */
109
110 /**
111 * Component to handle edit mode of "Newest Products".
112 */
113 const ProductNewestBlock = ({
114 attributes,
115 name,
116 setAttributes
117 }) => {
118 const {
119 categories,
120 catOperator,
121 columns,
122 contentVisibility,
123 rows,
124 alignButtons,
125 stockStatus,
126 isPreview
127 } = attributes;
128 const getInspectorControls = () => {
129 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, {
130 key: "inspector"
131 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
132 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Layout', 'woocommerce'),
133 initialOpen: true
134 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_grid_layout_control__WEBPACK_IMPORTED_MODULE_6__["default"], {
135 columns: columns,
136 rows: rows,
137 alignButtons: alignButtons,
138 setAttributes: setAttributes,
139 minColumns: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_5__.getSetting)('minColumns', 1),
140 maxColumns: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_5__.getSetting)('maxColumns', 6),
141 minRows: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_5__.getSetting)('minRows', 1),
142 maxRows: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_5__.getSetting)('maxRows', 6)
143 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
144 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Content', 'woocommerce'),
145 initialOpen: true
146 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_grid_content_control__WEBPACK_IMPORTED_MODULE_7__["default"], {
147 settings: contentVisibility,
148 onChange: value => setAttributes({
149 contentVisibility: value
150 })
151 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
152 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Filter by stock status', 'woocommerce'),
153 initialOpen: false
154 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_product_stock_control__WEBPACK_IMPORTED_MODULE_8__["default"], {
155 setAttributes: setAttributes,
156 value: stockStatus
157 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, {
158 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Filter by Product Category', 'woocommerce'),
159 initialOpen: false
160 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_product_category_control__WEBPACK_IMPORTED_MODULE_9__["default"], {
161 selected: categories,
162 onChange: (value = []) => {
163 const ids = value.map(({
164 id
165 }) => id);
166 setAttributes({
167 categories: ids
168 });
169 },
170 operator: catOperator,
171 onOperatorChange: (value = 'any') => setAttributes({
172 catOperator: value
173 })
174 })));
175 };
176 if (isPreview) {
177 return _woocommerce_resource_previews__WEBPACK_IMPORTED_MODULE_10__.gridBlockPreview;
178 }
179 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, getInspectorControls(), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Disabled, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)((_wordpress_server_side_render__WEBPACK_IMPORTED_MODULE_4___default()), {
180 block: name,
181 attributes: attributes
182 })));
183 };
184 ProductNewestBlock.__docgenInfo = {
185 "description": "Component to handle edit mode of \"Newest Products\".",
186 "methods": [],
187 "displayName": "ProductNewestBlock"
188 };
189 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductNewestBlock);
190 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
191 STORYBOOK_REACT_CLASSES["assets/js/blocks/product-new/block.tsx"] = {
192 name: "ProductNewestBlock",
193 docgenInfo: ProductNewestBlock.__docgenInfo,
194 path: "assets/js/blocks/product-new/block.tsx"
195 };
196 }
197
198 /***/ }),
199
200 /***/ "./assets/js/blocks/product-new/edit.tsx":
201 /*!***********************************************!*\
202 !*** ./assets/js/blocks/product-new/edit.tsx ***!
203 \***********************************************/
204 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
205
206 "use strict";
207 __webpack_require__.r(__webpack_exports__);
208 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
209 /* harmony export */ Edit: () => (/* binding */ Edit)
210 /* harmony export */ });
211 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
212 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
213 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
214 /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__);
215 /* harmony import */ var _block__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./block */ "./assets/js/blocks/product-new/block.tsx");
216
217 /**
218 * External dependencies
219 */
220
221
222 /**
223 * Internal dependencies
224 */
225
226 const Edit = props => {
227 const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps)();
228 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
229 ...blockProps
230 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_block__WEBPACK_IMPORTED_MODULE_2__.ProductNewestBlock, {
231 ...props
232 }));
233 };
234 Edit.__docgenInfo = {
235 "description": "",
236 "methods": [],
237 "displayName": "Edit"
238 };
239 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
240 STORYBOOK_REACT_CLASSES["assets/js/blocks/product-new/edit.tsx"] = {
241 name: "Edit",
242 docgenInfo: Edit.__docgenInfo,
243 path: "assets/js/blocks/product-new/edit.tsx"
244 };
245 }
246
247 /***/ }),
248
249 /***/ "./assets/js/blocks/product-new/index.tsx":
250 /*!************************************************!*\
251 !*** ./assets/js/blocks/product-new/index.tsx ***!
252 \************************************************/
253 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
254
255 "use strict";
256 __webpack_require__.r(__webpack_exports__);
257 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
258 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
259 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
260 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
261 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
262 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__);
263 /* 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");
264 /* harmony import */ var _woocommerce_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @woocommerce/icons */ "./assets/js/icons/library/sparkles.tsx");
265 /* harmony import */ var _utils_shared_attributes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/shared-attributes */ "./assets/js/utils/shared-attributes.js");
266 /* harmony import */ var _edit__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./edit */ "./assets/js/blocks/product-new/edit.tsx");
267 /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./block.json */ "./assets/js/blocks/product-new/block.json");
268
269 /**
270 * External dependencies
271 */
272
273
274
275
276
277 /**
278 * Internal dependencies
279 */
280
281
282
283 (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_3__, {
284 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Newest Products', 'woocommerce'),
285 icon: {
286 src: (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], {
287 icon: _woocommerce_icons__WEBPACK_IMPORTED_MODULE_5__["default"],
288 className: "wc-block-editor-components-block-icon wc-block-editor-components-block-icon--sparkles"
289 })
290 },
291 attributes: {
292 ..._utils_shared_attributes__WEBPACK_IMPORTED_MODULE_6__["default"],
293 ..._block_json__WEBPACK_IMPORTED_MODULE_3__.attributes
294 },
295 transforms: {
296 from: [{
297 type: 'block',
298 blocks: _utils_shared_attributes__WEBPACK_IMPORTED_MODULE_6__.sharedAttributeBlockTypes.filter(value => value !== 'woocommerce/product-new'),
299 transform: attributes => (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)('woocommerce/product-new', attributes)
300 }]
301 },
302 /**
303 * Renders and manages the block.
304 *
305 */
306 edit: _edit__WEBPACK_IMPORTED_MODULE_7__.Edit,
307 save() {
308 return null;
309 }
310 });
311
312 /***/ }),
313
314 /***/ "./assets/js/editor-components/error-placeholder/error-message.tsx":
315 /*!*************************************************************************!*\
316 !*** ./assets/js/editor-components/error-placeholder/error-message.tsx ***!
317 \*************************************************************************/
318 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
319
320 "use strict";
321 __webpack_require__.r(__webpack_exports__);
322 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
323 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
324 /* harmony export */ });
325 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
326 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
327 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
328 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
329 /* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/escape-html */ "@wordpress/escape-html");
330 /* harmony import */ var _wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_escape_html__WEBPACK_IMPORTED_MODULE_2__);
331
332 /**
333 * External dependencies
334 */
335
336
337
338 /**
339 * Internal dependencies
340 */
341
342 const getErrorMessage = ({
343 message,
344 type
345 }) => {
346 if (!message) {
347 return (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('An error has prevented the block from being updated.', 'woocommerce');
348 }
349 if (type === 'general') {
350 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)));
351 }
352 if (type === 'api') {
353 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)));
354 }
355 return message;
356 };
357 const ErrorMessage = ({
358 error
359 }) => (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
360 className: "wc-block-error-message"
361 }, getErrorMessage(error));
362 ErrorMessage.__docgenInfo = {
363 "description": "",
364 "methods": [],
365 "displayName": "ErrorMessage",
366 "props": {
367 "error": {
368 "required": true,
369 "tsType": {
370 "name": "ErrorObject"
371 },
372 "description": "The error object."
373 }
374 }
375 };
376 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ErrorMessage);
377 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
378 STORYBOOK_REACT_CLASSES["assets/js/editor-components/error-placeholder/error-message.tsx"] = {
379 name: "ErrorMessage",
380 docgenInfo: ErrorMessage.__docgenInfo,
381 path: "assets/js/editor-components/error-placeholder/error-message.tsx"
382 };
383 }
384
385 /***/ }),
386
387 /***/ "./assets/js/editor-components/grid-content-control/index.tsx":
388 /*!********************************************************************!*\
389 !*** ./assets/js/editor-components/grid-content-control/index.tsx ***!
390 \********************************************************************/
391 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
392
393 "use strict";
394 __webpack_require__.r(__webpack_exports__);
395 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
396 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
397 /* harmony export */ });
398 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
399 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
400 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
401 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
402 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
403 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
404
405 /**
406 * External dependencies
407 */
408
409
410 /**
411 * A combination of toggle controls for content visibility in product grids.
412 *
413 * @param {Object} props Incoming props for the component.
414 * @param {function(any):any} props.onChange
415 * @param {Object} props.settings
416 */
417 const GridContentControl = ({
418 onChange,
419 settings
420 }) => {
421 const {
422 image,
423 button,
424 price,
425 rating,
426 title
427 } = settings;
428 // If `image` is undefined, that might be because it's a block that was
429 // created before the `image` attribute existed, so we default to true.
430 const imageIsVisible = image !== false;
431 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, {
432 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product image', 'woocommerce'),
433 checked: imageIsVisible,
434 onChange: () => onChange({
435 ...settings,
436 image: !imageIsVisible
437 })
438 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
439 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product title', 'woocommerce'),
440 checked: title,
441 onChange: () => onChange({
442 ...settings,
443 title: !title
444 })
445 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
446 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product price', 'woocommerce'),
447 checked: price,
448 onChange: () => onChange({
449 ...settings,
450 price: !price
451 })
452 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
453 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product rating', 'woocommerce'),
454 checked: rating,
455 onChange: () => onChange({
456 ...settings,
457 rating: !rating
458 })
459 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
460 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Add to Cart button', 'woocommerce'),
461 checked: button,
462 onChange: () => onChange({
463 ...settings,
464 button: !button
465 })
466 }));
467 };
468 GridContentControl.__docgenInfo = {
469 "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",
470 "methods": [],
471 "displayName": "GridContentControl",
472 "props": {
473 "onChange": {
474 "required": true,
475 "tsType": {
476 "name": "signature",
477 "type": "function",
478 "raw": "( settings: GridContentSettings ) => void",
479 "signature": {
480 "arguments": [{
481 "name": "settings",
482 "type": {
483 "name": "GridContentSettings"
484 }
485 }],
486 "return": {
487 "name": "void"
488 }
489 }
490 },
491 "description": ""
492 },
493 "settings": {
494 "required": true,
495 "tsType": {
496 "name": "GridContentSettings"
497 },
498 "description": ""
499 }
500 }
501 };
502 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GridContentControl);
503 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
504 STORYBOOK_REACT_CLASSES["assets/js/editor-components/grid-content-control/index.tsx"] = {
505 name: "GridContentControl",
506 docgenInfo: GridContentControl.__docgenInfo,
507 path: "assets/js/editor-components/grid-content-control/index.tsx"
508 };
509 }
510
511 /***/ }),
512
513 /***/ "./assets/js/editor-components/grid-layout-control/index.tsx":
514 /*!*******************************************************************!*\
515 !*** ./assets/js/editor-components/grid-layout-control/index.tsx ***!
516 \*******************************************************************/
517 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
518
519 "use strict";
520 __webpack_require__.r(__webpack_exports__);
521 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
522 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
523 /* harmony export */ });
524 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
525 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
526 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
527 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
528 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
529 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
530
531 /**
532 * External dependencies
533 */
534
535
536 const clamp = (number, boundOne, boundTwo) => {
537 if (!boundTwo) {
538 return Math.max(number, boundOne) === boundOne ? number : boundOne;
539 } else if (Math.min(number, boundOne) === number) {
540 return boundOne;
541 } else if (Math.max(number, boundTwo) === number) {
542 return boundTwo;
543 }
544 return number;
545 };
546 /**
547 * A combination of range controls for product grid layout settings.
548 *
549 * @param {Object} props Incoming props for the component.
550 * @param {number} props.columns
551 * @param {number} props.rows
552 * @param {function(any):any} props.setAttributes Setter for block attributes.
553 * @param {boolean} props.alignButtons
554 * @param {number} props.minColumns
555 * @param {number} props.maxColumns
556 * @param {number} props.minRows
557 * @param {number} props.maxRows
558 */
559 const GridLayoutControl = ({
560 columns,
561 rows,
562 setAttributes,
563 alignButtons,
564 minColumns = 1,
565 maxColumns = 6,
566 minRows = 1,
567 maxRows = 6
568 }) => {
569 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, {
570 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Columns', 'woocommerce'),
571 value: columns,
572 onChange: value => {
573 const newValue = clamp(value, minColumns, maxColumns);
574 setAttributes({
575 columns: Number.isNaN(newValue) ? '' : newValue
576 });
577 },
578 min: minColumns,
579 max: maxColumns
580 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, {
581 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Rows', 'woocommerce'),
582 value: rows,
583 onChange: value => {
584 const newValue = clamp(value, minRows, maxRows);
585 setAttributes({
586 rows: Number.isNaN(newValue) ? '' : newValue
587 });
588 },
589 min: minRows,
590 max: maxRows
591 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, {
592 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Align the last block to the bottom', 'woocommerce'),
593 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'),
594 checked: alignButtons,
595 onChange: () => setAttributes({
596 alignButtons: !alignButtons
597 })
598 }));
599 };
600 GridLayoutControl.__docgenInfo = {
601 "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",
602 "methods": [],
603 "displayName": "GridLayoutControl",
604 "props": {
605 "minColumns": {
606 "defaultValue": {
607 "value": "1",
608 "computed": false
609 },
610 "required": false,
611 "tsType": {
612 "name": "number"
613 },
614 "description": ""
615 },
616 "maxColumns": {
617 "defaultValue": {
618 "value": "6",
619 "computed": false
620 },
621 "required": false,
622 "tsType": {
623 "name": "number"
624 },
625 "description": ""
626 },
627 "minRows": {
628 "defaultValue": {
629 "value": "1",
630 "computed": false
631 },
632 "required": false,
633 "tsType": {
634 "name": "number"
635 },
636 "description": ""
637 },
638 "maxRows": {
639 "defaultValue": {
640 "value": "6",
641 "computed": false
642 },
643 "required": false,
644 "tsType": {
645 "name": "number"
646 },
647 "description": ""
648 },
649 "columns": {
650 "required": true,
651 "tsType": {
652 "name": "number"
653 },
654 "description": ""
655 },
656 "rows": {
657 "required": true,
658 "tsType": {
659 "name": "number"
660 },
661 "description": ""
662 },
663 "setAttributes": {
664 "required": true,
665 "tsType": {
666 "name": "signature",
667 "type": "function",
668 "raw": "( attributes: Record< string, unknown > ) => void",
669 "signature": {
670 "arguments": [{
671 "name": "attributes",
672 "type": {
673 "name": "Record",
674 "elements": [{
675 "name": "string"
676 }, {
677 "name": "unknown"
678 }],
679 "raw": "Record< string, unknown >"
680 }
681 }],
682 "return": {
683 "name": "void"
684 }
685 }
686 },
687 "description": ""
688 },
689 "alignButtons": {
690 "required": true,
691 "tsType": {
692 "name": "boolean"
693 },
694 "description": ""
695 }
696 }
697 };
698 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GridLayoutControl);
699 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
700 STORYBOOK_REACT_CLASSES["assets/js/editor-components/grid-layout-control/index.tsx"] = {
701 name: "GridLayoutControl",
702 docgenInfo: GridLayoutControl.__docgenInfo,
703 path: "assets/js/editor-components/grid-layout-control/index.tsx"
704 };
705 }
706
707 /***/ }),
708
709 /***/ "./assets/js/editor-components/product-category-control/index.tsx":
710 /*!************************************************************************!*\
711 !*** ./assets/js/editor-components/product-category-control/index.tsx ***!
712 \************************************************************************/
713 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
714
715 "use strict";
716 __webpack_require__.r(__webpack_exports__);
717 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
718 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
719 /* harmony export */ });
720 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
721 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
722 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
723 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
724 /* 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");
725 /* 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");
726 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
727 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
728 /* harmony import */ var _woocommerce_block_hocs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @woocommerce/block-hocs */ "./assets/js/hocs/with-searched-categories.tsx");
729 /* 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");
730 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
731 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
732 /* harmony import */ var _woocommerce_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @woocommerce/utils */ "./assets/js/utils/products.ts");
733 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style.scss */ "./assets/js/editor-components/product-category-control/style.scss");
734 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_4__);
735
736 /**
737 * External dependencies
738 */
739
740
741
742
743
744
745
746
747 /**
748 * Internal dependencies
749 */
750
751 const ProductCategoryControl = ({
752 categories = [],
753 error = null,
754 isLoading = false,
755 onChange,
756 onOperatorChange,
757 operator = 'any',
758 selected,
759 isCompact = false,
760 isSingle = false,
761 showReviewCount
762 }) => {
763 const renderItem = args => {
764 var _item$details, _item$details2, _item$details3, _item$details4, _item$details5, _item$details6, _item$details7, _item$details8;
765 const {
766 item,
767 search,
768 depth = 0
769 } = args;
770 const accessibleName = !item.breadcrumbs.length ? item.name : `${item.breadcrumbs.join(', ')}, ${item.name}`;
771 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. */
772 (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. */
773 (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);
774 const listItemCountLabel = showReviewCount ? (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %d is the count of reviews. */
775 (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. */
776 (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);
777 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_search_list_control__WEBPACK_IMPORTED_MODULE_5__.SearchListItem, {
778 className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('woocommerce-product-categories__item', 'has-count', {
779 'is-searching': search.length > 0,
780 'is-skip-level': depth === 0 && item.parent !== 0
781 }),
782 ...args,
783 countLabel: listItemCountLabel,
784 "aria-label": listItemAriaLabel
785 });
786 };
787 const messages = {
788 clear: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Clear all product categories', 'woocommerce'),
789 list: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Product Categories', 'woocommerce'),
790 noItems: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Your store doesn't have any product categories.", 'woocommerce'),
791 search: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Search for product categories', 'woocommerce'),
792 selected: n => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)( /* translators: %d is the count of selected categories. */
793 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__._n)('%d category selected', '%d categories selected', n, 'woocommerce'), n),
794 updated: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Category search results updated.', 'woocommerce')
795 };
796 if (error) {
797 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_editor_components_error_placeholder_error_message__WEBPACK_IMPORTED_MODULE_6__["default"], {
798 error: error
799 });
800 }
801 const currentList = categories.map(_woocommerce_utils__WEBPACK_IMPORTED_MODULE_7__.convertProductCategoryResponseItemToSearchItem);
802 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, {
803 className: "woocommerce-product-categories",
804 list: currentList,
805 isLoading: isLoading,
806 selected: currentList.filter(({
807 id
808 }) => selected.includes(Number(id))),
809 onChange: onChange,
810 renderItem: renderItem,
811 messages: messages,
812 isCompact: isCompact,
813 isHierarchical: true,
814 isSingle: isSingle
815 }), !!onOperatorChange && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
816 hidden: selected.length < 2
817 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.SelectControl, {
818 className: "woocommerce-product-categories__operator",
819 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Display products matching', 'woocommerce'),
820 help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Pick at least two categories to use this setting.', 'woocommerce'),
821 value: operator,
822 onChange: onOperatorChange,
823 options: [{
824 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Any selected categories', 'woocommerce'),
825 value: 'any'
826 }, {
827 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('All selected categories', 'woocommerce'),
828 value: 'all'
829 }]
830 })));
831 };
832 ProductCategoryControl.__docgenInfo = {
833 "description": "",
834 "methods": [],
835 "displayName": "ProductCategoryControl",
836 "props": {
837 "categories": {
838 "defaultValue": {
839 "value": "[]",
840 "computed": false
841 },
842 "required": false
843 },
844 "error": {
845 "defaultValue": {
846 "value": "null",
847 "computed": false
848 },
849 "required": false
850 },
851 "isLoading": {
852 "defaultValue": {
853 "value": "false",
854 "computed": false
855 },
856 "required": false
857 },
858 "operator": {
859 "defaultValue": {
860 "value": "'any'",
861 "computed": false
862 },
863 "required": false,
864 "tsType": {
865 "name": "union",
866 "raw": "'all' | 'any'",
867 "elements": [{
868 "name": "literal",
869 "value": "'all'"
870 }, {
871 "name": "literal",
872 "value": "'any'"
873 }]
874 },
875 "description": "Setting for whether products should match all or any selected categories."
876 },
877 "isCompact": {
878 "defaultValue": {
879 "value": "false",
880 "computed": false
881 },
882 "required": false,
883 "tsType": {
884 "name": "boolean"
885 },
886 "description": "Whether or not the search control should be displayed in a compact way, so it occupies less space."
887 },
888 "isSingle": {
889 "defaultValue": {
890 "value": "false",
891 "computed": false
892 },
893 "required": false,
894 "tsType": {
895 "name": "boolean"
896 },
897 "description": "Allow only a single selection. Defaults to false."
898 },
899 "onChange": {
900 "required": true,
901 "tsType": {
902 "name": "signature",
903 "type": "function",
904 "raw": "() => void",
905 "signature": {
906 "arguments": [],
907 "return": {
908 "name": "void"
909 }
910 }
911 },
912 "description": "Callback to update the selected product categories."
913 },
914 "onOperatorChange": {
915 "required": false,
916 "tsType": {
917 "name": "signature",
918 "type": "function",
919 "raw": "() => void",
920 "signature": {
921 "arguments": [],
922 "return": {
923 "name": "void"
924 }
925 }
926 },
927 "description": "Callback to update the category operator. If not passed in, setting is not used."
928 },
929 "showReviewCount": {
930 "required": false,
931 "tsType": {
932 "name": "boolean"
933 },
934 "description": "Whether or not to display the number of reviews for a category in the list."
935 }
936 }
937 };
938 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_woocommerce_block_hocs__WEBPACK_IMPORTED_MODULE_9__["default"])(ProductCategoryControl));
939 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
940 STORYBOOK_REACT_CLASSES["assets/js/editor-components/product-category-control/index.tsx"] = {
941 name: "ProductCategoryControl",
942 docgenInfo: ProductCategoryControl.__docgenInfo,
943 path: "assets/js/editor-components/product-category-control/index.tsx"
944 };
945 }
946
947 /***/ }),
948
949 /***/ "./assets/js/editor-components/product-stock-control/index.tsx":
950 /*!*********************************************************************!*\
951 !*** ./assets/js/editor-components/product-stock-control/index.tsx ***!
952 \*********************************************************************/
953 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
954
955 "use strict";
956 __webpack_require__.r(__webpack_exports__);
957 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
958 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
959 /* harmony export */ });
960 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
961 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
962 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
963 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
964 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
965 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__);
966 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
967 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
968 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
969 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__);
970
971 /**
972 * External dependencies
973 */
974
975
976
977
978 // Look up whether or not out of stock items should be hidden globally.
979 const hideOutOfStockItems = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSetting)('hideOutOfStockItems', false);
980
981 // Get the stock status options.
982 const allStockStatusOptions = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSetting)('stockStatusOptions', {});
983
984 /**
985 * A pre-configured SelectControl for product stock settings.
986 */
987 const ProductStockControl = ({
988 value,
989 setAttributes
990 }) => {
991 // Determine whether or not to use the out of stock status.
992 const {
993 outofstock,
994 ...otherStockStatusOptions
995 } = allStockStatusOptions;
996 const stockStatusOptions = hideOutOfStockItems ? otherStockStatusOptions : allStockStatusOptions;
997
998 /**
999 * Valid options must be in an array of [ 'value' : 'mystatus', 'label' : 'My label' ] format.
1000 * stockStatusOptions are returned as [ 'mystatus' : 'My label' ].
1001 * Formatting is corrected here.
1002 */
1003 const displayOptions = Object.entries(stockStatusOptions).map(([slug, name]) => ({
1004 value: slug,
1005 label: name
1006 })).filter(status => !!status.label);
1007 const defaultCheckedOptions = Object.keys(stockStatusOptions).filter(key => !!key);
1008
1009 // Set the initial state to the default or saved value.
1010 const [checkedOptions, setChecked] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(value || defaultCheckedOptions);
1011
1012 /**
1013 * Set attributes when checked items change.
1014 * Note: The blank stock status prevents all results returning when all options are unchecked.
1015 */
1016 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
1017 setAttributes({
1018 stockStatus: ['', ...checkedOptions]
1019 });
1020 }, [checkedOptions, setAttributes]);
1021
1022 /**
1023 * When a checkbox in the list changes, update state.
1024 */
1025 const onChange = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(checkedValue => {
1026 const previouslyChecked = checkedOptions.includes(checkedValue);
1027 const newChecked = checkedOptions.filter(filteredValue => filteredValue !== checkedValue);
1028 if (!previouslyChecked) {
1029 newChecked.push(checkedValue);
1030 newChecked.sort();
1031 }
1032 setChecked(newChecked);
1033 }, [checkedOptions]);
1034 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, displayOptions.map(option => {
1035 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');
1036 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.ToggleControl, {
1037 label: option.label,
1038 key: option.value,
1039 help: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)(helpText, option.label),
1040 checked: checkedOptions.includes(option.value),
1041 onChange: () => onChange(option.value)
1042 });
1043 }));
1044 };
1045 ProductStockControl.__docgenInfo = {
1046 "description": "A pre-configured SelectControl for product stock settings.",
1047 "methods": [],
1048 "displayName": "ProductStockControl",
1049 "props": {
1050 "value": {
1051 "required": true,
1052 "tsType": {
1053 "name": "Array",
1054 "elements": [{
1055 "name": "string"
1056 }],
1057 "raw": "Array< string >"
1058 },
1059 "description": ""
1060 },
1061 "setAttributes": {
1062 "required": true,
1063 "tsType": {
1064 "name": "signature",
1065 "type": "function",
1066 "raw": "( attributes: Record< string, unknown > ) => void",
1067 "signature": {
1068 "arguments": [{
1069 "name": "attributes",
1070 "type": {
1071 "name": "Record",
1072 "elements": [{
1073 "name": "string"
1074 }, {
1075 "name": "unknown"
1076 }],
1077 "raw": "Record< string, unknown >"
1078 }
1079 }],
1080 "return": {
1081 "name": "void"
1082 }
1083 }
1084 },
1085 "description": ""
1086 }
1087 }
1088 };
1089 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductStockControl);
1090 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1091 STORYBOOK_REACT_CLASSES["assets/js/editor-components/product-stock-control/index.tsx"] = {
1092 name: "ProductStockControl",
1093 docgenInfo: ProductStockControl.__docgenInfo,
1094 path: "assets/js/editor-components/product-stock-control/index.tsx"
1095 };
1096 }
1097
1098 /***/ }),
1099
1100 /***/ "./assets/js/editor-components/search-list-control/item.tsx":
1101 /*!******************************************************************!*\
1102 !*** ./assets/js/editor-components/search-list-control/item.tsx ***!
1103 \******************************************************************/
1104 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1105
1106 "use strict";
1107 __webpack_require__.r(__webpack_exports__);
1108 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1109 /* harmony export */ SearchListItem: () => (/* binding */ SearchListItem),
1110 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1111 /* harmony export */ });
1112 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1113 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1114 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
1115 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
1116 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1117 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
1118 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1119 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
1120 /* harmony import */ var _woocommerce_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @woocommerce/utils */ "./assets/js/utils/array-operations.ts");
1121 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities");
1122 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__);
1123 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./assets/js/editor-components/search-list-control/utils.tsx");
1124
1125 /**
1126 * External dependencies
1127 */
1128
1129
1130
1131
1132
1133
1134 /**
1135 * Internal dependencies
1136 */
1137
1138
1139 const Count = ({
1140 label
1141 }) => {
1142 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1143 className: "woocommerce-search-list__item-count"
1144 }, label);
1145 };
1146 const ItemLabel = props => {
1147 const {
1148 item,
1149 search
1150 } = props;
1151 const hasBreadcrumbs = item.breadcrumbs && item.breadcrumbs.length;
1152 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1153 className: "woocommerce-search-list__item-label"
1154 }, hasBreadcrumbs ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1155 className: "woocommerce-search-list__item-prefix"
1156 }, (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getBreadcrumbsForDisplay)(item.breadcrumbs)) : null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1157 className: "woocommerce-search-list__item-name"
1158 }, (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getHighlightedName)((0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(item.name), search)));
1159 };
1160 const SearchListItem = ({
1161 countLabel,
1162 className,
1163 depth = 0,
1164 controlId = '',
1165 item,
1166 isSelected,
1167 isSingle,
1168 onSelect,
1169 search = '',
1170 selected,
1171 useExpandedPanelId,
1172 ...props
1173 }) => {
1174 var _item$breadcrumbs, _item$children;
1175 const [expandedPanelId, setExpandedPanelId] = useExpandedPanelId;
1176 const showCount = countLabel !== undefined && countLabel !== null && item.count !== undefined && item.count !== null;
1177 const hasBreadcrumbs = !!((_item$breadcrumbs = item.breadcrumbs) !== null && _item$breadcrumbs !== void 0 && _item$breadcrumbs.length);
1178 const hasChildren = !!((_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length);
1179 const isExpanded = expandedPanelId === item.id;
1180 const classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()(['woocommerce-search-list__item', `depth-${depth}`, className], {
1181 'has-breadcrumbs': hasBreadcrumbs,
1182 'has-children': hasChildren,
1183 'has-count': showCount,
1184 'is-expanded': isExpanded,
1185 'is-radio-button': isSingle
1186 });
1187 const name = props.name || `search-list-item-${controlId}`;
1188 const id = `${name}-${item.id}`;
1189 const togglePanel = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(() => {
1190 setExpandedPanelId(isExpanded ? -1 : Number(item.id));
1191 }, [isExpanded, item.id, setExpandedPanelId]);
1192 return hasChildren ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1193 className: classes,
1194 onClick: togglePanel,
1195 onKeyDown: e => e.key === 'Enter' || e.key === ' ' ? togglePanel() : null,
1196 role: "treeitem",
1197 tabIndex: 0
1198 }, isSingle ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
1199 type: "radio",
1200 id: id,
1201 name: name,
1202 value: item.value,
1203 onChange: onSelect(item),
1204 onClick: e => e.stopPropagation(),
1205 checked: isSelected,
1206 className: "woocommerce-search-list__item-input",
1207 ...props
1208 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ItemLabel, {
1209 item: item,
1210 search: search
1211 }), showCount ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Count, {
1212 label: countLabel || item.count
1213 }) : 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, {
1214 className: "woocommerce-search-list__item-input",
1215 checked: isSelected,
1216 ...(!isSelected &&
1217 // We know that `item.children` is not `undefined` because
1218 // we are here only if `hasChildren` is `true`.
1219 item.children.some(child => selected.find(selectedItem => selectedItem.id === child.id)) ? {
1220 indeterminate: true
1221 } : {}),
1222 label: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getHighlightedName)((0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(item.name), search),
1223 onChange: () => {
1224 if (isSelected) {
1225 onSelect((0,_woocommerce_utils__WEBPACK_IMPORTED_MODULE_6__.arrayDifferenceBy)(selected, item.children, 'id'))();
1226 } else {
1227 onSelect((0,_woocommerce_utils__WEBPACK_IMPORTED_MODULE_6__.arrayUnionBy)(selected, item.children, 'id'))();
1228 }
1229 },
1230 onClick: e => e.stopPropagation()
1231 }), showCount ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Count, {
1232 label: countLabel || item.count
1233 }) : null)) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", {
1234 htmlFor: id,
1235 className: classes
1236 }, isSingle ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", {
1237 ...props,
1238 type: "radio",
1239 id: id,
1240 name: name,
1241 value: item.value,
1242 onChange: onSelect(item),
1243 checked: isSelected,
1244 className: "woocommerce-search-list__item-input"
1245 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ItemLabel, {
1246 item: item,
1247 search: search
1248 })) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.CheckboxControl, {
1249 ...props,
1250 id: id,
1251 name: name,
1252 className: "woocommerce-search-list__item-input",
1253 value: (0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(item.value),
1254 label: (0,_utils__WEBPACK_IMPORTED_MODULE_5__.getHighlightedName)((0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(item.name), search),
1255 onChange: onSelect(item),
1256 checked: isSelected
1257 }), showCount ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Count, {
1258 label: countLabel || item.count
1259 }) : null);
1260 };
1261 SearchListItem.__docgenInfo = {
1262 "description": "",
1263 "methods": [],
1264 "displayName": "SearchListItem",
1265 "props": {
1266 "depth": {
1267 "defaultValue": {
1268 "value": "0",
1269 "computed": false
1270 },
1271 "required": false
1272 },
1273 "controlId": {
1274 "defaultValue": {
1275 "value": "''",
1276 "computed": false
1277 },
1278 "required": false
1279 },
1280 "search": {
1281 "defaultValue": {
1282 "value": "''",
1283 "computed": false
1284 },
1285 "required": false
1286 }
1287 }
1288 };
1289 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SearchListItem);
1290 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1291 STORYBOOK_REACT_CLASSES["assets/js/editor-components/search-list-control/item.tsx"] = {
1292 name: "SearchListItem",
1293 docgenInfo: SearchListItem.__docgenInfo,
1294 path: "assets/js/editor-components/search-list-control/item.tsx"
1295 };
1296 }
1297
1298 /***/ }),
1299
1300 /***/ "./assets/js/editor-components/search-list-control/search-list-control.tsx":
1301 /*!*********************************************************************************!*\
1302 !*** ./assets/js/editor-components/search-list-control/search-list-control.tsx ***!
1303 \*********************************************************************************/
1304 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1305
1306 "use strict";
1307 __webpack_require__.r(__webpack_exports__);
1308 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1309 /* harmony export */ SearchListControl: () => (/* binding */ SearchListControl),
1310 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1311 /* harmony export */ });
1312 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1313 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1314 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1315 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
1316 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1317 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__);
1318 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1319 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__);
1320 /* 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");
1321 /* 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");
1322 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
1323 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
1324 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
1325 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__);
1326 /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils */ "./assets/js/editor-components/search-list-control/utils.tsx");
1327 /* harmony import */ var _item__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./item */ "./assets/js/editor-components/search-list-control/item.tsx");
1328 /* harmony import */ var _tag__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../tag */ "./assets/js/editor-components/tag/index.tsx");
1329 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./style.scss */ "./assets/js/editor-components/search-list-control/style.scss");
1330 /* harmony import */ var _style_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_style_scss__WEBPACK_IMPORTED_MODULE_6__);
1331
1332 /**
1333 * External dependencies
1334 */
1335
1336
1337
1338
1339
1340
1341
1342 /**
1343 * Internal dependencies
1344 */
1345
1346
1347
1348
1349 const defaultRenderListItem = args => {
1350 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_item__WEBPACK_IMPORTED_MODULE_7__["default"], {
1351 ...args
1352 });
1353 };
1354 const ListItems = props => {
1355 const {
1356 list,
1357 selected,
1358 renderItem,
1359 depth = 0,
1360 onSelect,
1361 instanceId,
1362 isSingle,
1363 search,
1364 useExpandedPanelId
1365 } = props;
1366 const [expandedPanelId] = useExpandedPanelId;
1367 if (!list) {
1368 return null;
1369 }
1370 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.Fragment, null, list.map(item => {
1371 var _item$children, _item$children2;
1372 const isSelected = (_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length && !isSingle ? item.children.every(({
1373 id
1374 }) => selected.find(selectedItem => selectedItem.id === id)) : !!selected.find(({
1375 id
1376 }) => id === item.id);
1377 const isExpanded = ((_item$children2 = item.children) === null || _item$children2 === void 0 ? void 0 : _item$children2.length) && expandedPanelId === item.id;
1378 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.Fragment, {
1379 key: item.id
1380 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, renderItem({
1381 item,
1382 isSelected,
1383 onSelect,
1384 isSingle,
1385 selected,
1386 search,
1387 depth,
1388 useExpandedPanelId,
1389 controlId: instanceId
1390 })), isExpanded ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ListItems, {
1391 ...props,
1392 list: item.children,
1393 depth: depth + 1
1394 }) : null);
1395 }));
1396 };
1397 const SelectedListItems = ({
1398 isLoading,
1399 isSingle,
1400 selected,
1401 messages,
1402 onChange,
1403 onRemove
1404 }) => {
1405 if (isLoading || isSingle || !selected) {
1406 return null;
1407 }
1408 const selectedCount = selected.length;
1409 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1410 className: "woocommerce-search-list__selected"
1411 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1412 className: "woocommerce-search-list__selected-header"
1413 }, (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, {
1414 variant: "link",
1415 isDestructive: true,
1416 onClick: () => onChange([]),
1417 "aria-label": messages.clear
1418 }, (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", {
1419 key: i
1420 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_tag__WEBPACK_IMPORTED_MODULE_8__["default"], {
1421 label: item.name,
1422 id: item.id,
1423 remove: onRemove
1424 })))) : null);
1425 };
1426 const ListItemsContainer = ({
1427 filteredList,
1428 search,
1429 onSelect,
1430 instanceId,
1431 useExpandedPanelId,
1432 ...props
1433 }) => {
1434 const {
1435 messages,
1436 renderItem,
1437 selected,
1438 isSingle
1439 } = props;
1440 const renderItemCallback = renderItem || defaultRenderListItem;
1441 if (filteredList.length === 0) {
1442 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1443 className: "woocommerce-search-list__list is-not-found"
1444 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1445 className: "woocommerce-search-list__not-found-icon"
1446 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], {
1447 icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"],
1448 role: "img"
1449 })), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1450 className: "woocommerce-search-list__not-found-text"
1451 }, search ?
1452 // eslint-disable-next-line @wordpress/valid-sprintf
1453 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)(messages.noResults, search) : messages.noItems));
1454 }
1455 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", {
1456 className: "woocommerce-search-list__list"
1457 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ListItems, {
1458 useExpandedPanelId: useExpandedPanelId,
1459 list: filteredList,
1460 selected: selected,
1461 renderItem: renderItemCallback,
1462 onSelect: onSelect,
1463 instanceId: instanceId,
1464 isSingle: isSingle,
1465 search: search
1466 }));
1467 };
1468
1469 /**
1470 * Component to display a searchable, selectable list of items.
1471 */
1472 const SearchListControl = props => {
1473 const {
1474 className = '',
1475 isCompact,
1476 isHierarchical,
1477 isLoading,
1478 isSingle,
1479 list,
1480 messages: customMessages = _utils__WEBPACK_IMPORTED_MODULE_11__.defaultMessages,
1481 onChange,
1482 onSearch,
1483 selected,
1484 type = 'text',
1485 debouncedSpeak
1486 } = props;
1487 const [search, setSearch] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)('');
1488 const useExpandedPanelId = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useState)(-1);
1489 const instanceId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__.useInstanceId)(SearchListControl);
1490 const messages = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => ({
1491 ..._utils__WEBPACK_IMPORTED_MODULE_11__.defaultMessages,
1492 ...customMessages
1493 }), [customMessages]);
1494 const filteredList = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useMemo)(() => {
1495 return (0,_utils__WEBPACK_IMPORTED_MODULE_11__.getFilteredList)(list, search, isHierarchical);
1496 }, [list, search, isHierarchical]);
1497 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
1498 if (debouncedSpeak) {
1499 debouncedSpeak(messages.updated);
1500 }
1501 }, [debouncedSpeak, messages]);
1502 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useEffect)(() => {
1503 if (typeof onSearch === 'function') {
1504 onSearch(search);
1505 }
1506 }, [search, onSearch]);
1507 const onRemove = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(itemId => () => {
1508 if (isSingle) {
1509 onChange([]);
1510 }
1511 const i = selected.findIndex(({
1512 id: selectedId
1513 }) => selectedId === itemId);
1514 onChange([...selected.slice(0, i), ...selected.slice(i + 1)]);
1515 }, [isSingle, selected, onChange]);
1516 const onSelect = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(item => () => {
1517 if (Array.isArray(item)) {
1518 onChange(item);
1519 return;
1520 }
1521 if (selected.findIndex(({
1522 id
1523 }) => id === item.id) !== -1) {
1524 onRemove(item.id)();
1525 return;
1526 }
1527 if (isSingle) {
1528 onChange([item]);
1529 } else {
1530 onChange([...selected, item]);
1531 }
1532 }, [isSingle, onRemove, onChange, selected]);
1533 const onRemoveToken = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_3__.useCallback)(tokens => {
1534 const [removedItem] = selected.filter(item => !tokens.find(token => item.id === token.id));
1535 onRemove(removedItem.id)();
1536 }, [onRemove, selected]);
1537 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1538 className: classnames__WEBPACK_IMPORTED_MODULE_4___default()('woocommerce-search-list', className, {
1539 'is-compact': isCompact,
1540 'is-loading': isLoading,
1541 'is-token': type === 'token'
1542 })
1543 }, type === 'text' && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(SelectedListItems, {
1544 ...props,
1545 onRemove: onRemove,
1546 messages: messages
1547 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1548 className: "woocommerce-search-list__search"
1549 }, type === 'text' ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.TextControl, {
1550 label: messages.search,
1551 type: "search",
1552 value: search,
1553 onChange: value => setSearch(value)
1554 }) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.FormTokenField, {
1555 disabled: isLoading,
1556 label: messages.search,
1557 onChange: onRemoveToken,
1558 onInputChange: value => setSearch(value),
1559 suggestions: []
1560 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1561 // @ts-ignore - Ignoring because `__experimentalValidateInput` is not yet in the type definitions.
1562 ,
1563 __experimentalValidateInput: () => false,
1564 value: isLoading ? [(0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Loading…', 'woocommerce')] : selected.map(token => ({
1565 ...token,
1566 value: token.name
1567 })),
1568 __experimentalShowHowTo: false
1569 })), isLoading ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
1570 className: "woocommerce-search-list__list"
1571 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Spinner, null)) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ListItemsContainer, {
1572 ...props,
1573 search: search,
1574 filteredList: filteredList,
1575 messages: messages,
1576 onSelect: onSelect,
1577 instanceId: instanceId,
1578 useExpandedPanelId: useExpandedPanelId
1579 }));
1580 };
1581 SearchListControl.__docgenInfo = {
1582 "description": "Component to display a searchable, selectable list of items.",
1583 "methods": [],
1584 "displayName": "SearchListControl"
1585 };
1586 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.withSpokenMessages)(SearchListControl));
1587 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1588 STORYBOOK_REACT_CLASSES["assets/js/editor-components/search-list-control/search-list-control.tsx"] = {
1589 name: "SearchListControl",
1590 docgenInfo: SearchListControl.__docgenInfo,
1591 path: "assets/js/editor-components/search-list-control/search-list-control.tsx"
1592 };
1593 }
1594
1595 /***/ }),
1596
1597 /***/ "./assets/js/editor-components/search-list-control/utils.tsx":
1598 /*!*******************************************************************!*\
1599 !*** ./assets/js/editor-components/search-list-control/utils.tsx ***!
1600 \*******************************************************************/
1601 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1602
1603 "use strict";
1604 __webpack_require__.r(__webpack_exports__);
1605 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1606 /* harmony export */ buildTermsTree: () => (/* binding */ buildTermsTree),
1607 /* harmony export */ defaultMessages: () => (/* binding */ defaultMessages),
1608 /* harmony export */ getBreadcrumbsForDisplay: () => (/* binding */ getBreadcrumbsForDisplay),
1609 /* harmony export */ getFilteredList: () => (/* binding */ getFilteredList),
1610 /* harmony export */ getHighlightedName: () => (/* binding */ getHighlightedName)
1611 /* harmony export */ });
1612 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1613 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1614 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1615 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
1616 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1617 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
1618 /* harmony import */ var _woocommerce_base_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/base-utils */ "./assets/js/base/utils/keyby.ts");
1619
1620 /**
1621 * External dependencies
1622 */
1623
1624
1625
1626
1627 /**
1628 * Internal dependencies
1629 */
1630
1631 const defaultMessages = {
1632 clear: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Clear all selected items', 'woocommerce'),
1633 noItems: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No items found.', 'woocommerce'),
1634 /* Translators: %s search term */
1635 noResults: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('No results for %s', 'woocommerce'),
1636 search: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search for items', 'woocommerce'),
1637 selected: n => (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)( /* translators: Number of items selected from list. */
1638 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__._n)('%d item selected', '%d items selected', n, 'woocommerce'), n),
1639 updated: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Search results updated.', 'woocommerce')
1640 };
1641
1642 /**
1643 * Returns terms in a tree form.
1644 *
1645 * @param {Array} filteredList Array of terms, possibly a subset of all terms, in flat format.
1646 * @param {Array} list Array of the full list of terms, defaults to the filteredList.
1647 *
1648 * @return {Array} Array of terms in tree format.
1649 */
1650 const buildTermsTree = (filteredList, list = filteredList) => {
1651 const termsByParent = filteredList.reduce((acc, currentValue) => {
1652 const key = currentValue.parent || 0;
1653 if (!acc[key]) {
1654 acc[key] = [];
1655 }
1656 acc[key].push(currentValue);
1657 return acc;
1658 }, {});
1659 const listById = (0,_woocommerce_base_utils__WEBPACK_IMPORTED_MODULE_3__.keyBy)(list, 'id');
1660 const builtParents = ['0'];
1661 const getParentsName = (term = {}) => {
1662 if (!term.parent) {
1663 return term.name ? [term.name] : [];
1664 }
1665 const parentName = getParentsName(listById[term.parent]);
1666 return [...parentName, term.name];
1667 };
1668 const fillWithChildren = terms => {
1669 return terms.map(term => {
1670 const children = termsByParent[term.id];
1671 builtParents.push('' + term.id);
1672 return {
1673 ...term,
1674 breadcrumbs: getParentsName(listById[term.parent]),
1675 children: children && children.length ? fillWithChildren(children) : []
1676 };
1677 });
1678 };
1679 const tree = fillWithChildren(termsByParent['0'] || []);
1680
1681 // Handle remaining items in termsByParent that have not been built (orphaned).
1682 Object.entries(termsByParent).forEach(([termId, terms]) => {
1683 if (!builtParents.includes(termId)) {
1684 tree.push(...fillWithChildren(terms || []));
1685 }
1686 });
1687 return tree;
1688 };
1689 const getFilteredList = (list, search, isHierarchical) => {
1690 if (!search) {
1691 return isHierarchical ? buildTermsTree(list) : list;
1692 }
1693 const re = new RegExp(search.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'), 'i');
1694 const filteredList = list.map(item => re.test(item.name) ? item : false).filter(Boolean);
1695 return isHierarchical ? buildTermsTree(filteredList, list) : filteredList;
1696 };
1697 const getHighlightedName = (name, search) => {
1698 if (!search) {
1699 return name;
1700 }
1701 const re = new RegExp(
1702 // Escaping.
1703 `(${search.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')})`, 'ig');
1704 const nameParts = name.split(re);
1705 return nameParts.map((part, i) => {
1706 return re.test(part) ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", {
1707 key: i
1708 }, part) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, {
1709 key: i
1710 }, part);
1711 });
1712 };
1713 const getBreadcrumbsForDisplay = breadcrumbs => {
1714 if (breadcrumbs.length === 1) {
1715 return breadcrumbs.slice(0, 1).toString();
1716 }
1717 if (breadcrumbs.length === 2) {
1718 return breadcrumbs.slice(0, 1).toString() + '' + breadcrumbs.slice(-1).toString();
1719 }
1720 return breadcrumbs.slice(0, 1).toString() + '' + breadcrumbs.slice(-1).toString();
1721 };
1722
1723 /***/ }),
1724
1725 /***/ "./assets/js/editor-components/tag/index.tsx":
1726 /*!***************************************************!*\
1727 !*** ./assets/js/editor-components/tag/index.tsx ***!
1728 \***************************************************/
1729 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1730
1731 "use strict";
1732 __webpack_require__.r(__webpack_exports__);
1733 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1734 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1735 /* harmony export */ });
1736 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
1737 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1738 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
1739 /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__);
1740 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! classnames */ "../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js");
1741 /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_2__);
1742 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
1743 /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__);
1744 /* 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");
1745 /* 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");
1746 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/html-entities */ "@wordpress/html-entities");
1747 /* harmony import */ var _wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__);
1748 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
1749 /* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__);
1750 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
1751 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
1752 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./editor.scss */ "./assets/js/editor-components/tag/editor.scss");
1753 /* harmony import */ var _editor_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_editor_scss__WEBPACK_IMPORTED_MODULE_7__);
1754
1755 /**
1756 * External dependencies
1757 */
1758
1759
1760
1761
1762
1763
1764
1765
1766 /**
1767 * Internal dependencies
1768 */
1769
1770
1771 /**
1772 * This component can be used to show an item styled as a "tag", optionally with an `X` + "remove"
1773 * or with a popover that is shown on click.
1774 */
1775 const Tag = ({
1776 id,
1777 label,
1778 popoverContents,
1779 remove,
1780 screenReaderLabel,
1781 className = ''
1782 }) => {
1783 const [isVisible, setIsVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_6__.useState)(false);
1784 const instanceId = (0,_wordpress_compose__WEBPACK_IMPORTED_MODULE_5__.useInstanceId)(Tag);
1785 screenReaderLabel = screenReaderLabel || label;
1786 if (!label) {
1787 // A null label probably means something went wrong
1788 return null;
1789 }
1790 label = (0,_wordpress_html_entities__WEBPACK_IMPORTED_MODULE_4__.decodeEntities)(label);
1791 const classes = classnames__WEBPACK_IMPORTED_MODULE_2___default()('woocommerce-tag', className, {
1792 'has-remove': !!remove
1793 });
1794 const labelId = `woocommerce-tag__label-${instanceId}`;
1795 const labelTextNode = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1796 className: "screen-reader-text"
1797 }, screenReaderLabel), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1798 "aria-hidden": "true"
1799 }, label));
1800 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1801 className: classes
1802 }, popoverContents ? (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
1803 className: "woocommerce-tag__text",
1804 id: labelId,
1805 onClick: () => setIsVisible(true)
1806 }, labelTextNode) : (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", {
1807 className: "woocommerce-tag__text",
1808 id: labelId
1809 }, labelTextNode), popoverContents && isVisible && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Popover, {
1810 onClose: () => setIsVisible(false)
1811 }, popoverContents), remove && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {
1812 className: "woocommerce-tag__remove",
1813 onClick: remove(id),
1814 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.sprintf)(
1815 // Translators: %s label.
1816 (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Remove %s', 'woocommerce'), label),
1817 "aria-describedby": labelId
1818 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"], {
1819 icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"],
1820 size: 20,
1821 className: "clear-icon",
1822 role: "img"
1823 })));
1824 };
1825 Tag.__docgenInfo = {
1826 "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.",
1827 "methods": [],
1828 "displayName": "Tag",
1829 "props": {
1830 "className": {
1831 "defaultValue": {
1832 "value": "''",
1833 "computed": false
1834 },
1835 "required": false,
1836 "tsType": {
1837 "name": "string"
1838 },
1839 "description": ""
1840 },
1841 "id": {
1842 "required": true,
1843 "tsType": {
1844 "name": "union",
1845 "raw": "string | number",
1846 "elements": [{
1847 "name": "string"
1848 }, {
1849 "name": "number"
1850 }]
1851 },
1852 "description": ""
1853 },
1854 "label": {
1855 "required": true,
1856 "tsType": {
1857 "name": "string"
1858 },
1859 "description": ""
1860 },
1861 "popoverContents": {
1862 "required": false,
1863 "tsType": {
1864 "name": "JSX.Element"
1865 },
1866 "description": ""
1867 },
1868 "remove": {
1869 "required": false,
1870 "tsType": {
1871 "name": "signature",
1872 "type": "function",
1873 "raw": "( id: string | number ) => () => void",
1874 "signature": {
1875 "arguments": [{
1876 "name": "id",
1877 "type": {
1878 "name": "union",
1879 "raw": "string | number",
1880 "elements": [{
1881 "name": "string"
1882 }, {
1883 "name": "number"
1884 }]
1885 }
1886 }],
1887 "return": {
1888 "name": "signature",
1889 "type": "function",
1890 "raw": "() => void",
1891 "signature": {
1892 "arguments": [],
1893 "return": {
1894 "name": "void"
1895 }
1896 }
1897 }
1898 }
1899 },
1900 "description": ""
1901 },
1902 "screenReaderLabel": {
1903 "required": false,
1904 "tsType": {
1905 "name": "string"
1906 },
1907 "description": ""
1908 }
1909 }
1910 };
1911 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Tag);
1912 if (typeof STORYBOOK_REACT_CLASSES !== "undefined") {
1913 STORYBOOK_REACT_CLASSES["assets/js/editor-components/tag/index.tsx"] = {
1914 name: "Tag",
1915 docgenInfo: Tag.__docgenInfo,
1916 path: "assets/js/editor-components/tag/index.tsx"
1917 };
1918 }
1919
1920 /***/ }),
1921
1922 /***/ "./assets/js/editor-components/utils/index.js":
1923 /*!****************************************************!*\
1924 !*** ./assets/js/editor-components/utils/index.js ***!
1925 \****************************************************/
1926 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1927
1928 "use strict";
1929 __webpack_require__.r(__webpack_exports__);
1930 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1931 /* harmony export */ formatTitle: () => (/* binding */ formatTitle),
1932 /* harmony export */ getAttributes: () => (/* binding */ getAttributes),
1933 /* harmony export */ getCategories: () => (/* binding */ getCategories),
1934 /* harmony export */ getCategory: () => (/* binding */ getCategory),
1935 /* harmony export */ getProduct: () => (/* binding */ getProduct),
1936 /* harmony export */ getProductTags: () => (/* binding */ getProductTags),
1937 /* harmony export */ getProductVariations: () => (/* binding */ getProductVariations),
1938 /* harmony export */ getProducts: () => (/* binding */ getProducts),
1939 /* harmony export */ getTerms: () => (/* binding */ getTerms)
1940 /* harmony export */ });
1941 /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url");
1942 /* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_0__);
1943 /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch");
1944 /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__);
1945 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
1946 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__);
1947 /* harmony import */ var _woocommerce_block_settings__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/block-settings */ "./assets/js/settings/blocks/index.ts");
1948 /**
1949 * External dependencies
1950 */
1951
1952
1953
1954
1955
1956 /**
1957 * Get product query requests for the Store API.
1958 *
1959 * @param {Object} request A query object with the list of selected products and search term.
1960 * @param {number[]} request.selected Currently selected products.
1961 * @param {string=} request.search Search string.
1962 * @param {(Record<string, unknown>)=} request.queryArgs Query args to pass in.
1963 */
1964 const getProductsRequests = ({
1965 selected = [],
1966 search = '',
1967 queryArgs = {}
1968 }) => {
1969 const isLargeCatalog = _woocommerce_block_settings__WEBPACK_IMPORTED_MODULE_3__.blocksConfig.productCount > 100;
1970 const defaultArgs = {
1971 per_page: isLargeCatalog ? 100 : 0,
1972 catalog_visibility: 'any',
1973 search,
1974 orderby: 'title',
1975 order: 'asc'
1976 };
1977 const requests = [(0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)('/wc/store/v1/products', {
1978 ...defaultArgs,
1979 ...queryArgs
1980 })];
1981
1982 // If we have a large catalog, we might not get all selected products in the first page.
1983 if (isLargeCatalog && selected.length) {
1984 requests.push((0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)('/wc/store/v1/products', {
1985 catalog_visibility: 'any',
1986 include: selected,
1987 per_page: 0
1988 }));
1989 }
1990 return requests;
1991 };
1992 const uniqBy = (array, iteratee) => {
1993 const seen = new Map();
1994 return array.filter(item => {
1995 const key = iteratee(item);
1996 if (!seen.has(key)) {
1997 seen.set(key, item);
1998 return true;
1999 }
2000 return false;
2001 });
2002 };
2003
2004 /**
2005 * Get a promise that resolves to a list of products from the Store API.
2006 *
2007 * @param {Object} request A query object with the list of selected products and search term.
2008 * @param {number[]} request.selected Currently selected products.
2009 * @param {string=} request.search Search string.
2010 * @param {(Record<string, unknown>)=} request.queryArgs Query args to pass in.
2011 * @return {Promise<unknown>} Promise resolving to a Product list.
2012 * @throws Exception if there is an error.
2013 */
2014 const getProducts = ({
2015 selected = [],
2016 search = '',
2017 queryArgs = {}
2018 }) => {
2019 const requests = getProductsRequests({
2020 selected,
2021 search,
2022 queryArgs
2023 });
2024 return Promise.all(requests.map(path => _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2025 path
2026 }))).then(data => {
2027 const flatData = data.flat();
2028 const products = uniqBy(flatData, item => item.id);
2029 const list = products.map(product => ({
2030 ...product,
2031 parent: 0
2032 }));
2033 return list;
2034 }).catch(e => {
2035 throw e;
2036 });
2037 };
2038
2039 /**
2040 * Get a promise that resolves to a product object from the Store API.
2041 *
2042 * @param {number} productId Id of the product to retrieve.
2043 */
2044 const getProduct = productId => {
2045 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2046 path: `/wc/store/v1/products/${productId}`
2047 });
2048 };
2049
2050 /**
2051 * Get a promise that resolves to a list of attribute objects from the Store API.
2052 */
2053 const getAttributes = () => {
2054 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2055 path: `wc/store/v1/products/attributes`
2056 });
2057 };
2058
2059 /**
2060 * Get a promise that resolves to a list of attribute term objects from the Store API.
2061 *
2062 * @param {number} attribute Id of the attribute to retrieve terms for.
2063 */
2064 const getTerms = attribute => {
2065 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2066 path: `wc/store/v1/products/attributes/${attribute}/terms`
2067 });
2068 };
2069
2070 /**
2071 * Get product tag query requests for the Store API.
2072 *
2073 * @param {Object} request A query object with the list of selected products and search term.
2074 * @param {Array} request.selected Currently selected tags.
2075 * @param {string} request.search Search string.
2076 */
2077 const getProductTagsRequests = ({
2078 selected = [],
2079 search
2080 }) => {
2081 const limitTags = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_2__.getSetting)('limitTags', false);
2082 const requests = [(0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(`wc/store/v1/products/tags`, {
2083 per_page: limitTags ? 100 : 0,
2084 orderby: limitTags ? 'count' : 'name',
2085 order: limitTags ? 'desc' : 'asc',
2086 search
2087 })];
2088
2089 // If we have a large catalog, we might not get all selected products in the first page.
2090 if (limitTags && selected.length) {
2091 requests.push((0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(`wc/store/v1/products/tags`, {
2092 include: selected
2093 }));
2094 }
2095 return requests;
2096 };
2097
2098 /**
2099 * Get a promise that resolves to a list of tags from the Store API.
2100 *
2101 * @param {Object} props A query object with the list of selected products and search term.
2102 * @param {Array} props.selected
2103 * @param {string} props.search
2104 */
2105 const getProductTags = ({
2106 selected = [],
2107 search
2108 }) => {
2109 const requests = getProductTagsRequests({
2110 selected,
2111 search
2112 });
2113 return Promise.all(requests.map(path => _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2114 path
2115 }))).then(data => {
2116 const flatData = data.flat();
2117 return uniqBy(flatData, item => item.id);
2118 });
2119 };
2120
2121 /**
2122 * Get a promise that resolves to a list of category objects from the Store API.
2123 *
2124 * @param {Object} queryArgs Query args to pass in.
2125 */
2126 const getCategories = queryArgs => {
2127 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2128 path: (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(`wc/store/v1/products/categories`, {
2129 per_page: 0,
2130 ...queryArgs
2131 })
2132 });
2133 };
2134
2135 /**
2136 * Get a promise that resolves to a category object from the API.
2137 *
2138 * @param {number} categoryId Id of the product to retrieve.
2139 */
2140 const getCategory = categoryId => {
2141 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2142 path: `wc/store/v1/products/categories/${categoryId}`
2143 });
2144 };
2145
2146 /**
2147 * Get a promise that resolves to a list of variation objects from the Store API.
2148 *
2149 * @param {number} product Product ID.
2150 */
2151 const getProductVariations = product => {
2152 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({
2153 path: (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_0__.addQueryArgs)(`wc/store/v1/products`, {
2154 per_page: 0,
2155 type: 'variation',
2156 parent: product
2157 })
2158 });
2159 };
2160
2161 /**
2162 * Given a page object and an array of page, format the title.
2163 *
2164 * @param {Object} page Page object.
2165 * @param {Object} page.title Page title object.
2166 * @param {string} page.title.raw Page title.
2167 * @param {string} page.slug Page slug.
2168 * @param {Array} pages Array of all pages.
2169 * @return {string} Formatted page title to display.
2170 */
2171 const formatTitle = (page, pages) => {
2172 if (!page.title.raw) {
2173 return page.slug;
2174 }
2175 const isUnique = pages.filter(p => p.title.raw === page.title.raw).length === 1;
2176 return page.title.raw + (!isUnique ? ` - ${page.slug}` : '');
2177 };
2178
2179 /***/ }),
2180
2181 /***/ "./assets/js/hocs/with-searched-categories.tsx":
2182 /*!*****************************************************!*\
2183 !*** ./assets/js/hocs/with-searched-categories.tsx ***!
2184 \*****************************************************/
2185 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2186
2187 "use strict";
2188 __webpack_require__.r(__webpack_exports__);
2189 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2190 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2191 /* harmony export */ });
2192 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2193 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2194 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
2195 /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__);
2196 /* harmony import */ var _woocommerce_editor_components_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @woocommerce/editor-components/utils */ "./assets/js/editor-components/utils/index.js");
2197 /* harmony import */ var _base_utils_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../base/utils/errors */ "./assets/js/base/utils/errors.ts");
2198
2199 /**
2200 * External dependencies
2201 */
2202
2203
2204 /**
2205 * Internal dependencies
2206 */
2207
2208 /**
2209 * A higher order component that enhances the provided component with categories from a search query.
2210 */
2211 const withSearchedCategories = OriginalComponent => {
2212 return ({
2213 selected,
2214 ...props
2215 }) => {
2216 const [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(true);
2217 const [error, setError] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null);
2218 const [categoriesList, setCategoriesList] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]);
2219 const setErrorState = async e => {
2220 const formattedError = await (0,_base_utils_errors__WEBPACK_IMPORTED_MODULE_2__.formatError)(e);
2221 setError(formattedError);
2222 setIsLoading(false);
2223 };
2224 const selectedRef = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useRef)(selected);
2225 (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
2226 (0,_woocommerce_editor_components_utils__WEBPACK_IMPORTED_MODULE_3__.getCategories)({
2227 selected: selectedRef.current
2228 }).then(results => {
2229 setCategoriesList(results);
2230 setIsLoading(false);
2231 }).catch(setErrorState);
2232 }, [selectedRef]);
2233 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(OriginalComponent, {
2234 ...props,
2235 selected: selected,
2236 error: error,
2237 categories: categoriesList,
2238 isLoading: isLoading
2239 });
2240 };
2241 };
2242 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (withSearchedCategories);
2243
2244 /***/ }),
2245
2246 /***/ "./assets/js/icons/library/sparkles.tsx":
2247 /*!**********************************************!*\
2248 !*** ./assets/js/icons/library/sparkles.tsx ***!
2249 \**********************************************/
2250 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2251
2252 "use strict";
2253 __webpack_require__.r(__webpack_exports__);
2254 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2255 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
2256 /* harmony export */ });
2257 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2258 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2259 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives");
2260 /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__);
2261
2262 /**
2263 * External dependencies
2264 */
2265
2266 const sparkles = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, {
2267 viewBox: "0 0 24 24",
2268 fill: "none",
2269 xmlns: "http://www.w3.org/2000/svg"
2270 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
2271 d: "M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z",
2272 fill: "currentColor"
2273 }));
2274 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sparkles);
2275
2276 /***/ }),
2277
2278 /***/ "./assets/js/previews/grid-block.js":
2279 /*!******************************************!*\
2280 !*** ./assets/js/previews/grid-block.js ***!
2281 \******************************************/
2282 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2283
2284 "use strict";
2285 __webpack_require__.r(__webpack_exports__);
2286 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2287 /* harmony export */ gridBlockPreview: () => (/* binding */ gridBlockPreview)
2288 /* harmony export */ });
2289 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
2290 /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
2291
2292 /**
2293 * External dependencies
2294 */
2295 const gridBlockPreview = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
2296 xmlns: "http://www.w3.org/2000/svg",
2297 fill: "none",
2298 viewBox: "0 0 230 250",
2299 style: {
2300 width: '100%'
2301 }
2302 }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("title", null, "Grid Block Preview"), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2303 width: "65.374",
2304 height: "65.374",
2305 x: ".162",
2306 y: ".779",
2307 fill: "#E1E3E6",
2308 rx: "3"
2309 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2310 width: "47.266",
2311 height: "5.148",
2312 x: "9.216",
2313 y: "76.153",
2314 fill: "#E1E3E6",
2315 rx: "2.574"
2316 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2317 width: "62.8",
2318 height: "15",
2319 x: "1.565",
2320 y: "101.448",
2321 fill: "#E1E3E6",
2322 rx: "5"
2323 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2324 width: "65.374",
2325 height: "65.374",
2326 x: ".162",
2327 y: "136.277",
2328 fill: "#E1E3E6",
2329 rx: "3"
2330 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2331 width: "47.266",
2332 height: "5.148",
2333 x: "9.216",
2334 y: "211.651",
2335 fill: "#E1E3E6",
2336 rx: "2.574"
2337 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2338 width: "62.8",
2339 height: "15",
2340 x: "1.565",
2341 y: "236.946",
2342 fill: "#E1E3E6",
2343 rx: "5"
2344 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2345 width: "65.374",
2346 height: "65.374",
2347 x: "82.478",
2348 y: ".779",
2349 fill: "#E1E3E6",
2350 rx: "3"
2351 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2352 width: "47.266",
2353 height: "5.148",
2354 x: "91.532",
2355 y: "76.153",
2356 fill: "#E1E3E6",
2357 rx: "2.574"
2358 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2359 width: "62.8",
2360 height: "15",
2361 x: "83.882",
2362 y: "101.448",
2363 fill: "#E1E3E6",
2364 rx: "5"
2365 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2366 width: "65.374",
2367 height: "65.374",
2368 x: "82.478",
2369 y: "136.277",
2370 fill: "#E1E3E6",
2371 rx: "3"
2372 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2373 width: "47.266",
2374 height: "5.148",
2375 x: "91.532",
2376 y: "211.651",
2377 fill: "#E1E3E6",
2378 rx: "2.574"
2379 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2380 width: "62.8",
2381 height: "15",
2382 x: "83.882",
2383 y: "236.946",
2384 fill: "#E1E3E6",
2385 rx: "5"
2386 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2387 width: "65.374",
2388 height: "65.374",
2389 x: "164.788",
2390 y: ".779",
2391 fill: "#E1E3E6",
2392 rx: "3"
2393 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2394 width: "47.266",
2395 height: "5.148",
2396 x: "173.843",
2397 y: "76.153",
2398 fill: "#E1E3E6",
2399 rx: "2.574"
2400 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2401 width: "62.8",
2402 height: "15",
2403 x: "166.192",
2404 y: "101.448",
2405 fill: "#E1E3E6",
2406 rx: "5"
2407 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2408 width: "65.374",
2409 height: "65.374",
2410 x: "164.788",
2411 y: "136.277",
2412 fill: "#E1E3E6",
2413 rx: "3"
2414 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2415 width: "47.266",
2416 height: "5.148",
2417 x: "173.843",
2418 y: "211.651",
2419 fill: "#E1E3E6",
2420 rx: "2.574"
2421 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2422 width: "62.8",
2423 height: "15",
2424 x: "166.192",
2425 y: "236.946",
2426 fill: "#E1E3E6",
2427 rx: "5"
2428 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2429 width: "6.177",
2430 height: "6.177",
2431 x: "13.283",
2432 y: "86.301",
2433 fill: "#E1E3E6",
2434 rx: "3"
2435 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2436 width: "6.177",
2437 height: "6.177",
2438 x: "21.498",
2439 y: "86.301",
2440 fill: "#E1E3E6",
2441 rx: "3"
2442 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2443 width: "6.177",
2444 height: "6.177",
2445 x: "29.713",
2446 y: "86.301",
2447 fill: "#E1E3E6",
2448 rx: "3"
2449 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2450 width: "6.177",
2451 height: "6.177",
2452 x: "37.927",
2453 y: "86.301",
2454 fill: "#E1E3E6",
2455 rx: "3"
2456 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2457 width: "6.177",
2458 height: "6.177",
2459 x: "46.238",
2460 y: "86.301",
2461 fill: "#E1E3E6",
2462 rx: "3"
2463 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2464 width: "6.177",
2465 height: "6.177",
2466 x: "95.599",
2467 y: "86.301",
2468 fill: "#E1E3E6",
2469 rx: "3"
2470 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2471 width: "6.177",
2472 height: "6.177",
2473 x: "103.814",
2474 y: "86.301",
2475 fill: "#E1E3E6",
2476 rx: "3"
2477 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2478 width: "6.177",
2479 height: "6.177",
2480 x: "112.029",
2481 y: "86.301",
2482 fill: "#E1E3E6",
2483 rx: "3"
2484 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2485 width: "6.177",
2486 height: "6.177",
2487 x: "120.243",
2488 y: "86.301",
2489 fill: "#E1E3E6",
2490 rx: "3"
2491 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2492 width: "6.177",
2493 height: "6.177",
2494 x: "128.554",
2495 y: "86.301",
2496 fill: "#E1E3E6",
2497 rx: "3"
2498 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2499 width: "6.177",
2500 height: "6.177",
2501 x: "177.909",
2502 y: "86.301",
2503 fill: "#E1E3E6",
2504 rx: "3"
2505 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2506 width: "6.177",
2507 height: "6.177",
2508 x: "186.124",
2509 y: "86.301",
2510 fill: "#E1E3E6",
2511 rx: "3"
2512 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2513 width: "6.177",
2514 height: "6.177",
2515 x: "194.339",
2516 y: "86.301",
2517 fill: "#E1E3E6",
2518 rx: "3"
2519 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2520 width: "6.177",
2521 height: "6.177",
2522 x: "202.553",
2523 y: "86.301",
2524 fill: "#E1E3E6",
2525 rx: "3"
2526 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2527 width: "6.177",
2528 height: "6.177",
2529 x: "210.864",
2530 y: "86.301",
2531 fill: "#E1E3E6",
2532 rx: "3"
2533 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2534 width: "6.177",
2535 height: "6.177",
2536 x: "13.283",
2537 y: "221.798",
2538 fill: "#E1E3E6",
2539 rx: "3"
2540 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2541 width: "6.177",
2542 height: "6.177",
2543 x: "21.498",
2544 y: "221.798",
2545 fill: "#E1E3E6",
2546 rx: "3"
2547 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2548 width: "6.177",
2549 height: "6.177",
2550 x: "29.713",
2551 y: "221.798",
2552 fill: "#E1E3E6",
2553 rx: "3"
2554 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2555 width: "6.177",
2556 height: "6.177",
2557 x: "37.927",
2558 y: "221.798",
2559 fill: "#E1E3E6",
2560 rx: "3"
2561 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2562 width: "6.177",
2563 height: "6.177",
2564 x: "46.238",
2565 y: "221.798",
2566 fill: "#E1E3E6",
2567 rx: "3"
2568 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2569 width: "6.177",
2570 height: "6.177",
2571 x: "95.599",
2572 y: "221.798",
2573 fill: "#E1E3E6",
2574 rx: "3"
2575 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2576 width: "6.177",
2577 height: "6.177",
2578 x: "103.814",
2579 y: "221.798",
2580 fill: "#E1E3E6",
2581 rx: "3"
2582 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2583 width: "6.177",
2584 height: "6.177",
2585 x: "112.029",
2586 y: "221.798",
2587 fill: "#E1E3E6",
2588 rx: "3"
2589 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2590 width: "6.177",
2591 height: "6.177",
2592 x: "120.243",
2593 y: "221.798",
2594 fill: "#E1E3E6",
2595 rx: "3"
2596 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2597 width: "6.177",
2598 height: "6.177",
2599 x: "128.554",
2600 y: "221.798",
2601 fill: "#E1E3E6",
2602 rx: "3"
2603 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2604 width: "6.177",
2605 height: "6.177",
2606 x: "177.909",
2607 y: "221.798",
2608 fill: "#E1E3E6",
2609 rx: "3"
2610 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2611 width: "6.177",
2612 height: "6.177",
2613 x: "186.124",
2614 y: "221.798",
2615 fill: "#E1E3E6",
2616 rx: "3"
2617 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2618 width: "6.177",
2619 height: "6.177",
2620 x: "194.339",
2621 y: "221.798",
2622 fill: "#E1E3E6",
2623 rx: "3"
2624 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2625 width: "6.177",
2626 height: "6.177",
2627 x: "202.553",
2628 y: "221.798",
2629 fill: "#E1E3E6",
2630 rx: "3"
2631 }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", {
2632 width: "6.177",
2633 height: "6.177",
2634 x: "210.864",
2635 y: "221.798",
2636 fill: "#E1E3E6",
2637 rx: "3"
2638 }));
2639
2640 /***/ }),
2641
2642 /***/ "./assets/js/settings/blocks/constants.ts":
2643 /*!************************************************!*\
2644 !*** ./assets/js/settings/blocks/constants.ts ***!
2645 \************************************************/
2646 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2647
2648 "use strict";
2649 __webpack_require__.r(__webpack_exports__);
2650 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2651 /* harmony export */ ADDITIONAL_FIELDS_KEYS: () => (/* binding */ ADDITIONAL_FIELDS_KEYS),
2652 /* harmony export */ ADDRESS_FIELDS_KEYS: () => (/* binding */ ADDRESS_FIELDS_KEYS),
2653 /* harmony export */ ALLOWED_COUNTRIES: () => (/* binding */ ALLOWED_COUNTRIES),
2654 /* harmony export */ ALLOWED_STATES: () => (/* binding */ ALLOWED_STATES),
2655 /* harmony export */ CART_PAGE_ID: () => (/* binding */ CART_PAGE_ID),
2656 /* harmony export */ CART_URL: () => (/* binding */ CART_URL),
2657 /* harmony export */ CHECKOUT_PAGE_ID: () => (/* binding */ CHECKOUT_PAGE_ID),
2658 /* harmony export */ CHECKOUT_URL: () => (/* binding */ CHECKOUT_URL),
2659 /* harmony export */ CONTACT_FIELDS_KEYS: () => (/* binding */ CONTACT_FIELDS_KEYS),
2660 /* harmony export */ COUNTRY_LOCALE: () => (/* binding */ COUNTRY_LOCALE),
2661 /* harmony export */ LOCAL_PICKUP_ENABLED: () => (/* binding */ LOCAL_PICKUP_ENABLED),
2662 /* harmony export */ LOGIN_URL: () => (/* binding */ LOGIN_URL),
2663 /* harmony export */ PRIVACY_PAGE_NAME: () => (/* binding */ PRIVACY_PAGE_NAME),
2664 /* harmony export */ PRIVACY_URL: () => (/* binding */ PRIVACY_URL),
2665 /* harmony export */ SHIPPING_COUNTRIES: () => (/* binding */ SHIPPING_COUNTRIES),
2666 /* harmony export */ SHIPPING_STATES: () => (/* binding */ SHIPPING_STATES),
2667 /* harmony export */ SHOP_URL: () => (/* binding */ SHOP_URL),
2668 /* harmony export */ TERMS_PAGE_NAME: () => (/* binding */ TERMS_PAGE_NAME),
2669 /* harmony export */ TERMS_URL: () => (/* binding */ TERMS_URL),
2670 /* harmony export */ WC_BLOCKS_BUILD_URL: () => (/* binding */ WC_BLOCKS_BUILD_URL),
2671 /* harmony export */ WC_BLOCKS_IMAGE_URL: () => (/* binding */ WC_BLOCKS_IMAGE_URL),
2672 /* harmony export */ WC_BLOCKS_PHASE: () => (/* binding */ WC_BLOCKS_PHASE),
2673 /* harmony export */ blocksConfig: () => (/* binding */ blocksConfig)
2674 /* harmony export */ });
2675 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
2676 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__);
2677 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;
2678 /**
2679 * External dependencies
2680 */
2681
2682 const blocksConfig = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('wcBlocksConfig', {
2683 buildPhase: 1,
2684 pluginUrl: '',
2685 productCount: 0,
2686 defaultAvatar: '',
2687 restApiRoutes: {},
2688 wordCountType: 'words'
2689 });
2690 const WC_BLOCKS_IMAGE_URL = blocksConfig.pluginUrl + 'assets/images/';
2691 const WC_BLOCKS_BUILD_URL = blocksConfig.pluginUrl + 'assets/client/blocks/';
2692 const WC_BLOCKS_PHASE = blocksConfig.buildPhase;
2693 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;
2694 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;
2695 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;
2696 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;
2697 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;
2698 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;
2699 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;
2700 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;
2701 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;
2702 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');
2703 const LOCAL_PICKUP_ENABLED = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('localPickupEnabled', false);
2704 // Contains country names.
2705 const countries = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('countries', {});
2706
2707 // Contains country settings.
2708 const countryData = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('countryData', {});
2709 const ALLOWED_COUNTRIES = Object.fromEntries(Object.keys(countryData).filter(countryCode => {
2710 return countryData[countryCode].allowBilling === true;
2711 }).map(countryCode => {
2712 return [countryCode, countries[countryCode] || ''];
2713 }));
2714 const ALLOWED_STATES = Object.fromEntries(Object.keys(countryData).filter(countryCode => {
2715 return countryData[countryCode].allowBilling === true;
2716 }).map(countryCode => {
2717 return [countryCode, countryData[countryCode].states || []];
2718 }));
2719 const SHIPPING_COUNTRIES = Object.fromEntries(Object.keys(countryData).filter(countryCode => {
2720 return countryData[countryCode].allowShipping === true;
2721 }).map(countryCode => {
2722 return [countryCode, countries[countryCode] || ''];
2723 }));
2724 const SHIPPING_STATES = Object.fromEntries(Object.keys(countryData).filter(countryCode => {
2725 return countryData[countryCode].allowShipping === true;
2726 }).map(countryCode => {
2727 return [countryCode, countryData[countryCode].states || []];
2728 }));
2729 const COUNTRY_LOCALE = Object.fromEntries(Object.keys(countryData).map(countryCode => {
2730 return [countryCode, countryData[countryCode].locale || []];
2731 }));
2732 const defaultFieldsLocations = {
2733 address: ['first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'postcode', 'country', 'state', 'phone'],
2734 contact: ['email'],
2735 additional: []
2736 };
2737 const ADDRESS_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).address;
2738 const CONTACT_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).contact;
2739 const ADDITIONAL_FIELDS_KEYS = (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('addressFieldsLocations', defaultFieldsLocations).additional;
2740
2741 /***/ }),
2742
2743 /***/ "./assets/js/settings/blocks/feature-flags.ts":
2744 /*!****************************************************!*\
2745 !*** ./assets/js/settings/blocks/feature-flags.ts ***!
2746 \****************************************************/
2747 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2748
2749 "use strict";
2750 __webpack_require__.r(__webpack_exports__);
2751 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2752 /* harmony export */ isExperimentalBuild: () => (/* binding */ isExperimentalBuild),
2753 /* harmony export */ isFeaturePluginBuild: () => (/* binding */ isFeaturePluginBuild),
2754 /* harmony export */ registerExperimentalBlockType: () => (/* binding */ registerExperimentalBlockType),
2755 /* harmony export */ registerFeaturePluginBlockType: () => (/* binding */ registerFeaturePluginBlockType)
2756 /* harmony export */ });
2757 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks");
2758 /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__);
2759 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./assets/js/settings/blocks/constants.ts");
2760 /**
2761 * External dependencies
2762 */
2763
2764 /**
2765 * Internal dependencies
2766 */
2767
2768
2769 /**
2770 * Registers a new experimental block provided a unique name and an object defining its
2771 * behavior. Once registered, the block is made available as an option to any
2772 * editor interface where blocks are implemented.
2773 */
2774 const registerExperimentalBlockType = (blockNameOrMetadata, settings) => {
2775 if (_constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 2) {
2776 return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(blockNameOrMetadata, settings);
2777 }
2778 };
2779
2780 /**
2781 * Registers a new feature plugin block provided a unique name and an object
2782 * defining its behavior. Once registered, the block is made available as an
2783 * option to any editor interface where blocks are implemented.
2784 */
2785 const registerFeaturePluginBlockType = (blockNameOrMetadata, settings) => {
2786 if (_constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 1) {
2787 return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_0__.registerBlockType)(blockNameOrMetadata, settings);
2788 }
2789 };
2790
2791 /**
2792 * Checks if we're executing the code in an experimental build mode.
2793 *
2794 * @return {boolean} True if this is an experimental build, false otherwise.
2795 */
2796 const isExperimentalBuild = () => _constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 2;
2797
2798 /**
2799 * Checks if we're executing the code in an feature plugin or experimental build mode.
2800 *
2801 * @return {boolean} True if this is an experimental or feature plugin build, false otherwise.
2802 */
2803 const isFeaturePluginBuild = () => _constants__WEBPACK_IMPORTED_MODULE_1__.WC_BLOCKS_PHASE > 1;
2804
2805 /***/ }),
2806
2807 /***/ "./assets/js/settings/blocks/index.ts":
2808 /*!********************************************!*\
2809 !*** ./assets/js/settings/blocks/index.ts ***!
2810 \********************************************/
2811 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2812
2813 "use strict";
2814 __webpack_require__.r(__webpack_exports__);
2815 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2816 /* harmony export */ ADDITIONAL_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ADDITIONAL_FIELDS_KEYS),
2817 /* harmony export */ ADDRESS_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ADDRESS_FIELDS_KEYS),
2818 /* harmony export */ ALLOWED_COUNTRIES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ALLOWED_COUNTRIES),
2819 /* harmony export */ ALLOWED_STATES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.ALLOWED_STATES),
2820 /* harmony export */ CART_PAGE_ID: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CART_PAGE_ID),
2821 /* harmony export */ CART_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CART_URL),
2822 /* harmony export */ CHECKOUT_PAGE_ID: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CHECKOUT_PAGE_ID),
2823 /* harmony export */ CHECKOUT_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CHECKOUT_URL),
2824 /* harmony export */ CONTACT_FIELDS_KEYS: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.CONTACT_FIELDS_KEYS),
2825 /* harmony export */ COUNTRY_LOCALE: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.COUNTRY_LOCALE),
2826 /* harmony export */ LOCAL_PICKUP_ENABLED: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.LOCAL_PICKUP_ENABLED),
2827 /* harmony export */ LOGIN_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.LOGIN_URL),
2828 /* harmony export */ PRIVACY_PAGE_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.PRIVACY_PAGE_NAME),
2829 /* harmony export */ PRIVACY_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.PRIVACY_URL),
2830 /* harmony export */ SHIPPING_COUNTRIES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHIPPING_COUNTRIES),
2831 /* harmony export */ SHIPPING_STATES: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHIPPING_STATES),
2832 /* harmony export */ SHOP_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.SHOP_URL),
2833 /* harmony export */ TERMS_PAGE_NAME: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.TERMS_PAGE_NAME),
2834 /* harmony export */ TERMS_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.TERMS_URL),
2835 /* harmony export */ WC_BLOCKS_BUILD_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_BUILD_URL),
2836 /* harmony export */ WC_BLOCKS_IMAGE_URL: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_IMAGE_URL),
2837 /* harmony export */ WC_BLOCKS_PHASE: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.WC_BLOCKS_PHASE),
2838 /* harmony export */ blocksConfig: () => (/* reexport safe */ _constants__WEBPACK_IMPORTED_MODULE_0__.blocksConfig),
2839 /* harmony export */ isExperimentalBuild: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.isExperimentalBuild),
2840 /* harmony export */ isFeaturePluginBuild: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.isFeaturePluginBuild),
2841 /* harmony export */ registerExperimentalBlockType: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.registerExperimentalBlockType),
2842 /* harmony export */ registerFeaturePluginBlockType: () => (/* reexport safe */ _feature_flags__WEBPACK_IMPORTED_MODULE_1__.registerFeaturePluginBlockType)
2843 /* harmony export */ });
2844 /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constants */ "./assets/js/settings/blocks/constants.ts");
2845 /* harmony import */ var _feature_flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./feature-flags */ "./assets/js/settings/blocks/feature-flags.ts");
2846 /**
2847 * Internal dependencies
2848 */
2849
2850
2851
2852 /***/ }),
2853
2854 /***/ "./assets/js/utils/array-operations.ts":
2855 /*!*********************************************!*\
2856 !*** ./assets/js/utils/array-operations.ts ***!
2857 \*********************************************/
2858 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2859
2860 "use strict";
2861 __webpack_require__.r(__webpack_exports__);
2862 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2863 /* harmony export */ arrayDifferenceBy: () => (/* binding */ arrayDifferenceBy),
2864 /* harmony export */ arrayUnionBy: () => (/* binding */ arrayUnionBy)
2865 /* harmony export */ });
2866 /**
2867 * Returns the difference between two arrays (A - B)
2868 */
2869 function arrayDifferenceBy(a, b, key) {
2870 const keys = new Set(b.map(item => item[key]));
2871 return a.filter(item => !keys.has(item[key]));
2872 }
2873
2874 /**
2875 * Returns the union of two arrays (A ∪ B)
2876 */
2877 function arrayUnionBy(a, b, key) {
2878 const difference = arrayDifferenceBy(b, a, key);
2879 return [...a, ...difference];
2880 }
2881
2882 /***/ }),
2883
2884 /***/ "./assets/js/utils/products.ts":
2885 /*!*************************************!*\
2886 !*** ./assets/js/utils/products.ts ***!
2887 \*************************************/
2888 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2889
2890 "use strict";
2891 __webpack_require__.r(__webpack_exports__);
2892 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2893 /* harmony export */ convertProductCategoryResponseItemToSearchItem: () => (/* binding */ convertProductCategoryResponseItemToSearchItem),
2894 /* harmony export */ convertProductResponseItemToSearchItem: () => (/* binding */ convertProductResponseItemToSearchItem),
2895 /* harmony export */ getImageIdFromProduct: () => (/* binding */ getImageIdFromProduct),
2896 /* harmony export */ getImageSrcFromProduct: () => (/* binding */ getImageSrcFromProduct)
2897 /* harmony export */ });
2898 /**
2899 * External dependencies
2900 */
2901
2902 /**
2903 * Converts a Product object into a shape compatible with the `SearchListControl`
2904 */
2905 const convertProductResponseItemToSearchItem = product => {
2906 const {
2907 id,
2908 name,
2909 parent
2910 } = product;
2911 return {
2912 id,
2913 name,
2914 parent,
2915 breadcrumbs: [],
2916 children: [],
2917 details: product,
2918 value: product.slug
2919 };
2920 };
2921
2922 /**
2923 * Converts a Product Category object into a shape compatible with the `SearchListControl`
2924 */
2925 const convertProductCategoryResponseItemToSearchItem = category => {
2926 const {
2927 id,
2928 name,
2929 parent,
2930 count
2931 } = category;
2932 return {
2933 id,
2934 name,
2935 parent,
2936 count,
2937 breadcrumbs: [],
2938 children: [],
2939 details: category,
2940 value: category.slug
2941 };
2942 };
2943
2944 /**
2945 * Get the src of the first image attached to a product (the featured image).
2946 */
2947 function getImageSrcFromProduct(product) {
2948 if (!product || !product.images || !product.images.length) {
2949 return '';
2950 }
2951 return product.images[0].src || '';
2952 }
2953
2954 /**
2955 * Get the ID of the first image attached to a product (the featured image).
2956 */
2957 function getImageIdFromProduct(product) {
2958 if (!product || !product.images || !product.images.length) {
2959 return 0;
2960 }
2961 return product.images[0].id || 0;
2962 }
2963
2964 /***/ }),
2965
2966 /***/ "./assets/js/utils/shared-attributes.js":
2967 /*!**********************************************!*\
2968 !*** ./assets/js/utils/shared-attributes.js ***!
2969 \**********************************************/
2970 /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2971
2972 "use strict";
2973 __webpack_require__.r(__webpack_exports__);
2974 /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2975 /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
2976 /* harmony export */ sharedAttributeBlockTypes: () => (/* binding */ sharedAttributeBlockTypes)
2977 /* harmony export */ });
2978 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @woocommerce/settings */ "@woocommerce/settings");
2979 /* harmony import */ var _woocommerce_settings__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__);
2980 /**
2981 * External dependencies
2982 */
2983
2984 const sharedAttributeBlockTypes = ['woocommerce/product-best-sellers', 'woocommerce/product-category', 'woocommerce/product-new', 'woocommerce/product-on-sale', 'woocommerce/product-top-rated'];
2985 /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
2986 /**
2987 * Number of columns.
2988 */
2989 columns: {
2990 type: 'number',
2991 default: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('defaultColumns', 3)
2992 },
2993 /**
2994 * Number of rows.
2995 */
2996 rows: {
2997 type: 'number',
2998 default: (0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('defaultRows', 3)
2999 },
3000 /**
3001 * How to align cart buttons.
3002 */
3003 alignButtons: {
3004 type: 'boolean',
3005 default: false
3006 },
3007 /**
3008 * Product category, used to display only products in the given categories.
3009 */
3010 categories: {
3011 type: 'array',
3012 default: []
3013 },
3014 /**
3015 * Product category operator, used to restrict to products in all or any selected categories.
3016 */
3017 catOperator: {
3018 type: 'string',
3019 default: 'any'
3020 },
3021 /**
3022 * Content visibility setting
3023 */
3024 contentVisibility: {
3025 type: 'object',
3026 default: {
3027 image: true,
3028 title: true,
3029 price: true,
3030 rating: true,
3031 button: true
3032 }
3033 },
3034 /**
3035 * Are we previewing?
3036 */
3037 isPreview: {
3038 type: 'boolean',
3039 default: false
3040 },
3041 /**
3042 * Whether to display in stock, out of stock or backorder products.
3043 */
3044 stockStatus: {
3045 type: 'array',
3046 default: Object.keys((0,_woocommerce_settings__WEBPACK_IMPORTED_MODULE_0__.getSetting)('stockStatusOptions', []))
3047 }
3048 });
3049
3050 /***/ }),
3051
3052 /***/ "./assets/js/editor-components/product-category-control/style.scss":
3053 /*!*************************************************************************!*\
3054 !*** ./assets/js/editor-components/product-category-control/style.scss ***!
3055 \*************************************************************************/
3056 /***/ (() => {
3057
3058
3059
3060 /***/ }),
3061
3062 /***/ "./assets/js/editor-components/search-list-control/style.scss":
3063 /*!********************************************************************!*\
3064 !*** ./assets/js/editor-components/search-list-control/style.scss ***!
3065 \********************************************************************/
3066 /***/ (() => {
3067
3068
3069
3070 /***/ }),
3071
3072 /***/ "./assets/js/editor-components/tag/editor.scss":
3073 /*!*****************************************************!*\
3074 !*** ./assets/js/editor-components/tag/editor.scss ***!
3075 \*****************************************************/
3076 /***/ (() => {
3077
3078
3079
3080 /***/ }),
3081
3082 /***/ "react":
3083 /*!************************!*\
3084 !*** external "React" ***!
3085 \************************/
3086 /***/ ((module) => {
3087
3088 "use strict";
3089 module.exports = window["React"];
3090
3091 /***/ }),
3092
3093 /***/ "@woocommerce/settings":
3094 /*!************************************!*\
3095 !*** external ["wc","wcSettings"] ***!
3096 \************************************/
3097 /***/ ((module) => {
3098
3099 "use strict";
3100 module.exports = window["wc"]["wcSettings"];
3101
3102 /***/ }),
3103
3104 /***/ "@wordpress/api-fetch":
3105 /*!**********************************!*\
3106 !*** external ["wp","apiFetch"] ***!
3107 \**********************************/
3108 /***/ ((module) => {
3109
3110 "use strict";
3111 module.exports = window["wp"]["apiFetch"];
3112
3113 /***/ }),
3114
3115 /***/ "@wordpress/block-editor":
3116 /*!*************************************!*\
3117 !*** external ["wp","blockEditor"] ***!
3118 \*************************************/
3119 /***/ ((module) => {
3120
3121 "use strict";
3122 module.exports = window["wp"]["blockEditor"];
3123
3124 /***/ }),
3125
3126 /***/ "@wordpress/blocks":
3127 /*!********************************!*\
3128 !*** external ["wp","blocks"] ***!
3129 \********************************/
3130 /***/ ((module) => {
3131
3132 "use strict";
3133 module.exports = window["wp"]["blocks"];
3134
3135 /***/ }),
3136
3137 /***/ "@wordpress/components":
3138 /*!************************************!*\
3139 !*** external ["wp","components"] ***!
3140 \************************************/
3141 /***/ ((module) => {
3142
3143 "use strict";
3144 module.exports = window["wp"]["components"];
3145
3146 /***/ }),
3147
3148 /***/ "@wordpress/compose":
3149 /*!*********************************!*\
3150 !*** external ["wp","compose"] ***!
3151 \*********************************/
3152 /***/ ((module) => {
3153
3154 "use strict";
3155 module.exports = window["wp"]["compose"];
3156
3157 /***/ }),
3158
3159 /***/ "@wordpress/element":
3160 /*!*********************************!*\
3161 !*** external ["wp","element"] ***!
3162 \*********************************/
3163 /***/ ((module) => {
3164
3165 "use strict";
3166 module.exports = window["wp"]["element"];
3167
3168 /***/ }),
3169
3170 /***/ "@wordpress/escape-html":
3171 /*!************************************!*\
3172 !*** external ["wp","escapeHtml"] ***!
3173 \************************************/
3174 /***/ ((module) => {
3175
3176 "use strict";
3177 module.exports = window["wp"]["escapeHtml"];
3178
3179 /***/ }),
3180
3181 /***/ "@wordpress/html-entities":
3182 /*!**************************************!*\
3183 !*** external ["wp","htmlEntities"] ***!
3184 \**************************************/
3185 /***/ ((module) => {
3186
3187 "use strict";
3188 module.exports = window["wp"]["htmlEntities"];
3189
3190 /***/ }),
3191
3192 /***/ "@wordpress/i18n":
3193 /*!******************************!*\
3194 !*** external ["wp","i18n"] ***!
3195 \******************************/
3196 /***/ ((module) => {
3197
3198 "use strict";
3199 module.exports = window["wp"]["i18n"];
3200
3201 /***/ }),
3202
3203 /***/ "@wordpress/primitives":
3204 /*!************************************!*\
3205 !*** external ["wp","primitives"] ***!
3206 \************************************/
3207 /***/ ((module) => {
3208
3209 "use strict";
3210 module.exports = window["wp"]["primitives"];
3211
3212 /***/ }),
3213
3214 /***/ "@wordpress/server-side-render":
3215 /*!******************************************!*\
3216 !*** external ["wp","serverSideRender"] ***!
3217 \******************************************/
3218 /***/ ((module) => {
3219
3220 "use strict";
3221 module.exports = window["wp"]["serverSideRender"];
3222
3223 /***/ }),
3224
3225 /***/ "@wordpress/url":
3226 /*!*****************************!*\
3227 !*** external ["wp","url"] ***!
3228 \*****************************/
3229 /***/ ((module) => {
3230
3231 "use strict";
3232 module.exports = window["wp"]["url"];
3233
3234 /***/ }),
3235
3236 /***/ "./assets/js/blocks/product-new/block.json":
3237 /*!*************************************************!*\
3238 !*** ./assets/js/blocks/product-new/block.json ***!
3239 \*************************************************/
3240 /***/ ((module) => {
3241
3242 "use strict";
3243 module.exports = JSON.parse('{"name":"woocommerce/product-new","title":"Newest Products","category":"woocommerce","keywords":["WooCommerce"],"description":"Display a grid of your newest products.","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"}');
3244
3245 /***/ })
3246
3247 /******/ });
3248 /************************************************************************/
3249 /******/ // The module cache
3250 /******/ var __webpack_module_cache__ = {};
3251 /******/
3252 /******/ // The require function
3253 /******/ function __webpack_require__(moduleId) {
3254 /******/ // Check if module is in cache
3255 /******/ var cachedModule = __webpack_module_cache__[moduleId];
3256 /******/ if (cachedModule !== undefined) {
3257 /******/ return cachedModule.exports;
3258 /******/ }
3259 /******/ // Create a new module (and put it into the cache)
3260 /******/ var module = __webpack_module_cache__[moduleId] = {
3261 /******/ // no module.id needed
3262 /******/ // no module.loaded needed
3263 /******/ exports: {}
3264 /******/ };
3265 /******/
3266 /******/ // Execute the module function
3267 /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
3268 /******/
3269 /******/ // Return the exports of the module
3270 /******/ return module.exports;
3271 /******/ }
3272 /******/
3273 /******/ // expose the modules object (__webpack_modules__)
3274 /******/ __webpack_require__.m = __webpack_modules__;
3275 /******/
3276 /************************************************************************/
3277 /******/ /* webpack/runtime/chunk loaded */
3278 /******/ (() => {
3279 /******/ var deferred = [];
3280 /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => {
3281 /******/ if(chunkIds) {
3282 /******/ priority = priority || 0;
3283 /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
3284 /******/ deferred[i] = [chunkIds, fn, priority];
3285 /******/ return;
3286 /******/ }
3287 /******/ var notFulfilled = Infinity;
3288 /******/ for (var i = 0; i < deferred.length; i++) {
3289 /******/ var [chunkIds, fn, priority] = deferred[i];
3290 /******/ var fulfilled = true;
3291 /******/ for (var j = 0; j < chunkIds.length; j++) {
3292 /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {
3293 /******/ chunkIds.splice(j--, 1);
3294 /******/ } else {
3295 /******/ fulfilled = false;
3296 /******/ if(priority < notFulfilled) notFulfilled = priority;
3297 /******/ }
3298 /******/ }
3299 /******/ if(fulfilled) {
3300 /******/ deferred.splice(i--, 1)
3301 /******/ var r = fn();
3302 /******/ if (r !== undefined) result = r;
3303 /******/ }
3304 /******/ }
3305 /******/ return result;
3306 /******/ };
3307 /******/ })();
3308 /******/
3309 /******/ /* webpack/runtime/compat get default export */
3310 /******/ (() => {
3311 /******/ // getDefaultExport function for compatibility with non-harmony modules
3312 /******/ __webpack_require__.n = (module) => {
3313 /******/ var getter = module && module.__esModule ?
3314 /******/ () => (module['default']) :
3315 /******/ () => (module);
3316 /******/ __webpack_require__.d(getter, { a: getter });
3317 /******/ return getter;
3318 /******/ };
3319 /******/ })();
3320 /******/
3321 /******/ /* webpack/runtime/define property getters */
3322 /******/ (() => {
3323 /******/ // define getter functions for harmony exports
3324 /******/ __webpack_require__.d = (exports, definition) => {
3325 /******/ for(var key in definition) {
3326 /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
3327 /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
3328 /******/ }
3329 /******/ }
3330 /******/ };
3331 /******/ })();
3332 /******/
3333 /******/ /* webpack/runtime/global */
3334 /******/ (() => {
3335 /******/ __webpack_require__.g = (function() {
3336 /******/ if (typeof globalThis === 'object') return globalThis;
3337 /******/ try {
3338 /******/ return this || new Function('return this')();
3339 /******/ } catch (e) {
3340 /******/ if (typeof window === 'object') return window;
3341 /******/ }
3342 /******/ })();
3343 /******/ })();
3344 /******/
3345 /******/ /* webpack/runtime/hasOwnProperty shorthand */
3346 /******/ (() => {
3347 /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
3348 /******/ })();
3349 /******/
3350 /******/ /* webpack/runtime/make namespace object */
3351 /******/ (() => {
3352 /******/ // define __esModule on exports
3353 /******/ __webpack_require__.r = (exports) => {
3354 /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
3355 /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3356 /******/ }
3357 /******/ Object.defineProperty(exports, '__esModule', { value: true });
3358 /******/ };
3359 /******/ })();
3360 /******/
3361 /******/ /* webpack/runtime/jsonp chunk loading */
3362 /******/ (() => {
3363 /******/ // no baseURI
3364 /******/
3365 /******/ // object to store loaded and loading chunks
3366 /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
3367 /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
3368 /******/ var installedChunks = {
3369 /******/ "product-new": 0
3370 /******/ };
3371 /******/
3372 /******/ // no chunk on demand loading
3373 /******/
3374 /******/ // no prefetching
3375 /******/
3376 /******/ // no preloaded
3377 /******/
3378 /******/ // no HMR
3379 /******/
3380 /******/ // no HMR manifest
3381 /******/
3382 /******/ __webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);
3383 /******/
3384 /******/ // install a JSONP callback for chunk loading
3385 /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
3386 /******/ var [chunkIds, moreModules, runtime] = data;
3387 /******/ // add "moreModules" to the modules object,
3388 /******/ // then flag all "chunkIds" as loaded and fire callback
3389 /******/ var moduleId, chunkId, i = 0;
3390 /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
3391 /******/ for(moduleId in moreModules) {
3392 /******/ if(__webpack_require__.o(moreModules, moduleId)) {
3393 /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
3394 /******/ }
3395 /******/ }
3396 /******/ if(runtime) var result = runtime(__webpack_require__);
3397 /******/ }
3398 /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
3399 /******/ for(;i < chunkIds.length; i++) {
3400 /******/ chunkId = chunkIds[i];
3401 /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
3402 /******/ installedChunks[chunkId][0]();
3403 /******/ }
3404 /******/ installedChunks[chunkId] = 0;
3405 /******/ }
3406 /******/ return __webpack_require__.O(result);
3407 /******/ }
3408 /******/
3409 /******/ var chunkLoadingGlobal = self["webpackChunkwebpackWcBlocksJsonp"] = self["webpackChunkwebpackWcBlocksJsonp"] || [];
3410 /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
3411 /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
3412 /******/ })();
3413 /******/
3414 /************************************************************************/
3415 /******/
3416 /******/ // startup
3417 /******/ // Load entry module and return exports
3418 /******/ // This entry module depends on other loaded chunks and execution need to be delayed
3419 /******/ var __webpack_exports__ = __webpack_require__.O(undefined, ["wc-blocks-vendors"], () => (__webpack_require__("./assets/js/blocks/product-new/index.tsx")))
3420 /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
3421 /******/ ((this.wc = this.wc || {}).blocks = this.wc.blocks || {})["product-new"] = __webpack_exports__;
3422 /******/
3423 /******/ })()
3424 ;
3425 //# sourceMappingURL=product-new.js.map