Version Description
- 2021-02-05 =
Bug Fixes
- Adds a default "features" array for payment methods which do not define supported features. Fixes conflicts with 3rd Party payment method integrations.
Download this release
Release Info
Developer | automattic |
Plugin | WooCommerce Gutenberg Products Block |
Version | 4.4.2 |
Comparing to | |
See all releases |
Code changes from version 4.4.0 to 4.4.2
- assets/js/atomic/blocks/product-elements/price/block.js +1 -1
- assets/js/base/components/cart-checkout/form-step/style.scss +0 -4
- assets/js/base/components/cart-checkout/order-summary/order-summary-item.js +1 -1
- assets/js/base/components/payment-methods/{payment-method-tab.js → payment-method-card.js} +6 -7
- assets/js/base/components/payment-methods/payment-method-options.js +49 -46
- assets/js/base/components/payment-methods/payment-methods.js +24 -12
- assets/js/base/components/payment-methods/saved-payment-method-options.js +17 -27
- assets/js/base/components/payment-methods/style.scss +64 -0
- assets/js/base/components/payment-methods/test/payment-methods.js +48 -32
- assets/js/base/components/radio-control-accordion/index.js +73 -0
- assets/js/base/components/radio-control/option.js +6 -1
- assets/js/base/context/cart-checkout/payment-methods/constants.js +2 -0
- assets/js/base/context/cart-checkout/payment-methods/payment-method-data-context.js +6 -0
- assets/js/base/hooks/payment-methods/use-payment-method-interface.js +1 -1
- assets/js/blocks-registry/payment-methods/express-payment-method-config.js +6 -3
- assets/js/blocks-registry/payment-methods/payment-method-config.js +6 -3
- assets/js/blocks/active-filters/utils.js +1 -1
- assets/js/blocks/cart-checkout/cart/full-cart/cart-line-item-row.js +1 -1
- assets/js/blocks/cart-checkout/cart/full-cart/index.js +2 -1
- assets/js/blocks/cart-checkout/checkout/block.js +1 -1
- assets/js/blocks/cart-checkout/checkout/form/order-notes-step.js +1 -0
- assets/js/blocks/cart-checkout/checkout/form/order-notes/style.scss +6 -2
- assets/js/blocks/cart-checkout/checkout/form/shipping-options-step.js +1 -1
- assets/js/blocks/cart-checkout/checkout/sidebar/index.js +1 -1
- assets/js/blocks/cart-checkout/checkout/style.scss +7 -4
- assets/js/blocks/price-filter/block.js +1 -1
- assets/js/type-defs/contexts.js +3 -0
- build/active-filters-frontend.asset.php +1 -1
- build/active-filters-frontend.js +2 -2
- build/active-filters.asset.php +1 -1
- build/active-filters.js +1 -1
- build/all-products-frontend.asset.php +1 -1
- build/all-products-frontend.js +2 -2
- build/all-products.asset.php +1 -1
- build/all-products.js +1 -1
- build/all-reviews.asset.php +1 -1
- build/all-reviews.js +1 -1
- build/atomic-block-components/add-to-cart--atomic-block-components/button.js +1 -1
- build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js +1 -1
- build/atomic-block-components/add-to-cart-frontend.js +1 -1
- build/atomic-block-components/add-to-cart.js +1 -1
- build/atomic-block-components/button-frontend.js +1 -1
- build/atomic-block-components/button.js +1 -1
- build/atomic-block-components/category-list-frontend.js +1 -1
- build/atomic-block-components/category-list.js +1 -1
- build/atomic-block-components/image-frontend.js +1 -1
- build/atomic-block-components/image.js +1 -1
- build/atomic-block-components/price-frontend.js +1 -1
- build/atomic-block-components/price.js +1 -1
- build/atomic-block-components/rating-frontend.js +1 -1
- build/atomic-block-components/rating.js +1 -1
- build/atomic-block-components/sale-badge-frontend.js +1 -1
- build/atomic-block-components/sale-badge.js +1 -1
- build/atomic-block-components/sku-frontend.js +1 -1
- build/atomic-block-components/sku.js +1 -1
- build/atomic-block-components/stock-indicator-frontend.js +1 -1
- build/atomic-block-components/stock-indicator.js +1 -1
- build/atomic-block-components/summary-frontend.js +1 -1
- build/atomic-block-components/summary.js +1 -1
- build/atomic-block-components/tag-list-frontend.js +1 -1
- build/atomic-block-components/tag-list.js +1 -1
- build/atomic-block-components/title-frontend.js +1 -1
- build/atomic-block-components/title.js +1 -1
- build/attribute-filter-frontend.asset.php +1 -1
- build/attribute-filter-frontend.js +2 -3
assets/js/atomic/blocks/product-elements/price/block.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
import PropTypes from 'prop-types';
|
5 |
import classnames from 'classnames';
|
6 |
import ProductPrice from '@woocommerce/base-components/product-price';
|
7 |
-
import { getCurrencyFromPriceResponse } from '@woocommerce/
|
8 |
import {
|
9 |
useInnerBlockLayoutContext,
|
10 |
useProductDataContext,
|
4 |
import PropTypes from 'prop-types';
|
5 |
import classnames from 'classnames';
|
6 |
import ProductPrice from '@woocommerce/base-components/product-price';
|
7 |
+
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
8 |
import {
|
9 |
useInnerBlockLayoutContext,
|
10 |
useProductDataContext,
|
assets/js/base/components/cart-checkout/form-step/style.scss
CHANGED
@@ -94,8 +94,4 @@
|
|
94 |
left: -$gap-larger/2;
|
95 |
top: 0;
|
96 |
}
|
97 |
-
|
98 |
-
&:last-of-type .wc-block-components-checkout-step__container::after {
|
99 |
-
content: none;
|
100 |
-
}
|
101 |
}
|
94 |
left: -$gap-larger/2;
|
95 |
top: 0;
|
96 |
}
|
|
|
|
|
|
|
|
|
97 |
}
|
assets/js/base/components/cart-checkout/order-summary/order-summary-item.js
CHANGED
@@ -5,7 +5,7 @@ import { __, sprintf } from '@wordpress/i18n';
|
|
5 |
import Label from '@woocommerce/base-components/label';
|
6 |
import ProductPrice from '@woocommerce/base-components/product-price';
|
7 |
import ProductName from '@woocommerce/base-components/product-name';
|
8 |
-
import { getCurrency } from '@woocommerce/
|
9 |
import PropTypes from 'prop-types';
|
10 |
import Dinero from 'dinero.js';
|
11 |
|
5 |
import Label from '@woocommerce/base-components/label';
|
6 |
import ProductPrice from '@woocommerce/base-components/product-price';
|
7 |
import ProductName from '@woocommerce/base-components/product-name';
|
8 |
+
import { getCurrency } from '@woocommerce/price-format';
|
9 |
import PropTypes from 'prop-types';
|
10 |
import Dinero from 'dinero.js';
|
11 |
|
assets/js/base/components/payment-methods/{payment-method-tab.js → payment-method-card.js}
RENAMED
@@ -16,17 +16,16 @@ import PropTypes from 'prop-types';
|
|
16 |
import PaymentMethodErrorBoundary from './payment-method-error-boundary';
|
17 |
|
18 |
/**
|
19 |
-
* Component used to render the contents of a payment method
|
20 |
*
|
21 |
* @param {Object} props Incoming props for the component.
|
22 |
* @param {boolean} props.showSaveOption Whether that payment method allows saving
|
23 |
-
* the data for future purchases
|
24 |
-
*
|
25 |
-
* @param {Object} props.children Content of the payment method tab.
|
26 |
*
|
27 |
* @return {*} The rendered component.
|
28 |
*/
|
29 |
-
const
|
30 |
const { isEditor } = useEditorContext();
|
31 |
const {
|
32 |
shouldSavePayment,
|
@@ -54,9 +53,9 @@ const PaymentMethodTab = ( { children, showSaveOption } ) => {
|
|
54 |
);
|
55 |
};
|
56 |
|
57 |
-
|
58 |
showSaveOption: PropTypes.bool,
|
59 |
children: PropTypes.node,
|
60 |
};
|
61 |
|
62 |
-
export default
|
16 |
import PaymentMethodErrorBoundary from './payment-method-error-boundary';
|
17 |
|
18 |
/**
|
19 |
+
* Component used to render the contents of a payment method card.
|
20 |
*
|
21 |
* @param {Object} props Incoming props for the component.
|
22 |
* @param {boolean} props.showSaveOption Whether that payment method allows saving
|
23 |
+
* the data for future purchases.
|
24 |
+
* @param {Object} props.children Content of the payment method card.
|
|
|
25 |
*
|
26 |
* @return {*} The rendered component.
|
27 |
*/
|
28 |
+
const PaymentMethodCard = ( { children, showSaveOption } ) => {
|
29 |
const { isEditor } = useEditorContext();
|
30 |
const {
|
31 |
shouldSavePayment,
|
53 |
);
|
54 |
};
|
55 |
|
56 |
+
PaymentMethodCard.propTypes = {
|
57 |
showSaveOption: PropTypes.bool,
|
58 |
children: PropTypes.node,
|
59 |
};
|
60 |
|
61 |
+
export default PaymentMethodCard;
|
assets/js/base/components/payment-methods/payment-method-options.js
CHANGED
@@ -8,17 +8,17 @@ import {
|
|
8 |
useEmitResponse,
|
9 |
} from '@woocommerce/base-hooks';
|
10 |
import { cloneElement } from '@wordpress/element';
|
11 |
-
import { __ } from '@wordpress/i18n';
|
12 |
import {
|
13 |
useEditorContext,
|
14 |
usePaymentMethodDataContext,
|
15 |
} from '@woocommerce/base-context';
|
|
|
16 |
|
17 |
/**
|
18 |
* Internal dependencies
|
19 |
*/
|
20 |
-
import
|
21 |
-
import
|
22 |
|
23 |
/**
|
24 |
* Component used to render all non-saved payment method options.
|
@@ -28,7 +28,10 @@ import PaymentMethodTab from './payment-method-tab';
|
|
28 |
const PaymentMethodOptions = () => {
|
29 |
const {
|
30 |
setActivePaymentMethod,
|
|
|
|
|
31 |
expressPaymentMethods,
|
|
|
32 |
} = usePaymentMethodDataContext();
|
33 |
const { paymentMethods } = usePaymentMethods();
|
34 |
const {
|
@@ -42,50 +45,50 @@ const PaymentMethodOptions = () => {
|
|
42 |
const { removeNotice } = useStoreNotices();
|
43 |
const { isEditor } = useEditorContext();
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
return expressPaymentMethodActive ? null : (
|
46 |
-
<
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
tabs={ Object.keys( paymentMethods ).map( ( name ) => {
|
53 |
-
const {
|
54 |
-
ariaLabel,
|
55 |
-
edit,
|
56 |
-
content,
|
57 |
-
label,
|
58 |
-
supports,
|
59 |
-
} = paymentMethods[ name ];
|
60 |
-
const component = isEditor ? edit : content;
|
61 |
-
return {
|
62 |
-
name,
|
63 |
-
title:
|
64 |
-
typeof label === 'string'
|
65 |
-
? label
|
66 |
-
: cloneElement( label, {
|
67 |
-
components:
|
68 |
-
paymentMethodInterface.components,
|
69 |
-
} ),
|
70 |
-
ariaLabel,
|
71 |
-
content: (
|
72 |
-
<PaymentMethodTab
|
73 |
-
showSaveOption={ supports.showSaveOption }
|
74 |
-
>
|
75 |
-
{ cloneElement( component, {
|
76 |
-
activePaymentMethod,
|
77 |
-
...paymentMethodInterface,
|
78 |
-
} ) }
|
79 |
-
</PaymentMethodTab>
|
80 |
-
),
|
81 |
-
};
|
82 |
-
} ) }
|
83 |
-
initialTabName={ activePaymentMethod }
|
84 |
-
ariaLabel={ __(
|
85 |
-
'Payment Methods',
|
86 |
-
'woo-gutenberg-products-block'
|
87 |
-
) }
|
88 |
-
id="wc-block-payment-methods"
|
89 |
/>
|
90 |
);
|
91 |
};
|
8 |
useEmitResponse,
|
9 |
} from '@woocommerce/base-hooks';
|
10 |
import { cloneElement } from '@wordpress/element';
|
|
|
11 |
import {
|
12 |
useEditorContext,
|
13 |
usePaymentMethodDataContext,
|
14 |
} from '@woocommerce/base-context';
|
15 |
+
import classNames from 'classnames';
|
16 |
|
17 |
/**
|
18 |
* Internal dependencies
|
19 |
*/
|
20 |
+
import PaymentMethodCard from './payment-method-card';
|
21 |
+
import RadioControlAccordion from '../radio-control-accordion';
|
22 |
|
23 |
/**
|
24 |
* Component used to render all non-saved payment method options.
|
28 |
const PaymentMethodOptions = () => {
|
29 |
const {
|
30 |
setActivePaymentMethod,
|
31 |
+
activeSavedToken,
|
32 |
+
setActiveSavedToken,
|
33 |
expressPaymentMethods,
|
34 |
+
customerPaymentMethods,
|
35 |
} = usePaymentMethodDataContext();
|
36 |
const { paymentMethods } = usePaymentMethods();
|
37 |
const {
|
45 |
const { removeNotice } = useStoreNotices();
|
46 |
const { isEditor } = useEditorContext();
|
47 |
|
48 |
+
const options = Object.keys( paymentMethods ).map( ( name ) => {
|
49 |
+
const { edit, content, label, supports } = paymentMethods[ name ];
|
50 |
+
const component = isEditor ? edit : content;
|
51 |
+
return {
|
52 |
+
value: name,
|
53 |
+
label:
|
54 |
+
typeof label === 'string'
|
55 |
+
? label
|
56 |
+
: cloneElement( label, {
|
57 |
+
components: paymentMethodInterface.components,
|
58 |
+
} ),
|
59 |
+
name: `wc-saved-payment-method-token-${ name }`,
|
60 |
+
content: (
|
61 |
+
<PaymentMethodCard allowsSaving={ supports.savePaymentInfo }>
|
62 |
+
{ cloneElement( component, {
|
63 |
+
activePaymentMethod,
|
64 |
+
...paymentMethodInterface,
|
65 |
+
} ) }
|
66 |
+
</PaymentMethodCard>
|
67 |
+
),
|
68 |
+
};
|
69 |
+
} );
|
70 |
+
|
71 |
+
const updateToken = ( value ) => {
|
72 |
+
setActivePaymentMethod( value );
|
73 |
+
setActiveSavedToken( '' );
|
74 |
+
removeNotice( 'wc-payment-error', noticeContexts.PAYMENTS );
|
75 |
+
};
|
76 |
+
|
77 |
+
const isSinglePaymentMethod =
|
78 |
+
Object.keys( customerPaymentMethods ).length === 0 &&
|
79 |
+
Object.keys( paymentMethods ).length === 1;
|
80 |
+
|
81 |
+
const singleOptionClass = classNames( {
|
82 |
+
'disable-radio-control': isSinglePaymentMethod,
|
83 |
+
} );
|
84 |
+
|
85 |
return expressPaymentMethodActive ? null : (
|
86 |
+
<RadioControlAccordion
|
87 |
+
id={ 'wc-payment-method-options' }
|
88 |
+
className={ singleOptionClass }
|
89 |
+
selected={ activeSavedToken ? null : activePaymentMethod }
|
90 |
+
onChange={ updateToken }
|
91 |
+
options={ options }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
/>
|
93 |
);
|
94 |
};
|
assets/js/base/components/payment-methods/payment-methods.js
CHANGED
@@ -2,7 +2,9 @@
|
|
2 |
* External dependencies
|
3 |
*/
|
4 |
import { usePaymentMethods } from '@woocommerce/base-hooks';
|
5 |
-
import {
|
|
|
|
|
6 |
|
7 |
/**
|
8 |
* Internal dependencies
|
@@ -18,15 +20,7 @@ import SavedPaymentMethodOptions from './saved-payment-method-options';
|
|
18 |
*/
|
19 |
const PaymentMethods = () => {
|
20 |
const { isInitialized, paymentMethods } = usePaymentMethods();
|
21 |
-
const
|
22 |
-
true
|
23 |
-
);
|
24 |
-
const onChange = useCallback(
|
25 |
-
( token ) => {
|
26 |
-
setShowNewPaymentMethods( token === '0' );
|
27 |
-
},
|
28 |
-
[ setShowNewPaymentMethods ]
|
29 |
-
);
|
30 |
|
31 |
if ( isInitialized && Object.keys( paymentMethods ).length === 0 ) {
|
32 |
return <NoPaymentMethods />;
|
@@ -34,8 +28,26 @@ const PaymentMethods = () => {
|
|
34 |
|
35 |
return (
|
36 |
<>
|
37 |
-
<SavedPaymentMethodOptions
|
38 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
</>
|
40 |
);
|
41 |
};
|
2 |
* External dependencies
|
3 |
*/
|
4 |
import { usePaymentMethods } from '@woocommerce/base-hooks';
|
5 |
+
import { __ } from '@wordpress/i18n';
|
6 |
+
import Label from '@woocommerce/base-components/label';
|
7 |
+
import { usePaymentMethodDataContext } from '@woocommerce/base-context';
|
8 |
|
9 |
/**
|
10 |
* Internal dependencies
|
20 |
*/
|
21 |
const PaymentMethods = () => {
|
22 |
const { isInitialized, paymentMethods } = usePaymentMethods();
|
23 |
+
const { customerPaymentMethods } = usePaymentMethodDataContext();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
if ( isInitialized && Object.keys( paymentMethods ).length === 0 ) {
|
26 |
return <NoPaymentMethods />;
|
28 |
|
29 |
return (
|
30 |
<>
|
31 |
+
<SavedPaymentMethodOptions />
|
32 |
+
{ Object.keys( customerPaymentMethods ).length > 0 && (
|
33 |
+
<Label
|
34 |
+
label={ __(
|
35 |
+
'Use another payment method.',
|
36 |
+
'woo-gutenberg-products-block'
|
37 |
+
) }
|
38 |
+
screenReaderLabel={ __(
|
39 |
+
'Other available payment methods',
|
40 |
+
'woo-gutenberg-products-block'
|
41 |
+
) }
|
42 |
+
wrapperElement="p"
|
43 |
+
wrapperProps={ {
|
44 |
+
className: [
|
45 |
+
'wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned',
|
46 |
+
],
|
47 |
+
} }
|
48 |
+
/>
|
49 |
+
) }
|
50 |
+
<PaymentMethodOptions />
|
51 |
</>
|
52 |
);
|
53 |
};
|
assets/js/base/components/payment-methods/saved-payment-method-options.js
CHANGED
@@ -1,15 +1,11 @@
|
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
-
import { useEffect,
|
5 |
import { __, sprintf } from '@wordpress/i18n';
|
6 |
-
import {
|
7 |
-
useEditorContext,
|
8 |
-
usePaymentMethodDataContext,
|
9 |
-
} from '@woocommerce/base-context';
|
10 |
import RadioControl from '@woocommerce/base-components/radio-control';
|
11 |
import { getPaymentMethods } from '@woocommerce/blocks-registry';
|
12 |
-
import PropTypes from 'prop-types';
|
13 |
|
14 |
/**
|
15 |
* @typedef {import('@woocommerce/type-defs/contexts').CustomerPaymentMethod} CustomerPaymentMethod
|
@@ -88,14 +84,15 @@ const getDefaultPaymentMethodOptions = (
|
|
88 |
};
|
89 |
};
|
90 |
|
91 |
-
const SavedPaymentMethodOptions = (
|
92 |
-
const { isEditor } = useEditorContext();
|
93 |
const {
|
94 |
setPaymentStatus,
|
95 |
customerPaymentMethods,
|
|
|
96 |
setActivePaymentMethod,
|
|
|
|
|
97 |
} = usePaymentMethodDataContext();
|
98 |
-
const [ selectedToken, setSelectedToken ] = useState( '' );
|
99 |
const standardMethods = getPaymentMethods();
|
100 |
|
101 |
/**
|
@@ -109,10 +106,9 @@ const SavedPaymentMethodOptions = ( { onChange } ) => {
|
|
109 |
if ( token === '0' ) {
|
110 |
setPaymentStatus().started();
|
111 |
}
|
112 |
-
|
113 |
-
onChange( token );
|
114 |
},
|
115 |
-
[
|
116 |
);
|
117 |
|
118 |
useEffect( () => {
|
@@ -133,7 +129,11 @@ const SavedPaymentMethodOptions = ( { onChange } ) => {
|
|
133 |
setActivePaymentMethod,
|
134 |
setPaymentStatus
|
135 |
);
|
136 |
-
if (
|
|
|
|
|
|
|
|
|
137 |
updateToken( paymentMethod.tokenId + '' );
|
138 |
option.onChange( paymentMethod.tokenId );
|
139 |
}
|
@@ -145,31 +145,21 @@ const SavedPaymentMethodOptions = ( { onChange } ) => {
|
|
145 |
}, [
|
146 |
customerPaymentMethods,
|
147 |
updateToken,
|
148 |
-
|
|
|
149 |
setActivePaymentMethod,
|
150 |
setPaymentStatus,
|
151 |
standardMethods,
|
152 |
] );
|
153 |
|
154 |
-
// In the editor, show `Use a new payment method` option as selected.
|
155 |
-
const selectedOption = isEditor ? '0' : selectedToken + '';
|
156 |
-
const newPaymentMethodOption = {
|
157 |
-
value: '0',
|
158 |
-
label: __( 'Use a new payment method', 'woo-gutenberg-product-blocks' ),
|
159 |
-
name: `wc-saved-payment-method-token-new`,
|
160 |
-
};
|
161 |
return currentOptions.current.length > 0 ? (
|
162 |
<RadioControl
|
163 |
id={ 'wc-payment-method-saved-tokens' }
|
164 |
-
selected={
|
165 |
onChange={ updateToken }
|
166 |
-
options={
|
167 |
/>
|
168 |
) : null;
|
169 |
};
|
170 |
|
171 |
-
SavedPaymentMethodOptions.propTypes = {
|
172 |
-
onChange: PropTypes.func.isRequired,
|
173 |
-
};
|
174 |
-
|
175 |
export default SavedPaymentMethodOptions;
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
+
import { useEffect, useRef, useCallback } from '@wordpress/element';
|
5 |
import { __, sprintf } from '@wordpress/i18n';
|
6 |
+
import { usePaymentMethodDataContext } from '@woocommerce/base-context';
|
|
|
|
|
|
|
7 |
import RadioControl from '@woocommerce/base-components/radio-control';
|
8 |
import { getPaymentMethods } from '@woocommerce/blocks-registry';
|
|
|
9 |
|
10 |
/**
|
11 |
* @typedef {import('@woocommerce/type-defs/contexts').CustomerPaymentMethod} CustomerPaymentMethod
|
84 |
};
|
85 |
};
|
86 |
|
87 |
+
const SavedPaymentMethodOptions = () => {
|
|
|
88 |
const {
|
89 |
setPaymentStatus,
|
90 |
customerPaymentMethods,
|
91 |
+
activePaymentMethod,
|
92 |
setActivePaymentMethod,
|
93 |
+
activeSavedToken,
|
94 |
+
setActiveSavedToken,
|
95 |
} = usePaymentMethodDataContext();
|
|
|
96 |
const standardMethods = getPaymentMethods();
|
97 |
|
98 |
/**
|
106 |
if ( token === '0' ) {
|
107 |
setPaymentStatus().started();
|
108 |
}
|
109 |
+
setActiveSavedToken( token );
|
|
|
110 |
},
|
111 |
+
[ setActiveSavedToken, setPaymentStatus ]
|
112 |
);
|
113 |
|
114 |
useEffect( () => {
|
129 |
setActivePaymentMethod,
|
130 |
setPaymentStatus
|
131 |
);
|
132 |
+
if (
|
133 |
+
! activePaymentMethod &&
|
134 |
+
paymentMethod.is_default &&
|
135 |
+
activeSavedToken === ''
|
136 |
+
) {
|
137 |
updateToken( paymentMethod.tokenId + '' );
|
138 |
option.onChange( paymentMethod.tokenId );
|
139 |
}
|
145 |
}, [
|
146 |
customerPaymentMethods,
|
147 |
updateToken,
|
148 |
+
activeSavedToken,
|
149 |
+
activePaymentMethod,
|
150 |
setActivePaymentMethod,
|
151 |
setPaymentStatus,
|
152 |
standardMethods,
|
153 |
] );
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
return currentOptions.current.length > 0 ? (
|
156 |
<RadioControl
|
157 |
id={ 'wc-payment-method-saved-tokens' }
|
158 |
+
selected={ activeSavedToken }
|
159 |
onChange={ updateToken }
|
160 |
+
options={ currentOptions.current }
|
161 |
/>
|
162 |
) : null;
|
163 |
};
|
164 |
|
|
|
|
|
|
|
|
|
165 |
export default SavedPaymentMethodOptions;
|
assets/js/base/components/payment-methods/style.scss
CHANGED
@@ -183,3 +183,67 @@
|
|
183 |
margin-left: $gap-smaller;
|
184 |
}
|
185 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
margin-left: $gap-smaller;
|
184 |
}
|
185 |
}
|
186 |
+
|
187 |
+
.wc-block-components-radio-control__option-checked.wc-block-components-radio-control__option-checked {
|
188 |
+
font-weight: bold;
|
189 |
+
}
|
190 |
+
|
191 |
+
.wc-block-checkout__payment-method {
|
192 |
+
.wc-block-components-radio-control__option {
|
193 |
+
padding-left: 56px;
|
194 |
+
&::after {
|
195 |
+
content: none;
|
196 |
+
}
|
197 |
+
|
198 |
+
.wc-block-components-radio-control__input {
|
199 |
+
left: 16px;
|
200 |
+
}
|
201 |
+
}
|
202 |
+
|
203 |
+
.wc-block-components-radio-control__option:last-child,
|
204 |
+
.wc-block-components-radio-control-accordion-option:last-child {
|
205 |
+
border-width: 1px;
|
206 |
+
}
|
207 |
+
|
208 |
+
.wc-block-components-radio-control-accordion-option,
|
209 |
+
.wc-block-components-radio-control__option {
|
210 |
+
border-width: 1px 1px 0 1px;
|
211 |
+
border-style: solid;
|
212 |
+
border-color: $gray-200;
|
213 |
+
}
|
214 |
+
|
215 |
+
.wc-block-components-radio-control-accordion-option {
|
216 |
+
.wc-block-components-radio-control__option {
|
217 |
+
border-width: 0;
|
218 |
+
}
|
219 |
+
.wc-block-components-radio-control__label img {
|
220 |
+
height: 24px;
|
221 |
+
}
|
222 |
+
}
|
223 |
+
|
224 |
+
.wc-block-components-radio-control.disable-radio-control {
|
225 |
+
.wc-block-components-radio-control__option {
|
226 |
+
padding-left: 16px;
|
227 |
+
}
|
228 |
+
|
229 |
+
.wc-block-components-radio-control__input {
|
230 |
+
display: none;
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
.wc-block-components-checkout-step__description-payments-aligned {
|
235 |
+
padding-top: 14px;
|
236 |
+
height: 28px;
|
237 |
+
}
|
238 |
+
|
239 |
+
}
|
240 |
+
|
241 |
+
.wc-block-components-radio-control-accordion-content {
|
242 |
+
padding: 8px 16px 16px 16px;
|
243 |
+
}
|
244 |
+
|
245 |
+
.wc-block-checkout__order-notes {
|
246 |
+
.wc-block-components-checkout-step__content {
|
247 |
+
padding-bottom: 0;
|
248 |
+
}
|
249 |
+
}
|
assets/js/base/components/payment-methods/test/payment-methods.js
CHANGED
@@ -6,26 +6,36 @@ import {
|
|
6 |
registerPaymentMethod,
|
7 |
__experimentalDeRegisterPaymentMethod,
|
8 |
} from '@woocommerce/blocks-registry';
|
9 |
-
import {
|
|
|
|
|
|
|
10 |
|
11 |
/**
|
12 |
* Internal dependencies
|
13 |
*/
|
14 |
import PaymentMethods from '../payment-methods';
|
15 |
|
16 |
-
jest.mock( '../payment-method-options', () => () =>
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
<>
|
21 |
-
<span>
|
22 |
-
<button onClick={ () => onChange( '
|
23 |
-
|
|
|
24 |
</>
|
25 |
) );
|
26 |
|
27 |
const registerMockPaymentMethods = () => {
|
28 |
-
[ '
|
29 |
registerPaymentMethod( {
|
30 |
name,
|
31 |
label: name,
|
@@ -33,16 +43,18 @@ const registerMockPaymentMethods = () => {
|
|
33 |
edit: <div>A payment method</div>,
|
34 |
icons: null,
|
35 |
canMakePayment: () => true,
|
36 |
-
ariaLabel: name,
|
37 |
supports: {
|
|
|
|
|
38 |
features: [ 'products' ],
|
39 |
},
|
|
|
40 |
} );
|
41 |
} );
|
42 |
};
|
43 |
|
44 |
const resetMockPaymentMethods = () => {
|
45 |
-
[ '
|
46 |
__experimentalDeRegisterPaymentMethod( name );
|
47 |
} );
|
48 |
};
|
@@ -65,11 +77,27 @@ describe( 'PaymentMethods', () => {
|
|
65 |
} );
|
66 |
} );
|
67 |
|
68 |
-
test( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
registerMockPaymentMethods();
|
70 |
render(
|
71 |
<PaymentMethodDataProvider>
|
72 |
<PaymentMethods />
|
|
|
73 |
</PaymentMethodDataProvider>
|
74 |
);
|
75 |
|
@@ -82,33 +110,21 @@ describe( 'PaymentMethods', () => {
|
|
82 |
);
|
83 |
expect( savedPaymentMethodOptions ).not.toBeNull();
|
84 |
expect( paymentMethodOptions ).not.toBeNull();
|
85 |
-
|
86 |
-
|
87 |
-
fireEvent.click( screen.getByText( 'Select saved' ) );
|
88 |
-
|
89 |
-
await waitFor( () => {
|
90 |
-
const savedPaymentMethodOptions = screen.queryByText(
|
91 |
-
/Saved payment method options/
|
92 |
-
);
|
93 |
-
const paymentMethodOptions = screen.queryByText(
|
94 |
-
/Payment method options/
|
95 |
);
|
96 |
-
expect(
|
97 |
-
expect( paymentMethodOptions ).toBeNull();
|
98 |
} );
|
99 |
|
100 |
-
fireEvent.click( screen.getByText( 'Select
|
101 |
|
102 |
await waitFor( () => {
|
103 |
-
const
|
104 |
-
/
|
105 |
);
|
106 |
-
|
107 |
-
/Payment method options/
|
108 |
-
);
|
109 |
-
expect( savedPaymentMethodOptions ).not.toBeNull();
|
110 |
-
expect( paymentMethodOptions ).not.toBeNull();
|
111 |
} );
|
|
|
112 |
resetMockPaymentMethods();
|
113 |
} );
|
114 |
} );
|
6 |
registerPaymentMethod,
|
7 |
__experimentalDeRegisterPaymentMethod,
|
8 |
} from '@woocommerce/blocks-registry';
|
9 |
+
import {
|
10 |
+
PaymentMethodDataProvider,
|
11 |
+
usePaymentMethodDataContext,
|
12 |
+
} from '@woocommerce/base-context';
|
13 |
|
14 |
/**
|
15 |
* Internal dependencies
|
16 |
*/
|
17 |
import PaymentMethods from '../payment-methods';
|
18 |
|
19 |
+
jest.mock( '../saved-payment-method-options', () => ( { onChange } ) => {
|
20 |
+
return (
|
21 |
+
<>
|
22 |
+
<span>Saved payment method options</span>
|
23 |
+
<button onClick={ () => onChange( '0' ) }>Select saved</button>
|
24 |
+
</>
|
25 |
+
);
|
26 |
+
} );
|
27 |
+
|
28 |
+
jest.mock( '../../radio-control-accordion', () => ( { onChange } ) => (
|
29 |
<>
|
30 |
+
<span>Payment method options</span>
|
31 |
+
<button onClick={ () => onChange( 'stripe' ) }>
|
32 |
+
Select new payment
|
33 |
+
</button>
|
34 |
</>
|
35 |
) );
|
36 |
|
37 |
const registerMockPaymentMethods = () => {
|
38 |
+
[ 'stripe' ].forEach( ( name ) => {
|
39 |
registerPaymentMethod( {
|
40 |
name,
|
41 |
label: name,
|
43 |
edit: <div>A payment method</div>,
|
44 |
icons: null,
|
45 |
canMakePayment: () => true,
|
|
|
46 |
supports: {
|
47 |
+
showSavedCards: true,
|
48 |
+
showSaveOption: true,
|
49 |
features: [ 'products' ],
|
50 |
},
|
51 |
+
ariaLabel: name,
|
52 |
} );
|
53 |
} );
|
54 |
};
|
55 |
|
56 |
const resetMockPaymentMethods = () => {
|
57 |
+
[ 'stripe' ].forEach( ( name ) => {
|
58 |
__experimentalDeRegisterPaymentMethod( name );
|
59 |
} );
|
60 |
};
|
77 |
} );
|
78 |
} );
|
79 |
|
80 |
+
test( 'selecting new payment method', async () => {
|
81 |
+
const ShowActivePaymentMethod = () => {
|
82 |
+
const {
|
83 |
+
activePaymentMethod,
|
84 |
+
activeSavedToken,
|
85 |
+
} = usePaymentMethodDataContext();
|
86 |
+
return (
|
87 |
+
<>
|
88 |
+
<div>
|
89 |
+
{ 'Active Payment Method: ' + activePaymentMethod }
|
90 |
+
</div>
|
91 |
+
<div>{ 'Active Saved Token: ' + activeSavedToken }</div>
|
92 |
+
</>
|
93 |
+
);
|
94 |
+
};
|
95 |
+
|
96 |
registerMockPaymentMethods();
|
97 |
render(
|
98 |
<PaymentMethodDataProvider>
|
99 |
<PaymentMethods />
|
100 |
+
<ShowActivePaymentMethod />
|
101 |
</PaymentMethodDataProvider>
|
102 |
);
|
103 |
|
110 |
);
|
111 |
expect( savedPaymentMethodOptions ).not.toBeNull();
|
112 |
expect( paymentMethodOptions ).not.toBeNull();
|
113 |
+
const savedToken = screen.queryByText(
|
114 |
+
/Active Payment Method: stripe/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
);
|
116 |
+
expect( savedToken ).toBeNull();
|
|
|
117 |
} );
|
118 |
|
119 |
+
fireEvent.click( screen.getByText( 'Select new payment' ) );
|
120 |
|
121 |
await waitFor( () => {
|
122 |
+
const activePaymentMethod = screen.queryByText(
|
123 |
+
/Active Payment Method: stripe/
|
124 |
);
|
125 |
+
expect( activePaymentMethod ).not.toBeNull();
|
|
|
|
|
|
|
|
|
126 |
} );
|
127 |
+
|
128 |
resetMockPaymentMethods();
|
129 |
} );
|
130 |
} );
|
assets/js/base/components/radio-control-accordion/index.js
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import classnames from 'classnames';
|
5 |
+
import { withInstanceId } from '@woocommerce/base-hocs/with-instance-id';
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Internal dependencies
|
9 |
+
*/
|
10 |
+
import RadioControlOption from '../radio-control/option';
|
11 |
+
|
12 |
+
const RadioControlAccordion = ( {
|
13 |
+
className,
|
14 |
+
instanceId,
|
15 |
+
id,
|
16 |
+
selected,
|
17 |
+
onChange,
|
18 |
+
options = [],
|
19 |
+
} ) => {
|
20 |
+
const radioControlId = id || instanceId;
|
21 |
+
|
22 |
+
return (
|
23 |
+
options.length && (
|
24 |
+
<div
|
25 |
+
className={ classnames(
|
26 |
+
'wc-block-components-radio-control',
|
27 |
+
className
|
28 |
+
) }
|
29 |
+
>
|
30 |
+
{ options.map( ( option ) => {
|
31 |
+
const hasOptionContent =
|
32 |
+
typeof option === 'object' && 'content' in option;
|
33 |
+
const checked = option.value === selected;
|
34 |
+
return (
|
35 |
+
<div
|
36 |
+
className="wc-block-components-radio-control-accordion-option"
|
37 |
+
key={ option.value }
|
38 |
+
>
|
39 |
+
<RadioControlOption
|
40 |
+
name={ `radio-control-${ radioControlId }` }
|
41 |
+
checked={ checked }
|
42 |
+
option={ option }
|
43 |
+
onChange={ ( value ) => {
|
44 |
+
onChange( value );
|
45 |
+
if (
|
46 |
+
typeof option.onChange === 'function'
|
47 |
+
) {
|
48 |
+
option.onChange( value );
|
49 |
+
}
|
50 |
+
} }
|
51 |
+
/>
|
52 |
+
{ hasOptionContent && checked && (
|
53 |
+
<div
|
54 |
+
className={ classnames(
|
55 |
+
'wc-block-components-radio-control-accordion-content',
|
56 |
+
{
|
57 |
+
'wc-block-components-radio-control-accordion-content-hide': ! checked,
|
58 |
+
}
|
59 |
+
) }
|
60 |
+
>
|
61 |
+
{ option.content }
|
62 |
+
</div>
|
63 |
+
) }
|
64 |
+
</div>
|
65 |
+
);
|
66 |
+
} ) }
|
67 |
+
</div>
|
68 |
+
)
|
69 |
+
);
|
70 |
+
};
|
71 |
+
|
72 |
+
export default withInstanceId( RadioControlAccordion );
|
73 |
+
export { RadioControlAccordion };
|
assets/js/base/components/radio-control/option.js
CHANGED
@@ -20,7 +20,12 @@ const Option = ( { checked, name, onChange, option } ) => {
|
|
20 |
|
21 |
return (
|
22 |
<label
|
23 |
-
className=
|
|
|
|
|
|
|
|
|
|
|
24 |
htmlFor={ `${ name }-${ value }` }
|
25 |
>
|
26 |
<input
|
20 |
|
21 |
return (
|
22 |
<label
|
23 |
+
className={ classnames(
|
24 |
+
'wc-block-components-radio-control__option',
|
25 |
+
{
|
26 |
+
'wc-block-components-radio-control__option-checked': checked,
|
27 |
+
}
|
28 |
+
) }
|
29 |
htmlFor={ `${ name }-${ value }` }
|
30 |
>
|
31 |
<input
|
assets/js/base/context/cart-checkout/payment-methods/constants.js
CHANGED
@@ -69,6 +69,8 @@ export const DEFAULT_PAYMENT_METHOD_DATA = {
|
|
69 |
errorMessage: '',
|
70 |
activePaymentMethod: '',
|
71 |
setActivePaymentMethod: () => void null,
|
|
|
|
|
72 |
customerPaymentMethods: {},
|
73 |
paymentMethods: {},
|
74 |
expressPaymentMethods: {},
|
69 |
errorMessage: '',
|
70 |
activePaymentMethod: '',
|
71 |
setActivePaymentMethod: () => void null,
|
72 |
+
activeSavedToken: '',
|
73 |
+
setActiveSavedToken: () => void null,
|
74 |
customerPaymentMethods: {},
|
75 |
paymentMethods: {},
|
76 |
expressPaymentMethods: {},
|
assets/js/base/context/cart-checkout/payment-methods/payment-method-data-context.js
CHANGED
@@ -131,7 +131,11 @@ export const PaymentMethodDataProvider = ( { children } ) => {
|
|
131 |
isFailResponse,
|
132 |
noticeContexts,
|
133 |
} = useEmitResponse();
|
|
|
134 |
const [ activePaymentMethod, setActive ] = useState( '' );
|
|
|
|
|
|
|
135 |
const [ observers, subscriber ] = useReducer( emitReducer, {} );
|
136 |
const currentObservers = useRef( observers );
|
137 |
|
@@ -445,6 +449,8 @@ export const PaymentMethodDataProvider = ( { children } ) => {
|
|
445 |
errorMessage: paymentData.errorMessage,
|
446 |
activePaymentMethod,
|
447 |
setActivePaymentMethod,
|
|
|
|
|
448 |
onPaymentProcessing,
|
449 |
customerPaymentMethods,
|
450 |
paymentMethods: paymentData.paymentMethods,
|
131 |
isFailResponse,
|
132 |
noticeContexts,
|
133 |
} = useEmitResponse();
|
134 |
+
// The active payment method - e.g. Stripe CC or BACS.
|
135 |
const [ activePaymentMethod, setActive ] = useState( '' );
|
136 |
+
// If a previously saved payment method is active, the token for that method.
|
137 |
+
// For example, a for a Stripe CC card saved to user account.
|
138 |
+
const [ activeSavedToken, setActiveSavedToken ] = useState( '' );
|
139 |
const [ observers, subscriber ] = useReducer( emitReducer, {} );
|
140 |
const currentObservers = useRef( observers );
|
141 |
|
449 |
errorMessage: paymentData.errorMessage,
|
450 |
activePaymentMethod,
|
451 |
setActivePaymentMethod,
|
452 |
+
activeSavedToken,
|
453 |
+
setActiveSavedToken,
|
454 |
onPaymentProcessing,
|
455 |
customerPaymentMethods,
|
456 |
paymentMethods: paymentData.paymentMethods,
|
assets/js/base/hooks/payment-methods/use-payment-method-interface.js
CHANGED
@@ -8,7 +8,7 @@ import {
|
|
8 |
useCustomerDataContext,
|
9 |
} from '@woocommerce/base-context';
|
10 |
import { __ } from '@wordpress/i18n';
|
11 |
-
import { getCurrencyFromPriceResponse } from '@woocommerce/
|
12 |
import { useEffect, useRef } from '@wordpress/element';
|
13 |
import { DISPLAY_CART_PRICES_INCLUDING_TAX } from '@woocommerce/block-settings';
|
14 |
import { ValidationInputError } from '@woocommerce/base-components/validation';
|
8 |
useCustomerDataContext,
|
9 |
} from '@woocommerce/base-context';
|
10 |
import { __ } from '@wordpress/i18n';
|
11 |
+
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
12 |
import { useEffect, useRef } from '@wordpress/element';
|
13 |
import { DISPLAY_CART_PRICES_INCLUDING_TAX } from '@woocommerce/block-settings';
|
14 |
import { ValidationInputError } from '@woocommerce/base-components/validation';
|
assets/js/blocks-registry/payment-methods/express-payment-method-config.js
CHANGED
@@ -13,7 +13,7 @@ export default class ExpressPaymentMethodConfig {
|
|
13 |
this.edit = config.edit;
|
14 |
this.paymentMethodId = config.paymentMethodId || this.name;
|
15 |
this.supports = {
|
16 |
-
features: config?.supports?.features || [],
|
17 |
};
|
18 |
this.canMakePayment = canMakePaymentWithFeaturesCheck(
|
19 |
config.canMakePayment,
|
@@ -36,9 +36,12 @@ export default class ExpressPaymentMethodConfig {
|
|
36 |
'The paymentMethodId property for the payment method must be a string or undefined (in which case it will be the value of the name property).'
|
37 |
);
|
38 |
}
|
39 |
-
if (
|
|
|
|
|
|
|
40 |
throw new Error(
|
41 |
-
'The features property for the payment method must be an array.'
|
42 |
);
|
43 |
}
|
44 |
assertValidElement( config.content, 'content' );
|
13 |
this.edit = config.edit;
|
14 |
this.paymentMethodId = config.paymentMethodId || this.name;
|
15 |
this.supports = {
|
16 |
+
features: config?.supports?.features || [ 'products' ],
|
17 |
};
|
18 |
this.canMakePayment = canMakePaymentWithFeaturesCheck(
|
19 |
config.canMakePayment,
|
36 |
'The paymentMethodId property for the payment method must be a string or undefined (in which case it will be the value of the name property).'
|
37 |
);
|
38 |
}
|
39 |
+
if (
|
40 |
+
typeof config.supports?.features !== 'undefined' &&
|
41 |
+
! Array.isArray( config.supports?.features )
|
42 |
+
) {
|
43 |
throw new Error(
|
44 |
+
'The features property for the payment method must be an array or undefined.'
|
45 |
);
|
46 |
}
|
47 |
assertValidElement( config.content, 'content' );
|
assets/js/blocks-registry/payment-methods/payment-method-config.js
CHANGED
@@ -32,7 +32,7 @@ export default class PaymentMethodConfig {
|
|
32 |
config?.supports?.savePaymentInfo || // Kept for backward compatibility if methods still pass this when registering.
|
33 |
false,
|
34 |
showSaveOption: config?.supports?.showSaveOption || false,
|
35 |
-
features: config?.supports?.features || [],
|
36 |
};
|
37 |
this.canMakePayment = canMakePaymentWithFeaturesCheck(
|
38 |
config.canMakePayment,
|
@@ -111,9 +111,12 @@ export default class PaymentMethodConfig {
|
|
111 |
}
|
112 |
);
|
113 |
}
|
114 |
-
if (
|
|
|
|
|
|
|
115 |
throw new Error(
|
116 |
-
'The features property for the payment method must be an array.'
|
117 |
);
|
118 |
}
|
119 |
if (
|
32 |
config?.supports?.savePaymentInfo || // Kept for backward compatibility if methods still pass this when registering.
|
33 |
false,
|
34 |
showSaveOption: config?.supports?.showSaveOption || false,
|
35 |
+
features: config?.supports?.features || [ 'products' ],
|
36 |
};
|
37 |
this.canMakePayment = canMakePaymentWithFeaturesCheck(
|
38 |
config.canMakePayment,
|
111 |
}
|
112 |
);
|
113 |
}
|
114 |
+
if (
|
115 |
+
typeof config.supports?.features !== 'undefined' &&
|
116 |
+
! Array.isArray( config.supports?.features )
|
117 |
+
) {
|
118 |
throw new Error(
|
119 |
+
'The features property for the payment method must be an array or undefined.'
|
120 |
);
|
121 |
}
|
122 |
if (
|
assets/js/blocks/active-filters/utils.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* External dependencies
|
3 |
*/
|
4 |
import { __, sprintf } from '@wordpress/i18n';
|
5 |
-
import { formatPrice } from '@woocommerce/
|
6 |
import { RemovableChip } from '@woocommerce/base-components/chip';
|
7 |
|
8 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
import { __, sprintf } from '@wordpress/i18n';
|
5 |
+
import { formatPrice } from '@woocommerce/price-format';
|
6 |
import { RemovableChip } from '@woocommerce/base-components/chip';
|
7 |
|
8 |
/**
|
assets/js/blocks/cart-checkout/cart/full-cart/cart-line-item-row.js
CHANGED
@@ -15,7 +15,7 @@ import {
|
|
15 |
ProductMetadata,
|
16 |
ProductSaleBadge,
|
17 |
} from '@woocommerce/base-components/cart-checkout';
|
18 |
-
import { getCurrency } from '@woocommerce/
|
19 |
import Dinero from 'dinero.js';
|
20 |
|
21 |
/**
|
15 |
ProductMetadata,
|
16 |
ProductSaleBadge,
|
17 |
} from '@woocommerce/base-components/cart-checkout';
|
18 |
+
import { getCurrency } from '@woocommerce/price-format';
|
19 |
import Dinero from 'dinero.js';
|
20 |
|
21 |
/**
|
assets/js/blocks/cart-checkout/cart/full-cart/index.js
CHANGED
@@ -15,8 +15,9 @@ import {
|
|
15 |
TotalsFees,
|
16 |
TotalsTaxes,
|
17 |
ExperimentalOrderMeta,
|
18 |
-
getCurrencyFromPriceResponse,
|
19 |
} from '@woocommerce/blocks-checkout';
|
|
|
|
|
20 |
import {
|
21 |
COUPONS_ENABLED,
|
22 |
DISPLAY_CART_PRICES_INCLUDING_TAX,
|
15 |
TotalsFees,
|
16 |
TotalsTaxes,
|
17 |
ExperimentalOrderMeta,
|
|
|
18 |
} from '@woocommerce/blocks-checkout';
|
19 |
+
|
20 |
+
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
21 |
import {
|
22 |
COUPONS_ENABLED,
|
23 |
DISPLAY_CART_PRICES_INCLUDING_TAX,
|
assets/js/blocks/cart-checkout/checkout/block.js
CHANGED
@@ -141,6 +141,7 @@ const Checkout = ( { attributes, scrollToTop } ) => {
|
|
141 |
allowCreateAccount={ allowCreateAccount }
|
142 |
/>
|
143 |
<div className="wc-block-checkout__actions">
|
|
|
144 |
{ attributes.showReturnToCart && (
|
145 |
<ReturnToCartButton
|
146 |
link={ getSetting(
|
@@ -149,7 +150,6 @@ const Checkout = ( { attributes, scrollToTop } ) => {
|
|
149 |
) }
|
150 |
/>
|
151 |
) }
|
152 |
-
<PlaceOrderButton />
|
153 |
</div>
|
154 |
{ attributes.showPolicyLinks && <Policies /> }
|
155 |
</Main>
|
141 |
allowCreateAccount={ allowCreateAccount }
|
142 |
/>
|
143 |
<div className="wc-block-checkout__actions">
|
144 |
+
<PlaceOrderButton />
|
145 |
{ attributes.showReturnToCart && (
|
146 |
<ReturnToCartButton
|
147 |
link={ getSetting(
|
150 |
) }
|
151 |
/>
|
152 |
) }
|
|
|
153 |
</div>
|
154 |
{ attributes.showPolicyLinks && <Policies /> }
|
155 |
</Main>
|
assets/js/blocks/cart-checkout/checkout/form/order-notes-step.js
CHANGED
@@ -26,6 +26,7 @@ const OrderNotesStep = () => {
|
|
26 |
<FormStep
|
27 |
id="order-notes"
|
28 |
showStepNumber={ false }
|
|
|
29 |
disabled={ checkoutIsProcessing }
|
30 |
>
|
31 |
<CheckoutOrderNotes
|
26 |
<FormStep
|
27 |
id="order-notes"
|
28 |
showStepNumber={ false }
|
29 |
+
className="wc-block-checkout__order-notes"
|
30 |
disabled={ checkoutIsProcessing }
|
31 |
>
|
32 |
<CheckoutOrderNotes
|
assets/js/blocks/cart-checkout/checkout/form/order-notes/style.scss
CHANGED
@@ -1,8 +1,12 @@
|
|
1 |
.wc-block-checkout__add-note {
|
2 |
-
|
3 |
-
|
4 |
}
|
5 |
|
6 |
.wc-block-checkout__add-note .wc-block-components-textarea {
|
7 |
margin-top: $gap;
|
8 |
}
|
|
|
|
|
|
|
|
1 |
.wc-block-checkout__add-note {
|
2 |
+
padding: $gap $gap 0 9px;
|
3 |
+
margin-bottom: $gap;
|
4 |
}
|
5 |
|
6 |
.wc-block-checkout__add-note .wc-block-components-textarea {
|
7 |
margin-top: $gap;
|
8 |
}
|
9 |
+
|
10 |
+
.wc-block-checkout__order-notes.wc-block-components-checkout-step {
|
11 |
+
padding-left: 0;
|
12 |
+
}
|
assets/js/blocks/cart-checkout/checkout/form/shipping-options-step.js
CHANGED
@@ -10,7 +10,7 @@ import {
|
|
10 |
getShippingRatesPackageCount,
|
11 |
getShippingRatesRateCount,
|
12 |
} from '@woocommerce/base-utils';
|
13 |
-
import { getCurrencyFromPriceResponse } from '@woocommerce/
|
14 |
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
15 |
import {
|
16 |
useCheckoutContext,
|
10 |
getShippingRatesPackageCount,
|
11 |
getShippingRatesRateCount,
|
12 |
} from '@woocommerce/base-utils';
|
13 |
+
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
14 |
import FormattedMonetaryAmount from '@woocommerce/base-components/formatted-monetary-amount';
|
15 |
import {
|
16 |
useCheckoutContext,
|
assets/js/blocks/cart-checkout/checkout/sidebar/index.js
CHANGED
@@ -13,8 +13,8 @@ import {
|
|
13 |
TotalsFees,
|
14 |
TotalsTaxes,
|
15 |
ExperimentalOrderMeta,
|
16 |
-
getCurrencyFromPriceResponse,
|
17 |
} from '@woocommerce/blocks-checkout';
|
|
|
18 |
import { useShippingDataContext } from '@woocommerce/base-context';
|
19 |
import {
|
20 |
COUPONS_ENABLED,
|
13 |
TotalsFees,
|
14 |
TotalsTaxes,
|
15 |
ExperimentalOrderMeta,
|
|
|
16 |
} from '@woocommerce/blocks-checkout';
|
17 |
+
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
18 |
import { useShippingDataContext } from '@woocommerce/base-context';
|
19 |
import {
|
20 |
COUPONS_ENABLED,
|
assets/js/blocks/cart-checkout/checkout/style.scss
CHANGED
@@ -14,16 +14,15 @@
|
|
14 |
|
15 |
.wc-block-checkout__actions {
|
16 |
display: flex;
|
17 |
-
|
18 |
-
align-items: center;
|
19 |
margin: 0 0 $gap-large*2;
|
20 |
-
padding:
|
21 |
|
22 |
.wc-block-components-checkout-place-order-button {
|
23 |
width: 50%;
|
24 |
padding: 1em;
|
25 |
height: auto;
|
26 |
-
margin-
|
27 |
|
28 |
.wc-block-components-button__text {
|
29 |
line-height: 24px;
|
@@ -151,3 +150,7 @@
|
|
151 |
padding-right: 36px;
|
152 |
}
|
153 |
}
|
|
|
|
|
|
|
|
14 |
|
15 |
.wc-block-checkout__actions {
|
16 |
display: flex;
|
17 |
+
flex-direction: column;
|
|
|
18 |
margin: 0 0 $gap-large*2;
|
19 |
+
padding-left: 9px;
|
20 |
|
21 |
.wc-block-components-checkout-place-order-button {
|
22 |
width: 50%;
|
23 |
padding: 1em;
|
24 |
height: auto;
|
25 |
+
margin-bottom: 44px;
|
26 |
|
27 |
.wc-block-components-button__text {
|
28 |
line-height: 24px;
|
150 |
padding-right: 36px;
|
151 |
}
|
152 |
}
|
153 |
+
|
154 |
+
.wc-block-checkout__actions {
|
155 |
+
margin-top: $gap;
|
156 |
+
}
|
assets/js/blocks/price-filter/block.js
CHANGED
@@ -11,7 +11,7 @@ import { useCallback, useState, useEffect } from '@wordpress/element';
|
|
11 |
import PriceSlider from '@woocommerce/base-components/price-slider';
|
12 |
import { useDebouncedCallback } from 'use-debounce';
|
13 |
import PropTypes from 'prop-types';
|
14 |
-
import { getCurrencyFromPriceResponse } from '@woocommerce/
|
15 |
|
16 |
/**
|
17 |
* Internal dependencies
|
11 |
import PriceSlider from '@woocommerce/base-components/price-slider';
|
12 |
import { useDebouncedCallback } from 'use-debounce';
|
13 |
import PropTypes from 'prop-types';
|
14 |
+
import { getCurrencyFromPriceResponse } from '@woocommerce/price-format';
|
15 |
|
16 |
/**
|
17 |
* Internal dependencies
|
assets/js/type-defs/contexts.js
CHANGED
@@ -134,6 +134,9 @@
|
|
134 |
* @property {string} activePaymentMethod The active payment method slug.
|
135 |
* @property {function(string)} setActivePaymentMethod A function for setting the active payment
|
136 |
* method.
|
|
|
|
|
|
|
137 |
* @property {SavedCustomerPaymentMethods} customerPaymentMethods Returns the customer payment for the
|
138 |
* customer if it exists.
|
139 |
* @property {Object} paymentMethods Registered payment methods.
|
134 |
* @property {string} activePaymentMethod The active payment method slug.
|
135 |
* @property {function(string)} setActivePaymentMethod A function for setting the active payment
|
136 |
* method.
|
137 |
+
* @property {string} activeSavedToken Current active token.
|
138 |
+
* @property {function(string):undefined} setActiveSavedToken A function for setting the active payment
|
139 |
+
* method token.
|
140 |
* @property {SavedCustomerPaymentMethods} customerPaymentMethods Returns the customer payment for the
|
141 |
* customer if it exists.
|
142 |
* @property {Object} paymentMethods Registered payment methods.
|
build/active-filters-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'b8af54d255a3c438e6892d6dc0c1ac7c');
|
build/active-filters-frontend.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=228)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,r){var n=r(81),o=r(82),c=r(58),i=r(83);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||i()}},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(11),o=r.n(n),c=r(7),i=r.n(c),a=r(0),u=r(43);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,r=e.containers,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==r.length&&Array.prototype.forEach.call(r,(function(e,r){var n=c(e,r),i=s(e,r),f=l(l({},e.dataset),n.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},n,{attributes:f})))),e)}))},b=function(e){var t=e.Block,r=e.getProps,n=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})},d=function(e){var t=document.body.querySelectorAll(f.join(","));b(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;r=l(l({},e),{},{wrapper:t}),n=r.Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},11:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},110:function(e,t){},12:function(e,t){!function(){e.exports=this.wp.data}()},128:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(28),u=function(e){var t=e.className,r=e.size,n=i()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},129:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=r(14),i=r.n(c),a=r(2);r(3);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},131:function(e,t,r){"use strict";var n=r(0),o=r(4),c=r(15),i=r(12);t.a=function(e){return function(t){var r;return r=Object(n.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(r.current){var n=e(c.SCHEMA_STORE_KEY),o=n.isResolving,i=n.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},14:function(e,t,r){var n=r(60);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},142:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var n=r(9),o=n.c.reduce((function(e,t){var r,n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;return n.id&&e.push(n),e}),[]),c=function(e){if(e)return o.find((function(t){return t.id===e}))},i=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(8),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",c=e.filter((function(e){return e.attribute===r.taxonomy})),i=c.length?c[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(o)){var a=i.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==r.taxonomy}));a.length>0&&(i.slug=a.sort(),u.push(i)),t(Object(n.sortBy)(u,"attribute"))}},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==r.taxonomy}));0===o.length?t(i):(i.push({attribute:r.taxonomy,operator:c,slug:Object(n.map)(o,"slug").sort()}),t(Object(n.sortBy)(i,"attribute")))}},149:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=(r(3),r(5)),u=r.n(a),s=r(1),l=r(129),f=r(128),p=(r(110),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,c=e.element,a=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,b=e.children,d=void 0===b?null:b,g=i()(e,["text","screenReaderText","element","className","radius","children"]),m=a,y=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),O=Boolean(n&&n!==t);return React.createElement(m,o()({className:y},g),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},n),d)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,c=void 0===n?"":n,a=e.disabled,b=void 0!==a&&a,d=e.onRemove,g=void 0===d?function(){}:d,m=e.removeOnAnyClick,y=void 0!==m&&m,O=e.text,v=e.screenReaderText,h=void 0===v?"":v,j=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),w=y?"span":"button";if(!r){var _=h&&"string"==typeof h?h:O;r="string"!=typeof _?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),_)}var S={"aria-label":r,disabled:b,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},E=y?S:{},k=y?{"aria-hidden":!0}:S;return React.createElement(p,o()({},j,E,{className:u()(c,"is-removable"),element:y?"button":j.element,screenReaderText:h,text:O}),React.createElement(w,o()({className:"wc-block-components-chip__remove"},k),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},15:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},2:function(e,t){!function(){e.exports=this.React}()},20:function(e,t){!function(){e.exports=this.wc.blocksCheckout}()},21:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},22:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},228:function(e,t,r){e.exports=r(278)},229:function(e,t){},23:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},25:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},278:function(e,t,r){"use strict";r.r(t);var n=r(131),o=r(107),c=r(10),i=r.n(c),a=r(1),u=r(91),s=r(0),l=r(5),f=r.n(l),p=(r(3),r(39)),b=(r(229),r(142)),d=r(20),g=r(149),m=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(a.sprintf)(Object(a.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(d.formatPrice)(e),Object(d.formatPrice)(t)):Number.isFinite(e)?Object(a.sprintf)(Object(a.__)("From %s","woo-gutenberg-products-block"),Object(d.formatPrice)(e)):Object(a.sprintf)(Object(a.__)("Up to %s","woo-gutenberg-products-block"),Object(d.formatPrice)(t))},y=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,u=void 0===i||i,s=e.displayStyle,l=n?React.createElement(React.Fragment,null,n," ",r):r,f=Object(a.sprintf)(Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),r);return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},u&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?React.createElement(g.a,{element:"span",text:l,onRemove:c,radius:"large",ariaLabel:f}):React.createElement("span",{className:"wc-block-active-filters__list-item-name"},l,React.createElement("button",{className:"wc-block-active-filters__list-item-remove",onClick:c},f)))},O=r(98),v=r(23),h=r(143),j=function(e){var t=e.attributeObject,r=void 0===t?{}:t,n=e.slugs,o=void 0===n?[]:n,c=e.operator,s=void 0===c?"in":c,l=e.displayStyle,f=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),p=f.results,b=f.isLoading,d=Object(u.b)("attributes",[]),g=i()(d,2),m=g[0],j=g[1];if(b)return null;var w=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},w,":"),React.createElement("ul",null,o.map((function(e,t){var n=p.find((function(t){return t.slug===e}));if(!n)return null;var o="";return t>0&&"and"===s&&(o=React.createElement("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),y({type:w,name:Object(v.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(h.a)(m,j,r,e)},showLabel:!1,displayStyle:l})}))))},w=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(u.b)("attributes",[]),c=i()(o,2),l=c[0],d=c[1],g=Object(u.b)("min_price"),O=i()(g,2),v=O[0],h=O[1],w=Object(u.b)("max_price"),_=i()(w,2),S=_[0],E=_[1],k=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(S)?y({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:m(v,S),removeCallback:function(){h(void 0),E(void 0)},displayStyle:t.displayStyle}):null}),[v,S,t.displayStyle,h,E]),R=Object(s.useMemo)((function(){return l.map((function(e){var r=Object(b.b)(e.attribute);return React.createElement(j,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l,t.displayStyle]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(S)||n))return null;var x="h".concat(t.headingLevel),P=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(React.Fragment,null,!n&&t.heading&&React.createElement(x,null,t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:P},n?React.createElement(React.Fragment,null,y({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),y({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):React.createElement(React.Fragment,null,k,R)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){h(void 0),E(void 0),d([])}},React.createElement(p.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(w),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},28:function(e,t){!function(){e.exports=this.wp.primitives}()},29:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},3:function(e,t,r){e.exports=r(70)()},32:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},33:function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},34:function(e,t,r){var n=r(69);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},35:function(e,t,r){var n=r(29),o=r(21);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(22),c=r.n(o),i=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},39:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=(r(3),r(2)),i=r(5),a=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=r,f=null!=n;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=o||c.Fragment,l&&f&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}},4:function(e,t){!function(){e.exports=this.wc.wcSettings}()},40:function(e,t){!function(){e.exports=this.wp.blocks}()},43:function(e,t,r){"use strict";var n=r(32),o=r.n(n),c=r(33),i=r.n(c),a=r(21),u=r.n(a),s=r(34),l=r.n(s),f=r(35),p=r.n(f),b=r(25),d=r.n(b),g=r(7),m=r.n(g),y=(r(3),r(2)),O=r(1),v=r(9),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.C,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(O.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(O.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(O.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},r&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};r(72);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p()(this,r)}}var w=function(e){l()(r,e);var t=j(r);function r(){var e;o()(this,r);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof i?i({errorMessage:u}):React.createElement(h,{errorMessage:n?u:null,header:t,imageUrl:r,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(y.Component);w.defaultProps={showErrorMessage:!0};t.a=w},5:function(e,t,r){var n;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=228)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,r){var n=r(82),o=r(83),c=r(59),i=r(84);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||i()}},108:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(11),o=r.n(n),c=r(7),i=r.n(c),a=r(0),u=r(43);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,r=e.containers,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==r.length&&Array.prototype.forEach.call(r,(function(e,r){var n=c(e,r),i=s(e,r),f=l(l({},e.dataset),n.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},n,{attributes:f})))),e)}))},b=function(e){var t=e.Block,r=e.getProps,n=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})},d=function(e){var t=document.body.querySelectorAll(f.join(","));b(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;r=l(l({},e),{},{wrapper:t}),n=r.Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},11:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},111:function(e,t){},12:function(e,t){!function(){e.exports=this.wp.data}()},129:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(28),u=function(e){var t=e.className,r=e.size,n=i()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},130:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=r(14),i=r.n(c),a=r(2);r(3);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},132:function(e,t,r){"use strict";var n=r(0),o=r(4),c=r(15),i=r(12);t.a=function(e){return function(t){var r;return r=Object(n.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(r.current){var n=e(c.SCHEMA_STORE_KEY),o=n.isResolving,i=n.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},14:function(e,t,r){var n=r(61);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var n=r(9),o=n.c.reduce((function(e,t){var r,n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;return n.id&&e.push(n),e}),[]),c=function(e){if(e)return o.find((function(t){return t.id===e}))},i=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},144:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(8),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",c=e.filter((function(e){return e.attribute===r.taxonomy})),i=c.length?c[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(o)){var a=i.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==r.taxonomy}));a.length>0&&(i.slug=a.sort(),u.push(i)),t(Object(n.sortBy)(u,"attribute"))}},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==r.taxonomy}));0===o.length?t(i):(i.push({attribute:r.taxonomy,operator:c,slug:Object(n.map)(o,"slug").sort()}),t(Object(n.sortBy)(i,"attribute")))}},15:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},150:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=(r(3),r(5)),u=r.n(a),s=r(1),l=r(130),f=r(129),p=(r(111),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,c=e.element,a=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,b=e.children,d=void 0===b?null:b,g=i()(e,["text","screenReaderText","element","className","radius","children"]),m=a,y=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),O=Boolean(n&&n!==t);return React.createElement(m,o()({className:y},g),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},n),d)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,c=void 0===n?"":n,a=e.disabled,b=void 0!==a&&a,d=e.onRemove,g=void 0===d?function(){}:d,m=e.removeOnAnyClick,y=void 0!==m&&m,O=e.text,v=e.screenReaderText,h=void 0===v?"":v,j=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),w=y?"span":"button";if(!r){var _=h&&"string"==typeof h?h:O;r="string"!=typeof _?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),_)}var S={"aria-label":r,disabled:b,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},E=y?S:{},R=y?{"aria-hidden":!0}:S;return React.createElement(p,o()({},j,E,{className:u()(c,"is-removable"),element:y?"button":j.element,screenReaderText:h,text:O}),React.createElement(w,o()({className:"wc-block-components-chip__remove"},R),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},2:function(e,t){!function(){e.exports=this.React}()},20:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},21:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},22:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},228:function(e,t,r){e.exports=r(277)},229:function(e,t){},24:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},27:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},277:function(e,t,r){"use strict";r.r(t);var n=r(132),o=r(108),c=r(10),i=r.n(c),a=r(1),u=r(92),s=r(0),l=r(5),f=r.n(l),p=(r(3),r(38)),b=(r(229),r(143)),d=r(46),g=r(150),m=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(a.sprintf)(Object(a.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(d.formatPrice)(e),Object(d.formatPrice)(t)):Number.isFinite(e)?Object(a.sprintf)(Object(a.__)("From %s","woo-gutenberg-products-block"),Object(d.formatPrice)(e)):Object(a.sprintf)(Object(a.__)("Up to %s","woo-gutenberg-products-block"),Object(d.formatPrice)(t))},y=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,u=void 0===i||i,s=e.displayStyle,l=n?React.createElement(React.Fragment,null,n," ",r):r,f=Object(a.sprintf)(Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),r);return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},u&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?React.createElement(g.a,{element:"span",text:l,onRemove:c,radius:"large",ariaLabel:f}):React.createElement("span",{className:"wc-block-active-filters__list-item-name"},l,React.createElement("button",{className:"wc-block-active-filters__list-item-remove",onClick:c},f)))},O=r(99),v=r(22),h=r(144),j=function(e){var t=e.attributeObject,r=void 0===t?{}:t,n=e.slugs,o=void 0===n?[]:n,c=e.operator,s=void 0===c?"in":c,l=e.displayStyle,f=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),p=f.results,b=f.isLoading,d=Object(u.b)("attributes",[]),g=i()(d,2),m=g[0],j=g[1];if(b)return null;var w=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},w,":"),React.createElement("ul",null,o.map((function(e,t){var n=p.find((function(t){return t.slug===e}));if(!n)return null;var o="";return t>0&&"and"===s&&(o=React.createElement("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),y({type:w,name:Object(v.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(h.a)(m,j,r,e)},showLabel:!1,displayStyle:l})}))))},w=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(u.b)("attributes",[]),c=i()(o,2),l=c[0],d=c[1],g=Object(u.b)("min_price"),O=i()(g,2),v=O[0],h=O[1],w=Object(u.b)("max_price"),_=i()(w,2),S=_[0],E=_[1],R=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(S)?y({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:m(v,S),removeCallback:function(){h(void 0),E(void 0)},displayStyle:t.displayStyle}):null}),[v,S,t.displayStyle,h,E]),k=Object(s.useMemo)((function(){return l.map((function(e){var r=Object(b.b)(e.attribute);return React.createElement(j,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l,t.displayStyle]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(S)||n))return null;var x="h".concat(t.headingLevel),P=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(React.Fragment,null,!n&&t.heading&&React.createElement(x,null,t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:P},n?React.createElement(React.Fragment,null,y({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),y({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):React.createElement(React.Fragment,null,R,k)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){h(void 0),E(void 0),d([])}},React.createElement(p.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(w),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},28:function(e,t){!function(){e.exports=this.wp.primitives}()},3:function(e,t,r){e.exports=r(71)()},31:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},32:function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},33:function(e,t,r){var n=r(70);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},34:function(e,t,r){var n=r(27),o=r(20);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},38:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=(r(3),r(2)),i=r(5),a=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=r,f=null!=n;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=o||c.Fragment,l&&f&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(21),c=r.n(o),i=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},4:function(e,t){!function(){e.exports=this.wc.wcSettings}()},40:function(e,t){!function(){e.exports=this.wp.blocks}()},43:function(e,t,r){"use strict";var n=r(31),o=r.n(n),c=r(32),i=r.n(c),a=r(20),u=r.n(a),s=r(33),l=r.n(s),f=r(34),p=r.n(f),b=r(24),d=r.n(b),g=r(7),m=r.n(g),y=(r(3),r(2)),O=r(1),v=r(9),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.C,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(O.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(O.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(O.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},r&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};r(73);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p()(this,r)}}var w=function(e){l()(r,e);var t=j(r);function r(){var e;o()(this,r);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof i?i({errorMessage:u}):React.createElement(h,{errorMessage:n?u:null,header:t,imageUrl:r,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(y.Component);w.defaultProps={showErrorMessage:!0};t.a=w},46:function(e,t){!function(){e.exports=this.wc.priceFormat}()},5:function(e,t,r){var n;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},59:function(e,t,r){var n=r(60);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},60:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},61:function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},62:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(10),o=r.n(n),c=r(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},63:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(2),o=function(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}},67:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=Object(n.createContext)("page"),c=function(){return Object(n.useContext)(o)};o.Provider},7:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},70:function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},71:function(e,t,r){"use strict";var n=r(72);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,c,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return r.PropTypes=r,r}},72:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},73:function(e,t){},8:function(e,t){!function(){e.exports=this.lodash}()},82:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},83:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw c}}return r}}},84:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},9:function(e,t,r){"use strict";r.d(t,"j",(function(){return o})),r.d(t,"u",(function(){return c})),r.d(t,"y",(function(){return i})),r.d(t,"r",(function(){return a})),r.d(t,"m",(function(){return u})),r.d(t,"o",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"z",(function(){return f})),r.d(t,"l",(function(){return p})),r.d(t,"k",(function(){return b})),r.d(t,"c",(function(){return d})),r.d(t,"n",(function(){return g})),r.d(t,"C",(function(){return y})),r.d(t,"D",(function(){return O})),r.d(t,"v",(function(){return v})),r.d(t,"a",(function(){return h})),r.d(t,"w",(function(){return j})),r.d(t,"b",(function(){return w})),r.d(t,"q",(function(){return _})),r.d(t,"g",(function(){return S})),r.d(t,"x",(function(){return k})),r.d(t,"h",(function(){return x})),r.d(t,"t",(function(){return P})),r.d(t,"s",(function(){return T})),r.d(t,"B",(function(){return N})),r.d(t,"A",(function(){return C})),r.d(t,"d",(function(){return A})),r.d(t,"e",(function(){return B})),r.d(t,"f",(function(){return L})),r.d(t,"p",(function(){return D})),r.d(t,"E",(function(){return F}));var n=r(4),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=(Object(n.getSetting)("max_columns",6),Object(n.getSetting)("min_columns",1),Object(n.getSetting)("default_columns",3),Object(n.getSetting)("max_rows",6),Object(n.getSetting)("min_rows",1),Object(n.getSetting)("default_rows",3),Object(n.getSetting)("min_height",500),Object(n.getSetting)("default_height",500),Object(n.getSetting)("placeholderImgSrc","")),u=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),s=Object(n.getSetting)("limitTags"),l=(Object(n.getSetting)("hasProducts",!0),Object(n.getSetting)("hasTags",!0),Object(n.getSetting)("homeUrl",""),Object(n.getSetting)("couponsEnabled",!0)),f=(Object(n.getSetting)("shippingEnabled",!0),Object(n.getSetting)("taxesEnabled",!0)),p=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),b=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),d=(Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[])),g=Object(n.getSetting)("isShippingCalculatorEnabled",!0),m=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),y=Object(n.getSetting)("wcBlocksAssetUrl",""),O=Object(n.getSetting)("wcBlocksBuildUrl",""),v=Object(n.getSetting)("shippingCountries",{}),h=Object(n.getSetting)("allowedCountries",{}),j=Object(n.getSetting)("shippingStates",{}),w=Object(n.getSetting)("allowedStates",{}),_=(Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("paymentGatewaySortOrder",[])),S=Object(n.getSetting)("checkoutShowLoginReminder",!0),E={id:0,title:"",permalink:""},R=Object(n.getSetting)("storePages",{shop:E,cart:E,checkout:E,privacy:E,terms:E}),k=R.shop.permalink,x=(R.checkout.id,R.checkout.permalink),P=R.privacy.permalink,T=R.privacy.title,N=R.terms.permalink,C=R.terms.title,A=(R.cart.id,R.cart.permalink),B=Object(n.getSetting)("checkoutAllowsGuest",!1),L=Object(n.getSetting)("checkoutAllowsSignup",!1),D=Object(n.getSetting)("loginUrl","/wp-login.php"),F=(r(40),function(){return m>1})},92:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return g}));var n=r(10),o=r.n(n),c=r(15),i=r(12),a=r(0),u=r(67),s=r(21),l=r.n(s),f=r(39),p=r(63),b=function(e){var t=Object(u.a)();e=e||t;var r=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(a.useCallback)((function(t){n(e,t)}),[e,n])]},d=function(e,t,r){var n=Object(u.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(r,e,t)}),[r,e,s])]},g=function(e,t){var r=Object(u.a)(),n=b(t=t||r),c=o()(n,2),i=c[0],s=c[1],d=Object(f.a)(i),g=Object(f.a)(e),m=Object(p.a)(g),y=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(m,g)||(s(Object.assign({},d,g)),y.current=!0)}),[d,g,m,s]),y.current?[i,s]:[e,s]}},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),o=r(12),c=r(0),i=r(39),a=r(62),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,f=void 0===l?{}:l,p=e.shouldSelect,b=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var d=Object(c.useRef)({results:[],isLoading:!0}),g=Object(i.a)(f),m=Object(i.a)(s),y=Object(a.a)(),O=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,g,m],i=o.getCollectionError.apply(o,c);return i&&y(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,m,g,b]);return null!==O&&(d.current=O),d.current}}});
|
build/active-filters.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'ead836de86982e73c7ddcea408128f33');
|
build/active-filters.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var r,o,a=t[0],u=t[1],l=t[2],b=0,f=[];b<a.length;b++)o=a[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==c[u]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},c={4:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var s=u;return i.push([889,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},101:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(18),c=n.n(r),i=n(0),o=function(){var e=Object(i.useState)(),t=c()(e,2)[1];return Object(i.useCallback)((function(e){return t((function(){throw e}))}),[])}},103:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(7),c=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},108:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(c)};c.Provider},127:function(e,t){},158:function(e,t,n){"use strict";var r=n(14),c=n.n(r),i=n(15),o=n.n(i),a=n(16),u=n.n(a),l=n(17),s=n.n(l),b=n(10),f=n.n(b),d=n(0),p=n(8),g=n(1),m=n(4);function v(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(d.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(m.Path,{d:n[t]})):null}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var h=function(e){u()(n,e);var t=O(n);function n(){return c()(this,n),t.apply(this,arguments)}return o()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(d.createElement)(v,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,i=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(d.createElement)(m.ToolbarGroup,{isCollapsed:r,icon:Object(d.createElement)(v,{level:o}),controls:Object(p.range)(c,i).map((function(t){return e.createLevelControl(t,o,a)}))})}}]),n}(d.Component);t.a=h},160:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return g}));var r=n(18),c=n.n(r),i=n(38),o=n(21),a=n(0),u=n(108),l=n(34),s=n.n(l),b=n(54),f=n(103),d=function(e){var t=Object(u.a)();e=e||t;var n=Object(o.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},p=function(e,t,n){var r=Object(u.a)();n=n||r;var c=Object(o.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(a.useCallback)((function(t){l(n,e,t)}),[n,e,l])]},g=function(e,t){var n=Object(u.a)(),r=d(t=t||n),i=c()(r,2),o=i[0],l=i[1],p=Object(b.a)(o),g=Object(b.a)(e),m=Object(f.a)(g),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){s()(m,g)||(l(Object.assign({},p,g)),v.current=!0)}),[p,g,m,l]),v.current?[o,l]:[e,l]}},173:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(38),c=n(21),i=n(0),o=n(54),a=n(101),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,d=void 0===f||f;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var p=Object(i.useRef)({results:[],isLoading:!0}),g=Object(o.a)(b),m=Object(o.a)(l),v=Object(a.a)(),O=Object(c.useSelect)((function(e){if(!d)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],o=c.getCollectionError.apply(c,i);return o&&v(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,d]);return null!==O&&(p.current=O),p.current}},195:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(23)),i=n(9),o=n.n(i);n(272);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,a=e.heading,u="h".concat(n);return Object(r.createElement)(u,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:a,onChange:i}))}},21:function(e,t){!function(){e.exports=this.wp.data}()},212:function(e,t){},23:function(e,t){!function(){e.exports=this.wp.blockEditor}()},24:function(e,t){!function(){e.exports=this.wp.blocks}()},272:function(e,t){},279:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(6),c=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return c.find((function(t){return t.id===e}))},o=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},280:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i}));var r=n(8),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),o=i.length?i[0]:null;if(o&&o.slug&&Array.isArray(o.slug)&&o.slug.includes(c)){var a=o.slug.filter((function(e){return e!==c})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(o.slug=a.sort(),u.push(o)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",o=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(o):(o.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(o,"attribute")))}},287:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(25),o=n.n(i),a=n(0),u=(n(2),n(9)),l=n.n(u),s=n(1),b=n(55),f=n(293),d=(n(212),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,u=void 0===i?"li":i,s=e.className,b=void 0===s?"":s,f=e.radius,d=void 0===f?"small":f,p=e.children,g=void 0===p?null:p,m=o()(e,["text","screenReaderText","element","className","radius","children"]),v=u,O=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+d),h=Boolean(r&&r!==t);return Object(a.createElement)(v,c()({className:O},m),Object(a.createElement)("span",{"aria-hidden":h,className:"wc-block-components-chip__text"},t),h&&Object(a.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,u=e.disabled,p=void 0!==u&&u,g=e.onRemove,m=void 0===g?function(){}:g,v=e.removeOnAnyClick,O=void 0!==v&&v,h=e.text,j=e.screenReaderText,y=void 0===j?"":j,w=o()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=O?"span":"button";if(!n){var S=y&&"string"==typeof y?y:h;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var k={"aria-label":n,disabled:p,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},E=O?k:{},x=O?{"aria-hidden":!0}:k;return Object(a.createElement)(d,c()({},w,E,{className:l()(i,"is-removable"),element:O?"button":w.element,screenReaderText:y,text:h}),Object(a.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(a.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},29:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},293:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(25),o=n.n(i),a=n(0),u=n(32),l=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(u.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=l},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},32:function(e,t){!function(){e.exports=this.wp.primitives}()},34:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},38:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},39:function(e,t){!function(){e.exports=this.wc.blocksCheckout}()},4:function(e,t){!function(){e.exports=this.wp.components}()},44:function(e,t,n){"use strict";var r=n(5),c=n.n(r),i=n(0),o=(n(2),n(7)),a=n(9),u=n.n(a);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=n,f=null!=r;return!b&&f?(t=c||"span",l=s(s({},l),{},{className:u()(l.className,"screen-reader-text")}),Object(i.createElement)(t,l,r)):(t=c||o.Fragment,b&&f&&n!==r?Object(i.createElement)(t,l,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,l,n))}},54:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(34),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},55:function(e,t,n){"use strict";var r=n(5),c=n.n(r),i=n(25),o=n.n(i),a=n(7);n(2);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=o()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},6:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"I",(function(){return i})),n.d(t,"O",(function(){return o})),n.d(t,"y",(function(){return a})),n.d(t,"A",(function(){return u})),n.d(t,"m",(function(){return l})),n.d(t,"z",(function(){return s})),n.d(t,"C",(function(){return b})),n.d(t,"o",(function(){return f})),n.d(t,"B",(function(){return d})),n.d(t,"n",(function(){return p})),n.d(t,"E",(function(){return g})),n.d(t,"u",(function(){return m})),n.d(t,"w",(function(){return v})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return j})),n.d(t,"k",(function(){return y})),n.d(t,"K",(function(){return w})),n.d(t,"P",(function(){return _})),n.d(t,"q",(function(){return S})),n.d(t,"p",(function(){return k})),n.d(t,"H",(function(){return E})),n.d(t,"c",(function(){return x})),n.d(t,"v",(function(){return C})),n.d(t,"S",(function(){return P})),n.d(t,"T",(function(){return R})),n.d(t,"J",(function(){return L})),n.d(t,"a",(function(){return T})),n.d(t,"M",(function(){return z})),n.d(t,"b",(function(){return H})),n.d(t,"L",(function(){return V})),n.d(t,"D",(function(){return B})),n.d(t,"i",(function(){return F})),n.d(t,"N",(function(){return M})),n.d(t,"h",(function(){return U})),n.d(t,"j",(function(){return I})),n.d(t,"G",(function(){return G})),n.d(t,"F",(function(){return Q})),n.d(t,"R",(function(){return Y})),n.d(t,"Q",(function(){return K})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return q})),n.d(t,"f",(function(){return J})),n.d(t,"g",(function(){return $})),n.d(t,"x",(function(){return X})),n.d(t,"W",(function(){return ee})),n.d(t,"X",(function(){return te})),n.d(t,"U",(function(){return ne})),n.d(t,"V",(function(){return re}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),a=Object(r.getSetting)("max_columns",6),u=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),f=Object(r.getSetting)("default_rows",3),d=Object(r.getSetting)("min_height",500),p=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),v=Object(r.getSetting)("limitTags"),O=Object(r.getSetting)("hasProducts",!0),h=Object(r.getSetting)("hasTags",!0),j=Object(r.getSetting)("homeUrl",""),y=Object(r.getSetting)("couponsEnabled",!0),w=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),S=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),k=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),E=Object(r.getSetting)("productCount",0),x=Object(r.getSetting)("attributes",[]),C=Object(r.getSetting)("isShippingCalculatorEnabled",!0),N=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),P=Object(r.getSetting)("wcBlocksAssetUrl",""),R=Object(r.getSetting)("wcBlocksBuildUrl",""),L=Object(r.getSetting)("shippingCountries",{}),T=Object(r.getSetting)("allowedCountries",{}),z=Object(r.getSetting)("shippingStates",{}),H=Object(r.getSetting)("allowedStates",{}),V=Object(r.getSetting)("shippingMethodsExist",!1),B=Object(r.getSetting)("paymentGatewaySortOrder",[]),F=Object(r.getSetting)("checkoutShowLoginReminder",!0),A={id:0,title:"",permalink:""},D=Object(r.getSetting)("storePages",{shop:A,cart:A,checkout:A,privacy:A,terms:A}),M=D.shop.permalink,U=D.checkout.id,I=D.checkout.permalink,G=D.privacy.permalink,Q=D.privacy.title,Y=D.terms.permalink,K=D.terms.title,W=D.cart.id,q=D.cart.permalink,J=Object(r.getSetting)("checkoutAllowsGuest",!1),$=Object(r.getSetting)("checkoutAllowsSignup",!1),X=Object(r.getSetting)("loginUrl","/wp-login.php"),Z=n(24),ee=function(e,t){if(N>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(N>1)return Object(Z.registerBlockType)(e,t)},ne=function(){return N>2},re=function(){return N>1}},7:function(e,t){!function(){e.exports=this.React}()},70:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(14),o=n.n(i),a=n(15),u=n.n(a),l=n(12),s=n.n(l),b=n(16),f=n.n(b),d=n(17),p=n.n(d),g=n(10),m=n.n(g),v=n(0),O=n(8),h=n(9),j=n.n(h),y=n(4),w=n(201);n(127);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return p()(this,n)}}var S=function(e){f()(n,e);var t=_(n);function n(){var e;return o()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return u()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,i=n.checked,o=n.instanceId,a=n.className,u=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return u&&(e=Object(O.isFunction)(u)?u(i):u),Object(v.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",a)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(v.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var i={};return s===e.value?(i.isPrimary=!0,i["aria-pressed"]=!0):(i.isSecondary=!0,i["aria-pressed"]=!1),Object(v.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},i),e.label)}))))}}]),n}(v.Component);t.a=Object(w.a)(S)},8:function(e,t){!function(){e.exports=this.lodash}()},889:function(e,t,n){e.exports=n(930)},890:function(e,t){},930:function(e,t,n){"use strict";n.r(t);var r=n(11),c=n.n(r),i=n(0),o=n(1),a=n(24),u=n(55),l=n(32),s=Object(i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),b=n(9),f=n.n(b),d=n(23),p=n(4),g=n(158),m=n(195),v=n(70),O=n(18),h=n.n(O),j=n(160),y=(n(2),n(44)),w=(n(890),n(279)),_=n(39),S=n(287),k=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.formatPrice)(e),Object(_.formatPrice)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.formatPrice)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.formatPrice)(t))},E=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,a=void 0===c?function(){}:c,u=e.showLabel,l=void 0===u||u,s=e.displayStyle,b=r?Object(i.createElement)(i.Fragment,null,r," ",n):n,f=Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n);return Object(i.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+n},l&&Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(i.createElement)(S.a,{element:"span",text:b,onRemove:a,radius:"large",ariaLabel:f}):Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},b,Object(i.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:a},f)))},x=n(173),C=n(29),N=n(280),P=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,a=e.operator,u=void 0===a?"in":a,l=e.displayStyle,s=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),b=s.results,f=s.isLoading,d=Object(j.b)("attributes",[]),p=h()(d,2),g=p[0],m=p[1];if(f)return null;var v=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},v,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=b.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===u&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),E({type:v,name:Object(C.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(N.a)(g,m,n,e)},showLabel:!1,displayStyle:l})}))))},R=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(j.b)("attributes",[]),a=h()(c,2),u=a[0],l=a[1],s=Object(j.b)("min_price"),b=h()(s,2),d=b[0],p=b[1],g=Object(j.b)("max_price"),m=h()(g,2),v=m[0],O=m[1],_=Object(i.useMemo)((function(){return Number.isFinite(d)||Number.isFinite(v)?E({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:k(d,v),removeCallback:function(){p(void 0),O(void 0)},displayStyle:t.displayStyle}):null}),[d,v,t.displayStyle,p,O]),S=Object(i.useMemo)((function(){return u.map((function(e){var n=Object(w.b)(e.attribute);return Object(i.createElement)(P,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[u,t.displayStyle]);if(!(u.length>0||Number.isFinite(d)||Number.isFinite(v)||r))return null;var x="h".concat(t.headingLevel),C=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(i.createElement)(i.Fragment,null,!r&&t.heading&&Object(i.createElement)(x,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:C},r?Object(i.createElement)(i.Fragment,null,E({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),E({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(i.createElement)(i.Fragment,null,_,S)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){p(void 0),O(void 0),l([])}},Object(i.createElement)(y.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},L=Object(p.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,a=t.heading,u=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(d.InspectorControls,{key:"inspector"},Object(i.createElement)(p.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(v.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:c,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:function(e){return n({displayStyle:e})}}),Object(i.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(i.createElement)(g.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:u,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(m.a,{headingLevel:u,heading:a,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(p.Disabled,null,Object(i.createElement)(R,{attributes:t,isEditor:!0})))}));Object(a.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(u.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:L,save:function(e){var t=e.attributes,n=t.className,r={"data-display-style":t.displayStyle,"data-heading":t.heading,"data-heading-level":t.headingLevel};return Object(i.createElement)("div",c()({className:f()("is-loading",n)},r),Object(i.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var r,o,a=t[0],u=t[1],l=t[2],b=0,f=[];b<a.length;b++)o=a[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==c[u]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},c={4:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var s=u;return i.push([854,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(c)};c.Provider},119:function(e,t){},144:function(e,t,n){"use strict";var r=n(14),c=n.n(r),i=n(15),o=n.n(i),a=n(16),u=n.n(a),l=n(17),s=n.n(l),b=n(10),f=n.n(b),d=n(0),p=n(7),g=n(1),m=n(4);function v(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(d.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(m.Path,{d:n[t]})):null}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var h=function(e){u()(n,e);var t=O(n);function n(){return c()(this,n),t.apply(this,arguments)}return o()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(d.createElement)(v,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,i=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(d.createElement)(m.ToolbarGroup,{isCollapsed:r,icon:Object(d.createElement)(v,{level:o}),controls:Object(p.range)(c,i).map((function(t){return e.createLevelControl(t,o,a)}))})}}]),n}(d.Component);t.a=h},146:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return g}));var r=n(18),c=n.n(r),i=n(37),o=n(21),a=n(0),u=n(100),l=n(33),s=n.n(l),b=n(53),f=n(96),d=function(e){var t=Object(u.a)();e=e||t;var n=Object(o.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},p=function(e,t,n){var r=Object(u.a)();n=n||r;var c=Object(o.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(a.useCallback)((function(t){l(n,e,t)}),[n,e,l])]},g=function(e,t){var n=Object(u.a)(),r=d(t=t||n),i=c()(r,2),o=i[0],l=i[1],p=Object(b.a)(o),g=Object(b.a)(e),m=Object(f.a)(g),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){s()(m,g)||(l(Object.assign({},p,g)),v.current=!0)}),[p,g,m,l]),v.current?[o,l]:[e,l]}},156:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(37),c=n(21),i=n(0),o=n(53),a=n(95),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,d=void 0===f||f;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var p=Object(i.useRef)({results:[],isLoading:!0}),g=Object(o.a)(b),m=Object(o.a)(l),v=Object(a.a)(),O=Object(c.useSelect)((function(e){if(!d)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],o=c.getCollectionError.apply(c,i);return o&&v(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,d]);return null!==O&&(p.current=O),p.current}},172:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),i=n(8),o=n.n(i);n(241);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,a=e.heading,u="h".concat(n);return Object(r.createElement)(u,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:a,onChange:i}))}},188:function(e,t){},21:function(e,t){!function(){e.exports=this.wp.data}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},241:function(e,t){},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(6),c=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return c.find((function(t){return t.id===e}))},o=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},249:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i}));var r=n(7),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),o=i.length?i[0]:null;if(o&&o.slug&&Array.isArray(o.slug)&&o.slug.includes(c)){var a=o.slug.filter((function(e){return e!==c})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(o.slug=a.sort(),u.push(o)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",o=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(o):(o.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(o,"attribute")))}},255:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),u=(n(2),n(8)),l=n.n(u),s=n(1),b=n(54),f=n(261),d=(n(188),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,u=void 0===i?"li":i,s=e.className,b=void 0===s?"":s,f=e.radius,d=void 0===f?"small":f,p=e.children,g=void 0===p?null:p,m=o()(e,["text","screenReaderText","element","className","radius","children"]),v=u,O=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+d),h=Boolean(r&&r!==t);return Object(a.createElement)(v,c()({className:O},m),Object(a.createElement)("span",{"aria-hidden":h,className:"wc-block-components-chip__text"},t),h&&Object(a.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,u=e.disabled,p=void 0!==u&&u,g=e.onRemove,m=void 0===g?function(){}:g,v=e.removeOnAnyClick,O=void 0!==v&&v,h=e.text,j=e.screenReaderText,y=void 0===j?"":j,w=o()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=O?"span":"button";if(!n){var S=y&&"string"==typeof y?y:h;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var E={"aria-label":n,disabled:p,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},k=O?E:{},x=O?{"aria-hidden":!0}:E;return Object(a.createElement)(d,c()({},w,k,{className:l()(i,"is-removable"),element:O?"button":w.element,screenReaderText:y,text:h}),Object(a.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(a.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},261:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),u=n(31),l=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(u.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=l},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},4:function(e,t){!function(){e.exports=this.wp.components}()},42:function(e,t,n){"use strict";var r=n(5),c=n.n(r),i=n(0),o=(n(2),n(9)),a=n(8),u=n.n(a);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=n,f=null!=r;return!b&&f?(t=c||"span",l=s(s({},l),{},{className:u()(l.className,"screen-reader-text")}),Object(i.createElement)(t,l,r)):(t=c||o.Fragment,b&&f&&n!==r?Object(i.createElement)(t,l,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,l,n))}},53:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(33),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},54:function(e,t,n){"use strict";var r=n(5),c=n.n(r),i=n(24),o=n.n(i),a=n(9);n(2);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=o()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},6:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"I",(function(){return i})),n.d(t,"O",(function(){return o})),n.d(t,"y",(function(){return a})),n.d(t,"A",(function(){return u})),n.d(t,"m",(function(){return l})),n.d(t,"z",(function(){return s})),n.d(t,"C",(function(){return b})),n.d(t,"o",(function(){return f})),n.d(t,"B",(function(){return d})),n.d(t,"n",(function(){return p})),n.d(t,"E",(function(){return g})),n.d(t,"u",(function(){return m})),n.d(t,"w",(function(){return v})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return j})),n.d(t,"k",(function(){return y})),n.d(t,"K",(function(){return w})),n.d(t,"P",(function(){return _})),n.d(t,"q",(function(){return S})),n.d(t,"p",(function(){return E})),n.d(t,"H",(function(){return k})),n.d(t,"c",(function(){return x})),n.d(t,"v",(function(){return C})),n.d(t,"S",(function(){return P})),n.d(t,"T",(function(){return R})),n.d(t,"J",(function(){return L})),n.d(t,"a",(function(){return T})),n.d(t,"M",(function(){return z})),n.d(t,"b",(function(){return H})),n.d(t,"L",(function(){return V})),n.d(t,"D",(function(){return B})),n.d(t,"i",(function(){return F})),n.d(t,"N",(function(){return M})),n.d(t,"h",(function(){return U})),n.d(t,"j",(function(){return I})),n.d(t,"G",(function(){return G})),n.d(t,"F",(function(){return Q})),n.d(t,"R",(function(){return Y})),n.d(t,"Q",(function(){return K})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return q})),n.d(t,"f",(function(){return J})),n.d(t,"g",(function(){return $})),n.d(t,"x",(function(){return X})),n.d(t,"W",(function(){return ee})),n.d(t,"X",(function(){return te})),n.d(t,"U",(function(){return ne})),n.d(t,"V",(function(){return re}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),a=Object(r.getSetting)("max_columns",6),u=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),f=Object(r.getSetting)("default_rows",3),d=Object(r.getSetting)("min_height",500),p=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),v=Object(r.getSetting)("limitTags"),O=Object(r.getSetting)("hasProducts",!0),h=Object(r.getSetting)("hasTags",!0),j=Object(r.getSetting)("homeUrl",""),y=Object(r.getSetting)("couponsEnabled",!0),w=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),S=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),E=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),k=Object(r.getSetting)("productCount",0),x=Object(r.getSetting)("attributes",[]),C=Object(r.getSetting)("isShippingCalculatorEnabled",!0),N=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),P=Object(r.getSetting)("wcBlocksAssetUrl",""),R=Object(r.getSetting)("wcBlocksBuildUrl",""),L=Object(r.getSetting)("shippingCountries",{}),T=Object(r.getSetting)("allowedCountries",{}),z=Object(r.getSetting)("shippingStates",{}),H=Object(r.getSetting)("allowedStates",{}),V=Object(r.getSetting)("shippingMethodsExist",!1),B=Object(r.getSetting)("paymentGatewaySortOrder",[]),F=Object(r.getSetting)("checkoutShowLoginReminder",!0),A={id:0,title:"",permalink:""},D=Object(r.getSetting)("storePages",{shop:A,cart:A,checkout:A,privacy:A,terms:A}),M=D.shop.permalink,U=D.checkout.id,I=D.checkout.permalink,G=D.privacy.permalink,Q=D.privacy.title,Y=D.terms.permalink,K=D.terms.title,W=D.cart.id,q=D.cart.permalink,J=Object(r.getSetting)("checkoutAllowsGuest",!1),$=Object(r.getSetting)("checkoutAllowsSignup",!1),X=Object(r.getSetting)("loginUrl","/wp-login.php"),Z=n(23),ee=function(e,t){if(N>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(N>1)return Object(Z.registerBlockType)(e,t)},ne=function(){return N>2},re=function(){return N>1}},63:function(e,t){!function(){e.exports=this.wc.priceFormat}()},68:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(14),o=n.n(i),a=n(15),u=n.n(a),l=n(12),s=n.n(l),b=n(16),f=n.n(b),d=n(17),p=n.n(d),g=n(10),m=n.n(g),v=n(0),O=n(7),h=n(8),j=n.n(h),y=n(4),w=n(177);n(119);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return p()(this,n)}}var S=function(e){f()(n,e);var t=_(n);function n(){var e;return o()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return u()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,i=n.checked,o=n.instanceId,a=n.className,u=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return u&&(e=Object(O.isFunction)(u)?u(i):u),Object(v.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",a)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(v.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var i={};return s===e.value?(i.isPrimary=!0,i["aria-pressed"]=!0):(i.isSecondary=!0,i["aria-pressed"]=!1),Object(v.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},i),e.label)}))))}}]),n}(v.Component);t.a=Object(w.a)(S)},7:function(e,t){!function(){e.exports=this.lodash}()},854:function(e,t,n){e.exports=n(894)},855:function(e,t){},894:function(e,t,n){"use strict";n.r(t);var r=n(11),c=n.n(r),i=n(0),o=n(1),a=n(23),u=n(54),l=n(31),s=Object(i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),b=n(8),f=n.n(b),d=n(22),p=n(4),g=n(144),m=n(172),v=n(68),O=n(18),h=n.n(O),j=n(146),y=(n(2),n(42)),w=(n(855),n(248)),_=n(63),S=n(255),E=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.formatPrice)(e),Object(_.formatPrice)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.formatPrice)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.formatPrice)(t))},k=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,a=void 0===c?function(){}:c,u=e.showLabel,l=void 0===u||u,s=e.displayStyle,b=r?Object(i.createElement)(i.Fragment,null,r," ",n):n,f=Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n);return Object(i.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+n},l&&Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(i.createElement)(S.a,{element:"span",text:b,onRemove:a,radius:"large",ariaLabel:f}):Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},b,Object(i.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:a},f)))},x=n(156),C=n(28),N=n(249),P=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,a=e.operator,u=void 0===a?"in":a,l=e.displayStyle,s=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),b=s.results,f=s.isLoading,d=Object(j.b)("attributes",[]),p=h()(d,2),g=p[0],m=p[1];if(f)return null;var v=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},v,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=b.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===u&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),k({type:v,name:Object(C.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(N.a)(g,m,n,e)},showLabel:!1,displayStyle:l})}))))},R=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(j.b)("attributes",[]),a=h()(c,2),u=a[0],l=a[1],s=Object(j.b)("min_price"),b=h()(s,2),d=b[0],p=b[1],g=Object(j.b)("max_price"),m=h()(g,2),v=m[0],O=m[1],_=Object(i.useMemo)((function(){return Number.isFinite(d)||Number.isFinite(v)?k({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:E(d,v),removeCallback:function(){p(void 0),O(void 0)},displayStyle:t.displayStyle}):null}),[d,v,t.displayStyle,p,O]),S=Object(i.useMemo)((function(){return u.map((function(e){var n=Object(w.b)(e.attribute);return Object(i.createElement)(P,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[u,t.displayStyle]);if(!(u.length>0||Number.isFinite(d)||Number.isFinite(v)||r))return null;var x="h".concat(t.headingLevel),C=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(i.createElement)(i.Fragment,null,!r&&t.heading&&Object(i.createElement)(x,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:C},r?Object(i.createElement)(i.Fragment,null,k({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),k({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(i.createElement)(i.Fragment,null,_,S)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){p(void 0),O(void 0),l([])}},Object(i.createElement)(y.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},L=Object(p.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,a=t.heading,u=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(d.InspectorControls,{key:"inspector"},Object(i.createElement)(p.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(v.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:c,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:function(e){return n({displayStyle:e})}}),Object(i.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(i.createElement)(g.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:u,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(m.a,{headingLevel:u,heading:a,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(p.Disabled,null,Object(i.createElement)(R,{attributes:t,isEditor:!0})))}));Object(a.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(u.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:L,save:function(e){var t=e.attributes,n=t.className,r={"data-display-style":t.displayStyle,"data-heading":t.heading,"data-heading-level":t.headingLevel};return Object(i.createElement)("div",c()({className:f()("is-loading",n)},r),Object(i.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})},9:function(e,t){!function(){e.exports=this.React}()},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(18),c=n.n(r),i=n(0),o=function(){var e=Object(i.useState)(),t=c()(e,2)[1];return Object(i.useCallback)((function(e){return t((function(){throw e}))}),[])}},96:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(9),c=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}}});
|
build/all-products-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-warning', 'wp-wordcount'), 'version' => 'fd2de089f691f8f94871e39f9fbb8eac');
|
build/all-products-frontend.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
!function(e){function t(t){for(var n,o,c=t[0],i=t[1],a=0,s=[];a<c.length;a++)o=c[a],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&s.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(u&&u(t);s.length;)s.shift()()}var n={},r={1:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+({2:"atomic-block-components/add-to-cart",3:"atomic-block-components/button",4:"atomic-block-components/category-list",5:"atomic-block-components/image",6:"atomic-block-components/price",7:"atomic-block-components/rating",8:"atomic-block-components/sale-badge",9:"atomic-block-components/sku",10:"atomic-block-components/stock-indicator",11:"atomic-block-components/summary",12:"atomic-block-components/tag-list",13:"atomic-block-components/title",20:"vendors--atomic-block-components/price"}[e]||e)+"-frontend.js"}(e);var u=new Error;i=function(t){a.onerror=a.onload=null,clearTimeout(s);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",u.name="ChunkLoadError",u.type=o,u.request=c,n[1](u)}r[e]=void 0}};var s=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var a=0;a<c.length;a++)t(c[a]);var u=i;o(o.s=216)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"u",(function(){return c})),n.d(t,"y",(function(){return i})),n.d(t,"r",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return m})),n.d(t,"C",(function(){return v})),n.d(t,"D",(function(){return g})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return j})),n.d(t,"b",(function(){return w})),n.d(t,"q",(function(){return k})),n.d(t,"g",(function(){return E})),n.d(t,"x",(function(){return R})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return x})),n.d(t,"s",(function(){return C})),n.d(t,"B",(function(){return N})),n.d(t,"A",(function(){return T})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return D})),n.d(t,"f",(function(){return F})),n.d(t,"p",(function(){return M})),n.d(t,"E",(function(){return I}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),f=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),d=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),m=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),v=Object(r.getSetting)("wcBlocksAssetUrl",""),g=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),j=Object(r.getSetting)("shippingStates",{}),w=Object(r.getSetting)("allowedStates",{}),k=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),E=Object(r.getSetting)("checkoutShowLoginReminder",!0),S={id:0,title:"",permalink:""},P=Object(r.getSetting)("storePages",{shop:S,cart:S,checkout:S,privacy:S,terms:S}),R=P.shop.permalink,_=(P.checkout.id,P.checkout.permalink),x=P.privacy.permalink,C=P.privacy.title,N=P.terms.permalink,T=P.terms.title,A=(P.cart.id,P.cart.permalink),D=Object(r.getSetting)("checkoutAllowsGuest",!1),F=Object(r.getSetting)("checkoutAllowsSignup",!1),M=Object(r.getSetting)("loginUrl","/wp-login.php"),I=(n(40),function(){return h>1})},function(e,t,n){var r=n(81),o=n(82),c=n(58),i=n(83);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(60);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(55);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(24);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wc.blocksCheckout}()},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},,function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(49);var o=n(55);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(69);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(29),o=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(22),c=n.n(o),i=function(e){var t=Object(r.useRef)();return c()(e,t.current)||(t.current=e),t.current}},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=(n(3),n(2)),i=n(5),a=n.n(i);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=n,f=null!=r;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||c.Fragment,l&&f&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(32),o=n.n(r),c=n(33),i=n.n(c),a=n(21),u=n.n(a),s=n(34),l=n.n(s),f=n(35),p=n.n(f),d=n(25),b=n.n(d),m=n(7),h=n.n(m),v=(n(3),n(2)),g=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(g.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,i=void 0===c?Object(g.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(g.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(72);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=j(n);function n(){var e;o()(this,n);for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof i?i({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(v.Component);w.defaultProps={showErrorMessage:!0};t.a=w},,function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(57),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(73))},,,,function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,,function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(49);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(16),o=n(0);function c(e){var t=Object(o.useState)((function(){return!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)})),n=Object(r.a)(t,2),c=n[0],i=n[1];return Object(o.useEffect)((function(){if(e){var t=function(){return i(window.matchMedia(e).matches)};t();var n=window.matchMedia(e);return n.addListener(t),function(){n.removeListener(t)}}}),[e]),e&&c}},function(e,t){!function(){e.exports=this.wp.warning}()},function(e,t,n){var r=n(59);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),o=n.n(r),c=n(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=Object(r.createContext)("page"),c=function(){return Object(r.useContext)(o)};o.Provider},function(e,t,n){"use strict";var r=n(6),o=n(17),c=n(0),i=n(5),a=n.n(i),u=n(8),s=n(54),l=n.n(s);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}var h=n(42),v=n(13);function g(e,t){return!t||"object"!==Object(h.a)(t)&&"function"!=typeof t?Object(v.a)(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=n(16),j=n(41),w=n(51),k=n(56),E={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},S={">=":"min-width","<":"max-width"},P={">=":function(e,t){return t>=e},"<":function(e,t){return t<e}},R=Object(c.createContext)(null),_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">=",n=Object(c.useContext)(R),r=!n&&"(".concat(S[t],": ").concat(E[e],"px)"),o=Object(k.a)(r);return n?P[t](E[e],n):o};_.__experimentalWidthProvider=R.Provider;var x=_,C=n(159),N=n(117),T=n(19);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t,n,r,o,c,i){var a=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-a/2>0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==c&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=s);var d,b={popoverLeft:f,contentWidth:f-a>0?a:f},m={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},h=n,v=null;if(!o)if("center"===n&&l.contentWidth===a)h="center";else if("left"===n&&b.contentWidth===a)h="left";else if("right"===n&&m.contentWidth===a)h="right";else{var g="left"===(h=b.contentWidth>m.contentWidth?"left":"right")?b.contentWidth:m.contentWidth;v=g!==a?g:null}if(d="center"===h?l.popoverLeft:"left"===h?b.popoverLeft:m.popoverLeft,i){var y=i.getBoundingClientRect();d=Math.min(d,y.right-a)}return{xAxis:h,popoverLeft:d,contentWidth:v}}function M(e,t,n,r,o,c,i){var a=t.height;if(o){var u=(Object(j.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,b=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&f.contentHeight===a)d="top";else if("bottom"===n&&p.contentHeight===a)d="bottom";else{var m="top"===(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;b=m!==a?m:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:b}}var I=n(30);var L=function(e,t){return function(n){var r=e(n),o=n.displayName,c=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(u.upperFirst)(Object(u.camelCase)(t)),"(").concat(c,")"),r}};function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var V=Object(c.createContext)({focusHistory:[]}),z=V.Provider,q=V.Consumer;z.displayName="FocusReturnProvider",q.displayName="FocusReturnConsumer";c.Component;function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var H=L((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,i=void 0===o?u.stubTrue:o;return function(e){var t=function(t){m(r,t);var n=W(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return d(r,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,o=[].concat(Object(I.a)(u.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(I.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),r}(c.Component);return function(e){return Object(c.createElement)(q,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var K=L((function(e){return function(t){m(r,t);var n=U(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(v.a)(e)),e}return d(r,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===w.TAB){var t=j.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),r}(c.Component)}),"withConstrainedTabbing");function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var G=["button","submit"];function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var $=L((function(e){return function(t){m(o,t);var n=Q(o);function o(){var e;return f(this,o),(e=n.apply(this,arguments)).bindNode=e.bindNode.bind(Object(v.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(v.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(v.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(v.a)(e)),e}return d(o,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,n=e.target;Object(u.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(u.includes)(G,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(c.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),o}(c.Component)}),"withFocusOutside")(function(e){m(n,e);var t=Y(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),n}(c.Component));function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,i=0,a=0;function u(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=a)}function s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}return function(e){m(n,e);var t=J(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function X(e){e.stopPropagation()}var ee=Object(c.forwardRef)((function(e,t){var n=e.children,i=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},i,{ref:t,onMouseDown:X}),n)})),te=n(45);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e){var t=Object(c.useContext)(te.a),n=t.slots[e]||{},r=t.fills[e],o=Object(c.useMemo)((function(){return r||[]}),[r]),i=Object(c.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),a=Object(c.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),u=Object(c.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),s=Object(c.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return re(re({},n),{},{updateSlot:i,unregisterSlot:a,fills:o,registerFill:u,unregisterFill:s})}function ce(e,t,n){return(ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}var ie=n(22),ae=n.n(ie);function ue(e){var t=function(e,t){if("object"!==Object(h.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Object(h.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(h.a)(t)?t:String(t)}function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e){var t,n,r,i,a,u,s,l,f,p,d,b,m,h=e.children,v=(t=Object(c.useState)({}),n=Object(O.a)(t,2),r=n[0],i=n[1],a=Object(c.useState)({}),u=Object(O.a)(a,2),s=u[0],l=u[1],f=Object(c.useCallback)((function(e,t,n){i((function(r){var o=r[e]||{};return le(le({},r),{},Object(T.a)({},e,le(le({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),p=Object(c.useCallback)((function(e,t){i((function(n){var r=n[e],c=Object(o.a)(n,[e].map(ue));return(null==r?void 0:r.ref)===t?c:n}))}),[]),d=Object(c.useCallback)((function(e,t){var n=r[e];if(n&&!ae()(n.fillProps,t)){n.fillProps=t;var o=s[e];o&&o.map((function(e){return e.current.rerender()}))}}),[r,s]),b=Object(c.useCallback)((function(e,t){l((function(n){return le(le({},n),{},Object(T.a)({},e,[].concat(Object(I.a)(n[e]||[]),[t])))}))}),[]),m=Object(c.useCallback)((function(e,t){l((function(n){return n[e]?le(le({},n),{},Object(T.a)({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(c.useMemo)((function(){return{slots:r,fills:s,registerSlot:f,updateSlot:d,unregisterSlot:p,registerFill:b,unregisterFill:m}}),[r,s,f,d,p,b,m]));return Object(c.createElement)(te.a.Provider,{value:v},h)}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var de=Object(c.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),be=de.Provider,me=de.Consumer;c.Component;function he(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var ve=function(e){m(n,e);var t=he(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(Object(v.a)(e)),e}return d(n,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||ce(y(n.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,r=e.fillProps,o=void 0===r?{}:r,i=e.getFills,a=Object(u.map)(i(n,this),(function(e){var t=e.occurrence,n=Object(u.isFunction)(e.children)?e.children(o):e.children;return c.Children.map(n,(function(e,n){if(!e||Object(u.isString)(e))return e;var r="".concat(t,"---").concat(e.key||n);return Object(c.cloneElement)(e,{key:r})}))})).filter(Object(u.negate)(c.isEmptyElement));return Object(c.createElement)(c.Fragment,null,Object(u.isFunction)(t)?t(a):a)}}]),n}(c.Component),ge=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,i=t.getFills;return Object(c.createElement)(ve,Object(r.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:i}))}))},ye=0;function Oe(e){var t=e.name,n=e.children,r=e.registerFill,o=e.unregisterFill,i=function(e){var t=Object(c.useContext)(de),n=t.getSlot,r=t.subscribe,o=Object(c.useState)(n(e)),i=Object(O.a)(o,2),a=i[0],u=i[1];return Object(c.useEffect)((function(){return u(n(e)),r((function(){u(n(e))}))}),[e]),a}(t),a=Object(c.useRef)({name:t,children:n});return a.current.occurrence||(a.current.occurrence=++ye),Object(c.useLayoutEffect)((function(){return r(t,a.current),function(){return o(t,a.current)}}),[]),Object(c.useLayoutEffect)((function(){a.current.children=n,i&&i.forceUpdate()}),[n]),Object(c.useLayoutEffect)((function(){t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?(Object(u.isFunction)(n)&&(n=n(i.props.fillProps)),Object(c.createPortal)(n,i.node)):null}var je=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(c.createElement)(Oe,Object(r.a)({},e,{registerFill:n,unregisterFill:o}))}))};function we(e){var t=e.name,n=e.fillProps,i=void 0===n?{}:n,a=e.as,u=void 0===a?"div":a,s=Object(o.a)(e,["name","fillProps","as"]),l=Object(c.useContext)(te.a),f=Object(c.useRef)();return Object(c.useLayoutEffect)((function(){return l.registerSlot(t,f,i),function(){l.unregisterSlot(t,f)}}),[l.registerSlot,l.unregisterSlot,t]),Object(c.useLayoutEffect)((function(){l.updateSlot(t,i)})),Object(c.createElement)(u,Object(r.a)({ref:f},s))}function ke(e){var t,n,r=e.name,o=e.children,i=oe(r),a=Object(c.useRef)({rerender:(t=Object(c.useState)({}),n=Object(O.a)(t,2)[1],function(){return n({})})});return Object(c.useEffect)((function(){return i.registerFill(a),function(){i.unregisterFill(a)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),Object(c.createPortal)(o,i.ref.current)):null}function Ee(e){var t=e.bubblesVirtually,n=Object(o.a)(e,["bubblesVirtually"]);return t?Object(c.createElement)(we,n):Object(c.createElement)(ge,n)}function Se(e){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(je,e),Object(c.createElement)(ke,e))}function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,c=r.split(" "),i=Object(O.a)(c,2),u=i[0],s=i[1],l=void 0===s?"center":s;return a()("components-animate__appear",(o={},Object(T.a)(o,"is-from-"+l,"center"!==l),Object(T.a)(o,"is-from-"+u,"middle"!==u),o))}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):"loading"===t?a()("components-animate__loading"):void 0}function xe(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:_e(Re({type:t},r))})}var Ce=K(H((function(e){return e.children})));function Ne(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,c=r.paddingBottom,i=r.paddingLeft,a=r.paddingRight,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=i?parseInt(i,10):0,f=a?parseInt(a,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function Te(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function De(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Fe=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,u=e.children,s=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,b=e.position,m=void 0===b?"bottom right":b,h=(e.range,e.focusOnMount),v=void 0===h?"firstElement":h,g=e.anchorRef,y=e.shouldAnchorIncludePadding,k=e.anchorRect,E=e.getAnchorRect,S=e.expandOnMobile,P=e.animate,R=void 0===P||P,_=e.onClickOutside,T=e.onFocusOutside,A=e.__unstableSticky,I=e.__unstableSlotName,L=void 0===I?"Popover":I,B=e.__unstableObserveElement,V=e.__unstableBoundaryParent,z=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(c.useRef)(null),W=Object(c.useRef)(null),H=Object(c.useRef)(),U=x("medium","<"),K=Object(c.useState)(),Q=Object(O.a)(K,2),G=Q[0],Y=Q[1],J=oe(L),X=S&&U,te=Object(C.a)(),ne=Object(O.a)(te,2),re=ne[0],ce=ne[1];p=X||p,Object(c.useLayoutEffect)((function(){if(X)return De(H.current,"is-without-arrow",p),De(H.current,"is-alternate",d),Te(H.current,"data-x-axis"),Te(H.current,"data-y-axis"),Ae(H.current,"top"),Ae(H.current,"left"),Ae(W.current,"maxHeight"),void Ae(W.current,"maxWidth");var e=function(){if(H.current&&W.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:Ne(c,r)}var i=r.top,a=r.bottom,u=i.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:Ne(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:Ne(p,f)}}(q,k,E,g,y);if(e){var t,n,r=H.current,o=r.offsetParent,c=r.ownerDocument,i=0;if(o&&o!==c.body){var a=o.getBoundingClientRect();i=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}if(V)t=null===(n=H.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode;var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=n.split(" "),u=Object(O.a)(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=M(e,t,s,p,r,o,c),b=F(e,t,f,p,r,d.yAxis,i);return D(D({},b),d)}(e,ce.height?ce:W.current.getBoundingClientRect(),m,A,H.current,i,t),s=u.popoverTop,l=u.popoverLeft,f=u.xAxis,b=u.yAxis,h=u.contentHeight,v=u.contentWidth;"number"==typeof s&&"number"==typeof l&&(Ae(H.current,"top",s+"px"),Ae(H.current,"left",l+"px")),De(H.current,"is-without-arrow",p||"center"===f&&"middle"===b),De(H.current,"is-alternate",d),Te(H.current,"data-x-axis",f),Te(H.current,"data-y-axis",b),Ae(W.current,"maxHeight","number"==typeof h?h+"px":""),Ae(W.current,"maxWidth","number"==typeof v?v+"px":"");Y(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),B&&(n=new window.MutationObserver(e)).observe(B,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[X,k,E,g,y,m,ce,A,B,V]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=j.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(v,W);var ie=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)};var ae=Object(c.createElement)($,{onFocusOutside:function(e){if(T)T(e);else if(_){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),_(t)}else n&&n()}},Object(c.createElement)(xe,{type:R&&G?"appear":null,options:{origin:G}},(function(e){var o=e.className;return Object(c.createElement)(ee,Object(r.a)({className:a()("components-popover",s,o,{"is-expanded":X,"is-without-arrow":p,"is-alternate":d})},z,{onKeyDown:ie,ref:H}),X&&Object(c.createElement)(Z,null),X&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(He,{className:"components-popover__close",icon:N.a,onClick:n})),Object(c.createElement)("div",{ref:W,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},re,u)))})));return v&&(ae=Object(c.createElement)(Ce,null,ae)),J.ref&&(ae=Object(c.createElement)(Se,{name:L},ae)),g||k?ae:Object(c.createElement)("span",{ref:q},ae)};Fe.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(Ee,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var Me=Fe;var Ie=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(u.isString)(r)&&(t=r),Object(u.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var Be=function(e){m(n,e);var t=Le(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).delayedSetIsOver=Object(u.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return d(n,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(u.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var i=c.Children.only(t),a=this.state.isOver;return Object(c.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(i.props.children,a&&Object(c.createElement)(Me,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(Ie,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),n}(c.Component),Ve=n(85);function ze(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var We=["onMouseDown","onClick"];var He=t.a=Object(c.forwardRef)((function(e,t){var n=e.href,i=e.target,s=e.isPrimary,f=e.isSmall,p=e.isTertiary,d=e.isPressed,b=e.isBusy,m=e.isDefault,h=e.isSecondary,v=e.isLink,g=e.isDestructive,y=e.className,O=e.disabled,j=e.icon,w=e.iconSize,k=e.showTooltip,E=e.tooltipPosition,S=e.shortcut,P=e.label,R=e.children,_=e.__experimentalIsFocusable,x=Object(o.a)(e,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);m&&l()("Button isDefault prop",{alternative:"isSecondary"});var C=a()("components-button",y,{"is-secondary":m||h,"is-primary":s,"is-small":f,"is-tertiary":p,"is-pressed":d,"is-busy":b,"is-link":v,"is-destructive":g,"has-text":!!j&&!!R,"has-icon":!!j}),N=O&&!_,T=void 0===n||N?"button":"a",A="a"===T?{href:n,target:i}:{type:"button",disabled:N,"aria-pressed":d};if(O&&_){A["aria-disabled"]=!0;var D,F=ze(We);try{for(F.s();!(D=F.n()).done;){x[D.value]=function(e){e.stopPropagation(),e.preventDefault()}}}catch(e){F.e(e)}finally{F.f()}}var M=!N&&(k&&P||S||!!P&&(!R||Object(u.isArray)(R)&&!R.length)&&!1!==k),I=Object(c.createElement)(T,Object(r.a)({},A,x,{className:C,"aria-label":x["aria-label"]||P,ref:t}),j&&Object(c.createElement)(Ve.a,{icon:j,size:w}),R);return M?Object(c.createElement)(Be,{text:P,shortcut:S,position:E},I):I}))},,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(71);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new b(e,t)),1!==s.length||l||a(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(2),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},c=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},i=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=i);var t=r.useState(e(null)),n=t[0],o=t[1],a=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(c,{onResize:a})}),[a]),n]}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=(n(12),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),c=function(){return Object(r.useContext)(o)}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),c=r(n(60)),i=n(2),a=r(i),u=r(n(109)),s=r(n(21)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||e===t}};function f(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function d(e){return l.und(e)?[]:l.arr(e)?e:[e]}function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return l.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var h,v,g=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}return u(t,e),t}(g),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}u(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function j(e,t){h={fn:e,transform:t}}function w(e){v=e}var k,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function P(e){k=e}var R,_=function(){return Date.now()};function x(e){R=e}var C,N,T=function(e){return e.current};function A(e){C=e}var D=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return v},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return k},injectStringInterpolator:P,get now(){return _},injectNow:function(e){_=e},get defaultElement(){return R},injectDefaultElement:x,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:A,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),F=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:C(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),M=!1,I=new Set,L=function e(){if(!M)return!1;var t=_(),n=I,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,u=0;u<i.configs.length;u++){for(var s=i.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var b=s.fromValues[p],m=s.toValues[p],h=d.lastPosition,v=m instanceof g,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(v&&(m=m.getValue()),s.immediate)d.setValue(m),d.done=!0;else if("string"!=typeof b&&"string"!=typeof m){if(void 0!==s.duration)h=b+s.easing((t-d.startTime)/s.duration)*(m-b),l=t>=d.startTime+s.duration;else if(s.decay)h=b+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(m=h);else{f=void 0!==d.lastTime?d.lastTime:t,y=void 0!==d.lastVelocity?d.lastVelocity:s.initialVelocity,t>f+64&&(f=t);for(var O=Math.floor(t-f),j=0;j<O;++j){h+=1*(y+=1*((-s.tension*(h-m)+-s.friction*y)/s.mass)/1e3)/1e3}var w=!(!s.clamp||0===s.tension)&&(b<m?h>m:h<m),k=Math.abs(y)<=s.precision,S=0===s.tension||Math.abs(m-h)<=s.precision;l=w||k&&S,d.lastVelocity=y,d.lastTime=t}v&&!s.toValues[p].done&&(l=!1),l?(d.value!==m&&(h=m),d.done=!0):a=!0,d.setValue(h),d.lastPosition=h}else d.setValue(m),d.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(I.delete(i),i.stop(!0))}return I.size?N?N():E(e):M=!1,M};function B(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return B({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,u){var s=u?u(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],u,i,a,r.map)}}var V=function(e){function t(n,r,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=B(r,o,c),i}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=B(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(g),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new z(e)})),n}u(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(y),W=0,H=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=W++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(l.arr(i)||l.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var u={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:b(r,n)},a),s=u[i.delay]&&u[i.delay].to;u[i.delay]=o({},u[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,u=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);a?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),a):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,I.has(t)||I.add(t),M||(M=!0,E(N||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,I.has(t)&&I.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,m(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,i===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,u=n.config,s=void 0===u?{}:u,f=n.reverse,m=n.attach,h=n.reset,g=n.immediate;if(f){var y=[a,c];c=y[0],a=y[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var O=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},u=l.num(i),f=l.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!v[i],m=l.arr(i),y=!u&&!m&&!f,j=l.und(c[r])?i:c[r],w=u||m||f?i:1,E=b(s,r);O&&(w=O.animations[r].parent);var S,P=a.parent,R=a.interpolation,x=d(O?w.getPayload():w),C=i;y&&(C=k({range:[0,1],output:[i,i]})(1));var N,T=R&&R.getValue(),A=!l.und(P)&&a.animatedValues.some((function(e){return!e.done})),D=!l.equ(C,T),F=!l.equ(C,a.previous),M=!l.equ(E,a.config);if(h||F&&D||M){var I;if(u||f)P=R=a.parent||new z(j);else if(m)P=R=a.parent||new q(j);else if(y){var L=a.interpolation&&a.interpolation.calc(a.parent.value);L=void 0===L||h?j:L,a.parent?(P=a.parent).setValue(0,!1):P=new z(0);var B={output:[L,i]};a.interpolation?(R=a.interpolation,a.interpolation.updateConfig(B)):R=P.interpolate(B)}return x=d(O?w.getPayload():w),S=d(P.getPayload()),h&&!y&&P.setValue(j,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=A?e.lastVelocity:void 0,e.lastTime=A?e.lastTime:void 0,e.startTime=_(),e.done=!1,e.animatedStyles.clear()})),b(g,r)&&P.setValue(y?w:i,!1),o({},e,((I={})[r]=o({},a,{name:r,parent:P,interpolation:R,animatedValues:S,toValues:x,previous:C,config:E,fromValues:d(P.getValue()),immediate:b(g,r),initialVelocity:p(E.velocity,0),clamp:p(E.clamp,!1),precision:p(E.precision,.01),tension:p(E.tension,170),friction:p(E.friction,26),mass:p(E.mass,1),duration:E.duration,easing:p(E.easing,(function(e){return e})),decay:E.decay}),I))}return D?e:(y&&(P.setValue(1,!1),R.updateConfig({output:[C,C]})),P.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:C}),N)))}),this.animations),this.hasChanged)for(var j in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[j]=this.animations[j].interpolation,this.values[j]=this.animations[j].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),U=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=l.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new H,i=o?b(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],u=c[1];r.current=a;i.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?b(e,n,t):e[n]),u||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},K=0,Q=function(e,t){return("function"==typeof t?e.map(t):d(t)).map(String)},G=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(Z,Z,Z)),te=new RegExp("rgba"+X(Z,Z,Z,Z)),ne=new RegExp("hsl"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ue(o,r,e+1/3),i=ue(o,r,e),a=ue(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function de(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function be(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|pe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),de(n[2]),de(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),de(n[2]),de(n[3]))|pe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,he=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ve=new RegExp("("+Object.keys(J).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var je={};A((function(e){return new $(e)})),x("div"),P((function(e){var t=e.output.map((function(e){return e.replace(he,be)})).map((function(e){return e.replace(ve,be)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return B(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),w(J),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=Oe(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var p in a){var d=u?p:je[p]||(je[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(d)&&e.setAttribute(d,a[p])}}),(function(e){return e}));var we,ke,Ee=(we=function(e){return i.forwardRef((function(t,n){var r=f(),u=i.useRef(!0),s=i.useRef(null),p=i.useRef(null),d=i.useCallback((function(e){var t=s.current;s.current=new F(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var b,m=s.current.getValue(),v=(m.scrollTop,m.scrollLeft,c(m,["scrollTop","scrollLeft"])),g=(b=e,!l.fun(b)||b.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return a.createElement(e,o({},v,{ref:g}))}))},void 0===(ke=!1)&&(ke=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ke?t[0].toLowerCase()+t.substring(1):t;return e[n]=we(n),e}),we)}),Se=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=l.fun(e),n=U(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=l.fun(t),c=b(t),a=i.useRef(),u=U(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:b(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=i.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:b(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&d(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,d,p]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=G(r),u=a.lazy,s=void 0!==u&&u,l=(a.unique,a.reset),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),h=a.onRest,v=a.onStart,g=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=i.useRef(!1),w=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=G(t),u=a.items,s=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,m=a.update,h=a.trail,v=void 0===h?0:h,g=a.unique,y=a.config,O=a.order,j=void 0===O?["enter","leave","update"]:O,w=G(r),k=w.keys,E=w.items,S=o({},i.current),P=[].concat(i.deleted),R=Object.keys(S),_=new Set(R),x=new Set(s),C=s.filter((function(e){return!_.has(e)})),N=i.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return _.has(e)})),A=-v;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){g&&P.find((function(t){return t.originalKey===e}))&&(P=P.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";S[e]={slot:c,originalKey:e,key:g?String(e):K++,item:o,trail:A+=v,config:b(y,o,c),from:b(n&&void 0!==l?l||{}:f,o),to:b(p,o)}}));break;case"leave":N.forEach((function(e){var t=k.indexOf(e),n=E[t];P.unshift(o({},S[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:A+=v,config:b(y,n,"leave"),to:b(d,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];S[e]=o({},S[e],{item:n,slot:"update",trail:A+=v,config:b(y,n,"update"),to:b(m,n)})}))}}var D=s.map((function(e){return S[e]}));return P.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:C.length||N.length||T.length,first:n&&0===C.length,transitions:D,current:S,deleted:P,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,u=e.item;w.current.instances.has(a)||w.current.instances.set(a,new H);var l=w.current.instances.get(a),f=o({},y,{to:r,from:n,config:c,ref:g,onRest:function(n){w.current.mounted&&(e.destroyed&&(g||s||Y(w,a),d&&d(u)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&w.current.deleted.length>0&&Y(w),h&&h(u,t,n))},onStart:v&&function(){return v(u,t)},onFrame:m&&function(e){return m(u,t,e)},delay:i,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),i.useEffect((function(){return w.current.mounted=j.current=!0,function(){w.current.mounted=j.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=U},,function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,function(e,t,n){"use strict";var r=n(19),o=n(6),c=n(17),i=n(0),a=n(28),u=n(11),s=n.n(u),l=n(14),f=n.n(l),p=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=f()(e,["className","size"]);return React.createElement(a.SVG,s()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},d=React.createElement(p,null),b=n(128),m=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=d;break;case"no-alt":t=b.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icon,n=void 0===t?null:t,r=e.size,u=Object(c.a)(e,["icon","size"]);if("string"==typeof n)return Object(i.createElement)(m,Object(o.a)({icon:n},u));if(n&&m===n.type)return Object(i.cloneElement)(n,v({},u));var s=r||24;if("function"==typeof n)return n.prototype instanceof i.Component?Object(i.createElement)(n,v({size:s},u)):n(v({size:s},u));if(n&&("svg"===n.type||n.type===a.SVG)){var l=v(v({width:s,height:s},n.props),u);return Object(i.createElement)(a.SVG,l)}return Object(i.isValidElement)(n)?Object(i.cloneElement)(n,v({size:s},u)):n}},function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(7),o=n.n(r),c=n(92),i=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(c.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,a=e.setIsSuppressed,s=Object(i.useRef)(t);Object(i.useEffect)((function(){s.current=t}),[t]);var l=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return s.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),f=Object(i.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,u({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(e,t)}}}),[n,o]);return u(u(u({notices:t},l),f),{},{setIsSuppressed:a})}},function(e,t,n){"use strict";(function(e){var r=n(0),o=n(8),c=n(5),i=n.n(c),a=n(36),u=n(1),s=(n(57),n(67));t.a=Object(r.forwardRef)((function(t,n){var c=t.className,l=t.children,f=t.spokenMessage,p=void 0===f?l:f,d=t.politeness,b=void 0===d?"polite":d,m=t.actions,h=void 0===m?[]:m,v=t.onRemove,g=void 0===v?o.noop:v;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(a.speak)(n,t)}),[n,t])}(p,b),Object(r.useEffect)((function(){var e=setTimeout((function(){g()}),1e4);return function(){return clearTimeout(e)}}),[]);var y=i()(c,"components-snackbar");return h&&h.length>1&&(void 0!==e&&e.env,h=[h[0]]),Object(r.createElement)("div",{ref:n,className:y,onClick:g,tabIndex:"0",role:"button",onKeyPress:g,"aria-label":Object(u.__)("Dismiss this notice")},Object(r.createElement)("div",{className:"components-snackbar__content"},l,h.map((function(e,t){var n=e.label,o=e.onClick,c=e.url;return Object(r.createElement)(s.a,{key:t,href:c,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},n)}))))}))}).call(this,n(73))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return m}));var r=n(10),o=n.n(r),c=n(15),i=n(12),a=n(0),u=n(66),s=n(22),l=n.n(s),f=n(38),p=n(62),d=function(e){var t=Object(u.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},b=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(i.useSelect)((function(r){return r(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},m=function(e,t){var n=Object(u.a)(),r=d(t=t||n),c=o()(r,2),i=c[0],s=c[1],b=Object(f.a)(i),m=Object(f.a)(e),h=Object(p.a)(m),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(h,m)||(s(Object.assign({},b,m)),v.current=!0)}),[b,m,h,s]),v.current?[i,s]:[e,s]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return C}));var r=n(7),o=n.n(r),c=n(10),i=n.n(c),a=(n(3),n(0)),u=n(12),s=n(139),l=n(6),f=n(26),p=n.n(f);function d(e,t,n,r,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){d(c,r,o,i,a,"next",e)}function a(e){d(c,r,o,i,a,"throw",e)}i(void 0)}))}}var m=n(16),h=n(5),v=n.n(h),g=n(8),y=n(77),O=n(160),j=n(88);var w=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?g.noop:o,i=Object(O.a)(),u=Object(a.useState)((function(){return new WeakMap})),s=Object(m.a)(u,1)[0],f=Object(y.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=b(p.a.mark((function t(n){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:s.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=b(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:i});n=v()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(a.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(a.createElement)(y.animated.div,{key:n,style:r},Object(a.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(a.createElement)(j.a,Object(l.a)({},Object(g.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},k=n(87),E=n(76),S=function(){var e=Object(E.a)().isEditor,t=Object(k.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(w,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),x=function(){return Object(a.useContext)(_)},C=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,c=void 0===o||o,l=e.context,f=void 0===l?"wc/core":l,p=Object(u.useDispatch)("core/notices"),d=p.createNotice,b=p.removeNotice,m=Object(a.useState)(!1),h=i()(m,2),v=h[0],g=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,R(R({},n),{},{context:n.context||f}))}),[d,f]),O=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;b(e,t)}),[b,f]),j=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,R(R({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(f)}}),[f]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:f,setIsSuppressed:g},k=v?null:React.createElement(s.a,{className:r,notices:w.notices}),E=v?null:React.createElement(S,null);return React.createElement(_.Provider,{value:w},c&&k,t,E)}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(12),c=n(0),i=n(38),a=n(61),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,f=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(c.useRef)({results:[],isLoading:!0}),m=Object(i.a)(f),h=Object(i.a)(s),v=Object(a.a)(),g=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,m,h],i=o.getCollectionError.apply(o,c);return i&&v(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,n,h,m,d]);return null!==g&&(b.current=g),b.current}},function(e,t){!function(){e.exports=this.wp.wordcount}()},,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(32),i=n.n(c),a=n(33),u=n.n(a),s=n(21),l=n.n(s),f=n(34),p=n.n(f),d=n(35),b=n.n(d),m=n(25),h=n.n(m),v=n(7),g=n.n(v),y=n(2);n(130);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return i()(this,r),e=n.call(this),g()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),g()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),g()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(y.createRef)(),e}return u()(r,[{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),React.createElement(e,o()({},this.props,{scrollToTop:this.scrollToTop})))}}]),r}(y.Component);return t.displayName="withScrollToTop",t}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),c=n(7),i=n.n(c),a=n(0),u=n(43);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,n=e.containers,r=e.getProps,c=void 0===r?function(){}:r,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),i=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:f})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(f.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,c=n.getErrorBoundaryProps,i=n.selector,a=n.wrapper.querySelectorAll(i),p({Block:r,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t){},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(8),c=n(5),i=n.n(c),a=n(1),u=n(36),s=n(117),l=n(67);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,f=e.children,p=e.spokenMessage,d=void 0===p?f:p,b=e.onRemove,m=void 0===b?o.noop:b,h=e.isDismissible,v=void 0===h||h,g=e.actions,y=void 0===g?[]:g,O=e.politeness,j=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):O,w=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(u.speak)(n,t)}),[n,t])}(d,j);var k=i()(t,"components-notice","is-"+c,{"is-dismissible":v});return w&&(f=Object(r.createElement)(r.RawHTML,null,f)),Object(r.createElement)("div",{className:k},Object(r.createElement)("div",{className:"components-notice__content"},f,y.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,a=e.noDefaultClasses,u=void 0!==a&&a,s=e.onClick,f=e.url;return Object(r.createElement)(l.a,{key:t,href:f,isPrimary:c,isSecondary:!u&&!f,isLink:!u&&!!f,onClick:f?void 0:s,className:i()("components-notice__action",n)},o)}))),v&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:s.a,label:Object(a.__)("Dismiss this notice"),onClick:m,showTooltip:!1}))}},function(e,t,n){"use strict";var r=n(0),o=n(28),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},,,,function(e,t,n){"use strict";var r=n(6),o=n(0),c=n(8);var i=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(i,")"),r}},a=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=a.get(e)||0;return a.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=i((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(28),u=function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(14),i=n.n(c),a=n(2);n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(15),i=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,i=r.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,function(e,t,n){"use strict";n(3);var r=n(5),o=n.n(r),c=n(39),i=n(121);n(158);t.a=Object(i.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,i=e.label,a=e.onChange,u=e.options,s=e.screenReaderLabel,l=e.readOnly,f=e.value,p="wc-block-components-sort-select__select-".concat(n);return React.createElement("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},React.createElement(c.a,{label:i,screenReaderLabel:s,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),React.createElement("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:r,onChange:a,readOnly:l,value:f},u.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(3),n(5)),i=n.n(c),a=n(116),u=n(92),s=(n(108),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=i()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(a.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",s(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37),o=n(0),c=n(9);n.p=c.D,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)((function(){return Promise.all([n.e(20),n.e(6)]).then(n.bind(null,303))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return n.e(5).then(n.bind(null,313))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return n.e(13).then(n.bind(null,312))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return n.e(7).then(n.bind(null,304))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return n.e(3).then(n.bind(null,305))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return n.e(11).then(n.bind(null,306))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return n.e(8).then(n.bind(null,290))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return n.e(9).then(n.bind(null,307))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return n.e(4).then(n.bind(null,308))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return n.e(12).then(n.bind(null,309))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return n.e(10).then(n.bind(null,310))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return n.e(2).then(n.bind(null,311))}))});var i=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,,,,,function(e,t){},function(e,t,n){"use strict";var r=n(74),o=n.n(r);t.a=o.a},function(e,t,n){"use strict";(function(e){var r=n(56),o="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0,c=e.env.FORCE_REDUCED_MOTION||o?function(){return!0}:function(){return Object(r.a)("(prefers-reduced-motion: reduce)")};t.a=c}).call(this,n(73))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},,,function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,,,,,function(e,t,n){e.exports=n(271)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(131),o=n(92),c=n(107),i=n(32),a=n.n(i),u=n(33),s=n.n(u),l=n(34),f=n.n(l),p=n(35),d=n.n(p),b=n(25),m=n.n(b),h=n(2),v=(n(3),n(10)),g=n.n(v),y=n(0),O=n(14),j=n.n(O),w=n(7),k=n.n(w),E=n(1),S=n(8),P=n(5),R=n.n(P),_=n(39),x=(n(219),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,c=e.onPageChange,i=e.totalPages,a=function(e,t,n){if(n<=2)return{minIndex:null,maxIndex:null};var r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}}(o,t,i),u=a.minIndex,s=a.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==i),p=n&&Boolean(u>3),d=n&&Boolean(s<i-2);l&&3===u&&(u-=1),f&&s===i-2&&(s+=1);var b=[];if(u&&s)for(var m=u;m<=s;m++)b.push(m);return React.createElement("div",{className:"wc-block-pagination wc-block-components-pagination"},React.createElement(_.a,{screenReaderLabel:Object(E.__)("Navigate to another page","woo-gutenberg-products-block")}),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t-1)},title:Object(E.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(_.a,{label:"<",screenReaderLabel:Object(E.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return c(1)},disabled:1===t},React.createElement(_.a,{label:1,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),1)})),p&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(E.__)("…","woo-gutenberg-products-block")),b.map((function(e){return React.createElement("button",{key:e,className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return c(e)},disabled:t===e},React.createElement(_.a,{label:e,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),e)}))})),d&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(E.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===i,"wc-block-components-pagination__page--active":t===i}),onClick:function(){return c(i)},disabled:t===i},React.createElement(_.a,{label:i,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),i)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t+1)},title:Object(E.__)("Next page","woo-gutenberg-products-block"),disabled:t>=i},React.createElement(_.a,{label:">",screenReaderLabel:Object(E.__)("Next page","woo-gutenberg-products-block")})))});x.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var C=x,N=n(138),T=(n(218),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(N.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:n,options:[{key:"menu_order",label:Object(E.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(E.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(E.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(E.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(E.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(E.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(E.__)("Order products by","woo-gutenberg-products-block"),value:o})}),A=n(79),D=n(121),F=n(11),M=n.n(F),I=n(148),L=Object(D.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,c=Object(A.useInnerBlockLayoutContext)(),i=c.parentClassName,a=c.parentName,u=0===Object.keys(t).length,s=R()("".concat(i,"__product"),"wc-block-layout",{"is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var c=Object(I.a)(t);return r.map((function(r,i){var a=g()(r,2),u=a[0],s=a[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=c[u];if(!p)return null;var d=n.id||0,b=["layout",u,i,o,d];return React.createElement(y.Suspense,{key:b.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,M()({},l,{children:f,product:n})))}))}}(a,t,o,r))})),B=n(91),V=n(98),z=n(15),q=n(12),W=n(38);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=function(e){var t={namespace:"/wc/store",resourceName:"products"},n=Object(V.a)(U(U({},t),{},{query:e})),r=n.results,o=n.isLoading,c=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,c=void 0===o?[]:o,i=t.query,a=void 0===i?{}:i;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var u=Object(W.a)(a),s=Object(W.a)(c),l=Object(q.useSelect)((function(t){var o=t(z.COLLECTIONS_STORE_KEY),c=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,c),isLoading:o.hasFinishedResolution("getCollectionHeader",c)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",U(U({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(c,10),productsLoading:o}},Q=n(62),G=n(102),Y=n(36),$=(n(217),n(129)),J=n(28),Z=React.createElement(J.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})),X=function(){var e=Object(A.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement($.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:Z,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(E.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(E.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ee=React.createElement(J.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})),te=function(e){var t=e.resetCallback,n=void 0===t?function(){}:t,r=Object(A.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement($.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(E.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(E.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(E.__)("Reset Search","woo-gutenberg-products-block")))};function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=function(e){var t=e.totalQuery,n=e.totalProducts,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.totalQuery;return!Object(S.isEqual)(t,o)&&Number.isFinite(n)},ce=Object(G.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,c=e.sortValue,i=e.scrollToTop,a=Object(B.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,c=r.rows;return re(re({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:o*c,page:n})}({attributes:t,sortValue:c,currentPage:n})),u=g()(a,1)[0],s=K(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(A.useInnerBlockLayoutContext)().parentClassName,b=function(e){e.order,e.orderby,e.page,e.per_page;return j()(e,["order","orderby","page","per_page"])||{}}(u),m=Object(B.b)("attributes",[]),h=g()(m,2),v=h[0],O=h[1],w=Object(B.b)("min_price"),k=g()(w,2),P=k[0],_=k[1],x=Object(B.b)("max_price"),N=g()(x,2),D=N[0],F=N[1],M=Object(Q.a)({totalQuery:b,totalProducts:f},oe);Object(y.useEffect)((function(){Object(S.isEqual)(b,null==M?void 0:M.totalQuery)||(r(1),null!=M&&M.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(Y.speak)(Object(E.__)("No products found","woo-gutenberg-products-block")):Object(Y.speak)(Object(E.sprintf)(Object(E._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[null==M?void 0:M.totalQuery,f,r,b]);var I,V,z,q,W,H=t.contentVisibility,U=t.columns*t.rows,G=!Number.isFinite(f)&&Number.isFinite(null==M?void 0:M.totalProducts)&&Object(S.isEqual)(b,null==M?void 0:M.totalQuery)?Math.ceil(M.totalProducts/U):Math.ceil(f/U),$=l.length?l:Array.from({length:U}),J=0!==l.length||p,Z=v.length>0||Number.isFinite(P)||Number.isFinite(D);return React.createElement("div",{className:(I=t.columns,V=t.rows,z=t.alignButtons,q=t.align,W=void 0!==q?"align"+q:"",R()(d,W,"has-"+I+"-columns",{"has-multiple-rows":V>1,"has-aligned-buttons":z}))},H.orderBy&&J&&React.createElement(T,{onChange:o,value:c}),!J&&Z&&React.createElement(te,{resetCallback:function(){O([]),_(null),F(null)}}),!J&&!Z&&React.createElement(X,null),J&&React.createElement("ul",{className:"".concat(d,"__products")},$.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(L,{key:e.id||n,attributes:t,product:e})}))),G>1&&React.createElement(C,{currentPage:n,onPageChange:function(e){i({focusableSelector:"a, button"}),r(e)},totalPages:G}))})),ie=function(e){var t=e.attributes,n=Object(y.useState)(1),r=g()(n,2),o=r[0],c=r[1],i=Object(y.useState)(t.orderby),a=g()(i,2),u=a[0],s=a[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return React.createElement(ce,{attributes:t,currentPage:o,onPageChange:function(e){c(e)},onSortChange:function(e){var t=e.target.value;s(t),c(1)},sortValue:u})},ae=n(9),ue=React.createElement("img",{src:ae.C+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}});function se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var le=function(e){f()(n,e);var t=se(n);function n(){return a()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.urlParameterSuffix;return t.isPreview?ue:React.createElement(A.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ie,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(c.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(le,e))})),getProps:function(e){return{attributes:JSON.parse(e.dataset.attributes)}}})}]);
|
1 |
+
!function(e){function t(t){for(var n,o,c=t[0],i=t[1],a=0,s=[];a<c.length;a++)o=c[a],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&s.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(u&&u(t);s.length;)s.shift()()}var n={},r={1:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+({2:"atomic-block-components/add-to-cart",3:"atomic-block-components/button",4:"atomic-block-components/category-list",5:"atomic-block-components/image",6:"atomic-block-components/price",7:"atomic-block-components/rating",8:"atomic-block-components/sale-badge",9:"atomic-block-components/sku",10:"atomic-block-components/stock-indicator",11:"atomic-block-components/summary",12:"atomic-block-components/tag-list",13:"atomic-block-components/title",20:"vendors--atomic-block-components/price"}[e]||e)+"-frontend.js"}(e);var u=new Error;i=function(t){a.onerror=a.onload=null,clearTimeout(s);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",u.name="ChunkLoadError",u.type=o,u.request=c,n[1](u)}r[e]=void 0}};var s=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var a=0;a<c.length;a++)t(c[a]);var u=i;o(o.s=216)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(71)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t,n){var r;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"u",(function(){return c})),n.d(t,"y",(function(){return i})),n.d(t,"r",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return m})),n.d(t,"C",(function(){return v})),n.d(t,"D",(function(){return g})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return j})),n.d(t,"b",(function(){return w})),n.d(t,"q",(function(){return k})),n.d(t,"g",(function(){return E})),n.d(t,"x",(function(){return R})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return x})),n.d(t,"s",(function(){return C})),n.d(t,"B",(function(){return N})),n.d(t,"A",(function(){return T})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return D})),n.d(t,"f",(function(){return F})),n.d(t,"p",(function(){return M})),n.d(t,"E",(function(){return I}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),f=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),d=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),m=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),v=Object(r.getSetting)("wcBlocksAssetUrl",""),g=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),j=Object(r.getSetting)("shippingStates",{}),w=Object(r.getSetting)("allowedStates",{}),k=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),E=Object(r.getSetting)("checkoutShowLoginReminder",!0),S={id:0,title:"",permalink:""},P=Object(r.getSetting)("storePages",{shop:S,cart:S,checkout:S,privacy:S,terms:S}),R=P.shop.permalink,_=(P.checkout.id,P.checkout.permalink),x=P.privacy.permalink,C=P.privacy.title,N=P.terms.permalink,T=P.terms.title,A=(P.cart.id,P.cart.permalink),D=Object(r.getSetting)("checkoutAllowsGuest",!1),F=Object(r.getSetting)("checkoutAllowsSignup",!1),M=Object(r.getSetting)("loginUrl","/wp-login.php"),I=(n(40),function(){return h>1})},function(e,t,n){var r=n(82),o=n(83),c=n(59),i=n(84);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(61);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(56);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(23);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},,function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(50);var o=n(56);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(70);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(27),o=n(20);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},,function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=(n(3),n(2)),i=n(5),a=n.n(i);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=n,f=null!=r;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||c.Fragment,l&&f&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(21),c=n.n(o),i=function(e){var t=Object(r.useRef)();return c()(e,t.current)||(t.current=e),t.current}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(31),o=n.n(r),c=n(32),i=n.n(c),a=n(20),u=n.n(a),s=n(33),l=n.n(s),f=n(34),p=n.n(f),d=n(24),b=n.n(d),m=n(7),h=n.n(m),v=(n(3),n(2)),g=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(g.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,i=void 0===c?Object(g.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(g.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(73);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=j(n);function n(){var e;o()(this,n);for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof i?i({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(v.Component);w.defaultProps={showErrorMessage:!0};t.a=w},function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(58),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(74))},,function(e,t){!function(){e.exports=this.wc.priceFormat}()},,,,function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,,function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(16),o=n(0);function c(e){var t=Object(o.useState)((function(){return!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)})),n=Object(r.a)(t,2),c=n[0],i=n[1];return Object(o.useEffect)((function(){if(e){var t=function(){return i(window.matchMedia(e).matches)};t();var n=window.matchMedia(e);return n.addListener(t),function(){n.removeListener(t)}}}),[e]),e&&c}},function(e,t){!function(){e.exports=this.wp.warning}()},function(e,t,n){var r=n(60);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),o=n.n(r),c=n(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=Object(r.createContext)("page"),c=function(){return Object(r.useContext)(o)};o.Provider},function(e,t,n){"use strict";var r=n(6),o=n(17),c=n(0),i=n(5),a=n.n(i),u=n(8),s=n(55),l=n.n(s);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}var h=n(42),v=n(13);function g(e,t){return!t||"object"!==Object(h.a)(t)&&"function"!=typeof t?Object(v.a)(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=n(16),j=n(41),w=n(52),k=n(57),E={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},S={">=":"min-width","<":"max-width"},P={">=":function(e,t){return t>=e},"<":function(e,t){return t<e}},R=Object(c.createContext)(null),_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">=",n=Object(c.useContext)(R),r=!n&&"(".concat(S[t],": ").concat(E[e],"px)"),o=Object(k.a)(r);return n?P[t](E[e],n):o};_.__experimentalWidthProvider=R.Provider;var x=_,C=n(160),N=n(118),T=n(19);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t,n,r,o,c,i){var a=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-a/2>0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==c&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=s);var d,b={popoverLeft:f,contentWidth:f-a>0?a:f},m={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},h=n,v=null;if(!o)if("center"===n&&l.contentWidth===a)h="center";else if("left"===n&&b.contentWidth===a)h="left";else if("right"===n&&m.contentWidth===a)h="right";else{var g="left"===(h=b.contentWidth>m.contentWidth?"left":"right")?b.contentWidth:m.contentWidth;v=g!==a?g:null}if(d="center"===h?l.popoverLeft:"left"===h?b.popoverLeft:m.popoverLeft,i){var y=i.getBoundingClientRect();d=Math.min(d,y.right-a)}return{xAxis:h,popoverLeft:d,contentWidth:v}}function M(e,t,n,r,o,c,i){var a=t.height;if(o){var u=(Object(j.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,b=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&f.contentHeight===a)d="top";else if("bottom"===n&&p.contentHeight===a)d="bottom";else{var m="top"===(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;b=m!==a?m:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:b}}var I=n(29);var L=function(e,t){return function(n){var r=e(n),o=n.displayName,c=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(u.upperFirst)(Object(u.camelCase)(t)),"(").concat(c,")"),r}};function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var V=Object(c.createContext)({focusHistory:[]}),z=V.Provider,q=V.Consumer;z.displayName="FocusReturnProvider",q.displayName="FocusReturnConsumer";c.Component;function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var H=L((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,i=void 0===o?u.stubTrue:o;return function(e){var t=function(t){m(r,t);var n=W(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return d(r,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,o=[].concat(Object(I.a)(u.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(I.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),r}(c.Component);return function(e){return Object(c.createElement)(q,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var K=L((function(e){return function(t){m(r,t);var n=U(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(v.a)(e)),e}return d(r,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===w.TAB){var t=j.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),r}(c.Component)}),"withConstrainedTabbing");function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var G=["button","submit"];function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var $=L((function(e){return function(t){m(o,t);var n=Q(o);function o(){var e;return f(this,o),(e=n.apply(this,arguments)).bindNode=e.bindNode.bind(Object(v.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(v.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(v.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(v.a)(e)),e}return d(o,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,n=e.target;Object(u.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(u.includes)(G,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(c.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),o}(c.Component)}),"withFocusOutside")(function(e){m(n,e);var t=Y(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),n}(c.Component));function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,i=0,a=0;function u(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=a)}function s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}return function(e){m(n,e);var t=J(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function X(e){e.stopPropagation()}var ee=Object(c.forwardRef)((function(e,t){var n=e.children,i=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},i,{ref:t,onMouseDown:X}),n)})),te=n(44);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e){var t=Object(c.useContext)(te.a),n=t.slots[e]||{},r=t.fills[e],o=Object(c.useMemo)((function(){return r||[]}),[r]),i=Object(c.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),a=Object(c.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),u=Object(c.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),s=Object(c.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return re(re({},n),{},{updateSlot:i,unregisterSlot:a,fills:o,registerFill:u,unregisterFill:s})}function ce(e,t,n){return(ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}var ie=n(21),ae=n.n(ie);function ue(e){var t=function(e,t){if("object"!==Object(h.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Object(h.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(h.a)(t)?t:String(t)}function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e){var t,n,r,i,a,u,s,l,f,p,d,b,m,h=e.children,v=(t=Object(c.useState)({}),n=Object(O.a)(t,2),r=n[0],i=n[1],a=Object(c.useState)({}),u=Object(O.a)(a,2),s=u[0],l=u[1],f=Object(c.useCallback)((function(e,t,n){i((function(r){var o=r[e]||{};return le(le({},r),{},Object(T.a)({},e,le(le({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),p=Object(c.useCallback)((function(e,t){i((function(n){var r=n[e],c=Object(o.a)(n,[e].map(ue));return(null==r?void 0:r.ref)===t?c:n}))}),[]),d=Object(c.useCallback)((function(e,t){var n=r[e];if(n&&!ae()(n.fillProps,t)){n.fillProps=t;var o=s[e];o&&o.map((function(e){return e.current.rerender()}))}}),[r,s]),b=Object(c.useCallback)((function(e,t){l((function(n){return le(le({},n),{},Object(T.a)({},e,[].concat(Object(I.a)(n[e]||[]),[t])))}))}),[]),m=Object(c.useCallback)((function(e,t){l((function(n){return n[e]?le(le({},n),{},Object(T.a)({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(c.useMemo)((function(){return{slots:r,fills:s,registerSlot:f,updateSlot:d,unregisterSlot:p,registerFill:b,unregisterFill:m}}),[r,s,f,d,p,b,m]));return Object(c.createElement)(te.a.Provider,{value:v},h)}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var de=Object(c.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),be=de.Provider,me=de.Consumer;c.Component;function he(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var ve=function(e){m(n,e);var t=he(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(Object(v.a)(e)),e}return d(n,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||ce(y(n.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,r=e.fillProps,o=void 0===r?{}:r,i=e.getFills,a=Object(u.map)(i(n,this),(function(e){var t=e.occurrence,n=Object(u.isFunction)(e.children)?e.children(o):e.children;return c.Children.map(n,(function(e,n){if(!e||Object(u.isString)(e))return e;var r="".concat(t,"---").concat(e.key||n);return Object(c.cloneElement)(e,{key:r})}))})).filter(Object(u.negate)(c.isEmptyElement));return Object(c.createElement)(c.Fragment,null,Object(u.isFunction)(t)?t(a):a)}}]),n}(c.Component),ge=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,i=t.getFills;return Object(c.createElement)(ve,Object(r.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:i}))}))},ye=0;function Oe(e){var t=e.name,n=e.children,r=e.registerFill,o=e.unregisterFill,i=function(e){var t=Object(c.useContext)(de),n=t.getSlot,r=t.subscribe,o=Object(c.useState)(n(e)),i=Object(O.a)(o,2),a=i[0],u=i[1];return Object(c.useEffect)((function(){return u(n(e)),r((function(){u(n(e))}))}),[e]),a}(t),a=Object(c.useRef)({name:t,children:n});return a.current.occurrence||(a.current.occurrence=++ye),Object(c.useLayoutEffect)((function(){return r(t,a.current),function(){return o(t,a.current)}}),[]),Object(c.useLayoutEffect)((function(){a.current.children=n,i&&i.forceUpdate()}),[n]),Object(c.useLayoutEffect)((function(){t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?(Object(u.isFunction)(n)&&(n=n(i.props.fillProps)),Object(c.createPortal)(n,i.node)):null}var je=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(c.createElement)(Oe,Object(r.a)({},e,{registerFill:n,unregisterFill:o}))}))};function we(e){var t=e.name,n=e.fillProps,i=void 0===n?{}:n,a=e.as,u=void 0===a?"div":a,s=Object(o.a)(e,["name","fillProps","as"]),l=Object(c.useContext)(te.a),f=Object(c.useRef)();return Object(c.useLayoutEffect)((function(){return l.registerSlot(t,f,i),function(){l.unregisterSlot(t,f)}}),[l.registerSlot,l.unregisterSlot,t]),Object(c.useLayoutEffect)((function(){l.updateSlot(t,i)})),Object(c.createElement)(u,Object(r.a)({ref:f},s))}function ke(e){var t,n,r=e.name,o=e.children,i=oe(r),a=Object(c.useRef)({rerender:(t=Object(c.useState)({}),n=Object(O.a)(t,2)[1],function(){return n({})})});return Object(c.useEffect)((function(){return i.registerFill(a),function(){i.unregisterFill(a)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),Object(c.createPortal)(o,i.ref.current)):null}function Ee(e){var t=e.bubblesVirtually,n=Object(o.a)(e,["bubblesVirtually"]);return t?Object(c.createElement)(we,n):Object(c.createElement)(ge,n)}function Se(e){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(je,e),Object(c.createElement)(ke,e))}function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,c=r.split(" "),i=Object(O.a)(c,2),u=i[0],s=i[1],l=void 0===s?"center":s;return a()("components-animate__appear",(o={},Object(T.a)(o,"is-from-"+l,"center"!==l),Object(T.a)(o,"is-from-"+u,"middle"!==u),o))}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):"loading"===t?a()("components-animate__loading"):void 0}function xe(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:_e(Re({type:t},r))})}var Ce=K(H((function(e){return e.children})));function Ne(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,c=r.paddingBottom,i=r.paddingLeft,a=r.paddingRight,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=i?parseInt(i,10):0,f=a?parseInt(a,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function Te(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function De(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Fe=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,u=e.children,s=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,b=e.position,m=void 0===b?"bottom right":b,h=(e.range,e.focusOnMount),v=void 0===h?"firstElement":h,g=e.anchorRef,y=e.shouldAnchorIncludePadding,k=e.anchorRect,E=e.getAnchorRect,S=e.expandOnMobile,P=e.animate,R=void 0===P||P,_=e.onClickOutside,T=e.onFocusOutside,A=e.__unstableSticky,I=e.__unstableSlotName,L=void 0===I?"Popover":I,B=e.__unstableObserveElement,V=e.__unstableBoundaryParent,z=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(c.useRef)(null),W=Object(c.useRef)(null),H=Object(c.useRef)(),U=x("medium","<"),K=Object(c.useState)(),Q=Object(O.a)(K,2),G=Q[0],Y=Q[1],J=oe(L),X=S&&U,te=Object(C.a)(),ne=Object(O.a)(te,2),re=ne[0],ce=ne[1];p=X||p,Object(c.useLayoutEffect)((function(){if(X)return De(H.current,"is-without-arrow",p),De(H.current,"is-alternate",d),Te(H.current,"data-x-axis"),Te(H.current,"data-y-axis"),Ae(H.current,"top"),Ae(H.current,"left"),Ae(W.current,"maxHeight"),void Ae(W.current,"maxWidth");var e=function(){if(H.current&&W.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:Ne(c,r)}var i=r.top,a=r.bottom,u=i.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:Ne(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:Ne(p,f)}}(q,k,E,g,y);if(e){var t,n,r=H.current,o=r.offsetParent,c=r.ownerDocument,i=0;if(o&&o!==c.body){var a=o.getBoundingClientRect();i=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}if(V)t=null===(n=H.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode;var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=n.split(" "),u=Object(O.a)(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=M(e,t,s,p,r,o,c),b=F(e,t,f,p,r,d.yAxis,i);return D(D({},b),d)}(e,ce.height?ce:W.current.getBoundingClientRect(),m,A,H.current,i,t),s=u.popoverTop,l=u.popoverLeft,f=u.xAxis,b=u.yAxis,h=u.contentHeight,v=u.contentWidth;"number"==typeof s&&"number"==typeof l&&(Ae(H.current,"top",s+"px"),Ae(H.current,"left",l+"px")),De(H.current,"is-without-arrow",p||"center"===f&&"middle"===b),De(H.current,"is-alternate",d),Te(H.current,"data-x-axis",f),Te(H.current,"data-y-axis",b),Ae(W.current,"maxHeight","number"==typeof h?h+"px":""),Ae(W.current,"maxWidth","number"==typeof v?v+"px":"");Y(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),B&&(n=new window.MutationObserver(e)).observe(B,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[X,k,E,g,y,m,ce,A,B,V]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=j.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(v,W);var ie=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)};var ae=Object(c.createElement)($,{onFocusOutside:function(e){if(T)T(e);else if(_){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),_(t)}else n&&n()}},Object(c.createElement)(xe,{type:R&&G?"appear":null,options:{origin:G}},(function(e){var o=e.className;return Object(c.createElement)(ee,Object(r.a)({className:a()("components-popover",s,o,{"is-expanded":X,"is-without-arrow":p,"is-alternate":d})},z,{onKeyDown:ie,ref:H}),X&&Object(c.createElement)(Z,null),X&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(He,{className:"components-popover__close",icon:N.a,onClick:n})),Object(c.createElement)("div",{ref:W,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},re,u)))})));return v&&(ae=Object(c.createElement)(Ce,null,ae)),J.ref&&(ae=Object(c.createElement)(Se,{name:L},ae)),g||k?ae:Object(c.createElement)("span",{ref:q},ae)};Fe.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(Ee,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var Me=Fe;var Ie=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(u.isString)(r)&&(t=r),Object(u.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var Be=function(e){m(n,e);var t=Le(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).delayedSetIsOver=Object(u.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return d(n,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(u.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var i=c.Children.only(t),a=this.state.isOver;return Object(c.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(i.props.children,a&&Object(c.createElement)(Me,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(Ie,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),n}(c.Component),Ve=n(86);function ze(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var We=["onMouseDown","onClick"];var He=t.a=Object(c.forwardRef)((function(e,t){var n=e.href,i=e.target,s=e.isPrimary,f=e.isSmall,p=e.isTertiary,d=e.isPressed,b=e.isBusy,m=e.isDefault,h=e.isSecondary,v=e.isLink,g=e.isDestructive,y=e.className,O=e.disabled,j=e.icon,w=e.iconSize,k=e.showTooltip,E=e.tooltipPosition,S=e.shortcut,P=e.label,R=e.children,_=e.__experimentalIsFocusable,x=Object(o.a)(e,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);m&&l()("Button isDefault prop",{alternative:"isSecondary"});var C=a()("components-button",y,{"is-secondary":m||h,"is-primary":s,"is-small":f,"is-tertiary":p,"is-pressed":d,"is-busy":b,"is-link":v,"is-destructive":g,"has-text":!!j&&!!R,"has-icon":!!j}),N=O&&!_,T=void 0===n||N?"button":"a",A="a"===T?{href:n,target:i}:{type:"button",disabled:N,"aria-pressed":d};if(O&&_){A["aria-disabled"]=!0;var D,F=ze(We);try{for(F.s();!(D=F.n()).done;){x[D.value]=function(e){e.stopPropagation(),e.preventDefault()}}}catch(e){F.e(e)}finally{F.f()}}var M=!N&&(k&&P||S||!!P&&(!R||Object(u.isArray)(R)&&!R.length)&&!1!==k),I=Object(c.createElement)(T,Object(r.a)({},A,x,{className:C,"aria-label":x["aria-label"]||P,ref:t}),j&&Object(c.createElement)(Ve.a,{icon:j,size:w}),R);return M?Object(c.createElement)(Be,{text:P,shortcut:S,position:E},I):I}))},,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(72);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new b(e,t)),1!==s.length||l||a(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(2),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},c=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},i=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=i);var t=r.useState(e(null)),n=t[0],o=t[1],a=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(c,{onResize:a})}),[a]),n]}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=(n(12),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),c=function(){return Object(r.useContext)(o)}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),c=r(n(61)),i=n(2),a=r(i),u=r(n(110)),s=r(n(20)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||e===t}};function f(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function d(e){return l.und(e)?[]:l.arr(e)?e:[e]}function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return l.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var h,v,g=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}return u(t,e),t}(g),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}u(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function j(e,t){h={fn:e,transform:t}}function w(e){v=e}var k,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function P(e){k=e}var R,_=function(){return Date.now()};function x(e){R=e}var C,N,T=function(e){return e.current};function A(e){C=e}var D=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return v},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return k},injectStringInterpolator:P,get now(){return _},injectNow:function(e){_=e},get defaultElement(){return R},injectDefaultElement:x,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:A,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),F=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:C(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),M=!1,I=new Set,L=function e(){if(!M)return!1;var t=_(),n=I,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,u=0;u<i.configs.length;u++){for(var s=i.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var b=s.fromValues[p],m=s.toValues[p],h=d.lastPosition,v=m instanceof g,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(v&&(m=m.getValue()),s.immediate)d.setValue(m),d.done=!0;else if("string"!=typeof b&&"string"!=typeof m){if(void 0!==s.duration)h=b+s.easing((t-d.startTime)/s.duration)*(m-b),l=t>=d.startTime+s.duration;else if(s.decay)h=b+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(m=h);else{f=void 0!==d.lastTime?d.lastTime:t,y=void 0!==d.lastVelocity?d.lastVelocity:s.initialVelocity,t>f+64&&(f=t);for(var O=Math.floor(t-f),j=0;j<O;++j){h+=1*(y+=1*((-s.tension*(h-m)+-s.friction*y)/s.mass)/1e3)/1e3}var w=!(!s.clamp||0===s.tension)&&(b<m?h>m:h<m),k=Math.abs(y)<=s.precision,S=0===s.tension||Math.abs(m-h)<=s.precision;l=w||k&&S,d.lastVelocity=y,d.lastTime=t}v&&!s.toValues[p].done&&(l=!1),l?(d.value!==m&&(h=m),d.done=!0):a=!0,d.setValue(h),d.lastPosition=h}else d.setValue(m),d.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(I.delete(i),i.stop(!0))}return I.size?N?N():E(e):M=!1,M};function B(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return B({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,u){var s=u?u(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],u,i,a,r.map)}}var V=function(e){function t(n,r,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=B(r,o,c),i}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=B(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(g),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new z(e)})),n}u(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(y),W=0,H=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=W++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(l.arr(i)||l.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var u={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:b(r,n)},a),s=u[i.delay]&&u[i.delay].to;u[i.delay]=o({},u[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,u=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);a?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),a):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,I.has(t)||I.add(t),M||(M=!0,E(N||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,I.has(t)&&I.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,m(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,i===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,u=n.config,s=void 0===u?{}:u,f=n.reverse,m=n.attach,h=n.reset,g=n.immediate;if(f){var y=[a,c];c=y[0],a=y[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var O=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},u=l.num(i),f=l.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!v[i],m=l.arr(i),y=!u&&!m&&!f,j=l.und(c[r])?i:c[r],w=u||m||f?i:1,E=b(s,r);O&&(w=O.animations[r].parent);var S,P=a.parent,R=a.interpolation,x=d(O?w.getPayload():w),C=i;y&&(C=k({range:[0,1],output:[i,i]})(1));var N,T=R&&R.getValue(),A=!l.und(P)&&a.animatedValues.some((function(e){return!e.done})),D=!l.equ(C,T),F=!l.equ(C,a.previous),M=!l.equ(E,a.config);if(h||F&&D||M){var I;if(u||f)P=R=a.parent||new z(j);else if(m)P=R=a.parent||new q(j);else if(y){var L=a.interpolation&&a.interpolation.calc(a.parent.value);L=void 0===L||h?j:L,a.parent?(P=a.parent).setValue(0,!1):P=new z(0);var B={output:[L,i]};a.interpolation?(R=a.interpolation,a.interpolation.updateConfig(B)):R=P.interpolate(B)}return x=d(O?w.getPayload():w),S=d(P.getPayload()),h&&!y&&P.setValue(j,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=A?e.lastVelocity:void 0,e.lastTime=A?e.lastTime:void 0,e.startTime=_(),e.done=!1,e.animatedStyles.clear()})),b(g,r)&&P.setValue(y?w:i,!1),o({},e,((I={})[r]=o({},a,{name:r,parent:P,interpolation:R,animatedValues:S,toValues:x,previous:C,config:E,fromValues:d(P.getValue()),immediate:b(g,r),initialVelocity:p(E.velocity,0),clamp:p(E.clamp,!1),precision:p(E.precision,.01),tension:p(E.tension,170),friction:p(E.friction,26),mass:p(E.mass,1),duration:E.duration,easing:p(E.easing,(function(e){return e})),decay:E.decay}),I))}return D?e:(y&&(P.setValue(1,!1),R.updateConfig({output:[C,C]})),P.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:C}),N)))}),this.animations),this.hasChanged)for(var j in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[j]=this.animations[j].interpolation,this.values[j]=this.animations[j].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),U=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=l.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new H,i=o?b(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],u=c[1];r.current=a;i.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?b(e,n,t):e[n]),u||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},K=0,Q=function(e,t){return("function"==typeof t?e.map(t):d(t)).map(String)},G=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(Z,Z,Z)),te=new RegExp("rgba"+X(Z,Z,Z,Z)),ne=new RegExp("hsl"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ue(o,r,e+1/3),i=ue(o,r,e),a=ue(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function de(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function be(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|pe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),de(n[2]),de(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),de(n[2]),de(n[3]))|pe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,he=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ve=new RegExp("("+Object.keys(J).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var je={};A((function(e){return new $(e)})),x("div"),P((function(e){var t=e.output.map((function(e){return e.replace(he,be)})).map((function(e){return e.replace(ve,be)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return B(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),w(J),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=Oe(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var p in a){var d=u?p:je[p]||(je[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(d)&&e.setAttribute(d,a[p])}}),(function(e){return e}));var we,ke,Ee=(we=function(e){return i.forwardRef((function(t,n){var r=f(),u=i.useRef(!0),s=i.useRef(null),p=i.useRef(null),d=i.useCallback((function(e){var t=s.current;s.current=new F(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var b,m=s.current.getValue(),v=(m.scrollTop,m.scrollLeft,c(m,["scrollTop","scrollLeft"])),g=(b=e,!l.fun(b)||b.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return a.createElement(e,o({},v,{ref:g}))}))},void 0===(ke=!1)&&(ke=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ke?t[0].toLowerCase()+t.substring(1):t;return e[n]=we(n),e}),we)}),Se=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=l.fun(e),n=U(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=l.fun(t),c=b(t),a=i.useRef(),u=U(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:b(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=i.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:b(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&d(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,d,p]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=G(r),u=a.lazy,s=void 0!==u&&u,l=(a.unique,a.reset),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),h=a.onRest,v=a.onStart,g=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=i.useRef(!1),w=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=G(t),u=a.items,s=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,m=a.update,h=a.trail,v=void 0===h?0:h,g=a.unique,y=a.config,O=a.order,j=void 0===O?["enter","leave","update"]:O,w=G(r),k=w.keys,E=w.items,S=o({},i.current),P=[].concat(i.deleted),R=Object.keys(S),_=new Set(R),x=new Set(s),C=s.filter((function(e){return!_.has(e)})),N=i.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return _.has(e)})),A=-v;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){g&&P.find((function(t){return t.originalKey===e}))&&(P=P.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";S[e]={slot:c,originalKey:e,key:g?String(e):K++,item:o,trail:A+=v,config:b(y,o,c),from:b(n&&void 0!==l?l||{}:f,o),to:b(p,o)}}));break;case"leave":N.forEach((function(e){var t=k.indexOf(e),n=E[t];P.unshift(o({},S[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:A+=v,config:b(y,n,"leave"),to:b(d,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];S[e]=o({},S[e],{item:n,slot:"update",trail:A+=v,config:b(y,n,"update"),to:b(m,n)})}))}}var D=s.map((function(e){return S[e]}));return P.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:C.length||N.length||T.length,first:n&&0===C.length,transitions:D,current:S,deleted:P,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,u=e.item;w.current.instances.has(a)||w.current.instances.set(a,new H);var l=w.current.instances.get(a),f=o({},y,{to:r,from:n,config:c,ref:g,onRest:function(n){w.current.mounted&&(e.destroyed&&(g||s||Y(w,a),d&&d(u)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&w.current.deleted.length>0&&Y(w),h&&h(u,t,n))},onStart:v&&function(){return v(u,t)},onFrame:m&&function(e){return m(u,t,e)},delay:i,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),i.useEffect((function(){return w.current.mounted=j.current=!0,function(){w.current.mounted=j.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=U},,function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,function(e,t,n){"use strict";var r=n(19),o=n(6),c=n(17),i=n(0),a=n(28),u=n(11),s=n.n(u),l=n(14),f=n.n(l),p=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=f()(e,["className","size"]);return React.createElement(a.SVG,s()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},d=React.createElement(p,null),b=n(129),m=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=d;break;case"no-alt":t=b.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icon,n=void 0===t?null:t,r=e.size,u=Object(c.a)(e,["icon","size"]);if("string"==typeof n)return Object(i.createElement)(m,Object(o.a)({icon:n},u));if(n&&m===n.type)return Object(i.cloneElement)(n,v({},u));var s=r||24;if("function"==typeof n)return n.prototype instanceof i.Component?Object(i.createElement)(n,v({size:s},u)):n(v({size:s},u));if(n&&("svg"===n.type||n.type===a.SVG)){var l=v(v({width:s,height:s},n.props),u);return Object(i.createElement)(a.SVG,l)}return Object(i.isValidElement)(n)?Object(i.cloneElement)(n,v({size:s},u)):n}},function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(7),o=n.n(r),c=n(93),i=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(c.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,a=e.setIsSuppressed,s=Object(i.useRef)(t);Object(i.useEffect)((function(){s.current=t}),[t]);var l=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return s.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),f=Object(i.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,u({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(e,t)}}}),[n,o]);return u(u(u({notices:t},l),f),{},{setIsSuppressed:a})}},function(e,t,n){"use strict";(function(e){var r=n(0),o=n(8),c=n(5),i=n.n(c),a=n(36),u=n(1),s=(n(58),n(68));t.a=Object(r.forwardRef)((function(t,n){var c=t.className,l=t.children,f=t.spokenMessage,p=void 0===f?l:f,d=t.politeness,b=void 0===d?"polite":d,m=t.actions,h=void 0===m?[]:m,v=t.onRemove,g=void 0===v?o.noop:v;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(a.speak)(n,t)}),[n,t])}(p,b),Object(r.useEffect)((function(){var e=setTimeout((function(){g()}),1e4);return function(){return clearTimeout(e)}}),[]);var y=i()(c,"components-snackbar");return h&&h.length>1&&(void 0!==e&&e.env,h=[h[0]]),Object(r.createElement)("div",{ref:n,className:y,onClick:g,tabIndex:"0",role:"button",onKeyPress:g,"aria-label":Object(u.__)("Dismiss this notice")},Object(r.createElement)("div",{className:"components-snackbar__content"},l,h.map((function(e,t){var n=e.label,o=e.onClick,c=e.url;return Object(r.createElement)(s.a,{key:t,href:c,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},n)}))))}))}).call(this,n(74))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return m}));var r=n(10),o=n.n(r),c=n(15),i=n(12),a=n(0),u=n(67),s=n(21),l=n.n(s),f=n(39),p=n(63),d=function(e){var t=Object(u.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},b=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(i.useSelect)((function(r){return r(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},m=function(e,t){var n=Object(u.a)(),r=d(t=t||n),c=o()(r,2),i=c[0],s=c[1],b=Object(f.a)(i),m=Object(f.a)(e),h=Object(p.a)(m),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(h,m)||(s(Object.assign({},b,m)),v.current=!0)}),[b,m,h,s]),v.current?[i,s]:[e,s]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return C}));var r=n(7),o=n.n(r),c=n(10),i=n.n(c),a=(n(3),n(0)),u=n(12),s=n(140),l=n(6),f=n(25),p=n.n(f);function d(e,t,n,r,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){d(c,r,o,i,a,"next",e)}function a(e){d(c,r,o,i,a,"throw",e)}i(void 0)}))}}var m=n(16),h=n(5),v=n.n(h),g=n(8),y=n(78),O=n(161),j=n(89);var w=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?g.noop:o,i=Object(O.a)(),u=Object(a.useState)((function(){return new WeakMap})),s=Object(m.a)(u,1)[0],f=Object(y.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=b(p.a.mark((function t(n){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:s.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=b(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:i});n=v()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(a.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(a.createElement)(y.animated.div,{key:n,style:r},Object(a.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(a.createElement)(j.a,Object(l.a)({},Object(g.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},k=n(88),E=n(77),S=function(){var e=Object(E.a)().isEditor,t=Object(k.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(w,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),x=function(){return Object(a.useContext)(_)},C=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,c=void 0===o||o,l=e.context,f=void 0===l?"wc/core":l,p=Object(u.useDispatch)("core/notices"),d=p.createNotice,b=p.removeNotice,m=Object(a.useState)(!1),h=i()(m,2),v=h[0],g=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,R(R({},n),{},{context:n.context||f}))}),[d,f]),O=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;b(e,t)}),[b,f]),j=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,R(R({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(f)}}),[f]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:f,setIsSuppressed:g},k=v?null:React.createElement(s.a,{className:r,notices:w.notices}),E=v?null:React.createElement(S,null);return React.createElement(_.Provider,{value:w},c&&k,t,E)}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(12),c=n(0),i=n(39),a=n(62),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,f=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(c.useRef)({results:[],isLoading:!0}),m=Object(i.a)(f),h=Object(i.a)(s),v=Object(a.a)(),g=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,m,h],i=o.getCollectionError.apply(o,c);return i&&v(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,n,h,m,d]);return null!==g&&(b.current=g),b.current}},function(e,t){!function(){e.exports=this.wp.wordcount}()},,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(31),i=n.n(c),a=n(32),u=n.n(a),s=n(20),l=n.n(s),f=n(33),p=n.n(f),d=n(34),b=n.n(d),m=n(24),h=n.n(m),v=n(7),g=n.n(v),y=n(2);n(131);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return i()(this,r),e=n.call(this),g()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),g()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),g()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(y.createRef)(),e}return u()(r,[{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),React.createElement(e,o()({},this.props,{scrollToTop:this.scrollToTop})))}}]),r}(y.Component);return t.displayName="withScrollToTop",t}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),c=n(7),i=n.n(c),a=n(0),u=n(43);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,n=e.containers,r=e.getProps,c=void 0===r?function(){}:r,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),i=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:f})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(f.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,c=n.getErrorBoundaryProps,i=n.selector,a=n.wrapper.querySelectorAll(i),p({Block:r,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t){},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(8),c=n(5),i=n.n(c),a=n(1),u=n(36),s=n(118),l=n(68);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,f=e.children,p=e.spokenMessage,d=void 0===p?f:p,b=e.onRemove,m=void 0===b?o.noop:b,h=e.isDismissible,v=void 0===h||h,g=e.actions,y=void 0===g?[]:g,O=e.politeness,j=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):O,w=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(u.speak)(n,t)}),[n,t])}(d,j);var k=i()(t,"components-notice","is-"+c,{"is-dismissible":v});return w&&(f=Object(r.createElement)(r.RawHTML,null,f)),Object(r.createElement)("div",{className:k},Object(r.createElement)("div",{className:"components-notice__content"},f,y.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,a=e.noDefaultClasses,u=void 0!==a&&a,s=e.onClick,f=e.url;return Object(r.createElement)(l.a,{key:t,href:f,isPrimary:c,isSecondary:!u&&!f,isLink:!u&&!!f,onClick:f?void 0:s,className:i()("components-notice__action",n)},o)}))),v&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:s.a,label:Object(a.__)("Dismiss this notice"),onClick:m,showTooltip:!1}))}},function(e,t,n){"use strict";var r=n(0),o=n(28),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},,,,function(e,t,n){"use strict";var r=n(6),o=n(0),c=n(8);var i=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(i,")"),r}},a=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=a.get(e)||0;return a.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=i((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(28),u=function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(14),i=n.n(c),a=n(2);n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(15),i=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,i=r.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,function(e,t,n){"use strict";n(3);var r=n(5),o=n.n(r),c=n(38),i=n(122);n(159);t.a=Object(i.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,i=e.label,a=e.onChange,u=e.options,s=e.screenReaderLabel,l=e.readOnly,f=e.value,p="wc-block-components-sort-select__select-".concat(n);return React.createElement("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},React.createElement(c.a,{label:i,screenReaderLabel:s,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),React.createElement("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:r,onChange:a,readOnly:l,value:f},u.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(3),n(5)),i=n.n(c),a=n(117),u=n(93),s=(n(109),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=i()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(a.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",s(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37),o=n(0),c=n(9);n.p=c.D,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)((function(){return Promise.all([n.e(20),n.e(6)]).then(n.bind(null,301))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return n.e(5).then(n.bind(null,311))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return n.e(13).then(n.bind(null,310))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return n.e(7).then(n.bind(null,302))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return n.e(3).then(n.bind(null,303))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return n.e(11).then(n.bind(null,304))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return n.e(8).then(n.bind(null,288))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return n.e(9).then(n.bind(null,305))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return n.e(4).then(n.bind(null,306))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return n.e(12).then(n.bind(null,307))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return n.e(10).then(n.bind(null,308))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return n.e(2).then(n.bind(null,309))}))});var i=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,,,,,function(e,t){},function(e,t,n){"use strict";var r=n(75),o=n.n(r);t.a=o.a},function(e,t,n){"use strict";(function(e){var r=n(57),o="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0,c=e.env.FORCE_REDUCED_MOTION||o?function(){return!0}:function(){return Object(r.a)("(prefers-reduced-motion: reduce)")};t.a=c}).call(this,n(74))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},,,function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,,,,,function(e,t,n){e.exports=n(270)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(132),o=n(93),c=n(108),i=n(31),a=n.n(i),u=n(32),s=n.n(u),l=n(33),f=n.n(l),p=n(34),d=n.n(p),b=n(24),m=n.n(b),h=n(2),v=(n(3),n(10)),g=n.n(v),y=n(0),O=n(14),j=n.n(O),w=n(7),k=n.n(w),E=n(1),S=n(8),P=n(5),R=n.n(P),_=n(38),x=(n(219),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,c=e.onPageChange,i=e.totalPages,a=function(e,t,n){if(n<=2)return{minIndex:null,maxIndex:null};var r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}}(o,t,i),u=a.minIndex,s=a.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==i),p=n&&Boolean(u>3),d=n&&Boolean(s<i-2);l&&3===u&&(u-=1),f&&s===i-2&&(s+=1);var b=[];if(u&&s)for(var m=u;m<=s;m++)b.push(m);return React.createElement("div",{className:"wc-block-pagination wc-block-components-pagination"},React.createElement(_.a,{screenReaderLabel:Object(E.__)("Navigate to another page","woo-gutenberg-products-block")}),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t-1)},title:Object(E.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(_.a,{label:"<",screenReaderLabel:Object(E.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return c(1)},disabled:1===t},React.createElement(_.a,{label:1,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),1)})),p&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(E.__)("…","woo-gutenberg-products-block")),b.map((function(e){return React.createElement("button",{key:e,className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return c(e)},disabled:t===e},React.createElement(_.a,{label:e,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),e)}))})),d&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(E.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===i,"wc-block-components-pagination__page--active":t===i}),onClick:function(){return c(i)},disabled:t===i},React.createElement(_.a,{label:i,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),i)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t+1)},title:Object(E.__)("Next page","woo-gutenberg-products-block"),disabled:t>=i},React.createElement(_.a,{label:">",screenReaderLabel:Object(E.__)("Next page","woo-gutenberg-products-block")})))});x.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var C=x,N=n(139),T=(n(218),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(N.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:n,options:[{key:"menu_order",label:Object(E.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(E.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(E.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(E.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(E.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(E.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(E.__)("Order products by","woo-gutenberg-products-block"),value:o})}),A=n(80),D=n(122),F=n(11),M=n.n(F),I=n(149),L=Object(D.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,c=Object(A.useInnerBlockLayoutContext)(),i=c.parentClassName,a=c.parentName,u=0===Object.keys(t).length,s=R()("".concat(i,"__product"),"wc-block-layout",{"is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var c=Object(I.a)(t);return r.map((function(r,i){var a=g()(r,2),u=a[0],s=a[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=c[u];if(!p)return null;var d=n.id||0,b=["layout",u,i,o,d];return React.createElement(y.Suspense,{key:b.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,M()({},l,{children:f,product:n})))}))}}(a,t,o,r))})),B=n(92),V=n(99),z=n(15),q=n(12),W=n(39);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=function(e){var t={namespace:"/wc/store",resourceName:"products"},n=Object(V.a)(U(U({},t),{},{query:e})),r=n.results,o=n.isLoading,c=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,c=void 0===o?[]:o,i=t.query,a=void 0===i?{}:i;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var u=Object(W.a)(a),s=Object(W.a)(c),l=Object(q.useSelect)((function(t){var o=t(z.COLLECTIONS_STORE_KEY),c=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,c),isLoading:o.hasFinishedResolution("getCollectionHeader",c)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",U(U({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(c,10),productsLoading:o}},Q=n(63),G=n(103),Y=n(36),$=(n(217),n(130)),J=n(28),Z=React.createElement(J.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})),X=function(){var e=Object(A.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement($.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:Z,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(E.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(E.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ee=React.createElement(J.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})),te=function(e){var t=e.resetCallback,n=void 0===t?function(){}:t,r=Object(A.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement($.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(E.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(E.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(E.__)("Reset Search","woo-gutenberg-products-block")))};function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=function(e){var t=e.totalQuery,n=e.totalProducts,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.totalQuery;return!Object(S.isEqual)(t,o)&&Number.isFinite(n)},ce=Object(G.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,c=e.sortValue,i=e.scrollToTop,a=Object(B.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,c=r.rows;return re(re({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:o*c,page:n})}({attributes:t,sortValue:c,currentPage:n})),u=g()(a,1)[0],s=K(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(A.useInnerBlockLayoutContext)().parentClassName,b=function(e){e.order,e.orderby,e.page,e.per_page;return j()(e,["order","orderby","page","per_page"])||{}}(u),m=Object(B.b)("attributes",[]),h=g()(m,2),v=h[0],O=h[1],w=Object(B.b)("min_price"),k=g()(w,2),P=k[0],_=k[1],x=Object(B.b)("max_price"),N=g()(x,2),D=N[0],F=N[1],M=Object(Q.a)({totalQuery:b,totalProducts:f},oe);Object(y.useEffect)((function(){Object(S.isEqual)(b,null==M?void 0:M.totalQuery)||(r(1),null!=M&&M.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(Y.speak)(Object(E.__)("No products found","woo-gutenberg-products-block")):Object(Y.speak)(Object(E.sprintf)(Object(E._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[null==M?void 0:M.totalQuery,f,r,b]);var I,V,z,q,W,H=t.contentVisibility,U=t.columns*t.rows,G=!Number.isFinite(f)&&Number.isFinite(null==M?void 0:M.totalProducts)&&Object(S.isEqual)(b,null==M?void 0:M.totalQuery)?Math.ceil(M.totalProducts/U):Math.ceil(f/U),$=l.length?l:Array.from({length:U}),J=0!==l.length||p,Z=v.length>0||Number.isFinite(P)||Number.isFinite(D);return React.createElement("div",{className:(I=t.columns,V=t.rows,z=t.alignButtons,q=t.align,W=void 0!==q?"align"+q:"",R()(d,W,"has-"+I+"-columns",{"has-multiple-rows":V>1,"has-aligned-buttons":z}))},H.orderBy&&J&&React.createElement(T,{onChange:o,value:c}),!J&&Z&&React.createElement(te,{resetCallback:function(){O([]),_(null),F(null)}}),!J&&!Z&&React.createElement(X,null),J&&React.createElement("ul",{className:"".concat(d,"__products")},$.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(L,{key:e.id||n,attributes:t,product:e})}))),G>1&&React.createElement(C,{currentPage:n,onPageChange:function(e){i({focusableSelector:"a, button"}),r(e)},totalPages:G}))})),ie=function(e){var t=e.attributes,n=Object(y.useState)(1),r=g()(n,2),o=r[0],c=r[1],i=Object(y.useState)(t.orderby),a=g()(i,2),u=a[0],s=a[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return React.createElement(ce,{attributes:t,currentPage:o,onPageChange:function(e){c(e)},onSortChange:function(e){var t=e.target.value;s(t),c(1)},sortValue:u})},ae=n(9),ue=React.createElement("img",{src:ae.C+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}});function se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var le=function(e){f()(n,e);var t=se(n);function n(){return a()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.urlParameterSuffix;return t.isPreview?ue:React.createElement(A.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ie,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(c.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(le,e))})),getProps:function(e){return{attributes:JSON.parse(e.dataset.attributes)}}})}]);
|
build/all-products.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => '47865600114d32028364905262d5be47');
|
build/all-products.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-products"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],b=0,p=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==c[s]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5:0,2:0,3:0,8:0,9:0,11:0,12:0,13:0,14:0,15:0,16:0},o=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({1:"atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title",2:"atomic-block-components/add-to-cart--atomic-block-components/button",3:"atomic-block-components/sale-badge",7:"atomic-block-components/add-to-cart",8:"atomic-block-components/button",9:"atomic-block-components/category-list",10:"atomic-block-components/image",11:"atomic-block-components/price",12:"atomic-block-components/rating",13:"atomic-block-components/sku",14:"atomic-block-components/stock-indicator",15:"atomic-block-components/summary",16:"atomic-block-components/tag-list",17:"atomic-block-components/title"}[e]||e)+".js"}(e);var s=new Error;o=function(t){i.onerror=i.onload=null,clearTimeout(u);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,r[1](s)}c[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:i})}),12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=s;return o.push([869,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(25),a=r.n(o),i=r(0),s=r(243),u=(r(2),r(9)),l=r.n(u);r(248);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(s.a,c()({className:b},u),n&&Object(i.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(i.createElement)("span",{className:"wc-block-components-button__text"},o))}},101:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(18),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){return t((function(){throw e}))}),[])}},103:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(7),c=function(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}},108:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=Object(n.createContext)("page"),o=function(){return Object(n.useContext)(c)};c.Provider},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},120:function(e,t){},121:function(e,t){},122:function(e,t){},123:function(e,t){},124:function(e,t){},125:function(e,t){},126:function(e,t){},127:function(e,t){},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},130:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(0),c=r(21),o=Object(n.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),a=function(){return Object(n.useContext)(o)},i=function(e){var t=e.children,r=e.currentPostId,a=void 0===r?0:r,i=e.previewData,s=void 0===i?{}:i,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:s};return Object(n.createElement)(o.Provider,{value:u},t)}},137:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(55),a=r(174),i=r(3),s=r(23),u=r(41);t.a=function(e){var t=(Object(u.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(n.createElement)("a",{href:"".concat(i.ADMIN_URL,"post.php?post=").concat(t,"&action=edit"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Edit this product's details","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:a.a,size:16}))),Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(c.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},144:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(5),c=r.n(n),o=r(199),a=r(0);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),b=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return s(s(s({notices:t},l),b),{},{setIsSuppressed:i})}},146:function(e,t){!function(){e.exports=this.wp.wordcount}()},147:function(e,t,r){"use strict";var n=r(31),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(1),u=r(8),l=(r(2),r(46)),b=r(4),p=r(9),d=r.n(p),f=r(14),m=r.n(f),O=r(15),g=r.n(O),j=r(16),v=r.n(j),h=r(17),y=r.n(h),w=r(10),E=r.n(w),k=r(151);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var P=Object(k.a)((function(e){var t=function(t){v()(n,t);var r=_(n);function n(){return m()(this,n),r.apply(this,arguments)}return g()(n,[{key:"render",value:function(){var t=this.props.selected,r=null==t;return Object(i.createElement)(e,a()({},this.props,{selected:r?[]:[t]}))}}]),n}(i.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),S=r(309),C=r(13),N=r.n(C),x=r(28),D=r.n(x),B=r(12),z=r.n(B),V=r(5),R=r.n(V),T=r(34),A=r.n(T),I=r(37),L=r(40);function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){R()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var q=Object(k.a)((function(e){var t=function(t){v()(n,t);var r=H(n);function n(){var e;m()(this,n);for(var t=arguments.length,c=new Array(t),o=0;o<t;o++)c[o]=arguments[o];return e=r.call.apply(r,[this].concat(c)),R()(z()(e),"state",{error:null,loading:!1,variations:{}}),R()(z()(e),"loadVariations",(function(){var t=e.props.products,r=e.state,n=r.loading,c=r.variations;if(!n){var o=e.getExpandedProduct();if(o&&!c[o]){var a=t.find((function(e){return e.id===o}));a.variations&&0!==a.variations.length?(e.setState({loading:!0}),Object(I.g)(o).then((function(t){var r=t.map((function(e){return M(M({},e),{},{parent:o})}));e.setState({variations:M(M({},e.state.variations),{},R()({},o,r)),loading:!1,error:null})})).catch(function(){var t=D()(N.a.mark((function t(r){var n;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(L.a)(r);case 2:n=t.sent,e.setState({variations:M(M({},e.state.variations),{},R()({},o,null)),loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({variations:M(M({},e.state.variations),{},R()({},o,null)),loading:!1,error:null})}}})),e}return g()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.selected,r=e.showVariations;t&&r&&this.loadVariations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isLoading,n=t.selected;t.showVariations&&(!A()(e.selected,n)||e.isLoading&&!r)&&this.loadVariations()}},{key:"isProductId",value:function(e){return this.props.products.some((function(t){return t.id===e}))}},{key:"findParentProduct",value:function(e){return this.props.products.filter((function(t){return t.variations&&t.variations.find((function(t){return t.id===e}))}))[0].id}},{key:"getExpandedProduct",value:function(){var e=this.props,t=e.isLoading,r=e.selected;if(!e.showVariations)return null;var n=r&&r.length?r[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(t||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!t&&n?this.isProductId(n)?n:this.findParentProduct(n):null}},{key:"render",value:function(){var t=this.props,r=t.error,n=t.isLoading,c=this.state,o=c.error,s=c.loading,u=c.variations;return Object(i.createElement)(e,a()({},this.props,{error:o||r,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:u,variationsLoading:s}))}}]),n}(i.Component);return R()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),Q=r(55),G=r(32),W=Object(i.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),U=Object(i.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#757575",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),Y=r(43);r(209);function K(e,t){if(!t)return e;var r=new RegExp(Object(u.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var J=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(i.createElement)(Q.a,{srcElement:W}):Object(i.createElement)(Q.a,{srcElement:U})},$={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},X=function(e){var t=e.expandedProduct,r=e.error,n=e.isLoading,o=e.onChange,p=e.onSearch,f=e.products,m=e.renderItem,O=e.selected,g=e.showVariations,j=e.variations,v=e.variationsLoading,h=function(e){var r=e.item,n=e.search,c=e.depth,o=void 0===c?0:c,p=e.isSelected,f=e.onSelect,m=r.variations&&Array.isArray(r.variations)?r.variations.length:0,O=d()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":n.length>0,"is-skip-level":0===o&&0!==r.parent,"is-variable":m>0}),g=Object.assign({},e);delete g.isSingle;var j={role:"menuitemradio"};return r.breadcrumbs.length&&(j["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),m&&(j["aria-expanded"]=r.id===t),r.breadcrumbs.length?(Object(u.isEmpty)(r.variation)||(r.name=r.variation),Object(i.createElement)(l.b,a()({className:O},e,j))):[Object(i.createElement)(b.MenuItem,a()({key:"product-".concat(r.id),isSelected:p},g,j,{className:O,onClick:function(){f(r)()}}),Object(i.createElement)("span",{className:"woocommerce-search-list__item-state"},J(p)),Object(i.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(i.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:K(r.name,n)}})),m?Object(i.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(s.sprintf)(Object(s._n)("%d variation","%d variations",m,"woo-gutenberg-products-block"),m)):null),t===r.id&&m>0&&v&&Object(i.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(i.createElement)(b.Spinner,null))]};if(r)return Object(i.createElement)(Y.a,{error:r});var y=j&&j[t]?j[t]:[],w=[].concat(c()(f),c()(y));return Object(i.createElement)(l.a,{className:"woocommerce-products",list:w,isLoading:n,isSingle:!0,selected:w.filter((function(e){var t=e.id;return O.includes(t)})),onChange:o,renderItem:m||(g?h:null),onSearch:p,messages:$,isHierarchical:!0})};X.defaultProps={expandedProduct:null,selected:[],showVariations:!1};t.a=P(Object(S.a)(q(X)))},149:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=o},154:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(9)),o=r.n(c),a=r(44),i=r(244);r(211);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,s=e.onChange,u=e.options,l=e.screenReaderLabel,b=e.readOnly,p=e.value,d="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.a,{label:i,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:c,onChange:s,readOnly:b,value:p},u.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},155:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(56),s=r(9),u=r.n(s),l=(r(2),r(246),function(e){var t=e.className,r=e.currency,n=e.maxPrice,c=e.minPrice,a=e.priceClassName,s=e.priceStyle;return Object(o.createElement)("span",{className:t},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:c,style:s})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:n,style:s}))}),b=function(e){var t=e.className,r=e.currency,n=e.regularPriceClassName,c=e.regularPriceStyle,s=e.regularPrice,l=e.priceClassName,b=e.priceStyle,p=e.price;return Object(o.createElement)("span",{className:t},Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",n),style:c},e)},value:s}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",l),style:b},e)},value:p}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.maxPrice,s=void 0===a?null:a,p=e.minPrice,d=void 0===p?null:p,f=e.price,m=void 0===f?null:f,O=e.priceClassName,g=e.priceStyle,j=e.regularPrice,v=e.regularPriceClassName,h=e.regularPriceStyle,y=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return j&&m!==j?Object(o.createElement)(b,{className:y,currency:n,price:m,priceClassName:O,priceStyle:g,regularPrice:j,regularPriceClassName:v,regularPriceStyle:h}):null!==d&&null!==s?Object(o.createElement)(l,{className:y,currency:n,maxPrice:s,minPrice:d,priceClassName:O,priceStyle:g}):null!==m?Object(o.createElement)("span",{className:y},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",O),currency:n,value:m,style:g})):Object(o.createElement)("span",{className:y},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",O)}))}},156:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(5),c=r.n(n),o=r(8);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:s,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case s:return b.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,b));case u:return b.delete(o),i(i({},e),{},c()({},n,b))}return e}},158:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(15),a=r.n(o),i=r(16),s=r.n(i),u=r(17),l=r.n(u),b=r(10),p=r.n(b),d=r(0),f=r(8),m=r(1),O=r(4);function g(e){var t=e.level,r={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return r.hasOwnProperty(t)?Object(d.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(O.Path,{d:r[t]})):null}function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p()(e);if(t){var c=p()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return l()(this,r)}}var v=function(e){s()(r,e);var t=j(r);function r(){return c()(this,r),t.apply(this,arguments)}return a()(r,[{key:"createLevelControl",value:function(e,t,r){var n=e===t;return{icon:Object(d.createElement)(g,{level:e}),title:Object(m.sprintf)(Object(m.__)("Heading %d"),e),isActive:n,onClick:function(){return r(e)}}}},{key:"render",value:function(){var e=this,t=this.props,r=t.isCollapsed,n=void 0===r||r,c=t.minLevel,o=t.maxLevel,a=t.selectedLevel,i=t.onChange;return Object(d.createElement)(O.ToolbarGroup,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},160:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(18),c=r.n(n),o=r(38),a=r(21),i=r(0),s=r(108),u=r(34),l=r.n(u),b=r(54),p=r(103),d=function(e){var t=Object(s.a)();e=e||t;var r=Object(a.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(i.useCallback)((function(t){n(e,t)}),[e,n])]},f=function(e,t,r){var n=Object(s.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){u(r,e,t)}),[r,e,u])]},m=function(e,t){var r=Object(s.a)(),n=d(t=t||r),o=c()(n,2),a=o[0],u=o[1],f=Object(b.a)(a),m=Object(b.a)(e),O=Object(p.a)(m),g=Object(i.useRef)(!1);return Object(i.useEffect)((function(){l()(O,m)||(u(Object.assign({},f,m)),g.current=!0)}),[f,m,O,u]),g.current?[a,u]:[e,u]}},172:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(5),c=r.n(n),o=r(38),a=r(21),i=r(130),s=r(29),u=r(8);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},d=b(b({},p),{},{email:"",phone:""}),f=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:d,shippingAddress:p,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(i.b)(),r=t.isEditor,n=t.previewData,c=(null==n?void 0:n.previewCart)||{},s=e.shouldSelect,u=Object(a.useSelect)((function(e,t){var n=t.dispatch;if(!s)return m;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:d,shippingAddress:p,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(o.CART_STORE_KEY),i=a.getCartData(),u=a.getCartErrors(),l=a.getCartTotals(),b=!a.hasFinishedResolution("getCartData"),O=a.isCustomerDataUpdating(),g=n(o.CART_STORE_KEY).receiveCart,j=f(i.billingAddress),v=i.needsShipping?f(i.shippingAddress):j;return{cartCoupons:i.coupons,cartItems:i.items||[],cartFees:i.fees||[],cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors||[],cartTotals:l,cartIsLoading:b,cartErrors:u,billingAddress:j,shippingAddress:v,extensions:i.extensions||{},shippingRates:i.shippingRates||[],shippingRatesLoading:O,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements||[],receiveCart:g}}),[s]);return u}},173:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(38),c=r(21),o=r(0),a=r(54),i=r(101),s=function(e){var t=e.namespace,r=e.resourceName,s=e.resourceValues,u=void 0===s?[]:s,l=e.query,b=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),m=Object(a.a)(b),O=Object(a.a)(u),g=Object(i.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,m,O],a=c.getCollectionError.apply(c,o);return a&&g(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,O,m,d]);return null!==j&&(f.current=j),f.current}},174:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},183:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(6),o=Object(n.createElement)("img",{src:c.S+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},184:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(25),a=r.n(o),i=r(0),s=(r(2),r(29)),u=r(9),l=r.n(u);r(245);t.a=function(e){var t=e.className,r=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,u=e.name,b=e.permalink,p=void 0===b?"":b,d=a()(e,["className","disabled","name","permalink"]),f=l()("wc-block-components-product-name",r);return o?Object(i.createElement)("span",c()({className:f},d),Object(s.decodeEntities)(u)):Object(i.createElement)("a",c()({className:f,href:p},d),Object(s.decodeEntities)(u))}},185:function(e,t,r){"use strict";var n=r(0),c=r(146),o=r(94),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",n=i(e),c=n.split(" ").splice(0,t).join(" ");return Object(o.autop)(s(c,r))},l=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=i(e),a=c.slice(0,t);if(r)return Object(o.autop)(s(a,n));var u=a.match(/([\s]+)/g),l=u?u.length:0,b=c.slice(0,t+l);return Object(o.autop)(s(b,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,b=void 0===s?"words":s,p=e.className,d=void 0===p?"":p,f=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),b=Object(c.count)(s,r);return b<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,b)}),[t,i,b]);return Object(n.createElement)(n.RawHTML,{className:d},f)}},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},194:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),b=r(16),p=r.n(b),d=r(17),f=r.n(d),m=r(10),O=r.n(m),g=r(5),j=r.n(g),v=r(0),h=r(7);r(271);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=y(n);function n(){var e;return a()(this,n),e=r.call(this),j()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(l()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(h.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(v.createElement)(v.Fragment,null,Object(v.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(v.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),n}(h.Component);return t.displayName="withScrollToTop",t}},199:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return j}));var n=r(5),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=(r(2),r(21)),u=r(311),l=r(972),b=r(144),p=r(130),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),r=t.notices,n=t.removeNotice;if(e)return null;var c=r.filter((function(e){return"snackbar"===e.type}));return Object(i.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:n})};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(i.useContext)(O)},j=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(s.useDispatch)("core/notices"),f=p.createNotice,g=p.removeNotice,j=Object(i.useState)(!1),v=a()(j,2),h=v[0],y=v[1],w=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(e,t,m(m({},r),{},{context:r.context||b}))}),[f,b]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;g(e,t)}),[g,b]),k=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w("default",e,m(m({},t),{},{type:"snackbar"}))}),[w]),_={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:w,createSnackbarNotice:k,removeNotice:E,context:b,setIsSuppressed:y},P=h?null:Object(i.createElement)(u.a,{className:n,notices:_.notices}),S=h?null:Object(i.createElement)(d,null);return Object(i.createElement)(O.Provider,{value:_},o&&P,t,S)}},20:function(e,t){!function(){e.exports=this.wp.url}()},202:function(e,t){},209:function(e,t){},21:function(e,t){!function(){e.exports=this.wp.data}()},211:function(e,t){},214:function(e,t){!function(){e.exports=this.wp.warning}()},23:function(e,t){!function(){e.exports=this.wp.blockEditor}()},234:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},i=function(e){return n(e,c.ERROR)},s=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},24:function(e,t){!function(){e.exports=this.wp.blocks}()},245:function(e,t){},246:function(e,t){},247:function(e,t){},248:function(e,t){},249:function(e,t){},27:function(e,t){!function(){e.exports=this.moment}()},271:function(e,t){},277:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(25),a=r.n(o),i=r(0),s=r(32),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=r(293);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},29:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},293:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(25),a=r.n(o),i=r(0),s=r(32),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},309:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(13),a=r.n(o),i=r(28),s=r.n(i),u=r(14),l=r.n(u),b=r(15),p=r.n(b),d=r(12),f=r.n(d),m=r(16),O=r.n(m),g=r(17),j=r.n(g),v=r(10),h=r.n(v),y=r(0),w=r(8),E=r(151),k=(r(2),r(6)),_=r(37),P=r(40);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h()(e);if(t){var c=h()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return j()(this,r)}}var C=Object(E.a)((function(e){var t=function(t){O()(o,t);var r,n=S(o);function o(){var e;return l()(this,o),(e=n.apply(this,arguments)).state={list:[],loading:!0},e.setError=e.setError.bind(f()(e)),e.debouncedOnSearch=Object(w.debounce)(e.onSearch.bind(f()(e)),400),e}return p()(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(_.h)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(_.h)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"setError",value:(r=s()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)(t);case 2:r=e.sent,this.setState({list:[],loading:!1,error:r});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.error,o=r.list,a=r.loading;return Object(y.createElement)(e,c()({},this.props,{error:n,products:o,isLoading:a,onSearch:k.u?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),o}(y.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=C},310:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(9),s=r.n(i),u=r(44),l=r(41),b=r(67);r(574);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)().product;if(!i.id||!i.on_sale)return null;var b="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(o.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,b,c()({},"".concat(n,"__product-onsale"),n))},Object(o.createElement)(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},311:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r.n(a),s=r(409),u=r(199),l=(r(247),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,r=e.notices,n=Object(u.b)().removeNotice,a=r.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=i()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))}},312:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(93),o=(r(2),r(249),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,i=e.elementId,s=void 0===i?"":i,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var p=l(a)||{};if(!p.message||p.hidden)return null;r=p.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(s)},r))})},32:function(e,t){!function(){e.exports=this.wp.primitives}()},34:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},35:function(e,t){!function(){e.exports=this.wp.dataControls}()},37:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"f",(function(){return O})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return j})),r.d(t,"g",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(5),c=r.n(n),o=r(20),a=r(19),i=r.n(a),s=r(8),u=r(6);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,l=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:u.u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},s),i))];return u.u&&r.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),l}({selected:r,search:c,queryArgs:void 0===a?[]:a});return Promise.all(l.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},d=function(e){return i()({path:"/wc/store/products/".concat(e)})},f=function(){return i()({path:"wc/store/products/attributes"})},m=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},O=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.w?100:0,orderby:u.w?"count":"name",order:u.w?"desc":"asc",search:n})];return u.w&&r.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),c}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},g=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},j=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},h=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},379:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},38:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},39:function(e,t){!function(){e.exports=this.wc.blocksCheckout}()},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(13),c=r.n(n),o=r(28),a=r.n(o),i=r(1),s=function(){var e=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},41:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},410:function(e,t){},412:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(6);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.V)()&&(s=i(i({},s),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=s},413:function(e,t,r){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},414:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(18),s=r.n(i),u=r(0),l=(r(2),r(1)),b=r(9),p=r.n(b),d=r(6),f=r(41),m=r(67),O=r(310);r(575);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=function(){return Object(u.createElement)("img",{src:d.E,alt:"",width:500,height:500})},h=function(e){var t=e.image,r=e.onLoad,n=e.loaded,o=e.showFullSize,a=e.fallbackAlt,i=t||{},s=i.thumbnail,l=i.src,b=i.srcset,p=i.sizes,d=j({alt:i.alt||a,onLoad:r,hidden:!n,src:s},o&&{src:l,srcSet:b,sizes:p});return Object(u.createElement)(u.Fragment,null,d.src&&Object(u.createElement)("img",c()({"data-testid":"product-image"},d)),!n&&Object(u.createElement)(v,null))};t.a=Object(m.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,c=e.productLink,o=void 0===c||c,i=e.showSaleBadge,b=e.saleBadgeAlign,d=void 0===b?"right":b,m=Object(f.useInnerBlockLayoutContext)().parentClassName,g=Object(f.useProductDataContext)().product,y=Object(u.useState)(!1),w=s()(y,2),E=w[0],k=w[1];if(!g.id)return Object(u.createElement)("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",a()({},"".concat(m,"__product-image"),m))},Object(u.createElement)(v,null));var _=!!g.images.length,P=_?g.images[0]:null,S=o?"a":u.Fragment,C=Object(l.sprintf)(Object(l.__)("Link to %s","woo-gutenberg-products-block"),g.name),N=j({href:g.permalink,rel:"nofollow"},!_&&{"aria-label":C});return Object(u.createElement)("div",{className:p()(t,"wc-block-components-product-image",a()({},"".concat(m,"__product-image"),m))},Object(u.createElement)(S,o&&N,!!i&&Object(u.createElement)(O.default,{align:d,product:g}),Object(u.createElement)(h,{fallbackAlt:g.name,image:P,onLoad:function(){return k(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},415:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(156),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},416:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d}));var n=r(13),c=r.n(n),o=r(48),a=r.n(o),i=r(28),s=r.n(i);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=[],s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(n));case 10:d=e.sent,"object"===a()(d)&&i.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=u(o),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},417:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},418:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(9)),o=r.n(c),a=r(18),i=r.n(a),s=r(1),u=r(54),l=r(144),b=r(234),p=r(952),d="pristine",f="idle",m="disabled",O="processing",g="before_processing",j="after_processing",v={status:d,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},h="set_pristine",y="set_idle",w="set_disabled",E="set_processing",k="set_before_processing",_="set_after_processing",P="set_processing_response",S="set_has_error",C="set_no_error",N="set_quantity",x="set_request_params",D=h,B=y,z=w,V=E,R=k,T=_,A=P,I=S,L=C,F=N,M=x,H=function(){return{type:D}},q=function(){return{type:B}},Q=function(){return{type:z}},G=function(){return{type:V}},W=function(){return{type:R}},U=function(){return{type:T}},Y=function(e){return{type:A,data:e}},K=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:L;return{type:t}},J=function(e){return{type:F,quantity:e}},$=function(e){return{type:M,data:e}},X=r(5),Z=r.n(X);function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=h,ne=y,ce=w,oe=E,ae=k,ie=_,se=P,ue=S,le=C,be=N,pe=x,de=d,fe=f,me=m,Oe=O,ge=g,je=j,ve=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case re:e=v;break;case ne:e=t.status!==fe?te(te({},t),{},{status:fe}):t;break;case ce:e=t.status!==me?te(te({},t),{},{status:me}):t;break;case be:e=n!==t.quantity?te(te({},t),{},{quantity:n}):t;break;case pe:e=te(te({},t),{},{requestParams:te(te({},t.requestParams),o)});break;case se:e=te(te({},t),{},{processingResponse:o});break;case oe:e=!1===(e=t.status!==Oe?te(te({},t),{},{status:Oe,hasError:!1}):t).hasError?e:te(te({},e),{},{hasError:!1});break;case ae:e=t.status!==ge?te(te({},t),{},{status:ge,hasError:!1}):t;break;case ie:e=t.status!==je?te(te({},t),{},{status:je}):t;break;case ue:e=t.hasError?t:te(te({},t),{},{hasError:!0}),e=t.status===Oe||t.status===ge?te(te({},e),{},{status:fe}):e;break;case le:e=t.hasError?te(te({},t),{},{hasError:!1}):t}return e!==t&&c!==re&&e.status===de&&(e.status=fe),e},he=r(156),ye=r(415),we="add_to_cart_before_processing",Ee="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",_e=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(ye.a)(Ee,e),onAddToCartProcessingWithError:Object(ye.a)(ke,e),onAddToCartBeforeProcessing:Object(ye.a)(we,e)}},Pe=r(416),Se=r(93),Ce=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ne=function(){return Object(n.useContext)(Ce)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ve,v),a=i()(o,2),d=a[0],h=a[1],y=Object(n.useReducer)(he.b,{}),w=i()(y,2),E=w[0],k=w[1],_=Object(u.a)(E),P=Object(l.a)(),S=P.addErrorNotice,C=P.removeNotices,N=Object(Se.b)().setValidationErrors,x=Object(b.a)(),D=x.isSuccessResponse,B=x.isErrorResponse,z=x.isFailResponse,V=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:_e(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:_e(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:_e(k).onAddToCartBeforeProcessing}}),[k]),R=Object(n.useMemo)((function(){return{resetForm:function(){h(H())},submitForm:function(){h(W())},setQuantity:function(e){h(J(e))},setHasError:function(e){h(K(e))},setRequestParams:function(e){h($(e))},setAfterProcessing:function(e){h(Y(e)),h(U())}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(p.a)(r);e!==m||t?e!==m&&t&&h(Q()):h(q())}),[d.status,r,h]),Object(n.useEffect)((function(){d.status===g&&(C("error"),Object(Pe.a)(_,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&N(r)})),h(q())):h(G())})))}),[d.status,N,S,C,h,_]),Object(n.useEffect)((function(){if(d.status===j){var e={processingResponse:d.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;S(e.message,t)}};if(d.hasError)return void Object(Pe.b)(_,ke,e).then((function(r){if(B(r)||z(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");S(c,{id:"add-to-cart"})}h(q())}));Object(Pe.b)(_,Ee,e).then((function(e){B(e)||z(e)?(t(e),h(K(!0))):h(q())}))}}),[d.status,d.hasError,d.processingResponse,R,S,B,z,D,_]);var T=Object(p.b)(r),A={product:r,productType:r.type||"simple",productIsPurchasable:Object(p.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:T,showFormElements:c&&T,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:d.status===f,isDisabled:d.status===m,isProcessing:d.status===O,isBeforeProcessing:d.status===g,isAfterProcessing:d.status===j,hasError:d.hasError,eventRegistration:V,dispatchActions:R};return Object(n.createElement)(Ce.Provider,{value:A},t)},De=r(19),Be=r.n(De),ze=r(172),Ve=r(29),Re=r(558);function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Ae=function(){var e=Ne(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,b=e.requestParams,p=Object(Se.b)(),d=p.hasValidationErrors,f=p.showAllValidationErrors,m=Object(l.a)(),O=m.addErrorNotice,g=m.removeNotice,j=Object(ze.a)().receiveCart,v=Object(n.useState)(!1),h=i()(v,2),y=h[0],w=h[1],E=!a&&u,k=Object(n.useCallback)((function(){return!d||(f(),{type:"error"})}),[d,f]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var _=Object(n.useCallback)((function(){w(!0),g("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},b);Be()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Be.a.setNonce(e.headers),e.json().then((function(r){e.ok?j(r):(r.body&&r.body.message?O(Object(Ve.decodeEntities)(r.body.message),{id:"add-to-cart"}):O(Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Re.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&j(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,O,g,j,t,c,b]);return Object(n.useEffect)((function(){E&&!y&&_()}),[E,_,y]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(Se.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Ae,null)))},Le=r(41),Fe=r(8),Me=r(67),He=(r(410),r(100)),qe=r(55),Qe=r(584),Ge=r(872),We=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(He.a,{className:t,href:r,rel:"nofollow"},c)},Ue=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,i=e.onClick;return Object(n.createElement)(He.a,{className:t,disabled:o,showSpinner:c,onClick:i},a&&r>0?Object(s.sprintf)(Object(s._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(s.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(qe.a,{srcElement:Qe.a,alt:Object(s.__)("Done","woo-gutenberg-products-block")}))},Ye=function(){var e=Ne(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(Ge.a)(o.id||0).cartQuantity,m=Object(n.useState)(!1),O=i()(m,2),g=O[0],j=O[1],v=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return p||j(!0),!0}),0);return function(){e()}}),[b,p]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Ue,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:f,isDisabled:u,isProcessing:l,isDone:g,onClick:function(){return d.submitForm()}}):Object(n.createElement)(We,{className:"wc-block-components-product-add-to-cart-button",href:v.url,text:v.text||Object(s.__)("View Product","woo-gutenberg-products-block")})},Ke=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Je=function(e){var t=e.reason,r=void 0===t?Object(s.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Je,null):t.id&&!t.is_in_stock?Object(n.createElement)(Je,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},Xe=(r(583),r(31)),Ze=r.n(Xe),et=r(4),tt=r(7),rt=r(312),nt={value:"",label:Object(s.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,i=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,p=void 0===b?Object(s.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(Se.b)(),f=d.getValidationError,m=d.setValidationErrors,O=d.clearValidationError,g=t,j=f(g)||{};return Object(tt.useEffect)((function(){i?O(g):m(Z()({},g,{message:p,hidden:!0}))}),[i,g,p,O,m]),Object(tt.useEffect)((function(){return function(){O(g)}}),[g,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Ve.decodeEntities)(t),value:i||"",options:[nt].concat(Ze()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":j.message&&!j.hidden})}),Object(n.createElement)(rt.a,{propertyName:g,elementId:g}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},st=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],i=at(at({},r),{},Z()({},c,null)),s=o?it(e,t,i):null,u=null!==s?s.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Ve.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(u.a)(t),a=Object(u.a)(r),s=Object(n.useState)(0),l=i()(s,2),b=l[0],p=l[1],d=Object(n.useState)({}),f=i()(d,2),m=f[0],O=f[1],g=Object(n.useMemo)((function(){return st(o,a,m)}),[m,o,a]);return Object(n.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(o).length?p(function(e,t,r){return it(e,t,r)[0]||0}(o,a,m)):b>0&&p(0)}),[m,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[c,b,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:g[e],value:m[e],onChange:function(t){O(lt(lt({},m),{},Z()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Fe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Je,null):t.id&&!t.is_in_stock?Object(n.createElement)(Je,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(pt,{product:t,dispatchers:a}),Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},ft=function(){return Object(n.createElement)(Ye,null)},mt=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Ot=function(){return Object(n.createElement)(mt,null)},gt=function(){var e=Ne(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(Ot,null):"external"===r?Object(n.createElement)(ft,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Ye,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Le.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Fe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(gt,null)))}))},419:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r.n(a),s=r(41),u=r(23),l=r(6),b=function(e){var t=e.color,r=e.fontSize;return Object(l.V)()?{color:t,fontSize:r}:{}},p=r(67),d=r(184);r(573),t.a=Object(p.withProductDataContext)((function(e){var t,r,n,a=e.className,p=e.headingLevel,f=void 0===p?2:p,m=e.productLink,O=void 0===m||m,g=e.align,j=e.color,v=e.customColor,h=e.fontSize,y=e.customFontSize,w=Object(s.useInnerBlockLayoutContext)().parentClassName,E=Object(s.useProductDataContext)().product,k="h".concat(f),_=Object(u.getColorClassName)("color",j),P=Object(u.getFontSizeClass)(h),S=i()((t={"has-text-color":j||v,"has-font-size":h||y},c()(t,_,_),c()(t,P,P),t));return E.id?Object(o.createElement)(k,{className:i()(a,"wc-block-components-product-title",(r={},c()(r,"".concat(w,"__product-title"),w),c()(r,"wc-block-components-product-title--align-".concat(g),g&&Object(l.V)()),r))},Object(o.createElement)(d.a,{className:i()(c()({},S,Object(l.V)())),disabled:!O,name:E.name,permalink:E.permalink,rel:O?"nofollow":null,style:b({color:v,fontSize:y})})):Object(o.createElement)(k,{className:i()(a,"wc-block-components-product-title",(n={},c()(n,"".concat(w,"__product-title"),w),c()(n,"wc-block-components-product-title--align-".concat(g),g&&Object(l.V)()),c()(n,S,Object(l.V)()),n)),style:b({color:v,fontSize:y})})}))},42:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},43:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(42));t.a=function(e){var t,r,a,i=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=i).message,a=t.type,r?"general"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},44:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r(9),s=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,b=null!=r,p=null!=n;return!b&&p?(t=c||"span",u=l(l({},u),{},{className:s()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,n)):(t=c||a.Fragment,b&&p&&r!==n?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,u,r))}},50:function(e,t){!function(){e.exports=this.wp.keycodes}()},52:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},54:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(34),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},55:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(25),a=r.n(o),i=r(7);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))}},555:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r.n(a),s=r(155),u=r(39),l=r(41),b=r(23),p=r(6),d=r(67);t.default=Object(d.withProductDataContext)((function(e){var t,r,n,a,d,f,m,O=e.className,g=e.align,j=e.fontSize,v=e.customFontSize,h=e.saleFontSize,y=e.customSaleFontSize,w=e.color,E=e.customColor,k=e.saleColor,_=e.customSaleColor,P=Object(l.useInnerBlockLayoutContext)().parentClassName,S=Object(l.useProductDataContext)().product,C=i()(O,c()({},"".concat(P,"__product-price"),P));if(!S.id)return Object(o.createElement)(s.a,{align:g,className:C});var N=Object(b.getColorClassName)("color",w),x=Object(b.getFontSizeClass)(j),D=Object(b.getColorClassName)("color",k),B=Object(b.getFontSizeClass)(h),z=i()((t={"has-text-color":w||E,"has-font-size":j||v},c()(t,N,N),c()(t,x,x),t)),V=i()((r={"has-text-color":k||_,"has-font-size":h||y},c()(r,D,D),c()(r,B,B),r)),R={color:E,fontSize:v},T={color:_,fontSize:y},A=S.prices,I=Object(u.getCurrencyFromPriceResponse)(A),L=A.price!==A.regular_price,F=L?i()((n={},c()(n,"".concat(P,"__product-price__value"),P),c()(n,V,Object(p.V)()),n)):i()((a={},c()(a,"".concat(P,"__product-price__value"),P),c()(a,z,Object(p.V)()),a)),M=L?T:R;return Object(o.createElement)(s.a,{align:g,className:C,currency:I,price:A.price,priceClassName:F,priceStyle:Object(p.V)()?M:{},minPrice:null==A||null===(d=A.price_range)||void 0===d?void 0:d.min_amount,maxPrice:null==A||null===(f=A.price_range)||void 0===f?void 0:f.max_amount,regularPrice:A.regular_price,regularPriceClassName:i()((m={},c()(m,"".concat(P,"__product-price__regular"),P),c()(m,z,Object(p.V)()),m)),regularPriceStyle:Object(p.V)()?R:{}})}))},556:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(9),s=r.n(i),u=r(41),l=r(67),b=(r(576),function(e){var t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0});t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product,i=b(n);if(!i)return null;var l={width:i/5*100+"%"},p=Object(a.sprintf)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),i);return Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-rating",c()({},"".concat(r,"__product-rating"),r))},Object(o.createElement)("div",{className:s()("wc-block-components-product-rating__stars","".concat(r,"__product-rating__stars")),role:"img","aria-label":p},Object(o.createElement)("span",{style:l},p)))}))},557:function(e,t,r){"use strict";r.r(t);var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(0),s=(r(2),r(9)),u=r.n(s),l=r(1),b=r(872),p=r(29),d=r(558),f=r(41),m=r(67),O=(r(577),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,s=t.has_options,f=t.is_purchasable,m=t.is_in_stock,O=Object(b.a)(n),g=O.cartQuantity,j=O.addingToCart,v=O.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.c)()}),[g]);var h=Number.isFinite(g)&&g>0,y=!s&&f&&m,w=Object(p.decodeEntities)((null==a?void 0:a.description)||""),E=h?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",g,"woo-gutenberg-products-block"),g):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),k=y?"button":"a",_={};return y?_.onClick=function(){v()}:(_.href=o,_.rel="nofollow"),Object(i.createElement)(k,c()({"aria-label":w,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:h}),disabled:j},_),E)}),g=function(){return Object(i.createElement)("button",{className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};t.default=Object(m.withProductDataContext)((function(e){var t=e.className,r=Object(f.useInnerBlockLayoutContext)().parentClassName,n=Object(f.useProductDataContext)().product;return Object(i.createElement)("div",{className:u()(t,"wp-block-button","wc-block-components-product-button",a()({},"".concat(r,"__product-add-to-cart"),r))},n.id?Object(i.createElement)(O,{product:n}):Object(i.createElement)(g,null))}))},558:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a}));var n=window.Event||null,c=function(e,t){var r=t.bubbles,c=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element;if(i||(i=document.body),"function"==typeof n){var s=new n(e,{bubbles:c,cancelable:a});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,a),i.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var o=function(){c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},559:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r.n(a),s=r(185),u=r(3),l=r(41),b=r(67);r(578);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product;if(!n)return Object(o.createElement)("div",{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r))});var a=n.short_description?n.short_description:n.description;if(!a)return null;var b=Object(u.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r)),source:a,maxLength:150,countType:b})}))},56:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(25),s=r.n(i),u=r(0),l=r(193),b=r(9),p=r.n(b);r(202);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,o=e.onValueChange,a=s()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var i=r/Math.pow(10,n.minorUnit);if(!Number.isFinite(i))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=f(f(f({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),m=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:i,onValueChange:m}))}},560:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(9)),s=r.n(i),u=r(41),l=r(67);r(579);t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product.sku;return n?Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-sku",c()({},"".concat(r,"__product-sku"),r))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,n)):null}))},561:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(9)),s=r.n(i),u=r(41),l=r(8),b=r(67);r(580);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-category-list",c()({},"".concat(r,"__product-category-list"),r))},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"category-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},562:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(9)),s=r.n(i),u=r(41),l=r(8),b=r(67);r(581);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-tag-list",c()({},"".concat(r,"__product-tag-list"),r))},Object(a.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},563:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(9)),s=r.n(i),u=r(41),l=r(67),b=(r(582),function(e){return Object(a.sprintf)(Object(a.__)("%d left in stock","woo-gutenberg-products-block"),e)}),p=function(e,t){return t?Object(a.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(a.__)("In Stock","woo-gutenberg-products-block"):Object(a.__)("Out of Stock","woo-gutenberg-products-block")};t.default=Object(l.withProductDataContext)((function(e){var t,r=e.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;if(!a.id||!a.is_purchasable)return null;var i=!!a.is_in_stock,l=a.low_stock_remaining,d=a.is_on_backorder;return Object(o.createElement)("div",{className:s()(r,"wc-block-components-product-stock-indicator",(t={},c()(t,"".concat(n,"__stock-indicator"),n),c()(t,"wc-block-components-product-stock-indicator--in-stock",i),c()(t,"wc-block-components-product-stock-indicator--out-of-stock",!i),c()(t,"wc-block-components-product-stock-indicator--low-stock",!!l),c()(t,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),t))},l?b(l):p(i,d))}))},573:function(e,t){},574:function(e,t){},575:function(e,t){},576:function(e,t){},577:function(e,t){},578:function(e,t){},579:function(e,t){},580:function(e,t){},581:function(e,t){},582:function(e,t){},583:function(e,t){},584:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},59:function(e,t){!function(){e.exports=this.wp.hooks}()},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return c})),r.d(t,"I",(function(){return o})),r.d(t,"O",(function(){return a})),r.d(t,"y",(function(){return i})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"z",(function(){return l})),r.d(t,"C",(function(){return b})),r.d(t,"o",(function(){return p})),r.d(t,"B",(function(){return d})),r.d(t,"n",(function(){return f})),r.d(t,"E",(function(){return m})),r.d(t,"u",(function(){return O})),r.d(t,"w",(function(){return g})),r.d(t,"r",(function(){return j})),r.d(t,"s",(function(){return v})),r.d(t,"t",(function(){return h})),r.d(t,"k",(function(){return y})),r.d(t,"K",(function(){return w})),r.d(t,"P",(function(){return E})),r.d(t,"q",(function(){return k})),r.d(t,"p",(function(){return _})),r.d(t,"H",(function(){return P})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return C})),r.d(t,"S",(function(){return x})),r.d(t,"T",(function(){return D})),r.d(t,"J",(function(){return B})),r.d(t,"a",(function(){return z})),r.d(t,"M",(function(){return V})),r.d(t,"b",(function(){return R})),r.d(t,"L",(function(){return T})),r.d(t,"D",(function(){return A})),r.d(t,"i",(function(){return I})),r.d(t,"N",(function(){return M})),r.d(t,"h",(function(){return H})),r.d(t,"j",(function(){return q})),r.d(t,"G",(function(){return Q})),r.d(t,"F",(function(){return G})),r.d(t,"R",(function(){return W})),r.d(t,"Q",(function(){return U})),r.d(t,"d",(function(){return Y})),r.d(t,"e",(function(){return K})),r.d(t,"f",(function(){return J})),r.d(t,"g",(function(){return $})),r.d(t,"x",(function(){return X})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));var n=r(3),c=Object(n.getSetting)("currentUserIsAdmin",!1),o=Object(n.getSetting)("reviewRatingsEnabled",!0),a=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),u=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),p=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),f=Object(n.getSetting)("default_height",500),m=Object(n.getSetting)("placeholderImgSrc",""),O=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),v=Object(n.getSetting)("hasTags",!0),h=Object(n.getSetting)("homeUrl",""),y=Object(n.getSetting)("couponsEnabled",!0),w=Object(n.getSetting)("shippingEnabled",!0),E=Object(n.getSetting)("taxesEnabled",!0),k=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),_=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),C=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),x=Object(n.getSetting)("wcBlocksAssetUrl",""),D=Object(n.getSetting)("wcBlocksBuildUrl",""),B=Object(n.getSetting)("shippingCountries",{}),z=Object(n.getSetting)("allowedCountries",{}),V=Object(n.getSetting)("shippingStates",{}),R=Object(n.getSetting)("allowedStates",{}),T=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("paymentGatewaySortOrder",[]),I=Object(n.getSetting)("checkoutShowLoginReminder",!0),L={id:0,title:"",permalink:""},F=Object(n.getSetting)("storePages",{shop:L,cart:L,checkout:L,privacy:L,terms:L}),M=F.shop.permalink,H=F.checkout.id,q=F.checkout.permalink,Q=F.privacy.permalink,G=F.privacy.title,W=F.terms.permalink,U=F.terms.title,Y=F.cart.id,K=F.cart.permalink,J=Object(n.getSetting)("checkoutAllowsGuest",!1),$=Object(n.getSetting)("checkoutAllowsSignup",!1),X=Object(n.getSetting)("loginUrl","/wp-login.php"),Z=r(24),ee=function(e,t){if(N>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(N>1)return Object(Z.registerBlockType)(e,t)},re=function(){return N>2},ne=function(){return N>1}},67:function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},68:function(e,t){!function(){e.exports=this.wp.dom}()},7:function(e,t){!function(){e.exports=this.React}()},70:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),b=r(16),p=r.n(b),d=r(17),f=r.n(d),m=r(10),O=r.n(m),g=r(0),j=r(8),v=r(9),h=r.n(v),y=r(4),w=r(201);r(127);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}var k=function(e){p()(r,e);var t=E(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,o=r.checked,a=r.instanceId,i=r.className,s=r.help,u=r.options,l=r.value,b="inspector-toggle-button-control-".concat(a);return s&&(e=Object(j.isFunction)(s)?s(o):s),Object(g.createElement)(y.BaseControl,{id:b,help:e,className:h()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((function(e,r){var o={};return l===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(g.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},o),e.label)}))))}}]),r}(g.Component);t.a=Object(w.a)(k)},72:function(e,t){!function(){e.exports=this.wp.deprecated}()},73:function(e,t){!function(){e.exports=this.wp.a11y}()},75:function(e,t){!function(){e.exports=this.ReactDOM}()},77:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(8),a=(r(2),r(4)),i=r(6);t.a=function(e){var t=e.columns,r=e.rows,s=e.setAttributes,u=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(o.clamp)(e,i.A,i.y);s({columns:Number.isNaN(t)?"":t})},min:i.A,max:i.y}),Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(e){var t=Object(o.clamp)(e,i.C,i.z);s({rows:Number.isNaN(t)?"":t})},min:i.C,max:i.z}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:u?Object(c.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return s({alignButtons:!u})}}))}},78:function(e,t){!function(){e.exports=this.wp.viewport}()},79:function(e,t){!function(){e.exports=this.wp.date}()},8:function(e,t){!function(){e.exports=this.lodash}()},841:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=o},848:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(n.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(n.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=o},856:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=o},857:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(6),o=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(n.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>7.99</span>',images:[{id:1,src:c.S+"img/pennant.jpg",thumbnail:c.S+"img/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(n.__)("Add to cart","woo-gutenberg-products-block"),description:Object(n.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},862:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));t.a=o},869:function(e,t,r){e.exports=r(922)},870:function(e,t){},871:function(e,t){},872:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(18),c=r.n(n),o=r(0),a=r(21),i=r(38),s=r(29),u=r(144),l=r(172),b=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},p=function(e){var t=Object(a.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(l.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(u.a)(),f=d.addErrorNotice,m=d.removeNotice,O=Object(o.useState)(!1),g=c()(O,2),j=g[0],v=g[1],h=Object(o.useRef)(b(n,e));return Object(o.useEffect)((function(){var t=b(n,e);t!==h.current&&(h.current=t)}),[n,e]),{cartQuantity:Number.isFinite(h.current)?h.current:0,addingToCart:j,cartIsLoading:p,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){f(Object(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},874:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},875:function(e,t){},876:function(e,t){},877:function(e,t){},878:function(e,t){},922:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(1),u=r(23),l=r(24),b=r(55),p=r(32),d=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"})),f=r(6),m=r(9),O=r.n(m),g=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:O()("is-loading",t.className)})},j={category:"woocommerce-product-elements",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:Object(f.U)()?null:["@woocommerce/all-products","@woocommerce/single-product"],save:g,deprecated:[{save:function(){}}]},v=r(412),h=r(4),y=r(962),w=r(158),E=r(419),k=r(18),_=r.n(k),P=r(147),S=r(25),C=r.n(S);r(871);var N=function(e){var t=e.className,r=void 0===t?"":t,n=C()(e,["className"]),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(h.Button,a()({className:c},n))},x=r(41),D=(r(870),function(e){return function(t){return function(r){var n=Object(x.useProductDataContext)(),c=r.attributes,o=r.setAttributes,a=c.productId,l=Object(i.useState)(!a),b=_()(l,2),p=b[0],d=b[1];return n.hasContext?Object(i.createElement)(t,r):Object(i.createElement)(i.Fragment,null,p?Object(i.createElement)(h.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(i.createElement)("div",null,e.description),Object(i.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(i.createElement)(P.a,{selected:a||0,showVariations:!0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o({productId:e[0]?e[0].id:0})}}),Object(i.createElement)(h.Button,{isSecondary:!0,disabled:!a,onClick:function(){d(!1)}},Object(s.__)("Done","woo-gutenberg-products-block")))):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,null,Object(i.createElement)(N,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),B=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"})),z=Object(s.__)("Product Title","woo-gutenberg-products-block"),V=Object(i.createElement)(b.a,{srcElement:B}),R=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),T=function(e){var t=e.color,r=e.fontSize,n=e.setFontSize,c=e.setColor,o=e.attributes,a=e.setAttributes,l=o.headingLevel,b=o.productLink,p=o.align;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(w.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:l,onChange:function(e){return a({headingLevel:e})}}),Object(f.V)()&&Object(i.createElement)(u.AlignmentToolbar,{value:p,onChange:function(e){a({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:b,onChange:function(){return a({productLink:!b})}})),Object(f.V)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Text settings","woo-gutenberg-products-block")},Object(i.createElement)(u.FontSizePicker,{value:r.size,onChange:n})),Object(i.createElement)(u.PanelColorSettings,{title:Object(s.__)("Color settings","woo-gutenberg-products-block"),colorSettings:[{value:t.color,onChange:c,label:Object(s.__)("Text color","woo-gutenberg-products-block")}]}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(E.a,o)))},A=Object(f.V)()?Object(y.a)([Object(u.withFontSizes)("fontSize"),Object(u.withColors)("color",{textColor:"color"}),D({icon:V,label:z,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(T):T;function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F={title:z,description:R,icon:{src:V,foreground:"#874FB9"},attributes:v.a,edit:A};Object(l.registerBlockType)("woocommerce/product-title",L(L({},j),F));var M=r(555),H=r(379),q=Object(s.__)("Product Price","woo-gutenberg-products-block"),Q=Object(i.createElement)(b.a,{srcElement:H.a}),G=Object(s.__)("Display the price of a product.","woo-gutenberg-products-block"),W=function(e){var t=e.fontSize,r=e.setFontSize,n=e.color,c=e.setColor,o=e.colorLabel;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.FontSizePicker,{value:t.size,onChange:r}),Object(i.createElement)(h.BaseControl,{label:o},Object(i.createElement)(u.ColorPalette,{value:n.color,onChange:c,label:Object(s.__)("Color")})))},U=function(e){var t=e.fontSize,r=e.saleFontSize,n=e.setFontSize,c=e.setSaleFontSize,o=e.color,a=e.saleColor,l=e.setColor,b=e.setSaleColor,p=e.attributes,d=e.setAttributes,m=p.align;return Object(i.createElement)(i.Fragment,null,Object(f.V)()&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(u.AlignmentToolbar,{value:m,onChange:function(e){d({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(f.V)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Price","woo-gutenberg-products-block")},Object(i.createElement)(W,{color:o,setColor:l,fontSize:t,setFontSize:n,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Sale price","woo-gutenberg-products-block")},Object(i.createElement)(W,{color:a,setColor:b,fontSize:r,setFontSize:c,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})))),Object(i.createElement)(M.default,p))},Y=Object(f.V)()?Object(y.a)([Object(u.withFontSizes)("fontSize"),Object(u.withFontSizes)("saleFontSize"),Object(u.withFontSizes)("originalFontSize"),Object(u.withColors)("color",{textColor:"color"}),Object(u.withColors)("saleColor",{textColor:"saleColor"}),Object(u.withColors)("originalColor",{textColor:"originalColor"}),D({icon:Q,label:q,description:Object(s.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(U):U;function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $={productId:{type:"number",default:0}};function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(f.V)()&&($=J(J({},$),{},{align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}}));var ee={title:q,description:G,icon:{src:Q,foreground:"#874FB9"},attributes:$,edit:Y};Object(l.registerBlockType)("woocommerce/product-price",Z(Z({},j),ee));var te=r(413),re=r(200),ne=r(70),ce=r(3),oe=r(414),ae=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"})),ie=Object(s.__)("Product Image","woo-gutenberg-products-block"),se=Object(i.createElement)(b.a,{srcElement:ae}),ue=Object(s.__)("Display the main product image","woo-gutenberg-products-block"),le=D({icon:se,label:ie,description:Object(s.__)("Choose a product to display its image.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=t.productLink,c=t.imageSizing,o=t.showSaleBadge,a=t.saleBadgeAlign;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(s.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showSaleBadge:!o})}}),o&&Object(i.createElement)(ne.a,{label:Object(s.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(s.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(s.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(s.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(ne.a,{label:Object(s.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(re.a)(Object(s.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(ce.getAdminLink)("customize.php"),"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images"),target:"_blank",rel:"noopener noreferrer"})}),value:c,options:[{label:Object(s.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(s.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:function(e){return r({imageSizing:e})}}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(oe.a,t)))}));function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var de={title:ie,description:ue,icon:{src:se,foreground:"#874FB9"},attributes:te.a,edit:le};Object(l.registerBlockType)("woocommerce/product-image",pe(pe({},j),de));var fe={productId:{type:"number",default:0}},me=r(556),Oe=r(856),ge=Object(s.__)("Product Rating","woo-gutenberg-products-block"),je=Object(i.createElement)(b.a,{srcElement:Oe.a});function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye={title:ge,description:Object(s.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:je,foreground:"#874FB9"},attributes:fe,edit:D({icon:je,label:ge,description:Object(s.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(me.default,t)}))};Object(l.registerBlockType)("woocommerce/product-rating",he(he({},j),ye));var we={productId:{type:"number",default:0}},Ee=r(557),ke=r(874),_e=Object(s.__)("Add to Cart Button","woo-gutenberg-products-block"),Pe=Object(i.createElement)(b.a,{srcElement:ke.a});function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={title:_e,description:Object(s.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:Pe,foreground:"#874FB9"},attributes:we,edit:D({icon:Pe,label:_e,description:Object(s.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Ee.default,t))}))};Object(l.registerBlockType)("woocommerce/product-button",Ce(Ce({},j),Ne));var xe={productId:{type:"number",default:0}},De=r(559),Be=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),ze=Object(s.__)("Product Summary","woo-gutenberg-products-block"),Ve=Object(i.createElement)(b.a,{srcElement:Be});function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae={title:ze,description:Object(s.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Ve,foreground:"#874FB9"},attributes:xe,edit:D({icon:Ve,label:ze,description:Object(s.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(De.default,t)}))};Object(l.registerBlockType)("woocommerce/product-summary",Te(Te({},j),Ae));var Ie={productId:{type:"number",default:0}},Le=r(310),Fe=r(848),Me=Object(s.__)("On-Sale Badge","woo-gutenberg-products-block"),He=Object(i.createElement)(b.a,{srcElement:Fe.a});function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ge={title:Me,description:Object(s.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:He,foreground:"#874FB9"},supports:{html:!1},attributes:Ie,edit:D({icon:He,label:Me,description:Object(s.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(Le.default,t)}))};Object(l.registerBlockType)("woocommerce/product-sale-badge",Qe(Qe({},j),Ge));var We={productId:{type:"number",default:0}},Ue=r(137),Ye=r(560),Ke=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"})),Je=Object(s.__)("Product SKU","woo-gutenberg-products-block"),$e=Object(i.createElement)(b.a,{srcElement:Ke});function Xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var et={title:Je,description:Object(s.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:$e,foreground:"#874FB9"},attributes:We,edit:D({icon:$e,label:Je,description:Object(s.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(Ye.default,t))}))};Object(f.W)("woocommerce/product-sku",Ze(Ze({},j),et));var tt={productId:{type:"number",default:0}},rt=r(561),nt=r(841),ct=Object(s.__)("Product Category List","woo-gutenberg-products-block"),ot=Object(i.createElement)(b.a,{srcElement:nt.a});function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st={title:ct,description:Object(s.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:ot,foreground:"#874FB9"},attributes:tt,edit:D({icon:ot,label:ct,description:Object(s.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(rt.default,t)))}))};Object(f.W)("woocommerce/product-category-list",it(it({},j),st));var ut={productId:{type:"number",default:0}},lt=r(562),bt=Object(s.__)("Product Tag List","woo-gutenberg-products-block"),pt=Object(i.createElement)(b.a,{srcElement:Fe.a});function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt={title:bt,description:Object(s.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:pt,foreground:"#874FB9"},attributes:ut,edit:D({icon:pt,label:bt,description:Object(s.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(lt.default,t)))}))};Object(f.W)("woocommerce/product-tag-list",ft(ft({},j),mt));var Ot={productId:{type:"number",default:0}},gt=r(563),jt=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("g",{fillRule:"evenodd"},Object(i.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.createElement)("path",{fillRule:"nonzero",d:"M20.5 5.2l-1.4-1.7C19 3.3 18.5 3 18 3H6c-.5 0-.9.2-1.2.5L3.5 5.3A2 2 0 003 6.5V19c0 1.1.9 2 2 2h14a2 2 0 002-2V6.5c0-.5-.2-1-.5-1.3zM6.2 5h11.6l.8 1H5.4l.8-1zM5 19V8h14v11H5z"}))),vt=Object(s.__)("Product Stock Indicator","woo-gutenberg-products-block"),ht=Object(i.createElement)(b.a,{srcElement:jt});function yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Et={title:vt,description:Object(s.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:ht,foreground:"#874FB9"},attributes:Ot,edit:D({icon:ht,label:vt,description:Object(s.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(gt.default,t))}))};Object(f.W)("woocommerce/product-stock-indicator",wt(wt({},j),Et));var kt=r(952),_t=(r(410),r(418)),Pt=Object(s.__)("Add to Cart","woo-gutenberg-products-block"),St=Object(i.createElement)(b.a,{srcElement:ke.a});function Ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xt={title:Pt,description:Object(s.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:St,foreground:"#874FB9"},edit:D({icon:St,label:Pt,description:Object(s.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=Object(x.useProductDataContext)().product,c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:O()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(Ue.a,{productId:n.id}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block")},Object(kt.b)(n)?Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Display form elements","woo-gutenberg-products-block"),help:Object(s.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showFormElements:!o})}}):Object(i.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(s.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(_t.a,t)))})),attributes:r(417).a};Object(f.W)("woocommerce/product-add-to-cart",Nt(Nt({},j),xt));var Dt=r(14),Bt=r.n(Dt),zt=r(12),Vt=r.n(zt),Rt=r(16),Tt=r.n(Rt),At=r(17),It=r.n(At),Lt=r(10),Ft=r.n(Lt),Mt=r(21),Ht=(r(2),r(77)),qt=r(948),Qt=r(857),Gt=r(174),Wt=function(e,t){var r=t.className,n=t.contentVisibility;return O()(e,r,{"has-image":n&&n.image,"has-title":n&&n.title,"has-rating":n&&n.rating,"has-price":n&&n.price,"has-button":n&&n.button})},Ut=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(s.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-products__add-product-button",isSecondary:!0,href:ce.ADMIN_URL+"post-new.php?post_type=product"},Object(s.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:Gt.a})),Object(i.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(s.__)("Learn more","woo-gutenberg-products-block")))},Yt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(s.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $t=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],Xt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,Jt(Jt({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tr=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:er(er({},r),{},{orderBy:!r.orderBy})})}})},rr=function(e,t){return Object(i.createElement)(h.SelectControl,{label:Object(s.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(s.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(s.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(s.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(s.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(s.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(s.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},nr=r(15),cr=r.n(nr),or=r(7),ar=r(8),ir=r(44),sr=(r(878),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,u=function(e,t,r){if(r<=2)return{minIndex:null,maxIndex:null};var n=e-1,c=Math.max(Math.floor(t-n/2),2),o=Math.min(Math.ceil(t+(n-(t-c))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(o-t))),2),maxIndex:o}}(c,t,a),l=u.minIndex,b=u.maxIndex,p=r&&Boolean(1!==l),d=r&&Boolean(b!==a),f=r&&Boolean(l>3),m=r&&Boolean(b<a-2);p&&3===l&&(l-=1),d&&b===a-2&&(b+=1);var g=[];if(l&&b)for(var j=l;j<=b;j++)g.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(ir.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t-1)},title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(ir.a,{label:"<",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return o(1)},disabled:1===t},Object(i.createElement)(ir.a,{label:1,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),g.map((function(e){return Object(i.createElement)("button",{key:e,className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return o(e)},disabled:t===e},Object(i.createElement)(ir.a,{label:e,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),e)}))})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===a,"wc-block-components-pagination__page--active":t===a}),onClick:function(){return o(a)},disabled:t===a},Object(i.createElement)(ir.a,{label:a,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),a)})),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t+1)},title:Object(s.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(ir.a,{label:">",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))});sr.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var ur=sr,lr=r(154),br=(r(877),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(lr.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:r,options:[{key:"menu_order",label:Object(s.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(s.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(s.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(s.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(s.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(s.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:c})}),pr=r(244),dr=Object(pr.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(x.useInnerBlockLayoutContext)(),s=o.parentClassName,u=o.parentName,l=0===Object.keys(t).length,b=O()("".concat(s,"__product"),"wc-block-layout",{"is-loading":l});return Object(i.createElement)("li",{className:b,"aria-hidden":l},function e(t,r,n,c){if(n){var o=Object(qt.a)(t);return n.map((function(n,s){var u=_()(n,2),l=u[0],b=u[1],p=void 0===b?{}:b,d=[];p.children&&p.children.length>0&&(d=e(t,r,p.children,c));var f=o[l];if(!f)return null;var m=r.id||0,O=["layout",l,s,c,m];return Object(i.createElement)(i.Suspense,{key:O.join("_"),fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},Object(i.createElement)(f,a()({},p,{children:d,product:r})))}))}}(u,t,c,n))})),fr=r(160),mr=r(173),Or=r(38),gr=r(54);function jr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hr=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(mr.a)(vr(vr({},t),{},{query:e})),n=r.results,c=r.isLoading,o=function(e,t){var r=t.namespace,n=t.resourceName,c=t.resourceValues,o=void 0===c?[]:c,a=t.query,i=void 0===a?{}:a;if(!r||!n)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var s=Object(gr.a)(i),u=Object(gr.a)(o),l=Object(Mt.useSelect)((function(t){var c=t(Or.COLLECTIONS_STORE_KEY),o=[e,r,n,s,u];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,u,s]),b=l.value,p=l.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",vr(vr({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},yr=r(103),wr=r(194),Er=r(73),kr=(r(876),r(149)),_r=function(){var e=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(e,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:kr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(e,"__no-products-title")},Object(s.__)("No products","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(e,"__no-products-description")},Object(s.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Pr=r(862),Sr=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(n,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(n,"__no-products-image"),alt:"",srcElement:Pr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(n,"__no-products-title")},Object(s.__)("No products found","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(n,"__no-products-description")},Object(s.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(i.createElement)("button",{onClick:r},Object(s.__)("Reset Search","woo-gutenberg-products-block")))};function Cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xr=function(e){var t=e.totalQuery,r=e.totalProducts,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n.totalQuery;return!Object(ar.isEqual)(t,c)&&Number.isFinite(r)},Dr=Object(wr.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,u=Object(fr.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return Nr(Nr({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:c*o,page:r})}({attributes:t,sortValue:o,currentPage:r})),l=_()(u,1)[0],b=hr(l),p=b.products,d=b.totalProducts,f=b.productsLoading,m=Object(x.useInnerBlockLayoutContext)().parentClassName,g=function(e){e.order,e.orderby,e.page,e.per_page;return C()(e,["order","orderby","page","per_page"])||{}}(l),j=Object(fr.b)("attributes",[]),v=_()(j,2),h=v[0],y=v[1],w=Object(fr.b)("min_price"),E=_()(w,2),k=E[0],P=E[1],S=Object(fr.b)("max_price"),N=_()(S,2),D=N[0],B=N[1],z=Object(yr.a)({totalQuery:g,totalProducts:d},xr);Object(i.useEffect)((function(){Object(ar.isEqual)(g,null==z?void 0:z.totalQuery)||(n(1),null!=z&&z.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(Er.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(Er.speak)(Object(s.sprintf)(Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[null==z?void 0:z.totalQuery,d,n,g]);var V,R,T,A,I,L=t.contentVisibility,F=t.columns*t.rows,M=!Number.isFinite(d)&&Number.isFinite(null==z?void 0:z.totalProducts)&&Object(ar.isEqual)(g,null==z?void 0:z.totalQuery)?Math.ceil(z.totalProducts/F):Math.ceil(d/F),H=p.length?p:Array.from({length:F}),q=0!==p.length||f,Q=h.length>0||Number.isFinite(k)||Number.isFinite(D);return Object(i.createElement)("div",{className:(V=t.columns,R=t.rows,T=t.alignButtons,A=t.align,I=void 0!==A?"align"+A:"",O()(m,I,"has-"+V+"-columns",{"has-multiple-rows":R>1,"has-aligned-buttons":T}))},L.orderBy&&q&&Object(i.createElement)(br,{onChange:c,value:o}),!q&&Q&&Object(i.createElement)(Sr,{resetCallback:function(){y([]),P(null),B(null)}}),!q&&!Q&&Object(i.createElement)(_r,null),q&&Object(i.createElement)("ul",{className:"".concat(m,"__products")},H.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return Object(i.createElement)(dr,{key:e.id||r,attributes:t,product:e})}))),M>1&&Object(i.createElement)(ur,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:M}))})),Br=function(e){var t=e.attributes,r=Object(i.useState)(1),n=_()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=_()(a,2),u=s[0],l=s[1];Object(i.useEffect)((function(){l(t.orderby)}),[t.orderby]);return Object(i.createElement)(Dr,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;l(t),o(1)},sortValue:u})},zr=r(183);function Vr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return It()(this,r)}}var Rr=function(e){Tt()(r,e);var t=Vr(r);function r(){return Bt()(this,r),t.apply(this,arguments)}return cr()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?zr.a:Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(Br,{attributes:t,urlParameterSuffix:r}))}}]),r}(or.Component);r(875);function Tr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return It()(this,r)}}var Ar=function(e){Tt()(r,e);var t=Tr(r);function r(){var e;Bt()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),c()(Vt()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(Vt()(e),"blockMap",Object(qt.a)("woocommerce/all-products")),c()(Vt()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(Vt()(e),"getTitle",(function(){return Object(s.__)("All Products","woo-gutenberg-products-block")})),c()(Vt()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(Vt()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(s.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(Vt()(e),"getInspectorControls",(function(){var t=e.props,r=t.attributes,n=t.setAttributes,c=r.columns,o=r.rows,a=r.alignButtons;return Object(i.createElement)(u.InspectorControls,{key:"inspector"},Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ht.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content Settings","woo-gutenberg-products-block")},tr(r,n),rr(r,n)))})),c()(Vt()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,{controls:[{icon:"edit",title:Object(s.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(Vt()(e),"renderEditMode",(function(){var t={template:e.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(e.blockMap)};return 0!==e.props.attributes.layoutConfig.length&&(t.renderAppender=!1),Object(i.createElement)(h.Placeholder,{icon:e.getIcon(),label:e.getTitle()},Object(s.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(i.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(i.createElement)(h.Tip,null,Object(s.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(x.ProductDataContextProvider,{product:Qt.a[0]},Object(i.createElement)(u.InnerBlocks,t)))))),Object(i.createElement)("div",{className:"wc-block-all-products__actions"},Object(i.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:Xt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(s.__)("Done","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=e.state.innerBlocks;n(r.clientId,c,!1),e.togglePreview()}},Object(s.__)("Cancel","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__reset-button",icon:Object(i.createElement)(b.a,{srcElement:d}),label:Object(s.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];$t.map((function(e){var t=_()(e,2),r=t[0],n=t[1];return c.push(Object(l.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(s.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(Vt()(e),"renderViewMode",(function(){var t=e.props.attributes,r=t.layoutConfig,n=r&&0!==r.length,c=e.getTitle(),o=e.getIcon();return n?Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Rr,{attributes:t})):Yt(c,o)})),c()(Vt()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return f.r?Object(i.createElement)("div",{className:Wt("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):Ut(n,c)})),e}return r}(i.Component),Ir=Object(y.a)(h.withSpokenMessages,Object(Mt.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Mt.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Ar),Lr={columns:f.m,rows:f.o,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:$t,isPreview:!1};function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hr={title:Object(s.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Lr,edit:function(e){return Object(i.createElement)(Ir,e)},save:function(e){var t=e.attributes,r={};Object.keys(t).sort().forEach((function(e){r[e]=t[e]}));var n={"data-attributes":JSON.stringify(r)};return Object(i.createElement)("div",a()({className:Wt("wc-block-all-products",t)},n),Object(i.createElement)(u.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",Mr(Mr({},Hr),{},{deprecated:[{attributes:Object.assign({},Hr.attributes,{rows:{type:"number",default:1}}),save:function(e){var t=e.attributes,r={"data-attributes":JSON.stringify(t)};return Object(i.createElement)("div",a()({className:Wt("wc-block-all-products",t)},r),Object(i.createElement)(u.InnerBlocks.Content,null))}}]}))},93:function(e,t,r){"use strict";r.d(t,"b",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(48),c=r.n(n),o=r(5),a=r.n(o),i=r(25),s=r.n(i),u=r(18),l=r.n(u),b=r(0),p=r(8),d=r(34),f=r.n(d);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var j=Object(b.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),v=function(){return Object(b.useContext)(j)},h=function(e){var t=e.children,r=Object(b.useState)({}),n=l()(r,2),c=n[0],o=n[1],i=Object(b.useCallback)((function(e){return c[e]}),[c]),u=Object(b.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),d=Object(b.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return s()(t,[e].map(g))}))}),[]),m=Object(b.useCallback)((function(){o({})}),[]),v=Object(b.useCallback)((function(e){e&&o((function(t){return e=Object(p.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!f()(t[r],e))})),0===Object.values(e).length?t:O(O({},t),e)}))}),[]),h=Object(b.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=O(O({},r[e]),t);return f()(r[e],n)?r:O(O({},r),{},a()({},e,n))}))}),[]),y={getValidationError:i,setValidationErrors:v,clearValidationError:d,clearAllValidationErrors:m,hideValidationError:Object(b.useCallback)((function(e){h(e,{hidden:!0})}),[h]),showValidationError:Object(b.useCallback)((function(e){h(e,{hidden:!1})}),[h]),showAllValidationErrors:Object(b.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=O(O({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:O(O({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:y},t)}},94:function(e,t){!function(){e.exports=this.wp.autop}()},948:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(52),c=r(0),o=r(6);r.p=o.T,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(11)]).then(r.bind(null,555))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(3),r.e(10)]).then(r.bind(null,974))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(17)]).then(r.bind(null,975))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)((function(){return r.e(12).then(r.bind(null,556))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(2),r.e(8)]).then(r.bind(null,557))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)((function(){return r.e(15).then(r.bind(null,559))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)((function(){return r.e(3).then(r.bind(null,310))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)((function(){return r.e(13).then(r.bind(null,560))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)((function(){return r.e(9).then(r.bind(null,561))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)((function(){return r.e(16).then(r.bind(null,562))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)((function(){return r.e(14).then(r.bind(null,563))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(7)]).then(r.bind(null,976))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},952:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-products"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],b=0,p=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==c[s]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5:0,2:0,3:0,8:0,9:0,11:0,12:0,13:0,14:0,15:0,16:0},o=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({1:"atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title",2:"atomic-block-components/add-to-cart--atomic-block-components/button",3:"atomic-block-components/sale-badge",7:"atomic-block-components/add-to-cart",8:"atomic-block-components/button",9:"atomic-block-components/category-list",10:"atomic-block-components/image",11:"atomic-block-components/price",12:"atomic-block-components/rating",13:"atomic-block-components/sku",14:"atomic-block-components/stock-indicator",15:"atomic-block-components/summary",16:"atomic-block-components/tag-list",17:"atomic-block-components/title"}[e]||e)+".js"}(e);var s=new Error;o=function(t){i.onerror=i.onload=null,clearTimeout(u);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,r[1](s)}c[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:i})}),12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=s;return o.push([834,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=Object(n.createContext)("page"),o=function(){return Object(n.useContext)(c)};c.Provider},106:function(e,t){},107:function(e,t){},108:function(e,t){},109:function(e,t){},110:function(e,t){},111:function(e,t){},112:function(e,t){},113:function(e,t){},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},121:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(0),c=r(21),o=Object(n.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),a=function(){return Object(n.useContext)(o)},i=function(e){var t=e.children,r=e.currentPostId,a=void 0===r?0:r,i=e.previewData,s=void 0===i?{}:i,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:s};return Object(n.createElement)(o.Provider,{value:u},t)}},127:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(54),a=r(157),i=r(3),s=r(22),u=r(39);t.a=function(e){var t=(Object(u.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(n.createElement)("a",{href:"".concat(i.ADMIN_URL,"post.php?post=").concat(t,"&action=edit"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Edit this product's details","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:a.a,size:16}))),Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(c.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(5),c=r.n(n),o=r(175),a=r(0);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),b=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return s(s(s({notices:t},l),b),{},{setIsSuppressed:i})}},135:function(e,t){!function(){e.exports=this.wp.wordcount}()},136:function(e,t,r){"use strict";var n=r(30),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(1),u=r(7),l=(r(2),r(44)),b=r(4),p=r(8),d=r.n(p),f=r(14),m=r.n(f),O=r(15),g=r.n(O),j=r(16),v=r.n(j),h=r(17),y=r.n(h),w=r(10),E=r.n(w),k=r(139);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var P=Object(k.a)((function(e){var t=function(t){v()(n,t);var r=_(n);function n(){return m()(this,n),r.apply(this,arguments)}return g()(n,[{key:"render",value:function(){var t=this.props.selected,r=null==t;return Object(i.createElement)(e,a()({},this.props,{selected:r?[]:[t]}))}}]),n}(i.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),S=r(277),C=r(13),N=r.n(C),x=r(27),D=r.n(x),B=r(12),z=r.n(B),V=r(5),R=r.n(V),T=r(33),A=r.n(T),I=r(36),L=r(38);function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){R()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var q=Object(k.a)((function(e){var t=function(t){v()(n,t);var r=H(n);function n(){var e;m()(this,n);for(var t=arguments.length,c=new Array(t),o=0;o<t;o++)c[o]=arguments[o];return e=r.call.apply(r,[this].concat(c)),R()(z()(e),"state",{error:null,loading:!1,variations:{}}),R()(z()(e),"loadVariations",(function(){var t=e.props.products,r=e.state,n=r.loading,c=r.variations;if(!n){var o=e.getExpandedProduct();if(o&&!c[o]){var a=t.find((function(e){return e.id===o}));a.variations&&0!==a.variations.length?(e.setState({loading:!0}),Object(I.g)(o).then((function(t){var r=t.map((function(e){return M(M({},e),{},{parent:o})}));e.setState({variations:M(M({},e.state.variations),{},R()({},o,r)),loading:!1,error:null})})).catch(function(){var t=D()(N.a.mark((function t(r){var n;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(L.a)(r);case 2:n=t.sent,e.setState({variations:M(M({},e.state.variations),{},R()({},o,null)),loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({variations:M(M({},e.state.variations),{},R()({},o,null)),loading:!1,error:null})}}})),e}return g()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.selected,r=e.showVariations;t&&r&&this.loadVariations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isLoading,n=t.selected;t.showVariations&&(!A()(e.selected,n)||e.isLoading&&!r)&&this.loadVariations()}},{key:"isProductId",value:function(e){return this.props.products.some((function(t){return t.id===e}))}},{key:"findParentProduct",value:function(e){return this.props.products.filter((function(t){return t.variations&&t.variations.find((function(t){return t.id===e}))}))[0].id}},{key:"getExpandedProduct",value:function(){var e=this.props,t=e.isLoading,r=e.selected;if(!e.showVariations)return null;var n=r&&r.length?r[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(t||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!t&&n?this.isProductId(n)?n:this.findParentProduct(n):null}},{key:"render",value:function(){var t=this.props,r=t.error,n=t.isLoading,c=this.state,o=c.error,s=c.loading,u=c.variations;return Object(i.createElement)(e,a()({},this.props,{error:o||r,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:u,variationsLoading:s}))}}]),n}(i.Component);return R()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),Q=r(54),G=r(31),W=Object(i.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),U=Object(i.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#757575",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),Y=r(41);r(185);function K(e,t){if(!t)return e;var r=new RegExp(Object(u.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var J=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(i.createElement)(Q.a,{srcElement:W}):Object(i.createElement)(Q.a,{srcElement:U})},$={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},X=function(e){var t=e.expandedProduct,r=e.error,n=e.isLoading,o=e.onChange,p=e.onSearch,f=e.products,m=e.renderItem,O=e.selected,g=e.showVariations,j=e.variations,v=e.variationsLoading,h=function(e){var r=e.item,n=e.search,c=e.depth,o=void 0===c?0:c,p=e.isSelected,f=e.onSelect,m=r.variations&&Array.isArray(r.variations)?r.variations.length:0,O=d()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":n.length>0,"is-skip-level":0===o&&0!==r.parent,"is-variable":m>0}),g=Object.assign({},e);delete g.isSingle;var j={role:"menuitemradio"};return r.breadcrumbs.length&&(j["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),m&&(j["aria-expanded"]=r.id===t),r.breadcrumbs.length?(Object(u.isEmpty)(r.variation)||(r.name=r.variation),Object(i.createElement)(l.b,a()({className:O},e,j))):[Object(i.createElement)(b.MenuItem,a()({key:"product-".concat(r.id),isSelected:p},g,j,{className:O,onClick:function(){f(r)()}}),Object(i.createElement)("span",{className:"woocommerce-search-list__item-state"},J(p)),Object(i.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(i.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:K(r.name,n)}})),m?Object(i.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(s.sprintf)(Object(s._n)("%d variation","%d variations",m,"woo-gutenberg-products-block"),m)):null),t===r.id&&m>0&&v&&Object(i.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(i.createElement)(b.Spinner,null))]};if(r)return Object(i.createElement)(Y.a,{error:r});var y=j&&j[t]?j[t]:[],w=[].concat(c()(f),c()(y));return Object(i.createElement)(l.a,{className:"woocommerce-products",list:w,isLoading:n,isSingle:!0,selected:w.filter((function(e){var t=e.id;return O.includes(t)})),onChange:o,renderItem:m||(g?h:null),onSearch:p,messages:$,isHierarchical:!0})};X.defaultProps={expandedProduct:null,selected:[],showVariations:!1};t.a=P(Object(S.a)(q(X)))},138:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=o},141:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(42),i=r(213);r(187);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,s=e.onChange,u=e.options,l=e.screenReaderLabel,b=e.readOnly,p=e.value,d="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.a,{label:i,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:c,onChange:s,readOnly:b,value:p},u.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},142:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(55),s=r(8),u=r.n(s),l=(r(2),r(215),function(e){var t=e.className,r=e.currency,n=e.maxPrice,c=e.minPrice,a=e.priceClassName,s=e.priceStyle;return Object(o.createElement)("span",{className:t},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:c,style:s})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:n,style:s}))}),b=function(e){var t=e.className,r=e.currency,n=e.regularPriceClassName,c=e.regularPriceStyle,s=e.regularPrice,l=e.priceClassName,b=e.priceStyle,p=e.price;return Object(o.createElement)("span",{className:t},Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",n),style:c},e)},value:s}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",l),style:b},e)},value:p}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.maxPrice,s=void 0===a?null:a,p=e.minPrice,d=void 0===p?null:p,f=e.price,m=void 0===f?null:f,O=e.priceClassName,g=e.priceStyle,j=e.regularPrice,v=e.regularPriceClassName,h=e.regularPriceStyle,y=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return j&&m!==j?Object(o.createElement)(b,{className:y,currency:n,price:m,priceClassName:O,priceStyle:g,regularPrice:j,regularPriceClassName:v,regularPriceStyle:h}):null!==d&&null!==s?Object(o.createElement)(l,{className:y,currency:n,maxPrice:s,minPrice:d,priceClassName:O,priceStyle:g}):null!==m?Object(o.createElement)("span",{className:y},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",O),currency:n,value:m,style:g})):Object(o.createElement)("span",{className:y},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",O)}))}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(5),c=r.n(n),o=r(7);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:s,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case s:return b.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,b));case u:return b.delete(o),i(i({},e),{},c()({},n,b))}return e}},144:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(15),a=r.n(o),i=r(16),s=r.n(i),u=r(17),l=r.n(u),b=r(10),p=r.n(b),d=r(0),f=r(7),m=r(1),O=r(4);function g(e){var t=e.level,r={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return r.hasOwnProperty(t)?Object(d.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(O.Path,{d:r[t]})):null}function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p()(e);if(t){var c=p()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return l()(this,r)}}var v=function(e){s()(r,e);var t=j(r);function r(){return c()(this,r),t.apply(this,arguments)}return a()(r,[{key:"createLevelControl",value:function(e,t,r){var n=e===t;return{icon:Object(d.createElement)(g,{level:e}),title:Object(m.sprintf)(Object(m.__)("Heading %d"),e),isActive:n,onClick:function(){return r(e)}}}},{key:"render",value:function(){var e=this,t=this.props,r=t.isCollapsed,n=void 0===r||r,c=t.minLevel,o=t.maxLevel,a=t.selectedLevel,i=t.onChange;return Object(d.createElement)(O.ToolbarGroup,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},146:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(18),c=r.n(n),o=r(37),a=r(21),i=r(0),s=r(100),u=r(33),l=r.n(u),b=r(53),p=r(96),d=function(e){var t=Object(s.a)();e=e||t;var r=Object(a.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(i.useCallback)((function(t){n(e,t)}),[e,n])]},f=function(e,t,r){var n=Object(s.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){u(r,e,t)}),[r,e,u])]},m=function(e,t){var r=Object(s.a)(),n=d(t=t||r),o=c()(n,2),a=o[0],u=o[1],f=Object(b.a)(a),m=Object(b.a)(e),O=Object(p.a)(m),g=Object(i.useRef)(!1);return Object(i.useEffect)((function(){l()(O,m)||(u(Object.assign({},f,m)),g.current=!0)}),[f,m,O,u]),g.current?[a,u]:[e,u]}},155:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(5),c=r.n(n),o=r(37),a=r(21),i=r(121),s=r(28),u=r(7);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},d=b(b({},p),{},{email:"",phone:""}),f=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:d,shippingAddress:p,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(i.b)(),r=t.isEditor,n=t.previewData,c=(null==n?void 0:n.previewCart)||{},s=e.shouldSelect,u=Object(a.useSelect)((function(e,t){var n=t.dispatch;if(!s)return m;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:d,shippingAddress:p,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(o.CART_STORE_KEY),i=a.getCartData(),u=a.getCartErrors(),l=a.getCartTotals(),b=!a.hasFinishedResolution("getCartData"),O=a.isCustomerDataUpdating(),g=n(o.CART_STORE_KEY).receiveCart,j=f(i.billingAddress),v=i.needsShipping?f(i.shippingAddress):j;return{cartCoupons:i.coupons,cartItems:i.items||[],cartFees:i.fees||[],cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors||[],cartTotals:l,cartIsLoading:b,cartErrors:u,billingAddress:j,shippingAddress:v,extensions:i.extensions||{},shippingRates:i.shippingRates||[],shippingRatesLoading:O,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements||[],receiveCart:g}}),[s]);return u}},156:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(37),c=r(21),o=r(0),a=r(53),i=r(95),s=function(e){var t=e.namespace,r=e.resourceName,s=e.resourceValues,u=void 0===s?[]:s,l=e.query,b=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),m=Object(a.a)(b),O=Object(a.a)(u),g=Object(i.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,m,O],a=c.getCollectionError.apply(c,o);return a&&g(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,O,m,d]);return null!==j&&(f.current=j),f.current}},157:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},165:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(6),o=Object(n.createElement)("img",{src:c.S+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},166:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=(r(2),r(28)),u=r(8),l=r.n(u);r(214);t.a=function(e){var t=e.className,r=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,u=e.name,b=e.permalink,p=void 0===b?"":b,d=a()(e,["className","disabled","name","permalink"]),f=l()("wc-block-components-product-name",r);return o?Object(i.createElement)("span",c()({className:f},d),Object(s.decodeEntities)(u)):Object(i.createElement)("a",c()({className:f,href:p},d),Object(s.decodeEntities)(u))}},167:function(e,t,r){"use strict";var n=r(0),c=r(135),o=r(89),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",n=i(e),c=n.split(" ").splice(0,t).join(" ");return Object(o.autop)(s(c,r))},l=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=i(e),a=c.slice(0,t);if(r)return Object(o.autop)(s(a,n));var u=a.match(/([\s]+)/g),l=u?u.length:0,b=c.slice(0,t+l);return Object(o.autop)(s(b,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,b=void 0===s?"words":s,p=e.className,d=void 0===p?"":p,f=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),b=Object(c.count)(s,r);return b<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,b)}),[t,i,b]);return Object(n.createElement)(n.RawHTML,{className:d},f)}},171:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),b=r(16),p=r.n(b),d=r(17),f=r.n(d),m=r(10),O=r.n(m),g=r(5),j=r.n(g),v=r(0),h=r(9);r(240);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=y(n);function n(){var e;return a()(this,n),e=r.call(this),j()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(l()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(h.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(v.createElement)(v.Fragment,null,Object(v.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(v.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),n}(h.Component);return t.displayName="withScrollToTop",t}},175:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return j}));var n=r(5),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=(r(2),r(21)),u=r(279),l=r(931),b=r(134),p=r(121),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),r=t.notices,n=t.removeNotice;if(e)return null;var c=r.filter((function(e){return"snackbar"===e.type}));return Object(i.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:n})};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(i.useContext)(O)},j=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(s.useDispatch)("core/notices"),f=p.createNotice,g=p.removeNotice,j=Object(i.useState)(!1),v=a()(j,2),h=v[0],y=v[1],w=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(e,t,m(m({},r),{},{context:r.context||b}))}),[f,b]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;g(e,t)}),[g,b]),k=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w("default",e,m(m({},t),{},{type:"snackbar"}))}),[w]),_={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:w,createSnackbarNotice:k,removeNotice:E,context:b,setIsSuppressed:y},P=h?null:Object(i.createElement)(u.a,{className:n,notices:_.notices}),S=h?null:Object(i.createElement)(d,null);return Object(i.createElement)(O.Provider,{value:_},o&&P,t,S)}},178:function(e,t){},185:function(e,t){},187:function(e,t){},189:function(e,t){!function(){e.exports=this.wp.warning}()},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},20:function(e,t){!function(){e.exports=this.wp.url}()},207:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},i=function(e){return n(e,c.ERROR)},s=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},21:function(e,t){!function(){e.exports=this.wp.data}()},214:function(e,t){},215:function(e,t){},216:function(e,t){},217:function(e,t){},218:function(e,t){},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},240:function(e,t){},246:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=r(261);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},26:function(e,t){!function(){e.exports=this.moment}()},261:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},277:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(13),a=r.n(o),i=r(27),s=r.n(i),u=r(14),l=r.n(u),b=r(15),p=r.n(b),d=r(12),f=r.n(d),m=r(16),O=r.n(m),g=r(17),j=r.n(g),v=r(10),h=r.n(v),y=r(0),w=r(7),E=r(139),k=(r(2),r(6)),_=r(36),P=r(38);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h()(e);if(t){var c=h()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return j()(this,r)}}var C=Object(E.a)((function(e){var t=function(t){O()(o,t);var r,n=S(o);function o(){var e;return l()(this,o),(e=n.apply(this,arguments)).state={list:[],loading:!0},e.setError=e.setError.bind(f()(e)),e.debouncedOnSearch=Object(w.debounce)(e.onSearch.bind(f()(e)),400),e}return p()(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(_.h)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(_.h)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"setError",value:(r=s()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)(t);case 2:r=e.sent,this.setState({list:[],loading:!1,error:r});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.error,o=r.list,a=r.loading;return Object(y.createElement)(e,c()({},this.props,{error:n,products:o,isLoading:a,onSearch:k.u?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),o}(y.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=C},278:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(8),s=r.n(i),u=r(42),l=r(39),b=r(66);r(539);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)().product;if(!i.id||!i.on_sale)return null;var b="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(o.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,b,c()({},"".concat(n,"__product-onsale"),n))},Object(o.createElement)(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},279:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(375),u=r(175),l=(r(216),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,r=e.notices,n=Object(u.b)().removeNotice,a=r.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=i()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))}},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},280:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(88),o=(r(2),r(218),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,i=e.elementId,s=void 0===i?"":i,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var p=l(a)||{};if(!p.message||p.hidden)return null;r=p.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(s)},r))})},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},345:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},36:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"f",(function(){return O})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return j})),r.d(t,"g",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(5),c=r.n(n),o=r(20),a=r(19),i=r.n(a),s=r(7),u=r(6);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,l=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:u.u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},s),i))];return u.u&&r.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),l}({selected:r,search:c,queryArgs:void 0===a?[]:a});return Promise.all(l.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},d=function(e){return i()({path:"/wc/store/products/".concat(e)})},f=function(){return i()({path:"wc/store/products/attributes"})},m=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},O=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.w?100:0,orderby:u.w?"count":"name",order:u.w?"desc":"asc",search:n})];return u.w&&r.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),c}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},g=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},j=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},h=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},376:function(e,t){},378:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(6);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.V)()&&(s=i(i({},s),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=s},379:function(e,t,r){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(13),c=r.n(n),o=r(27),a=r.n(o),i=r(1),s=function(){var e=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},380:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(18),s=r.n(i),u=r(0),l=(r(2),r(1)),b=r(8),p=r.n(b),d=r(6),f=r(39),m=r(66),O=r(278);r(540);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=function(){return Object(u.createElement)("img",{src:d.E,alt:"",width:500,height:500})},h=function(e){var t=e.image,r=e.onLoad,n=e.loaded,o=e.showFullSize,a=e.fallbackAlt,i=t||{},s=i.thumbnail,l=i.src,b=i.srcset,p=i.sizes,d=j({alt:i.alt||a,onLoad:r,hidden:!n,src:s},o&&{src:l,srcSet:b,sizes:p});return Object(u.createElement)(u.Fragment,null,d.src&&Object(u.createElement)("img",c()({"data-testid":"product-image"},d)),!n&&Object(u.createElement)(v,null))};t.a=Object(m.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,c=e.productLink,o=void 0===c||c,i=e.showSaleBadge,b=e.saleBadgeAlign,d=void 0===b?"right":b,m=Object(f.useInnerBlockLayoutContext)().parentClassName,g=Object(f.useProductDataContext)().product,y=Object(u.useState)(!1),w=s()(y,2),E=w[0],k=w[1];if(!g.id)return Object(u.createElement)("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",a()({},"".concat(m,"__product-image"),m))},Object(u.createElement)(v,null));var _=!!g.images.length,P=_?g.images[0]:null,S=o?"a":u.Fragment,C=Object(l.sprintf)(Object(l.__)("Link to %s","woo-gutenberg-products-block"),g.name),N=j({href:g.permalink,rel:"nofollow"},!_&&{"aria-label":C});return Object(u.createElement)("div",{className:p()(t,"wc-block-components-product-image",a()({},"".concat(m,"__product-image"),m))},Object(u.createElement)(S,o&&N,!!i&&Object(u.createElement)(O.default,{align:d,product:g}),Object(u.createElement)(h,{fallbackAlt:g.name,image:P,onLoad:function(){return k(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},381:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(143),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},382:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d}));var n=r(13),c=r.n(n),o=r(45),a=r.n(o),i=r(27),s=r.n(i);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=[],s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(n));case 10:d=e.sent,"object"===a()(d)&&i.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=u(o),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},383:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},384:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(18),i=r.n(a),s=r(1),u=r(53),l=r(134),b=r(207),p=r(916),d="pristine",f="idle",m="disabled",O="processing",g="before_processing",j="after_processing",v={status:d,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},h="set_pristine",y="set_idle",w="set_disabled",E="set_processing",k="set_before_processing",_="set_after_processing",P="set_processing_response",S="set_has_error",C="set_no_error",N="set_quantity",x="set_request_params",D=h,B=y,z=w,V=E,R=k,T=_,A=P,I=S,L=C,F=N,M=x,H=function(){return{type:D}},q=function(){return{type:B}},Q=function(){return{type:z}},G=function(){return{type:V}},W=function(){return{type:R}},U=function(){return{type:T}},Y=function(e){return{type:A,data:e}},K=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:L;return{type:t}},J=function(e){return{type:F,quantity:e}},$=function(e){return{type:M,data:e}},X=r(5),Z=r.n(X);function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=h,ne=y,ce=w,oe=E,ae=k,ie=_,se=P,ue=S,le=C,be=N,pe=x,de=d,fe=f,me=m,Oe=O,ge=g,je=j,ve=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case re:e=v;break;case ne:e=t.status!==fe?te(te({},t),{},{status:fe}):t;break;case ce:e=t.status!==me?te(te({},t),{},{status:me}):t;break;case be:e=n!==t.quantity?te(te({},t),{},{quantity:n}):t;break;case pe:e=te(te({},t),{},{requestParams:te(te({},t.requestParams),o)});break;case se:e=te(te({},t),{},{processingResponse:o});break;case oe:e=!1===(e=t.status!==Oe?te(te({},t),{},{status:Oe,hasError:!1}):t).hasError?e:te(te({},e),{},{hasError:!1});break;case ae:e=t.status!==ge?te(te({},t),{},{status:ge,hasError:!1}):t;break;case ie:e=t.status!==je?te(te({},t),{},{status:je}):t;break;case ue:e=t.hasError?t:te(te({},t),{},{hasError:!0}),e=t.status===Oe||t.status===ge?te(te({},e),{},{status:fe}):e;break;case le:e=t.hasError?te(te({},t),{},{hasError:!1}):t}return e!==t&&c!==re&&e.status===de&&(e.status=fe),e},he=r(143),ye=r(381),we="add_to_cart_before_processing",Ee="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",_e=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(ye.a)(Ee,e),onAddToCartProcessingWithError:Object(ye.a)(ke,e),onAddToCartBeforeProcessing:Object(ye.a)(we,e)}},Pe=r(382),Se=r(88),Ce=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ne=function(){return Object(n.useContext)(Ce)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ve,v),a=i()(o,2),d=a[0],h=a[1],y=Object(n.useReducer)(he.b,{}),w=i()(y,2),E=w[0],k=w[1],_=Object(u.a)(E),P=Object(l.a)(),S=P.addErrorNotice,C=P.removeNotices,N=Object(Se.b)().setValidationErrors,x=Object(b.a)(),D=x.isSuccessResponse,B=x.isErrorResponse,z=x.isFailResponse,V=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:_e(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:_e(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:_e(k).onAddToCartBeforeProcessing}}),[k]),R=Object(n.useMemo)((function(){return{resetForm:function(){h(H())},submitForm:function(){h(W())},setQuantity:function(e){h(J(e))},setHasError:function(e){h(K(e))},setRequestParams:function(e){h($(e))},setAfterProcessing:function(e){h(Y(e)),h(U())}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(p.a)(r);e!==m||t?e!==m&&t&&h(Q()):h(q())}),[d.status,r,h]),Object(n.useEffect)((function(){d.status===g&&(C("error"),Object(Pe.a)(_,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&N(r)})),h(q())):h(G())})))}),[d.status,N,S,C,h,_]),Object(n.useEffect)((function(){if(d.status===j){var e={processingResponse:d.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;S(e.message,t)}};if(d.hasError)return void Object(Pe.b)(_,ke,e).then((function(r){if(B(r)||z(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");S(c,{id:"add-to-cart"})}h(q())}));Object(Pe.b)(_,Ee,e).then((function(e){B(e)||z(e)?(t(e),h(K(!0))):h(q())}))}}),[d.status,d.hasError,d.processingResponse,R,S,B,z,D,_]);var T=Object(p.b)(r),A={product:r,productType:r.type||"simple",productIsPurchasable:Object(p.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:T,showFormElements:c&&T,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:d.status===f,isDisabled:d.status===m,isProcessing:d.status===O,isBeforeProcessing:d.status===g,isAfterProcessing:d.status===j,hasError:d.hasError,eventRegistration:V,dispatchActions:R};return Object(n.createElement)(Ce.Provider,{value:A},t)},De=r(19),Be=r.n(De),ze=r(155),Ve=r(28),Re=r(523);function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Ae=function(){var e=Ne(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,b=e.requestParams,p=Object(Se.b)(),d=p.hasValidationErrors,f=p.showAllValidationErrors,m=Object(l.a)(),O=m.addErrorNotice,g=m.removeNotice,j=Object(ze.a)().receiveCart,v=Object(n.useState)(!1),h=i()(v,2),y=h[0],w=h[1],E=!a&&u,k=Object(n.useCallback)((function(){return!d||(f(),{type:"error"})}),[d,f]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var _=Object(n.useCallback)((function(){w(!0),g("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},b);Be()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Be.a.setNonce(e.headers),e.json().then((function(r){e.ok?j(r):(r.body&&r.body.message?O(Object(Ve.decodeEntities)(r.body.message),{id:"add-to-cart"}):O(Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Re.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&j(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,O,g,j,t,c,b]);return Object(n.useEffect)((function(){E&&!y&&_()}),[E,_,y]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(Se.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Ae,null)))},Le=r(39),Fe=r(7),Me=r(66),He=(r(376),r(94)),qe=r(54),Qe=r(549),Ge=r(837),We=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(He.a,{className:t,href:r,rel:"nofollow"},c)},Ue=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,i=e.onClick;return Object(n.createElement)(He.a,{className:t,disabled:o,showSpinner:c,onClick:i},a&&r>0?Object(s.sprintf)(Object(s._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(s.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(qe.a,{srcElement:Qe.a,alt:Object(s.__)("Done","woo-gutenberg-products-block")}))},Ye=function(){var e=Ne(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(Ge.a)(o.id||0).cartQuantity,m=Object(n.useState)(!1),O=i()(m,2),g=O[0],j=O[1],v=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return p||j(!0),!0}),0);return function(){e()}}),[b,p]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Ue,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:f,isDisabled:u,isProcessing:l,isDone:g,onClick:function(){return d.submitForm()}}):Object(n.createElement)(We,{className:"wc-block-components-product-add-to-cart-button",href:v.url,text:v.text||Object(s.__)("View Product","woo-gutenberg-products-block")})},Ke=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Je=function(e){var t=e.reason,r=void 0===t?Object(s.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Je,null):t.id&&!t.is_in_stock?Object(n.createElement)(Je,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},Xe=(r(548),r(30)),Ze=r.n(Xe),et=r(4),tt=r(9),rt=r(280),nt={value:"",label:Object(s.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,i=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,p=void 0===b?Object(s.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(Se.b)(),f=d.getValidationError,m=d.setValidationErrors,O=d.clearValidationError,g=t,j=f(g)||{};return Object(tt.useEffect)((function(){i?O(g):m(Z()({},g,{message:p,hidden:!0}))}),[i,g,p,O,m]),Object(tt.useEffect)((function(){return function(){O(g)}}),[g,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Ve.decodeEntities)(t),value:i||"",options:[nt].concat(Ze()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":j.message&&!j.hidden})}),Object(n.createElement)(rt.a,{propertyName:g,elementId:g}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},st=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],i=at(at({},r),{},Z()({},c,null)),s=o?it(e,t,i):null,u=null!==s?s.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Ve.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(u.a)(t),a=Object(u.a)(r),s=Object(n.useState)(0),l=i()(s,2),b=l[0],p=l[1],d=Object(n.useState)({}),f=i()(d,2),m=f[0],O=f[1],g=Object(n.useMemo)((function(){return st(o,a,m)}),[m,o,a]);return Object(n.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(o).length?p(function(e,t,r){return it(e,t,r)[0]||0}(o,a,m)):b>0&&p(0)}),[m,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[c,b,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:g[e],value:m[e],onChange:function(t){O(lt(lt({},m),{},Z()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Fe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Je,null):t.id&&!t.is_in_stock?Object(n.createElement)(Je,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(pt,{product:t,dispatchers:a}),Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},ft=function(){return Object(n.createElement)(Ye,null)},mt=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Ot=function(){return Object(n.createElement)(mt,null)},gt=function(){var e=Ne(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(Ot,null):"external"===r?Object(n.createElement)(ft,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Ye,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Le.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Fe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(gt,null)))}))},385:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(39),u=r(22),l=r(6),b=function(e){var t=e.color,r=e.fontSize;return Object(l.V)()?{color:t,fontSize:r}:{}},p=r(66),d=r(166);r(538),t.a=Object(p.withProductDataContext)((function(e){var t,r,n,a=e.className,p=e.headingLevel,f=void 0===p?2:p,m=e.productLink,O=void 0===m||m,g=e.align,j=e.color,v=e.customColor,h=e.fontSize,y=e.customFontSize,w=Object(s.useInnerBlockLayoutContext)().parentClassName,E=Object(s.useProductDataContext)().product,k="h".concat(f),_=Object(u.getColorClassName)("color",j),P=Object(u.getFontSizeClass)(h),S=i()((t={"has-text-color":j||v,"has-font-size":h||y},c()(t,_,_),c()(t,P,P),t));return E.id?Object(o.createElement)(k,{className:i()(a,"wc-block-components-product-title",(r={},c()(r,"".concat(w,"__product-title"),w),c()(r,"wc-block-components-product-title--align-".concat(g),g&&Object(l.V)()),r))},Object(o.createElement)(d.a,{className:i()(c()({},S,Object(l.V)())),disabled:!O,name:E.name,permalink:E.permalink,rel:O?"nofollow":null,style:b({color:v,fontSize:y})})):Object(o.createElement)(k,{className:i()(a,"wc-block-components-product-title",(n={},c()(n,"".concat(w,"__product-title"),w),c()(n,"wc-block-components-product-title--align-".concat(g),g&&Object(l.V)()),c()(n,S,Object(l.V)()),n)),style:b({color:v,fontSize:y})})}))},39:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},41:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(40));t.a=function(e){var t,r,a,i=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=i).message,a=t.type,r?"general"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},42:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r(8),s=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,b=null!=r,p=null!=n;return!b&&p?(t=c||"span",u=l(l({},u),{},{className:s()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,n)):(t=c||a.Fragment,b&&p&&r!==n?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,u,r))}},48:function(e,t){!function(){e.exports=this.wp.keycodes}()},51:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},520:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(142),u=r(63),l=r(39),b=r(22),p=r(6),d=r(66);t.default=Object(d.withProductDataContext)((function(e){var t,r,n,a,d,f,m,O=e.className,g=e.align,j=e.fontSize,v=e.customFontSize,h=e.saleFontSize,y=e.customSaleFontSize,w=e.color,E=e.customColor,k=e.saleColor,_=e.customSaleColor,P=Object(l.useInnerBlockLayoutContext)().parentClassName,S=Object(l.useProductDataContext)().product,C=i()(O,c()({},"".concat(P,"__product-price"),P));if(!S.id)return Object(o.createElement)(s.a,{align:g,className:C});var N=Object(b.getColorClassName)("color",w),x=Object(b.getFontSizeClass)(j),D=Object(b.getColorClassName)("color",k),B=Object(b.getFontSizeClass)(h),z=i()((t={"has-text-color":w||E,"has-font-size":j||v},c()(t,N,N),c()(t,x,x),t)),V=i()((r={"has-text-color":k||_,"has-font-size":h||y},c()(r,D,D),c()(r,B,B),r)),R={color:E,fontSize:v},T={color:_,fontSize:y},A=S.prices,I=Object(u.getCurrencyFromPriceResponse)(A),L=A.price!==A.regular_price,F=L?i()((n={},c()(n,"".concat(P,"__product-price__value"),P),c()(n,V,Object(p.V)()),n)):i()((a={},c()(a,"".concat(P,"__product-price__value"),P),c()(a,z,Object(p.V)()),a)),M=L?T:R;return Object(o.createElement)(s.a,{align:g,className:C,currency:I,price:A.price,priceClassName:F,priceStyle:Object(p.V)()?M:{},minPrice:null==A||null===(d=A.price_range)||void 0===d?void 0:d.min_amount,maxPrice:null==A||null===(f=A.price_range)||void 0===f?void 0:f.max_amount,regularPrice:A.regular_price,regularPriceClassName:i()((m={},c()(m,"".concat(P,"__product-price__regular"),P),c()(m,z,Object(p.V)()),m)),regularPriceStyle:Object(p.V)()?R:{}})}))},521:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(8),s=r.n(i),u=r(39),l=r(66),b=(r(541),function(e){var t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0});t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product,i=b(n);if(!i)return null;var l={width:i/5*100+"%"},p=Object(a.sprintf)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),i);return Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-rating",c()({},"".concat(r,"__product-rating"),r))},Object(o.createElement)("div",{className:s()("wc-block-components-product-rating__stars","".concat(r,"__product-rating__stars")),role:"img","aria-label":p},Object(o.createElement)("span",{style:l},p)))}))},522:function(e,t,r){"use strict";r.r(t);var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(0),s=(r(2),r(8)),u=r.n(s),l=r(1),b=r(837),p=r(28),d=r(523),f=r(39),m=r(66),O=(r(542),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,s=t.has_options,f=t.is_purchasable,m=t.is_in_stock,O=Object(b.a)(n),g=O.cartQuantity,j=O.addingToCart,v=O.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.c)()}),[g]);var h=Number.isFinite(g)&&g>0,y=!s&&f&&m,w=Object(p.decodeEntities)((null==a?void 0:a.description)||""),E=h?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",g,"woo-gutenberg-products-block"),g):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),k=y?"button":"a",_={};return y?_.onClick=function(){v()}:(_.href=o,_.rel="nofollow"),Object(i.createElement)(k,c()({"aria-label":w,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:h}),disabled:j},_),E)}),g=function(){return Object(i.createElement)("button",{className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};t.default=Object(m.withProductDataContext)((function(e){var t=e.className,r=Object(f.useInnerBlockLayoutContext)().parentClassName,n=Object(f.useProductDataContext)().product;return Object(i.createElement)("div",{className:u()(t,"wp-block-button","wc-block-components-product-button",a()({},"".concat(r,"__product-add-to-cart"),r))},n.id?Object(i.createElement)(O,{product:n}):Object(i.createElement)(g,null))}))},523:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a}));var n=window.Event||null,c=function(e,t){var r=t.bubbles,c=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element;if(i||(i=document.body),"function"==typeof n){var s=new n(e,{bubbles:c,cancelable:a});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,a),i.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var o=function(){c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},524:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(167),u=r(3),l=r(39),b=r(66);r(543);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product;if(!n)return Object(o.createElement)("div",{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r))});var a=n.short_description?n.short_description:n.description;if(!a)return null;var b=Object(u.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r)),source:a,maxLength:150,countType:b})}))},525:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(66);r(544);t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product.sku;return n?Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-sku",c()({},"".concat(r,"__product-sku"),r))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,n)):null}))},526:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(7),b=r(66);r(545);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-category-list",c()({},"".concat(r,"__product-category-list"),r))},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"category-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},527:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(7),b=r(66);r(546);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-tag-list",c()({},"".concat(r,"__product-tag-list"),r))},Object(a.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},528:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(66),b=(r(547),function(e){return Object(a.sprintf)(Object(a.__)("%d left in stock","woo-gutenberg-products-block"),e)}),p=function(e,t){return t?Object(a.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(a.__)("In Stock","woo-gutenberg-products-block"):Object(a.__)("Out of Stock","woo-gutenberg-products-block")};t.default=Object(l.withProductDataContext)((function(e){var t,r=e.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;if(!a.id||!a.is_purchasable)return null;var i=!!a.is_in_stock,l=a.low_stock_remaining,d=a.is_on_backorder;return Object(o.createElement)("div",{className:s()(r,"wc-block-components-product-stock-indicator",(t={},c()(t,"".concat(n,"__stock-indicator"),n),c()(t,"wc-block-components-product-stock-indicator--in-stock",i),c()(t,"wc-block-components-product-stock-indicator--out-of-stock",!i),c()(t,"wc-block-components-product-stock-indicator--low-stock",!!l),c()(t,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),t))},l?b(l):p(i,d))}))},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(33),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},538:function(e,t){},539:function(e,t){},54:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(24),a=r.n(o),i=r(9);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))}},540:function(e,t){},541:function(e,t){},542:function(e,t){},543:function(e,t){},544:function(e,t){},545:function(e,t){},546:function(e,t){},547:function(e,t){},548:function(e,t){},549:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},55:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(24),s=r.n(i),u=r(0),l=r(170),b=r(8),p=r.n(b);r(178);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,o=e.onValueChange,a=s()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var i=r/Math.pow(10,n.minorUnit);if(!Number.isFinite(i))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=f(f(f({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),m=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:i,onValueChange:m}))}},58:function(e,t){!function(){e.exports=this.wp.hooks}()},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return c})),r.d(t,"I",(function(){return o})),r.d(t,"O",(function(){return a})),r.d(t,"y",(function(){return i})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"z",(function(){return l})),r.d(t,"C",(function(){return b})),r.d(t,"o",(function(){return p})),r.d(t,"B",(function(){return d})),r.d(t,"n",(function(){return f})),r.d(t,"E",(function(){return m})),r.d(t,"u",(function(){return O})),r.d(t,"w",(function(){return g})),r.d(t,"r",(function(){return j})),r.d(t,"s",(function(){return v})),r.d(t,"t",(function(){return h})),r.d(t,"k",(function(){return y})),r.d(t,"K",(function(){return w})),r.d(t,"P",(function(){return E})),r.d(t,"q",(function(){return k})),r.d(t,"p",(function(){return _})),r.d(t,"H",(function(){return P})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return C})),r.d(t,"S",(function(){return x})),r.d(t,"T",(function(){return D})),r.d(t,"J",(function(){return B})),r.d(t,"a",(function(){return z})),r.d(t,"M",(function(){return V})),r.d(t,"b",(function(){return R})),r.d(t,"L",(function(){return T})),r.d(t,"D",(function(){return A})),r.d(t,"i",(function(){return I})),r.d(t,"N",(function(){return M})),r.d(t,"h",(function(){return H})),r.d(t,"j",(function(){return q})),r.d(t,"G",(function(){return Q})),r.d(t,"F",(function(){return G})),r.d(t,"R",(function(){return W})),r.d(t,"Q",(function(){return U})),r.d(t,"d",(function(){return Y})),r.d(t,"e",(function(){return K})),r.d(t,"f",(function(){return J})),r.d(t,"g",(function(){return $})),r.d(t,"x",(function(){return X})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));var n=r(3),c=Object(n.getSetting)("currentUserIsAdmin",!1),o=Object(n.getSetting)("reviewRatingsEnabled",!0),a=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),u=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),p=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),f=Object(n.getSetting)("default_height",500),m=Object(n.getSetting)("placeholderImgSrc",""),O=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),v=Object(n.getSetting)("hasTags",!0),h=Object(n.getSetting)("homeUrl",""),y=Object(n.getSetting)("couponsEnabled",!0),w=Object(n.getSetting)("shippingEnabled",!0),E=Object(n.getSetting)("taxesEnabled",!0),k=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),_=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),C=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),x=Object(n.getSetting)("wcBlocksAssetUrl",""),D=Object(n.getSetting)("wcBlocksBuildUrl",""),B=Object(n.getSetting)("shippingCountries",{}),z=Object(n.getSetting)("allowedCountries",{}),V=Object(n.getSetting)("shippingStates",{}),R=Object(n.getSetting)("allowedStates",{}),T=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("paymentGatewaySortOrder",[]),I=Object(n.getSetting)("checkoutShowLoginReminder",!0),L={id:0,title:"",permalink:""},F=Object(n.getSetting)("storePages",{shop:L,cart:L,checkout:L,privacy:L,terms:L}),M=F.shop.permalink,H=F.checkout.id,q=F.checkout.permalink,Q=F.privacy.permalink,G=F.privacy.title,W=F.terms.permalink,U=F.terms.title,Y=F.cart.id,K=F.cart.permalink,J=Object(n.getSetting)("checkoutAllowsGuest",!1),$=Object(n.getSetting)("checkoutAllowsSignup",!1),X=Object(n.getSetting)("loginUrl","/wp-login.php"),Z=r(23),ee=function(e,t){if(N>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(N>1)return Object(Z.registerBlockType)(e,t)},re=function(){return N>2},ne=function(){return N>1}},63:function(e,t){!function(){e.exports=this.wc.priceFormat}()},66:function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},67:function(e,t){!function(){e.exports=this.wp.dom}()},68:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),b=r(16),p=r.n(b),d=r(17),f=r.n(d),m=r(10),O=r.n(m),g=r(0),j=r(7),v=r(8),h=r.n(v),y=r(4),w=r(177);r(119);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}var k=function(e){p()(r,e);var t=E(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,o=r.checked,a=r.instanceId,i=r.className,s=r.help,u=r.options,l=r.value,b="inspector-toggle-button-control-".concat(a);return s&&(e=Object(j.isFunction)(s)?s(o):s),Object(g.createElement)(y.BaseControl,{id:b,help:e,className:h()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((function(e,r){var o={};return l===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(g.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},o),e.label)}))))}}]),r}(g.Component);t.a=Object(w.a)(k)},7:function(e,t){!function(){e.exports=this.lodash}()},70:function(e,t){!function(){e.exports=this.wp.deprecated}()},71:function(e,t){!function(){e.exports=this.wp.a11y}()},73:function(e,t){!function(){e.exports=this.ReactDOM}()},75:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(7),a=(r(2),r(4)),i=r(6);t.a=function(e){var t=e.columns,r=e.rows,s=e.setAttributes,u=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(o.clamp)(e,i.A,i.y);s({columns:Number.isNaN(t)?"":t})},min:i.A,max:i.y}),Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(e){var t=Object(o.clamp)(e,i.C,i.z);s({rows:Number.isNaN(t)?"":t})},min:i.C,max:i.z}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:u?Object(c.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return s({alignButtons:!u})}}))}},76:function(e,t){!function(){e.exports=this.wp.viewport}()},77:function(e,t){!function(){e.exports=this.wp.date}()},806:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=o},813:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(n.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(n.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=o},821:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=o},822:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(6),o=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(n.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>7.99</span>',images:[{id:1,src:c.S+"img/pennant.jpg",thumbnail:c.S+"img/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(n.__)("Add to cart","woo-gutenberg-products-block"),description:Object(n.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},827:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));t.a=o},834:function(e,t,r){e.exports=r(886)},835:function(e,t){},836:function(e,t){},837:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(18),c=r.n(n),o=r(0),a=r(21),i=r(37),s=r(28),u=r(134),l=r(155),b=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},p=function(e){var t=Object(a.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(l.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(u.a)(),f=d.addErrorNotice,m=d.removeNotice,O=Object(o.useState)(!1),g=c()(O,2),j=g[0],v=g[1],h=Object(o.useRef)(b(n,e));return Object(o.useEffect)((function(){var t=b(n,e);t!==h.current&&(h.current=t)}),[n,e]),{cartQuantity:Number.isFinite(h.current)?h.current:0,addingToCart:j,cartIsLoading:p,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){f(Object(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},839:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},840:function(e,t){},841:function(e,t){},842:function(e,t){},843:function(e,t){},88:function(e,t,r){"use strict";r.d(t,"b",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(45),c=r.n(n),o=r(5),a=r.n(o),i=r(24),s=r.n(i),u=r(18),l=r.n(u),b=r(0),p=r(7),d=r(33),f=r.n(d);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var j=Object(b.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),v=function(){return Object(b.useContext)(j)},h=function(e){var t=e.children,r=Object(b.useState)({}),n=l()(r,2),c=n[0],o=n[1],i=Object(b.useCallback)((function(e){return c[e]}),[c]),u=Object(b.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),d=Object(b.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return s()(t,[e].map(g))}))}),[]),m=Object(b.useCallback)((function(){o({})}),[]),v=Object(b.useCallback)((function(e){e&&o((function(t){return e=Object(p.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!f()(t[r],e))})),0===Object.values(e).length?t:O(O({},t),e)}))}),[]),h=Object(b.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=O(O({},r[e]),t);return f()(r[e],n)?r:O(O({},r),{},a()({},e,n))}))}),[]),y={getValidationError:i,setValidationErrors:v,clearValidationError:d,clearAllValidationErrors:m,hideValidationError:Object(b.useCallback)((function(e){h(e,{hidden:!0})}),[h]),showValidationError:Object(b.useCallback)((function(e){h(e,{hidden:!1})}),[h]),showAllValidationErrors:Object(b.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=O(O({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:O(O({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:y},t)}},886:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(1),u=r(22),l=r(23),b=r(54),p=r(31),d=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"})),f=r(6),m=r(8),O=r.n(m),g=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:O()("is-loading",t.className)})},j={category:"woocommerce-product-elements",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:Object(f.U)()?null:["@woocommerce/all-products","@woocommerce/single-product"],save:g,deprecated:[{save:function(){}}]},v=r(378),h=r(4),y=r(925),w=r(144),E=r(385),k=r(18),_=r.n(k),P=r(136),S=r(24),C=r.n(S);r(836);var N=function(e){var t=e.className,r=void 0===t?"":t,n=C()(e,["className"]),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(h.Button,a()({className:c},n))},x=r(39),D=(r(835),function(e){return function(t){return function(r){var n=Object(x.useProductDataContext)(),c=r.attributes,o=r.setAttributes,a=c.productId,l=Object(i.useState)(!a),b=_()(l,2),p=b[0],d=b[1];return n.hasContext?Object(i.createElement)(t,r):Object(i.createElement)(i.Fragment,null,p?Object(i.createElement)(h.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(i.createElement)("div",null,e.description),Object(i.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(i.createElement)(P.a,{selected:a||0,showVariations:!0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o({productId:e[0]?e[0].id:0})}}),Object(i.createElement)(h.Button,{isSecondary:!0,disabled:!a,onClick:function(){d(!1)}},Object(s.__)("Done","woo-gutenberg-products-block")))):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,null,Object(i.createElement)(N,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),B=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"})),z=Object(s.__)("Product Title","woo-gutenberg-products-block"),V=Object(i.createElement)(b.a,{srcElement:B}),R=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),T=function(e){var t=e.color,r=e.fontSize,n=e.setFontSize,c=e.setColor,o=e.attributes,a=e.setAttributes,l=o.headingLevel,b=o.productLink,p=o.align;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(w.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:l,onChange:function(e){return a({headingLevel:e})}}),Object(f.V)()&&Object(i.createElement)(u.AlignmentToolbar,{value:p,onChange:function(e){a({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:b,onChange:function(){return a({productLink:!b})}})),Object(f.V)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Text settings","woo-gutenberg-products-block")},Object(i.createElement)(u.FontSizePicker,{value:r.size,onChange:n})),Object(i.createElement)(u.PanelColorSettings,{title:Object(s.__)("Color settings","woo-gutenberg-products-block"),colorSettings:[{value:t.color,onChange:c,label:Object(s.__)("Text color","woo-gutenberg-products-block")}]}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(E.a,o)))},A=Object(f.V)()?Object(y.a)([Object(u.withFontSizes)("fontSize"),Object(u.withColors)("color",{textColor:"color"}),D({icon:V,label:z,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(T):T;function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F={title:z,description:R,icon:{src:V,foreground:"#874FB9"},attributes:v.a,edit:A};Object(l.registerBlockType)("woocommerce/product-title",L(L({},j),F));var M=r(520),H=r(345),q=Object(s.__)("Product Price","woo-gutenberg-products-block"),Q=Object(i.createElement)(b.a,{srcElement:H.a}),G=Object(s.__)("Display the price of a product.","woo-gutenberg-products-block"),W=function(e){var t=e.fontSize,r=e.setFontSize,n=e.color,c=e.setColor,o=e.colorLabel;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.FontSizePicker,{value:t.size,onChange:r}),Object(i.createElement)(h.BaseControl,{label:o},Object(i.createElement)(u.ColorPalette,{value:n.color,onChange:c,label:Object(s.__)("Color")})))},U=function(e){var t=e.fontSize,r=e.saleFontSize,n=e.setFontSize,c=e.setSaleFontSize,o=e.color,a=e.saleColor,l=e.setColor,b=e.setSaleColor,p=e.attributes,d=e.setAttributes,m=p.align;return Object(i.createElement)(i.Fragment,null,Object(f.V)()&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(u.AlignmentToolbar,{value:m,onChange:function(e){d({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(f.V)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Price","woo-gutenberg-products-block")},Object(i.createElement)(W,{color:o,setColor:l,fontSize:t,setFontSize:n,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Sale price","woo-gutenberg-products-block")},Object(i.createElement)(W,{color:a,setColor:b,fontSize:r,setFontSize:c,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})))),Object(i.createElement)(M.default,p))},Y=Object(f.V)()?Object(y.a)([Object(u.withFontSizes)("fontSize"),Object(u.withFontSizes)("saleFontSize"),Object(u.withFontSizes)("originalFontSize"),Object(u.withColors)("color",{textColor:"color"}),Object(u.withColors)("saleColor",{textColor:"saleColor"}),Object(u.withColors)("originalColor",{textColor:"originalColor"}),D({icon:Q,label:q,description:Object(s.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(U):U;function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $={productId:{type:"number",default:0}};function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(f.V)()&&($=J(J({},$),{},{align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}}));var ee={title:q,description:G,icon:{src:Q,foreground:"#874FB9"},attributes:$,edit:Y};Object(l.registerBlockType)("woocommerce/product-price",Z(Z({},j),ee));var te=r(379),re=r(176),ne=r(68),ce=r(3),oe=r(380),ae=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"})),ie=Object(s.__)("Product Image","woo-gutenberg-products-block"),se=Object(i.createElement)(b.a,{srcElement:ae}),ue=Object(s.__)("Display the main product image","woo-gutenberg-products-block"),le=D({icon:se,label:ie,description:Object(s.__)("Choose a product to display its image.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=t.productLink,c=t.imageSizing,o=t.showSaleBadge,a=t.saleBadgeAlign;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(s.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showSaleBadge:!o})}}),o&&Object(i.createElement)(ne.a,{label:Object(s.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(s.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(s.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(s.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(ne.a,{label:Object(s.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(re.a)(Object(s.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(ce.getAdminLink)("customize.php"),"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images"),target:"_blank",rel:"noopener noreferrer"})}),value:c,options:[{label:Object(s.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(s.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:function(e){return r({imageSizing:e})}}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(oe.a,t)))}));function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var de={title:ie,description:ue,icon:{src:se,foreground:"#874FB9"},attributes:te.a,edit:le};Object(l.registerBlockType)("woocommerce/product-image",pe(pe({},j),de));var fe={productId:{type:"number",default:0}},me=r(521),Oe=r(821),ge=Object(s.__)("Product Rating","woo-gutenberg-products-block"),je=Object(i.createElement)(b.a,{srcElement:Oe.a});function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye={title:ge,description:Object(s.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:je,foreground:"#874FB9"},attributes:fe,edit:D({icon:je,label:ge,description:Object(s.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(me.default,t)}))};Object(l.registerBlockType)("woocommerce/product-rating",he(he({},j),ye));var we={productId:{type:"number",default:0}},Ee=r(522),ke=r(839),_e=Object(s.__)("Add to Cart Button","woo-gutenberg-products-block"),Pe=Object(i.createElement)(b.a,{srcElement:ke.a});function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={title:_e,description:Object(s.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:Pe,foreground:"#874FB9"},attributes:we,edit:D({icon:Pe,label:_e,description:Object(s.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Ee.default,t))}))};Object(l.registerBlockType)("woocommerce/product-button",Ce(Ce({},j),Ne));var xe={productId:{type:"number",default:0}},De=r(524),Be=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),ze=Object(s.__)("Product Summary","woo-gutenberg-products-block"),Ve=Object(i.createElement)(b.a,{srcElement:Be});function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae={title:ze,description:Object(s.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Ve,foreground:"#874FB9"},attributes:xe,edit:D({icon:Ve,label:ze,description:Object(s.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(De.default,t)}))};Object(l.registerBlockType)("woocommerce/product-summary",Te(Te({},j),Ae));var Ie={productId:{type:"number",default:0}},Le=r(278),Fe=r(813),Me=Object(s.__)("On-Sale Badge","woo-gutenberg-products-block"),He=Object(i.createElement)(b.a,{srcElement:Fe.a});function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ge={title:Me,description:Object(s.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:He,foreground:"#874FB9"},supports:{html:!1},attributes:Ie,edit:D({icon:He,label:Me,description:Object(s.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(Le.default,t)}))};Object(l.registerBlockType)("woocommerce/product-sale-badge",Qe(Qe({},j),Ge));var We={productId:{type:"number",default:0}},Ue=r(127),Ye=r(525),Ke=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"})),Je=Object(s.__)("Product SKU","woo-gutenberg-products-block"),$e=Object(i.createElement)(b.a,{srcElement:Ke});function Xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var et={title:Je,description:Object(s.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:$e,foreground:"#874FB9"},attributes:We,edit:D({icon:$e,label:Je,description:Object(s.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(Ye.default,t))}))};Object(f.W)("woocommerce/product-sku",Ze(Ze({},j),et));var tt={productId:{type:"number",default:0}},rt=r(526),nt=r(806),ct=Object(s.__)("Product Category List","woo-gutenberg-products-block"),ot=Object(i.createElement)(b.a,{srcElement:nt.a});function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st={title:ct,description:Object(s.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:ot,foreground:"#874FB9"},attributes:tt,edit:D({icon:ot,label:ct,description:Object(s.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(rt.default,t)))}))};Object(f.W)("woocommerce/product-category-list",it(it({},j),st));var ut={productId:{type:"number",default:0}},lt=r(527),bt=Object(s.__)("Product Tag List","woo-gutenberg-products-block"),pt=Object(i.createElement)(b.a,{srcElement:Fe.a});function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt={title:bt,description:Object(s.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:pt,foreground:"#874FB9"},attributes:ut,edit:D({icon:pt,label:bt,description:Object(s.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(lt.default,t)))}))};Object(f.W)("woocommerce/product-tag-list",ft(ft({},j),mt));var Ot={productId:{type:"number",default:0}},gt=r(528),jt=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("g",{fillRule:"evenodd"},Object(i.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.createElement)("path",{fillRule:"nonzero",d:"M20.5 5.2l-1.4-1.7C19 3.3 18.5 3 18 3H6c-.5 0-.9.2-1.2.5L3.5 5.3A2 2 0 003 6.5V19c0 1.1.9 2 2 2h14a2 2 0 002-2V6.5c0-.5-.2-1-.5-1.3zM6.2 5h11.6l.8 1H5.4l.8-1zM5 19V8h14v11H5z"}))),vt=Object(s.__)("Product Stock Indicator","woo-gutenberg-products-block"),ht=Object(i.createElement)(b.a,{srcElement:jt});function yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Et={title:vt,description:Object(s.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:ht,foreground:"#874FB9"},attributes:Ot,edit:D({icon:ht,label:vt,description:Object(s.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(gt.default,t))}))};Object(f.W)("woocommerce/product-stock-indicator",wt(wt({},j),Et));var kt=r(916),_t=(r(376),r(384)),Pt=Object(s.__)("Add to Cart","woo-gutenberg-products-block"),St=Object(i.createElement)(b.a,{srcElement:ke.a});function Ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xt={title:Pt,description:Object(s.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:St,foreground:"#874FB9"},edit:D({icon:St,label:Pt,description:Object(s.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=Object(x.useProductDataContext)().product,c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:O()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(Ue.a,{productId:n.id}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block")},Object(kt.b)(n)?Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Display form elements","woo-gutenberg-products-block"),help:Object(s.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showFormElements:!o})}}):Object(i.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(s.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(_t.a,t)))})),attributes:r(383).a};Object(f.W)("woocommerce/product-add-to-cart",Nt(Nt({},j),xt));var Dt=r(14),Bt=r.n(Dt),zt=r(12),Vt=r.n(zt),Rt=r(16),Tt=r.n(Rt),At=r(17),It=r.n(At),Lt=r(10),Ft=r.n(Lt),Mt=r(21),Ht=(r(2),r(75)),qt=r(912),Qt=r(822),Gt=r(157),Wt=function(e,t){var r=t.className,n=t.contentVisibility;return O()(e,r,{"has-image":n&&n.image,"has-title":n&&n.title,"has-rating":n&&n.rating,"has-price":n&&n.price,"has-button":n&&n.button})},Ut=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(s.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-products__add-product-button",isSecondary:!0,href:ce.ADMIN_URL+"post-new.php?post_type=product"},Object(s.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:Gt.a})),Object(i.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(s.__)("Learn more","woo-gutenberg-products-block")))},Yt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(s.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $t=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],Xt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,Jt(Jt({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tr=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:er(er({},r),{},{orderBy:!r.orderBy})})}})},rr=function(e,t){return Object(i.createElement)(h.SelectControl,{label:Object(s.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(s.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(s.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(s.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(s.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(s.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(s.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},nr=r(15),cr=r.n(nr),or=r(9),ar=r(7),ir=r(42),sr=(r(843),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,u=function(e,t,r){if(r<=2)return{minIndex:null,maxIndex:null};var n=e-1,c=Math.max(Math.floor(t-n/2),2),o=Math.min(Math.ceil(t+(n-(t-c))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(o-t))),2),maxIndex:o}}(c,t,a),l=u.minIndex,b=u.maxIndex,p=r&&Boolean(1!==l),d=r&&Boolean(b!==a),f=r&&Boolean(l>3),m=r&&Boolean(b<a-2);p&&3===l&&(l-=1),d&&b===a-2&&(b+=1);var g=[];if(l&&b)for(var j=l;j<=b;j++)g.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(ir.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t-1)},title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(ir.a,{label:"<",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return o(1)},disabled:1===t},Object(i.createElement)(ir.a,{label:1,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),g.map((function(e){return Object(i.createElement)("button",{key:e,className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return o(e)},disabled:t===e},Object(i.createElement)(ir.a,{label:e,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),e)}))})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===a,"wc-block-components-pagination__page--active":t===a}),onClick:function(){return o(a)},disabled:t===a},Object(i.createElement)(ir.a,{label:a,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),a)})),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t+1)},title:Object(s.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(ir.a,{label:">",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))});sr.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var ur=sr,lr=r(141),br=(r(842),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(lr.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:r,options:[{key:"menu_order",label:Object(s.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(s.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(s.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(s.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(s.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(s.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:c})}),pr=r(213),dr=Object(pr.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(x.useInnerBlockLayoutContext)(),s=o.parentClassName,u=o.parentName,l=0===Object.keys(t).length,b=O()("".concat(s,"__product"),"wc-block-layout",{"is-loading":l});return Object(i.createElement)("li",{className:b,"aria-hidden":l},function e(t,r,n,c){if(n){var o=Object(qt.a)(t);return n.map((function(n,s){var u=_()(n,2),l=u[0],b=u[1],p=void 0===b?{}:b,d=[];p.children&&p.children.length>0&&(d=e(t,r,p.children,c));var f=o[l];if(!f)return null;var m=r.id||0,O=["layout",l,s,c,m];return Object(i.createElement)(i.Suspense,{key:O.join("_"),fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},Object(i.createElement)(f,a()({},p,{children:d,product:r})))}))}}(u,t,c,n))})),fr=r(146),mr=r(156),Or=r(37),gr=r(53);function jr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hr=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(mr.a)(vr(vr({},t),{},{query:e})),n=r.results,c=r.isLoading,o=function(e,t){var r=t.namespace,n=t.resourceName,c=t.resourceValues,o=void 0===c?[]:c,a=t.query,i=void 0===a?{}:a;if(!r||!n)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var s=Object(gr.a)(i),u=Object(gr.a)(o),l=Object(Mt.useSelect)((function(t){var c=t(Or.COLLECTIONS_STORE_KEY),o=[e,r,n,s,u];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,u,s]),b=l.value,p=l.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",vr(vr({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},yr=r(96),wr=r(171),Er=r(71),kr=(r(841),r(138)),_r=function(){var e=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(e,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:kr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(e,"__no-products-title")},Object(s.__)("No products","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(e,"__no-products-description")},Object(s.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Pr=r(827),Sr=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(n,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(n,"__no-products-image"),alt:"",srcElement:Pr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(n,"__no-products-title")},Object(s.__)("No products found","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(n,"__no-products-description")},Object(s.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(i.createElement)("button",{onClick:r},Object(s.__)("Reset Search","woo-gutenberg-products-block")))};function Cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xr=function(e){var t=e.totalQuery,r=e.totalProducts,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n.totalQuery;return!Object(ar.isEqual)(t,c)&&Number.isFinite(r)},Dr=Object(wr.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,u=Object(fr.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return Nr(Nr({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:c*o,page:r})}({attributes:t,sortValue:o,currentPage:r})),l=_()(u,1)[0],b=hr(l),p=b.products,d=b.totalProducts,f=b.productsLoading,m=Object(x.useInnerBlockLayoutContext)().parentClassName,g=function(e){e.order,e.orderby,e.page,e.per_page;return C()(e,["order","orderby","page","per_page"])||{}}(l),j=Object(fr.b)("attributes",[]),v=_()(j,2),h=v[0],y=v[1],w=Object(fr.b)("min_price"),E=_()(w,2),k=E[0],P=E[1],S=Object(fr.b)("max_price"),N=_()(S,2),D=N[0],B=N[1],z=Object(yr.a)({totalQuery:g,totalProducts:d},xr);Object(i.useEffect)((function(){Object(ar.isEqual)(g,null==z?void 0:z.totalQuery)||(n(1),null!=z&&z.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(Er.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(Er.speak)(Object(s.sprintf)(Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[null==z?void 0:z.totalQuery,d,n,g]);var V,R,T,A,I,L=t.contentVisibility,F=t.columns*t.rows,M=!Number.isFinite(d)&&Number.isFinite(null==z?void 0:z.totalProducts)&&Object(ar.isEqual)(g,null==z?void 0:z.totalQuery)?Math.ceil(z.totalProducts/F):Math.ceil(d/F),H=p.length?p:Array.from({length:F}),q=0!==p.length||f,Q=h.length>0||Number.isFinite(k)||Number.isFinite(D);return Object(i.createElement)("div",{className:(V=t.columns,R=t.rows,T=t.alignButtons,A=t.align,I=void 0!==A?"align"+A:"",O()(m,I,"has-"+V+"-columns",{"has-multiple-rows":R>1,"has-aligned-buttons":T}))},L.orderBy&&q&&Object(i.createElement)(br,{onChange:c,value:o}),!q&&Q&&Object(i.createElement)(Sr,{resetCallback:function(){y([]),P(null),B(null)}}),!q&&!Q&&Object(i.createElement)(_r,null),q&&Object(i.createElement)("ul",{className:"".concat(m,"__products")},H.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return Object(i.createElement)(dr,{key:e.id||r,attributes:t,product:e})}))),M>1&&Object(i.createElement)(ur,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:M}))})),Br=function(e){var t=e.attributes,r=Object(i.useState)(1),n=_()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=_()(a,2),u=s[0],l=s[1];Object(i.useEffect)((function(){l(t.orderby)}),[t.orderby]);return Object(i.createElement)(Dr,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;l(t),o(1)},sortValue:u})},zr=r(165);function Vr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return It()(this,r)}}var Rr=function(e){Tt()(r,e);var t=Vr(r);function r(){return Bt()(this,r),t.apply(this,arguments)}return cr()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?zr.a:Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(Br,{attributes:t,urlParameterSuffix:r}))}}]),r}(or.Component);r(840);function Tr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return It()(this,r)}}var Ar=function(e){Tt()(r,e);var t=Tr(r);function r(){var e;Bt()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),c()(Vt()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(Vt()(e),"blockMap",Object(qt.a)("woocommerce/all-products")),c()(Vt()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(Vt()(e),"getTitle",(function(){return Object(s.__)("All Products","woo-gutenberg-products-block")})),c()(Vt()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(Vt()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(s.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(Vt()(e),"getInspectorControls",(function(){var t=e.props,r=t.attributes,n=t.setAttributes,c=r.columns,o=r.rows,a=r.alignButtons;return Object(i.createElement)(u.InspectorControls,{key:"inspector"},Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ht.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content Settings","woo-gutenberg-products-block")},tr(r,n),rr(r,n)))})),c()(Vt()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,{controls:[{icon:"edit",title:Object(s.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(Vt()(e),"renderEditMode",(function(){var t={template:e.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(e.blockMap)};return 0!==e.props.attributes.layoutConfig.length&&(t.renderAppender=!1),Object(i.createElement)(h.Placeholder,{icon:e.getIcon(),label:e.getTitle()},Object(s.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(i.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(i.createElement)(h.Tip,null,Object(s.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(x.ProductDataContextProvider,{product:Qt.a[0]},Object(i.createElement)(u.InnerBlocks,t)))))),Object(i.createElement)("div",{className:"wc-block-all-products__actions"},Object(i.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:Xt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(s.__)("Done","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=e.state.innerBlocks;n(r.clientId,c,!1),e.togglePreview()}},Object(s.__)("Cancel","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__reset-button",icon:Object(i.createElement)(b.a,{srcElement:d}),label:Object(s.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];$t.map((function(e){var t=_()(e,2),r=t[0],n=t[1];return c.push(Object(l.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(s.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(Vt()(e),"renderViewMode",(function(){var t=e.props.attributes,r=t.layoutConfig,n=r&&0!==r.length,c=e.getTitle(),o=e.getIcon();return n?Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Rr,{attributes:t})):Yt(c,o)})),c()(Vt()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return f.r?Object(i.createElement)("div",{className:Wt("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):Ut(n,c)})),e}return r}(i.Component),Ir=Object(y.a)(h.withSpokenMessages,Object(Mt.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Mt.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Ar),Lr={columns:f.m,rows:f.o,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:$t,isPreview:!1};function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hr={title:Object(s.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Lr,edit:function(e){return Object(i.createElement)(Ir,e)},save:function(e){var t=e.attributes,r={};Object.keys(t).sort().forEach((function(e){r[e]=t[e]}));var n={"data-attributes":JSON.stringify(r)};return Object(i.createElement)("div",a()({className:Wt("wc-block-all-products",t)},n),Object(i.createElement)(u.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",Mr(Mr({},Hr),{},{deprecated:[{attributes:Object.assign({},Hr.attributes,{rows:{type:"number",default:1}}),save:function(e){var t=e.attributes,r={"data-attributes":JSON.stringify(t)};return Object(i.createElement)("div",a()({className:Wt("wc-block-all-products",t)},r),Object(i.createElement)(u.InnerBlocks.Content,null))}}]}))},89:function(e,t){!function(){e.exports=this.wp.autop}()},9:function(e,t){!function(){e.exports=this.React}()},912:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(51),c=r(0),o=r(6);r.p=o.T,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(11)]).then(r.bind(null,520))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(3),r.e(10)]).then(r.bind(null,933))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(17)]).then(r.bind(null,934))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)((function(){return r.e(12).then(r.bind(null,521))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(2),r.e(8)]).then(r.bind(null,522))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)((function(){return r.e(15).then(r.bind(null,524))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)((function(){return r.e(3).then(r.bind(null,278))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)((function(){return r.e(13).then(r.bind(null,525))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)((function(){return r.e(9).then(r.bind(null,526))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)((function(){return r.e(16).then(r.bind(null,527))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)((function(){return r.e(14).then(r.bind(null,528))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(7)]).then(r.bind(null,935))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},916:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},94:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(212),u=(r(2),r(8)),l=r.n(u);r(217);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(s.a,c()({className:b},u),n&&Object(i.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(i.createElement)("span",{className:"wc-block-components-button__text"},o))}},95:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(18),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){return t((function(){throw e}))}),[])}},96:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(9),c=function(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}}});
|
build/all-reviews.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '31dabe5aa13f01f8d0dc049a5fe0611a');
|
build/all-reviews.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var n,i,a=t[0],s=t[1],l=t[2],b=0,d=[];b<a.length;b++)i=a[b],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&d.push(o[i][0]),o[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,a=1;a<r.length;a++){var s=r[a];0!==o[s]&&(n=!1)}n&&(c.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={6:0},c=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var u=s;return c.push([858,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},127:function(e,t){},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},139:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return p}));var n=r(0),o=r(1),c=r(200),i=r(4),a=r(23),s=r(3),l=r(6),u=r(70),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!l.I&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Product rating is disabled in your <a>store settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!l.O&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Reviewer photo is disabled in your <a>site settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(i.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(i.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(i.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},149:function(e,t,r){"use strict";var n=r(0),o=r(32),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},152:function(e,t){},154:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(9)),c=r.n(o),i=r(44),a=r(244);r(211);t.a=Object(a.a)((function(e){var t=e.className,r=e.instanceId,o=e.defaultValue,a=e.label,s=e.onChange,l=e.options,u=e.screenReaderLabel,b=e.readOnly,d=e.value,p="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:a,screenReaderLabel:u,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),Object(n.createElement)("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:o,onChange:s,readOnly:b,value:d},l.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},161:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(6),c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(n.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",reviewer:Object(n.__)("Alice","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.S+"img/avatar.jpg",96:o.S+"img/avatar.jpg"},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(n.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",reviewer:Object(n.__)("Bob","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("This product is awesome, I love it!","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.S+"img/avatar.jpg",96:o.S+"img/avatar.jpg"},rating:null,verified:!1}]}}},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},191:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},192:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(0),i=(r(210),r(66));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},197:function(e,t,r){"use strict";var n=r(14),o=r.n(n),c=r(15),i=r.n(c),a=r(16),s=r.n(a),l=r(17),u=r.n(l),b=r(10),d=r.n(b),p=r(0),w=r(1),g=r(7),f=(r(2),r(8)),m=r(4),v=r(6),h=r(92),O=r(44),j=(r(270),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(O.a,{label:r,screenReaderLabel:n})))});j.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var y=j,_=r(154),k=(r(267),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(_.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",defaultValue:t,label:Object(w.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(w.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(w.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(w.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(w.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),R=r(5),E=r.n(R),S=r(9),P=r.n(S),C=r(12),N=r.n(C),x=r(237),T=r.n(x),L=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=T()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return L(e,o-n.length,n)},I=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=L(e,n.middle),n=M(n,t.clientHeight,r);return n.middle},M=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var B=function(e){s()(r,e);var t=A(r);function r(e){var n;return o()(this,r),(n=t.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},n.reviewSummary=Object(g.createRef)(),n.reviewContent=Object(g.createRef)(),n.getButton=n.getButton.bind(N()(n)),n.onClick=n.onClick.bind(N()(n)),n}return i()(r,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:D(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),r}(g.Component);B.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(w.__)("Read more","woo-gutenberg-products-block"),lessText:Object(w.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=B;r(269);var V=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,i=t.showReviewerName,a=t.showReviewImage,s=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,g=Number.isFinite(b)&&s;return Object(p.createElement)("li",{className:P()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||i||a||g)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,o;return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(p.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(o=e.product_image)||void 0===o?void 0:o.thumbnail)||""}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(w.__)("Verified buyer","woo-gutenberg-products-block")},Object(w.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||i||g||c)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},g&&function(e){var t=e.rating,r={width:t/5*100+"%"},n=Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},Object(p.createElement)("span",{style:r},n)))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(p.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(n),i&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(p.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(n))),l&&function(e){return Object(p.createElement)(H,{maxLines:10,moreText:Object(w.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(w.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(268);function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){E()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var G=function(e){var t=e.attributes,r=e.reviews,n=(v.O||"product"===t.imageType)&&t.showReviewImage,o=v.I&&t.showReviewRating,c=z(z({},t),{},{showReviewImage:n,showReviewRating:o});return Object(p.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(p.createElement)(V,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(V,{key:e.id||t,attributes:c,review:e})})))},U=r(11),W=r.n(U),J=r(13),q=r.n(J),K=r(28),Q=r.n(K),X=r(34),Y=r.n(X),Z=r(66),$=r(40);function ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var re=function(e){var t=function(t){s()(n,t);var r=ee(n);function n(){var e;o()(this,n);for(var t=arguments.length,c=new Array(t),i=0;i<t;i++)c[i]=arguments[i];return e=r.call.apply(r,[this].concat(c)),E()(N()(e),"isPreview",!!e.props.attributes.previewReviews),E()(N()(e),"delayedAppendReviews",e.props.delayFunction(e.appendReviews)),E()(N()(e),"state",{error:null,loading:!0,reviews:e.isPreview?e.props.attributes.previewReviews:[],totalReviews:e.isPreview?e.props.attributes.previewReviews.length:0}),E()(N()(e),"setError",function(){var t=Q()(q.a.mark((function t(r){var n,o;return q.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object($.a)(r);case 3:o=t.sent,e.setState({reviews:[],loading:!1,error:o}),n(o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return i()(n,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Y()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,i={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(i.category_id=Array.isArray(r)?r.join(","):r),c&&(i.product_id=c),i}},{key:"replaceReviews",value:function(){if(!this.isPreview){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}}},{key:"appendReviews",value:function(){if(!this.isPreview){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(Z.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,i=r.totalReviews;return Object(p.createElement)(e,W()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(g.Component);E()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){s()(r,e);var t=te(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,i=e.totalReviews;return r?Object(p.createElement)(h.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(m.Disabled,null,t.showOrderby&&v.I&&Object(p.createElement)(k,{readOnly:!0,value:t.orderby}),Object(p.createElement)(G,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(y,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var oe=function(e){s()(r,e);var t=ne(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(m.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.noReviewsPlaceholder,n=t.categoryIds,o=t.productId,c=t.reviewsOnPageLoad,i=t.showProductName,a=t.showReviewDate,s=t.showReviewerName,l=t.showReviewContent,u=t.showReviewImage,b=t.showReviewRating,d=Object(Z.d)(t.orderby),w=d.order,g=d.orderby;return!(l||b||a||s||u||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(t)},Object(p.createElement)(re,{attributes:t,categoryIds:n,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:r,orderby:g,order:w,productId:o,reviewsToDisplay:c}))}}]),r}(g.Component);t.a=oe},210:function(e,t){},211:function(e,t){},23:function(e,t){!function(){e.exports=this.wp.blockEditor}()},24:function(e,t){!function(){e.exports=this.wp.blocks}()},267:function(e,t){},268:function(e,t){},269:function(e,t){},270:function(e,t){},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},32:function(e,t){!function(){e.exports=this.wp.primitives}()},34:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(13),o=r.n(n),c=r(28),i=r.n(c),a=r(1),s=function(){var e=i()(o.a.mark((function e(t){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},42:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},43:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(42));t.a=function(e){var t,r,i,a=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=a).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):r:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},44:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0),i=(r(2),r(7)),a=r(9),s=r.n(a);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=r,d=null!=n;return!b&&d?(t=o||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),Object(c.createElement)(t,l,n)):(t=o||i.Fragment,b&&d&&r!==n?Object(c.createElement)(t,l,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,l,r))}},55:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(25),i=r.n(c),a=r(7);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return o})),r.d(t,"I",(function(){return c})),r.d(t,"O",(function(){return i})),r.d(t,"y",(function(){return a})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return l})),r.d(t,"z",(function(){return u})),r.d(t,"C",(function(){return b})),r.d(t,"o",(function(){return d})),r.d(t,"B",(function(){return p})),r.d(t,"n",(function(){return w})),r.d(t,"E",(function(){return g})),r.d(t,"u",(function(){return f})),r.d(t,"w",(function(){return m})),r.d(t,"r",(function(){return v})),r.d(t,"s",(function(){return h})),r.d(t,"t",(function(){return O})),r.d(t,"k",(function(){return j})),r.d(t,"K",(function(){return y})),r.d(t,"P",(function(){return _})),r.d(t,"q",(function(){return k})),r.d(t,"p",(function(){return R})),r.d(t,"H",(function(){return E})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return P})),r.d(t,"S",(function(){return N})),r.d(t,"T",(function(){return x})),r.d(t,"J",(function(){return T})),r.d(t,"a",(function(){return L})),r.d(t,"M",(function(){return D})),r.d(t,"b",(function(){return I})),r.d(t,"L",(function(){return M})),r.d(t,"D",(function(){return A})),r.d(t,"i",(function(){return B})),r.d(t,"N",(function(){return F})),r.d(t,"h",(function(){return z})),r.d(t,"j",(function(){return G})),r.d(t,"G",(function(){return U})),r.d(t,"F",(function(){return W})),r.d(t,"R",(function(){return J})),r.d(t,"Q",(function(){return q})),r.d(t,"d",(function(){return K})),r.d(t,"e",(function(){return Q})),r.d(t,"f",(function(){return X})),r.d(t,"g",(function(){return Y})),r.d(t,"x",(function(){return Z})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));var n=r(3),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),l=Object(n.getSetting)("default_columns",3),u=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),d=Object(n.getSetting)("default_rows",3),p=Object(n.getSetting)("min_height",500),w=Object(n.getSetting)("default_height",500),g=Object(n.getSetting)("placeholderImgSrc",""),f=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),m=Object(n.getSetting)("limitTags"),v=Object(n.getSetting)("hasProducts",!0),h=Object(n.getSetting)("hasTags",!0),O=Object(n.getSetting)("homeUrl",""),j=Object(n.getSetting)("couponsEnabled",!0),y=Object(n.getSetting)("shippingEnabled",!0),_=Object(n.getSetting)("taxesEnabled",!0),k=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),R=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),E=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),P=Object(n.getSetting)("isShippingCalculatorEnabled",!0),C=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),N=Object(n.getSetting)("wcBlocksAssetUrl",""),x=Object(n.getSetting)("wcBlocksBuildUrl",""),T=Object(n.getSetting)("shippingCountries",{}),L=Object(n.getSetting)("allowedCountries",{}),D=Object(n.getSetting)("shippingStates",{}),I=Object(n.getSetting)("allowedStates",{}),M=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("paymentGatewaySortOrder",[]),B=Object(n.getSetting)("checkoutShowLoginReminder",!0),H={id:0,title:"",permalink:""},V=Object(n.getSetting)("storePages",{shop:H,cart:H,checkout:H,privacy:H,terms:H}),F=V.shop.permalink,z=V.checkout.id,G=V.checkout.permalink,U=V.privacy.permalink,W=V.privacy.title,J=V.terms.permalink,q=V.terms.title,K=V.cart.id,Q=V.cart.permalink,X=Object(n.getSetting)("checkoutAllowsGuest",!1),Y=Object(n.getSetting)("checkoutAllowsSignup",!1),Z=Object(n.getSetting)("loginUrl","/wp-login.php"),$=r(24),ee=function(e,t){if(C>2)return Object($.registerBlockType)(e,t)},te=function(e,t){if(C>1)return Object($.registerBlockType)(e,t)},re=function(){return C>2},ne=function(){return C>1}},66:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n=r(19),o=r.n(n),c=r(9),i=r.n(c),a=r(6),s=function(e){if(a.I){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/store/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e){var t=e.className,r=e.categoryIds,n=e.productId,o=e.showReviewDate,c=e.showReviewerName,a=e.showReviewContent,s=e.showProductName,l=e.showReviewImage,u=e.showReviewRating,b="wc-block-all-reviews";return n&&(b="wc-block-reviews-by-product"),Array.isArray(r)&&(b="wc-block-reviews-by-category"),i()(b,t,{"has-image":l,"has-name":c,"has-date":o,"has-rating":u,"has-content":a,"has-product-name":s})},b=function(e){var t=e.categoryIds,r=e.imageType,n=e.orderby,o=e.productId,c={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":e.reviewsOnPageLoad,"data-reviews-on-load-more":e.reviewsOnLoadMore,"data-show-load-more":e.showLoadMore,"data-show-orderby":e.showOrderby};return o&&(c["data-product-id"]=o),Array.isArray(t)&&(c["data-category-ids"]=t.join(",")),c}},7:function(e,t){!function(){e.exports=this.React}()},70:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(15),s=r.n(a),l=r(12),u=r.n(l),b=r(16),d=r.n(b),p=r(17),w=r.n(p),g=r(10),f=r.n(g),m=r(0),v=r(8),h=r(9),O=r.n(h),j=r(4),y=r(201);r(127);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=f()(e);if(t){var o=f()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return w()(this,r)}}var k=function(e){d()(r,e);var t=_(r);function r(){var e;return i()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(u()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,i=r.instanceId,a=r.className,s=r.help,l=r.options,u=r.value,b="inspector-toggle-button-control-".concat(i);return s&&(e=Object(v.isFunction)(s)?s(c):s),Object(m.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",a)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(m.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isSecondary=!0,c["aria-pressed"]=!1),Object(m.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),r}(m.Component);t.a=Object(y.a)(k)},8:function(e,t){!function(){e.exports=this.lodash}()},858:function(e,t,r){e.exports=r(936)},92:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(55)),i=r(149),a=r(9),s=r.n(a),l=r(4),u=r(43);r(152);t.a=function(e){var t=e.className,r=e.error,a=e.isLoading,b=e.onRetry;return Object(n.createElement)(l.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:i.a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",t)},Object(n.createElement)(u.a,{error:r}),b&&Object(n.createElement)(n.Fragment,null,a?Object(n.createElement)(l.Spinner,null):Object(n.createElement)(l.Button,{isSecondary:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},936:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r.n(n),c=r(0),i=r(1),a=r(24),s=r(55),l=r(32),u=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M15 4v7H5.17l-.59.59-.58.58V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"})),b=(r(210),r(23)),d=r(4),p=(r(2),r(197)),w=function(){return Object(c.createElement)(d.Placeholder,{className:"wc-block-all-reviews",icon:Object(c.createElement)(s.a,{srcElement:u,className:"block-editor-block-icon"}),label:Object(i.__)("All Reviews","woo-gutenberg-products-block")},Object(i.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"))},g=r(139),f=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(b.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(d.ToggleControl,{label:Object(i.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(g.b)(t,r)),Object(c.createElement)(d.PanelBody,{title:Object(i.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,r))),Object(c.createElement)(p.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},m=r(191),v=r(192),h=r(161);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(a.registerBlockType)("woocommerce/all-reviews",{title:Object(i.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(s.a,{srcElement:u}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Show a list of all product reviews.","woo-gutenberg-products-block"),supports:{html:!1},example:j(j({},h.a),{},{attributes:j(j({},h.a.attributes),{},{showProductName:!0})}),attributes:j(j({},m.a),{},{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(f,e)},save:v.a})}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var n,i,a=t[0],s=t[1],l=t[2],b=0,d=[];b<a.length;b++)i=a[b],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&d.push(o[i][0]),o[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,a=1;a<r.length;a++){var s=r[a];0!==o[s]&&(n=!1)}n&&(c.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={6:0},c=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var u=s;return c.push([823,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},119:function(e,t){},129:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return p}));var n=r(0),o=r(1),c=r(176),i=r(4),a=r(22),s=r(3),l=r(6),u=r(68),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!l.I&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Product rating is disabled in your <a>store settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!l.O&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Reviewer photo is disabled in your <a>site settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(i.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(i.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(i.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},138:function(e,t,r){"use strict";var n=r(0),o=r(31),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},140:function(e,t){},141:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(8)),c=r.n(o),i=r(42),a=r(213);r(187);t.a=Object(a.a)((function(e){var t=e.className,r=e.instanceId,o=e.defaultValue,a=e.label,s=e.onChange,l=e.options,u=e.screenReaderLabel,b=e.readOnly,d=e.value,p="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:a,screenReaderLabel:u,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),Object(n.createElement)("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:o,onChange:s,readOnly:b,value:d},l.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},147:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(6),c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(n.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",reviewer:Object(n.__)("Alice","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.S+"img/avatar.jpg",96:o.S+"img/avatar.jpg"},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(n.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",reviewer:Object(n.__)("Bob","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("This product is awesome, I love it!","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.S+"img/avatar.jpg",96:o.S+"img/avatar.jpg"},rating:null,verified:!1}]}}},168:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},169:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(0),i=(r(186),r(65));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},173:function(e,t,r){"use strict";var n=r(14),o=r.n(n),c=r(15),i=r.n(c),a=r(16),s=r.n(a),l=r(17),u=r.n(l),b=r(10),d=r.n(b),p=r(0),w=r(1),g=r(9),f=(r(2),r(7)),m=r(4),v=r(6),h=r(87),O=r(42),j=(r(239),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(O.a,{label:r,screenReaderLabel:n})))});j.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var y=j,_=r(141),k=(r(236),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(_.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",defaultValue:t,label:Object(w.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(w.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(w.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(w.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(w.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),R=r(5),E=r.n(R),S=r(8),P=r.n(S),C=r(12),N=r.n(C),x=r(208),T=r.n(x),L=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=T()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return L(e,o-n.length,n)},I=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=L(e,n.middle),n=M(n,t.clientHeight,r);return n.middle},M=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var B=function(e){s()(r,e);var t=A(r);function r(e){var n;return o()(this,r),(n=t.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},n.reviewSummary=Object(g.createRef)(),n.reviewContent=Object(g.createRef)(),n.getButton=n.getButton.bind(N()(n)),n.onClick=n.onClick.bind(N()(n)),n}return i()(r,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:D(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),r}(g.Component);B.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(w.__)("Read more","woo-gutenberg-products-block"),lessText:Object(w.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=B;r(238);var V=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,i=t.showReviewerName,a=t.showReviewImage,s=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,g=Number.isFinite(b)&&s;return Object(p.createElement)("li",{className:P()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||i||a||g)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,o;return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(p.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(o=e.product_image)||void 0===o?void 0:o.thumbnail)||""}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(w.__)("Verified buyer","woo-gutenberg-products-block")},Object(w.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||i||g||c)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},g&&function(e){var t=e.rating,r={width:t/5*100+"%"},n=Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},Object(p.createElement)("span",{style:r},n)))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(p.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(n),i&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(p.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(n))),l&&function(e){return Object(p.createElement)(H,{maxLines:10,moreText:Object(w.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(w.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(237);function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){E()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var G=function(e){var t=e.attributes,r=e.reviews,n=(v.O||"product"===t.imageType)&&t.showReviewImage,o=v.I&&t.showReviewRating,c=z(z({},t),{},{showReviewImage:n,showReviewRating:o});return Object(p.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(p.createElement)(V,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(V,{key:e.id||t,attributes:c,review:e})})))},U=r(11),W=r.n(U),J=r(13),q=r.n(J),K=r(27),Q=r.n(K),X=r(33),Y=r.n(X),Z=r(65),$=r(38);function ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var re=function(e){var t=function(t){s()(n,t);var r=ee(n);function n(){var e;o()(this,n);for(var t=arguments.length,c=new Array(t),i=0;i<t;i++)c[i]=arguments[i];return e=r.call.apply(r,[this].concat(c)),E()(N()(e),"isPreview",!!e.props.attributes.previewReviews),E()(N()(e),"delayedAppendReviews",e.props.delayFunction(e.appendReviews)),E()(N()(e),"state",{error:null,loading:!0,reviews:e.isPreview?e.props.attributes.previewReviews:[],totalReviews:e.isPreview?e.props.attributes.previewReviews.length:0}),E()(N()(e),"setError",function(){var t=Q()(q.a.mark((function t(r){var n,o;return q.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object($.a)(r);case 3:o=t.sent,e.setState({reviews:[],loading:!1,error:o}),n(o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return i()(n,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Y()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,i={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(i.category_id=Array.isArray(r)?r.join(","):r),c&&(i.product_id=c),i}},{key:"replaceReviews",value:function(){if(!this.isPreview){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}}},{key:"appendReviews",value:function(){if(!this.isPreview){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(Z.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,i=r.totalReviews;return Object(p.createElement)(e,W()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(g.Component);E()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){s()(r,e);var t=te(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,i=e.totalReviews;return r?Object(p.createElement)(h.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(m.Disabled,null,t.showOrderby&&v.I&&Object(p.createElement)(k,{readOnly:!0,value:t.orderby}),Object(p.createElement)(G,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(y,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var oe=function(e){s()(r,e);var t=ne(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(m.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.noReviewsPlaceholder,n=t.categoryIds,o=t.productId,c=t.reviewsOnPageLoad,i=t.showProductName,a=t.showReviewDate,s=t.showReviewerName,l=t.showReviewContent,u=t.showReviewImage,b=t.showReviewRating,d=Object(Z.d)(t.orderby),w=d.order,g=d.orderby;return!(l||b||a||s||u||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(t)},Object(p.createElement)(re,{attributes:t,categoryIds:n,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:r,orderby:g,order:w,productId:o,reviewsToDisplay:c}))}}]),r}(g.Component);t.a=oe},186:function(e,t){},187:function(e,t){},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},236:function(e,t){},237:function(e,t){},238:function(e,t){},239:function(e,t){},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(13),o=r.n(n),c=r(27),i=r.n(c),a=r(1),s=function(){var e=i()(o.a.mark((function e(t){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},41:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(40));t.a=function(e){var t,r,i,a=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=a).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):r:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},42:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0),i=(r(2),r(9)),a=r(8),s=r.n(a);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=r,d=null!=n;return!b&&d?(t=o||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),Object(c.createElement)(t,l,n)):(t=o||i.Fragment,b&&d&&r!==n?Object(c.createElement)(t,l,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,l,r))}},54:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(24),i=r.n(c),a=r(9);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return o})),r.d(t,"I",(function(){return c})),r.d(t,"O",(function(){return i})),r.d(t,"y",(function(){return a})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return l})),r.d(t,"z",(function(){return u})),r.d(t,"C",(function(){return b})),r.d(t,"o",(function(){return d})),r.d(t,"B",(function(){return p})),r.d(t,"n",(function(){return w})),r.d(t,"E",(function(){return g})),r.d(t,"u",(function(){return f})),r.d(t,"w",(function(){return m})),r.d(t,"r",(function(){return v})),r.d(t,"s",(function(){return h})),r.d(t,"t",(function(){return O})),r.d(t,"k",(function(){return j})),r.d(t,"K",(function(){return y})),r.d(t,"P",(function(){return _})),r.d(t,"q",(function(){return k})),r.d(t,"p",(function(){return R})),r.d(t,"H",(function(){return E})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return P})),r.d(t,"S",(function(){return N})),r.d(t,"T",(function(){return x})),r.d(t,"J",(function(){return T})),r.d(t,"a",(function(){return L})),r.d(t,"M",(function(){return D})),r.d(t,"b",(function(){return I})),r.d(t,"L",(function(){return M})),r.d(t,"D",(function(){return A})),r.d(t,"i",(function(){return B})),r.d(t,"N",(function(){return F})),r.d(t,"h",(function(){return z})),r.d(t,"j",(function(){return G})),r.d(t,"G",(function(){return U})),r.d(t,"F",(function(){return W})),r.d(t,"R",(function(){return J})),r.d(t,"Q",(function(){return q})),r.d(t,"d",(function(){return K})),r.d(t,"e",(function(){return Q})),r.d(t,"f",(function(){return X})),r.d(t,"g",(function(){return Y})),r.d(t,"x",(function(){return Z})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));var n=r(3),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),l=Object(n.getSetting)("default_columns",3),u=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),d=Object(n.getSetting)("default_rows",3),p=Object(n.getSetting)("min_height",500),w=Object(n.getSetting)("default_height",500),g=Object(n.getSetting)("placeholderImgSrc",""),f=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),m=Object(n.getSetting)("limitTags"),v=Object(n.getSetting)("hasProducts",!0),h=Object(n.getSetting)("hasTags",!0),O=Object(n.getSetting)("homeUrl",""),j=Object(n.getSetting)("couponsEnabled",!0),y=Object(n.getSetting)("shippingEnabled",!0),_=Object(n.getSetting)("taxesEnabled",!0),k=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),R=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),E=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),P=Object(n.getSetting)("isShippingCalculatorEnabled",!0),C=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),N=Object(n.getSetting)("wcBlocksAssetUrl",""),x=Object(n.getSetting)("wcBlocksBuildUrl",""),T=Object(n.getSetting)("shippingCountries",{}),L=Object(n.getSetting)("allowedCountries",{}),D=Object(n.getSetting)("shippingStates",{}),I=Object(n.getSetting)("allowedStates",{}),M=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("paymentGatewaySortOrder",[]),B=Object(n.getSetting)("checkoutShowLoginReminder",!0),H={id:0,title:"",permalink:""},V=Object(n.getSetting)("storePages",{shop:H,cart:H,checkout:H,privacy:H,terms:H}),F=V.shop.permalink,z=V.checkout.id,G=V.checkout.permalink,U=V.privacy.permalink,W=V.privacy.title,J=V.terms.permalink,q=V.terms.title,K=V.cart.id,Q=V.cart.permalink,X=Object(n.getSetting)("checkoutAllowsGuest",!1),Y=Object(n.getSetting)("checkoutAllowsSignup",!1),Z=Object(n.getSetting)("loginUrl","/wp-login.php"),$=r(23),ee=function(e,t){if(C>2)return Object($.registerBlockType)(e,t)},te=function(e,t){if(C>1)return Object($.registerBlockType)(e,t)},re=function(){return C>2},ne=function(){return C>1}},65:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n=r(19),o=r.n(n),c=r(8),i=r.n(c),a=r(6),s=function(e){if(a.I){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/store/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e){var t=e.className,r=e.categoryIds,n=e.productId,o=e.showReviewDate,c=e.showReviewerName,a=e.showReviewContent,s=e.showProductName,l=e.showReviewImage,u=e.showReviewRating,b="wc-block-all-reviews";return n&&(b="wc-block-reviews-by-product"),Array.isArray(r)&&(b="wc-block-reviews-by-category"),i()(b,t,{"has-image":l,"has-name":c,"has-date":o,"has-rating":u,"has-content":a,"has-product-name":s})},b=function(e){var t=e.categoryIds,r=e.imageType,n=e.orderby,o=e.productId,c={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":e.reviewsOnPageLoad,"data-reviews-on-load-more":e.reviewsOnLoadMore,"data-show-load-more":e.showLoadMore,"data-show-orderby":e.showOrderby};return o&&(c["data-product-id"]=o),Array.isArray(t)&&(c["data-category-ids"]=t.join(",")),c}},68:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(15),s=r.n(a),l=r(12),u=r.n(l),b=r(16),d=r.n(b),p=r(17),w=r.n(p),g=r(10),f=r.n(g),m=r(0),v=r(7),h=r(8),O=r.n(h),j=r(4),y=r(177);r(119);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=f()(e);if(t){var o=f()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return w()(this,r)}}var k=function(e){d()(r,e);var t=_(r);function r(){var e;return i()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(u()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,i=r.instanceId,a=r.className,s=r.help,l=r.options,u=r.value,b="inspector-toggle-button-control-".concat(i);return s&&(e=Object(v.isFunction)(s)?s(c):s),Object(m.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",a)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(m.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isSecondary=!0,c["aria-pressed"]=!1),Object(m.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),r}(m.Component);t.a=Object(y.a)(k)},7:function(e,t){!function(){e.exports=this.lodash}()},823:function(e,t,r){e.exports=r(900)},87:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(54)),i=r(138),a=r(8),s=r.n(a),l=r(4),u=r(41);r(140);t.a=function(e){var t=e.className,r=e.error,a=e.isLoading,b=e.onRetry;return Object(n.createElement)(l.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:i.a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",t)},Object(n.createElement)(u.a,{error:r}),b&&Object(n.createElement)(n.Fragment,null,a?Object(n.createElement)(l.Spinner,null):Object(n.createElement)(l.Button,{isSecondary:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},9:function(e,t){!function(){e.exports=this.React}()},900:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r.n(n),c=r(0),i=r(1),a=r(23),s=r(54),l=r(31),u=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M15 4v7H5.17l-.59.59-.58.58V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"})),b=(r(186),r(22)),d=r(4),p=(r(2),r(173)),w=function(){return Object(c.createElement)(d.Placeholder,{className:"wc-block-all-reviews",icon:Object(c.createElement)(s.a,{srcElement:u,className:"block-editor-block-icon"}),label:Object(i.__)("All Reviews","woo-gutenberg-products-block")},Object(i.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"))},g=r(129),f=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(b.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(d.ToggleControl,{label:Object(i.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(g.b)(t,r)),Object(c.createElement)(d.PanelBody,{title:Object(i.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,r))),Object(c.createElement)(p.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},m=r(168),v=r(169),h=r(147);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(a.registerBlockType)("woocommerce/all-reviews",{title:Object(i.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(s.a,{srcElement:u}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Show a list of all product reviews.","woo-gutenberg-products-block"),supports:{html:!1},example:j(j({},h.a),{},{attributes:j(j({},h.a.attributes),{},{showProductName:!0})}),attributes:j(j({},m.a),{},{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(f,e)},save:v.a})}});
|
build/atomic-block-components/add-to-cart--atomic-block-components/button.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{130:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(0),c=n(21),i=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),o=function(){return Object(r.useContext)(i)},a=function(e){var t=e.children,n=e.currentPostId,o=void 0===n?0:n,a=e.previewData,s=void 0===a?{}:a,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return o||e("core/editor").getCurrentPostId()}),[o]),previewData:s};return Object(r.createElement)(i.Provider,{value:u},t)}},144:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),c=n.n(r),i=n(199),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var e=Object(i.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,c=e.createSnackbarNotice,a=e.setIsSuppressed,u=Object(o.useRef)(t);Object(o.useEffect)((function(){u.current=t}),[t]);var l=Object(o.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),d=Object(o.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[n,c]);return s(s(s({notices:t},l),d),{},{setIsSuppressed:a})}},172:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(5),c=n.n(r),i=n(38),o=n(21),a=n(130),s=n(29),u=n(8);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},p=d(d({},f),{},{email:"",phone:""}),b=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},v={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:p,shippingAddress:f,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(a.b)(),n=t.isEditor,r=t.previewData,c=(null==r?void 0:r.previewCart)||{},s=e.shouldSelect,u=Object(o.useSelect)((function(e,t){var r=t.dispatch;if(!s)return v;if(n)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:p,shippingAddress:f,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var o=e(i.CART_STORE_KEY),a=o.getCartData(),u=o.getCartErrors(),l=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),g=r(i.CART_STORE_KEY).receiveCart,O=b(a.billingAddress),h=a.needsShipping?b(a.shippingAddress):O;return{cartCoupons:a.coupons,cartItems:a.items||[],cartFees:a.fees||[],cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors||[],cartTotals:l,cartIsLoading:d,cartErrors:u,billingAddress:O,shippingAddress:h,extensions:a.extensions||{},shippingRates:a.shippingRates||[],shippingRatesLoading:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements||[],receiveCart:g}}),[s]);return u}},199:function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return O}));var r=n(5),c=n.n(r),i=n(18),o=n.n(i),a=n(0),s=(n(2),n(21)),u=n(311),l=n(972),d=n(144),f=n(130),p=function(){var e=Object(f.b)().isEditor,t=Object(d.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var c=n.filter((function(e){return"snackbar"===e.type}));return Object(a.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:r})};function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(a.useContext)(m)},O=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=e.createNoticeContainer,i=void 0===c||c,l=e.context,d=void 0===l?"wc/core":l,f=Object(s.useDispatch)("core/notices"),b=f.createNotice,g=f.removeNotice,O=Object(a.useState)(!1),h=o()(O,2),j=h[0],w=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};b(e,t,v(v({},n),{},{context:n.context||d}))}),[b,d]),E=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;g(e,t)}),[g,d]),N=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,v(v({},t),{},{type:"snackbar"}))}),[y]),C={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(d)}}),[d]).notices,createNotice:y,createSnackbarNotice:N,removeNotice:E,context:d,setIsSuppressed:w},S=j?null:Object(a.createElement)(u.a,{className:r,notices:C.notices}),P=j?null:Object(a.createElement)(p,null);return Object(a.createElement)(m.Provider,{value:C},i&&S,t,P)}},247:function(e,t){},277:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(25),o=n.n(i),a=n(0),s=n(32),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=void 0===n?20:n,i=o()(e,["className","size"]);return Object(a.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},i),Object(a.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=n(293);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(a.cloneElement)(t,{size:e.size||20,className:e.className}):null}},293:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(25),o=n.n(i),a=n(0),s=n(32),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},311:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(0),o=(n(2),n(9)),a=n.n(o),s=n(409),u=n(199),l=(n(247),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,o=n.filter((function(e){return"snackbar"!==e.type}));if(!o.length)return null;var d=a()(t,"wc-block-components-notices");return Object(i.createElement)("div",{className:d},o.map((function(e){return Object(i.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},558:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var r=window.Event||null,c=function(e,t){var n=t.bubbles,c=void 0!==n&&n,i=t.cancelable,o=void 0!==i&&i,a=t.element;if(a||(a=document.body),"function"==typeof r){var s=new r(e,{bubbles:c,cancelable:o});a.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,o),a.dispatchEvent(u)}},i=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var i=function(){c(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,i),function(){return jQuery(document).off(e,i)}}},872:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(18),c=n.n(r),i=n(0),o=n(21),a=n(38),s=n(29),u=n(144),l=n(172),d=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},f=function(e){var t=Object(o.useDispatch)(a.CART_STORE_KEY).addItemToCart,n=Object(l.a)(),r=n.cartItems,f=n.cartIsLoading,p=Object(u.a)(),b=p.addErrorNotice,v=p.removeNotice,m=Object(i.useState)(!1),g=c()(m,2),O=g[0],h=g[1],j=Object(i.useRef)(d(r,e));return Object(i.useEffect)((function(){var t=d(r,e);t!==j.current&&(j.current=t)}),[r,e]),{cartQuantity:Number.isFinite(j.current)?j.current:0,addingToCart:O,cartIsLoading:f,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;h(!0),t(e,n).then((function(e){!0===e&&v("add-to-cart")})).catch((function(e){b(Object(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){h(!1)}))}}}}}]);
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{121:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(0),c=n(21),i=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),o=function(){return Object(r.useContext)(i)},a=function(e){var t=e.children,n=e.currentPostId,o=void 0===n?0:n,a=e.previewData,s=void 0===a?{}:a,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return o||e("core/editor").getCurrentPostId()}),[o]),previewData:s};return Object(r.createElement)(i.Provider,{value:u},t)}},134:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),c=n.n(r),i=n(175),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var e=Object(i.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,c=e.createSnackbarNotice,a=e.setIsSuppressed,u=Object(o.useRef)(t);Object(o.useEffect)((function(){u.current=t}),[t]);var l=Object(o.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),d=Object(o.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[n,c]);return s(s(s({notices:t},l),d),{},{setIsSuppressed:a})}},155:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(5),c=n.n(r),i=n(37),o=n(21),a=n(121),s=n(28),u=n(7);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},p=d(d({},f),{},{email:"",phone:""}),b=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},v={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:p,shippingAddress:f,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(a.b)(),n=t.isEditor,r=t.previewData,c=(null==r?void 0:r.previewCart)||{},s=e.shouldSelect,u=Object(o.useSelect)((function(e,t){var r=t.dispatch;if(!s)return v;if(n)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:p,shippingAddress:f,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var o=e(i.CART_STORE_KEY),a=o.getCartData(),u=o.getCartErrors(),l=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),g=r(i.CART_STORE_KEY).receiveCart,O=b(a.billingAddress),h=a.needsShipping?b(a.shippingAddress):O;return{cartCoupons:a.coupons,cartItems:a.items||[],cartFees:a.fees||[],cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors||[],cartTotals:l,cartIsLoading:d,cartErrors:u,billingAddress:O,shippingAddress:h,extensions:a.extensions||{},shippingRates:a.shippingRates||[],shippingRatesLoading:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements||[],receiveCart:g}}),[s]);return u}},175:function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return O}));var r=n(5),c=n.n(r),i=n(18),o=n.n(i),a=n(0),s=(n(2),n(21)),u=n(279),l=n(931),d=n(134),f=n(121),p=function(){var e=Object(f.b)().isEditor,t=Object(d.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var c=n.filter((function(e){return"snackbar"===e.type}));return Object(a.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:r})};function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(a.useContext)(m)},O=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=e.createNoticeContainer,i=void 0===c||c,l=e.context,d=void 0===l?"wc/core":l,f=Object(s.useDispatch)("core/notices"),b=f.createNotice,g=f.removeNotice,O=Object(a.useState)(!1),h=o()(O,2),j=h[0],w=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};b(e,t,v(v({},n),{},{context:n.context||d}))}),[b,d]),E=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;g(e,t)}),[g,d]),N=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,v(v({},t),{},{type:"snackbar"}))}),[y]),C={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(d)}}),[d]).notices,createNotice:y,createSnackbarNotice:N,removeNotice:E,context:d,setIsSuppressed:w},S=j?null:Object(a.createElement)(u.a,{className:r,notices:C.notices}),P=j?null:Object(a.createElement)(p,null);return Object(a.createElement)(m.Provider,{value:C},i&&S,t,P)}},216:function(e,t){},246:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),s=n(31),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=void 0===n?20:n,i=o()(e,["className","size"]);return Object(a.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},i),Object(a.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=n(261);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(a.cloneElement)(t,{size:e.size||20,className:e.className}):null}},261:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),s=n(31),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},279:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(0),o=(n(2),n(8)),a=n.n(o),s=n(375),u=n(175),l=(n(216),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,o=n.filter((function(e){return"snackbar"!==e.type}));if(!o.length)return null;var d=a()(t,"wc-block-components-notices");return Object(i.createElement)("div",{className:d},o.map((function(e){return Object(i.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},523:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var r=window.Event||null,c=function(e,t){var n=t.bubbles,c=void 0!==n&&n,i=t.cancelable,o=void 0!==i&&i,a=t.element;if(a||(a=document.body),"function"==typeof r){var s=new r(e,{bubbles:c,cancelable:o});a.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,o),a.dispatchEvent(u)}},i=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var i=function(){c(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,i),function(){return jQuery(document).off(e,i)}}},837:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(18),c=n.n(r),i=n(0),o=n(21),a=n(37),s=n(28),u=n(134),l=n(155),d=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},f=function(e){var t=Object(o.useDispatch)(a.CART_STORE_KEY).addItemToCart,n=Object(l.a)(),r=n.cartItems,f=n.cartIsLoading,p=Object(u.a)(),b=p.addErrorNotice,v=p.removeNotice,m=Object(i.useState)(!1),g=c()(m,2),O=g[0],h=g[1],j=Object(i.useRef)(d(r,e));return Object(i.useEffect)((function(){var t=d(r,e);t!==j.current&&(j.current=t)}),[r,e]),{cartQuantity:Number.isFinite(j.current)?j.current:0,addingToCart:O,cartIsLoading:f,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;h(!0),t(e,n).then((function(e){!0===e&&v("add-to-cart")})).catch((function(e){b(Object(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){h(!1)}))}}}}}]);
|
build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],{932:function(e,n,a){"use strict";var c=a(11),r=a.n(c),t=a(0),o=function(e,n){var a=[];return Object.keys(e).forEach((function(c){if(void 0!==n[c])switch(e[c].type){case"boolean":a[c]="false"!==n[c]&&!1!==n[c];break;case"number":a[c]=parseInt(n[c],10);break;case"array":case"object":a[c]=JSON.parse(n[c]);break;default:a[c]=n[c]}else a[c]=e[c].default})),a};n.a=function(e){return function(n){return function(a){var c=o(e,a);return Object(t.createElement)(n,r()({},a,c))}}}}}]);
|
build/atomic-block-components/add-to-cart-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{111:function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r(7),a=r.n(n),c=r(15),o=r(12),s=r(76),i=r(23),u=r(8);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},p=d(d({},f),{},{email:"",phone:""}),b=function(e){return Object(u.mapValues)(e,(function(e){return Object(i.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:p,shippingAddress:f,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(s.a)(),r=t.isEditor,n=t.previewData,a=(null==n?void 0:n.previewCart)||{},i=e.shouldSelect,u=Object(o.useSelect)((function(e,t){var n=t.dispatch;if(!i)return m;if(r)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:[],cartTotals:a.totals,cartIsLoading:!1,cartErrors:[],billingAddress:p,shippingAddress:f,extensions:{},shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:function(){}};var o=e(c.CART_STORE_KEY),s=o.getCartData(),u=o.getCartErrors(),l=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),v=o.isCustomerDataUpdating(),h=n(c.CART_STORE_KEY).receiveCart,g=b(s.billingAddress),y=s.needsShipping?b(s.shippingAddress):g;return{cartCoupons:s.coupons,cartItems:s.items||[],cartFees:s.fees||[],cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors||[],cartTotals:l,cartIsLoading:d,cartErrors:u,billingAddress:g,shippingAddress:y,extensions:s.extensions||{},shippingRates:s.shippingRates||[],shippingRatesLoading:v,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements||[],receiveCart:h}}),[i]);return u}},113:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(7),a=r.n(n),c=r(8);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,c=t.id,o=t.callback,l=t.priority,d=new Map(e[n]);switch(r){case i:return d.set(c,{priority:l,callback:o}),s(s({},e),{},a()({},n,d));case u:return d.delete(c),s(s({},e),{},a()({},n,d))}return e}},137:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},a={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},o=function(e){return n(e,a.SUCCESS)},s=function(e){return n(e,a.ERROR)},i=function(e){return n(e,a.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:a,noticeContexts:c,shouldRetry:u,isSuccessResponse:o,isErrorResponse:s,isFailResponse:i}}},154:function(e,t){},155:function(e,t){},181:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(78),a=(r(3),r(154),function(e){var t=e.errorMessage,r=void 0===t?"":t,a=e.propertyName,c=void 0===a?"":a,o=e.elementId,s=void 0===o?"":o,i=Object(n.b)(),u=i.getValidationError,l=i.getValidationErrorId;if(!r){var d=u(c)||{};if(!d.message||d.hidden)return null;r=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(s)},r))})},190:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},205:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(113),a=function(e,t){return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=n.a.addEventCallback(e,r,a);return t(c),function(){t(n.a.removeEventCallback(e,c.id))}}}},206:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var n=r(26),a=r.n(n),c=r(29),o=r.n(c),s=r(47),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=[],i=u(c),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:p=e.sent,"object"===o()(p)&&s.push(p),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),p=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=u(c),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===o()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},280:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o}));var n=window.Event||null,a=function(e,t){var r=t.bubbles,a=void 0!==r&&r,c=t.cancelable,o=void 0!==c&&c,s=t.element;if(s||(s=document.body),"function"==typeof n){var i=new n(e,{bubbles:a,cancelable:o});s.dispatchEvent(i)}else{var u=document.createEvent("Event");u.initEvent(e,a,o),s.dispatchEvent(u)}},c=function(){a("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var c=function(){a(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},281:function(e,t,r){"use strict";var n=r(28),a=React.createElement(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},288:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(190);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},295:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(10),a=r.n(n),c=r(0),o=r(12),s=r(15),i=r(23),u=r(87),l=r(111),d=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},f=function(e){var t=Object(o.useDispatch)(s.CART_STORE_KEY).addItemToCart,r=Object(l.a)(),n=r.cartItems,f=r.cartIsLoading,p=Object(u.a)(),b=p.addErrorNotice,m=p.removeNotice,v=Object(c.useState)(!1),h=a()(v,2),g=h[0],y=h[1],O=Object(c.useRef)(d(n,e));return Object(c.useEffect)((function(){var t=d(n,e);t!==O.current&&(O.current=t)}),[n,e]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:g,cartIsLoading:f,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;y(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){b(Object(i.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){y(!1)}))}}}},301:function(e,t){},302:function(e,t){},311:function(e,t,r){"use strict";r.r(t);var n=r(288),a=(r(3),r(5)),c=r.n(a),o=r(10),s=r.n(o),i=r(0),u=r(1),l=r(38),d=r(87),f=r(137),p=function(e){return e.is_purchasable||!1},b="pristine",m="idle",v="disabled",h="processing",g="before_processing",y="after_processing",O={status:b,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},j="set_pristine",E="set_idle",w="set_disabled",P="set_processing",k="set_before_processing",R="set_after_processing",_="set_processing_response",C="set_has_error",S="set_no_error",A="set_quantity",x="set_request_params",D=j,T=E,I=w,N=P,q=k,V=R,F=_,Q=C,W=S,B=A,L=x,M=function(){return{type:D}},H=function(){return{type:T}},Y=function(){return{type:I}},U=function(){return{type:N}},J=function(){return{type:q}},K=function(){return{type:V}},z=function(e){return{type:F,data:e}},G=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?Q:W;return{type:t}},X=function(e){return{type:B,quantity:e}},$=function(e){return{type:L,data:e}},Z=r(7),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=j,ae=E,ce=w,oe=P,se=k,ie=R,ue=_,le=C,de=S,fe=A,pe=x,be=b,me=m,ve=v,he=h,ge=g,ye=y,Oe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,a=r.type,c=r.data;switch(a){case ne:e=O;break;case ae:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case ce:e=t.status!==ve?re(re({},t),{},{status:ve}):t;break;case fe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case pe:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),c)});break;case ue:e=re(re({},t),{},{processingResponse:c});break;case oe:e=!1===(e=t.status!==he?re(re({},t),{},{status:he,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case se:e=t.status!==ge?re(re({},t),{},{status:ge,hasError:!1}):t;break;case ie:e=t.status!==ye?re(re({},t),{},{status:ye}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===he||t.status===ge?re(re({},e),{},{status:me}):e;break;case de:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&a!==ne&&e.status===be&&(e.status=me),e},je=r(113),Ee=r(205),we="add_to_cart_before_processing",Pe="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",Re=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Ee.a)(Pe,e),onAddToCartProcessingWithError:Object(Ee.a)(ke,e),onAddToCartBeforeProcessing:Object(Ee.a)(we,e)}},_e=r(206),Ce=r(78),Se=Object(i.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ae=function(){return Object(i.useContext)(Se)},xe=function(e){var t=e.children,r=e.product,n=e.showFormElements,a=Object(i.useReducer)(Oe,O),c=s()(a,2),o=c[0],b=c[1],j=Object(i.useReducer)(je.b,{}),E=s()(j,2),w=E[0],P=E[1],k=Object(l.a)(w),R=Object(d.a)(),_=R.addErrorNotice,C=R.removeNotices,S=Object(Ce.b)().setValidationErrors,A=Object(f.a)(),x=A.isSuccessResponse,D=A.isErrorResponse,T=A.isFailResponse,I=Object(i.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Re(P).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Re(P).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Re(P).onAddToCartBeforeProcessing}}),[P]),N=Object(i.useMemo)((function(){return{resetForm:function(){b(M())},submitForm:function(){b(J())},setQuantity:function(e){b(X(e))},setHasError:function(e){b(G(e))},setRequestParams:function(e){b($(e))},setAfterProcessing:function(e){b(z(e)),b(K())}}}),[]);Object(i.useEffect)((function(){var e=o.status,t=!r.id||!p(r);e!==v||t?e!==v&&t&&b(Y()):b(H())}),[o.status,r,b]),Object(i.useEffect)((function(){o.status===g&&(C("error"),Object(_e.a)(k,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&_(t),r&&S(r)})),b(H())):b(U())})))}),[o.status,S,_,C,b,k]),Object(i.useEffect)((function(){if(o.status===y){var e={processingResponse:o.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;_(e.message,t)}};if(o.hasError)return void Object(_e.b)(k,ke,e).then((function(r){if(D(r)||T(r))t(r);else{var n,a=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");_(a,{id:"add-to-cart"})}b(H())}));Object(_e.b)(k,Pe,e).then((function(e){D(e)||T(e)?(t(e),b(G(!0))):b(H())}))}}),[o.status,o.hasError,o.processingResponse,N,_,D,T,x,k]);var q=function(e){return["simple","variable"].includes(e.type||"simple")}(r),V={product:r,productType:r.type||"simple",productIsPurchasable:p(r),productHasOptions:r.has_options||!1,supportsFormElements:q,showFormElements:n&&q,quantity:o.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:o.requestParams,isIdle:o.status===m,isDisabled:o.status===v,isProcessing:o.status===h,isBeforeProcessing:o.status===g,isAfterProcessing:o.status===y,hasError:o.hasError,eventRegistration:I,dispatchActions:N};return React.createElement(Se.Provider,{value:V},t)},De=r(50),Te=r.n(De),Ie=r(111),Ne=r(23),qe=r(280);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Fe=function(){var e=Ae(),t=e.dispatchActions,r=e.product,n=e.quantity,a=e.eventRegistration,c=e.hasError,o=e.isProcessing,l=e.requestParams,f=Object(Ce.b)(),p=f.hasValidationErrors,b=f.showAllValidationErrors,m=Object(d.a)(),v=m.addErrorNotice,h=m.removeNotice,g=Object(Ie.a)().receiveCart,y=Object(i.useState)(!1),O=s()(y,2),j=O[0],E=O[1],w=!c&&o,P=Object(i.useCallback)((function(){return!p||(b(),{type:"error"})}),[p,b]);Object(i.useEffect)((function(){var e=a.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[a,P]);var k=Object(i.useCallback)((function(){E(!0),h("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:n},l);Te()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Te.a.setNonce(e.headers),e.json().then((function(r){e.ok?g(r):(r.body&&r.body.message?v(Object(Ne.decodeEntities)(r.body.message),{id:"add-to-cart"}):v(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(qe.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&g(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,v,h,g,t,n,l]);return Object(i.useEffect)((function(){w&&!j&&k()}),[w,k,j]),null},Qe=function(e){var t=e.children,r=e.product,n=e.showFormElements;return React.createElement(Ce.a,null,React.createElement(xe,{product:r,showFormElements:n},t,React.createElement(Fe,null)))},We=r(79),Be=r(8),Le=r(200),Me=(r(301),r(84)),He=r(129),Ye=r(281),Ue=r(295),Je=function(e){var t=e.className,r=e.href,n=e.text;return React.createElement(Me.a,{className:t,href:r,rel:"nofollow"},n)},Ke=function(e){var t=e.className,r=e.quantityInCart,n=e.isProcessing,a=e.isDisabled,c=e.isDone,o=e.onClick;return React.createElement(Me.a,{className:t,disabled:a,showSpinner:n,onClick:o},c&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!c&&React.createElement(He.a,{srcElement:Ye.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},ze=function(){var e=Ae(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,a=e.product,c=e.productType,o=e.isDisabled,l=e.isProcessing,d=e.eventRegistration,f=e.hasError,p=e.dispatchActions,b=Object(Ue.a)(a.id||0).cartQuantity,m=Object(i.useState)(!1),v=s()(m,2),h=v[0],g=v[1],y=a.add_to_cart||{url:"",text:""};return Object(i.useEffect)((function(){var e=d.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[d,f]),(t||!n&&"simple"===c)&&r?React.createElement(Ke,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:b,isDisabled:o,isProcessing:l,isDone:h,onClick:function(){return p.submitForm()}}):React.createElement(Je,{className:"wc-block-components-product-add-to-cart-button",href:y.url,text:y.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=function(e){var t=e.disabled,r=e.min,n=e.max,a=e.value,c=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){c(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(u.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ae(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement(Xe,null):t.id&&!t.is_in_stock?React.createElement(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Ge,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(ze,null))},Ze=(r(302),r(44)),et=r.n(Ze),tt=r(204),rt=r(2),nt=r(181),at={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,a=e.value,o=void 0===a?"":a,s=e.onChange,i=void 0===s?function(){}:s,l=e.errorMessage,d=void 0===l?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):l,f=Object(Ce.b)(),p=f.getValidationError,b=f.setValidationErrors,m=f.clearValidationError,v=t,h=p(v)||{};return Object(rt.useEffect)((function(){o?m(v):b(ee()({},v,{message:d,hidden:!0}))}),[o,v,d,m,b]),Object(rt.useEffect)((function(){return function(){m(v)}}),[v,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement(tt.SelectControl,{label:Object(Ne.decodeEntities)(t),value:o||"",options:[at].concat(et()(n)),onChange:i,required:!0,className:c()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),React.createElement(nt.a,{propertyName:v,elementId:v}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var a=Object.keys(e);return n.filter((function(e){return a.every((function(n){var a=r[n]||"",c=t["id:"+e].attributes[n];return""===a||(null===c||c===a)}))}))},ut=function(e,t,r){var n={},a=Object.keys(e),c=Object.values(r).filter(Boolean).length>0;return a.forEach((function(a){var o=e[a],s=st(st({},r),{},ee()({},a,null)),i=c?it(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[a]})):null;n[a]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Ne.decodeEntities)(r)}:null})).filter(Boolean)}(o.terms,u)})),n};function lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ft=function(e){var t=e.attributes,r=e.variationAttributes,n=e.setRequestParams,a=Object(l.a)(t),c=Object(l.a)(r),o=Object(i.useState)(0),u=s()(o,2),d=u[0],f=u[1],p=Object(i.useState)({}),b=s()(p,2),m=b[0],v=b[1],h=Object(i.useMemo)((function(){return ut(a,c,m)}),[m,a,c]);return Object(i.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(a).length?f(function(e,t,r){return it(e,t,r)[0]||0}(a,c,m)):d>0&&f(0)}),[m,d,a,c]),Object(i.useEffect)((function(){n({id:d,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[n,d,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map((function(e){return React.createElement(ct,{key:e,attributeName:e,options:h[e],value:m[e],onChange:function(t){v(dt(dt({},m),{},ee()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(Be.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),a=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(n).length||0===a.length?null:React.createElement(ft,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},bt=function(){var e=Ae(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement(Xe,null):t.id&&!t.is_in_stock?React.createElement(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(pt,{product:t,dispatchers:c}),React.createElement(Ge,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(ze,null))},mt=function(){return React.createElement(ze,null)},vt=function(){return React.createElement(tt.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},ht=function(){return React.createElement(vt,null)},gt=function(){var e=Ae(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(bt,null):"grouped"===r?React.createElement(ht,null):"external"===r?React.createElement(mt,null):"simple"===r||"variation"===r?React.createElement($e,null):null:React.createElement(ze,null)},yt=Object(Le.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(We.useProductDataContext)().product,a=c()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Be.isEmpty)(n)});return React.createElement(Qe,{product:n,showFormElements:r},React.createElement("div",{className:a},React.createElement(gt,null)))})),Ot={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}};t.default=Object(n.a)(Ot)(yt)},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),a=r(22),c=r.n(a),o=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},44:function(e,t,r){var n=r(94),a=r(95),c=r(58),o=r(96);e.exports=function(e){return n(e)||a(e)||c(e)||o()}},47:function(e,t){function r(e,t,r,n,a,c,o){try{var s=e[c](o),i=s.value}catch(e){return void r(e)}s.done?t(i):Promise.resolve(i).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var o=e.apply(t,n);function s(e){r(o,a,c,s,i,"next",e)}function i(e){r(o,a,c,s,i,"throw",e)}s(void 0)}))}}},78:function(e,t,r){"use strict";r.d(t,"b",(function(){return y})),r.d(t,"a",(function(){return O}));var n=r(29),a=r.n(n),c=r(7),o=r.n(c),s=r(14),i=r.n(s),u=r(10),l=r.n(u),d=r(0),f=r(8),p=r(22),b=r.n(p);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e){var t=function(e,t){if("object"!==a()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a()(t)?t:String(t)}var g=Object(d.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),y=function(){return Object(d.useContext)(g)},O=function(e){var t=e.children,r=Object(d.useState)({}),n=l()(r,2),a=n[0],c=n[1],s=Object(d.useCallback)((function(e){return a[e]}),[a]),u=Object(d.useCallback)((function(e){var t=a[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[a]),p=Object(d.useCallback)((function(e){c((function(t){if(!t[e])return t;t[e];return i()(t,[e].map(h))}))}),[]),m=Object(d.useCallback)((function(){c({})}),[]),y=Object(d.useCallback)((function(e){e&&c((function(t){return e=Object(f.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!b()(t[r],e))})),0===Object.values(e).length?t:v(v({},t),e)}))}),[]),O=Object(d.useCallback)((function(e,t){c((function(r){if(!r.hasOwnProperty(e))return r;var n=v(v({},r[e]),t);return b()(r[e],n)?r:v(v({},r),{},o()({},e,n))}))}),[]),j={getValidationError:s,setValidationErrors:y,clearValidationError:p,clearAllValidationErrors:m,hideValidationError:Object(d.useCallback)((function(e){O(e,{hidden:!0})}),[O]),showValidationError:Object(d.useCallback)((function(e){O(e,{hidden:!1})}),[O]),showAllValidationErrors:Object(d.useCallback)((function(){c((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=v(v({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:v(v({},e),t)}))}),[]),hasValidationErrors:Object.keys(a).length>0,getValidationErrorId:u};return React.createElement(g.Provider,{value:j},t)}},84:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(14),o=r.n(c),s=r(67),i=(r(3),r(5)),u=r.n(i);r(155);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,c=e.children,i=o()(e,["className","showSpinner","children"]),l=u()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return React.createElement(s.a,a()({className:l},i),n&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},94:function(e,t,r){var n=r(59);e.exports=function(e){if(Array.isArray(e))return n(e)}},95:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},96:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}}}]);
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{112:function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r(7),a=r.n(n),c=r(15),o=r(12),s=r(77),i=r(22),u=r(8);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},p=d(d({},f),{},{email:"",phone:""}),b=function(e){return Object(u.mapValues)(e,(function(e){return Object(i.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:p,shippingAddress:f,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(s.a)(),r=t.isEditor,n=t.previewData,a=(null==n?void 0:n.previewCart)||{},i=e.shouldSelect,u=Object(o.useSelect)((function(e,t){var n=t.dispatch;if(!i)return m;if(r)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:[],cartTotals:a.totals,cartIsLoading:!1,cartErrors:[],billingAddress:p,shippingAddress:f,extensions:{},shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:function(){}};var o=e(c.CART_STORE_KEY),s=o.getCartData(),u=o.getCartErrors(),l=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),v=o.isCustomerDataUpdating(),h=n(c.CART_STORE_KEY).receiveCart,g=b(s.billingAddress),y=s.needsShipping?b(s.shippingAddress):g;return{cartCoupons:s.coupons,cartItems:s.items||[],cartFees:s.fees||[],cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors||[],cartTotals:l,cartIsLoading:d,cartErrors:u,billingAddress:g,shippingAddress:y,extensions:s.extensions||{},shippingRates:s.shippingRates||[],shippingRatesLoading:v,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements||[],receiveCart:h}}),[i]);return u}},114:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(7),a=r.n(n),c=r(8);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,c=t.id,o=t.callback,l=t.priority,d=new Map(e[n]);switch(r){case i:return d.set(c,{priority:l,callback:o}),s(s({},e),{},a()({},n,d));case u:return d.delete(c),s(s({},e),{},a()({},n,d))}return e}},138:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},a={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},o=function(e){return n(e,a.SUCCESS)},s=function(e){return n(e,a.ERROR)},i=function(e){return n(e,a.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:a,noticeContexts:c,shouldRetry:u,isSuccessResponse:o,isErrorResponse:s,isFailResponse:i}}},155:function(e,t){},156:function(e,t){},182:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(79),a=(r(3),r(155),function(e){var t=e.errorMessage,r=void 0===t?"":t,a=e.propertyName,c=void 0===a?"":a,o=e.elementId,s=void 0===o?"":o,i=Object(n.b)(),u=i.getValidationError,l=i.getValidationErrorId;if(!r){var d=u(c)||{};if(!d.message||d.hidden)return null;r=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(s)},r))})},191:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},205:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(114),a=function(e,t){return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=n.a.addEventCallback(e,r,a);return t(c),function(){t(n.a.removeEventCallback(e,c.id))}}}},206:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var n=r(25),a=r.n(n),c=r(27),o=r.n(c),s=r(48),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=[],i=u(c),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:p=e.sent,"object"===o()(p)&&s.push(p),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),p=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=u(c),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===o()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},279:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o}));var n=window.Event||null,a=function(e,t){var r=t.bubbles,a=void 0!==r&&r,c=t.cancelable,o=void 0!==c&&c,s=t.element;if(s||(s=document.body),"function"==typeof n){var i=new n(e,{bubbles:a,cancelable:o});s.dispatchEvent(i)}else{var u=document.createEvent("Event");u.initEvent(e,a,o),s.dispatchEvent(u)}},c=function(){a("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var c=function(){a(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},280:function(e,t,r){"use strict";var n=r(28),a=React.createElement(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},286:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(191);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},293:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(10),a=r.n(n),c=r(0),o=r(12),s=r(15),i=r(22),u=r(88),l=r(112),d=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},f=function(e){var t=Object(o.useDispatch)(s.CART_STORE_KEY).addItemToCart,r=Object(l.a)(),n=r.cartItems,f=r.cartIsLoading,p=Object(u.a)(),b=p.addErrorNotice,m=p.removeNotice,v=Object(c.useState)(!1),h=a()(v,2),g=h[0],y=h[1],O=Object(c.useRef)(d(n,e));return Object(c.useEffect)((function(){var t=d(n,e);t!==O.current&&(O.current=t)}),[n,e]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:g,cartIsLoading:f,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;y(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){b(Object(i.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){y(!1)}))}}}},299:function(e,t){},300:function(e,t){},309:function(e,t,r){"use strict";r.r(t);var n=r(286),a=(r(3),r(5)),c=r.n(a),o=r(10),s=r.n(o),i=r(0),u=r(1),l=r(39),d=r(88),f=r(138),p=function(e){return e.is_purchasable||!1},b="pristine",m="idle",v="disabled",h="processing",g="before_processing",y="after_processing",O={status:b,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},j="set_pristine",E="set_idle",w="set_disabled",P="set_processing",k="set_before_processing",R="set_after_processing",_="set_processing_response",C="set_has_error",S="set_no_error",A="set_quantity",x="set_request_params",D=j,T=E,I=w,N=P,q=k,V=R,F=_,Q=C,W=S,B=A,L=x,M=function(){return{type:D}},H=function(){return{type:T}},Y=function(){return{type:I}},U=function(){return{type:N}},J=function(){return{type:q}},K=function(){return{type:V}},z=function(e){return{type:F,data:e}},G=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?Q:W;return{type:t}},X=function(e){return{type:B,quantity:e}},$=function(e){return{type:L,data:e}},Z=r(7),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=j,ae=E,ce=w,oe=P,se=k,ie=R,ue=_,le=C,de=S,fe=A,pe=x,be=b,me=m,ve=v,he=h,ge=g,ye=y,Oe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,a=r.type,c=r.data;switch(a){case ne:e=O;break;case ae:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case ce:e=t.status!==ve?re(re({},t),{},{status:ve}):t;break;case fe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case pe:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),c)});break;case ue:e=re(re({},t),{},{processingResponse:c});break;case oe:e=!1===(e=t.status!==he?re(re({},t),{},{status:he,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case se:e=t.status!==ge?re(re({},t),{},{status:ge,hasError:!1}):t;break;case ie:e=t.status!==ye?re(re({},t),{},{status:ye}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===he||t.status===ge?re(re({},e),{},{status:me}):e;break;case de:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&a!==ne&&e.status===be&&(e.status=me),e},je=r(114),Ee=r(205),we="add_to_cart_before_processing",Pe="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",Re=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Ee.a)(Pe,e),onAddToCartProcessingWithError:Object(Ee.a)(ke,e),onAddToCartBeforeProcessing:Object(Ee.a)(we,e)}},_e=r(206),Ce=r(79),Se=Object(i.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ae=function(){return Object(i.useContext)(Se)},xe=function(e){var t=e.children,r=e.product,n=e.showFormElements,a=Object(i.useReducer)(Oe,O),c=s()(a,2),o=c[0],b=c[1],j=Object(i.useReducer)(je.b,{}),E=s()(j,2),w=E[0],P=E[1],k=Object(l.a)(w),R=Object(d.a)(),_=R.addErrorNotice,C=R.removeNotices,S=Object(Ce.b)().setValidationErrors,A=Object(f.a)(),x=A.isSuccessResponse,D=A.isErrorResponse,T=A.isFailResponse,I=Object(i.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Re(P).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Re(P).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Re(P).onAddToCartBeforeProcessing}}),[P]),N=Object(i.useMemo)((function(){return{resetForm:function(){b(M())},submitForm:function(){b(J())},setQuantity:function(e){b(X(e))},setHasError:function(e){b(G(e))},setRequestParams:function(e){b($(e))},setAfterProcessing:function(e){b(z(e)),b(K())}}}),[]);Object(i.useEffect)((function(){var e=o.status,t=!r.id||!p(r);e!==v||t?e!==v&&t&&b(Y()):b(H())}),[o.status,r,b]),Object(i.useEffect)((function(){o.status===g&&(C("error"),Object(_e.a)(k,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&_(t),r&&S(r)})),b(H())):b(U())})))}),[o.status,S,_,C,b,k]),Object(i.useEffect)((function(){if(o.status===y){var e={processingResponse:o.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;_(e.message,t)}};if(o.hasError)return void Object(_e.b)(k,ke,e).then((function(r){if(D(r)||T(r))t(r);else{var n,a=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");_(a,{id:"add-to-cart"})}b(H())}));Object(_e.b)(k,Pe,e).then((function(e){D(e)||T(e)?(t(e),b(G(!0))):b(H())}))}}),[o.status,o.hasError,o.processingResponse,N,_,D,T,x,k]);var q=function(e){return["simple","variable"].includes(e.type||"simple")}(r),V={product:r,productType:r.type||"simple",productIsPurchasable:p(r),productHasOptions:r.has_options||!1,supportsFormElements:q,showFormElements:n&&q,quantity:o.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:o.requestParams,isIdle:o.status===m,isDisabled:o.status===v,isProcessing:o.status===h,isBeforeProcessing:o.status===g,isAfterProcessing:o.status===y,hasError:o.hasError,eventRegistration:I,dispatchActions:N};return React.createElement(Se.Provider,{value:V},t)},De=r(51),Te=r.n(De),Ie=r(112),Ne=r(22),qe=r(279);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Fe=function(){var e=Ae(),t=e.dispatchActions,r=e.product,n=e.quantity,a=e.eventRegistration,c=e.hasError,o=e.isProcessing,l=e.requestParams,f=Object(Ce.b)(),p=f.hasValidationErrors,b=f.showAllValidationErrors,m=Object(d.a)(),v=m.addErrorNotice,h=m.removeNotice,g=Object(Ie.a)().receiveCart,y=Object(i.useState)(!1),O=s()(y,2),j=O[0],E=O[1],w=!c&&o,P=Object(i.useCallback)((function(){return!p||(b(),{type:"error"})}),[p,b]);Object(i.useEffect)((function(){var e=a.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[a,P]);var k=Object(i.useCallback)((function(){E(!0),h("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:n},l);Te()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Te.a.setNonce(e.headers),e.json().then((function(r){e.ok?g(r):(r.body&&r.body.message?v(Object(Ne.decodeEntities)(r.body.message),{id:"add-to-cart"}):v(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(qe.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&g(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,v,h,g,t,n,l]);return Object(i.useEffect)((function(){w&&!j&&k()}),[w,k,j]),null},Qe=function(e){var t=e.children,r=e.product,n=e.showFormElements;return React.createElement(Ce.a,null,React.createElement(xe,{product:r,showFormElements:n},t,React.createElement(Fe,null)))},We=r(80),Be=r(8),Le=r(200),Me=(r(299),r(85)),He=r(130),Ye=r(280),Ue=r(293),Je=function(e){var t=e.className,r=e.href,n=e.text;return React.createElement(Me.a,{className:t,href:r,rel:"nofollow"},n)},Ke=function(e){var t=e.className,r=e.quantityInCart,n=e.isProcessing,a=e.isDisabled,c=e.isDone,o=e.onClick;return React.createElement(Me.a,{className:t,disabled:a,showSpinner:n,onClick:o},c&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!c&&React.createElement(He.a,{srcElement:Ye.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},ze=function(){var e=Ae(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,a=e.product,c=e.productType,o=e.isDisabled,l=e.isProcessing,d=e.eventRegistration,f=e.hasError,p=e.dispatchActions,b=Object(Ue.a)(a.id||0).cartQuantity,m=Object(i.useState)(!1),v=s()(m,2),h=v[0],g=v[1],y=a.add_to_cart||{url:"",text:""};return Object(i.useEffect)((function(){var e=d.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[d,f]),(t||!n&&"simple"===c)&&r?React.createElement(Ke,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:b,isDisabled:o,isProcessing:l,isDone:h,onClick:function(){return p.submitForm()}}):React.createElement(Je,{className:"wc-block-components-product-add-to-cart-button",href:y.url,text:y.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=function(e){var t=e.disabled,r=e.min,n=e.max,a=e.value,c=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){c(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(u.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ae(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement(Xe,null):t.id&&!t.is_in_stock?React.createElement(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Ge,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(ze,null))},Ze=(r(300),r(47)),et=r.n(Ze),tt=r(204),rt=r(2),nt=r(182),at={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,a=e.value,o=void 0===a?"":a,s=e.onChange,i=void 0===s?function(){}:s,l=e.errorMessage,d=void 0===l?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):l,f=Object(Ce.b)(),p=f.getValidationError,b=f.setValidationErrors,m=f.clearValidationError,v=t,h=p(v)||{};return Object(rt.useEffect)((function(){o?m(v):b(ee()({},v,{message:d,hidden:!0}))}),[o,v,d,m,b]),Object(rt.useEffect)((function(){return function(){m(v)}}),[v,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement(tt.SelectControl,{label:Object(Ne.decodeEntities)(t),value:o||"",options:[at].concat(et()(n)),onChange:i,required:!0,className:c()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),React.createElement(nt.a,{propertyName:v,elementId:v}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var a=Object.keys(e);return n.filter((function(e){return a.every((function(n){var a=r[n]||"",c=t["id:"+e].attributes[n];return""===a||(null===c||c===a)}))}))},ut=function(e,t,r){var n={},a=Object.keys(e),c=Object.values(r).filter(Boolean).length>0;return a.forEach((function(a){var o=e[a],s=st(st({},r),{},ee()({},a,null)),i=c?it(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[a]})):null;n[a]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Ne.decodeEntities)(r)}:null})).filter(Boolean)}(o.terms,u)})),n};function lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ft=function(e){var t=e.attributes,r=e.variationAttributes,n=e.setRequestParams,a=Object(l.a)(t),c=Object(l.a)(r),o=Object(i.useState)(0),u=s()(o,2),d=u[0],f=u[1],p=Object(i.useState)({}),b=s()(p,2),m=b[0],v=b[1],h=Object(i.useMemo)((function(){return ut(a,c,m)}),[m,a,c]);return Object(i.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(a).length?f(function(e,t,r){return it(e,t,r)[0]||0}(a,c,m)):d>0&&f(0)}),[m,d,a,c]),Object(i.useEffect)((function(){n({id:d,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[n,d,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map((function(e){return React.createElement(ct,{key:e,attributeName:e,options:h[e],value:m[e],onChange:function(t){v(dt(dt({},m),{},ee()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(Be.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),a=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(n).length||0===a.length?null:React.createElement(ft,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},bt=function(){var e=Ae(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement(Xe,null):t.id&&!t.is_in_stock?React.createElement(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(pt,{product:t,dispatchers:c}),React.createElement(Ge,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(ze,null))},mt=function(){return React.createElement(ze,null)},vt=function(){return React.createElement(tt.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},ht=function(){return React.createElement(vt,null)},gt=function(){var e=Ae(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(bt,null):"grouped"===r?React.createElement(ht,null):"external"===r?React.createElement(mt,null):"simple"===r||"variation"===r?React.createElement($e,null):null:React.createElement(ze,null)},yt=Object(Le.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(We.useProductDataContext)().product,a=c()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Be.isEmpty)(n)});return React.createElement(Qe,{product:n,showFormElements:r},React.createElement("div",{className:a},React.createElement(gt,null)))})),Ot={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}};t.default=Object(n.a)(Ot)(yt)},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),a=r(21),c=r.n(a),o=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},47:function(e,t,r){var n=r(95),a=r(96),c=r(59),o=r(97);e.exports=function(e){return n(e)||a(e)||c(e)||o()}},48:function(e,t){function r(e,t,r,n,a,c,o){try{var s=e[c](o),i=s.value}catch(e){return void r(e)}s.done?t(i):Promise.resolve(i).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var o=e.apply(t,n);function s(e){r(o,a,c,s,i,"next",e)}function i(e){r(o,a,c,s,i,"throw",e)}s(void 0)}))}}},79:function(e,t,r){"use strict";r.d(t,"b",(function(){return y})),r.d(t,"a",(function(){return O}));var n=r(27),a=r.n(n),c=r(7),o=r.n(c),s=r(14),i=r.n(s),u=r(10),l=r.n(u),d=r(0),f=r(8),p=r(21),b=r.n(p);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e){var t=function(e,t){if("object"!==a()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a()(t)?t:String(t)}var g=Object(d.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),y=function(){return Object(d.useContext)(g)},O=function(e){var t=e.children,r=Object(d.useState)({}),n=l()(r,2),a=n[0],c=n[1],s=Object(d.useCallback)((function(e){return a[e]}),[a]),u=Object(d.useCallback)((function(e){var t=a[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[a]),p=Object(d.useCallback)((function(e){c((function(t){if(!t[e])return t;t[e];return i()(t,[e].map(h))}))}),[]),m=Object(d.useCallback)((function(){c({})}),[]),y=Object(d.useCallback)((function(e){e&&c((function(t){return e=Object(f.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!b()(t[r],e))})),0===Object.values(e).length?t:v(v({},t),e)}))}),[]),O=Object(d.useCallback)((function(e,t){c((function(r){if(!r.hasOwnProperty(e))return r;var n=v(v({},r[e]),t);return b()(r[e],n)?r:v(v({},r),{},o()({},e,n))}))}),[]),j={getValidationError:s,setValidationErrors:y,clearValidationError:p,clearAllValidationErrors:m,hideValidationError:Object(d.useCallback)((function(e){O(e,{hidden:!0})}),[O]),showValidationError:Object(d.useCallback)((function(e){O(e,{hidden:!1})}),[O]),showAllValidationErrors:Object(d.useCallback)((function(){c((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=v(v({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:v(v({},e),t)}))}),[]),hasValidationErrors:Object.keys(a).length>0,getValidationErrorId:u};return React.createElement(g.Provider,{value:j},t)}},85:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(14),o=r.n(c),s=r(68),i=(r(3),r(5)),u=r.n(i);r(156);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,c=e.children,i=o()(e,["className","showSpinner","children"]),l=u()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return React.createElement(s.a,a()({className:l},i),n&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},95:function(e,t,r){var n=r(60);e.exports=function(e){if(Array.isArray(e))return n(e)}},96:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},97:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}}}]);
|
build/atomic-block-components/add-to-cart.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{100:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(25),a=r.n(o),s=r(0),i=r(243),u=(r(2),r(9)),l=r.n(u);r(248);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(s.createElement)(i.a,c()({className:b},u),n&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}},156:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(5),c=r.n(n),o=r(8);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},n,b));case u:return b.delete(o),s(s({},e),{},c()({},n,b))}return e}},234:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},s=function(e){return n(e,c.ERROR)},i=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},248:function(e,t){},249:function(e,t){},312:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(93),o=(r(2),r(249),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var f=l(a)||{};if(!f.message||f.hidden)return null;r=f.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(i)},r))})},410:function(e,t){},415:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(156),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},416:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(13),c=r.n(n),o=r(48),a=r.n(o),s=r(28),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=u(o),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===a()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},417:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},418:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(9)),o=r.n(c),a=r(18),s=r.n(a),i=r(1),u=r(54),l=r(144),b=r(234),f=r(952),d="pristine",p="idle",O="disabled",m="processing",v="before_processing",j="after_processing",h={status:d,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},y="set_pristine",g="set_idle",E="set_disabled",w="set_processing",P="set_before_processing",k="set_after_processing",_="set_processing_response",C="set_has_error",A="set_no_error",S="set_quantity",x="set_request_params",D=y,q=g,N=E,R=w,T=P,V=k,F=_,I=C,B=A,Q=S,M=x,W=function(){return{type:D}},H=function(){return{type:q}},L=function(){return{type:N}},U=function(){return{type:R}},z=function(){return{type:T}},G=function(){return{type:V}},J=function(e){return{type:F,data:e}},Y=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:B;return{type:t}},X=function(e){return{type:Q,quantity:e}},$=function(e){return{type:M,data:e}},K=r(5),Z=r.n(K);function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=y,ne=g,ce=E,oe=w,ae=P,se=k,ie=_,ue=C,le=A,be=S,fe=x,de=d,pe=p,Oe=O,me=m,ve=v,je=j,he=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case re:e=h;break;case ne:e=t.status!==pe?te(te({},t),{},{status:pe}):t;break;case ce:e=t.status!==Oe?te(te({},t),{},{status:Oe}):t;break;case be:e=n!==t.quantity?te(te({},t),{},{quantity:n}):t;break;case fe:e=te(te({},t),{},{requestParams:te(te({},t.requestParams),o)});break;case ie:e=te(te({},t),{},{processingResponse:o});break;case oe:e=!1===(e=t.status!==me?te(te({},t),{},{status:me,hasError:!1}):t).hasError?e:te(te({},e),{},{hasError:!1});break;case ae:e=t.status!==ve?te(te({},t),{},{status:ve,hasError:!1}):t;break;case se:e=t.status!==je?te(te({},t),{},{status:je}):t;break;case ue:e=t.hasError?t:te(te({},t),{},{hasError:!0}),e=t.status===me||t.status===ve?te(te({},e),{},{status:pe}):e;break;case le:e=t.hasError?te(te({},t),{},{hasError:!1}):t}return e!==t&&c!==re&&e.status===de&&(e.status=pe),e},ye=r(156),ge=r(415),Ee="add_to_cart_before_processing",we="add_to_cart_after_processing_with_success",Pe="add_to_cart_after_processing_with_error",ke=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(ge.a)(we,e),onAddToCartProcessingWithError:Object(ge.a)(Pe,e),onAddToCartBeforeProcessing:Object(ge.a)(Ee,e)}},_e=r(416),Ce=r(93),Ae=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Se=function(){return Object(n.useContext)(Ae)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(he,h),a=s()(o,2),d=a[0],y=a[1],g=Object(n.useReducer)(ye.b,{}),E=s()(g,2),w=E[0],P=E[1],k=Object(u.a)(w),_=Object(l.a)(),C=_.addErrorNotice,A=_.removeNotices,S=Object(Ce.b)().setValidationErrors,x=Object(b.a)(),D=x.isSuccessResponse,q=x.isErrorResponse,N=x.isFailResponse,R=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:ke(P).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:ke(P).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:ke(P).onAddToCartBeforeProcessing}}),[P]),T=Object(n.useMemo)((function(){return{resetForm:function(){y(W())},submitForm:function(){y(z())},setQuantity:function(e){y(X(e))},setHasError:function(e){y(Y(e))},setRequestParams:function(e){y($(e))},setAfterProcessing:function(e){y(J(e)),y(G())}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(f.a)(r);e!==O||t?e!==O&&t&&y(L()):y(H())}),[d.status,r,y]),Object(n.useEffect)((function(){d.status===v&&(A("error"),Object(_e.a)(k,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&C(t),r&&S(r)})),y(H())):y(U())})))}),[d.status,S,C,A,y,k]),Object(n.useEffect)((function(){if(d.status===j){var e={processingResponse:d.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;C(e.message,t)}};if(d.hasError)return void Object(_e.b)(k,Pe,e).then((function(r){if(q(r)||N(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");C(c,{id:"add-to-cart"})}y(H())}));Object(_e.b)(k,we,e).then((function(e){q(e)||N(e)?(t(e),y(Y(!0))):y(H())}))}}),[d.status,d.hasError,d.processingResponse,T,C,q,N,D,k]);var V=Object(f.b)(r),F={product:r,productType:r.type||"simple",productIsPurchasable:Object(f.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:c&&V,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:d.status===p,isDisabled:d.status===O,isProcessing:d.status===m,isBeforeProcessing:d.status===v,isAfterProcessing:d.status===j,hasError:d.hasError,eventRegistration:R,dispatchActions:T};return Object(n.createElement)(Ae.Provider,{value:F},t)},De=r(19),qe=r.n(De),Ne=r(172),Re=r(29),Te=r(558);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Fe=function(){var e=Se(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,b=e.requestParams,f=Object(Ce.b)(),d=f.hasValidationErrors,p=f.showAllValidationErrors,O=Object(l.a)(),m=O.addErrorNotice,v=O.removeNotice,j=Object(Ne.a)().receiveCart,h=Object(n.useState)(!1),y=s()(h,2),g=y[0],E=y[1],w=!a&&u,P=Object(n.useCallback)((function(){return!d||(p(),{type:"error"})}),[d,p]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[o,P]);var k=Object(n.useCallback)((function(){E(!0),v("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},b);qe()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){qe.a.setNonce(e.headers),e.json().then((function(r){e.ok?j(r):(r.body&&r.body.message?m(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):m(Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&j(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,m,v,j,t,c,b]);return Object(n.useEffect)((function(){w&&!g&&k()}),[w,k,g]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(Ce.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Fe,null)))},Be=r(41),Qe=r(8),Me=r(67),We=(r(410),r(100)),He=r(55),Le=r(584),Ue=r(872),ze=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(We.a,{className:t,href:r,rel:"nofollow"},c)},Ge=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,s=e.onClick;return Object(n.createElement)(We.a,{className:t,disabled:o,showSpinner:c,onClick:s},a&&r>0?Object(i.sprintf)(Object(i._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(i.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(He.a,{srcElement:Le.a,alt:Object(i.__)("Done","woo-gutenberg-products-block")}))},Je=function(){var e=Se(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(Ue.a)(o.id||0).cartQuantity,O=Object(n.useState)(!1),m=s()(O,2),v=m[0],j=m[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||j(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Ge,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:u,isProcessing:l,isDone:v,onClick:function(){return d.submitForm()}}):Object(n.createElement)(ze,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(i.__)("View Product","woo-gutenberg-products-block")})},Ye=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(i.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ye,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Je,null))},Ke=(r(583),r(31)),Ze=r.n(Ke),et=r(4),tt=r(7),rt=r(312),nt={value:"",label:Object(i.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,s=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,f=void 0===b?Object(i.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(Ce.b)(),p=d.getValidationError,O=d.setValidationErrors,m=d.clearValidationError,v=t,j=p(v)||{};return Object(tt.useEffect)((function(){s?m(v):O(Z()({},v,{message:f,hidden:!0}))}),[s,v,f,m,O]),Object(tt.useEffect)((function(){return function(){m(v)}}),[v,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Re.decodeEntities)(t),value:s||"",options:[nt].concat(Ze()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":j.message&&!j.hidden})}),Object(n.createElement)(rt.a,{propertyName:v,elementId:v}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},it=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],s=at(at({},r),{},Z()({},c,null)),i=o?st(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Re.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(u.a)(t),a=Object(u.a)(r),i=Object(n.useState)(0),l=s()(i,2),b=l[0],f=l[1],d=Object(n.useState)({}),p=s()(d,2),O=p[0],m=p[1],v=Object(n.useMemo)((function(){return it(o,a,O)}),[O,o,a]);return Object(n.useEffect)((function(){Object.values(O).filter((function(e){return""!==e})).length===Object.keys(o).length?f(function(e,t,r){return st(e,t,r)[0]||0}(o,a,O)):b>0&&f(0)}),[O,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(O).map((function(e){return{attribute:e,value:O[e]}}))})}),[c,b,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:v[e],value:O[e],onChange:function(t){m(lt(lt({},O),{},Z()({},e,t)))}})})))},ft=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Qe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ft,{product:t,dispatchers:a}),Object(n.createElement)(Ye,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Je,null))},pt=function(){return Object(n.createElement)(Je,null)},Ot=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},mt=function(){return Object(n.createElement)(Ot,null)},vt=function(){var e=Se(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(mt,null):"external"===r?Object(n.createElement)(pt,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Je,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Qe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(vt,null)))}))},54:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(34),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},583:function(e,t){},584:function(e,t,r){"use strict";var n=r(0),c=r(32),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},93:function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return y}));var n=r(48),c=r.n(n),o=r(5),a=r.n(o),s=r(25),i=r.n(s),u=r(18),l=r.n(u),b=r(0),f=r(8),d=r(34),p=r.n(d);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var j=Object(b.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),h=function(){return Object(b.useContext)(j)},y=function(e){var t=e.children,r=Object(b.useState)({}),n=l()(r,2),c=n[0],o=n[1],s=Object(b.useCallback)((function(e){return c[e]}),[c]),u=Object(b.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),d=Object(b.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return i()(t,[e].map(v))}))}),[]),O=Object(b.useCallback)((function(){o({})}),[]),h=Object(b.useCallback)((function(e){e&&o((function(t){return e=Object(f.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!p()(t[r],e))})),0===Object.values(e).length?t:m(m({},t),e)}))}),[]),y=Object(b.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=m(m({},r[e]),t);return p()(r[e],n)?r:m(m({},r),{},a()({},e,n))}))}),[]),g={getValidationError:s,setValidationErrors:h,clearValidationError:d,clearAllValidationErrors:O,hideValidationError:Object(b.useCallback)((function(e){y(e,{hidden:!0})}),[y]),showValidationError:Object(b.useCallback)((function(e){y(e,{hidden:!1})}),[y]),showAllValidationErrors:Object(b.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=m(m({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:m(m({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:g},t)}},952:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},976:function(e,t,r){"use strict";r.r(t);var n=r(973),c=r(418),o=r(417);t.default=Object(n.a)(o.a)(c.a)}}]);
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{143:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(5),c=r.n(n),o=r(7);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},n,b));case u:return b.delete(o),s(s({},e),{},c()({},n,b))}return e}},207:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},s=function(e){return n(e,c.ERROR)},i=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},217:function(e,t){},218:function(e,t){},280:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(88),o=(r(2),r(218),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var f=l(a)||{};if(!f.message||f.hidden)return null;r=f.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(i)},r))})},376:function(e,t){},381:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(143),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},382:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(13),c=r.n(n),o=r(45),a=r.n(o),s=r(27),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=u(o),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===a()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},383:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},384:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(18),s=r.n(a),i=r(1),u=r(53),l=r(134),b=r(207),f=r(916),d="pristine",p="idle",O="disabled",m="processing",v="before_processing",j="after_processing",h={status:d,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},y="set_pristine",g="set_idle",E="set_disabled",w="set_processing",P="set_before_processing",k="set_after_processing",_="set_processing_response",C="set_has_error",A="set_no_error",S="set_quantity",x="set_request_params",D=y,q=g,N=E,R=w,T=P,V=k,F=_,I=C,B=A,Q=S,M=x,W=function(){return{type:D}},H=function(){return{type:q}},L=function(){return{type:N}},U=function(){return{type:R}},z=function(){return{type:T}},G=function(){return{type:V}},J=function(e){return{type:F,data:e}},Y=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:B;return{type:t}},X=function(e){return{type:Q,quantity:e}},$=function(e){return{type:M,data:e}},K=r(5),Z=r.n(K);function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=y,ne=g,ce=E,oe=w,ae=P,se=k,ie=_,ue=C,le=A,be=S,fe=x,de=d,pe=p,Oe=O,me=m,ve=v,je=j,he=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case re:e=h;break;case ne:e=t.status!==pe?te(te({},t),{},{status:pe}):t;break;case ce:e=t.status!==Oe?te(te({},t),{},{status:Oe}):t;break;case be:e=n!==t.quantity?te(te({},t),{},{quantity:n}):t;break;case fe:e=te(te({},t),{},{requestParams:te(te({},t.requestParams),o)});break;case ie:e=te(te({},t),{},{processingResponse:o});break;case oe:e=!1===(e=t.status!==me?te(te({},t),{},{status:me,hasError:!1}):t).hasError?e:te(te({},e),{},{hasError:!1});break;case ae:e=t.status!==ve?te(te({},t),{},{status:ve,hasError:!1}):t;break;case se:e=t.status!==je?te(te({},t),{},{status:je}):t;break;case ue:e=t.hasError?t:te(te({},t),{},{hasError:!0}),e=t.status===me||t.status===ve?te(te({},e),{},{status:pe}):e;break;case le:e=t.hasError?te(te({},t),{},{hasError:!1}):t}return e!==t&&c!==re&&e.status===de&&(e.status=pe),e},ye=r(143),ge=r(381),Ee="add_to_cart_before_processing",we="add_to_cart_after_processing_with_success",Pe="add_to_cart_after_processing_with_error",ke=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(ge.a)(we,e),onAddToCartProcessingWithError:Object(ge.a)(Pe,e),onAddToCartBeforeProcessing:Object(ge.a)(Ee,e)}},_e=r(382),Ce=r(88),Ae=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Se=function(){return Object(n.useContext)(Ae)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(he,h),a=s()(o,2),d=a[0],y=a[1],g=Object(n.useReducer)(ye.b,{}),E=s()(g,2),w=E[0],P=E[1],k=Object(u.a)(w),_=Object(l.a)(),C=_.addErrorNotice,A=_.removeNotices,S=Object(Ce.b)().setValidationErrors,x=Object(b.a)(),D=x.isSuccessResponse,q=x.isErrorResponse,N=x.isFailResponse,R=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:ke(P).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:ke(P).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:ke(P).onAddToCartBeforeProcessing}}),[P]),T=Object(n.useMemo)((function(){return{resetForm:function(){y(W())},submitForm:function(){y(z())},setQuantity:function(e){y(X(e))},setHasError:function(e){y(Y(e))},setRequestParams:function(e){y($(e))},setAfterProcessing:function(e){y(J(e)),y(G())}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(f.a)(r);e!==O||t?e!==O&&t&&y(L()):y(H())}),[d.status,r,y]),Object(n.useEffect)((function(){d.status===v&&(A("error"),Object(_e.a)(k,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&C(t),r&&S(r)})),y(H())):y(U())})))}),[d.status,S,C,A,y,k]),Object(n.useEffect)((function(){if(d.status===j){var e={processingResponse:d.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;C(e.message,t)}};if(d.hasError)return void Object(_e.b)(k,Pe,e).then((function(r){if(q(r)||N(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");C(c,{id:"add-to-cart"})}y(H())}));Object(_e.b)(k,we,e).then((function(e){q(e)||N(e)?(t(e),y(Y(!0))):y(H())}))}}),[d.status,d.hasError,d.processingResponse,T,C,q,N,D,k]);var V=Object(f.b)(r),F={product:r,productType:r.type||"simple",productIsPurchasable:Object(f.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:c&&V,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:d.status===p,isDisabled:d.status===O,isProcessing:d.status===m,isBeforeProcessing:d.status===v,isAfterProcessing:d.status===j,hasError:d.hasError,eventRegistration:R,dispatchActions:T};return Object(n.createElement)(Ae.Provider,{value:F},t)},De=r(19),qe=r.n(De),Ne=r(155),Re=r(28),Te=r(523);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Fe=function(){var e=Se(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,b=e.requestParams,f=Object(Ce.b)(),d=f.hasValidationErrors,p=f.showAllValidationErrors,O=Object(l.a)(),m=O.addErrorNotice,v=O.removeNotice,j=Object(Ne.a)().receiveCart,h=Object(n.useState)(!1),y=s()(h,2),g=y[0],E=y[1],w=!a&&u,P=Object(n.useCallback)((function(){return!d||(p(),{type:"error"})}),[d,p]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[o,P]);var k=Object(n.useCallback)((function(){E(!0),v("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},b);qe()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){qe.a.setNonce(e.headers),e.json().then((function(r){e.ok?j(r):(r.body&&r.body.message?m(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):m(Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&j(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,m,v,j,t,c,b]);return Object(n.useEffect)((function(){w&&!g&&k()}),[w,k,g]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(Ce.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Fe,null)))},Be=r(39),Qe=r(7),Me=r(66),We=(r(376),r(94)),He=r(54),Le=r(549),Ue=r(837),ze=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(We.a,{className:t,href:r,rel:"nofollow"},c)},Ge=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,s=e.onClick;return Object(n.createElement)(We.a,{className:t,disabled:o,showSpinner:c,onClick:s},a&&r>0?Object(i.sprintf)(Object(i._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(i.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(He.a,{srcElement:Le.a,alt:Object(i.__)("Done","woo-gutenberg-products-block")}))},Je=function(){var e=Se(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(Ue.a)(o.id||0).cartQuantity,O=Object(n.useState)(!1),m=s()(O,2),v=m[0],j=m[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||j(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Ge,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:u,isProcessing:l,isDone:v,onClick:function(){return d.submitForm()}}):Object(n.createElement)(ze,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(i.__)("View Product","woo-gutenberg-products-block")})},Ye=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(i.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ye,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Je,null))},Ke=(r(548),r(30)),Ze=r.n(Ke),et=r(4),tt=r(9),rt=r(280),nt={value:"",label:Object(i.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,s=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,f=void 0===b?Object(i.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(Ce.b)(),p=d.getValidationError,O=d.setValidationErrors,m=d.clearValidationError,v=t,j=p(v)||{};return Object(tt.useEffect)((function(){s?m(v):O(Z()({},v,{message:f,hidden:!0}))}),[s,v,f,m,O]),Object(tt.useEffect)((function(){return function(){m(v)}}),[v,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Re.decodeEntities)(t),value:s||"",options:[nt].concat(Ze()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":j.message&&!j.hidden})}),Object(n.createElement)(rt.a,{propertyName:v,elementId:v}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},it=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],s=at(at({},r),{},Z()({},c,null)),i=o?st(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Re.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(u.a)(t),a=Object(u.a)(r),i=Object(n.useState)(0),l=s()(i,2),b=l[0],f=l[1],d=Object(n.useState)({}),p=s()(d,2),O=p[0],m=p[1],v=Object(n.useMemo)((function(){return it(o,a,O)}),[O,o,a]);return Object(n.useEffect)((function(){Object.values(O).filter((function(e){return""!==e})).length===Object.keys(o).length?f(function(e,t,r){return st(e,t,r)[0]||0}(o,a,O)):b>0&&f(0)}),[O,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(O).map((function(e){return{attribute:e,value:O[e]}}))})}),[c,b,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:v[e],value:O[e],onChange:function(t){m(lt(lt({},O),{},Z()({},e,t)))}})})))},ft=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Qe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ft,{product:t,dispatchers:a}),Object(n.createElement)(Ye,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Je,null))},pt=function(){return Object(n.createElement)(Je,null)},Ot=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},mt=function(){return Object(n.createElement)(Ot,null)},vt=function(){var e=Se(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(mt,null):"external"===r?Object(n.createElement)(pt,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Je,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Qe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(vt,null)))}))},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(33),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},548:function(e,t){},549:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},88:function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return y}));var n=r(45),c=r.n(n),o=r(5),a=r.n(o),s=r(24),i=r.n(s),u=r(18),l=r.n(u),b=r(0),f=r(7),d=r(33),p=r.n(d);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var j=Object(b.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),h=function(){return Object(b.useContext)(j)},y=function(e){var t=e.children,r=Object(b.useState)({}),n=l()(r,2),c=n[0],o=n[1],s=Object(b.useCallback)((function(e){return c[e]}),[c]),u=Object(b.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),d=Object(b.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return i()(t,[e].map(v))}))}),[]),O=Object(b.useCallback)((function(){o({})}),[]),h=Object(b.useCallback)((function(e){e&&o((function(t){return e=Object(f.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!p()(t[r],e))})),0===Object.values(e).length?t:m(m({},t),e)}))}),[]),y=Object(b.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=m(m({},r[e]),t);return p()(r[e],n)?r:m(m({},r),{},a()({},e,n))}))}),[]),g={getValidationError:s,setValidationErrors:h,clearValidationError:d,clearAllValidationErrors:O,hideValidationError:Object(b.useCallback)((function(e){y(e,{hidden:!0})}),[y]),showValidationError:Object(b.useCallback)((function(e){y(e,{hidden:!1})}),[y]),showAllValidationErrors:Object(b.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=m(m({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:m(m({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:g},t)}},916:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},935:function(e,t,r){"use strict";r.r(t);var n=r(932),c=r(384),o=r(383);t.default=Object(n.a)(o.a)(c.a)},94:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),s=r(0),i=r(212),u=(r(2),r(8)),l=r.n(u);r(217);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(s.createElement)(i.a,c()({className:b},u),n&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}}}]);
|
build/atomic-block-components/button-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{112:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(7),c=n.n(r),a=n(15),i=n(12),o=n(77),s=n(22),u=n(8);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){c()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},b=p(p({},l),{},{email:"",phone:""}),f=function(t){return Object(u.mapValues)(t,(function(t){return Object(s.decodeEntities)(t)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:b,shippingAddress:l,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){}},g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},e=Object(o.a)(),n=e.isEditor,r=e.previewData,c=(null==r?void 0:r.previewCart)||{},s=t.shouldSelect,u=Object(i.useSelect)((function(t,e){var r=e.dispatch;if(!s)return m;if(n)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:b,shippingAddress:l,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var i=t(a.CART_STORE_KEY),o=i.getCartData(),u=i.getCartErrors(),d=i.getCartTotals(),p=!i.hasFinishedResolution("getCartData"),g=i.isCustomerDataUpdating(),h=r(a.CART_STORE_KEY).receiveCart,v=f(o.billingAddress),_=o.needsShipping?f(o.shippingAddress):v;return{cartCoupons:o.coupons,cartItems:o.items||[],cartFees:o.fees||[],cartItemsCount:o.itemsCount,cartItemsWeight:o.itemsWeight,cartNeedsPayment:o.needsPayment,cartNeedsShipping:o.needsShipping,cartItemErrors:o.errors||[],cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:v,shippingAddress:_,extensions:o.extensions||{},shippingRates:o.shippingRates||[],shippingRatesLoading:g,cartHasCalculatedShipping:o.hasCalculatedShipping,paymentRequirements:o.paymentRequirements||[],receiveCart:h}}),[s]);return u}},279:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return i}));var r=window.Event||null,c=function(t,e){var n=e.bubbles,c=void 0!==n&&n,a=e.cancelable,i=void 0!==a&&a,o=e.element;if(o||(o=document.body),"function"==typeof r){var s=new r(t,{bubbles:c,cancelable:i});o.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(t,c,i),o.dispatchEvent(u)}},a=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},i=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var a=function(){c(e,{bubbles:n,cancelable:r})};return jQuery(document).on(t,a),function(){return jQuery(document).off(t,a)}}},292:function(t,e){},293:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(10),c=n.n(r),a=n(0),i=n(12),o=n(15),s=n(22),u=n(88),d=n(112),p=function(t,e){var n=t.find((function(t){return t.id===e}));return n?n.quantity:0},l=function(t){var e=Object(i.useDispatch)(o.CART_STORE_KEY).addItemToCart,n=Object(d.a)(),r=n.cartItems,l=n.cartIsLoading,b=Object(u.a)(),f=b.addErrorNotice,m=b.removeNotice,g=Object(a.useState)(!1),h=c()(g,2),v=h[0],_=h[1],O=Object(a.useRef)(p(r,t));return Object(a.useEffect)((function(){var e=p(r,t);e!==O.current&&(O.current=e)}),[r,t]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:v,cartIsLoading:l,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;_(!0),e(t,n).then((function(t){!0===t&&m("add-to-cart")})).catch((function(t){f(Object(s.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){_(!1)}))}}}},303:function(t,e,n){"use strict";n.r(e);var r=n(11),c=n.n(r),a=n(7),i=n.n(a),o=(n(3),n(5)),s=n.n(o),u=n(1),d=n(0),p=n(293),l=n(22),b=n(279),f=n(80),m=n(200),g=(n(292),function(t){var e=t.product,n=Object(d.useRef)(!0),r=e.id,a=e.permalink,i=e.add_to_cart,o=e.has_options,f=e.is_purchasable,m=e.is_in_stock,g=Object(p.a)(r),h=g.cartQuantity,v=g.addingToCart,_=g.addToCart;Object(d.useEffect)((function(){n.current?n.current=!1:Object(b.c)()}),[h]);var O=Number.isFinite(h)&&h>0,j=!o&&f&&m,y=Object(l.decodeEntities)((null==i?void 0:i.description)||""),C=O?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",h,"woo-gutenberg-products-block"),h):Object(l.decodeEntities)((null==i?void 0:i.text)||Object(u.__)("Add to cart","woo-gutenberg-products-block")),E=j?"button":"a",w={};return j?w.onClick=function(){_()}:(w.href=a,w.rel="nofollow"),React.createElement(E,c()({"aria-label":y,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:v,added:O}),disabled:v},w),C)}),h=function(){return React.createElement("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};e.default=Object(m.withProductDataContext)((function(t){var e=t.className,n=Object(f.useInnerBlockLayoutContext)().parentClassName,r=Object(f.useProductDataContext)().product;return React.createElement("div",{className:s()(e,"wp-block-button","wc-block-components-product-button",i()({},"".concat(n,"__product-add-to-cart"),n))},r.id?React.createElement(g,{product:r}):React.createElement(h,null))}))}}]);
|
build/atomic-block-components/button.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{522:function(t,c,e){"use strict";e.r(c);var o=e(11),n=e.n(o),a=e(5),r=e.n(a),u=e(0),d=(e(2),e(8)),b=e.n(d),l=e(1),i=e(837),s=e(28),p=e(523),_=e(39),k=e(66),j=(e(542),function(t){var c=t.product,e=Object(u.useRef)(!0),o=c.id,a=c.permalink,r=c.add_to_cart,d=c.has_options,_=c.is_purchasable,k=c.is_in_stock,j=Object(i.a)(o),w=j.cartQuantity,O=j.addingToCart,m=j.addToCart;Object(u.useEffect)((function(){e.current?e.current=!1:Object(p.c)()}),[w]);var f=Number.isFinite(w)&&w>0,E=!d&&_&&k,v=Object(s.decodeEntities)((null==r?void 0:r.description)||""),C=f?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",w,"woo-gutenberg-products-block"),w):Object(s.decodeEntities)((null==r?void 0:r.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),g=E?"button":"a",h={};return E?h.onClick=function(){m()}:(h.href=a,h.rel="nofollow"),Object(u.createElement)(g,n()({"aria-label":v,className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:O,added:f}),disabled:O},h),C)}),w=function(){return Object(u.createElement)("button",{className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};c.default=Object(k.withProductDataContext)((function(t){var c=t.className,e=Object(_.useInnerBlockLayoutContext)().parentClassName,o=Object(_.useProductDataContext)().product;return Object(u.createElement)("div",{className:b()(c,"wp-block-button","wc-block-components-product-button",r()({},"".concat(e,"__product-add-to-cart"),e))},o.id?Object(u.createElement)(j,{product:o}):Object(u.createElement)(w,null))}))},542:function(t,c){}}]);
|
build/atomic-block-components/category-list-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[4],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[4],{296:function(e,t){},306:function(e,t,c){"use strict";c.r(t);var a=c(7),n=c.n(a),o=c(1),r=(c(3),c(5)),s=c.n(r),l=c(80),u=c(8),i=c(200);c(296);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,c=Object(l.useInnerBlockLayoutContext)().parentClassName,a=Object(l.useProductDataContext)().product;return Object(u.isEmpty)(a.categories)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-category-list",n()({},"".concat(c,"__product-category-list"),c))},Object(o.__)("Categories:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(a.categories).map((function(e){var t=e.name,c=e.link,a=e.slug;return React.createElement("li",{key:"category-list-item-".concat(a)},React.createElement("a",{href:c},t))}))))}))}}]);
|
build/atomic-block-components/category-list.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{526:function(e,t,c){"use strict";c.r(t);var n=c(5),o=c.n(n),a=c(0),r=c(1),s=(c(2),c(8)),l=c.n(s),u=c(39),i=c(7),b=c(66);c(545);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,c=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(i.isEmpty)(n.categories)?null:Object(a.createElement)("div",{className:l()(t,"wc-block-components-product-category-list",o()({},"".concat(c,"__product-category-list"),c))},Object(r.__)("Categories:","woo-gutenberg-products-block")," ",Object(a.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,c=e.link,n=e.slug;return Object(a.createElement)("li",{key:"category-list-item-".concat(n)},Object(a.createElement)("a",{href:c},t))}))))}))},545:function(e,t){}}]);
|
build/atomic-block-components/image-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5,8],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5,8],{191:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},286:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(191);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},287:function(e,t){},288:function(e,t,r){"use strict";r.r(t);var n=r(7),a=r.n(n),c=(r(3),r(1)),o=r(5),l=r.n(o),s=r(38),u=r(80),i=r(200);r(287);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(u.useInnerBlockLayoutContext)().parentClassName,o=Object(u.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var i="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:l()("wc-block-components-product-sale-badge",t,i,a()({},"".concat(n,"__product-onsale"),n))},React.createElement(s.a,{label:Object(c.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Product on sale","woo-gutenberg-products-block")}))}))},289:function(e,t){},311:function(e,t,r){"use strict";r.r(t);var n=r(286),a=r(11),c=r.n(a),o=r(7),l=r.n(o),s=r(10),u=r.n(s),i=(r(3),r(0)),p=r(1),d=r(5),b=r.n(d),f=r(9),m=r(80),g=r(200),O=r(288);r(289);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=function(){return React.createElement("img",{src:f.r,alt:"",width:500,height:500})},v=function(e){var t=e.image,r=e.onLoad,n=e.loaded,a=e.showFullSize,o=e.fallbackAlt,l=t||{},s=l.thumbnail,u=l.src,i=l.srcset,p=l.sizes,d=w({alt:l.alt||o,onLoad:r,hidden:!n,src:s},a&&{src:u,srcSet:i,sizes:p});return React.createElement(React.Fragment,null,d.src&&React.createElement("img",c()({"data-testid":"product-image"},d)),!n&&React.createElement(y,null))},h=Object(g.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,a=e.productLink,c=void 0===a||a,o=e.showSaleBadge,s=e.saleBadgeAlign,d=void 0===s?"right":s,f=Object(m.useInnerBlockLayoutContext)().parentClassName,g=Object(m.useProductDataContext)().product,j=Object(i.useState)(!1),h=u()(j,2),k=h[0],E=h[1];if(!g.id)return React.createElement("div",{className:b()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",l()({},"".concat(f,"__product-image"),f))},React.createElement(y,null));var P=!!g.images.length,R=P?g.images[0]:null,S=c?"a":i.Fragment,_=Object(p.sprintf)(Object(p.__)("Link to %s","woo-gutenberg-products-block"),g.name),D=w({href:g.permalink,rel:"nofollow"},!P&&{"aria-label":_});return React.createElement("div",{className:b()(t,"wc-block-components-product-image",l()({},"".concat(f,"__product-image"),f))},React.createElement(S,c&&D,!!o&&React.createElement(O.default,{align:d,product:g}),React.createElement(v,{fallbackAlt:g.name,image:R,onLoad:function(){return E(!0)},loaded:k,showFullSize:"cropped"!==n})))})),k={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}};t.default=Object(n.a)(k)(h)},38:function(e,t,r){"use strict";var n=r(7),a=r.n(n),c=(r(3),r(2)),o=r(5),l=r.n(o);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,a=e.wrapperElement,o=e.wrapperProps,s=void 0===o?{}:o,i=null!=r,p=null!=n;return!i&&p?(t=a||"span",s=u(u({},s),{},{className:l()(s.className,"screen-reader-text")}),React.createElement(t,s,n)):(t=a||c.Fragment,i&&p&&r!==n?React.createElement(t,s,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,s,r))}}}]);
|
build/atomic-block-components/image.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{379:function(e,t,c){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},380:function(e,t,c){"use strict";var n=c(11),r=c.n(n),a=c(5),o=c.n(a),l=c(18),i=c.n(l),s=c(0),u=(c(2),c(1)),d=c(8),p=c.n(d),b=c(6),m=c(39),g=c(66),f=c(278);c(540);function O(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function j(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?O(Object(c),!0).forEach((function(t){o()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):O(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var w=function(){return Object(s.createElement)("img",{src:b.E,alt:"",width:500,height:500})},h=function(e){var t=e.image,c=e.onLoad,n=e.loaded,a=e.showFullSize,o=e.fallbackAlt,l=t||{},i=l.thumbnail,u=l.src,d=l.srcset,p=l.sizes,b=j({alt:l.alt||o,onLoad:c,hidden:!n,src:i},a&&{src:u,srcSet:d,sizes:p});return Object(s.createElement)(s.Fragment,null,b.src&&Object(s.createElement)("img",r()({"data-testid":"product-image"},b)),!n&&Object(s.createElement)(w,null))};t.a=Object(g.withProductDataContext)((function(e){var t=e.className,c=e.imageSizing,n=void 0===c?"full-size":c,r=e.productLink,a=void 0===r||r,l=e.showSaleBadge,d=e.saleBadgeAlign,b=void 0===d?"right":d,g=Object(m.useInnerBlockLayoutContext)().parentClassName,O=Object(m.useProductDataContext)().product,y=Object(s.useState)(!1),k=i()(y,2),v=k[0],E=k[1];if(!O.id)return Object(s.createElement)("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",o()({},"".concat(g,"__product-image"),g))},Object(s.createElement)(w,null));var P=!!O.images.length,S=P?O.images[0]:null,z=a?"a":s.Fragment,B=Object(u.sprintf)(Object(u.__)("Link to %s","woo-gutenberg-products-block"),O.name),L=j({href:O.permalink,rel:"nofollow"},!P&&{"aria-label":B});return Object(s.createElement)("div",{className:p()(t,"wc-block-components-product-image",o()({},"".concat(g,"__product-image"),g))},Object(s.createElement)(z,a&&L,!!l&&Object(s.createElement)(f.default,{align:b,product:O}),Object(s.createElement)(h,{fallbackAlt:O.name,image:S,onLoad:function(){return E(!0)},loaded:v,showFullSize:"cropped"!==n})))}))},540:function(e,t){},933:function(e,t,c){"use strict";c.r(t);var n=c(932),r=c(380),a=c(379);t.default=Object(n.a)(a.a)(r.a)}}]);
|
build/atomic-block-components/price-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{115:function(e,c,r){"use strict";var t=r(7),a=r.n(t),n=r(1),l=r(45),o=r(5),i=r.n(o),s=(r(3),r(154),function(e){var c=e.className,r=e.currency,t=e.maxPrice,a=e.minPrice,n=e.priceClassName,o=e.priceStyle;return React.createElement("span",{className:c},React.createElement(l.a,{className:i()("wc-block-components-product-price__value",n),currency:r,value:a,style:o})," — ",React.createElement(l.a,{className:i()("wc-block-components-product-price__value",n),currency:r,value:t,style:o}))}),u=function(e){var c=e.className,r=e.currency,t=e.regularPriceClassName,a=e.regularPriceStyle,o=e.regularPrice,s=e.priceClassName,u=e.priceStyle,p=e.price;return React.createElement("span",{className:c},React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(l.a,{currency:r,renderText:function(e){return React.createElement("del",{className:i()("wc-block-components-product-price__regular",t),style:a},e)},value:o}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(l.a,{currency:r,renderText:function(e){return React.createElement("ins",{className:i()("wc-block-components-product-price__value","is-discounted",s),style:u},e)},value:p}))};c.a=function(e){var c=e.align,r=e.className,t=e.currency,n=e.maxPrice,o=void 0===n?null:n,p=e.minPrice,m=void 0===p?null:p,d=e.price,b=void 0===d?null:d,y=e.priceClassName,f=e.priceStyle,g=e.regularPrice,v=e.regularPriceClassName,N=e.regularPriceStyle,_=i()(r,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(c),c));return g&&b!==g?React.createElement(u,{className:_,currency:t,price:b,priceClassName:y,priceStyle:f,regularPrice:g,regularPriceClassName:v,regularPriceStyle:N}):null!==m&&null!==o?React.createElement(s,{className:_,currency:t,maxPrice:o,minPrice:m,priceClassName:y,priceStyle:f}):null!==b?React.createElement("span",{className:_},React.createElement(l.a,{className:i()("wc-block-components-product-price__value",y),currency:t,value:b,style:f})):React.createElement("span",{className:_},React.createElement("span",{className:i()("wc-block-components-product-price__value",y)}))}},125:function(e,c){},154:function(e,c){},301:function(e,c,r){"use strict";r.r(c);var t=r(7),a=r.n(t),n=(r(3),r(5)),l=r.n(n),o=r(115),i=r(46),s=r(80),u=r(203),p=r(9),m=r(200);c.default=Object(m.withProductDataContext)((function(e){var c,r,t,n,m,d,b,y=e.className,f=e.align,g=e.fontSize,v=e.customFontSize,N=e.saleFontSize,_=e.customSaleFontSize,O=e.color,P=e.customColor,S=e.saleColor,C=e.customSaleColor,w=Object(s.useInnerBlockLayoutContext)().parentClassName,j=Object(s.useProductDataContext)().product,E=l()(y,a()({},"".concat(w,"__product-price"),w));if(!j.id)return React.createElement(o.a,{align:f,className:E});var x=Object(u.getColorClassName)("color",O),R=Object(u.getFontSizeClass)(g),h=Object(u.getColorClassName)("color",S),k=Object(u.getFontSizeClass)(N),z=l()((c={"has-text-color":O||P,"has-font-size":g||v},a()(c,x,x),a()(c,R,R),c)),D=l()((r={"has-text-color":S||C,"has-font-size":N||_},a()(r,h,h),a()(r,k,k),r)),F={color:P,fontSize:v},V={color:C,fontSize:_},B=j.prices,T=Object(i.getCurrencyFromPriceResponse)(B),U=B.price!==B.regular_price,J=U?l()((t={},a()(t,"".concat(w,"__product-price__value"),w),a()(t,D,Object(p.E)()),t)):l()((n={},a()(n,"".concat(w,"__product-price__value"),w),a()(n,z,Object(p.E)()),n)),M=U?V:F;return React.createElement(o.a,{align:f,className:E,currency:T,price:B.price,priceClassName:J,priceStyle:Object(p.E)()?M:{},minPrice:null==B||null===(m=B.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==B||null===(d=B.price_range)||void 0===d?void 0:d.max_amount,regularPrice:B.regular_price,regularPriceClassName:l()((b={},a()(b,"".concat(w,"__product-price__regular"),w),a()(b,z,Object(p.E)()),b)),regularPriceStyle:Object(p.E)()?F:{}})}))},45:function(e,c,r){"use strict";var t=r(11),a=r.n(t),n=r(7),l=r.n(n),o=r(14),i=r.n(o),s=r(102),u=r(5),p=r.n(u);r(125);function m(e,c){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter((function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.push.apply(r,t)}return r}function d(e){for(var c=1;c<arguments.length;c++){var r=null!=arguments[c]?arguments[c]:{};c%2?m(Object(r),!0).forEach((function(c){l()(e,c,r[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(r,c))}))}return e}c.a=function(e){var c=e.className,r=e.value,t=e.currency,n=e.onValueChange,l=i()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var o=r/Math.pow(10,t.minorUnit);if(!Number.isFinite(o))return null;var u=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),m=d(d(d({displayType:"text"},l),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(t)),{},{value:void 0,currency:void 0,onValueChange:void 0}),b=n?function(e){var c=e.value*Math.pow(10,t.minorUnit);n(c)}:function(){};return React.createElement(s.a,a()({className:u},m,{value:o,onValueChange:b}))}}}]);
|
build/atomic-block-components/price.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{142:function(e,c,r){"use strict";var t=r(5),a=r.n(t),n=r(0),l=r(1),o=r(55),i=r(8),s=r.n(i),u=(r(2),r(215),function(e){var c=e.className,r=e.currency,t=e.maxPrice,a=e.minPrice,l=e.priceClassName,i=e.priceStyle;return Object(n.createElement)("span",{className:c},Object(n.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:r,value:a,style:i})," — ",Object(n.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:r,value:t,style:i}))}),p=function(e){var c=e.className,r=e.currency,t=e.regularPriceClassName,a=e.regularPriceStyle,i=e.regularPrice,u=e.priceClassName,p=e.priceStyle,m=e.price;return Object(n.createElement)("span",{className:c},Object(n.createElement)("span",{className:"screen-reader-text"},Object(l.__)("Previous price:","woo-gutenberg-products-block")),Object(n.createElement)(o.a,{currency:r,renderText:function(e){return Object(n.createElement)("del",{className:s()("wc-block-components-product-price__regular",t),style:a},e)},value:i}),Object(n.createElement)("span",{className:"screen-reader-text"},Object(l.__)("Discounted price:","woo-gutenberg-products-block")),Object(n.createElement)(o.a,{currency:r,renderText:function(e){return Object(n.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",u),style:p},e)},value:m}))};c.a=function(e){var c=e.align,r=e.className,t=e.currency,l=e.maxPrice,i=void 0===l?null:l,m=e.minPrice,b=void 0===m?null:m,O=e.price,d=void 0===O?null:O,y=e.priceClassName,f=e.priceStyle,j=e.regularPrice,g=e.regularPriceClassName,v=e.regularPriceStyle,N=s()(r,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(c),c));return j&&d!==j?Object(n.createElement)(p,{className:N,currency:t,price:d,priceClassName:y,priceStyle:f,regularPrice:j,regularPriceClassName:g,regularPriceStyle:v}):null!==b&&null!==i?Object(n.createElement)(u,{className:N,currency:t,maxPrice:i,minPrice:b,priceClassName:y,priceStyle:f}):null!==d?Object(n.createElement)("span",{className:N},Object(n.createElement)(o.a,{className:s()("wc-block-components-product-price__value",y),currency:t,value:d,style:f})):Object(n.createElement)("span",{className:N},Object(n.createElement)("span",{className:s()("wc-block-components-product-price__value",y)}))}},178:function(e,c){},215:function(e,c){},520:function(e,c,r){"use strict";r.r(c);var t=r(5),a=r.n(t),n=r(0),l=(r(2),r(8)),o=r.n(l),i=r(142),s=r(63),u=r(39),p=r(22),m=r(6),b=r(66);c.default=Object(b.withProductDataContext)((function(e){var c,r,t,l,b,O,d,y=e.className,f=e.align,j=e.fontSize,g=e.customFontSize,v=e.saleFontSize,N=e.customSaleFontSize,_=e.color,P=e.customColor,S=e.saleColor,C=e.customSaleColor,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,x=o()(y,a()({},"".concat(w,"__product-price"),w));if(!E.id)return Object(n.createElement)(i.a,{align:f,className:x});var h=Object(p.getColorClassName)("color",_),k=Object(p.getFontSizeClass)(j),z=Object(p.getColorClassName)("color",S),V=Object(p.getFontSizeClass)(v),D=o()((c={"has-text-color":_||P,"has-font-size":j||g},a()(c,h,h),a()(c,k,k),c)),F=o()((r={"has-text-color":S||C,"has-font-size":v||N},a()(r,z,z),a()(r,V,V),r)),B={color:P,fontSize:g},T={color:C,fontSize:N},U=E.prices,J=Object(s.getCurrencyFromPriceResponse)(U),M=U.price!==U.regular_price,W=M?o()((t={},a()(t,"".concat(w,"__product-price__value"),w),a()(t,F,Object(m.V)()),t)):o()((l={},a()(l,"".concat(w,"__product-price__value"),w),a()(l,D,Object(m.V)()),l)),I=M?T:B;return Object(n.createElement)(i.a,{align:f,className:x,currency:J,price:U.price,priceClassName:W,priceStyle:Object(m.V)()?I:{},minPrice:null==U||null===(b=U.price_range)||void 0===b?void 0:b.min_amount,maxPrice:null==U||null===(O=U.price_range)||void 0===O?void 0:O.max_amount,regularPrice:U.regular_price,regularPriceClassName:o()((d={},a()(d,"".concat(w,"__product-price__regular"),w),a()(d,D,Object(m.V)()),d)),regularPriceStyle:Object(m.V)()?B:{}})}))},55:function(e,c,r){"use strict";var t=r(11),a=r.n(t),n=r(5),l=r.n(n),o=r(24),i=r.n(o),s=r(0),u=r(170),p=r(8),m=r.n(p);r(178);function b(e,c){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);c&&(t=t.filter((function(c){return Object.getOwnPropertyDescriptor(e,c).enumerable}))),r.push.apply(r,t)}return r}function O(e){for(var c=1;c<arguments.length;c++){var r=null!=arguments[c]?arguments[c]:{};c%2?b(Object(r),!0).forEach((function(c){l()(e,c,r[c])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(c){Object.defineProperty(e,c,Object.getOwnPropertyDescriptor(r,c))}))}return e}c.a=function(e){var c=e.className,r=e.value,t=e.currency,n=e.onValueChange,l=i()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var o=r/Math.pow(10,t.minorUnit);if(!Number.isFinite(o))return null;var p=m()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),b=O(O(O({displayType:"text"},l),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(t)),{},{value:void 0,currency:void 0,onValueChange:void 0}),d=n?function(e){var c=e.value*Math.pow(10,t.minorUnit);n(c)}:function(){};return Object(s.createElement)(u.a,a()({className:p},b,{value:o,onValueChange:d}))}}}]);
|
build/atomic-block-components/rating-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{291:function(t,e){},302:function(t,e,a){"use strict";a.r(e);var c=a(7),n=a.n(c),r=(a(3),a(1)),o=a(5),s=a.n(o),u=a(80),i=a(200),l=(a(291),function(t){var e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0});e.default=Object(i.withProductDataContext)((function(t){var e=t.className,a=Object(u.useInnerBlockLayoutContext)().parentClassName,c=Object(u.useProductDataContext)().product,o=l(c);if(!o)return null;var i={width:o/5*100+"%"},p=Object(r.sprintf)(Object(r.__)("Rated %f out of 5","woo-gutenberg-products-block"),o);return React.createElement("div",{className:s()(e,"wc-block-components-product-rating",n()({},"".concat(a,"__product-rating"),a))},React.createElement("div",{className:s()("wc-block-components-product-rating__stars","".concat(a,"__product-rating__stars")),role:"img","aria-label":p},React.createElement("span",{style:i},p)))}))}}]);
|
build/atomic-block-components/rating.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{521:function(t,e,c){"use strict";c.r(e);var a=c(5),n=c.n(a),r=c(0),o=(c(2),c(1)),s=c(8),u=c.n(s),i=c(39),l=c(66),p=(c(541),function(t){var e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0});e.default=Object(l.withProductDataContext)((function(t){var e=t.className,c=Object(i.useInnerBlockLayoutContext)().parentClassName,a=Object(i.useProductDataContext)().product,s=p(a);if(!s)return null;var l={width:s/5*100+"%"},b=Object(o.sprintf)(Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),s);return Object(r.createElement)("div",{className:u()(e,"wc-block-components-product-rating",n()({},"".concat(c,"__product-rating"),c))},Object(r.createElement)("div",{className:u()("wc-block-components-product-rating__stars","".concat(c,"__product-rating__stars")),role:"img","aria-label":b},Object(r.createElement)("span",{style:l},b)))}))},541:function(t,e){}}]);
|
build/atomic-block-components/sale-badge-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{287:function(e,t){},288:function(e,t,r){"use strict";r.r(t);var c=r(7),n=r.n(c),a=(r(3),r(1)),o=r(5),s=r.n(o),l=r(38),u=r(80),p=r(200);r(287);t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(u.useInnerBlockLayoutContext)().parentClassName,o=Object(u.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:s()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},React.createElement(l.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},38:function(e,t,r){"use strict";var c=r(7),n=r.n(c),a=(r(3),r(2)),o=r(5),s=r.n(o);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,o=e.wrapperProps,l=void 0===o?{}:o,p=null!=r,b=null!=c;return!p&&b?(t=n||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),React.createElement(t,l,c)):(t=n||a.Fragment,p&&b&&r!==c?React.createElement(t,l,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},c)):React.createElement(t,l,r))}}}]);
|
build/atomic-block-components/sale-badge.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{278:function(e,t,r){"use strict";r.r(t);var c=r(5),n=r.n(c),a=r(0),o=(r(2),r(1)),s=r(8),l=r.n(s),u=r(42),b=r(39),p=r(66);r(539);t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(b.useInnerBlockLayoutContext)().parentClassName,s=Object(b.useProductDataContext)().product;if(!s.id||!s.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},Object(a.createElement)(u.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))}))},42:function(e,t,r){"use strict";var c=r(5),n=r.n(c),a=r(0),o=(r(2),r(9)),s=r(8),l=r.n(s);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,s=e.wrapperProps,u=void 0===s?{}:s,p=null!=r,i=null!=c;return!p&&i?(t=n||"span",u=b(b({},u),{},{className:l()(u.className,"screen-reader-text")}),Object(a.createElement)(t,u,c)):(t=n||o.Fragment,p&&i&&r!==c?Object(a.createElement)(t,u,Object(a.createElement)("span",{"aria-hidden":"true"},r),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,u,r))}},539:function(e,t){}}]);
|
build/atomic-block-components/sku-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{295:function(t,c){},305:function(t,c,e){"use strict";e.r(c);var n=e(7),o=e.n(n),a=e(1),u=(e(3),e(5)),s=e.n(u),r=e(80),l=e(200);e(295);c.default=Object(l.withProductDataContext)((function(t){var c=t.className,e=Object(r.useInnerBlockLayoutContext)().parentClassName,n=Object(r.useProductDataContext)().product.sku;return n?React.createElement("div",{className:s()(c,"wc-block-components-product-sku",o()({},"".concat(e,"__product-sku"),e))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",React.createElement("strong",null,n)):null}))}}]);
|
build/atomic-block-components/sku.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{525:function(t,c,e){"use strict";e.r(c);var n=e(5),o=e.n(n),u=e(0),s=e(1),a=(e(2),e(8)),r=e.n(a),l=e(39),b=e(66);e(544);c.default=Object(b.withProductDataContext)((function(t){var c=t.className,e=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product.sku;return n?Object(u.createElement)("div",{className:r()(c,"wc-block-components-product-sku",o()({},"".concat(e,"__product-sku"),e))},Object(s.__)("SKU:","woo-gutenberg-products-block")," ",Object(u.createElement)("strong",null,n)):null}))},544:function(t,c){}}]);
|
build/atomic-block-components/stock-indicator-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{298:function(o,c){},308:function(o,c,t){"use strict";t.r(c);var n=t(7),e=t.n(n),r=t(1),s=(t(3),t(5)),a=t.n(s),i=t(80),u=t(200),k=(t(298),function(o){return Object(r.sprintf)(Object(r.__)("%d left in stock","woo-gutenberg-products-block"),o)}),b=function(o,c){return c?Object(r.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(r.__)("In Stock","woo-gutenberg-products-block"):Object(r.__)("Out of Stock","woo-gutenberg-products-block")};c.default=Object(u.withProductDataContext)((function(o){var c,t=o.className,n=Object(i.useInnerBlockLayoutContext)().parentClassName,r=Object(i.useProductDataContext)().product;if(!r.id||!r.is_purchasable)return null;var s=!!r.is_in_stock,u=r.low_stock_remaining,d=r.is_on_backorder;return React.createElement("div",{className:a()(t,"wc-block-components-product-stock-indicator",(c={},e()(c,"".concat(n,"__stock-indicator"),n),e()(c,"wc-block-components-product-stock-indicator--in-stock",s),e()(c,"wc-block-components-product-stock-indicator--out-of-stock",!s),e()(c,"wc-block-components-product-stock-indicator--low-stock",!!u),e()(c,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),c))},u?k(u):b(s,d))}))}}]);
|
build/atomic-block-components/stock-indicator.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{528:function(o,c,t){"use strict";t.r(c);var n=t(5),e=t.n(n),r=t(0),s=t(1),a=(t(2),t(8)),i=t.n(a),u=t(39),k=t(66),b=(t(547),function(o){return Object(s.sprintf)(Object(s.__)("%d left in stock","woo-gutenberg-products-block"),o)}),d=function(o,c){return c?Object(s.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(s.__)("In Stock","woo-gutenberg-products-block"):Object(s.__)("Out of Stock","woo-gutenberg-products-block")};c.default=Object(k.withProductDataContext)((function(o){var c,t=o.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,s=Object(u.useProductDataContext)().product;if(!s.id||!s.is_purchasable)return null;var a=!!s.is_in_stock,k=s.low_stock_remaining,l=s.is_on_backorder;return Object(r.createElement)("div",{className:i()(t,"wc-block-components-product-stock-indicator",(c={},e()(c,"".concat(n,"__stock-indicator"),n),e()(c,"wc-block-components-product-stock-indicator--in-stock",a),e()(c,"wc-block-components-product-stock-indicator--out-of-stock",!a),e()(c,"wc-block-components-product-stock-indicator--low-stock",!!k),e()(c,"wc-block-components-product-stock-indicator--available-on-backorder",!!l),c))},k?b(k):d(a,l))}))},547:function(o,c){}}]);
|
build/atomic-block-components/summary-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{137:function(t,e,n){"use strict";var c=n(0),r=n(100),o=n(87),a=function(t){var e=t.indexOf("</p>");return-1===e?t:t.substr(0,e+4)},u=function(t){return t.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(t,e){return t.replace(/[\s|\.\,]+$/i,"")+e},i=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",c=u(t),r=c.split(" ").splice(0,e).join(" ");return Object(o.autop)(s(r,n))},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",r=u(t),a=r.slice(0,e);if(n)return Object(o.autop)(s(a,c));var i=a.match(/([\s]+)/g),l=i?i.length:0,p=r.slice(0,e+l);return Object(o.autop)(s(p,c))};e.a=function(t){var e=t.source,n=t.maxLength,u=void 0===n?15:n,s=t.countType,p=void 0===s?"words":s,d=t.className,m=void 0===d?"":d,v=Object(c.useMemo)((function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",c=Object(o.autop)(t),u=Object(r.count)(c,n);if(u<=e)return c;var s=a(c),p=Object(r.count)(s,n);return p<=e?s:"words"===n?i(s,e):l(s,e,"characters_including_spaces"===n)}(e,u,p)}),[e,u,p]);return React.createElement(c.RawHTML,{className:m},v)}},294:function(t,e){},304:function(t,e,n){"use strict";n.r(e);var c=n(7),r=n.n(c),o=(n(3),n(5)),a=n.n(o),u=n(137),s=n(4),i=n(80),l=n(200);n(294);e.default=Object(l.withProductDataContext)((function(t){var e=t.className,n=Object(i.useInnerBlockLayoutContext)().parentClassName,c=Object(i.useProductDataContext)().product;if(!c)return React.createElement("div",{className:a()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n))});var o=c.short_description?c.short_description:c.description;if(!o)return null;var l=Object(s.getSetting)("wordCountType","words");return React.createElement(u.a,{className:a()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:o,maxLength:150,countType:l})}))}}]);
|
build/atomic-block-components/summary.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{167:function(t,e,n){"use strict";var c=n(0),r=n(135),o=n(89),a=function(t){var e=t.indexOf("</p>");return-1===e?t:t.substr(0,e+4)},u=function(t){return t.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(t,e){return t.replace(/[\s|\.\,]+$/i,"")+e},i=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",c=u(t),r=c.split(" ").splice(0,e).join(" ");return Object(o.autop)(s(r,n))},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",r=u(t),a=r.slice(0,e);if(n)return Object(o.autop)(s(a,c));var i=a.match(/([\s]+)/g),l=i?i.length:0,p=r.slice(0,e+l);return Object(o.autop)(s(p,c))};e.a=function(t){var e=t.source,n=t.maxLength,u=void 0===n?15:n,s=t.countType,p=void 0===s?"words":s,d=t.className,m=void 0===d?"":d,v=Object(c.useMemo)((function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",c=Object(o.autop)(t),u=Object(r.count)(c,n);if(u<=e)return c;var s=a(c),p=Object(r.count)(s,n);return p<=e?s:"words"===n?i(s,e):l(s,e,"characters_including_spaces"===n)}(e,u,p)}),[e,u,p]);return Object(c.createElement)(c.RawHTML,{className:m},v)}},524:function(t,e,n){"use strict";n.r(e);var c=n(5),r=n.n(c),o=n(0),a=(n(2),n(8)),u=n.n(a),s=n(167),i=n(3),l=n(39),p=n(66);n(543);e.default=Object(p.withProductDataContext)((function(t){var e=t.className,n=Object(l.useInnerBlockLayoutContext)().parentClassName,c=Object(l.useProductDataContext)().product;if(!c)return Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n))});var a=c.short_description?c.short_description:c.description;if(!a)return null;var p=Object(i.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:a,maxLength:150,countType:p})}))},543:function(t,e){}}]);
|
build/atomic-block-components/tag-list-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{297:function(t,e){},307:function(t,e,c){"use strict";c.r(e);var a=c(7),n=c.n(a),o=c(1),s=(c(3),c(5)),l=c.n(s),u=c(80),r=c(8),i=c(200);c(297);e.default=Object(i.withProductDataContext)((function(t){var e=t.className,c=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;return Object(r.isEmpty)(a.tags)?null:React.createElement("div",{className:l()(e,"wc-block-components-product-tag-list",n()({},"".concat(c,"__product-tag-list"),c))},Object(o.__)("Tags:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(a.tags).map((function(t){var e=t.name,c=t.link,a=t.slug;return React.createElement("li",{key:"tag-list-item-".concat(a)},React.createElement("a",{href:c},e))}))))}))}}]);
|
build/atomic-block-components/tag-list.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{527:function(t,e,c){"use strict";c.r(e);var n=c(5),a=c.n(n),o=c(0),s=c(1),l=(c(2),c(8)),u=c.n(l),r=c(39),i=c(7),b=c(66);c(546);e.default=Object(b.withProductDataContext)((function(t){var e=t.className,c=Object(r.useInnerBlockLayoutContext)().parentClassName,n=Object(r.useProductDataContext)().product;return Object(i.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-tag-list",a()({},"".concat(c,"__product-tag-list"),c))},Object(s.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(t){var e=t.name,c=t.link,n=t.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:c},e))}))))}))},546:function(t,e){}}]);
|
build/atomic-block-components/title-frontend.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{133:function(e,t,c){"use strict";var n=c(11),o=c.n(n),r=c(14),a=c.n(r),i=(c(3),c(22)),s=c(5),l=c.n(s);c(153);t.a=function(e){var t=e.className,c=void 0===t?"":t,n=e.disabled,r=void 0!==n&&n,s=e.name,u=e.permalink,p=void 0===u?"":u,b=a()(e,["className","disabled","name","permalink"]),f=l()("wc-block-components-product-name",c);return r?React.createElement("span",o()({className:f},b),Object(i.decodeEntities)(s)):React.createElement("a",o()({className:f,href:p},b),Object(i.decodeEntities)(s))}},153:function(e,t){},191:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var n=function(e,t){var c=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":c[n]="false"!==t[n]&&!1!==t[n];break;case"number":c[n]=parseInt(t[n],10);break;case"array":case"object":c[n]=JSON.parse(t[n]);break;default:c[n]=t[n]}else c[n]=e[n].default})),c}},286:function(e,t,c){"use strict";var n=c(11),o=c.n(n),r=c(191);t.a=function(e){return function(t){return function(c){var n=Object(r.a)(e,c);return React.createElement(t,o()({},c,n))}}}},290:function(e,t){},310:function(e,t,c){"use strict";c.r(t);var n=c(286),o=c(7),r=c.n(o),a=(c(3),c(5)),i=c.n(a),s=c(80),l=c(203),u=c(9),p=function(e){var t=e.color,c=e.fontSize;return Object(u.E)()?{color:t,fontSize:c}:{}},b=c(200),f=c(133),d=(c(290),Object(b.withProductDataContext)((function(e){var t,c,n,o=e.className,a=e.headingLevel,b=void 0===a?2:a,d=e.productLink,m=void 0===d||d,O=e.align,j=e.color,y=e.customColor,v=e.fontSize,k=e.customFontSize,w=Object(s.useInnerBlockLayoutContext)().parentClassName,g=Object(s.useProductDataContext)().product,E="h".concat(b),h=Object(l.getColorClassName)("color",j),S=Object(l.getFontSizeClass)(v),N=i()((t={"has-text-color":j||y,"has-font-size":v||k},r()(t,h,h),r()(t,S,S),t));return g.id?React.createElement(E,{className:i()(o,"wc-block-components-product-title",(c={},r()(c,"".concat(w,"__product-title"),w),r()(c,"wc-block-components-product-title--align-".concat(O),O&&Object(u.E)()),c))},React.createElement(f.a,{className:i()(r()({},N,Object(u.E)())),disabled:!m,name:g.name,permalink:g.permalink,rel:m?"nofollow":null,style:p({color:y,fontSize:k})})):React.createElement(E,{className:i()(o,"wc-block-components-product-title",(n={},r()(n,"".concat(w,"__product-title"),w),r()(n,"wc-block-components-product-title--align-".concat(O),O&&Object(u.E)()),r()(n,N,Object(u.E)()),n)),style:p({color:y,fontSize:k})})})));function m(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function O(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?m(Object(c),!0).forEach((function(t){r()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):m(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var j={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(u.E)()&&(j=O(O({},j),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}));var y=j;t.default=Object(n.a)(y)(d)}}]);
|
build/atomic-block-components/title.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{166:function(e,t,c){"use strict";var o=c(11),n=c.n(o),r=c(24),a=c.n(r),i=c(0),l=(c(2),c(28)),s=c(8),u=c.n(s);c(214);t.a=function(e){var t=e.className,c=void 0===t?"":t,o=e.disabled,r=void 0!==o&&o,s=e.name,p=e.permalink,b=void 0===p?"":p,d=a()(e,["className","disabled","name","permalink"]),m=u()("wc-block-components-product-name",c);return r?Object(i.createElement)("span",n()({className:m},d),Object(l.decodeEntities)(s)):Object(i.createElement)("a",n()({className:m,href:b},d),Object(l.decodeEntities)(s))}},214:function(e,t){},378:function(e,t,c){"use strict";var o=c(5),n=c.n(o),r=c(6);function a(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,o)}return c}function i(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?a(Object(c),!0).forEach((function(t){n()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var l={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(r.V)()&&(l=i(i({},l),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=l},385:function(e,t,c){"use strict";var o=c(5),n=c.n(o),r=c(0),a=(c(2),c(8)),i=c.n(a),l=c(39),s=c(22),u=c(6),p=function(e){var t=e.color,c=e.fontSize;return Object(u.V)()?{color:t,fontSize:c}:{}},b=c(66),d=c(166);c(538),t.a=Object(b.withProductDataContext)((function(e){var t,c,o,a=e.className,b=e.headingLevel,m=void 0===b?2:b,O=e.productLink,f=void 0===O||O,j=e.align,y=e.color,g=e.customColor,v=e.fontSize,w=e.customFontSize,k=Object(l.useInnerBlockLayoutContext)().parentClassName,h=Object(l.useProductDataContext)().product,S="h".concat(m),z=Object(s.getColorClassName)("color",y),N=Object(s.getFontSizeClass)(v),P=i()((t={"has-text-color":y||g,"has-font-size":v||w},n()(t,z,z),n()(t,N,N),t));return h.id?Object(r.createElement)(S,{className:i()(a,"wc-block-components-product-title",(c={},n()(c,"".concat(k,"__product-title"),k),n()(c,"wc-block-components-product-title--align-".concat(j),j&&Object(u.V)()),c))},Object(r.createElement)(d.a,{className:i()(n()({},P,Object(u.V)())),disabled:!f,name:h.name,permalink:h.permalink,rel:f?"nofollow":null,style:p({color:g,fontSize:w})})):Object(r.createElement)(S,{className:i()(a,"wc-block-components-product-title",(o={},n()(o,"".concat(k,"__product-title"),k),n()(o,"wc-block-components-product-title--align-".concat(j),j&&Object(u.V)()),n()(o,P,Object(u.V)()),o)),style:p({color:g,fontSize:w})})}))},538:function(e,t){},934:function(e,t,c){"use strict";c.r(t);var o=c(932),n=c(385),r=c(378);t.default=Object(o.a)(r.a)(n.a)}}]);
|
build/attribute-filter-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '601de5f8b6372ad81a669988a8add394');
|
build/attribute-filter-frontend.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=223)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"u",(function(){return i})),n.d(t,"y",(function(){return c})),n.d(t,"r",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return p})),n.d(t,"l",(function(){return d})),n.d(t,"k",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return g})),n.d(t,"C",(function(){return h})),n.d(t,"D",(function(){return v})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return w})),n.d(t,"b",(function(){return j})),n.d(t,"q",(function(){return S})),n.d(t,"g",(function(){return E})),n.d(t,"x",(function(){return k})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return R})),n.d(t,"s",(function(){return P})),n.d(t,"B",(function(){return C})),n.d(t,"A",(function(){return D})),n.d(t,"d",(function(){return T})),n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return A})),n.d(t,"p",(function(){return H})),n.d(t,"E",(function(){return N}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),p=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),d=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),f=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),g=Object(r.getSetting)("isShippingCalculatorEnabled",!0),m=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),h=Object(r.getSetting)("wcBlocksAssetUrl",""),v=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),w=Object(r.getSetting)("shippingStates",{}),j=Object(r.getSetting)("allowedStates",{}),S=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),E=Object(r.getSetting)("checkoutShowLoginReminder",!0),I={id:0,title:"",permalink:""},x=Object(r.getSetting)("storePages",{shop:I,cart:I,checkout:I,privacy:I,terms:I}),k=x.shop.permalink,_=(x.checkout.id,x.checkout.permalink),R=x.privacy.permalink,P=x.privacy.title,C=x.terms.permalink,D=x.terms.title,T=(x.cart.id,x.cart.permalink),M=Object(r.getSetting)("checkoutAllowsGuest",!1),A=Object(r.getSetting)("checkoutAllowsSignup",!1),H=Object(r.getSetting)("loginUrl","/wp-login.php"),N=(n(40),function(){return m>1})},function(e,t,n){var r=n(81),o=n(82),i=n(58),c=n(83);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(60);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,,,,,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,,function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},,,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(69);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(29),o=n(21);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){!function(){e.exports=this.wp.a11y}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(22),i=n.n(o),c=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=(n(3),n(2)),c=n(5),a=n.n(c);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,u=void 0===c?{}:c,l=null!=n,p=null!=r;return!l&&p?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||i.Fragment,l&&p&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t){!function(){e.exports=this.wp.blocks}()},,,function(e,t,n){"use strict";var r=n(32),o=n.n(r),i=n(33),c=n.n(i),a=n(21),u=n.n(a),s=n(34),l=n.n(s),p=n(35),d=n.n(p),f=n(25),b=n.n(f),g=n(7),m=n.n(g),h=(n(3),n(2)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,i=e.text,c=void 0===i?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):i,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),c&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},c),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(72);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var j=function(e){l()(n,e);var t=w(n);function n(){var e;o()(this,n);for(var r=arguments.length,i=new Array(r),c=0;c<r;c++)i[c]=arguments[c];return e=t.call.apply(t,[this].concat(i)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,i=e.errorMessagePrefix,c=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof c?c({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:i}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);j.defaultProps={showErrorMessage:!0};t.a=j},function(e,t,n){var r=n(94),o=n(95),i=n(58),c=n(96);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},,,,,,,,,,,,,,function(e,t,n){var r=n(59);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(10),o=n.n(r),i=n(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return Object(i.useCallback)((function(e){return t((function(){throw e}))}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(o)};o.Provider},,,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(71);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,,,,,,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),a=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),p=Object(r.useRef)(!1),d=Object(r.useRef)(e);d.current=e;var f=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,c.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var b=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!a||s.current||(d.current.apply(d,e),s.current=!0),l.current=setTimeout((function(){var t=!0;a&&s.current&&(t=!1),f(),!p.current&&u&&t&&d.current.apply(d,e)}),t),o&&!i.current&&u&&(i.current=setTimeout((function(){var e=c.current;f(),p.current||d.current.apply(null,e)}),o))}),[o,t,f,a,u]),g=Object(r.useCallback)((function(){l.current&&(d.current.apply(null,c.current),f())}),[f]);return[b,f,g]}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return g}));var r=n(10),o=n.n(r),i=n(15),c=n(12),a=n(0),u=n(66),s=n(22),l=n.n(s),p=n(38),d=n(62),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},b=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(c.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},g=function(e,t){var n=Object(u.a)(),r=f(t=t||n),i=o()(r,2),c=i[0],s=i[1],b=Object(p.a)(c),g=Object(p.a)(e),m=Object(d.a)(g),h=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(m,g)||(s(Object.assign({},b,g)),h.current=!0)}),[b,g,m,s]),h.current?[c,s]:[e,s]}},,,function(e,t,n){var r=n(59);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(12),i=n(0),c=n(38),a=n(61),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,d=e.shouldSelect,f=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(i.useRef)({results:[],isLoading:!0}),g=Object(c.a)(p),m=Object(c.a)(s),h=Object(a.a)(),v=Object(o.useSelect)((function(e){if(!f)return null;var o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],c=o.getCollectionError.apply(o,i);return c&&h(c),{results:o.getCollection.apply(o,i),isLoading:!o.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,f]);return null!==v&&(b.current=v),b.current}},,,,,function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function i(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function c(e,t,n,r,o,i,c,a){return i<e&&c>t||i>e&&c<t?0:i<=e&&a<=n||c>=t&&a>=n?i-e-r:c>t&&a<n||i<e&&a>n?c-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,a=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,p="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],b=e;r(b)&&p(b);){if((b=b.parentNode)===d){f.push(b);break}b===document.body&&i(b)&&!i(document.documentElement)||i(b,l)&&f.push(b)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,w=y.width,j=y.top,S=y.right,E=y.bottom,I=y.left,x="start"===a||"nearest"===a?j:"end"===a?E:j+O/2,k="center"===u?I+w/2:"end"===u?S:I,_=[],R=0;R<f.length;R++){var P=f[R],C=P.getBoundingClientRect(),D=C.height,T=C.width,M=C.top,A=C.right,H=C.bottom,N=C.left;if("if-needed"===o&&j>=0&&I>=0&&E<=m&&S<=g&&j>=M&&E<=H&&I>=N&&S<=A)return _;var L=getComputedStyle(P),B=parseInt(L.borderLeftWidth,10),V=parseInt(L.borderTopWidth,10),K=parseInt(L.borderRightWidth,10),F=parseInt(L.borderBottomWidth,10),U=0,q=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-B-K:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-F:0;if(d===P)U="start"===a?x:"end"===a?x-m:"nearest"===a?c(v,v+m,m,V,F,v+x,v+x+O,O):x-m/2,q="start"===u?k:"center"===u?k-g/2:"end"===u?k-g:c(h,h+g,g,B,K,h+k,h+k+w,w),U=Math.max(0,U+v),q=Math.max(0,q+h);else{U="start"===a?x-M-V:"end"===a?x-H+F+W:"nearest"===a?c(M,H,D,V,F+W,x,x+O,O):x-(M+D/2)+W/2,q="start"===u?k-N-B:"center"===u?k-(N+T/2)+$/2:"end"===u?k-A+K+$:c(N,A,T,B,K+$,k,k+w,w);var Y=P.scrollLeft,z=P.scrollTop;x+=z-(U=Math.max(0,Math.min(z+U,P.scrollHeight-D+W))),k+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollWidth-T+$)))}_.push({el:P,top:U,left:q})}return _}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),i=n(7),c=n.n(i),a=n(0),u=n(43);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=[".wp-block-woocommerce-cart"],d=function(e){var t=e.Block,n=e.containers,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=i(e,n),c=s(e,n),p=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,c,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:p})))),e)}))},f=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,i=e.wrappers,c=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),d({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(p.join(","));f(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,i,c,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,i=n.getErrorBoundaryProps,c=n.selector,a=n.wrapper.querySelectorAll(c),d({Block:r,containers:a,getProps:o,getErrorBoundaryProps:i})}))}))}},,,function(e,t){},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=n(28),u=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=n(14),c=n.n(i),a=n(2);n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=c()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},,function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(15),c=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(c.useSelect)((function(e,t){if(n.current){var r=e(i.SCHEMA_STORE_KEY),o=r.isResolving,c=r.hasFinishedResolution,a=t.dispatch(i.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||c("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),o=n(89);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,a=Object(r.useState)(e),u=a[0],s=a[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),p=l[0],d=l[1],f=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){c(b.current,e)||(p(e),b.current=e)}),[e,p,c]),[u,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(5)),i=n.n(o),c=n(39),a=(n(161),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(r.__)("Apply filter","woo-gutenberg-products-block"):s;return React.createElement("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:u},React.createElement(c.a,{label:a,screenReaderLabel:l}))});a.defaultProps={disabled:!1},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(9),o=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return o.find((function(t){return t.id===e}))},c=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(8),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),c=i.length?i[0]:null;if(c&&c.slug&&Array.isArray(c.slug)&&c.slug.includes(o)){var a=c.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(c.slug=a.sort(),u.push(c)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",c=e.filter((function(e){return e.attribute!==n.taxonomy}));0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(o,"slug").sort()}),t(Object(r.sortBy)(c,"attribute")))}},,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=(n(3),n(5)),u=n.n(a),s=n(1),l=n(129),p=n(128),d=(n(110),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,a=void 0===i?"li":i,s=e.className,l=void 0===s?"":s,p=e.radius,d=void 0===p?"small":p,f=e.children,b=void 0===f?null:f,g=c()(e,["text","screenReaderText","element","className","radius","children"]),m=a,h=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+d),v=Boolean(r&&r!==t);return React.createElement(m,o()({className:h},g),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,b=e.onRemove,g=void 0===b?function(){}:b,m=e.removeOnAnyClick,h=void 0!==m&&m,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,w=c()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),j=h?"span":"button";if(!n){var S=O&&"string"==typeof O?O:v;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var E={"aria-label":n,disabled:f,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},I=h?E:{},x=h?{"aria-hidden":!0}:E;return React.createElement(d,o()({},w,I,{className:u()(i,"is-removable"),element:h?"button":w.element,screenReaderText:O,text:v}),React.createElement(j,o()({className:"wc-block-components-chip__remove"},x),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";e.exports=n(226)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(7),o=n.n(r),i=n(44),c=n.n(i),a=n(29),u=n.n(a),s=n(10),l=n.n(s),p=n(0),d=n(66),f=n(140),b=n(8),g=n(38),m=n(91),h=n(98);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,o=Object(d.a)();o="".concat(o,"-collection-data");var i=Object(m.a)(o),a=l()(i,1)[0],s=Object(m.b)("calculate_attribute_counts",[],o),v=l()(s,2),O=v[0],w=v[1],j=Object(m.b)("calculate_price_range",null,o),S=l()(j,2),E=S[0],I=S[1],x=Object(g.a)(t||{}),k=Object(g.a)(n);Object(p.useEffect)((function(){"object"===u()(x)&&Object.keys(x).length&&(O.find((function(e){return e.taxonomy===x.taxonomy}))||w([].concat(c()(O),[x])))}),[x,O,w]),Object(p.useEffect)((function(){E!==k&&void 0!==k&&I(k)}),[k,I,E]);var _=Object(p.useState)(!1),R=l()(_,2),P=R[0],C=R[1],D=Object(f.a)(P,200),T=l()(D,1)[0];P||C(!0);var M=Object(p.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(b.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(a)}),[a]);return Object(h.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:y(y({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},M),shouldSelect:T})}},,function(e,t,n){e.exports=n(273)},function(e,t){},function(e,t){},function(e,t,n){"use strict";
|
7 |
/** @license React v17.0.1
|
8 |
* react-is.production.min.js
|
9 |
*
|
@@ -11,4 +11,4 @@
|
|
11 |
*
|
12 |
* This source code is licensed under the MIT license found in the
|
13 |
* LICENSE file in the root directory of this source tree.
|
14 |
-
*/var r=60103,o=60106,i=60107,c=60108,a=60114,u=60109,s=60110,l=60112,p=60113,d=60120,f=60115,b=60116,g=60121,m=60122,h=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var O=Symbol.for;r=O("react.element"),o=O("react.portal"),i=O("react.fragment"),c=O("react.strict_mode"),a=O("react.profiler"),u=O("react.provider"),s=O("react.context"),l=O("react.forward_ref"),p=O("react.suspense"),d=O("react.suspense_list"),f=O("react.memo"),b=O("react.lazy"),g=O("react.block"),m=O("react.server.block"),h=O("react.fundamental"),v=O("react.debug_trace_mode"),y=O("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case a:case c:case p:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case b:case f:case u:return e;default:return t}}case o:return t}}}var j=u,S=r,E=l,I=i,x=b,k=f,_=o,R=a,P=c,C=p;t.ContextConsumer=s,t.ContextProvider=j,t.Element=S,t.ForwardRef=E,t.Fragment=I,t.Lazy=x,t.Memo=k,t.Portal=_,t.Profiler=R,t.StrictMode=P,t.Suspense=C,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return w(e)===s},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===l},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===b},t.isMemo=function(e){return w(e)===f},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===c},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===v||e===c||e===p||e===d||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===f||e.$$typeof===u||e.$$typeof===s||e.$$typeof===l||e.$$typeof===h||e.$$typeof===g||e[0]===m)},t.typeOf=w},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(131),o=n(107),i=n(7),c=n.n(i),a=n(10),u=n.n(a),s=n(1),l=n(36),p=n(91),d=n(98),f=n(221),b=n(38),g=n(62),m=n(0),h=n(44),v=n.n(h),y=n(3),O=n.n(y),w=n(5),j=n.n(w),S=(n(227),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,o=e.options,i=void 0===o?[]:o,c=e.checked,a=void 0===c?[]:c,l=e.isLoading,p=void 0!==l&&l,d=e.isDisabled,f=void 0!==d&&d,b=e.limit,g=void 0===b?10:b,h=Object(m.useState)(!1),y=u()(h,2),O=y[0],w=y[1],S=Object(m.useMemo)((function(){return v()(Array(5)).map((function(e,t){return React.createElement("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),E=Object(m.useMemo)((function(){var e=i.length-g;return!O&&React.createElement("li",{key:"show-more",className:"show-more"},React.createElement("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(s.sprintf)(Object(s._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(s.sprintf)(Object(s._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[i,g,O]),I=Object(m.useMemo)((function(){return O&&React.createElement("li",{key:"show-less",className:"show-less"},React.createElement("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(s.__)("Show less options","woo-gutenberg-products-block")},Object(s.__)("Show less","woo-gutenberg-products-block")))}),[O]),x=Object(m.useMemo)((function(){var e=i.length>g+5;return React.createElement(React.Fragment,null,i.map((function(t,n){return React.createElement(m.Fragment,{key:t.value},React.createElement("li",e&&!O&&n>=g&&{hidden:!0},React.createElement("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:a.includes(t.value),disabled:f}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===g-1&&E)})),e&&I)}),[i,r,a,O,g,I,E,f]),k=j()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":p},t);return React.createElement("ul",{className:k},p?S:x)}),E=n(24),I=n(6),x=n(13),k=n(103),_=n(2),R=(n(184),n(104)),P=0;function C(e){return"function"==typeof e?e:D}function D(){}function T(e,t){e&&Object(R.a)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function M(e,t){return e===t||t instanceof Node&&e.contains&&e.contains(t)}function A(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function N(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function L(){return String(P++)}function B(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function V(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function K(e){return"string"==typeof e.type}function F(e){return e.props}var U=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function q(e){void 0===e&&(e={});var t={};return U.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function $(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=W(t,r)?t[r]:e[r],n}),{})}function W(e,t){return void 0!==e[t]}function Y(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function z(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var c=t+e;c<0?c=o?i:0:c>i&&(c=o?0:i);var a=Q(e,c,n,r,o);return-1===a?t>=n?-1:t:a}function Q(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var c=t+1;c<n;c++)if(!r(c).hasAttribute("disabled"))return c}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return o?e>0?Q(1,0,n,r,!1):Q(-1,n-1,n,r,!1):-1}function G(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(M(t,e)||r&&M(t,n.activeElement))}))}var X=A((function(e){Z(e).textContent=""}),500);function J(e,t){var n=Z(t);e&&(n.textContent=e,X(t))}function Z(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var ee=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),te=function(){var e=function(e){function t(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+L(),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=q(t),n.internalSetState(Object(I.a)({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=q(t),n.internalSetState(Object(I.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},c="function"==typeof e;return!c&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,Object(I.a)({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var a=c?e(t):e;a=n.props.stateReducer(t,a),r=a.hasOwnProperty("selectedItem");var u={};return r&&a.selectedItem!==t.selectedItem&&(o=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((function(e){t[e]!==a[e]&&(i[e]=a[e]),"type"!==e&&(a[e],W(n.props,e)||(u[e]=a[e]))})),c&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,Object(I.a)({},n.getStateAndHelpers(),a)),u}),(function(){C(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,c=void 0===i?"ref":i,a=o.ref,u=Object(E.a)(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=c,n.getRootProps.suppressRefError=l;var p=n.getState().isOpen;return Object(I.a)(((r={})[c]=N(a,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),u)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=z(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=z(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(Object(I.a)({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=Object(I.a)({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=Object(I.a)({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=Q(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=Q(-1,r-1,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick,o=(t.onPress,t.onKeyDown),i=t.onKeyUp,c=t.onBlur,a=Object(E.a)(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),u=n.getState().isOpen,s={onClick:H(r,n.buttonHandleClick),onKeyDown:H(o,n.buttonHandleKeyDown),onKeyUp:H(i,n.buttonHandleKeyUp),onBlur:H(c,n.buttonHandleBlur)},l=a.disabled?{}:s;return Object(I.a)({type:"button",role:"button","aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,a)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=Y(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(Object(x.a)(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return Object(I.a)({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,c=t.onInput,a=(t.onChangeText,Object(E.a)(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),u={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;a.disabled||((s={}).onChange=H(i,c,n.inputHandleChange),s.onKeyDown=H(r,n.inputHandleKeyDown),s.onBlur=H(o,n.inputHandleBlur),u=s);return Object(I.a)({"aria-autocomplete":"list","aria-activedescendant":d&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":d?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},u,a)},n.inputHandleKeyDown=function(e){var t=Y(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(Object(x.a)(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,c=void 0===i?"ref":i,a=o.ref,u=Object(E.a)(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=c,n.getMenuProps.suppressRefError=l,Object(I.a)(((r={})[c]=N(a,n.menuRef),r.role="listbox",r["aria-labelledby"]=u&&u["aria-label"]?null:n.labelId,r.id=n.menuId,r),u)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick,a=(r.onPress,r.index),u=r.item,s=void 0===u?void 0:u,l=Object(E.a)(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===a?(n.items.push(s),a=n.items.indexOf(s)):n.items[a]=s;var p=c,d=((t={onMouseMove:H(o,(function(){a!==n.getState().highlightedIndex&&(n.setHighlightedIndex(a,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:H(i,(function(e){e.preventDefault()}))}).onClick=H(p,(function(){n.selectItemAtIndex(a,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return Object(I.a)({id:n.getItemId(a),role:"option","aria-selected":n.getState().highlightedIndex===a},f,l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=q(e),n.internalSetState((function(t){var r=t.selectedItem;return Object(I.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=q(e),n.internalSetState((function(t){var r=t.isOpen;return Object(I.a)({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),C(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=A((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(Object(I.a)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,J(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,c=void 0===i?o:i,a=r.defaultIsOpen,u=r.initialIsOpen,s=void 0===u?a:u,l=r.initialInputValue,p=void 0===l?"":l,d=r.initialSelectedItem,f=void 0===d?null:d,b=n.getState({highlightedIndex:c,isOpen:s,inputValue:p,selectedItem:f});return null!=b.selectedItem&&void 0===n.props.initialInputValue&&(b.inputValue=n.props.itemToString(b.selectedItem)),n.state=b,n}Obj
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=223)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(71)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t,n){var r;
|
2 |
/*!
|
3 |
Copyright (c) 2017 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"u",(function(){return i})),n.d(t,"y",(function(){return c})),n.d(t,"r",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return p})),n.d(t,"l",(function(){return d})),n.d(t,"k",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return g})),n.d(t,"C",(function(){return h})),n.d(t,"D",(function(){return v})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return w})),n.d(t,"b",(function(){return j})),n.d(t,"q",(function(){return S})),n.d(t,"g",(function(){return E})),n.d(t,"x",(function(){return k})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return R})),n.d(t,"s",(function(){return P})),n.d(t,"B",(function(){return C})),n.d(t,"A",(function(){return D})),n.d(t,"d",(function(){return T})),n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return A})),n.d(t,"p",(function(){return H})),n.d(t,"E",(function(){return N}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),p=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),d=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),f=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),g=Object(r.getSetting)("isShippingCalculatorEnabled",!0),m=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),h=Object(r.getSetting)("wcBlocksAssetUrl",""),v=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),w=Object(r.getSetting)("shippingStates",{}),j=Object(r.getSetting)("allowedStates",{}),S=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),E=Object(r.getSetting)("checkoutShowLoginReminder",!0),I={id:0,title:"",permalink:""},x=Object(r.getSetting)("storePages",{shop:I,cart:I,checkout:I,privacy:I,terms:I}),k=x.shop.permalink,_=(x.checkout.id,x.checkout.permalink),R=x.privacy.permalink,P=x.privacy.title,C=x.terms.permalink,D=x.terms.title,T=(x.cart.id,x.cart.permalink),M=Object(r.getSetting)("checkoutAllowsGuest",!1),A=Object(r.getSetting)("checkoutAllowsSignup",!1),H=Object(r.getSetting)("loginUrl","/wp-login.php"),N=(n(40),function(){return m>1})},function(e,t,n){var r=n(82),o=n(83),i=n(59),c=n(84);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(61);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,,,,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,,function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.primitives}()},,,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(70);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(27),o=n(20);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},,function(e,t){!function(){e.exports=this.wp.a11y}()},,function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=(n(3),n(2)),c=n(5),a=n.n(c);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,u=void 0===c?{}:c,l=null!=n,p=null!=r;return!l&&p?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||i.Fragment,l&&p&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(21),i=n.n(o),c=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},function(e,t){!function(){e.exports=this.wp.blocks}()},,,function(e,t,n){"use strict";var r=n(31),o=n.n(r),i=n(32),c=n.n(i),a=n(20),u=n.n(a),s=n(33),l=n.n(s),p=n(34),d=n.n(p),f=n(24),b=n.n(f),g=n(7),m=n.n(g),h=(n(3),n(2)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,i=e.text,c=void 0===i?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):i,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),c&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},c),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(73);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var j=function(e){l()(n,e);var t=w(n);function n(){var e;o()(this,n);for(var r=arguments.length,i=new Array(r),c=0;c<r;c++)i[c]=arguments[c];return e=t.call.apply(t,[this].concat(i)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,i=e.errorMessagePrefix,c=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof c?c({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:i}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);j.defaultProps={showErrorMessage:!0};t.a=j},,,,function(e,t,n){var r=n(95),o=n(96),i=n(59),c=n(97);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},,,,,,,,,,,,function(e,t,n){var r=n(60);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(10),o=n.n(r),i=n(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return Object(i.useCallback)((function(e){return t((function(){throw e}))}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(o)};o.Provider},,,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(72);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,,,,,,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),a=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),p=Object(r.useRef)(!1),d=Object(r.useRef)(e);d.current=e;var f=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,c.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var b=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!a||s.current||(d.current.apply(d,e),s.current=!0),l.current=setTimeout((function(){var t=!0;a&&s.current&&(t=!1),f(),!p.current&&u&&t&&d.current.apply(d,e)}),t),o&&!i.current&&u&&(i.current=setTimeout((function(){var e=c.current;f(),p.current||d.current.apply(null,e)}),o))}),[o,t,f,a,u]),g=Object(r.useCallback)((function(){l.current&&(d.current.apply(null,c.current),f())}),[f]);return[b,f,g]}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return g}));var r=n(10),o=n.n(r),i=n(15),c=n(12),a=n(0),u=n(67),s=n(21),l=n.n(s),p=n(39),d=n(63),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},b=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(c.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},g=function(e,t){var n=Object(u.a)(),r=f(t=t||n),i=o()(r,2),c=i[0],s=i[1],b=Object(p.a)(c),g=Object(p.a)(e),m=Object(d.a)(g),h=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(m,g)||(s(Object.assign({},b,g)),h.current=!0)}),[b,g,m,s]),h.current?[c,s]:[e,s]}},,,function(e,t,n){var r=n(60);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(12),i=n(0),c=n(39),a=n(62),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,d=e.shouldSelect,f=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(i.useRef)({results:[],isLoading:!0}),g=Object(c.a)(p),m=Object(c.a)(s),h=Object(a.a)(),v=Object(o.useSelect)((function(e){if(!f)return null;var o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],c=o.getCollectionError.apply(o,i);return c&&h(c),{results:o.getCollection.apply(o,i),isLoading:!o.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,f]);return null!==v&&(b.current=v),b.current}},,,,,function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function i(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function c(e,t,n,r,o,i,c,a){return i<e&&c>t||i>e&&c<t?0:i<=e&&a<=n||c>=t&&a>=n?i-e-r:c>t&&a<n||i<e&&a>n?c-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,a=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,p="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],b=e;r(b)&&p(b);){if((b=b.parentNode)===d){f.push(b);break}b===document.body&&i(b)&&!i(document.documentElement)||i(b,l)&&f.push(b)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,w=y.width,j=y.top,S=y.right,E=y.bottom,I=y.left,x="start"===a||"nearest"===a?j:"end"===a?E:j+O/2,k="center"===u?I+w/2:"end"===u?S:I,_=[],R=0;R<f.length;R++){var P=f[R],C=P.getBoundingClientRect(),D=C.height,T=C.width,M=C.top,A=C.right,H=C.bottom,N=C.left;if("if-needed"===o&&j>=0&&I>=0&&E<=m&&S<=g&&j>=M&&E<=H&&I>=N&&S<=A)return _;var L=getComputedStyle(P),B=parseInt(L.borderLeftWidth,10),V=parseInt(L.borderTopWidth,10),K=parseInt(L.borderRightWidth,10),F=parseInt(L.borderBottomWidth,10),U=0,q=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-B-K:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-F:0;if(d===P)U="start"===a?x:"end"===a?x-m:"nearest"===a?c(v,v+m,m,V,F,v+x,v+x+O,O):x-m/2,q="start"===u?k:"center"===u?k-g/2:"end"===u?k-g:c(h,h+g,g,B,K,h+k,h+k+w,w),U=Math.max(0,U+v),q=Math.max(0,q+h);else{U="start"===a?x-M-V:"end"===a?x-H+F+W:"nearest"===a?c(M,H,D,V,F+W,x,x+O,O):x-(M+D/2)+W/2,q="start"===u?k-N-B:"center"===u?k-(N+T/2)+$/2:"end"===u?k-A+K+$:c(N,A,T,B,K+$,k,k+w,w);var Y=P.scrollLeft,z=P.scrollTop;x+=z-(U=Math.max(0,Math.min(z+U,P.scrollHeight-D+W))),k+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollWidth-T+$)))}_.push({el:P,top:U,left:q})}return _}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),i=n(7),c=n.n(i),a=n(0),u=n(43);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=[".wp-block-woocommerce-cart"],d=function(e){var t=e.Block,n=e.containers,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=i(e,n),c=s(e,n),p=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,c,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:p})))),e)}))},f=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,i=e.wrappers,c=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),d({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(p.join(","));f(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,i,c,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,i=n.getErrorBoundaryProps,c=n.selector,a=n.wrapper.querySelectorAll(c),d({Block:r,containers:a,getProps:o,getErrorBoundaryProps:i})}))}))}},,,function(e,t){},,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=n(28),u=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=n(14),c=n.n(i),a=n(2);n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=c()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},,function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(15),c=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(c.useSelect)((function(e,t){if(n.current){var r=e(i.SCHEMA_STORE_KEY),o=r.isResolving,c=r.hasFinishedResolution,a=t.dispatch(i.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||c("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),o=n(90);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,a=Object(r.useState)(e),u=a[0],s=a[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),p=l[0],d=l[1],f=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){c(b.current,e)||(p(e),b.current=e)}),[e,p,c]),[u,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(5)),i=n.n(o),c=n(38),a=(n(162),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(r.__)("Apply filter","woo-gutenberg-products-block"):s;return React.createElement("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:u},React.createElement(c.a,{label:a,screenReaderLabel:l}))});a.defaultProps={disabled:!1},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(9),o=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return o.find((function(t){return t.id===e}))},c=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(8),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),c=i.length?i[0]:null;if(c&&c.slug&&Array.isArray(c.slug)&&c.slug.includes(o)){var a=c.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(c.slug=a.sort(),u.push(c)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",c=e.filter((function(e){return e.attribute!==n.taxonomy}));0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(o,"slug").sort()}),t(Object(r.sortBy)(c,"attribute")))}},,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=(n(3),n(5)),u=n.n(a),s=n(1),l=n(130),p=n(129),d=(n(111),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,a=void 0===i?"li":i,s=e.className,l=void 0===s?"":s,p=e.radius,d=void 0===p?"small":p,f=e.children,b=void 0===f?null:f,g=c()(e,["text","screenReaderText","element","className","radius","children"]),m=a,h=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+d),v=Boolean(r&&r!==t);return React.createElement(m,o()({className:h},g),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,b=e.onRemove,g=void 0===b?function(){}:b,m=e.removeOnAnyClick,h=void 0!==m&&m,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,w=c()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),j=h?"span":"button";if(!n){var S=O&&"string"==typeof O?O:v;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var E={"aria-label":n,disabled:f,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},I=h?E:{},x=h?{"aria-hidden":!0}:E;return React.createElement(d,o()({},w,I,{className:u()(i,"is-removable"),element:h?"button":w.element,screenReaderText:O,text:v}),React.createElement(j,o()({className:"wc-block-components-chip__remove"},x),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";e.exports=n(226)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(7),o=n.n(r),i=n(47),c=n.n(i),a=n(27),u=n.n(a),s=n(10),l=n.n(s),p=n(0),d=n(67),f=n(141),b=n(8),g=n(39),m=n(92),h=n(99);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,o=Object(d.a)();o="".concat(o,"-collection-data");var i=Object(m.a)(o),a=l()(i,1)[0],s=Object(m.b)("calculate_attribute_counts",[],o),v=l()(s,2),O=v[0],w=v[1],j=Object(m.b)("calculate_price_range",null,o),S=l()(j,2),E=S[0],I=S[1],x=Object(g.a)(t||{}),k=Object(g.a)(n);Object(p.useEffect)((function(){"object"===u()(x)&&Object.keys(x).length&&(O.find((function(e){return e.taxonomy===x.taxonomy}))||w([].concat(c()(O),[x])))}),[x,O,w]),Object(p.useEffect)((function(){E!==k&&void 0!==k&&I(k)}),[k,I,E]);var _=Object(p.useState)(!1),R=l()(_,2),P=R[0],C=R[1],D=Object(f.a)(P,200),T=l()(D,1)[0];P||C(!0);var M=Object(p.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(b.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(a)}),[a]);return Object(h.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:y(y({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},M),shouldSelect:T})}},,function(e,t,n){e.exports=n(272)},function(e,t){},function(e,t){},function(e,t,n){"use strict";
|
7 |
/** @license React v17.0.1
|
8 |
* react-is.production.min.js
|
9 |
*
|
11 |
*
|
12 |
* This source code is licensed under the MIT license found in the
|
13 |
* LICENSE file in the root directory of this source tree.
|
|