Version Description
- 2020-07-07 =
- bug: Correctly sort translated state and country drop-down menus in Checkout block. #2779
- dev: Add storybook story for icon library. #2787
- dev: Add custom jest matcher
toRenderBlock
, used for confirming blocks are available in the editor in e2e tests. #2780 - dev: Use consistent Button component in Cart & Checkout blocks. #2781
Download this release
Release Info
Developer | haszari |
Plugin | WooCommerce Gutenberg Products Block |
Version | 2.9.0 |
Comparing to | |
See all releases |
Code changes from version 2.8.0 to 2.9.0
- assets/js/base/components/button/index.js +0 -2
- assets/js/base/components/button/stories/index.js +2 -6
- assets/js/base/components/cart-checkout/button/index.js +0 -46
- assets/js/base/components/cart-checkout/button/stories/index.js +0 -15
- assets/js/base/components/cart-checkout/button/style.scss +0 -69
- assets/js/base/components/cart-checkout/index.js +0 -1
- assets/js/base/components/cart-checkout/place-order-button/index.js +1 -5
- assets/js/base/components/cart-checkout/shipping-calculator/address.js +2 -4
- assets/js/base/components/cart-checkout/totals/totals-coupon-code-input/index.js +1 -1
- assets/js/base/context/cart-checkout/payment-methods/payment-method-data-context.js +17 -17
- assets/js/blocks/cart-checkout/cart/checkout-button/index.js +2 -4
- assets/js/blocks/cart-checkout/cart/test/block.js +21 -8
- assets/js/data/query-state/test/selectors.js +4 -4
- assets/js/data/schema/test/reducers.js +5 -5
- assets/js/filters/block-list-block.js +2 -3
- assets/js/filters/get-block-attributes.js +4 -1
- assets/js/icons/library/arrow-back.js +1 -0
- assets/js/icons/library/arrow-down-alt2.js +3 -1
- assets/js/icons/library/no-alt.js +4 -1
- assets/js/icons/library/woo.js +24 -19
- assets/js/icons/stories/index.js +89 -0
- assets/js/index.js +2 -2
- assets/js/module_replacements/dashicon.js +8 -5
- assets/js/payment-method-extensions/payment-methods/stripe/credit-card/payment-method.js +6 -6
- assets/js/payment-method-extensions/payment-methods/stripe/payment-request/payment-request-express.js +5 -5
- assets/js/payment-method-extensions/payment-methods/stripe/stripe-utils/utils.js +6 -6
- assets/js/settings/shared/index.js +4 -4
- 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-legacy.asset.php +1 -1
- build/all-reviews-legacy.js +1 -1
- build/all-reviews.asset.php +1 -1
- build/all-reviews.js +1 -1
- build/attribute-filter-frontend.asset.php +1 -1
- build/attribute-filter-frontend.js +3 -3
- build/attribute-filter.asset.php +1 -1
- build/attribute-filter.js +1 -1
- build/block-error-boundary-legacy.asset.php +1 -1
- build/block-error-boundary-legacy.js +1 -1
- build/block-error-boundary.asset.php +1 -1
- build/block-error-boundary.js +1 -1
- build/blocks-legacy.asset.php +1 -1
- build/blocks-legacy.js +1 -1
- build/blocks.asset.php +1 -1
- build/blocks.js +1 -1
- build/cart-frontend.asset.php +1 -1
- build/cart-frontend.js +1 -2
assets/js/base/components/button/index.js
CHANGED
@@ -12,8 +12,6 @@ import './style.scss';
|
|
12 |
|
13 |
/**
|
14 |
* Component that visually renders a button but semantically might be `<button>` or `<a>` depending on the props.
|
15 |
-
*
|
16 |
-
* @todo Update cart and checkout button component. Cart and checkout should use base/components/button instead of cart-checkout/button.
|
17 |
*/
|
18 |
const Button = ( { className, showSpinner = false, children, ...props } ) => {
|
19 |
const buttonClassName = classNames(
|
12 |
|
13 |
/**
|
14 |
* Component that visually renders a button but semantically might be `<button>` or `<a>` depending on the props.
|
|
|
|
|
15 |
*/
|
16 |
const Button = ( { className, showSpinner = false, children, ...props } ) => {
|
17 |
const buttonClassName = classNames(
|
assets/js/base/components/button/stories/index.js
CHANGED
@@ -4,12 +4,8 @@
|
|
4 |
import Button from '../';
|
5 |
|
6 |
export default {
|
7 |
-
title: 'WooCommerce Blocks/@base-components/
|
8 |
component: Button,
|
9 |
};
|
10 |
|
11 |
-
export const Default = () =>
|
12 |
-
<div className="wc-block-cart">
|
13 |
-
<Button>Buy now</Button>
|
14 |
-
</div>
|
15 |
-
);
|
4 |
import Button from '../';
|
5 |
|
6 |
export default {
|
7 |
+
title: 'WooCommerce Blocks/@base-components/Button',
|
8 |
component: Button,
|
9 |
};
|
10 |
|
11 |
+
export const Default = () => <Button>Buy now</Button>;
|
|
|
|
|
|
|
|
assets/js/base/components/cart-checkout/button/index.js
DELETED
@@ -1,46 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* External dependencies
|
3 |
-
*/
|
4 |
-
import { Button as WPButton } from 'wordpress-components';
|
5 |
-
import PropTypes from 'prop-types';
|
6 |
-
import classNames from 'classnames';
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Internal dependencies
|
10 |
-
*/
|
11 |
-
import './style.scss';
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Component that visually renders a button but semantically might be `<button>` or `<a>` depending on the props.
|
15 |
-
*/
|
16 |
-
const Button = ( { className, showSpinner = false, children, ...props } ) => {
|
17 |
-
const buttonClassName = classNames(
|
18 |
-
'wc-block-components-button',
|
19 |
-
className,
|
20 |
-
{
|
21 |
-
'wc-block-components-button--loading': showSpinner,
|
22 |
-
}
|
23 |
-
);
|
24 |
-
|
25 |
-
return (
|
26 |
-
<WPButton className={ buttonClassName } { ...props }>
|
27 |
-
{ showSpinner && (
|
28 |
-
<span
|
29 |
-
className="wc-block-components-button__spinner"
|
30 |
-
aria-hidden="true"
|
31 |
-
/>
|
32 |
-
) }
|
33 |
-
<span className="wc-block-components-button__text">
|
34 |
-
{ children }
|
35 |
-
</span>
|
36 |
-
</WPButton>
|
37 |
-
);
|
38 |
-
};
|
39 |
-
|
40 |
-
Button.propTypes = {
|
41 |
-
className: PropTypes.string,
|
42 |
-
showSpinner: PropTypes.bool,
|
43 |
-
children: PropTypes.node,
|
44 |
-
};
|
45 |
-
|
46 |
-
export default Button;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/base/components/cart-checkout/button/stories/index.js
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
/**
|
2 |
-
* Internal dependencies
|
3 |
-
*/
|
4 |
-
import Button from '../';
|
5 |
-
|
6 |
-
export default {
|
7 |
-
title: 'WooCommerce Blocks/@base-components/cart-checkout/Button',
|
8 |
-
component: Button,
|
9 |
-
};
|
10 |
-
|
11 |
-
export const Default = () => (
|
12 |
-
<div className="wc-block-cart">
|
13 |
-
<Button>Buy now</Button>
|
14 |
-
</div>
|
15 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/base/components/cart-checkout/button/style.scss
DELETED
@@ -1,69 +0,0 @@
|
|
1 |
-
.wc-block-components-button:not(.is-link) {
|
2 |
-
@include reset-typography();
|
3 |
-
align-items: center;
|
4 |
-
background-color: $black;
|
5 |
-
color: $white;
|
6 |
-
display: flex;
|
7 |
-
font-weight: bold;
|
8 |
-
min-height: 3em;
|
9 |
-
justify-content: center;
|
10 |
-
line-height: 1;
|
11 |
-
padding: 0 $gap-small;
|
12 |
-
text-align: center;
|
13 |
-
text-decoration: none;
|
14 |
-
text-transform: none;
|
15 |
-
position: relative;
|
16 |
-
|
17 |
-
&:disabled,
|
18 |
-
&:hover,
|
19 |
-
&:focus,
|
20 |
-
&:active {
|
21 |
-
background-color: $black;
|
22 |
-
color: $white;
|
23 |
-
}
|
24 |
-
|
25 |
-
.wc-block-components-button__text {
|
26 |
-
display: block;
|
27 |
-
}
|
28 |
-
.wc-block-components-button__spinner {
|
29 |
-
width: 1em;
|
30 |
-
height: 1em;
|
31 |
-
position: absolute;
|
32 |
-
top: 50%;
|
33 |
-
left: 0;
|
34 |
-
width: 100%;
|
35 |
-
height: 100%;
|
36 |
-
margin-top: -0.5em;
|
37 |
-
color: inherit;
|
38 |
-
box-sizing: content-box;
|
39 |
-
|
40 |
-
&::after {
|
41 |
-
content: " ";
|
42 |
-
display: inline-block;
|
43 |
-
margin: 0 auto;
|
44 |
-
width: 1em;
|
45 |
-
height: 1em;
|
46 |
-
box-sizing: border-box;
|
47 |
-
transform-origin: 50% 50%;
|
48 |
-
transform: translateZ(0) scale(0.5);
|
49 |
-
backface-visibility: hidden;
|
50 |
-
border-radius: 50%;
|
51 |
-
border: 0.2em solid currentColor;
|
52 |
-
border-left-color: transparent;
|
53 |
-
animation: wc-block-components-button__spinner__animation 1s infinite linear;
|
54 |
-
}
|
55 |
-
}
|
56 |
-
.wc-block-components-button__spinner + .wc-block-components-button__text {
|
57 |
-
visibility: hidden;
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
@keyframes wc-block-components-button__spinner__animation {
|
62 |
-
0% {
|
63 |
-
animation-timing-function: cubic-bezier(0.5856, 0.0703, 0.4143, 0.9297);
|
64 |
-
transform: rotate(0deg);
|
65 |
-
}
|
66 |
-
100% {
|
67 |
-
transform: rotate(360deg);
|
68 |
-
}
|
69 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/js/base/components/cart-checkout/index.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
export { default as AddressForm } from './address-form';
|
2 |
-
export { default as Button } from './button';
|
3 |
export { default as CheckoutForm } from './form';
|
4 |
export { default as FormStep } from './form-step';
|
5 |
export { default as OrderSummary } from './order-summary';
|
1 |
export { default as AddressForm } from './address-form';
|
|
|
2 |
export { default as CheckoutForm } from './form';
|
3 |
export { default as FormStep } from './form-step';
|
4 |
export { default as OrderSummary } from './order-summary';
|
assets/js/base/components/cart-checkout/place-order-button/index.js
CHANGED
@@ -4,11 +4,7 @@
|
|
4 |
import { __ } from '@wordpress/i18n';
|
5 |
import { useCheckoutSubmit } from '@woocommerce/base-hooks';
|
6 |
import { Icon, done } from '@woocommerce/icons';
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Internal dependencies
|
10 |
-
*/
|
11 |
-
import Button from '../button';
|
12 |
|
13 |
const PlaceOrderButton = () => {
|
14 |
const {
|
4 |
import { __ } from '@wordpress/i18n';
|
5 |
import { useCheckoutSubmit } from '@woocommerce/base-hooks';
|
6 |
import { Icon, done } from '@woocommerce/icons';
|
7 |
+
import Button from '@woocommerce/base-components/button';
|
|
|
|
|
|
|
|
|
8 |
|
9 |
const PlaceOrderButton = () => {
|
10 |
const {
|
assets/js/base/components/cart-checkout/shipping-calculator/address.js
CHANGED
@@ -3,10 +3,8 @@
|
|
3 |
*/
|
4 |
import PropTypes from 'prop-types';
|
5 |
import { __ } from '@wordpress/i18n';
|
6 |
-
import {
|
7 |
-
|
8 |
-
Button,
|
9 |
-
} from '@woocommerce/base-components/cart-checkout';
|
10 |
import { useState } from '@wordpress/element';
|
11 |
import isShallowEqual from '@wordpress/is-shallow-equal';
|
12 |
import { useValidationContext } from '@woocommerce/base-context';
|
3 |
*/
|
4 |
import PropTypes from 'prop-types';
|
5 |
import { __ } from '@wordpress/i18n';
|
6 |
+
import { AddressForm } from '@woocommerce/base-components/cart-checkout';
|
7 |
+
import Button from '@woocommerce/base-components/button';
|
|
|
|
|
8 |
import { useState } from '@wordpress/element';
|
9 |
import isShallowEqual from '@wordpress/is-shallow-equal';
|
10 |
import { useValidationContext } from '@woocommerce/base-context';
|
assets/js/base/components/cart-checkout/totals/totals-coupon-code-input/index.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
*/
|
4 |
import { __ } from '@wordpress/i18n';
|
5 |
import { useState, useEffect, useRef } from '@wordpress/element';
|
6 |
-
import
|
7 |
import { ValidatedTextInput } from '@woocommerce/base-components/text-input';
|
8 |
import Label from '@woocommerce/base-components/label';
|
9 |
import { ValidationInputError } from '@woocommerce/base-components/validation';
|
3 |
*/
|
4 |
import { __ } from '@wordpress/i18n';
|
5 |
import { useState, useEffect, useRef } from '@wordpress/element';
|
6 |
+
import Button from '@woocommerce/base-components/button';
|
7 |
import { ValidatedTextInput } from '@woocommerce/base-components/text-input';
|
8 |
import Label from '@woocommerce/base-components/label';
|
9 |
import { ValidationInputError } from '@woocommerce/base-components/validation';
|
assets/js/base/context/cart-checkout/payment-methods/payment-method-data-context.js
CHANGED
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* Internal dependencies
|
3 |
*/
|
@@ -31,23 +48,6 @@ import {
|
|
31 |
} from './event-emit';
|
32 |
import { useValidationContext } from '../validation';
|
33 |
|
34 |
-
/**
|
35 |
-
* External dependencies
|
36 |
-
*/
|
37 |
-
import {
|
38 |
-
createContext,
|
39 |
-
useContext,
|
40 |
-
useState,
|
41 |
-
useReducer,
|
42 |
-
useCallback,
|
43 |
-
useEffect,
|
44 |
-
useRef,
|
45 |
-
useMemo,
|
46 |
-
} from '@wordpress/element';
|
47 |
-
import { getSetting } from '@woocommerce/settings';
|
48 |
-
import { useStoreNotices, useEmitResponse } from '@woocommerce/base-hooks';
|
49 |
-
import { useEditorContext } from '@woocommerce/base-context';
|
50 |
-
|
51 |
/**
|
52 |
* @typedef {import('@woocommerce/type-defs/contexts').PaymentMethodDataContext} PaymentMethodDataContext
|
53 |
* @typedef {import('@woocommerce/type-defs/contexts').PaymentStatusDispatch} PaymentStatusDispatch
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import {
|
5 |
+
createContext,
|
6 |
+
useContext,
|
7 |
+
useState,
|
8 |
+
useReducer,
|
9 |
+
useCallback,
|
10 |
+
useEffect,
|
11 |
+
useRef,
|
12 |
+
useMemo,
|
13 |
+
} from '@wordpress/element';
|
14 |
+
import { getSetting } from '@woocommerce/settings';
|
15 |
+
import { useStoreNotices, useEmitResponse } from '@woocommerce/base-hooks';
|
16 |
+
import { useEditorContext } from '@woocommerce/base-context';
|
17 |
+
|
18 |
/**
|
19 |
* Internal dependencies
|
20 |
*/
|
48 |
} from './event-emit';
|
49 |
import { useValidationContext } from '../validation';
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
/**
|
52 |
* @typedef {import('@woocommerce/type-defs/contexts').PaymentMethodDataContext} PaymentMethodDataContext
|
53 |
* @typedef {import('@woocommerce/type-defs/contexts').PaymentStatusDispatch} PaymentStatusDispatch
|
assets/js/blocks/cart-checkout/cart/checkout-button/index.js
CHANGED
@@ -3,10 +3,8 @@
|
|
3 |
*/
|
4 |
import { __ } from '@wordpress/i18n';
|
5 |
import { useState } from '@wordpress/element';
|
6 |
-
import {
|
7 |
-
|
8 |
-
PaymentMethodIcons,
|
9 |
-
} from '@woocommerce/base-components/cart-checkout';
|
10 |
import { CHECKOUT_URL } from '@woocommerce/block-settings';
|
11 |
import { useCheckoutContext } from '@woocommerce/base-context';
|
12 |
import { usePaymentMethods } from '@woocommerce/base-hooks';
|
3 |
*/
|
4 |
import { __ } from '@wordpress/i18n';
|
5 |
import { useState } from '@wordpress/element';
|
6 |
+
import { PaymentMethodIcons } from '@woocommerce/base-components/cart-checkout';
|
7 |
+
import Button from '@woocommerce/base-components/button';
|
|
|
|
|
8 |
import { CHECKOUT_URL } from '@woocommerce/block-settings';
|
9 |
import { useCheckoutContext } from '@woocommerce/base-context';
|
10 |
import { usePaymentMethods } from '@woocommerce/base-hooks';
|
assets/js/blocks/cart-checkout/cart/test/block.js
CHANGED
@@ -13,7 +13,7 @@ import { defaultCartState } from '../../../../data/default-states';
|
|
13 |
|
14 |
describe( 'Testing cart', () => {
|
15 |
beforeEach( async () => {
|
16 |
-
fetchMock.
|
17 |
if ( req.url.match( /wc\/store\/cart/ ) ) {
|
18 |
return Promise.resolve( JSON.stringify( previewCart ) );
|
19 |
}
|
@@ -22,6 +22,9 @@ describe( 'Testing cart', () => {
|
|
22 |
await dispatch( storeKey ).invalidateResolutionForStore();
|
23 |
await dispatch( storeKey ).receiveCart( defaultCartState );
|
24 |
} );
|
|
|
|
|
|
|
25 |
it( 'renders cart if there are items in the cart', async () => {
|
26 |
render(
|
27 |
<CartBlock
|
@@ -32,14 +35,21 @@ describe( 'Testing cart', () => {
|
|
32 |
} }
|
33 |
/>
|
34 |
);
|
35 |
-
await waitFor( () =>
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
} );
|
41 |
it( 'renders empty cart if there are no items in the cart', async () => {
|
42 |
-
fetchMock.
|
43 |
if ( req.url.match( /wc\/store\/cart/ ) ) {
|
44 |
return Promise.resolve( JSON.stringify( defaultCartState ) );
|
45 |
}
|
@@ -53,6 +63,9 @@ describe( 'Testing cart', () => {
|
|
53 |
} }
|
54 |
/>
|
55 |
);
|
56 |
-
|
|
|
|
|
|
|
57 |
} );
|
58 |
} );
|
13 |
|
14 |
describe( 'Testing cart', () => {
|
15 |
beforeEach( async () => {
|
16 |
+
fetchMock.mockResponse( ( req ) => {
|
17 |
if ( req.url.match( /wc\/store\/cart/ ) ) {
|
18 |
return Promise.resolve( JSON.stringify( previewCart ) );
|
19 |
}
|
22 |
await dispatch( storeKey ).invalidateResolutionForStore();
|
23 |
await dispatch( storeKey ).receiveCart( defaultCartState );
|
24 |
} );
|
25 |
+
afterEach( () => {
|
26 |
+
fetchMock.resetMocks();
|
27 |
+
} );
|
28 |
it( 'renders cart if there are items in the cart', async () => {
|
29 |
render(
|
30 |
<CartBlock
|
35 |
} }
|
36 |
/>
|
37 |
);
|
38 |
+
await waitFor( () => expect( fetchMock ).toHaveBeenCalled() );
|
39 |
+
expect(
|
40 |
+
await screen.getByText( /Proceed to Checkout/i )
|
41 |
+
).toBeInTheDocument();
|
42 |
+
|
43 |
+
/**
|
44 |
+
* @todo Investigate extra POST request on initial cart render.
|
45 |
+
*
|
46 |
+
* We have an unfixed bug in our test in which the full cart triggers a POST
|
47 |
+
* request to `wc/store/cart/update-item` causing the fetch to be called twice.
|
48 |
+
*/
|
49 |
+
expect( fetchMock ).toHaveBeenCalledTimes( 2 );
|
50 |
} );
|
51 |
it( 'renders empty cart if there are no items in the cart', async () => {
|
52 |
+
fetchMock.mockResponse( ( req ) => {
|
53 |
if ( req.url.match( /wc\/store\/cart/ ) ) {
|
54 |
return Promise.resolve( JSON.stringify( defaultCartState ) );
|
55 |
}
|
63 |
} }
|
64 |
/>
|
65 |
);
|
66 |
+
|
67 |
+
await waitFor( () => expect( fetchMock ).toHaveBeenCalled() );
|
68 |
+
expect( await screen.getByText( /Empty Cart/i ) ).toBeInTheDocument();
|
69 |
+
expect( fetchMock ).toHaveBeenCalledTimes( 1 );
|
70 |
} );
|
71 |
} );
|
assets/js/data/query-state/test/selectors.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
/**
|
2 |
-
*
|
3 |
*/
|
4 |
-
import
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*/
|
9 |
-
import
|
10 |
|
11 |
const testState = deepFreeze( {
|
12 |
contexta: JSON.stringify( {
|
1 |
/**
|
2 |
+
* External dependencies
|
3 |
*/
|
4 |
+
import deepFreeze from 'deep-freeze';
|
5 |
|
6 |
/**
|
7 |
+
* Internal dependencies
|
8 |
*/
|
9 |
+
import { getValueForQueryKey, getValueForQueryContext } from '../selectors';
|
10 |
|
11 |
const testState = deepFreeze( {
|
12 |
contexta: JSON.stringify( {
|
assets/js/data/schema/test/reducers.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1 |
/**
|
2 |
-
*
|
3 |
*/
|
4 |
-
import
|
5 |
-
import { ACTION_TYPES as types } from '../action-types';
|
6 |
|
7 |
/**
|
8 |
-
*
|
9 |
*/
|
10 |
-
import
|
|
|
11 |
|
12 |
describe( 'receiveRoutes', () => {
|
13 |
it( 'returns original state when action type is not a match', () => {
|
1 |
/**
|
2 |
+
* External dependencies
|
3 |
*/
|
4 |
+
import deepFreeze from 'deep-freeze';
|
|
|
5 |
|
6 |
/**
|
7 |
+
* Internal dependencies
|
8 |
*/
|
9 |
+
import { receiveRoutes } from '../reducers';
|
10 |
+
import { ACTION_TYPES as types } from '../action-types';
|
11 |
|
12 |
describe( 'receiveRoutes', () => {
|
13 |
it( 'returns original state when action type is not a match', () => {
|
assets/js/filters/block-list-block.js
CHANGED
@@ -4,9 +4,8 @@
|
|
4 |
import { Component } from '@wordpress/element';
|
5 |
import { createHigherOrderComponent } from '@wordpress/compose';
|
6 |
import { compareWithWpVersion } from '@woocommerce/settings';
|
7 |
-
|
8 |
-
|
9 |
-
const { addFilter } = wp.hooks;
|
10 |
|
11 |
/**
|
12 |
* withDefaultAttributes HOC for editor.BlockListBlock.
|
4 |
import { Component } from '@wordpress/element';
|
5 |
import { createHigherOrderComponent } from '@wordpress/compose';
|
6 |
import { compareWithWpVersion } from '@woocommerce/settings';
|
7 |
+
import { getBlockType } from '@wordpress/blocks';
|
8 |
+
import { addFilter } from '@wordpress/hooks';
|
|
|
9 |
|
10 |
/**
|
11 |
* withDefaultAttributes HOC for editor.BlockListBlock.
|
assets/js/filters/get-block-attributes.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
-
|
|
|
|
|
|
|
2 |
|
3 |
/**
|
4 |
* Adjust attributes on load to set defaults so default attributes get saved.
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import { addFilter } from '@wordpress/hooks';
|
5 |
|
6 |
/**
|
7 |
* Adjust attributes on load to set defaults so default attributes get saved.
|
assets/js/icons/library/arrow-back.js
CHANGED
@@ -6,6 +6,7 @@ import { SVG } from 'wordpress-components';
|
|
6 |
const arrowBack = (
|
7 |
<SVG
|
8 |
xmlns="http://www.w3.org/2000/svg"
|
|
|
9 |
width="24"
|
10 |
height="24"
|
11 |
fill="currentColor"
|
6 |
const arrowBack = (
|
7 |
<SVG
|
8 |
xmlns="http://www.w3.org/2000/svg"
|
9 |
+
viewBox="0 0 24 24"
|
10 |
width="24"
|
11 |
height="24"
|
12 |
fill="currentColor"
|
assets/js/icons/library/arrow-down-alt2.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
import { SVG } from 'wordpress-components';
|
5 |
import classnames from 'classnames';
|
6 |
|
7 |
-
const
|
8 |
const iconClass = classnames(
|
9 |
'dashicon',
|
10 |
'dashicons-arrow-down-alt2',
|
@@ -24,4 +24,6 @@ const arrowDownAlt2 = ( { className, size, ...extraProps } ) => {
|
|
24 |
);
|
25 |
};
|
26 |
|
|
|
|
|
27 |
export default arrowDownAlt2;
|
4 |
import { SVG } from 'wordpress-components';
|
5 |
import classnames from 'classnames';
|
6 |
|
7 |
+
const Component = ( { className, size = 20, ...extraProps } ) => {
|
8 |
const iconClass = classnames(
|
9 |
'dashicon',
|
10 |
'dashicons-arrow-down-alt2',
|
24 |
);
|
25 |
};
|
26 |
|
27 |
+
const arrowDownAlt2 = <Component />;
|
28 |
+
|
29 |
export default arrowDownAlt2;
|
assets/js/icons/library/no-alt.js
CHANGED
@@ -3,7 +3,8 @@
|
|
3 |
*/
|
4 |
import { SVG } from 'wordpress-components';
|
5 |
import classnames from 'classnames';
|
6 |
-
|
|
|
7 |
const iconClass = classnames(
|
8 |
'dashicon',
|
9 |
'dashicons-arrow-down-alt2',
|
@@ -23,4 +24,6 @@ const noAlt = ( { className, size, ...extraProps } ) => {
|
|
23 |
);
|
24 |
};
|
25 |
|
|
|
|
|
26 |
export default noAlt;
|
3 |
*/
|
4 |
import { SVG } from 'wordpress-components';
|
5 |
import classnames from 'classnames';
|
6 |
+
|
7 |
+
const Component = ( { className, size, ...extraProps } ) => {
|
8 |
const iconClass = classnames(
|
9 |
'dashicon',
|
10 |
'dashicons-arrow-down-alt2',
|
24 |
);
|
25 |
};
|
26 |
|
27 |
+
const noAlt = <Component />;
|
28 |
+
|
29 |
export default noAlt;
|
assets/js/icons/library/woo.js
CHANGED
@@ -3,24 +3,29 @@
|
|
3 |
*/
|
4 |
import { SVG } from 'wordpress-components';
|
5 |
import classnames from 'classnames';
|
6 |
-
const
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
export default woo;
|
3 |
*/
|
4 |
import { SVG } from 'wordpress-components';
|
5 |
import classnames from 'classnames';
|
6 |
+
const Component = ( { className, height, width, ...props } ) => {
|
7 |
+
return (
|
8 |
+
<SVG
|
9 |
+
xmlns="http://www.w3.org/2000/svg"
|
10 |
+
viewBox="0 0 245 145"
|
11 |
+
className={ classnames( 'woo-icon', className ) }
|
12 |
+
width={ width }
|
13 |
+
height={ height }
|
14 |
+
{ ...props }
|
15 |
+
>
|
16 |
+
<path
|
17 |
+
fill="#96588A"
|
18 |
+
d="M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"
|
19 |
+
/>
|
20 |
+
<path
|
21 |
+
fill="#FFF"
|
22 |
+
fillRule="nonzero"
|
23 |
+
d="M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"
|
24 |
+
/>
|
25 |
+
</SVG>
|
26 |
+
);
|
27 |
+
};
|
28 |
+
|
29 |
+
const woo = <Component />;
|
30 |
|
31 |
export default woo;
|
assets/js/icons/stories/index.js
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import { omitBy, omit, map } from 'lodash';
|
5 |
+
import { useState } from '@wordpress/element';
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Internal dependencies
|
9 |
+
*/
|
10 |
+
import Icon from '../icon';
|
11 |
+
import * as icons from '../index';
|
12 |
+
|
13 |
+
const availableIcons = omit( icons, 'Icon' );
|
14 |
+
|
15 |
+
export default {
|
16 |
+
title: 'WooCommerce Blocks/@woocommerce/icons',
|
17 |
+
component: Icon,
|
18 |
+
};
|
19 |
+
|
20 |
+
const LibraryExample = () => {
|
21 |
+
const [ filter, setFilter ] = useState( '' );
|
22 |
+
const filteredIcons = omitBy( availableIcons, ( _icon, name ) => {
|
23 |
+
return ! name.includes( filter );
|
24 |
+
} );
|
25 |
+
return (
|
26 |
+
<div style={ { padding: '20px' } }>
|
27 |
+
<label htmlFor="filter-icons" style={ { paddingRight: '30px' } }>
|
28 |
+
Filter Icons
|
29 |
+
</label>
|
30 |
+
<input
|
31 |
+
// eslint-disable-next-line no-restricted-syntax
|
32 |
+
id="filter-icons"
|
33 |
+
type="search"
|
34 |
+
value={ filter }
|
35 |
+
placeholder="Icon name"
|
36 |
+
onChange={ ( event ) => setFilter( event.target.value ) }
|
37 |
+
/>
|
38 |
+
<div
|
39 |
+
style={ {
|
40 |
+
display: 'flex',
|
41 |
+
alignItems: 'bottom',
|
42 |
+
'flex-wrap': 'wrap',
|
43 |
+
} }
|
44 |
+
>
|
45 |
+
{ map( filteredIcons, ( icon, name ) => {
|
46 |
+
return (
|
47 |
+
<div
|
48 |
+
key={ name }
|
49 |
+
style={ {
|
50 |
+
display: 'flex',
|
51 |
+
'flex-direction': 'column',
|
52 |
+
width: '25%',
|
53 |
+
padding: '25px 0 25px 0',
|
54 |
+
} }
|
55 |
+
>
|
56 |
+
<strong
|
57 |
+
style={ {
|
58 |
+
width: '200px',
|
59 |
+
} }
|
60 |
+
>
|
61 |
+
{ name }
|
62 |
+
</strong>
|
63 |
+
<div
|
64 |
+
style={ {
|
65 |
+
display: 'flex',
|
66 |
+
alignItems: 'center',
|
67 |
+
} }
|
68 |
+
>
|
69 |
+
<Icon srcElement={ icon } />
|
70 |
+
<Icon
|
71 |
+
style={ { 'padding-left': '10px' } }
|
72 |
+
srcElement={ icon }
|
73 |
+
size={ 36 }
|
74 |
+
/>
|
75 |
+
<Icon
|
76 |
+
style={ { 'padding-left': '10px' } }
|
77 |
+
srcElement={ icon }
|
78 |
+
size={ 48 }
|
79 |
+
/>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
);
|
83 |
+
} ) }
|
84 |
+
</div>
|
85 |
+
</div>
|
86 |
+
);
|
87 |
+
};
|
88 |
+
|
89 |
+
export const Library = () => <LibraryExample />;
|
assets/js/index.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
*/
|
4 |
import { getCategories, setCategories } from '@wordpress/blocks';
|
5 |
import { __ } from '@wordpress/i18n';
|
6 |
-
import { woo
|
7 |
|
8 |
/**
|
9 |
* Internal dependencies
|
@@ -19,6 +19,6 @@ setCategories( [
|
|
19 |
{
|
20 |
slug: 'woocommerce',
|
21 |
title: __( 'WooCommerce', 'woo-gutenberg-products-block' ),
|
22 |
-
icon: <Icon />,
|
23 |
},
|
24 |
] );
|
3 |
*/
|
4 |
import { getCategories, setCategories } from '@wordpress/blocks';
|
5 |
import { __ } from '@wordpress/i18n';
|
6 |
+
import { woo, Icon } from '@woocommerce/icons';
|
7 |
|
8 |
/**
|
9 |
* Internal dependencies
|
19 |
{
|
20 |
slug: 'woocommerce',
|
21 |
title: __( 'WooCommerce', 'woo-gutenberg-products-block' ),
|
22 |
+
icon: <Icon srcElement={ woo } />,
|
23 |
},
|
24 |
] );
|
assets/js/module_replacements/dashicon.js
CHANGED
@@ -5,7 +5,7 @@ import {
|
|
5 |
arrowDownAlt2 as ArrowDownIcon,
|
6 |
noAlt as DismissIcon,
|
7 |
} from '@woocommerce/icons';
|
8 |
-
import {
|
9 |
|
10 |
// Note: Aside from import/export, everything in this file must be IE11 friendly
|
11 |
// because currently it does not go through babel transpiling. It is injected
|
@@ -13,9 +13,7 @@ import { createElement } from '@wordpress/element';
|
|
13 |
// the Webpack NormalModuleReplacementPlugin plugin.
|
14 |
|
15 |
export default function( props ) {
|
16 |
-
let Icon
|
17 |
-
return null;
|
18 |
-
};
|
19 |
switch ( props.icon ) {
|
20 |
case 'arrow-down-alt2':
|
21 |
Icon = ArrowDownIcon;
|
@@ -24,7 +22,12 @@ export default function( props ) {
|
|
24 |
Icon = DismissIcon;
|
25 |
break;
|
26 |
}
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
28 |
size: props.size || 20,
|
29 |
className: props.className,
|
30 |
} );
|
5 |
arrowDownAlt2 as ArrowDownIcon,
|
6 |
noAlt as DismissIcon,
|
7 |
} from '@woocommerce/icons';
|
8 |
+
import { cloneElement } from '@wordpress/element';
|
9 |
|
10 |
// Note: Aside from import/export, everything in this file must be IE11 friendly
|
11 |
// because currently it does not go through babel transpiling. It is injected
|
13 |
// the Webpack NormalModuleReplacementPlugin plugin.
|
14 |
|
15 |
export default function( props ) {
|
16 |
+
let Icon;
|
|
|
|
|
17 |
switch ( props.icon ) {
|
18 |
case 'arrow-down-alt2':
|
19 |
Icon = ArrowDownIcon;
|
22 |
Icon = DismissIcon;
|
23 |
break;
|
24 |
}
|
25 |
+
|
26 |
+
if ( ! Icon ) {
|
27 |
+
return null;
|
28 |
+
}
|
29 |
+
|
30 |
+
return cloneElement( Icon, {
|
31 |
size: props.size || 20,
|
32 |
className: props.className,
|
33 |
} );
|
assets/js/payment-method-extensions/payment-methods/stripe/credit-card/payment-method.js
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* Internal dependencies
|
3 |
*/
|
@@ -6,12 +12,6 @@ import { getStripeServerData } from '../stripe-utils';
|
|
6 |
import { useCheckoutSubscriptions } from './use-checkout-subscriptions';
|
7 |
import { InlineCard, CardElements } from './elements';
|
8 |
|
9 |
-
/**
|
10 |
-
* External dependencies
|
11 |
-
*/
|
12 |
-
import { Elements, useStripe } from '@stripe/react-stripe-js';
|
13 |
-
import { useState } from '@wordpress/element';
|
14 |
-
|
15 |
/**
|
16 |
* @typedef {import('../stripe-utils/type-defs').Stripe} Stripe
|
17 |
* @typedef {import('../stripe-utils/type-defs').StripePaymentRequest} StripePaymentRequest
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import { Elements, useStripe } from '@stripe/react-stripe-js';
|
5 |
+
import { useState } from '@wordpress/element';
|
6 |
+
|
7 |
/**
|
8 |
* Internal dependencies
|
9 |
*/
|
12 |
import { useCheckoutSubscriptions } from './use-checkout-subscriptions';
|
13 |
import { InlineCard, CardElements } from './elements';
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
/**
|
16 |
* @typedef {import('../stripe-utils/type-defs').Stripe} Stripe
|
17 |
* @typedef {import('../stripe-utils/type-defs').StripePaymentRequest} StripePaymentRequest
|
assets/js/payment-method-extensions/payment-methods/stripe/payment-request/payment-request-express.js
CHANGED
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* Internal dependencies
|
3 |
*/
|
@@ -5,11 +10,6 @@ import { getStripeServerData } from '../stripe-utils';
|
|
5 |
import { useInitialization } from './use-initialization';
|
6 |
import { useCheckoutSubscriptions } from './use-checkout-subscriptions';
|
7 |
|
8 |
-
/**
|
9 |
-
* External dependencies
|
10 |
-
*/
|
11 |
-
import { Elements, PaymentRequestButtonElement } from '@stripe/react-stripe-js';
|
12 |
-
|
13 |
/**
|
14 |
* @typedef {import('../stripe-utils/type-defs').Stripe} Stripe
|
15 |
* @typedef {import('../stripe-utils/type-defs').StripePaymentRequest} StripePaymentRequest
|
1 |
+
/**
|
2 |
+
* External dependencies
|
3 |
+
*/
|
4 |
+
import { Elements, PaymentRequestButtonElement } from '@stripe/react-stripe-js';
|
5 |
+
|
6 |
/**
|
7 |
* Internal dependencies
|
8 |
*/
|
10 |
import { useInitialization } from './use-initialization';
|
11 |
import { useCheckoutSubscriptions } from './use-checkout-subscriptions';
|
12 |
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
* @typedef {import('../stripe-utils/type-defs').Stripe} Stripe
|
15 |
* @typedef {import('../stripe-utils/type-defs').StripePaymentRequest} StripePaymentRequest
|
assets/js/payment-method-extensions/payment-methods/stripe/stripe-utils/utils.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
-
/**
|
2 |
-
* Internal dependencies
|
3 |
-
*/
|
4 |
-
import { normalizeLineItems } from './normalize';
|
5 |
-
import { errorTypes, errorCodes } from './constants';
|
6 |
-
|
7 |
/**
|
8 |
* External dependencies
|
9 |
*/
|
10 |
import { getSetting } from '@woocommerce/settings';
|
11 |
import { __ } from '@wordpress/i18n';
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
/**
|
14 |
* @typedef {import('./type-defs').StripeServerData} StripeServerData
|
15 |
* @typedef {import('./type-defs').StripePaymentItem} StripePaymentItem
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
/**
|
2 |
* External dependencies
|
3 |
*/
|
4 |
import { getSetting } from '@woocommerce/settings';
|
5 |
import { __ } from '@wordpress/i18n';
|
6 |
|
7 |
+
/**
|
8 |
+
* Internal dependencies
|
9 |
+
*/
|
10 |
+
import { normalizeLineItems } from './normalize';
|
11 |
+
import { errorTypes, errorCodes } from './constants';
|
12 |
+
|
13 |
/**
|
14 |
* @typedef {import('./type-defs').StripeServerData} StripeServerData
|
15 |
* @typedef {import('./type-defs').StripePaymentItem} StripePaymentItem
|
assets/js/settings/shared/index.js
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
/**
|
2 |
-
*
|
3 |
*/
|
4 |
-
import
|
5 |
|
6 |
/**
|
7 |
-
*
|
8 |
*/
|
9 |
-
import
|
10 |
|
11 |
export * from './default-constants';
|
12 |
export { setSetting } from './set-setting';
|
1 |
/**
|
2 |
+
* External dependencies
|
3 |
*/
|
4 |
+
import compareVersions from 'compare-versions';
|
5 |
|
6 |
/**
|
7 |
+
* Internal dependencies
|
8 |
*/
|
9 |
+
import { getSetting } from './get-setting';
|
10 |
|
11 |
export * from './default-constants';
|
12 |
export { setSetting } from './set-setting';
|
build/active-filters-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'ef7466684191c84c778de601416fde40');
|
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=265)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(11),o=r.n(n),c=r(6),i=r.n(c),u=r(45),a=r(44);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=function(e){var t=e.Block,r=e.selector,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i,f=document.querySelectorAll(r);f.length&&Array.prototype.forEach.call(f,(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(u.render)(React.createElement(a.a,i,React.createElement(t,o()({},n,{attributes:f}))),e)}))}},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(16),o=r(13),c=r(0),i=r(86),u=r(39),a=function(e){var t=e.namespace,r=e.resourceName,a=e.resourceValues,s=void 0===a?[]:a,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 g=Object(c.useRef)({results:[],isLoading:!0}),d=Object(u.a)(f),m=Object(u.a)(s),O=Object(i.a)(),y=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,d,m],i=o.getCollectionError.apply(o,c);return i&&O(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,m,d,b]);return null!==y&&(g.current=y),g.current}},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},119:function(e,t,r){"use strict";r.d(t,"c",(function(){return b})),r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return d}));var n=r(6),o=r.n(n),c=r(22),i=r.n(c),u=r(2);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){o()(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 l,f,p={code:u.CURRENCY.code,symbol:u.CURRENCY.symbol,thousandSeparator:u.CURRENCY.thousandSeparator,decimalSeparator:u.CURRENCY.decimalSeparator,minorUnit:u.CURRENCY.precision,prefix:(l=u.CURRENCY.symbol,f=u.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[f]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(u.CURRENCY.symbol,u.CURRENCY.symbolPosition)},b=function(e){if(!e||"object"!==i()(e))return p;var t=e.currency_code,r=e.currency_symbol,n=e.currency_thousand_separator,o=e.currency_decimal_separator,c=e.currency_minor_unit,u=e.currency_prefix,a=e.currency_suffix;return{code:t||"USD",symbol:r||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof o?o:".",minorUnit:Number.isFinite(c)?c:2,prefix:"string"==typeof u?u:"$",suffix:"string"==typeof a?a:""}},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},p),e)},d=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=g(t),o=r/Math.pow(10,n.minorUnit),c=n.prefix+o+n.suffix,i=document.createElement("textarea");return i.innerHTML=c,i.value}},120:function(e,t,r){"use strict";var n=r(0),o=r(2),c=r(16),i=r(13);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,u=t.dispatch(c.SCHEMA_STORE_KEY),a=u.receiveRoutes,s=u.startResolution,l=u.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),a(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},13:function(e,t){!function(){e.exports=this.wp.data}()},130: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}))}},131:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(7),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 u=i.slug.filter((function(e){return e!==o})),a=e.filter((function(e){return e.attribute!==r.taxonomy}));u.length>0&&(i.slug=u.sort(),a.push(i)),t(Object(n.sortBy)(a,"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.wp.htmlEntities}()},16:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},19: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}},2:function(e,t){!function(){e.exports=this.wc.wcSettings}()},208:function(e,t){},22: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},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},265:function(e,t,r){"use strict";r.r(t);var n=r(120),o=r(102),c=r(8),i=r.n(c),u=r(1),a=r(97),s=r(0),l=r(4),f=r.n(l),p=(r(5),r(28)),b=(r(208),r(130)),g=r(119),d=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(u.sprintf)(Object(u.__)("Between %s and %s","woo-gutenberg-products-block"),Object(g.a)(e),Object(g.a)(t)):Number.isFinite(e)?Object(u.sprintf)(Object(u.__)("From %s","woo-gutenberg-products-block"),Object(g.a)(e)):Object(u.sprintf)(Object(u.__)("Up to %s","woo-gutenberg-products-block"),Object(g.a)(t))},m=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,a=void 0===i||i;return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},a&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),React.createElement("span",{className:"wc-block-active-filters__list-item-name"},n?React.createElement(s.Fragment,null,n," ",r):r,React.createElement("button",{onClick:c},Object(u.sprintf)(Object(u.__)("Remove %s filter","woo-gutenberg-products-block"),r))))},O=r(107),y=r(15),v=r(131),h=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=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),f=l.results,p=l.isLoading,b=Object(a.b)("attributes",[]),g=i()(b,2),d=g[0],h=g[1];if(p)return null;var j=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},j,":"),React.createElement("ul",null,o.map((function(e,t){var n=f.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(u.__)("and","woo-gutenberg-products-block"))),m({type:j,name:Object(y.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(v.a)(d,h,r,e)},showLabel:!1})}))))},j=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(a.b)("attributes",[]),c=i()(o,2),l=c[0],g=c[1],O=Object(a.b)("min_price"),y=i()(O,2),v=y[0],j=y[1],_=Object(a.b)("max_price"),w=i()(_,2),S=w[0],E=w[1],R=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(S)?m({type:Object(u.__)("Price","woo-gutenberg-products-block"),name:d(v,S),removeCallback:function(){j(void 0),E(void 0)}}):null}),[v,S,d]),x=Object(s.useMemo)((function(){return l.map((function(e){var t=Object(b.b)(e.attribute);return React.createElement(h,{attributeObject:t,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(S)||n))return null;var k="h".concat(t.headingLevel),P=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(s.Fragment,null,!n&&t.heading&&React.createElement(k,null,t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:P},n?React.createElement(s.Fragment,null,m({type:Object(u.__)("Size","woo-gutenberg-products-block"),name:Object(u.__)("Small","woo-gutenberg-products-block")}),m({type:Object(u.__)("Color","woo-gutenberg-products-block"),name:Object(u.__)("Blue","woo-gutenberg-products-block")})):React.createElement(s.Fragment,null,R,x)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){j(void 0),E(void 0),g([])}},React.createElement(p.a,{label:Object(u.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(u.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(j),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},28:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=(r(5),r(3)),i=r(4),u=r.n(i);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){o()(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 l=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,a=null!=r,l=null!=n;return!a&&l?(t=o||"span",i=s(s({},i),{},{className:u()(i.className,"screen-reader-text")}),React.createElement(t,i,n)):(t=o||c.Fragment,a&&l&&r!==n?React.createElement(t,i,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,i,r))};l.defaultProps={wrapperProps:{}},t.a=l},3:function(e,t){!function(){e.exports=this.React}()},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(60);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(22),o=r(19);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},38:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(38),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,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 u in n)r.call(n,u)&&n[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},41:function(e,t){!function(){e.exports=this.wp.blocks}()},44:function(e,t,r){"use strict";var n=r(32),o=r.n(n),c=r(33),i=r.n(c),u=r(19),a=r.n(u),s=r(34),l=r.n(s),f=r(35),p=r.n(f),b=r(24),g=r.n(b),d=r(6),m=r.n(d),O=(r(5),r(3)),y=r(1),v=r(9),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.A,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(y.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(y.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,u=e.errorMessage,a=e.errorMessagePrefix,s=void 0===a?Object(y.__)("Error:","woo-gutenberg-products-block"):a;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),u&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",u)))};r(
|
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=264)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},103:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(11),o=r.n(n),c=r(6),i=r.n(c),u=r(45),a=r(44);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=function(e){var t=e.Block,r=e.selector,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i,f=document.querySelectorAll(r);f.length&&Array.prototype.forEach.call(f,(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(u.render)(React.createElement(a.a,i,React.createElement(t,o()({},n,{attributes:f}))),e)}))}},109:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(16),o=r(13),c=r(0),i=r(87),u=r(39),a=function(e){var t=e.namespace,r=e.resourceName,a=e.resourceValues,s=void 0===a?[]:a,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 g=Object(c.useRef)({results:[],isLoading:!0}),d=Object(u.a)(f),m=Object(u.a)(s),O=Object(i.a)(),y=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,d,m],i=o.getCollectionError.apply(o,c);return i&&O(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,m,d,b]);return null!==y&&(g.current=y),g.current}},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},121:function(e,t,r){"use strict";r.d(t,"c",(function(){return b})),r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return d}));var n=r(6),o=r.n(n),c=r(22),i=r.n(c),u=r(2);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){o()(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 l,f,p={code:u.CURRENCY.code,symbol:u.CURRENCY.symbol,thousandSeparator:u.CURRENCY.thousandSeparator,decimalSeparator:u.CURRENCY.decimalSeparator,minorUnit:u.CURRENCY.precision,prefix:(l=u.CURRENCY.symbol,f=u.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[f]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(u.CURRENCY.symbol,u.CURRENCY.symbolPosition)},b=function(e){if(!e||"object"!==i()(e))return p;var t=e.currency_code,r=e.currency_symbol,n=e.currency_thousand_separator,o=e.currency_decimal_separator,c=e.currency_minor_unit,u=e.currency_prefix,a=e.currency_suffix;return{code:t||"USD",symbol:r||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof o?o:".",minorUnit:Number.isFinite(c)?c:2,prefix:"string"==typeof u?u:"$",suffix:"string"==typeof a?a:""}},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},p),e)},d=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=g(t),o=r/Math.pow(10,n.minorUnit),c=n.prefix+o+n.suffix,i=document.createElement("textarea");return i.innerHTML=c,i.value}},122:function(e,t,r){"use strict";var n=r(0),o=r(2),c=r(16),i=r(13);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,u=t.dispatch(c.SCHEMA_STORE_KEY),a=u.receiveRoutes,s=u.startResolution,l=u.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),a(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},13:function(e,t){!function(){e.exports=this.wp.data}()},132: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}))}},133:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(7),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 u=i.slug.filter((function(e){return e!==o})),a=e.filter((function(e){return e.attribute!==r.taxonomy}));u.length>0&&(i.slug=u.sort(),a.push(i)),t(Object(n.sortBy)(a,"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.wp.htmlEntities}()},16:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},19: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}},2:function(e,t){!function(){e.exports=this.wc.wcSettings}()},207:function(e,t){},22: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},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},264:function(e,t,r){"use strict";r.r(t);var n=r(122),o=r(103),c=r(8),i=r.n(c),u=r(1),a=r(98),s=r(0),l=r(4),f=r.n(l),p=(r(5),r(28)),b=(r(207),r(132)),g=r(121),d=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(u.sprintf)(Object(u.__)("Between %s and %s","woo-gutenberg-products-block"),Object(g.a)(e),Object(g.a)(t)):Number.isFinite(e)?Object(u.sprintf)(Object(u.__)("From %s","woo-gutenberg-products-block"),Object(g.a)(e)):Object(u.sprintf)(Object(u.__)("Up to %s","woo-gutenberg-products-block"),Object(g.a)(t))},m=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,a=void 0===i||i;return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},a&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),React.createElement("span",{className:"wc-block-active-filters__list-item-name"},n?React.createElement(s.Fragment,null,n," ",r):r,React.createElement("button",{onClick:c},Object(u.sprintf)(Object(u.__)("Remove %s filter","woo-gutenberg-products-block"),r))))},O=r(109),y=r(15),v=r(133),h=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=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),f=l.results,p=l.isLoading,b=Object(a.b)("attributes",[]),g=i()(b,2),d=g[0],h=g[1];if(p)return null;var j=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},j,":"),React.createElement("ul",null,o.map((function(e,t){var n=f.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(u.__)("and","woo-gutenberg-products-block"))),m({type:j,name:Object(y.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(v.a)(d,h,r,e)},showLabel:!1})}))))},j=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(a.b)("attributes",[]),c=i()(o,2),l=c[0],g=c[1],O=Object(a.b)("min_price"),y=i()(O,2),v=y[0],j=y[1],_=Object(a.b)("max_price"),w=i()(_,2),S=w[0],E=w[1],R=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(S)?m({type:Object(u.__)("Price","woo-gutenberg-products-block"),name:d(v,S),removeCallback:function(){j(void 0),E(void 0)}}):null}),[v,S,d]),x=Object(s.useMemo)((function(){return l.map((function(e){var t=Object(b.b)(e.attribute);return React.createElement(h,{attributeObject:t,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(S)||n))return null;var k="h".concat(t.headingLevel),P=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(s.Fragment,null,!n&&t.heading&&React.createElement(k,null,t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:P},n?React.createElement(s.Fragment,null,m({type:Object(u.__)("Size","woo-gutenberg-products-block"),name:Object(u.__)("Small","woo-gutenberg-products-block")}),m({type:Object(u.__)("Color","woo-gutenberg-products-block"),name:Object(u.__)("Blue","woo-gutenberg-products-block")})):React.createElement(s.Fragment,null,R,x)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){j(void 0),E(void 0),g([])}},React.createElement(p.a,{label:Object(u.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(u.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(j),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},28:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=(r(5),r(3)),i=r(4),u=r.n(i);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){o()(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 l=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,a=null!=r,l=null!=n;return!a&&l?(t=o||"span",i=s(s({},i),{},{className:u()(i.className,"screen-reader-text")}),React.createElement(t,i,n)):(t=o||c.Fragment,a&&l&&r!==n?React.createElement(t,i,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,i,r))};l.defaultProps={wrapperProps:{}},t.a=l},3:function(e,t){!function(){e.exports=this.React}()},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(61);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(22),o=r(19);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},38:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(38),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,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 u in n)r.call(n,u)&&n[u]&&e.push(u)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},41:function(e,t){!function(){e.exports=this.wp.blocks}()},44:function(e,t,r){"use strict";var n=r(32),o=r.n(n),c=r(33),i=r.n(c),u=r(19),a=r.n(u),s=r(34),l=r.n(s),f=r(35),p=r.n(f),b=r(24),g=r.n(b),d=r(6),m=r.n(d),O=(r(5),r(3)),y=r(1),v=r(9),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.A,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(y.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(y.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,u=e.errorMessage,a=e.errorMessagePrefix,s=void 0===a?Object(y.__)("Error:","woo-gutenberg-products-block"):a;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),u&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",u)))};r(64);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=g()(e);if(t){var o=g()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p()(this,r)}}var _=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()(a()(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=this.state,u=i.errorMessage;return i.hasError?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(O.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(O.Component);_.defaultProps={showErrorMessage:!0};t.a=_},45:function(e,t){!function(){e.exports=this.ReactDOM}()},5:function(e,t,r){e.exports=r(62)()},55:function(e,t,r){var n=r(56);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}}},56: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}},59: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},6: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}},61: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},62:function(e,t,r){"use strict";var n=r(63);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,c,i){if(i!==n){var u=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 u.name="Invariant Violation",u}}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}},63:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},64:function(e,t){},7:function(e,t){!function(){e.exports=this.lodash}()},74:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},75: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,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw c}}return r}}},76: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.")}},8:function(e,t,r){var n=r(74),o=r(75),c=r(55),i=r(76);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||i()}},87:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(8),o=r.n(n),c=r(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},9:function(e,t,r){"use strict";r.d(t,"i",(function(){return o})),r.d(t,"s",(function(){return c})),r.d(t,"w",(function(){return i})),r.d(t,"p",(function(){return u})),r.d(t,"l",(function(){return a})),r.d(t,"o",(function(){return s})),r.d(t,"h",(function(){return l})),r.d(t,"x",(function(){return f})),r.d(t,"k",(function(){return p})),r.d(t,"j",(function(){return b})),r.d(t,"c",(function(){return g})),r.d(t,"m",(function(){return d})),r.d(t,"n",(function(){return m})),r.d(t,"A",(function(){return O})),r.d(t,"t",(function(){return y})),r.d(t,"a",(function(){return v})),r.d(t,"u",(function(){return h})),r.d(t,"b",(function(){return j})),r.d(t,"f",(function(){return _})),r.d(t,"v",(function(){return E})),r.d(t,"g",(function(){return R})),r.d(t,"r",(function(){return x})),r.d(t,"q",(function(){return k})),r.d(t,"z",(function(){return P})),r.d(t,"y",(function(){return C})),r.d(t,"d",(function(){return T})),r.d(t,"e",(function(){return N}));var n=r(2),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),u=(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","")),a=(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),b=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),g=(Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[])),d=Object(n.getSetting)("isShippingCalculatorEnabled",!0),m=Object(n.getSetting)("isShippingCostHidden",!1),O=(Object(n.getSetting)("woocommerceBlocksPhase",1),Object(n.getSetting)("wcBlocksAssetUrl","")),y=Object(n.getSetting)("shippingCountries",{}),v=Object(n.getSetting)("allowedCountries",{}),h=Object(n.getSetting)("shippingStates",{}),j=Object(n.getSetting)("allowedStates",{}),_=(Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("checkoutShowLoginReminder",!0)),w={id:0,title:"",permalink:""},S=Object(n.getSetting)("storePages",{shop:w,cart:w,checkout:w,privacy:w,terms:w}),E=S.shop.permalink,R=(S.checkout.id,S.checkout.permalink),x=S.privacy.permalink,k=S.privacy.title,P=S.terms.permalink,C=S.terms.title,T=(S.cart.id,S.cart.permalink),N=Object(n.getSetting)("checkoutAllowsGuest",!1);Object(n.getSetting)("checkoutAllowsSignup",!1),r(41)},98:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return b}));var n=r(8),o=r.n(n),c=r(16),i=r(13),u=r(0),a=r(59),s=r(7),l=r(39),f=function(e){var t=Object(a.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(u.useCallback)((function(t){n(e,t)}),[e])]},p=function(e,t,r){var n=Object(a.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(u.useCallback)((function(t){s(r,e,t)}),[r,e])]},b=function(e,t){var r=Object(a.a)(),n=f(t=t||r),c=o()(n,2),i=c[0],p=c[1],b=Object(l.a)(e),g=Object(u.useRef)(!1);return Object(u.useEffect)((function(){p(Object(s.assign)({},i,b)),g.current=!0}),[b]),g.current?[i,p]:[e,p]}}});
|
build/active-filters.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '04dba0e4eae19598ae5c659ff1da6feb');
|
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,u=t[0],a=t[1],l=t[2],b=0,f=[];b<u.length;b++)o=u[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[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,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(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 u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var l=0;l<u.length;l++)t(u[l]);var s=a;return i.push([864,2,0,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},14:function(e,t){!function(){e.exports=this.wp.blocks}()},147:function(e,t,n){"use strict";var r=n(23),c=n.n(r),i=n(26),o=n.n(i),u=n(24),a=n.n(u),l=n(25),s=n.n(l),b=n(12),f=n.n(b),p=n(0),d=n(6),g=n(1),O=n(4);function m(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(p.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(O.Path,{d:n[t]})):null}function v(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){a()(n,e);var t=v(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(p.createElement)(m,{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,u=t.onChange;return Object(p.createElement)(O.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(m,{level:o}),controls:Object(d.range)(c,i).map((function(t){return e.createLevelControl(t,o,u)}))})}}]),n}(p.Component);t.a=h},150:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11),c=n.n(r),i=n(0),o=function(){var e=Object(i.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},166:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p}));var r=n(11),c=n.n(r),i=n(41),o=n(36),u=n(0),a=n(97),l=n(6),s=n(58),b=function(e){var t=Object(a.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(u.useCallback)((function(t){r(e,t)}),[e])]},f=function(e,t,n){var r=Object(a.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(u.useCallback)((function(t){l(n,e,t)}),[n,e])]},p=function(e,t){var n=Object(a.a)(),r=b(t=t||n),i=c()(r,2),o=i[0],f=i[1],p=Object(s.a)(e),d=Object(u.useRef)(!1);return Object(u.useEffect)((function(){f(Object(l.assign)({},o,p)),d.current=!0}),[p]),d.current?[o,f]:[e,f]}},177:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),i=n(7),o=n.n(i);n(253);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,u=e.heading,a="h".concat(n);return Object(r.createElement)(a,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:u,onChange:i}))}},189:function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return g}));var r=n(8),c=n.n(r),i=n(55),o=n.n(i),u=n(3);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 l(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 s,b,f={code:u.CURRENCY.code,symbol:u.CURRENCY.symbol,thousandSeparator:u.CURRENCY.thousandSeparator,decimalSeparator:u.CURRENCY.decimalSeparator,minorUnit:u.CURRENCY.precision,prefix:(s=u.CURRENCY.symbol,b=u.CURRENCY.symbolPosition,{left:s,left_space:" "+s,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(u.CURRENCY.symbol,u.CURRENCY.symbolPosition)},p=function(e){if(!e||"object"!==o()(e))return f;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,c=e.currency_decimal_separator,i=e.currency_minor_unit,u=e.currency_prefix,a=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(i)?i:2,prefix:"string"==typeof u?u:"$",suffix:"string"==typeof a?a:""}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(l({},f),e)},g=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=d(t),c=n/Math.pow(10,r.minorUnit),i=r.prefix+c+r.suffix,o=document.createElement("textarea");return o.innerHTML=i,o.value}},204:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41),c=n(36),i=n(0),o=n(150),u=n(58),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,l=void 0===a?[]:a,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,p=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 d=Object(i.useRef)({results:[],isLoading:!0}),g=Object(u.a)(b),O=Object(u.a)(l),m=Object(o.a)(),v=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,O],o=c.getCollectionError.apply(c,i);return o&&m(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,O,g,p]);return null!==v&&(d.current=v),d.current}},21:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},253:function(e,t,n){},257:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(5),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}))}},258:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i}));var r=n(6),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 u=o.slug.filter((function(e){return e!==c})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(o.slug=u.sort(),a.push(o)),t(Object(r.sortBy)(a,"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")))}},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},36:function(e,t){!function(){e.exports=this.wp.data}()},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},44:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(0),o=(n(2),n(9)),u=n(7),a=n.n(u);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}var b=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,u=e.wrapperProps,l=null!=n,b=null!=r;return!l&&b?(t=c||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),Object(i.createElement)(t,u,r)):(t=c||o.Fragment,l&&b&&n!==r?Object(i.createElement)(t,u,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,u,n))};b.defaultProps={wrapperProps:{}},t.a=b},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},5:function(e,t,n){"use strict";n.d(t,"k",(function(){return c})),n.d(t,"G",(function(){return i})),n.d(t,"M",(function(){return o})),n.d(t,"x",(function(){return u})),n.d(t,"z",(function(){return a})),n.d(t,"l",(function(){return l})),n.d(t,"y",(function(){return s})),n.d(t,"B",(function(){return b})),n.d(t,"n",(function(){return f})),n.d(t,"A",(function(){return p})),n.d(t,"m",(function(){return d})),n.d(t,"C",(function(){return g})),n.d(t,"t",(function(){return O})),n.d(t,"w",(function(){return m})),n.d(t,"q",(function(){return v})),n.d(t,"r",(function(){return h})),n.d(t,"s",(function(){return j})),n.d(t,"j",(function(){return y})),n.d(t,"I",(function(){return w})),n.d(t,"N",(function(){return _})),n.d(t,"p",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"F",(function(){return k})),n.d(t,"c",(function(){return C})),n.d(t,"u",(function(){return x})),n.d(t,"v",(function(){return P})),n.d(t,"Q",(function(){return N})),n.d(t,"H",(function(){return L})),n.d(t,"a",(function(){return H})),n.d(t,"K",(function(){return T})),n.d(t,"b",(function(){return V})),n.d(t,"J",(function(){return z})),n.d(t,"h",(function(){return D})),n.d(t,"L",(function(){return U})),n.d(t,"g",(function(){return B})),n.d(t,"i",(function(){return A})),n.d(t,"E",(function(){return Y})),n.d(t,"D",(function(){return I})),n.d(t,"P",(function(){return Q})),n.d(t,"O",(function(){return K})),n.d(t,"d",(function(){return G})),n.d(t,"e",(function(){return W})),n.d(t,"f",(function(){return q})),n.d(t,"R",(function(){return $})),n.d(t,"S",(function(){return X}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),u=Object(r.getSetting)("max_columns",6),a=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),p=Object(r.getSetting)("min_height",500),d=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),O=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),m=Object(r.getSetting)("limitTags"),v=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),E=Object(r.getSetting)("displayItemizedTaxes",!1),S=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),k=Object(r.getSetting)("productCount",0),C=Object(r.getSetting)("attributes",[]),x=Object(r.getSetting)("isShippingCalculatorEnabled",!0),P=Object(r.getSetting)("isShippingCostHidden",!1),R=Object(r.getSetting)("woocommerceBlocksPhase",1),N=Object(r.getSetting)("wcBlocksAssetUrl",""),L=Object(r.getSetting)("shippingCountries",{}),H=Object(r.getSetting)("allowedCountries",{}),T=Object(r.getSetting)("shippingStates",{}),V=Object(r.getSetting)("allowedStates",{}),z=Object(r.getSetting)("shippingMethodsExist",!1),D=Object(r.getSetting)("checkoutShowLoginReminder",!0),F={id:0,title:"",permalink:""},M=Object(r.getSetting)("storePages",{shop:F,cart:F,checkout:F,privacy:F,terms:F}),U=M.shop.permalink,B=M.checkout.id,A=M.checkout.permalink,Y=M.privacy.permalink,I=M.privacy.title,Q=M.terms.permalink,K=M.terms.title,G=M.cart.id,W=M.cart.permalink,q=Object(r.getSetting)("checkoutAllowsGuest",!1),J=(Object(r.getSetting)("checkoutAllowsSignup",!1),n(14)),$=function(e,t){if(R>2)return Object(J.registerBlockType)(e,t)},X=function(e,t){if(R>1)return Object(J.registerBlockType)(e,t)}},58:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(48),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(15),o=n.n(i),u=n(9);n(2);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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=o()(e,["srcElement","size"]);return Object(u.isValidElement)(t)&&Object(u.cloneElement)(t,function(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}({width:r,height:r},i))}},71:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(23),o=n.n(i),u=n(26),a=n.n(u),l=n(20),s=n.n(l),b=n(24),f=n.n(b),p=n(25),d=n.n(p),g=n(12),O=n.n(g),m=n(0),v=n(6),h=n(7),j=n.n(h),y=n(4),w=n(21);n(169);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=O()(e);if(t){var c=O()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return d()(this,n)}}var E=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 a()(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,u=n.className,a=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return a&&(e=Object(v.isFunction)(a)?a(i):a),Object(m.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",u)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(m.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.isDefault=!0,i["aria-pressed"]=!1),Object(m.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}(m.Component);t.a=Object(w.withInstanceId)(E)},864:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),i=n(0),o=n(1),u=n(14),a=n(60),l=n(59),s=Object(i.createElement)(l.a,{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(7),f=n.n(b),p=n(22),d=n(4),g=n(147),O=n(177),m=n(11),v=n.n(m),h=n(166),j=(n(2),n(44)),y=(n(814),n(257)),w=n(189),_=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %s and %s","woo-gutenberg-products-block"),Object(w.a)(e),Object(w.a)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(w.a)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(w.a)(t))},E=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,u=void 0===c?function(){}:c,a=e.showLabel,l=void 0===a||a;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+": "),Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},r?Object(i.createElement)(i.Fragment,null,r," ",n):n,Object(i.createElement)("button",{onClick:u},Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n))))},S=n(204),k=n(30),C=n(258),x=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,u=e.operator,a=void 0===u?"in":u,l=Object(S.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),s=l.results,b=l.isLoading,f=Object(h.b)("attributes",[]),p=v()(f,2),d=p[0],g=p[1];if(b)return null;var O=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},O,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=s.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===a&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),E({type:O,name:Object(k.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(C.a)(d,g,n,e)},showLabel:!1})}))))},P=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(h.b)("attributes",[]),u=v()(c,2),a=u[0],l=u[1],s=Object(h.b)("min_price"),b=v()(s,2),p=b[0],d=b[1],g=Object(h.b)("max_price"),O=v()(g,2),m=O[0],w=O[1],S=Object(i.useMemo)((function(){return Number.isFinite(p)||Number.isFinite(m)?E({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:_(p,m),removeCallback:function(){d(void 0),w(void 0)}}):null}),[p,m,_]),k=Object(i.useMemo)((function(){return a.map((function(e){var t=Object(y.b)(e.attribute);return Object(i.createElement)(x,{attributeObject:t,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[a]);if(!(a.length>0||Number.isFinite(p)||Number.isFinite(m)||r))return null;var C="h".concat(t.headingLevel),P=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)(C,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:P},r?Object(i.createElement)(i.Fragment,null,E({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block")}),E({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block")})):Object(i.createElement)(i.Fragment,null,S,k)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){d(void 0),w(void 0),l([])}},Object(i.createElement)(j.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},R=n(71),N=Object(d.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,u=t.heading,a=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(p.InspectorControls,{key:"inspector"},Object(i.createElement)(d.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(R.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:a,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(O.a,{headingLevel:a,heading:u,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(d.Disabled,null,Object(i.createElement)(P,{attributes:t,isEditor:!0})))}));Object(u.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(a.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:N,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}()},97: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}});
|
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,u=t[0],a=t[1],l=t[2],b=0,f=[];b<u.length;b++)o=u[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[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,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(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 u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var l=0;l<u.length;l++)t(u[l]);var s=a;return i.push([862,2,0,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},148:function(e,t,n){"use strict";var r=n(23),c=n.n(r),i=n(26),o=n.n(i),u=n(24),a=n.n(u),l=n(25),s=n.n(l),b=n(12),f=n.n(b),p=n(0),d=n(6),g=n(1),O=n(4);function m(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(p.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(O.Path,{d:n[t]})):null}function v(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){a()(n,e);var t=v(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(p.createElement)(m,{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,u=t.onChange;return Object(p.createElement)(O.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(m,{level:o}),controls:Object(d.range)(c,i).map((function(t){return e.createLevelControl(t,o,u)}))})}}]),n}(p.Component);t.a=h},15:function(e,t){!function(){e.exports=this.wp.blocks}()},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(11),c=n.n(r),i=n(0),o=function(){var e=Object(i.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},167:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return p}));var r=n(11),c=n.n(r),i=n(41),o=n(36),u=n(0),a=n(98),l=n(6),s=n(59),b=function(e){var t=Object(a.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(u.useCallback)((function(t){r(e,t)}),[e])]},f=function(e,t,n){var r=Object(a.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(u.useCallback)((function(t){l(n,e,t)}),[n,e])]},p=function(e,t){var n=Object(a.a)(),r=b(t=t||n),i=c()(r,2),o=i[0],f=i[1],p=Object(s.a)(e),d=Object(u.useRef)(!1);return Object(u.useEffect)((function(){f(Object(l.assign)({},o,p)),d.current=!0}),[p]),d.current?[o,f]:[e,f]}},178:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),i=n(7),o=n.n(i);n(255);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,u=e.heading,a="h".concat(n);return Object(r.createElement)(a,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:u,onChange:i}))}},190:function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return g}));var r=n(8),c=n.n(r),i=n(55),o=n.n(i),u=n(3);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 l(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 s,b,f={code:u.CURRENCY.code,symbol:u.CURRENCY.symbol,thousandSeparator:u.CURRENCY.thousandSeparator,decimalSeparator:u.CURRENCY.decimalSeparator,minorUnit:u.CURRENCY.precision,prefix:(s=u.CURRENCY.symbol,b=u.CURRENCY.symbolPosition,{left:s,left_space:" "+s,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(u.CURRENCY.symbol,u.CURRENCY.symbolPosition)},p=function(e){if(!e||"object"!==o()(e))return f;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,c=e.currency_decimal_separator,i=e.currency_minor_unit,u=e.currency_prefix,a=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(i)?i:2,prefix:"string"==typeof u?u:"$",suffix:"string"==typeof a?a:""}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(l({},f),e)},g=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=d(t),c=n/Math.pow(10,r.minorUnit),i=r.prefix+c+r.suffix,o=document.createElement("textarea");return o.innerHTML=i,o.value}},205:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41),c=n(36),i=n(0),o=n(151),u=n(59),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,l=void 0===a?[]:a,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,p=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 d=Object(i.useRef)({results:[],isLoading:!0}),g=Object(u.a)(b),O=Object(u.a)(l),m=Object(o.a)(),v=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,O],o=c.getCollectionError.apply(c,i);return o&&m(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,O,g,p]);return null!==v&&(d.current=v),d.current}},21:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},255:function(e,t,n){},259:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(5),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}))}},260:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i}));var r=n(6),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 u=o.slug.filter((function(e){return e!==c})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(o.slug=u.sort(),a.push(o)),t(Object(r.sortBy)(a,"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")))}},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},36:function(e,t){!function(){e.exports=this.wp.data}()},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},44:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(0),o=(n(2),n(9)),u=n(7),a=n.n(u);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}var b=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,u=e.wrapperProps,l=null!=n,b=null!=r;return!l&&b?(t=c||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),Object(i.createElement)(t,u,r)):(t=c||o.Fragment,l&&b&&n!==r?Object(i.createElement)(t,u,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,u,n))};b.defaultProps={wrapperProps:{}},t.a=b},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},5:function(e,t,n){"use strict";n.d(t,"k",(function(){return c})),n.d(t,"G",(function(){return i})),n.d(t,"M",(function(){return o})),n.d(t,"x",(function(){return u})),n.d(t,"z",(function(){return a})),n.d(t,"l",(function(){return l})),n.d(t,"y",(function(){return s})),n.d(t,"B",(function(){return b})),n.d(t,"n",(function(){return f})),n.d(t,"A",(function(){return p})),n.d(t,"m",(function(){return d})),n.d(t,"C",(function(){return g})),n.d(t,"t",(function(){return O})),n.d(t,"w",(function(){return m})),n.d(t,"q",(function(){return v})),n.d(t,"r",(function(){return h})),n.d(t,"s",(function(){return j})),n.d(t,"j",(function(){return y})),n.d(t,"I",(function(){return w})),n.d(t,"N",(function(){return _})),n.d(t,"p",(function(){return E})),n.d(t,"o",(function(){return S})),n.d(t,"F",(function(){return k})),n.d(t,"c",(function(){return C})),n.d(t,"u",(function(){return x})),n.d(t,"v",(function(){return P})),n.d(t,"Q",(function(){return N})),n.d(t,"H",(function(){return L})),n.d(t,"a",(function(){return H})),n.d(t,"K",(function(){return T})),n.d(t,"b",(function(){return V})),n.d(t,"J",(function(){return z})),n.d(t,"h",(function(){return D})),n.d(t,"L",(function(){return U})),n.d(t,"g",(function(){return B})),n.d(t,"i",(function(){return A})),n.d(t,"E",(function(){return Y})),n.d(t,"D",(function(){return I})),n.d(t,"P",(function(){return Q})),n.d(t,"O",(function(){return K})),n.d(t,"d",(function(){return G})),n.d(t,"e",(function(){return W})),n.d(t,"f",(function(){return q})),n.d(t,"R",(function(){return $})),n.d(t,"S",(function(){return X}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),u=Object(r.getSetting)("max_columns",6),a=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),p=Object(r.getSetting)("min_height",500),d=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),O=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),m=Object(r.getSetting)("limitTags"),v=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),E=Object(r.getSetting)("displayItemizedTaxes",!1),S=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),k=Object(r.getSetting)("productCount",0),C=Object(r.getSetting)("attributes",[]),x=Object(r.getSetting)("isShippingCalculatorEnabled",!0),P=Object(r.getSetting)("isShippingCostHidden",!1),R=Object(r.getSetting)("woocommerceBlocksPhase",1),N=Object(r.getSetting)("wcBlocksAssetUrl",""),L=Object(r.getSetting)("shippingCountries",{}),H=Object(r.getSetting)("allowedCountries",{}),T=Object(r.getSetting)("shippingStates",{}),V=Object(r.getSetting)("allowedStates",{}),z=Object(r.getSetting)("shippingMethodsExist",!1),D=Object(r.getSetting)("checkoutShowLoginReminder",!0),F={id:0,title:"",permalink:""},M=Object(r.getSetting)("storePages",{shop:F,cart:F,checkout:F,privacy:F,terms:F}),U=M.shop.permalink,B=M.checkout.id,A=M.checkout.permalink,Y=M.privacy.permalink,I=M.privacy.title,Q=M.terms.permalink,K=M.terms.title,G=M.cart.id,W=M.cart.permalink,q=Object(r.getSetting)("checkoutAllowsGuest",!1),J=(Object(r.getSetting)("checkoutAllowsSignup",!1),n(15)),$=function(e,t){if(R>2)return Object(J.registerBlockType)(e,t)},X=function(e,t){if(R>1)return Object(J.registerBlockType)(e,t)}},58:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(14),o=n.n(i),u=n(9);n(2);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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=o()(e,["srcElement","size"]);return Object(u.isValidElement)(t)&&Object(u.cloneElement)(t,function(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}({width:r,height:r},i))}},59:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(48),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},71:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(23),o=n.n(i),u=n(26),a=n.n(u),l=n(20),s=n.n(l),b=n(24),f=n.n(b),p=n(25),d=n.n(p),g=n(12),O=n.n(g),m=n(0),v=n(6),h=n(7),j=n.n(h),y=n(4),w=n(21);n(170);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=O()(e);if(t){var c=O()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return d()(this,n)}}var E=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 a()(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,u=n.className,a=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return a&&(e=Object(v.isFunction)(a)?a(i):a),Object(m.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",u)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(m.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.isDefault=!0,i["aria-pressed"]=!1),Object(m.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}(m.Component);t.a=Object(w.withInstanceId)(E)},862:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),i=n(0),o=n(1),u=n(15),a=n(58),l=n(60),s=Object(i.createElement)(l.a,{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(7),f=n.n(b),p=n(22),d=n(4),g=n(148),O=n(178),m=n(11),v=n.n(m),h=n(167),j=(n(2),n(44)),y=(n(812),n(259)),w=n(190),_=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %s and %s","woo-gutenberg-products-block"),Object(w.a)(e),Object(w.a)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(w.a)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(w.a)(t))},E=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,u=void 0===c?function(){}:c,a=e.showLabel,l=void 0===a||a;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+": "),Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},r?Object(i.createElement)(i.Fragment,null,r," ",n):n,Object(i.createElement)("button",{onClick:u},Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n))))},S=n(205),k=n(30),C=n(260),x=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,u=e.operator,a=void 0===u?"in":u,l=Object(S.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),s=l.results,b=l.isLoading,f=Object(h.b)("attributes",[]),p=v()(f,2),d=p[0],g=p[1];if(b)return null;var O=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},O,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=s.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===a&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),E({type:O,name:Object(k.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(C.a)(d,g,n,e)},showLabel:!1})}))))},P=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(h.b)("attributes",[]),u=v()(c,2),a=u[0],l=u[1],s=Object(h.b)("min_price"),b=v()(s,2),p=b[0],d=b[1],g=Object(h.b)("max_price"),O=v()(g,2),m=O[0],w=O[1],S=Object(i.useMemo)((function(){return Number.isFinite(p)||Number.isFinite(m)?E({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:_(p,m),removeCallback:function(){d(void 0),w(void 0)}}):null}),[p,m,_]),k=Object(i.useMemo)((function(){return a.map((function(e){var t=Object(y.b)(e.attribute);return Object(i.createElement)(x,{attributeObject:t,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[a]);if(!(a.length>0||Number.isFinite(p)||Number.isFinite(m)||r))return null;var C="h".concat(t.headingLevel),P=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)(C,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:P},r?Object(i.createElement)(i.Fragment,null,E({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block")}),E({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block")})):Object(i.createElement)(i.Fragment,null,S,k)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){d(void 0),w(void 0),l([])}},Object(i.createElement)(j.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},R=n(71),N=Object(d.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,u=t.heading,a=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(p.InspectorControls,{key:"inspector"},Object(i.createElement)(d.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(R.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:a,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(O.a,{headingLevel:a,heading:u,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(d.Disabled,null,Object(i.createElement)(P,{attributes:t,isEditor:!0})))}));Object(u.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(a.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:N,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}()},98: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}});
|
build/all-products-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wp-a11y', 'wp-autop', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wp-a11y', 'wp-autop', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => 'cc34a81075feab7e555c3b25153d6a3a');
|
build/all-products-frontend.js
CHANGED
@@ -1,6 +1,6 @@
|
|
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=
|
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 a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===a)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}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){e.exports=n(61)()},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){var r=n(73),o=n(74),a=n(54),c=n(75);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||c()}},function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"s",(function(){return a})),n.d(t,"w",(function(){return c})),n.d(t,"p",(function(){return i})),n.d(t,"l",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"x",(function(){return f})),n.d(t,"k",(function(){return p})),n.d(t,"j",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return h})),n.d(t,"A",(function(){return g})),n.d(t,"t",(function(){return v})),n.d(t,"a",(function(){return y})),n.d(t,"u",(function(){return O})),n.d(t,"b",(function(){return j})),n.d(t,"f",(function(){return w})),n.d(t,"v",(function(){return _})),n.d(t,"g",(function(){return S})),n.d(t,"r",(function(){return R})),n.d(t,"q",(function(){return x})),n.d(t,"z",(function(){return C})),n.d(t,"y",(function(){return N})),n.d(t,"d",(function(){return P})),n.d(t,"e",(function(){return T}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),a=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),i=(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),d=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),m=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),b=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=Object(r.getSetting)("isShippingCostHidden",!1),g=(Object(r.getSetting)("woocommerceBlocksPhase",1),Object(r.getSetting)("wcBlocksAssetUrl","")),v=Object(r.getSetting)("shippingCountries",{}),y=Object(r.getSetting)("allowedCountries",{}),O=Object(r.getSetting)("shippingStates",{}),j=Object(r.getSetting)("allowedStates",{}),w=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("checkoutShowLoginReminder",!0)),k={id:0,title:"",permalink:""},E=Object(r.getSetting)("storePages",{shop:k,cart:k,checkout:k,privacy:k,terms:k}),_=E.shop.permalink,S=(E.checkout.id,E.checkout.permalink),R=E.privacy.permalink,x=E.privacy.title,C=E.terms.permalink,N=E.terms.title,P=(E.cart.id,E.cart.permalink),T=Object(r.getSetting)("checkoutAllowsGuest",!1);Object(r.getSetting)("checkoutAllowsSignup",!1),n(41)},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){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,n){var r=n(76);e.exports=function(e,t){if(null==e)return{};var n,o,a=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)&&(a[n]=e[n])}return a}},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){!function(){e.exports=this.wp.htmlEntities}()},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,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.compose}()},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 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,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(52);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,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}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";var r=n(6),o=n.n(r),a=(n(5),n(3)),c=n(4),i=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}var l=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,u=null!=n,l=null!=r;return!u&&l?(t=o||"span",c=s(s({},c),{},{className:i()(c.className,"screen-reader-text")}),React.createElement(t,c,r)):(t=o||a.Fragment,u&&l&&n!==r?React.createElement(t,c,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,c,n))};l.defaultProps={wrapperProps:{}},t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(30);function o(e,t){if(null==e)return{};var n,o,a=Object(r.a)(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)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),a=n(6),c=n.n(a),i=n(12),u=n.n(i),s=n(3),l=n.n(s);function f(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 p(){return(p=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)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){}function g(){}g.resetWarningCache=h;var v=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var c=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 c.name="Invariant Violation",c}}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:g,resetWarningCache:h};return n.PropTypes=n,n}()}));function y(){}function O(e){return!!(e||"").match(/\d/)}function j(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function w(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),a=o[0],c=o[1]||"";return{beforeDecimal:a,afterDecimal:c,hasNagation:n,addNegation:r}}function k(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function E(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function _(e,t,n){return Math.min(Math.max(e,t),n)}function S(e){return Math.max(e.selectionStart,e.selectionEnd)}var R={thousandSeparator:v.oneOfType([v.string,v.oneOf([!0])]),decimalSeparator:v.string,allowedDecimalSeparators:v.arrayOf(v.string),thousandsGroupStyle:v.oneOf(["thousand","lakh","wan"]),decimalScale:v.number,fixedDecimalScale:v.bool,displayType:v.oneOf(["input","text"]),prefix:v.string,suffix:v.string,format:v.oneOfType([v.string,v.func]),removeFormatting:v.func,mask:v.oneOfType([v.string,v.arrayOf(v.string)]),value:v.oneOfType([v.number,v.string]),defaultValue:v.oneOfType([v.number,v.string]),isNumericString:v.bool,customInput:v.elementType,allowNegative:v.bool,allowEmptyFormatting:v.bool,allowLeadingZeros:v.bool,onValueChange:v.func,onKeyDown:v.func,onMouseUp:v.func,onChange:v.func,onFocus:v.func,onBlur:v.func,type:v.oneOf(["text","tel","password"]),isAllowed:v.func,renderText:v.func,getInputRef:v.oneOfType([v.func,v.shape({current:v.any})])},x={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:y,onChange:y,onKeyDown:y,onMouseUp:y,onFocus:y,onBlur:y,isAllowed:function(){return!0}},C=function(e){function t(e){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n=!(o=d(t).call(this,e))||"object"!=typeof o&&"function"!=typeof o?b(r):o;var a=e.defaultValue;n.validateProps();var c=n.formatValueProp(a);return n.state={value:c,numAsString:n.removeFormatting(c)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(b(n)),n.onKeyDown=n.onKeyDown.bind(b(n)),n.onMouseUp=n.onMouseUp.bind(b(n)),n.onFocus=n.onFocus.bind(b(n)),n.onBlur=n.onBlur.bind(b(n)),n}var n,r,o;return 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&&m(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,a=n.numAsString,c=void 0===a?"":a;if(e!==t){this.validateProps();var i=this.formatNumString(c),u=void 0===t.value?i:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),f=parseFloat(c);(isNaN(l)&&isNaN(f)||l===f)&&i===o&&(null!==r||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var c=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==c&&(e="".concat(e.substring(0,c),".").concat(e.substring(c+1,e.length).replace(new RegExp(j(r),"g"),""))),a&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,a=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!a||0===o||t||r?"":"|"+j(a)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){E(e,t),setTimeout((function(){e.value===n&&E(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,a=r.suffix,c=r.format;if(""===e)return 0;if(t=_(t,0,e.length),!c){var i="-"===e[0];return _(t,o.length+(i?1:0),e.length-a.length)}if("function"==typeof c)return t;if("#"===c[t]&&O(e[t]))return t;if("#"===c[t-1]&&O(e[t-1]))return t;var u=c.indexOf("#");t=_(t,u,c.lastIndexOf("#")+1);for(var s=c.substring(t,c.length).indexOf("#"),l=t,f=t+(-1===s?0:s);l>u&&("#"!==c[l]||!O(e[l]));)l-=1;return!O(e[f])||"left"===n&&t!==u||t-l<f-t?O(e[l])?l+1:l:f}},{key:"getCaretPosition",value:function(e,t,n){var r,o,a=this.props.format,c=this.state.value,i=this.getNumberRegex(!0),u=(e.match(i)||[]).join(""),s=(t.match(i)||[]).join("");for(r=0,o=0;o<n;o++){var l=e[o]||"",f=t[r]||"";if((l.match(i)||l===f)&&("0"!==l||!f.match(i)||"0"===f||u.length===s.length)){for(;l!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof a||c||(r=t.length),r=this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var a="-"===e[0];a&&(e=e.substring(1,e.length));var c=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==c&&c===e.length-o.length?e.substring(0,c):e,a&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,a=t.length;o<=a;o++){var c=t[o]||"",i=o===a?e.length:e.indexOf(c,n);if(-1===i){r=e;break}r+=e.substring(n,i),n=i+c.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,a=t.length;o<a;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,a=t.suffix,c=t.allowNegative,i=t.thousandsGroupStyle,u=this.getSeparators(),s=u.thousandSeparator,l=u.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=w(e,c),d=p.beforeDecimal,m=p.afterDecimal,b=p.addNegation;return void 0!==n&&(m=k(m,n,r)),s&&(d=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(d,s,i)),o&&(d=o+d),a&&(m+=a),b&&(d="-"+d),e=d+(f&&l||"")+m}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,a=t.allowEmptyFormatting,c=this.props,i=c.value,u=void 0===i?e:i,s=c.isNumericString,l=!u&&0!==u;return l&&a&&(u=""),l&&!a?"":("number"==typeof u&&(u=u.toString(),s=!0),"Infinity"===u&&s&&(u=""),s&&!n&&"number"==typeof r&&(u=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=w(e),a=o.beforeDecimal,c=o.afterDecimal,i=o.hasNagation,u=parseFloat("0.".concat(c||"0")).toFixed(t).split("."),s=a.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=k(u[1]||"",Math.min(t,c.length),n),f=r?".":"";return"".concat(i?"-":"").concat(s).concat(f).concat(l)}(u,r,o)),s?this.formatNumString(u):this.formatInput(u))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,a=n.suffix,c=n.decimalScale,i=n.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-a.length||c&&i&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,a=r.allowNegative,c=r.prefix,i=r.suffix,u=r.decimalScale,s=this.getSeparators(),l=s.allowedDecimalSeparators,f=s.decimalSeparator,p=this.state.numAsString||"",d=this.selectionBeforeInput,m=d.selectionStart,b=d.selectionEnd,h=function(e,t){for(var n=0,r=0,o=e.length,a=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[a-1-r]&&a-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),g=h.start,v=h.end;if(!o&&g===v&&-1!==l.indexOf(n[m])){var y=0===u?"":f;return n.substr(0,m)+y+n.substr(m+1,n.length)}var O=o?0:c.length,j=t.length-(o?0:i.length);if(n.length>t.length||!n.length||g===v||0===m&&b===t.length||m===O&&b===j)return n;if(this.checkIfFormatGotDeleted(g,v,t)&&(n=t),!o){var k=this.removeFormatting(n),E=w(k,a),_=E.beforeDecimal,S=E.afterDecimal,R=E.addNegation,x=e<n.indexOf(f)+1;if(k.length<p.length&&x&&""===_&&!parseFloat(S))return R?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,a=e.numAsString,c=e.caretPos,i=this.props.onValueChange,u=this.state.value;if(n)if(o){if(!c){var s=e.inputValue||n.value,l=S(n);n.value=t,c=this.getCaretPosition(s,t,l)}this.setPatchedCaretPosition(n,c,t)}else n.value=t;void 0===a&&(a=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:a}),i(this.getValueObject(t,a)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,a=o.isAllowed,c=r.value||"",i=S(t);n=this.correctInputValue(i,c,n);var u=this.formatInput(n)||"",s=this.removeFormatting(u);a(this.getValueObject(u,s))||(u=c),this.updateValue({formattedValue:u,numAsString:s,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,a=t.allowLeadingZeros,c=n.numAsString,i=n.value;if(this.focusedElm=null,this.focusTimeout&&clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(c))&&(c=""),a||(c=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(c));var u=this.formatNumString(c);if(u!==i)return this.updateValue({formattedValue:u,numAsString:c,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,a=n.selectionEnd,c=n.value,i=void 0===c?"":c,u=this.props,s=u.decimalScale,l=u.fixedDecimalScale,f=u.prefix,p=u.suffix,d=u.format,m=u.onKeyDown,b=void 0!==s&&l,h=this.getNumberRegex(!1,b),g=new RegExp("-"),v="string"==typeof d;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:a},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===a){var y=t,O=v?d.indexOf("#"):f.length,j=v?d.lastIndexOf("#")+1:i.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var w="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(i,t,w)}else if("Delete"!==r||h.test(i[t])||g.test(i[t])){if("Backspace"===r&&!h.test(i[t]))if(o<=O+1&&"-"===i[0]&&void 0===d){var k=i.substring(1);this.updateValue({formattedValue:k,caretPos:y,input:n})}else if(!g.test(i[t])){for(;!h.test(i[y-1])&&y>O;)y--;y=this.correctCaretPosition(i,y,"left")}}else for(;!h.test(i[y])&&y<j;)y++;(y!==t||t<O||t>j)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,i),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,a=void 0===o?"":o;if(n===r){var c=this.correctCaretPosition(a,n);c!==n&&this.setPatchedCaretPosition(t,c,a)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,a=n.value,c=void 0===a?"":a,i=t.correctCaretPosition(c,r);i===r||0===r&&o===c.length||t.setPatchedCaretPosition(n,i,c),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,a=r.displayType,c=r.customInput,i=r.renderText,u=r.getInputRef,s=this.state.value,f=(e=this.props,t=R,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),d=p({inputMode:"numeric"},f,{type:o,value:s,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===a)return i?i(s)||null:l.a.createElement("span",p({},f,{ref:u}),s);if(c){var m=c;return l.a.createElement(m,p({},d,{ref:u}))}return l.a.createElement("input",p({},d,{ref:u}))}}])&&f(n.prototype,r),o&&f(n,o),t}(l.a.Component);C.propTypes=R,C.defaultProps=x;var N=C,P=n(4),T=n.n(P);n(90);function I(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 A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.className,n=e.value,r=e.currency,a=e.onValueChange,c=u()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var i=n/Math.pow(10,r.minorUnit);if(!Number.isFinite(i))return null;var s=T()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),l=A(A(A({displayType:"text"},c),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(r)),{},{value:void 0,currency:void 0,onValueChange:void 0}),f=a?function(e){var t=e.value*Math.pow(10,r.minorUnit);a(t)}:function(){};return React.createElement(N,o()({className:s},l,{value:i,onValueChange:f}))}},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(60);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(22),o=n(19);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(47);var o=n(52);function a(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){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(38),a=n.n(o),c=function(e){var t=Object(r.useRef)();return a()(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.a11y}()},function(e,t,n){"use strict";var r=n(32),o=n.n(r),a=n(33),c=n.n(a),i=n(19),u=n.n(i),s=n(34),l=n.n(s),f=n(35),p=n.n(f),d=n(24),m=n.n(d),b=n(6),h=n.n(b),g=(n(5),n(3)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.A,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,a=e.text,c=void 0===a?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):a,i=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),i&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",i)))};n(63);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=m()(e);if(t){var o=m()(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,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return e=t.call.apply(t,[this].concat(a)),h()(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,a=e.errorMessagePrefix,c=this.state,i=c.errorMessage;return c.hasError?React.createElement(O,{errorMessage:r?i:null,header:t,imageUrl:n,text:o,errorMessagePrefix:a}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(g.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(g.Component);w.defaultProps={showErrorMessage:!0};t.a=w},function(e,t){!function(){e.exports=this.ReactDOM}()},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,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.dom}()},function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(47);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){var r=n(55);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,n){var r=n(91),o=n(92),a=n(54),c=n(93);e.exports=function(e){return r(e)||o(e)||a(e)||c()}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=Object(r.createContext)("page"),a=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(62);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,c){if(c!==r){var i=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 i.name="Invariant Violation",i}}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:a,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,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";n.d(t,"a",(function(){return s}));var r=n(6),o=n.n(r),a=n(112),c=n(0);function i(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?i(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(a.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,i=e.setIsSuppressed,s=Object(c.useRef)(t);Object(c.useEffect)((function(){s.current=t}),[t]);var l=Object(c.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.map((function(t){return null!==e&&t.status!==e||r(t.id),!0}))},removeNotice:r}}),[r]),f=Object(c.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:i})}},,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)),a=r(n(76)),c=n(3),i=r(c),u=r(n(104)),s=r(n(19)),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=c.useState(!1)[1];return c.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 m(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 b(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,a(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 a;return l.und(t[r])?o({},n,((a={})[r]=e[r],a)):n}),{});return o({to:t},n)}var h,g,v=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 v&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(s(t))}))},t}return u(t,e),t}(v),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 v&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&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 v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function j(e,t){h={fn:e,transform:t}}function w(e){g=e}var k,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},_=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function S(e){k=e}var R,x=function(){return Date.now()};function C(e){R=e}var N,P,T=function(e){return e.current};function I(e){N=e}var A=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return g},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return _},injectFrame:function(e,t){E=e,_=t},get interpolation(){return k},injectStringInterpolator:S,get now(){return x},injectNow:function(e){x=e},get defaultElement(){return R},injectDefaultElement:C,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return N},injectCreateAnimatedStyle:I,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),D=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:N(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),F=!1,L=new Set,M=function e(){if(!F)return!1;var t=x(),n=L,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var a;if(r){if(o>=n.length)break;a=n[o++]}else{if((o=n.next()).done)break;a=o.value}for(var c=a,i=!1,u=0;u<c.configs.length;u++){for(var s=c.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var m=s.fromValues[p],b=s.toValues[p],h=d.lastPosition,g=b instanceof v,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(g&&(b=b.getValue()),s.immediate)d.setValue(b),d.done=!0;else if("string"!=typeof m&&"string"!=typeof b){if(void 0!==s.duration)h=m+s.easing((t-d.startTime)/s.duration)*(b-m),l=t>=d.startTime+s.duration;else if(s.decay)h=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(b=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-b)+-s.friction*y)/s.mass)/1e3)/1e3}var w=!(!s.clamp||0===s.tension)&&(m<b?h>b:h<b),k=Math.abs(y)<=s.precision,_=0===s.tension||Math.abs(b-h)<=s.precision;l=w||k&&_,d.lastVelocity=y,d.lastTime=t}g&&!s.toValues[p].done&&(l=!1),l?(d.value!==b&&(h=b),d.done=!0):i=!0,d.setValue(h),d.lastPosition=h}else d.setValue(b),d.done=!0}}c.props.onFrame&&(c.values[s.name]=s.interpolation.getValue())}c.props.onFrame&&c.props.onFrame(c.values),i||(L.delete(c),c.stop(!0))}return L.size?P?P():E(e):F=!1,F};function V(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,a=r.range||[0,1],c=r.extrapolateLeft||r.extrapolate||"extend",i=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,a);return function(e,t,n,r,o,a,c,i,u){var s=u?u(e):e;if(s<t){if("identity"===c)return s;"clamp"===c&&(s=t)}if(s>n){if("identity"===i)return s;"clamp"===i&&(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=a(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,a[t],a[t+1],o[t],o[t+1],u,c,i,r.map)}}var B=function(e){function t(n,r,o,a){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=V(r,o,a),c}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=V(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 B(this,e,t,n)},t}(v),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 B(this,e,t)},t}(y),U=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=U++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=b(e),n=t.delay,r=void 0===n?0:n,c=t.to,i=a(t,["delay","to"]);if(l.arr(c)||l.fun(c))this.queue.push(o({},i,{delay:r,to:c}));else if(c){var u={};Object.entries(c).forEach((function(e){var t,n=e[0],a=e[1],c=o({to:(t={},t[n]=a,t),delay:m(r,n)},i),s=u[c.delay]&&u[c.delay].to;u[c.delay]=o({},u[c.delay],c,{to:o({},s,c.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),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,a=e.to,c=void 0===a?{}:a;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(c)&&(n.merged=o({},n.merged,c))}));var r=this.local=++this.guid,c=this.localQueue=this.queue;this.queue=[],c.forEach((function(t,o){var i=t.delay,u=a(t,["delay"]),s=function(t){o===c.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);i?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),i):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,L.has(t)||L.add(t),F||(F=!0,E(P||M));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,L.has(t)&&L.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,a(e,["delay"])),c=this.local,i=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,a=o({},r,b(r.to[t]));l.arr(a.config)&&(a.config=a.config[t]),i=i.then((function(){if(c===n.guid)return new Promise((function(e){return n.diff(a).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;i=i.then((function(){return r.to((function(e){var t=o({},r,b(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,c===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}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,a=void 0===r?{}:r,c=n.to,i=void 0===c?{}:c,u=n.config,s=void 0===u?{}:u,f=n.reverse,b=n.attach,h=n.reset,v=n.immediate;if(f){var y=[i,a];a=y[0],i=y[1]}this.merged=o({},a,this.merged,i),this.hasChanged=!1;var O=b&&b(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],c=n[1],i=e[r]||{},u=l.num(c),f=l.str(c)&&!c.startsWith("#")&&!/\d/.test(c)&&!g[c],b=l.arr(c),y=!u&&!b&&!f,j=l.und(a[r])?c:a[r],w=u||b||f?c:1,E=m(s,r);O&&(w=O.animations[r].parent);var _,S=i.parent,R=i.interpolation,C=d(O?w.getPayload():w),N=c;y&&(N=k({range:[0,1],output:[c,c]})(1));var P,T=R&&R.getValue(),I=!l.und(S)&&i.animatedValues.some((function(e){return!e.done})),A=!l.equ(N,T),D=!l.equ(N,i.previous),F=!l.equ(E,i.config);if(h||D&&A||F){var L;if(u||f)S=R=i.parent||new z(j);else if(b)S=R=i.parent||new q(j);else if(y){var M=i.interpolation&&i.interpolation.calc(i.parent.value);M=void 0===M||h?j:M,i.parent?(S=i.parent).setValue(0,!1):S=new z(0);var V={output:[M,c]};i.interpolation?(R=i.interpolation,i.interpolation.updateConfig(V)):R=S.interpolate(V)}return C=d(O?w.getPayload():w),_=d(S.getPayload()),h&&!y&&S.setValue(j,!1),t.hasChanged=!0,_.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=I?e.lastVelocity:void 0,e.lastTime=I?e.lastTime:void 0,e.startTime=x(),e.done=!1,e.animatedStyles.clear()})),m(v,r)&&S.setValue(y?w:c,!1),o({},e,((L={})[r]=o({},i,{name:r,parent:S,interpolation:R,animatedValues:_,toValues:C,previous:N,config:E,fromValues:d(S.getValue()),immediate:m(v,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}),L))}return A?e:(y&&(S.setValue(1,!1),R.updateConfig({output:[N,N]})),S.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:N}),P)))}),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}(),W=function(e,t){var n=c.useRef(!1),r=c.useRef(),o=l.fun(t),a=c.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 a=new H,c=o?m(t,r,a):t[r];return 0===r&&(n=c.ref),a.update(c),n||a.start(),a})),n]}),[e]),i=a[0],u=a[1];r.current=i;c.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=c.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);c.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),c.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)},Y=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,c=a(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},c)};function G(e,t){var n=function(){if(o){if(a>=r.length)return"break";c=r[a++]}else{if((a=r.next()).done)return"break";c=a.value}var n=c.key,i=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},r=e.current.deleted,o=Array.isArray(r),a=0;for(r=o?r:r[Symbol.iterator]();;){var c;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 v||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),Z={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},J="[-+]?\\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(J,J,J)),te=new RegExp("rgba"+X(J,J,J,J)),ne=new RegExp("hsl"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",J)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{6})$/,ie=/^#([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,a=ue(o,r,e+1/3),c=ue(o,r,e),i=ue(o,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*c)<<16|Math.round(255*i)<<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 me(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ce.exec(t))?parseInt(n[1]+"ff",16)>>>0:Z.hasOwnProperty(t)?Z[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=ie.exec(t))?parseInt(n[1],16)>>>0:(n=ae.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 be=/[+\-]?(?: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,ge=new RegExp("("+Object.keys(Z).join("|")+")","g"),ve={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||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).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}),ve);var je={};I((function(e){return new $(e)})),C("div"),S((function(e){var t=e.output.map((function(e){return e.replace(he,me)})).map((function(e){return e.replace(ge,me)})),n=t[0].match(be).map((function(){return[]}));t.forEach((function(e){e.match(be).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(be).map((function(t,r){return V(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(be,(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(Z),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,c=t.scrollLeft,i=a(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!==c&&(e.scrollLeft=c),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 i){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,i[p])}}),(function(e){return e}));var we,ke,Ee=(we=function(e){return c.forwardRef((function(t,n){var r=f(),u=c.useRef(!0),s=c.useRef(null),p=c.useRef(null),d=c.useCallback((function(e){var t=s.current;s.current=new D(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),c.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var m,b=s.current.getValue(),g=(b.scrollTop,b.scrollLeft,a(b,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof i.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 i.createElement(e,o({},g,{ref:v}))}))},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)}),_e=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=M,t.animated=_e,t.a=_e,t.interpolate=function(e,t,n){return e&&new B(e,t,n)},t.Globals=A,t.useSpring=function(e){var t=l.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],a=n[2];return t?[r[0],o,a]:r},t.useTrail=function(e,t){var n=c.useRef(!1),r=l.fun(t),a=m(t),i=c.useRef(),u=W(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},a,{config:m(a.config,e),attach:e>0&&function(){return i.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=c.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,c=i.current[r];return o({},e,{config:m(e.config||a.config,t),attach:c&&function(){return c}})}))}}),[e,a.reverse]);return c.useEffect((function(){n.current&&!r&&d(t)})),c.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),i=Y(r),u=i.lazy,s=void 0!==u&&u,l=(i.unique,i.reset),p=void 0!==l&&l,d=(i.enter,i.leave,i.update,i.onDestroyed),b=(i.keys,i.items,i.onFrame),h=i.onRest,g=i.onStart,v=i.ref,y=a(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=c.useRef(!1),w=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return c.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,c=a(e,["first","prevProps"]),i=Y(t),u=i.items,s=i.keys,l=i.initial,f=i.from,p=i.enter,d=i.leave,b=i.update,h=i.trail,g=void 0===h?0:h,v=i.unique,y=i.config,O=i.order,j=void 0===O?["enter","leave","update"]:O,w=Y(r),k=w.keys,E=w.items,_=o({},c.current),S=[].concat(c.deleted),R=Object.keys(_),x=new Set(R),C=new Set(s),N=s.filter((function(e){return!x.has(e)})),P=c.transitions.filter((function(e){return!e.destroyed&&!C.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return x.has(e)})),I=-g;for(;j.length;){switch(j.shift()){case"enter":N.forEach((function(e,t){v&&S.find((function(t){return t.originalKey===e}))&&(S=S.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],a=n&&void 0!==l?"initial":"enter";_[e]={slot:a,originalKey:e,key:v?String(e):K++,item:o,trail:I+=g,config:m(y,o,a),from:m(n&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":P.forEach((function(e){var t=k.indexOf(e),n=E[t];S.unshift(o({},_[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:I+=g,config:m(y,n,"leave"),to:m(d,n)})),delete _[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];_[e]=o({},_[e],{item:n,slot:"update",trail:I+=g,config:m(y,n,"update"),to:m(b,n)})}))}}var A=s.map((function(e){return _[e]}));return S.forEach((function(e){var t,n=e.left,r=(e.right,a(e,["left","right"]));-1!==(t=A.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),A=[].concat(A.slice(0,t),[r],A.slice(t))})),o({},c,{changed:N.length||P.length||T.length,first:n&&0===N.length,transitions:A,current:_,deleted:S,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,a=e.config,c=e.trail,i=e.key,u=e.item;w.current.instances.has(i)||w.current.instances.set(i,new H);var l=w.current.instances.get(i),f=o({},y,{to:r,from:n,config:a,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||s||G(w,i),d&&d(u)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(v||s)&&w.current.deleted.length>0&&G(w),h&&h(u,t,n))},onStart:g&&function(){return g(u,t)},onFrame:b&&function(e){return b(u,t,e)},delay:c,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),c.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=c.useRef();c.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 a=e.current;if(a){var c=a.controllers;if(c.length){var i=n*t[r];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),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=W},function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){"use strict";var r=n(11),o=n.n(r),a=n(12),c=n.n(a),i=n(72),u=n(4),s=n.n(u),l=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]),a=s()("dashicon","dashicons-arrow-down-alt2",t);return React.createElement(i.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:a,width:n,height:n},r),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},f=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]),a=s()("dashicon","dashicons-arrow-down-alt2",t);return React.createElement(i.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:a,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"}))},p=n(0);t.a=function(e){let t=function(){return null};switch(e.icon){case"arrow-down-alt2":t=l;break;case"no-alt":t=f}return Object(p.createElement)(t,{size:e.size||20,className:e.className})}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(26),o=n(7),a=n(0),c=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(a.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},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,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}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){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(26),o=n(10),a=n(29),c=n(0),i=n(69),u=n(72);t.a=function(e){var t=e.icon,n=void 0===t?null:t,s=e.size,l=Object(a.a)(e,["icon","size"]),f=s||20;if("string"==typeof n)return Object(c.createElement)(i.a,Object(o.a)({icon:n,size:f},l));if(n&&i.a===n.type)return Object(c.cloneElement)(n,Object(r.a)({size:f},l));var p=s||24;if("function"==typeof n)return n.prototype instanceof c.Component?Object(c.createElement)(n,Object(r.a)({size:p},l)):n(Object(r.a)({size:p},l));if(n&&("svg"===n.type||n.type===u.a)){var d=Object(r.a)({width:p,height:p},n.props,l);return Object(c.createElement)(u.a,d)}return Object(c.isValidElement)(n)?Object(c.cloneElement)(n,Object(r.a)({size:p},l)):n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(16),o=n(13),a=n(110),c=n(15),i=n(7),u={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(a.a)(),n=t.isEditor,s=t.previewData,l=(null==s?void 0:s.previewCart)||{},f=e.shouldSelect,p=Object(o.useSelect)((function(e,t){var o=t.dispatch;if(!f)return u;if(n)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var a=e(r.CART_STORE_KEY),s=a.getCartData(),p=a.getCartErrors(),d=a.getCartTotals(),m=!a.hasFinishedResolution("getCartData"),b=a.areShippingRatesLoading(),h=o(r.CART_STORE_KEY).receiveCart,g=Object(i.mapValues)(s.shippingAddress,(function(e){return Object(c.decodeEntities)(e)}));return{cartCoupons:s.coupons,cartItems:s.items||[],cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors||[],cartTotals:d,cartIsLoading:m,cartErrors:p,shippingAddress:g,shippingRates:s.shippingRates||[],shippingRatesLoading:b,hasShippingAddress:!!g.country,receiveCart:h}}),[f]);return p}},function(e,t,n){"use strict";var r=n(26),o=n(29),a=n(4),c=n.n(a),i=n(0);t.a=Object(i.forwardRef)((function(e,t){var n=e.href,a=e.target,u=e.isPrimary,s=e.isLarge,l=e.isSmall,f=e.isTertiary,p=e.isToggled,d=e.isBusy,m=e.isDefault,b=e.isLink,h=e.isDestructive,g=e.className,v=e.disabled,y=Object(o.a)(e,["href","target","isPrimary","isLarge","isSmall","isTertiary","isToggled","isBusy","isDefault","isLink","isDestructive","className","disabled"]),O=c()("components-button",g,{"is-button":m||u||s||l,"is-default":m||!u&&(s||l),"is-primary":u,"is-large":s,"is-small":l,"is-tertiary":f,"is-toggled":p,"is-busy":d,"is-link":b,"is-destructive":h}),j=void 0===n||v?"button":"a",w="a"===j?{href:n,target:a}:{type:"button",disabled:v};return Object(i.createElement)(j,Object(r.a)({},w,y,{className:O,ref:t}))}))},,,function(e,t){!function(){e.exports=this.wp.deprecated}()},,function(e,t,n){"use strict";var r=n(0),o=n(68),a=n(49),c=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,"")},u=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=i(e),o=r.split(" ").splice(0,t).join(" ");return Object(a.autop)(u(o,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",o=i(e),c=o.slice(0,t);if(n)return Object(a.autop)(u(c,r));var s=c.match(/([\s]+)/g),l=s?s.length:0,f=o.slice(0,t+l);return Object(a.autop)(u(f,r))};t.a=function(e){var t=e.source,n=e.maxLength,i=void 0===n?15:n,u=e.countType,f=void 0===u?"words":u,p=e.className,d=void 0===p?"":p,m=Object(r.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",r=Object(a.autop)(e),i=Object(o.count)(r,n);if(i<=t)return r;var u=c(r),f=Object(o.count)(u,n);return f<=t?u:"words"===n?s(u,t):l(u,t,"characters_including_spaces"===n)}(t,i,f)}),[t,i,f]);return React.createElement(r.RawHTML,{className:d},m)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(8),o=n.n(r),a=n(0),c=function(){var e=Object(a.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},,,,function(e,t){},function(e,t,n){var r=n(55);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){!function(){e.exports=this.wp.components}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return d}));var r=n(8),o=n.n(r),a=n(16),c=n(13),i=n(0),u=n(58),s=n(7),l=n(39),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(a.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(a.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(i.useCallback)((function(t){r(e,t)}),[e])]},p=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(c.useSelect)((function(r){return r(a.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(a.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(i.useCallback)((function(t){s(n,e,t)}),[n,e])]},d=function(e,t){var n=Object(u.a)(),r=f(t=t||n),a=o()(r,2),c=a[0],p=a[1],d=Object(l.a)(e),m=Object(i.useRef)(!1);return Object(i.useEffect)((function(){p(Object(s.assign)({},c,d)),m.current=!0}),[d]),m.current?[c,p]:[e,p]}},function(e,t,n){"use strict";var r=n(10),o=n(0),a=n(7);var c=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(a.upperFirst)(Object(a.camelCase)(t)),"(").concat(c,")"),r}},i=new WeakMap;function u(e){return Object(o.useMemo)((function(){return function(e){var t=i.get(e)||0;return i.set(e,t+1),t}(e)}),[e])}t.a=c((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";n.d(t,"a",(function(){return f}));var r=n(11),o=n.n(r),a=n(6),c=n.n(a),i=n(45),u=n(44);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 f=function(e){var t=e.Block,n=e.selector,r=e.getProps,a=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c,f=document.querySelectorAll(n);f.length&&Array.prototype.forEach.call(f,(function(e,n){var r=a(e,n),c=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(i.render)(React.createElement(u.a,c,React.createElement(t,o()({},r,{attributes:f}))),e)}))}},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";n.d(t,"a",(function(){return u}));var r=n(16),o=n(13),a=n(0),c=n(86),i=n(39),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 m=Object(a.useRef)({results:[],isLoading:!0}),b=Object(i.a)(f),h=Object(i.a)(s),g=Object(c.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),a=[t,n,b,h],c=o.getCollectionError.apply(o,a);return c&&g(c),{results:o.getCollection.apply(o,a),isLoading:!o.hasFinishedResolution("getCollection",a)}}),[t,n,h,b,d]);return null!==v&&(m.current=v),m.current}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=(n(13),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),a=function(){return Object(r.useContext)(o)}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return D})),n.d(t,"a",(function(){return F}));var r=n(6),o=n.n(r),a=n(8),c=n.n(a),i=(n(5),n(0)),u=n(13),s=n(11),l=n.n(s),f=n(4),p=n.n(f),d=n(177),m=(n(103),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""}),b=function(e){var t=e.className,n=e.notices,r=D().removeNotice,o=p()(t,"wc-block-components-notices"),a=n.filter((function(e){return"snackbar"!==e.type}));return a.length?React.createElement("div",{className:o},a.map((function(e){return React.createElement(d.a,l()({key:"store-notice-"+e.id},e,{className:p()("wc-block-components-notices__notice","woocommerce-message",m(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)}))):null},h=n(10),g=n(25),v=n.n(g);function y(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){y(a,r,o,c,i,"next",e)}function i(e){y(a,r,o,c,i,"throw",e)}c(void 0)}))}}var j=n(27),w=n(7),k=n(67),E=n(21),_=n(1),S=n(79);var R=Object(i.forwardRef)((function(e,t){var n=e.className,r=e.children,o=e.actions,a=void 0===o?[]:o,c=e.onRemove,u=void 0===c?w.noop:c;Object(i.useEffect)((function(){var e=setTimeout((function(){u()}),1e4);return function(){return clearTimeout(e)}}),[]);var s=p()(n,"components-snackbar");return a&&a.length>1&&(console.warn("Snackbar can only have 1 action, use Notice if your message require many messages"),a=[a[0]]),Object(i.createElement)("div",{ref:t,className:s,onClick:u,tabIndex:"0",role:"button",onKeyPress:u,label:Object(_.__)("Dismiss this notice")},Object(i.createElement)("div",{className:"components-snackbar__content"},r,a.map((function(e,t){var n=e.label,r=e.onClick,o=e.url;return Object(i.createElement)(S.a,{key:t,href:o,isTertiary:!0,onClick:function(e){e.stopPropagation(),r&&r(e)},className:"components-snackbar__action"},n)}))))}));var x=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,a=void 0===o?w.noop:o,c=Object(E.useReducedMotion)(),u=Object(i.useState)((function(){return new WeakMap})),s=Object(j.a)(u,1)[0],l=Object(k.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=O(v.a.mark((function t(n){return v.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=O(v.a.mark((function e(t){return v.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:c});n=p()("components-snackbar-list",n);var f=function(e){return function(){return a(e.id)}};return Object(i.createElement)("div",{className:n},r,l.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(i.createElement)(k.animated.div,{key:n,style:r},Object(i.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(i.createElement)(R,Object(h.a)({},Object(w.omit)(t,["content"]),{onRemove:f(t)}),t.content)))})))},C=n(65),N=n(110),P=function(){var e=Object(N.a)().isEditor,t=Object(C.a)(),n=t.notices,r=t.removeNotice,o=n.filter((function(e){return"snackbar"===e.type}));return e?null:React.createElement(x,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function T(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=Object(i.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),D=function(){return Object(i.useContext)(A)},F=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,a=void 0===o||o,s=e.context,l=void 0===s?"wc/core":s,f=Object(u.useDispatch)("core/notices"),p=f.createNotice,d=f.removeNotice,m=Object(i.useState)(!1),h=c()(m,2),g=h[0],v=h[1],y=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]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};p(e,t,I(I({},n),{},{context:n.context||l}))}),[p,l]),O=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;d(e,t)}),[d,l]),j=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]:{};y("default",e,I(I({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(l)}}),[l]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:l,setIsSuppressed:v},k=g?null:React.createElement(b,{className:r,notices:w.notices}),E=g?null:React.createElement(P,null);return React.createElement(A.Provider,{value:w},a&&k,t,E)}},,,,,,,function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return b}));var r=n(6),o=n.n(r),a=n(22),c=n.n(a),i=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}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}var l,f,p={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(l=i.CURRENCY.symbol,f=i.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[f]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},d=function(e){if(!e||"object"!==c()(e))return p;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,o=e.currency_decimal_separator,a=e.currency_minor_unit,i=e.currency_prefix,u=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof o?o:".",minorUnit:Number.isFinite(a)?a:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof u?u:""}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},p),e)},b=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=m(t),o=n/Math.pow(10,r.minorUnit),a=r.prefix+o+r.suffix,c=document.createElement("textarea");return c.innerHTML=a,c.value}},function(e,t,n){"use strict";var r=n(0),o=n(2),a=n(16),c=n(13);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(a.SCHEMA_STORE_KEY),o=r.isResolving,c=r.hasFinishedResolution,i=t.dispatch(a.SCHEMA_STORE_KEY),u=i.receiveRoutes,s=i.startResolution,l=i.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(5);var r=n(4),o=n.n(r),a=n(28),c=n(98);n(138);t.a=Object(c.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,c=e.label,i=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(a.a,{label:c,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:i,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),a=n(32),c=n.n(a),i=n(33),u=n.n(i),s=n(19),l=n.n(s),f=n(34),p=n.n(f),d=n(35),m=n.n(d),b=n(24),h=n.n(b),g=n(6),v=n.n(g),y=n(3);n(155);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 m()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return c()(this,r),e=n.call(this),v()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),v()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),v()(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(y.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){},function(e,t,n){"use strict";var r=n(6),o=n.n(r),a=n(12),c=n.n(a),i=n(3);n(5);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,a=c()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.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},a))}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t){var n=[];return Object.keys(e).forEach((function(r){if(void 0!==t[r])switch(e[r].type){case"boolean":n[r]="false"!==t[r]&&!1!==t[r];break;case"number":n[r]=parseInt(t[r],10);break;case"array":case"object":n[r]=JSON.parse(t[r]);break;default:n[r]=t[r]}else n[r]=e[r].default})),n}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(7),a=n(4),c=n.n(a),i=n(1),u=n(79),s=n(10),l=n(29);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}var m=n(64),b=n(14);function h(e,t){return!t||"object"!==Object(m.a)(t)&&"function"!=typeof t?Object(b.a)(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(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&&v(e,t)}var O=n(27),j=n(48),w=n(50),k=n(82),E=n.n(k),_=n(21),S=n(26),R=function(){return"rtl"===document.documentElement.dir};function x(e,t,n,r){var o=t.width;"left"===n&&R()?n="right":"right"===n&&R()&&(n="left");var a,c=Math.round(e.left+e.width/2),i={popoverLeft:c,contentWidth:(c-o/2>0?o/2:c)+(c+o/2>window.innerWidth?window.innerWidth-c:o/2)},u="middle"===r?e.left:c,s={popoverLeft:u,contentWidth:u-o>0?o:u},l="middle"===r?e.right:c,f={popoverLeft:l,contentWidth:l+o>window.innerWidth?window.innerWidth-l:o},p=null;if("center"===n&&i.contentWidth===o)a="center";else if("left"===n&&s.contentWidth===o)a="left";else if("right"===n&&f.contentWidth===o)a="right";else{var d="left"===(a=s.contentWidth>f.contentWidth?"left":"right")?s.contentWidth:f.contentWidth;p=d!==o?d:null}return{xAxis:a,popoverLeft:"center"===a?i.popoverLeft:"left"===a?s.popoverLeft:f.popoverLeft,contentWidth:p}}function C(e,t,n){var r,o=t.height,a=e.top+e.height/2,c={popoverTop:a,contentHeight:(a-o/2>0?o/2:a)+(a+o/2>window.innerHeight?window.innerHeight-a:o/2)},i={popoverTop:e.top,contentHeight:e.top-10-o>0?o:e.top-10},u={popoverTop:e.bottom,contentHeight:e.bottom+10+o>window.innerHeight?window.innerHeight-10-e.bottom:o},s=null;if("middle"===n&&c.contentHeight===o)r="middle";else if("top"===n&&i.contentHeight===o)r="top";else if("bottom"===n&&u.contentHeight===o)r="bottom";else{var l="top"===(r=i.contentHeight>u.contentHeight?"top":"bottom")?i.contentHeight:u.contentHeight;s=l!==o?l:null}return{yAxis:r,popoverTop:"middle"===r?c.popoverTop:"top"===r?i.popoverTop:u.popoverTop,contentHeight:s}}var N=n(36),P=Object(r.createContext)({focusHistory:[]}),T=P.Provider,I=P.Consumer;T.displayName="FocusReturnProvider",I.displayName="FocusReturnConsumer";r.Component;var A=Object(_.createHigherOrderComponent)((function e(t){if((a=t)instanceof r.Component||"function"==typeof a){var n=t;return e({})(n)}var a,c=t.onFocusReturn,i=void 0===c?o.stubTrue:c;return function(e){var t=function(t){function n(){var e;return f(this,n),(e=h(this,g(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 y(n,t),d(n,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,a=[].concat(Object(N.a)(o.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(N.a)(n)))),[e]);r=a.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(r.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(r.createElement)(e,this.props.childProps))}}]),n}(r.Component);return function(e){return Object(r.createElement)(I,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn"),D=Object(_.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return f(this,n),(e=h(this,g(n).apply(this,arguments))).focusContainRef=Object(r.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(b.a)(e)),e}return y(n,t),d(n,[{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(r.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(r.createElement)(e,this.props))}}]),n}(r.Component)}),"withConstrainedTabbing"),F=["button","submit"];var L=Object(_.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return f(this,n),(e=h(this,g(n).apply(this,arguments))).bindNode=e.bindNode.bind(Object(b.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(b.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(b.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(b.a)(e)),e}return y(n,t),d(n,[{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(o.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(o.includes)(F,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(r.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(r.createElement)(e,Object(s.a)({ref:this.bindNode},this.props)))}}]),n}(r.Component)}),"withFocusOutside")(function(e){function t(){return f(this,t),h(this,g(t).apply(this,arguments))}return y(t,e),d(t,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),t}(r.Component));var M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,o=e.className,a=void 0===o?"lockscroll":o,c=0,i=0;function u(e){var t=n.scrollingElement||n.body;e&&(i=t.scrollTop);var r=e?"add":"remove";t.classList[r](a),n.documentElement.classList[r](a),e||(t.scrollTop=i)}function s(){0===c&&u(!0),++c}function l(){1===c&&u(!1),--c}return function(e){function t(){return f(this,t),h(this,g(t).apply(this,arguments))}return y(t,e),d(t,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),t}(r.Component)}();function V(e){e.stopPropagation()}var B=Object(r.forwardRef)((function(e,t){var n=e.children,o=Object(l.a)(e,["children"]);return Object(r.createElement)("div",Object(s.a)({},o,{ref:t,onMouseDown:V}),n)})),z=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),q=z.Provider,U=z.Consumer,H=(r.Component,0);function W(e){var t=e.name,n=e.children,a=e.registerFill,c=e.unregisterFill,i=function(e){var t=Object(r.useContext)(z),n=t.getSlot,o=t.subscribe,a=Object(r.useState)(n(e)),c=Object(O.a)(a,2),i=c[0],u=c[1];return Object(r.useEffect)((function(){return u(n(e)),o((function(){u(n(e))}))}),[e]),i}(t),u=Object(r.useRef)({name:t,children:n});return u.current.occurrence||(u.current.occurrence=++H),Object(r.useLayoutEffect)((function(){return a(t,u.current),function(){return c(t,u.current)}}),[]),Object(r.useLayoutEffect)((function(){u.current.children=n,i&&!i.props.bubblesVirtually&&i.forceUpdate()}),[n]),Object(r.useLayoutEffect)((function(){t!==u.current.name&&(c(u.current.name,u.current),u.current.name=t,a(t,u.current))}),[t]),i&&i.node&&i.props.bubblesVirtually?(Object(o.isFunction)(n)&&(n=n(i.props.fillProps)),Object(r.createPortal)(n,i.node)):null}var K=function(e){return Object(r.createElement)(U,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(W,Object(s.a)({},e,{registerFill:n,unregisterFill:o}))}))},Q=function(e){function t(){var e;return f(this,t),(e=h(this,g(t).apply(this,arguments))).bindNode=e.bindNode.bind(Object(b.a)(e)),e}return y(t,e),d(t,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){(0,this.props.unregisterSlot)(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:"render",value:function(){var e=this.props,t=e.children,n=e.name,a=e.bubblesVirtually,c=void 0!==a&&a,i=e.fillProps,u=void 0===i?{}:i,s=e.getFills,l=e.className;if(c)return Object(r.createElement)("div",{ref:this.bindNode,className:l});var f=Object(o.map)(s(n,this),(function(e){var t=e.occurrence,n=Object(o.isFunction)(e.children)?e.children(u):e.children;return r.Children.map(n,(function(e,n){if(!e||Object(o.isString)(e))return e;var a="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:a})}))})).filter(Object(o.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(o.isFunction)(t)?t(f):f)}}]),t}(r.Component),Y=function(e){return Object(r.createElement)(U,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,a=t.getFills;return Object(r.createElement)(Q,Object(s.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:a}))}))},G=n(46);var $=function(e){var t=e.type,n=e.options,r=void 0===n?{}:n,o=e.children;if("appear"===t){var a,i=r.origin,u=(void 0===i?"top":i).split(" "),s=Object(O.a)(u,2),l=s[0],f=s[1],p=void 0===f?"center":f;return o({className:c()("components-animate__appear",(a={},Object(G.a)(a,"is-from-"+p,"center"!==p),Object(G.a)(a,"is-from-"+l,"middle"!==l),a))})}if("slide-in"===t){var d=r.origin,m=void 0===d?"left":d;return o({className:c()("components-animate__slide-in","is-from-"+m)})}return o("loading"===t?{className:c()("components-animate__loading")}:{})},Z=D(A((function(e){return e.children})));function J(e,t){var n=window.getComputedStyle(t),r=n.paddingTop,o=n.paddingBottom,a=n.paddingLeft,c=n.paddingRight,i=r?parseInt(r,10):0,u=o?parseInt(o,10):0,s=a?parseInt(a,10):0,l=c?parseInt(c,10):0;return{x:e.left+s,y:e.top+i,width:e.width-s-l,height:e.height-i-u,left:e.left+s,right:e.right-l,top:e.top+i,bottom:e.bottom-u}}function X(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function te(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var ne=function(e){var t=e.headerTitle,n=e.onClose,o=e.onKeyDown,a=e.children,i=e.className,u=e.noArrow,f=void 0!==u&&u,p=e.position,d=void 0===p?"top":p,m=(e.range,e.focusOnMount),b=void 0===m?"firstElement":m,h=e.anchorRef,g=e.shouldAnchorIncludePadding,v=e.anchorVerticalBuffer,y=e.anchorHorizontalBuffer,k=e.anchorRect,R=e.getAnchorRect,N=e.expandOnMobile,P=e.animate,T=void 0===P||P,I=e.onClickOutside,A=e.onFocusOutside,D=Object(l.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorVerticalBuffer","anchorHorizontalBuffer","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside"]),F=Object(r.useRef)(null),V=Object(r.useRef)(null),z=Object(r.useRef)(),q=Object(r.useRef)(),H=Object(_.useViewportMatch)("medium","<"),W=Object(r.useState)(),Q=Object(O.a)(W,2),Y=Q[0],G=Q[1],ne=N&&H;f=ne||f,Object(r.useEffect)((function(){var e=z.current,t=V.current;if(ne)return te(e,"is-without-arrow",f),X(e,"data-x-axis"),X(e,"data-y-axis"),ee(e,"top"),ee(e,"left"),ee(t,"maxHeight"),void ee(t,"maxWidth");var n=function(){var n=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)return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);var a=r.getBoundingClientRect();return o?a:J(a,r)}if(e.current){var c=e.current.parentNode,i=c.getBoundingClientRect();return o?i:J(i,c)}}(F,k,R,h,g);if(n){n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{x:e.left-n,y:e.top-t,width:e.width+2*n,height:e.height+2*t,left:e.left-n,right:e.right+n,top:e.top-t,bottom:e.bottom+t}}(n,v,y),q.current||(q.current=t.getBoundingClientRect());var r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=n.split(" "),o=Object(O.a)(r,2),a=o[0],c=o[1],i=void 0===c?"center":c,u=C(e,t,a),s=x(e,t,i,u.yAxis);return Object(S.a)({},s,u)}(n,q.current,d),o=r.popoverTop,a=r.popoverLeft,c=r.xAxis,i=r.yAxis,u=r.contentHeight,s=r.contentWidth;te(e,"is-without-arrow",f||"center"===c&&"middle"===i),X(e,"data-x-axis",c),X(e,"data-y-axis",i),ee(e,"top","number"==typeof o?o+"px":""),ee(e,"left","number"==typeof a?a+"px":""),ee(t,"maxHeight","number"==typeof u?u+"px":""),ee(t,"maxWidth","number"==typeof s?s+"px":"");G(({left:"right",right:"left"}[c]||"center")+" "+({top:"bottom",bottom:"top"}[i]||"middle"))}},r=window.setTimeout(n),o=window.setInterval(n,500);return window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),function(){window.clearTimeout(r),window.clearInterval(o),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}}),[ne,k,R,h,g,v,y,d]),function(e,t){Object(r.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)}}),[])}(b,V);var re=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)};var oe=Object(r.createElement)(L,{onFocusOutside:function(e){if(A)A(e);else if(I){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}}),E()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),I(t)}else n&&n()}},Object(r.createElement)($,{type:T&&Y?"appear":null,options:{origin:Y}},(function(e){var o=e.className;return Object(r.createElement)(B,Object(s.a)({className:c()("components-popover",i,o,{"is-expanded":ne,"is-without-arrow":f})},D,{onKeyDown:re,ref:z}),ne&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},t),Object(r.createElement)(ie,{className:"components-popover__close",icon:"no-alt",onClick:n})),Object(r.createElement)("div",{ref:V,className:"components-popover__content",tabIndex:"-1"},a))})));return b&&(oe=Object(r.createElement)(Z,null,oe)),Object(r.createElement)(U,null,(function(e){var t=e.getSlot;return t&&t("Popover")&&(oe=Object(r.createElement)(K,{name:"Popover"},oe)),Object(r.createElement)("span",{ref:F},oe,H&&N&&Object(r.createElement)(M,null))}))};ne.Slot=function(){return Object(r.createElement)(Y,{bubblesVirtually:!0,name:"Popover"})};var re=ne;var oe=function(e){var t,n,a=e.shortcut,c=e.className;return a?(Object(o.isString)(a)&&(t=a),Object(o.isObject)(a)&&(t=a.display,n=a.ariaLabel),Object(r.createElement)("span",{className:c,"aria-label":n},t)):null},ae=function(e){function t(){var e;return f(this,t),(e=h(this,g(t).apply(this,arguments))).delayedSetIsOver=Object(o.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return y(t,e),d(t,[{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===r.Children.count(n)){var o=r.Children.only(n);"function"==typeof o.props[e]&&o.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 a=Object(o.includes)(["focus","mouseenter"],r.type);a!==n.state.isOver&&(t?n.delayedSetIsOver(a):n.setState({isOver:a}))}}}},{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,o=e.text,a=e.shortcut;if(1!==r.Children.count(t))return t;var c=r.Children.only(t),i=this.state.isOver;return Object(r.cloneElement)(c,{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(r.concatChildren)(c.props.children,i&&Object(r.createElement)(re,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1},o,Object(r.createElement)(oe,{className:"components-tooltip__shortcut",shortcut:a})))})}}]),t}(r.Component),ce=n(77);var ie=Object(r.forwardRef)((function(e,t){var n=e.icon,a=e.children,i=e.label,f=e.className,p=e.tooltip,d=e.shortcut,m=e.labelPosition,b=e.size,h=Object(l.a)(e,["icon","children","label","className","tooltip","shortcut","labelPosition","size"]),g=c()("components-icon-button",f,{"has-text":a}),v=p||i,y=!h.disabled&&(p||d||!!i&&(!a||Object(o.isArray)(a)&&!a.length)&&!1!==p),O=Object(r.createElement)(u.a,Object(s.a)({"aria-label":i},h,{className:g,ref:t}),Object(r.createElement)(ce.a,{icon:n,size:b}),a);return y&&(O=Object(r.createElement)(ae,{text:v,shortcut:d,position:m},O)),O}));t.a=function(e){var t=e.className,n=e.status,a=e.children,s=e.onRemove,l=void 0===s?o.noop:s,f=e.isDismissible,p=void 0===f||f,d=e.actions,m=void 0===d?[]:d,b=e.__unstableHTML,h=c()(t,"components-notice","is-"+n,{"is-dismissible":p});return b&&(a=Object(r.createElement)(r.RawHTML,null,a)),Object(r.createElement)("div",{className:h},Object(r.createElement)("div",{className:"components-notice__content"},a,m.map((function(e,t){var n=e.className,o=e.label,a=e.noDefaultClasses,i=void 0!==a&&a,s=e.onClick,l=e.url;return Object(r.createElement)(u.a,{key:t,href:l,isDefault:!i&&!l,isLink:!i&&!!l,onClick:l?void 0:s,className:c()("components-notice__action",n)},o)}))),p&&Object(r.createElement)(ie,{className:"components-notice__dismiss",icon:"no-alt",label:Object(i.__)("Dismiss this notice"),onClick:l,tooltip:!1}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Be}));var r=n(37),o=n(11),a=n.n(o),c=n(12),i=n.n(c),u=(n(5),n(4)),s=n.n(u),l=n(1),f=n(0),p=n(8),d=n.n(p),m=n(13),b=n(78),h=n(16),g=n(15),v=n(65),y=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},O=function(e){var t=Object(m.useDispatch)(h.CART_STORE_KEY).addItemToCart,n=Object(b.a)(),r=n.cartItems,o=n.cartIsLoading,a=Object(v.a)(),c=a.addErrorNotice,i=a.removeNotice,u=Object(f.useState)(!1),s=d()(u,2),l=s[0],p=s[1],O=Object(f.useRef)(y(r,e));return Object(f.useEffect)((function(){var t=y(r,e);t!==O.current&&(O.current=t)}),[r,e]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:l,cartIsLoading:o,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;p(!0),t(e,n).then((function(e){!0===e&&i("add-to-cart")})).catch((function(e){c(Object(g.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){p(!1)}))}}},j=n(185),w=n(17),k=(n(140),function(e){var t=e.product,n=Object(f.useRef)(!0),r=t.id,o=t.permalink,c=t.add_to_cart,i=t.has_options,u=t.is_purchasable,p=t.is_in_stock,d=O(r),m=d.cartQuantity,b=d.addingToCart,h=d.addToCart;Object(f.useEffect)((function(){n.current?n.current=!1:Object(j.a)()}),[m]);var v=Number.isFinite(m)&&m>0,y=!i&&u&&p,w=Object(g.decodeEntities)((null==c?void 0:c.description)||""),k=v?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",m,"woo-gutenberg-products-block"),m):Object(g.decodeEntities)((null==c?void 0:c.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),E=y?"button":"a",_={};return y?_.onClick=function(){h()}:(_.href=o,_.rel="nofollow"),React.createElement(E,a()({"aria-label":w,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:b,added:v}),disabled:b},_),k)}),E=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})},_=function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=n.product||o.product;return React.createElement("div",{className:s()(t,"wp-block-button","wc-block-components-product-button","".concat(r,"__product-add-to-cart"))},a?React.createElement(k,{product:a}):React.createElement(E,null))},S=n(21),R=n(143),x=function(e){return function(t){return function(n){var r=Object(R.a)(e,n);return React.createElement(t,a()({},n,r))}}},C=n(6),N=n.n(C),P=n(9),T=n(28),I=(n(141),function(e){var t=e.className,n=e.align,r=i()(e,["className","align"]),o=Object(w.useInnerBlockLayoutContext)().parentClassName,a=Object(w.useProductDataContext)(),c=r.product||a.product;if(!c||!c.on_sale)return null;var u="string"==typeof n?"wc-block-components-product-sale-badge--align".concat(n):"";return React.createElement("div",{className:s()("wc-block-components-product-sale-badge",t,u,"".concat(o,"__product-onsale"))},React.createElement(T.a,{label:Object(l.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(l.__)("Product on sale","woo-gutenberg-products-block")}))});n(142);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){N()(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 F=function(){return React.createElement("img",{src:P.p,alt:""})},L=function(e){var t=e.image,n=e.onLoad,r=e.loaded,o=e.showFullSize,a=t||{},c=a.thumbnail,i=a.src,u=a.srcset,s=a.sizes,l={alt:a.alt,onLoad:n,hidden:!r,src:c};return o&&(l=D(D({},l),{},{src:i,srcSet:u,sizes:s})),React.createElement(React.Fragment,null,React.createElement("img",l),!r&&React.createElement(F,null))},M=function(e){var t=e.className,n=e.imageSizing,r=void 0===n?"full-size":n,o=e.productLink,a=void 0===o||o,c=e.showSaleBadge,u=e.saleBadgeAlign,l=void 0===u?"right":u,p=i()(e,["className","imageSizing","productLink","showSaleBadge","saleBadgeAlign"]),m=Object(w.useInnerBlockLayoutContext)().parentClassName,b=Object(w.useProductDataContext)(),h=p.product||b.product,g=Object(f.useState)(!1),v=d()(g,2),y=v[0],O=v[1];if(!h)return React.createElement("div",{className:s()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder","".concat(m,"__product-image"))},React.createElement(F,null));var j=(null==h?void 0:h.images)&&h.images.length?h.images[0]:null;return React.createElement("div",{className:s()(t,"wc-block-components-product-image","".concat(m,"__product-image"))},a?React.createElement("a",{href:h.permalink,rel:"nofollow"},!!c&&React.createElement(I,{align:l,product:h}),React.createElement(L,{image:j,onLoad:function(){return O(!0)},loaded:y,showFullSize:"cropped"!==r})):React.createElement(React.Fragment,null,!!c&&React.createElement(I,{align:l,product:h}),React.createElement(L,{image:j,onLoad:function(){return O(!0)},loaded:y,showFullSize:"cropped"!==r})))},V={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"}},B=Object(S.compose)(x(V))(M),z=n(31),q=n(119),U=(n(144),function(e){return e.price_range&&e.price_range.min_amount&&e.price_range.max_amount}),H=function(e){var t=e.currency,n=e.minAmount,r=e.maxAmount,o=Object(w.useInnerBlockLayoutContext)().parentClassName;return React.createElement("span",{className:s()("wc-block-components-product-price__value","".concat(o,"__product-price__value"))},React.createElement(z.a,{currency:t,value:n})," — ",React.createElement(z.a,{currency:t,value:r}))},W=function(e){var t=e.currency,n=e.price,r=e.regularPrice,o=Object(w.useInnerBlockLayoutContext)().parentClassName;return React.createElement(React.Fragment,null,r!==n&&React.createElement("del",{className:s()("wc-block-components-product-price__regular","".concat(o,"__product-price__regular"))},React.createElement(z.a,{currency:t,value:r})),React.createElement("span",{className:s()("wc-block-components-product-price__value","".concat(o,"__product-price__value"))},React.createElement(z.a,{currency:t,value:n})))},K=function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=n.product||o.product;if(!a)return React.createElement("div",{className:s()(t,"price","wc-block-components-product-price","".concat(r,"__product-price"))});var c=a.prices||{},u=Object(q.c)(c);return React.createElement("div",{className:s()(t,"price","wc-block-components-product-price","".concat(r,"__product-price"))},U(c)?React.createElement(H,{currency:u,minAmount:c.price_range.min_amount,maxAmount:c.price_range.max_amount}):React.createElement(W,{currency:u,price:c.price,regularPrice:c.regular_price}))},Q=(n(145),function(e){var t=parseFloat((null==e?void 0:e.average_rating)||0);return Number.isFinite(t)&&t>0?t:0}),Y=function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=n.product||o.product,c=Q(a);if(!c)return null;var u={width:c/5*100+"%"},f=Object(l.sprintf)(Object(l.__)("Rated %f out of 5","woo-gutenberg-products-block"),c);return React.createElement("div",{className:s()(t,"star-rating","wc-block-components-product-rating","".concat(r,"__product-rating"))},React.createElement("div",{className:s()("wc-block-components-product-rating__stars","".concat(r,"__product-rating__stars")),role:"img","aria-label":f},React.createElement("span",{style:u},f)))},G=n(84),$=n(2),Z=(n(146),function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=(Object(w.useProductDataContext)()||n).product;if(!o)return React.createElement("div",{className:s()(t,"wc-block-components-product-summary")});var a=o.short_description?o.short_description:o.description;if(!a)return null;var c=Object($.getSetting)("wordCountType","words");return React.createElement(G.a,{className:s()(t,"wc-block-components-product-summary","".concat(r,"__product-summary")),source:a,maxLength:150,countType:c})}),J=(n(147),function(e){var t=e.className,n=e.headingLevel,r=void 0===n?2:n,o=e.productLink,a=void 0===o||o,c=i()(e,["className","headingLevel","productLink"]),u=Object(w.useInnerBlockLayoutContext)().parentClassName,l=Object(w.useProductDataContext)(),f=c.product||l.product,p="h".concat(r);if(!f)return React.createElement(p,{className:s()(t,"wc-block-components-product-title","".concat(u,"__product-title"))});var d=Object(g.decodeEntities)(f.name);return React.createElement(p,{className:s()(t,"wc-block-components-product-title","".concat(u,"__product-title"))},a?React.createElement("a",{href:f.permalink,rel:"nofollow"},d):d)}),X={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0}},ee=Object(S.compose)(x(X))(J),te=(n(148),function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=(n.product||o.product||{}).sku||"";return a?React.createElement("div",{className:s()(t,"wc-block-components-product-sku","".concat(r,"__product-sku"))},Object(l.__)("SKU:","woo-gutenberg-products-block")," ",React.createElement("strong",null,a)):null}),ne=n(7),re=(n(149),function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=(Object(w.useProductDataContext)()||n||{}).product;return Object(ne.isEmpty)(o)||Object(ne.isEmpty)(o.categories)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-category-list","".concat(r,"__product-category-list"))},Object(l.__)("Categories:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(o.categories).map((function(e){var t=e.name,n=e.link,r=e.slug;return React.createElement("li",{key:"category-list-item-".concat(r)},React.createElement("a",{href:n},t))}))))}),oe=(n(150),function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=(Object(w.useProductDataContext)()||n||{}).product;return Object(ne.isEmpty)(o)||Object(ne.isEmpty)(o.tags)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-tag-list","".concat(r,"__product-tag-list"))},Object(l.__)("Tags:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(o.tags).map((function(e){var t=e.name,n=e.link,r=e.slug;return React.createElement("li",{key:"tag-list-item-".concat(r)},React.createElement("a",{href:n},t))}))))}),ae=(n(151),function(e){return Object(l.sprintf)(Object(l.__)("%d left in stock","woo-gutenberg-products-block"),e)}),ce=function(e,t){return t?Object(l.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(l.__)("In Stock","woo-gutenberg-products-block"):Object(l.__)("Out of Stock","woo-gutenberg-products-block")},ie=function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=n.product||o.product||{};if(Object(ne.isEmpty)(a)||!a.is_purchasable)return null;var c=!!a.is_in_stock,u=a.low_stock_remaining,l=a.is_on_backorder;return React.createElement("div",{className:s()(t,"wc-block-components-product-stock-indicator","".concat(r,"__stock-indicator"),{"wc-block-components-product-stock-indicator--in-stock":c,"wc-block-components-product-stock-indicator--out-of-stock":!c,"wc-block-components-product-stock-indicator--low-stock":!!u,"wc-block-components-product-stock-indicator--available-on-backorder":!!l})},u?ae(u):ce(c,l))},ue=Object(f.createContext)({product:{},productId:0,variationId:0,variationData:{},cartItemData:{},quantity:1,minQuantity:1,maxQuantity:99,quantityInCart:0,setQuantity:function(e){},setVariationId:function(e){},setVariationData:function(e){},setCartItemData:function(e){},showFormElements:!1,formInitialized:!1,formDisabled:!0,formSubmitting:!1,onChange:function(){},onSubmit:function(){},onSuccess:function(){},onFail:function(){}}),se=function(){return Object(f.useContext)(ue)},le=function(e){var t=e.children,n=e.product,r=e.showFormElements,o=n.id||0,a=Object(f.useState)(0),c=d()(a,2),i=c[0],u=c[1],s=Object(f.useState)({}),l=d()(s,2),p=l[0],m=l[1],b=Object(f.useState)({}),h=d()(b,2),g=h[0],v=h[1],y=Object(f.useState)(1),w=d()(y,2),k=w[0],E=w[1],_=O(o),S=_.addToCart,R=_.addingToCart,x=_.cartQuantity,C=_.cartIsLoading;!function(e){var t=Object(f.useRef)(!0);Object(f.useEffect)((function(){t.current?t.current=!1:Object(j.a)()}),[e])}(x);var N=!C&&o>0,P=R||!N||!fe(n),T=Object(f.useCallback)((function(){S(k)}),[S,k]),I=Object(f.useCallback)((function(){}),[]),A=Object(f.useCallback)((function(){}),[]),D=Object(f.useCallback)((function(){}),[]),F={product:n,productId:o,variationId:i,variationData:p,cartItemData:g,quantity:k,minQuantity:1,maxQuantity:n.quantity_limit||99,quantityInCart:x,setQuantity:E,setVariationId:u,setVariationData:m,setCartItemData:v,showFormElements:r,formInitialized:N,formDisabled:P,formSubmitting:R,onChange:I,onSubmit:T,onSuccess:A,onFail:D};return React.createElement(ue.Provider,{value:F},t)},fe=function(e){var t=e.is_purchasable;return void 0!==t&&t},pe=(n(152),n(79)),de=(n(153),function(e){var t=e.className,n=e.showSpinner,r=void 0!==n&&n,o=e.children,c=i()(e,["className","showSpinner","children"]),u=s()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return React.createElement(pe.a,a()({className:u},c),r&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},o))}),me=n(139),be=n(186),he=function(e){var t=e.className,n=e.href,r=e.text;return React.createElement(de,{className:t,href:n,rel:"nofollow"},r)},ge=function(e){var t=e.className,n=e.quantityInCart,r=e.loading,o=e.disabled,a=e.onClick,c=Object(f.useState)(!1),i=d()(c,2),u=i[0],s=i[1];return React.createElement(de,{className:t,disabled:o,showSpinner:r,onClick:function(){a(),s(!0)}},n>0?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",n,"woo-gutenberg-products-block"),n):Object(l.__)("Add to cart","woo-gutenberg-products-block"),u&&React.createElement(me.a,{srcElement:be.a,alt:Object(l.__)("Done","woo-gutenberg-products-block")}))},ve=function(){var e=se(),t=e.showFormElements,n=e.product,r=e.quantityInCart,o=e.formDisabled,a=e.formSubmitting,c=e.onSubmit,i=n.is_purchasable,u=void 0===i||i,s=n.has_options,f=n.add_to_cart,p=void 0===f?{url:"",text:""}:f;return!t&&s||!u?React.createElement(he,{className:"wc-block-components-product-add-to-cart-button",href:p.url,text:p.text||Object(l.__)("View Product","woo-gutenberg-products-block")}):React.createElement(ge,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:r,disabled:o,loading:a,onClick:c})},ye=function(e){var t=e.disabled,n=e.min,r=e.max,o=e.value,a=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:n,max:r,hidden:1===r,disabled:t,onChange:function(e){a(e.target.value)}})},Oe=function(e){var t=e.reason,n=void 0===t?Object(l.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},n)},je=function(){var e=se(),t=e.product,n=e.quantity,r=e.minQuantity,o=e.maxQuantity,a=e.setQuantity,c=e.formDisabled;return t.id&&!t.is_purchasable?React.createElement(Oe,null):t.id&&!t.is_in_stock?React.createElement(Oe,{reason:Object(l.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(ye,{value:n,min:r,max:o,disabled:c,onChange:a}),React.createElement(ve,null))},we=(n(154),n(56)),ke=n.n(we),Ee=n(95),_e={value:"",label:Object(l.__)("Select an option","woo-gutenberg-products-block")},Se=function(e){var t=e.attributeName,n=e.options,r=void 0===n?[]:n,o=e.selected,a=void 0===o?"":o,c=e.onChange,i=void 0===c?function(){}:c;return React.createElement(Ee.SelectControl,{className:"wc-block-components-product-add-to-cart-attribute-picker__select",label:Object(g.decodeEntities)(t),value:a||"",options:[_e].concat(ke()(r)),onChange:i})},Re=function(e){var t=e.selectedAttributes,n=e.variationAttributes,r=e.attributeNames;return Object.keys(n).filter((function(e){return r.every((function(r){var o=t[r]||"",a=n[e][r];return""===o||(null===a||a===o)}))}))};function xe(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 Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){N()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ne=function(e){var t=e.attributes,n=e.variationAttributes,r=Object(f.useState)(0),o=d()(r,2),a=o[0],c=o[1],i=Object(f.useState)([]),u=d()(i,2),s=u[0],l=u[1],p=Object.keys(t),m=Object.values(s).filter(Boolean).length>0,b=Object.values(s).filter((function(e){return""!==e})).length===p.length,h=Object(f.useMemo)((function(){var e=[];return p.forEach((function(r){var o=t[r],a=p.filter((function(e){return e!==r})),c=m?Re({selectedAttributes:s,variationAttributes:n,attributeNames:a}):null,i=null!==c?c.map((function(e){return n[e][r]})):null;e[r]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var n=e.name,r=e.slug;return null===t||t.includes(null)||t.includes(r)?{value:r,label:n}:null})).filter(Boolean)}(o.terms,i)})),e}),[t,n,p,s,m]);return Object(f.useEffect)((function(){if(b){var e=Re({selectedAttributes:s,variationAttributes:n,attributeNames:p});c(e[0]||0)}else c(0)}),[s,n,p,b]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},p.map((function(e){return React.createElement(Se,{key:e,attributeName:e,options:h[e],selected:s[e],onChange:function(t){l(Ce(Ce({},s),{},N()({},e,t)))}})})),React.createElement("p",null,"Matched variation ID: ",a))},Pe=function(e){var t=e.product,n=t.attributes,r=void 0===n?{}:n,o=t.variations,a=void 0===o?[]:o,c=function(e){return e?Object(ne.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):[]}(r),i=function(e){if(!e)return{};var t={};return e.forEach((function(e){var n=e.id,r=e.attributes;t[n]=r.reduce((function(e,t){var n=t.name,r=t.value;return e[n]=r,e}),[])})),t}(a);return 0===Object.keys(c).length||0===i.length?null:React.createElement(Ne,{attributes:c,variationAttributes:i})},Te=function(){var e=se(),t=e.product,n=e.quantity,r=e.minQuantity,o=e.maxQuantity,a=e.setQuantity,c=e.formDisabled;return t.id&&!t.is_purchasable?React.createElement(Oe,null):t.id&&!t.is_in_stock?React.createElement(Oe,{reason:Object(l.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Pe,{product:t}),React.createElement(ye,{value:n,min:r,max:o,disabled:c,onChange:a}),React.createElement(ve,null))},Ie=function(){return React.createElement(ve,null)},Ae=function(){return React.createElement(Ee.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},De=function(){return React.createElement(Ae,null)},Fe=function(e){var t=e.productType;return"variable"===t?React.createElement(Te,null):"grouped"===t?React.createElement(De,null):"external"===t?React.createElement(Ie,null):"simple"===t||"variation"===t?React.createElement(je,null):null},Le=function(e){var t=e.className,n=e.showFormElements,r=i()(e,["className","showFormElements"]),o=Object(w.useProductDataContext)(),a=r.product||o.product||{},c=s()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(ne.isEmpty)(a)});return React.createElement(le,{product:a,showFormElements:n},React.createElement("div",{className:c},React.createElement(React.Fragment,null,n?React.createElement(Fe,{productType:a.type||"simple"}):React.createElement(ve,null))))},Me={showFormElements:{type:"boolean",default:!1}},Ve=Object(S.compose)(x(Me))(Le);Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:K}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:B}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:ee}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Y}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:_}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Z}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:I}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:te}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:re}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:oe}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:ie}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Ve});var Be=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),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,n.current]),n.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=window.Event||null,o=function(){if("function"==typeof r){var e=new r("wc_fragment_refresh",{bubbles:!0,cancelable:!0});document.body.dispatchEvent(e)}else{var t=document.createEvent("Event");t.initEvent("wc_fragment_refresh",!0,!0),document.body.dispatchEvent(t)}}},function(e,t,n){"use strict";var r=n(72),o=React.createElement(r.a,{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=o},,,,,,,,,,,,,,function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(120),o=n(112),a=n(102),c=n(32),i=n.n(c),u=n(33),s=n.n(u),l=n(34),f=n.n(l),p=n(35),d=n.n(p),m=n(24),b=n.n(m),h=n(3),g=(n(5),n(8)),v=n.n(g),y=n(0),O=n(22),j=n.n(O),w=n(12),k=n.n(w),E=n(6),_=n.n(E),S=n(1),R=n(7),x=n(4),C=n.n(x),N=n(28),P=(n(202),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,a=e.onPageChange,c=e.totalPages,i=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),a=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(a-t))),2),maxIndex:a}}(o,t,c),u=i.minIndex,s=i.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==c),p=n&&Boolean(u>3),d=n&&Boolean(s<c-2);l&&3===u&&(u-=1),f&&s===c-2&&(s+=1);var m=[];if(u&&s)for(var b=u;b<=s;b++)m.push(b);return React.createElement("div",{className:"wc-block-pagination wc-block-components-pagination"},React.createElement(N.a,{screenReaderLabel:Object(S.__)("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 a(t-1)},title:Object(S.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(N.a,{label:"<",screenReaderLabel:Object(S.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:C()("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 a(1)},disabled:1===t},React.createElement(N.a,{label:1,screenReaderLabel:Object(S.sprintf)(Object(S.__)("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(S.__)("…","woo-gutenberg-products-block")),m.map((function(e){return React.createElement("button",{key:e,className:C()("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 a(e)},disabled:t===e},React.createElement(N.a,{label:e,screenReaderLabel:Object(S.sprintf)(Object(S.__)("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(S.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:C()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===c,"wc-block-components-pagination__page--active":t===c}),onClick:function(){return a(c)},disabled:t===c},React.createElement(N.a,{label:c,screenReaderLabel:Object(S.sprintf)(Object(S.__)("Page %d","woo-gutenberg-products-block"),c)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return a(t+1)},title:Object(S.__)("Next page","woo-gutenberg-products-block"),disabled:t>=c},React.createElement(N.a,{label:">",screenReaderLabel:Object(S.__)("Next page","woo-gutenberg-products-block")})))});P.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var T=P,I=n(125),A=(n(201),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(I.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(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:r,screenReaderLabel:Object(S.__)("Order products by","woo-gutenberg-products-block"),value:o})}),D=n(17),F=n(98),L=n(11),M=n.n(L),V=n(178),B=Object(F.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,a=Object(D.useInnerBlockLayoutContext)(),c=a.parentClassName,i=a.parentName,u=0===Object.keys(t).length,s=C()("".concat(c,"__product"),{"is-loading":u,"wc-block-layout--is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var a=Object(V.a)(t);return r.map((function(r,c){var i=v()(r,2),u=i[0],s=i[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=a[u];if(!p)return null;var d=n.id||0,m=["layout",u,c,o,d];return React.createElement(p,M()({key:m.join("_")},l,{children:f,product:n}))}))}}(i,t,o,r))})),z=n(97),q=n(107),U=n(16),H=n(13),W=n(39);function K(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 Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){_()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e){var t={namespace:"/wc/store",resourceName:"products"},n=Object(q.a)(Q(Q({},t),{},{query:e})),r=n.results,o=n.isLoading,a=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,a=void 0===o?[]:o,c=t.query,i=void 0===c?{}:c;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)(i),s=Object(W.a)(a),l=Object(H.useSelect)((function(t){var o=t(U.COLLECTIONS_STORE_KEY),a=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,a),isLoading:o.hasFinishedResolution("getCollectionHeader",a)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",Q(Q({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(a,10),productsLoading:o}},G=n(184),$=n(127),Z=n(43),J=(n(200),n(139)),X=n(72),ee=React.createElement(X.a,{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"})),te=function(){var e=Object(D.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement(J.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(S.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(S.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ne=React.createElement(X.a,{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"})),re=function(e){var t=e.resetCallback,n=void 0===t?function(){}:t,r=Object(D.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement(J.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ne,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(S.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(S.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(S.__)("Reset Search","woo-gutenberg-products-block")))};function oe(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 ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){_()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce=Object($.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,a=e.sortValue,c=e.scrollToTop,i=Object(z.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,a=r.rows;return ae(ae({},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*a,page:n})}({attributes:t,sortValue:a,currentPage:n})),u=v()(i,1)[0],s=Y(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(D.useInnerBlockLayoutContext)().parentClassName,m=function(e){e.order,e.orderby,e.page,e.per_page;return k()(e,["order","orderby","page","per_page"])}(u),b=Object(z.b)("attributes",[]),h=v()(b,2),g=h[0],O=h[1],w=Object(z.b)("min_price"),E=v()(w,2),_=E[0],x=E[1],N=Object(z.b)("max_price"),P=v()(N,2),I=P[0],F=P[1],L=Object(G.a)({totalQuery:m,totalProducts:f},(function(e){var t=e.totalQuery,n=e.totalProducts,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.totalQuery;return!Object(R.isEqual)(t,o)&&Number.isFinite(n)})),M="object"===j()(L)&&Object(R.isEqual)(m,L.totalQuery);Object(y.useEffect)((function(){M||(r(1),L&&function(e){Number.isFinite(e)&&(0===e?Object(Z.speak)(Object(S.__)("No products found","woo-gutenberg-products-block")):Object(Z.speak)(Object(S.sprintf)(Object(S._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[u]);var V,q,U,H,W,K=t.contentVisibility,Q=t.columns*t.rows,$=!Number.isFinite(f)&&M?Math.ceil(L.totalProducts/Q):Math.ceil(f/Q),J=l.length?l:Array.from({length:Q}),X=0!==l.length||p,ee=g.length>0||Number.isFinite(_)||Number.isFinite(I);return React.createElement("div",{className:(V=t.columns,q=t.rows,U=t.alignButtons,H=t.align,W=void 0!==H?"align"+H:"",C()(d,W,"has-"+V+"-columns",{"has-multiple-rows":q>1,"has-aligned-buttons":U}))},K.orderBy&&X&&React.createElement(A,{onChange:o,value:a}),!X&&ee&&React.createElement(re,{resetCallback:function(){O([]),x(null),F(null)}}),!X&&!ee&&React.createElement(te,null),X&&React.createElement("ul",{className:"".concat(d,"__products")},J.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(B,{key:e.id||n,attributes:t,product:e})}))),$>1&&React.createElement(T,{currentPage:n,onPageChange:function(e){c({focusableSelector:"a, button"}),r(e)},totalPages:$}))})),ie=function(e){var t=e.attributes,n=Object(y.useState)(1),r=v()(n,2),o=r[0],a=r[1],c=Object(y.useState)(t.orderby),i=v()(c,2),u=i[0],s=i[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return React.createElement(ce,{attributes:t,currentPage:o,onPageChange:function(e){a(e)},onSortChange:function(e){var t=e.target.value;s(t),a(1)},sortValue:u})},ue=n(9),se=React.createElement("img",{src:ue.A+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}});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=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 fe=function(e){f()(n,e);var t=le(n);function n(){return i()(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?se:React.createElement(D.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ie,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(a.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(fe,e))})),getProps:function(e){return{attributes:JSON.parse(e.dataset.attributes)}}})}]);
|
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=256)}([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.wc.wcSettings}()},function(e,t){!function(){e.exports=this.React}()},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 a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===a)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}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){e.exports=n(62)()},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){var r=n(74),o=n(75),a=n(55),c=n(76);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||c()}},function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"s",(function(){return a})),n.d(t,"w",(function(){return c})),n.d(t,"p",(function(){return i})),n.d(t,"l",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"x",(function(){return f})),n.d(t,"k",(function(){return p})),n.d(t,"j",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return h})),n.d(t,"A",(function(){return g})),n.d(t,"t",(function(){return v})),n.d(t,"a",(function(){return y})),n.d(t,"u",(function(){return O})),n.d(t,"b",(function(){return j})),n.d(t,"f",(function(){return w})),n.d(t,"v",(function(){return _})),n.d(t,"g",(function(){return S})),n.d(t,"r",(function(){return R})),n.d(t,"q",(function(){return x})),n.d(t,"z",(function(){return C})),n.d(t,"y",(function(){return N})),n.d(t,"d",(function(){return P})),n.d(t,"e",(function(){return T}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),a=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),i=(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),d=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),m=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),b=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=Object(r.getSetting)("isShippingCostHidden",!1),g=(Object(r.getSetting)("woocommerceBlocksPhase",1),Object(r.getSetting)("wcBlocksAssetUrl","")),v=Object(r.getSetting)("shippingCountries",{}),y=Object(r.getSetting)("allowedCountries",{}),O=Object(r.getSetting)("shippingStates",{}),j=Object(r.getSetting)("allowedStates",{}),w=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("checkoutShowLoginReminder",!0)),k={id:0,title:"",permalink:""},E=Object(r.getSetting)("storePages",{shop:k,cart:k,checkout:k,privacy:k,terms:k}),_=E.shop.permalink,S=(E.checkout.id,E.checkout.permalink),R=E.privacy.permalink,x=E.privacy.title,C=E.terms.permalink,N=E.terms.title,P=(E.cart.id,E.cart.permalink),T=Object(r.getSetting)("checkoutAllowsGuest",!1);Object(r.getSetting)("checkoutAllowsSignup",!1),n(41)},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){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,n){var r=n(77);e.exports=function(e,t){if(null==e)return{};var n,o,a=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)&&(a[n]=e[n])}return a}},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){!function(){e.exports=this.wp.htmlEntities}()},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,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.compose}()},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 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,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(53);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,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}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";var r=n(6),o=n.n(r),a=(n(5),n(3)),c=n(4),i=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}var l=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,u=null!=n,l=null!=r;return!u&&l?(t=o||"span",c=s(s({},c),{},{className:i()(c.className,"screen-reader-text")}),React.createElement(t,c,r)):(t=o||a.Fragment,u&&l&&n!==r?React.createElement(t,c,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,c,n))};l.defaultProps={wrapperProps:{}},t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(30);function o(e,t){if(null==e)return{};var n,o,a=Object(r.a)(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)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),a=n(6),c=n.n(a),i=n(12),u=n.n(i),s=n(3),l=n.n(s);function f(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 p(){return(p=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)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){}function g(){}g.resetWarningCache=h;var v=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var c=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 c.name="Invariant Violation",c}}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:g,resetWarningCache:h};return n.PropTypes=n,n}()}));function y(){}function O(e){return!!(e||"").match(/\d/)}function j(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function w(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),a=o[0],c=o[1]||"";return{beforeDecimal:a,afterDecimal:c,hasNagation:n,addNegation:r}}function k(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function E(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function _(e,t,n){return Math.min(Math.max(e,t),n)}function S(e){return Math.max(e.selectionStart,e.selectionEnd)}var R={thousandSeparator:v.oneOfType([v.string,v.oneOf([!0])]),decimalSeparator:v.string,allowedDecimalSeparators:v.arrayOf(v.string),thousandsGroupStyle:v.oneOf(["thousand","lakh","wan"]),decimalScale:v.number,fixedDecimalScale:v.bool,displayType:v.oneOf(["input","text"]),prefix:v.string,suffix:v.string,format:v.oneOfType([v.string,v.func]),removeFormatting:v.func,mask:v.oneOfType([v.string,v.arrayOf(v.string)]),value:v.oneOfType([v.number,v.string]),defaultValue:v.oneOfType([v.number,v.string]),isNumericString:v.bool,customInput:v.elementType,allowNegative:v.bool,allowEmptyFormatting:v.bool,allowLeadingZeros:v.bool,onValueChange:v.func,onKeyDown:v.func,onMouseUp:v.func,onChange:v.func,onFocus:v.func,onBlur:v.func,type:v.oneOf(["text","tel","password"]),isAllowed:v.func,renderText:v.func,getInputRef:v.oneOfType([v.func,v.shape({current:v.any})])},x={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:y,onChange:y,onKeyDown:y,onMouseUp:y,onFocus:y,onBlur:y,isAllowed:function(){return!0}},C=function(e){function t(e){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n=!(o=d(t).call(this,e))||"object"!=typeof o&&"function"!=typeof o?b(r):o;var a=e.defaultValue;n.validateProps();var c=n.formatValueProp(a);return n.state={value:c,numAsString:n.removeFormatting(c)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(b(n)),n.onKeyDown=n.onKeyDown.bind(b(n)),n.onMouseUp=n.onMouseUp.bind(b(n)),n.onFocus=n.onFocus.bind(b(n)),n.onBlur=n.onBlur.bind(b(n)),n}var n,r,o;return 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&&m(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,a=n.numAsString,c=void 0===a?"":a;if(e!==t){this.validateProps();var i=this.formatNumString(c),u=void 0===t.value?i:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),f=parseFloat(c);(isNaN(l)&&isNaN(f)||l===f)&&i===o&&(null!==r||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var c=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==c&&(e="".concat(e.substring(0,c),".").concat(e.substring(c+1,e.length).replace(new RegExp(j(r),"g"),""))),a&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,a=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!a||0===o||t||r?"":"|"+j(a)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){E(e,t),setTimeout((function(){e.value===n&&E(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,a=r.suffix,c=r.format;if(""===e)return 0;if(t=_(t,0,e.length),!c){var i="-"===e[0];return _(t,o.length+(i?1:0),e.length-a.length)}if("function"==typeof c)return t;if("#"===c[t]&&O(e[t]))return t;if("#"===c[t-1]&&O(e[t-1]))return t;var u=c.indexOf("#");t=_(t,u,c.lastIndexOf("#")+1);for(var s=c.substring(t,c.length).indexOf("#"),l=t,f=t+(-1===s?0:s);l>u&&("#"!==c[l]||!O(e[l]));)l-=1;return!O(e[f])||"left"===n&&t!==u||t-l<f-t?O(e[l])?l+1:l:f}},{key:"getCaretPosition",value:function(e,t,n){var r,o,a=this.props.format,c=this.state.value,i=this.getNumberRegex(!0),u=(e.match(i)||[]).join(""),s=(t.match(i)||[]).join("");for(r=0,o=0;o<n;o++){var l=e[o]||"",f=t[r]||"";if((l.match(i)||l===f)&&("0"!==l||!f.match(i)||"0"===f||u.length===s.length)){for(;l!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof a||c||(r=t.length),r=this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var a="-"===e[0];a&&(e=e.substring(1,e.length));var c=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==c&&c===e.length-o.length?e.substring(0,c):e,a&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,a=t.length;o<=a;o++){var c=t[o]||"",i=o===a?e.length:e.indexOf(c,n);if(-1===i){r=e;break}r+=e.substring(n,i),n=i+c.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,a=t.length;o<a;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,a=t.suffix,c=t.allowNegative,i=t.thousandsGroupStyle,u=this.getSeparators(),s=u.thousandSeparator,l=u.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=w(e,c),d=p.beforeDecimal,m=p.afterDecimal,b=p.addNegation;return void 0!==n&&(m=k(m,n,r)),s&&(d=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(d,s,i)),o&&(d=o+d),a&&(m+=a),b&&(d="-"+d),e=d+(f&&l||"")+m}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,a=t.allowEmptyFormatting,c=this.props,i=c.value,u=void 0===i?e:i,s=c.isNumericString,l=!u&&0!==u;return l&&a&&(u=""),l&&!a?"":("number"==typeof u&&(u=u.toString(),s=!0),"Infinity"===u&&s&&(u=""),s&&!n&&"number"==typeof r&&(u=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=w(e),a=o.beforeDecimal,c=o.afterDecimal,i=o.hasNagation,u=parseFloat("0.".concat(c||"0")).toFixed(t).split("."),s=a.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=k(u[1]||"",Math.min(t,c.length),n),f=r?".":"";return"".concat(i?"-":"").concat(s).concat(f).concat(l)}(u,r,o)),s?this.formatNumString(u):this.formatInput(u))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,a=n.suffix,c=n.decimalScale,i=n.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-a.length||c&&i&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,a=r.allowNegative,c=r.prefix,i=r.suffix,u=r.decimalScale,s=this.getSeparators(),l=s.allowedDecimalSeparators,f=s.decimalSeparator,p=this.state.numAsString||"",d=this.selectionBeforeInput,m=d.selectionStart,b=d.selectionEnd,h=function(e,t){for(var n=0,r=0,o=e.length,a=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[a-1-r]&&a-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),g=h.start,v=h.end;if(!o&&g===v&&-1!==l.indexOf(n[m])){var y=0===u?"":f;return n.substr(0,m)+y+n.substr(m+1,n.length)}var O=o?0:c.length,j=t.length-(o?0:i.length);if(n.length>t.length||!n.length||g===v||0===m&&b===t.length||m===O&&b===j)return n;if(this.checkIfFormatGotDeleted(g,v,t)&&(n=t),!o){var k=this.removeFormatting(n),E=w(k,a),_=E.beforeDecimal,S=E.afterDecimal,R=E.addNegation,x=e<n.indexOf(f)+1;if(k.length<p.length&&x&&""===_&&!parseFloat(S))return R?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,a=e.numAsString,c=e.caretPos,i=this.props.onValueChange,u=this.state.value;if(n)if(o){if(!c){var s=e.inputValue||n.value,l=S(n);n.value=t,c=this.getCaretPosition(s,t,l)}this.setPatchedCaretPosition(n,c,t)}else n.value=t;void 0===a&&(a=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:a}),i(this.getValueObject(t,a)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,a=o.isAllowed,c=r.value||"",i=S(t);n=this.correctInputValue(i,c,n);var u=this.formatInput(n)||"",s=this.removeFormatting(u);a(this.getValueObject(u,s))||(u=c),this.updateValue({formattedValue:u,numAsString:s,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,a=t.allowLeadingZeros,c=n.numAsString,i=n.value;if(this.focusedElm=null,this.focusTimeout&&clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(c))&&(c=""),a||(c=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(c));var u=this.formatNumString(c);if(u!==i)return this.updateValue({formattedValue:u,numAsString:c,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,a=n.selectionEnd,c=n.value,i=void 0===c?"":c,u=this.props,s=u.decimalScale,l=u.fixedDecimalScale,f=u.prefix,p=u.suffix,d=u.format,m=u.onKeyDown,b=void 0!==s&&l,h=this.getNumberRegex(!1,b),g=new RegExp("-"),v="string"==typeof d;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:a},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===a){var y=t,O=v?d.indexOf("#"):f.length,j=v?d.lastIndexOf("#")+1:i.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var w="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(i,t,w)}else if("Delete"!==r||h.test(i[t])||g.test(i[t])){if("Backspace"===r&&!h.test(i[t]))if(o<=O+1&&"-"===i[0]&&void 0===d){var k=i.substring(1);this.updateValue({formattedValue:k,caretPos:y,input:n})}else if(!g.test(i[t])){for(;!h.test(i[y-1])&&y>O;)y--;y=this.correctCaretPosition(i,y,"left")}}else for(;!h.test(i[y])&&y<j;)y++;(y!==t||t<O||t>j)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,i),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,a=void 0===o?"":o;if(n===r){var c=this.correctCaretPosition(a,n);c!==n&&this.setPatchedCaretPosition(t,c,a)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,a=n.value,c=void 0===a?"":a,i=t.correctCaretPosition(c,r);i===r||0===r&&o===c.length||t.setPatchedCaretPosition(n,i,c),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,a=r.displayType,c=r.customInput,i=r.renderText,u=r.getInputRef,s=this.state.value,f=(e=this.props,t=R,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),d=p({inputMode:"numeric"},f,{type:o,value:s,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===a)return i?i(s)||null:l.a.createElement("span",p({},f,{ref:u}),s);if(c){var m=c;return l.a.createElement(m,p({},d,{ref:u}))}return l.a.createElement("input",p({},d,{ref:u}))}}])&&f(n.prototype,r),o&&f(n,o),t}(l.a.Component);C.propTypes=R,C.defaultProps=x;var N=C,P=n(4),T=n.n(P);n(91);function I(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 A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.className,n=e.value,r=e.currency,a=e.onValueChange,c=u()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var i=n/Math.pow(10,r.minorUnit);if(!Number.isFinite(i))return null;var s=T()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),l=A(A(A({displayType:"text"},c),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(r)),{},{value:void 0,currency:void 0,onValueChange:void 0}),f=a?function(e){var t=e.value*Math.pow(10,r.minorUnit);a(t)}:function(){};return React.createElement(N,o()({className:s},l,{value:i,onValueChange:f}))}},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(61);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(22),o=n(19);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(47);var o=n(53);function a(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){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(38),a=n.n(o),c=function(e){var t=Object(r.useRef)();return a()(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.a11y}()},function(e,t,n){"use strict";var r=n(32),o=n.n(r),a=n(33),c=n.n(a),i=n(19),u=n.n(i),s=n(34),l=n.n(s),f=n(35),p=n.n(f),d=n(24),m=n.n(d),b=n(6),h=n.n(b),g=(n(5),n(3)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.A,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,a=e.text,c=void 0===a?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):a,i=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),i&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",i)))};n(64);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=m()(e);if(t){var o=m()(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,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return e=t.call.apply(t,[this].concat(a)),h()(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,a=e.errorMessagePrefix,c=this.state,i=c.errorMessage;return c.hasError?React.createElement(O,{errorMessage:r?i:null,header:t,imageUrl:n,text:o,errorMessagePrefix:a}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(g.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(g.Component);w.defaultProps={showErrorMessage:!0};t.a=w},function(e,t){!function(){e.exports=this.ReactDOM}()},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,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.dom}()},function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),a=n(12),c=n.n(a),i=n(68),u=(n(5),n(4)),s=n.n(u);n(106);t.a=function(e){var t=e.className,n=e.showSpinner,r=void 0!==n&&n,a=e.children,u=c()(e,["className","showSpinner","children"]),l=s()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return React.createElement(i.a,o()({className:l},u),r&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},a))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(47);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){var r=n(56);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,n){var r=n(92),o=n(93),a=n(55),c=n(94);e.exports=function(e){return r(e)||o(e)||a(e)||c()}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=Object(r.createContext)("page"),a=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(63);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,c){if(c!==r){var i=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 i.name="Invariant Violation",i}}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:a,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,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";n.d(t,"a",(function(){return s}));var r=n(6),o=n.n(r),a=n(114),c=n(0);function i(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?i(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(a.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,i=e.setIsSuppressed,s=Object(c.useRef)(t);Object(c.useEffect)((function(){s.current=t}),[t]);var l=Object(c.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.map((function(t){return null!==e&&t.status!==e||r(t.id),!0}))},removeNotice:r}}),[r]),f=Object(c.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:i})}},,function(e,t,n){"use strict";var r=n(26),o=n(29),a=n(4),c=n.n(a),i=n(0);t.a=Object(i.forwardRef)((function(e,t){var n=e.href,a=e.target,u=e.isPrimary,s=e.isLarge,l=e.isSmall,f=e.isTertiary,p=e.isToggled,d=e.isBusy,m=e.isDefault,b=e.isLink,h=e.isDestructive,g=e.className,v=e.disabled,y=Object(o.a)(e,["href","target","isPrimary","isLarge","isSmall","isTertiary","isToggled","isBusy","isDefault","isLink","isDestructive","className","disabled"]),O=c()("components-button",g,{"is-button":m||u||s||l,"is-default":m||!u&&(s||l),"is-primary":u,"is-large":s,"is-small":l,"is-tertiary":f,"is-toggled":p,"is-busy":d,"is-link":b,"is-destructive":h}),j=void 0===n||v?"button":"a",w="a"===j?{href:n,target:a}:{type:"button",disabled:v};return Object(i.createElement)(j,Object(r.a)({},w,y,{className:O,ref:t}))}))},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)),a=r(n(77)),c=n(3),i=r(c),u=r(n(105)),s=r(n(19)),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=c.useState(!1)[1];return c.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 m(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 b(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,a(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 a;return l.und(t[r])?o({},n,((a={})[r]=e[r],a)):n}),{});return o({to:t},n)}var h,g,v=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 v&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(s(t))}))},t}return u(t,e),t}(v),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 v&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&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 v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function j(e,t){h={fn:e,transform:t}}function w(e){g=e}var k,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},_=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function S(e){k=e}var R,x=function(){return Date.now()};function C(e){R=e}var N,P,T=function(e){return e.current};function I(e){N=e}var A=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return g},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return _},injectFrame:function(e,t){E=e,_=t},get interpolation(){return k},injectStringInterpolator:S,get now(){return x},injectNow:function(e){x=e},get defaultElement(){return R},injectDefaultElement:C,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return N},injectCreateAnimatedStyle:I,get manualFrameloop(){return P},injectManualFrameloop:function(e){P=e}}),D=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:N(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),F=!1,L=new Set,M=function e(){if(!F)return!1;var t=x(),n=L,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var a;if(r){if(o>=n.length)break;a=n[o++]}else{if((o=n.next()).done)break;a=o.value}for(var c=a,i=!1,u=0;u<c.configs.length;u++){for(var s=c.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var m=s.fromValues[p],b=s.toValues[p],h=d.lastPosition,g=b instanceof v,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(g&&(b=b.getValue()),s.immediate)d.setValue(b),d.done=!0;else if("string"!=typeof m&&"string"!=typeof b){if(void 0!==s.duration)h=m+s.easing((t-d.startTime)/s.duration)*(b-m),l=t>=d.startTime+s.duration;else if(s.decay)h=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(b=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-b)+-s.friction*y)/s.mass)/1e3)/1e3}var w=!(!s.clamp||0===s.tension)&&(m<b?h>b:h<b),k=Math.abs(y)<=s.precision,_=0===s.tension||Math.abs(b-h)<=s.precision;l=w||k&&_,d.lastVelocity=y,d.lastTime=t}g&&!s.toValues[p].done&&(l=!1),l?(d.value!==b&&(h=b),d.done=!0):i=!0,d.setValue(h),d.lastPosition=h}else d.setValue(b),d.done=!0}}c.props.onFrame&&(c.values[s.name]=s.interpolation.getValue())}c.props.onFrame&&c.props.onFrame(c.values),i||(L.delete(c),c.stop(!0))}return L.size?P?P():E(e):F=!1,F};function V(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,a=r.range||[0,1],c=r.extrapolateLeft||r.extrapolate||"extend",i=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,a);return function(e,t,n,r,o,a,c,i,u){var s=u?u(e):e;if(s<t){if("identity"===c)return s;"clamp"===c&&(s=t)}if(s>n){if("identity"===i)return s;"clamp"===i&&(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=a(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,a[t],a[t+1],o[t],o[t+1],u,c,i,r.map)}}var B=function(e){function t(n,r,o,a){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=V(r,o,a),c}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=V(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 B(this,e,t,n)},t}(v),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 B(this,e,t)},t}(y),U=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=U++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=b(e),n=t.delay,r=void 0===n?0:n,c=t.to,i=a(t,["delay","to"]);if(l.arr(c)||l.fun(c))this.queue.push(o({},i,{delay:r,to:c}));else if(c){var u={};Object.entries(c).forEach((function(e){var t,n=e[0],a=e[1],c=o({to:(t={},t[n]=a,t),delay:m(r,n)},i),s=u[c.delay]&&u[c.delay].to;u[c.delay]=o({},u[c.delay],c,{to:o({},s,c.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),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,a=e.to,c=void 0===a?{}:a;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(c)&&(n.merged=o({},n.merged,c))}));var r=this.local=++this.guid,c=this.localQueue=this.queue;this.queue=[],c.forEach((function(t,o){var i=t.delay,u=a(t,["delay"]),s=function(t){o===c.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);i?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),i):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,L.has(t)||L.add(t),F||(F=!0,E(P||M));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,L.has(t)&&L.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,a(e,["delay"])),c=this.local,i=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,a=o({},r,b(r.to[t]));l.arr(a.config)&&(a.config=a.config[t]),i=i.then((function(){if(c===n.guid)return new Promise((function(e){return n.diff(a).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;i=i.then((function(){return r.to((function(e){var t=o({},r,b(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,c===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}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,a=void 0===r?{}:r,c=n.to,i=void 0===c?{}:c,u=n.config,s=void 0===u?{}:u,f=n.reverse,b=n.attach,h=n.reset,v=n.immediate;if(f){var y=[i,a];a=y[0],i=y[1]}this.merged=o({},a,this.merged,i),this.hasChanged=!1;var O=b&&b(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],c=n[1],i=e[r]||{},u=l.num(c),f=l.str(c)&&!c.startsWith("#")&&!/\d/.test(c)&&!g[c],b=l.arr(c),y=!u&&!b&&!f,j=l.und(a[r])?c:a[r],w=u||b||f?c:1,E=m(s,r);O&&(w=O.animations[r].parent);var _,S=i.parent,R=i.interpolation,C=d(O?w.getPayload():w),N=c;y&&(N=k({range:[0,1],output:[c,c]})(1));var P,T=R&&R.getValue(),I=!l.und(S)&&i.animatedValues.some((function(e){return!e.done})),A=!l.equ(N,T),D=!l.equ(N,i.previous),F=!l.equ(E,i.config);if(h||D&&A||F){var L;if(u||f)S=R=i.parent||new z(j);else if(b)S=R=i.parent||new q(j);else if(y){var M=i.interpolation&&i.interpolation.calc(i.parent.value);M=void 0===M||h?j:M,i.parent?(S=i.parent).setValue(0,!1):S=new z(0);var V={output:[M,c]};i.interpolation?(R=i.interpolation,i.interpolation.updateConfig(V)):R=S.interpolate(V)}return C=d(O?w.getPayload():w),_=d(S.getPayload()),h&&!y&&S.setValue(j,!1),t.hasChanged=!0,_.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=I?e.lastVelocity:void 0,e.lastTime=I?e.lastTime:void 0,e.startTime=x(),e.done=!1,e.animatedStyles.clear()})),m(v,r)&&S.setValue(y?w:c,!1),o({},e,((L={})[r]=o({},i,{name:r,parent:S,interpolation:R,animatedValues:_,toValues:C,previous:N,config:E,fromValues:d(S.getValue()),immediate:m(v,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}),L))}return A?e:(y&&(S.setValue(1,!1),R.updateConfig({output:[N,N]})),S.done=!0,t.hasChanged=!0,o({},e,((P={})[r]=o({},e[r],{previous:N}),P)))}),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}(),W=function(e,t){var n=c.useRef(!1),r=c.useRef(),o=l.fun(t),a=c.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 a=new H,c=o?m(t,r,a):t[r];return 0===r&&(n=c.ref),a.update(c),n||a.start(),a})),n]}),[e]),i=a[0],u=a[1];r.current=i;c.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=c.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);c.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),c.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)},Y=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,c=a(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},c)};function G(e,t){var n=function(){if(o){if(a>=r.length)return"break";c=r[a++]}else{if((a=r.next()).done)return"break";c=a.value}var n=c.key,i=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},r=e.current.deleted,o=Array.isArray(r),a=0;for(r=o?r:r[Symbol.iterator]();;){var c;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 v||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),Z={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},J="[-+]?\\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(J,J,J)),te=new RegExp("rgba"+X(J,J,J,J)),ne=new RegExp("hsl"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(J,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",J)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{6})$/,ie=/^#([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,a=ue(o,r,e+1/3),c=ue(o,r,e),i=ue(o,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*c)<<16|Math.round(255*i)<<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 me(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ce.exec(t))?parseInt(n[1]+"ff",16)>>>0:Z.hasOwnProperty(t)?Z[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=ie.exec(t))?parseInt(n[1],16)>>>0:(n=ae.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 be=/[+\-]?(?: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,ge=new RegExp("("+Object.keys(Z).join("|")+")","g"),ve={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||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).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}),ve);var je={};I((function(e){return new $(e)})),C("div"),S((function(e){var t=e.output.map((function(e){return e.replace(he,me)})).map((function(e){return e.replace(ge,me)})),n=t[0].match(be).map((function(){return[]}));t.forEach((function(e){e.match(be).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(be).map((function(t,r){return V(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(be,(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(Z),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,c=t.scrollLeft,i=a(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!==c&&(e.scrollLeft=c),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 i){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,i[p])}}),(function(e){return e}));var we,ke,Ee=(we=function(e){return c.forwardRef((function(t,n){var r=f(),u=c.useRef(!0),s=c.useRef(null),p=c.useRef(null),d=c.useCallback((function(e){var t=s.current;s.current=new D(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),c.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var m,b=s.current.getValue(),g=(b.scrollTop,b.scrollLeft,a(b,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof i.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 i.createElement(e,o({},g,{ref:v}))}))},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)}),_e=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=M,t.animated=_e,t.a=_e,t.interpolate=function(e,t,n){return e&&new B(e,t,n)},t.Globals=A,t.useSpring=function(e){var t=l.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],a=n[2];return t?[r[0],o,a]:r},t.useTrail=function(e,t){var n=c.useRef(!1),r=l.fun(t),a=m(t),i=c.useRef(),u=W(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},a,{config:m(a.config,e),attach:e>0&&function(){return i.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=c.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,c=i.current[r];return o({},e,{config:m(e.config||a.config,t),attach:c&&function(){return c}})}))}}),[e,a.reverse]);return c.useEffect((function(){n.current&&!r&&d(t)})),c.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),i=Y(r),u=i.lazy,s=void 0!==u&&u,l=(i.unique,i.reset),p=void 0!==l&&l,d=(i.enter,i.leave,i.update,i.onDestroyed),b=(i.keys,i.items,i.onFrame),h=i.onRest,g=i.onStart,v=i.ref,y=a(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=c.useRef(!1),w=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return c.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,c=a(e,["first","prevProps"]),i=Y(t),u=i.items,s=i.keys,l=i.initial,f=i.from,p=i.enter,d=i.leave,b=i.update,h=i.trail,g=void 0===h?0:h,v=i.unique,y=i.config,O=i.order,j=void 0===O?["enter","leave","update"]:O,w=Y(r),k=w.keys,E=w.items,_=o({},c.current),S=[].concat(c.deleted),R=Object.keys(_),x=new Set(R),C=new Set(s),N=s.filter((function(e){return!x.has(e)})),P=c.transitions.filter((function(e){return!e.destroyed&&!C.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return x.has(e)})),I=-g;for(;j.length;){switch(j.shift()){case"enter":N.forEach((function(e,t){v&&S.find((function(t){return t.originalKey===e}))&&(S=S.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],a=n&&void 0!==l?"initial":"enter";_[e]={slot:a,originalKey:e,key:v?String(e):K++,item:o,trail:I+=g,config:m(y,o,a),from:m(n&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":P.forEach((function(e){var t=k.indexOf(e),n=E[t];S.unshift(o({},_[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:I+=g,config:m(y,n,"leave"),to:m(d,n)})),delete _[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];_[e]=o({},_[e],{item:n,slot:"update",trail:I+=g,config:m(y,n,"update"),to:m(b,n)})}))}}var A=s.map((function(e){return _[e]}));return S.forEach((function(e){var t,n=e.left,r=(e.right,a(e,["left","right"]));-1!==(t=A.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),A=[].concat(A.slice(0,t),[r],A.slice(t))})),o({},c,{changed:N.length||P.length||T.length,first:n&&0===N.length,transitions:A,current:_,deleted:S,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,a=e.config,c=e.trail,i=e.key,u=e.item;w.current.instances.has(i)||w.current.instances.set(i,new H);var l=w.current.instances.get(i),f=o({},y,{to:r,from:n,config:a,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||s||G(w,i),d&&d(u)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(v||s)&&w.current.deleted.length>0&&G(w),h&&h(u,t,n))},onStart:g&&function(){return g(u,t)},onFrame:b&&function(e){return b(u,t,e)},delay:c,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),c.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=c.useRef();c.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 a=e.current;if(a){var c=a.controllers;if(c.length){var i=n*t[r];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),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=W},function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){"use strict";var r=n(11),o=n.n(r),a=n(12),c=n.n(a),i=n(73),u=n(4),s=n.n(u),l=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,a=c()(e,["className","size"]),u=s()("dashicon","dashicons-arrow-down-alt2",t);return React.createElement(i.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:u,width:r,height:r},a),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},f=React.createElement(l,null),p=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]),a=s()("dashicon","dashicons-arrow-down-alt2",t);return React.createElement(i.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:a,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"}))},d=React.createElement(p,null),m=n(0);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=f;break;case"no-alt":t=d}return t?Object(m.cloneElement)(t,{size:e.size||20,className:e.className}):null}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(26),o=n(7),a=n(0),c=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(a.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},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,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}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){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(26),o=n(10),a=n(29),c=n(0),i=n(71),u=n(73);t.a=function(e){var t=e.icon,n=void 0===t?null:t,s=e.size,l=Object(a.a)(e,["icon","size"]),f=s||20;if("string"==typeof n)return Object(c.createElement)(i.a,Object(o.a)({icon:n,size:f},l));if(n&&i.a===n.type)return Object(c.cloneElement)(n,Object(r.a)({size:f},l));var p=s||24;if("function"==typeof n)return n.prototype instanceof c.Component?Object(c.createElement)(n,Object(r.a)({size:p},l)):n(Object(r.a)({size:p},l));if(n&&("svg"===n.type||n.type===u.a)){var d=Object(r.a)({width:p,height:p},n.props,l);return Object(c.createElement)(u.a,d)}return Object(c.isValidElement)(n)?Object(c.cloneElement)(n,Object(r.a)({size:p},l)):n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(16),o=n(13),a=n(112),c=n(15),i=n(7),u={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(a.a)(),n=t.isEditor,s=t.previewData,l=(null==s?void 0:s.previewCart)||{},f=e.shouldSelect,p=Object(o.useSelect)((function(e,t){var o=t.dispatch;if(!f)return u;if(n)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var a=e(r.CART_STORE_KEY),s=a.getCartData(),p=a.getCartErrors(),d=a.getCartTotals(),m=!a.hasFinishedResolution("getCartData"),b=a.areShippingRatesLoading(),h=o(r.CART_STORE_KEY).receiveCart,g=Object(i.mapValues)(s.shippingAddress,(function(e){return Object(c.decodeEntities)(e)}));return{cartCoupons:s.coupons,cartItems:s.items||[],cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors||[],cartTotals:d,cartIsLoading:m,cartErrors:p,shippingAddress:g,shippingRates:s.shippingRates||[],shippingRatesLoading:b,hasShippingAddress:!!g.country,receiveCart:h}}),[f]);return p}},,,,function(e,t){!function(){e.exports=this.wp.deprecated}()},,function(e,t,n){"use strict";var r=n(0),o=n(70),a=n(49),c=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,"")},u=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=i(e),o=r.split(" ").splice(0,t).join(" ");return Object(a.autop)(u(o,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",o=i(e),c=o.slice(0,t);if(n)return Object(a.autop)(u(c,r));var s=c.match(/([\s]+)/g),l=s?s.length:0,f=o.slice(0,t+l);return Object(a.autop)(u(f,r))};t.a=function(e){var t=e.source,n=e.maxLength,i=void 0===n?15:n,u=e.countType,f=void 0===u?"words":u,p=e.className,d=void 0===p?"":p,m=Object(r.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",r=Object(a.autop)(e),i=Object(o.count)(r,n);if(i<=t)return r;var u=c(r),f=Object(o.count)(u,n);return f<=t?u:"words"===n?s(u,t):l(u,t,"characters_including_spaces"===n)}(t,i,f)}),[t,i,f]);return React.createElement(r.RawHTML,{className:d},m)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(8),o=n.n(r),a=n(0),c=function(){var e=Object(a.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},,,,function(e,t){},function(e,t,n){var r=n(56);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){!function(){e.exports=this.wp.components}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return d}));var r=n(8),o=n.n(r),a=n(16),c=n(13),i=n(0),u=n(59),s=n(7),l=n(39),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(a.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(a.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(i.useCallback)((function(t){r(e,t)}),[e])]},p=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(c.useSelect)((function(r){return r(a.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(a.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(i.useCallback)((function(t){s(n,e,t)}),[n,e])]},d=function(e,t){var n=Object(u.a)(),r=f(t=t||n),a=o()(r,2),c=a[0],p=a[1],d=Object(l.a)(e),m=Object(i.useRef)(!1);return Object(i.useEffect)((function(){p(Object(s.assign)({},c,d)),m.current=!0}),[d]),m.current?[c,p]:[e,p]}},function(e,t,n){"use strict";var r=n(10),o=n(0),a=n(7);var c=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(a.upperFirst)(Object(a.camelCase)(t)),"(").concat(c,")"),r}},i=new WeakMap;function u(e){return Object(o.useMemo)((function(){return function(e){var t=i.get(e)||0;return i.set(e,t+1),t}(e)}),[e])}t.a=c((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";n.d(t,"a",(function(){return f}));var r=n(11),o=n.n(r),a=n(6),c=n.n(a),i=n(45),u=n(44);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 f=function(e){var t=e.Block,n=e.selector,r=e.getProps,a=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c,f=document.querySelectorAll(n);f.length&&Array.prototype.forEach.call(f,(function(e,n){var r=a(e,n),c=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(i.render)(React.createElement(u.a,c,React.createElement(t,o()({},r,{attributes:f}))),e)}))}},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){},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(16),o=n(13),a=n(0),c=n(87),i=n(39),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 m=Object(a.useRef)({results:[],isLoading:!0}),b=Object(i.a)(f),h=Object(i.a)(s),g=Object(c.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),a=[t,n,b,h],c=o.getCollectionError.apply(o,a);return c&&g(c),{results:o.getCollection.apply(o,a),isLoading:!o.hasFinishedResolution("getCollection",a)}}),[t,n,h,b,d]);return null!==v&&(m.current=v),m.current}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=(n(13),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),a=function(){return Object(r.useContext)(o)}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return D})),n.d(t,"a",(function(){return F}));var r=n(6),o=n.n(r),a=n(8),c=n.n(a),i=(n(5),n(0)),u=n(13),s=n(11),l=n.n(s),f=n(4),p=n.n(f),d=n(176),m=(n(104),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""}),b=function(e){var t=e.className,n=e.notices,r=D().removeNotice,o=p()(t,"wc-block-components-notices"),a=n.filter((function(e){return"snackbar"!==e.type}));return a.length?React.createElement("div",{className:o},a.map((function(e){return React.createElement(d.a,l()({key:"store-notice-"+e.id},e,{className:p()("wc-block-components-notices__notice","woocommerce-message",m(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)}))):null},h=n(10),g=n(25),v=n.n(g);function y(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function O(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function c(e){y(a,r,o,c,i,"next",e)}function i(e){y(a,r,o,c,i,"throw",e)}c(void 0)}))}}var j=n(27),w=n(7),k=n(69),E=n(21),_=n(1),S=n(68);var R=Object(i.forwardRef)((function(e,t){var n=e.className,r=e.children,o=e.actions,a=void 0===o?[]:o,c=e.onRemove,u=void 0===c?w.noop:c;Object(i.useEffect)((function(){var e=setTimeout((function(){u()}),1e4);return function(){return clearTimeout(e)}}),[]);var s=p()(n,"components-snackbar");return a&&a.length>1&&(console.warn("Snackbar can only have 1 action, use Notice if your message require many messages"),a=[a[0]]),Object(i.createElement)("div",{ref:t,className:s,onClick:u,tabIndex:"0",role:"button",onKeyPress:u,label:Object(_.__)("Dismiss this notice")},Object(i.createElement)("div",{className:"components-snackbar__content"},r,a.map((function(e,t){var n=e.label,r=e.onClick,o=e.url;return Object(i.createElement)(S.a,{key:t,href:o,isTertiary:!0,onClick:function(e){e.stopPropagation(),r&&r(e)},className:"components-snackbar__action"},n)}))))}));var x=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,a=void 0===o?w.noop:o,c=Object(E.useReducedMotion)(),u=Object(i.useState)((function(){return new WeakMap})),s=Object(j.a)(u,1)[0],l=Object(k.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=O(v.a.mark((function t(n){return v.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=O(v.a.mark((function e(t){return v.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:c});n=p()("components-snackbar-list",n);var f=function(e){return function(){return a(e.id)}};return Object(i.createElement)("div",{className:n},r,l.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(i.createElement)(k.animated.div,{key:n,style:r},Object(i.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(i.createElement)(R,Object(h.a)({},Object(w.omit)(t,["content"]),{onRemove:f(t)}),t.content)))})))},C=n(66),N=n(112),P=function(){var e=Object(N.a)().isEditor,t=Object(C.a)(),n=t.notices,r=t.removeNotice,o=n.filter((function(e){return"snackbar"===e.type}));return e?null:React.createElement(x,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function T(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 I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A=Object(i.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),D=function(){return Object(i.useContext)(A)},F=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,a=void 0===o||o,s=e.context,l=void 0===s?"wc/core":s,f=Object(u.useDispatch)("core/notices"),p=f.createNotice,d=f.removeNotice,m=Object(i.useState)(!1),h=c()(m,2),g=h[0],v=h[1],y=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]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};p(e,t,I(I({},n),{},{context:n.context||l}))}),[p,l]),O=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;d(e,t)}),[d,l]),j=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]:{};y("default",e,I(I({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(l)}}),[l]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:l,setIsSuppressed:v},k=g?null:React.createElement(b,{className:r,notices:w.notices}),E=g?null:React.createElement(P,null);return React.createElement(A.Provider,{value:w},a&&k,t,E)}},,,,,,,function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return b}));var r=n(6),o=n.n(r),a=n(22),c=n.n(a),i=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}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}var l,f,p={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(l=i.CURRENCY.symbol,f=i.CURRENCY.symbolPosition,{left:l,left_space:" "+l,right:"",right_space:""}[f]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},d=function(e){if(!e||"object"!==c()(e))return p;var t=e.currency_code,n=e.currency_symbol,r=e.currency_thousand_separator,o=e.currency_decimal_separator,a=e.currency_minor_unit,i=e.currency_prefix,u=e.currency_suffix;return{code:t||"USD",symbol:n||"$",thousandSeparator:"string"==typeof r?r:",",decimalSeparator:"string"==typeof o?o:".",minorUnit:Number.isFinite(a)?a:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof u?u:""}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},p),e)},b=function(e,t){if(""===e||void 0===e)return"";var n=parseInt(e,10);if(!Number.isFinite(n))return"";var r=m(t),o=n/Math.pow(10,r.minorUnit),a=r.prefix+o+r.suffix,c=document.createElement("textarea");return c.innerHTML=a,c.value}},function(e,t,n){"use strict";var r=n(0),o=n(2),a=n(16),c=n(13);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(a.SCHEMA_STORE_KEY),o=r.isResolving,c=r.hasFinishedResolution,i=t.dispatch(a.SCHEMA_STORE_KEY),u=i.receiveRoutes,s=i.startResolution,l=i.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(5);var r=n(4),o=n.n(r),a=n(28),c=n(99);n(139);t.a=Object(c.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,c=e.label,i=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(a.a,{label:c,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:i,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),a=n(32),c=n.n(a),i=n(33),u=n.n(i),s=n(19),l=n.n(s),f=n(34),p=n.n(f),d=n(35),m=n.n(d),b=n(24),h=n.n(b),g=n(6),v=n.n(g),y=n(3);n(155);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 m()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return c()(this,r),e=n.call(this),v()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),v()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),v()(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(y.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){},function(e,t,n){"use strict";var r=n(6),o=n.n(r),a=n(12),c=n.n(a),i=n(3);n(5);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,a=c()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.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},a))}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t){var n=[];return Object.keys(e).forEach((function(r){if(void 0!==t[r])switch(e[r].type){case"boolean":n[r]="false"!==t[r]&&!1!==t[r];break;case"number":n[r]=parseInt(t[r],10);break;case"array":case"object":n[r]=JSON.parse(t[r]);break;default:n[r]=t[r]}else n[r]=e[r].default})),n}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(0),o=n(7),a=n(4),c=n.n(a),i=n(1),u=n(68),s=n(10),l=n(29);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}var m=n(65),b=n(14);function h(e,t){return!t||"object"!==Object(m.a)(t)&&"function"!=typeof t?Object(b.a)(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(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&&v(e,t)}var O=n(27),j=n(48),w=n(50),k=n(83),E=n.n(k),_=n(21),S=n(26),R=function(){return"rtl"===document.documentElement.dir};function x(e,t,n,r){var o=t.width;"left"===n&&R()?n="right":"right"===n&&R()&&(n="left");var a,c=Math.round(e.left+e.width/2),i={popoverLeft:c,contentWidth:(c-o/2>0?o/2:c)+(c+o/2>window.innerWidth?window.innerWidth-c:o/2)},u="middle"===r?e.left:c,s={popoverLeft:u,contentWidth:u-o>0?o:u},l="middle"===r?e.right:c,f={popoverLeft:l,contentWidth:l+o>window.innerWidth?window.innerWidth-l:o},p=null;if("center"===n&&i.contentWidth===o)a="center";else if("left"===n&&s.contentWidth===o)a="left";else if("right"===n&&f.contentWidth===o)a="right";else{var d="left"===(a=s.contentWidth>f.contentWidth?"left":"right")?s.contentWidth:f.contentWidth;p=d!==o?d:null}return{xAxis:a,popoverLeft:"center"===a?i.popoverLeft:"left"===a?s.popoverLeft:f.popoverLeft,contentWidth:p}}function C(e,t,n){var r,o=t.height,a=e.top+e.height/2,c={popoverTop:a,contentHeight:(a-o/2>0?o/2:a)+(a+o/2>window.innerHeight?window.innerHeight-a:o/2)},i={popoverTop:e.top,contentHeight:e.top-10-o>0?o:e.top-10},u={popoverTop:e.bottom,contentHeight:e.bottom+10+o>window.innerHeight?window.innerHeight-10-e.bottom:o},s=null;if("middle"===n&&c.contentHeight===o)r="middle";else if("top"===n&&i.contentHeight===o)r="top";else if("bottom"===n&&u.contentHeight===o)r="bottom";else{var l="top"===(r=i.contentHeight>u.contentHeight?"top":"bottom")?i.contentHeight:u.contentHeight;s=l!==o?l:null}return{yAxis:r,popoverTop:"middle"===r?c.popoverTop:"top"===r?i.popoverTop:u.popoverTop,contentHeight:s}}var N=n(36),P=Object(r.createContext)({focusHistory:[]}),T=P.Provider,I=P.Consumer;T.displayName="FocusReturnProvider",I.displayName="FocusReturnConsumer";r.Component;var A=Object(_.createHigherOrderComponent)((function e(t){if((a=t)instanceof r.Component||"function"==typeof a){var n=t;return e({})(n)}var a,c=t.onFocusReturn,i=void 0===c?o.stubTrue:c;return function(e){var t=function(t){function n(){var e;return f(this,n),(e=h(this,g(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 y(n,t),d(n,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,a=[].concat(Object(N.a)(o.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(N.a)(n)))),[e]);r=a.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(r.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(r.createElement)(e,this.props.childProps))}}]),n}(r.Component);return function(e){return Object(r.createElement)(I,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn"),D=Object(_.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return f(this,n),(e=h(this,g(n).apply(this,arguments))).focusContainRef=Object(r.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(b.a)(e)),e}return y(n,t),d(n,[{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(r.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(r.createElement)(e,this.props))}}]),n}(r.Component)}),"withConstrainedTabbing"),F=["button","submit"];var L=Object(_.createHigherOrderComponent)((function(e){return function(t){function n(){var e;return f(this,n),(e=h(this,g(n).apply(this,arguments))).bindNode=e.bindNode.bind(Object(b.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(b.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(b.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(b.a)(e)),e}return y(n,t),d(n,[{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(o.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(o.includes)(F,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(r.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(r.createElement)(e,Object(s.a)({ref:this.bindNode},this.props)))}}]),n}(r.Component)}),"withFocusOutside")(function(e){function t(){return f(this,t),h(this,g(t).apply(this,arguments))}return y(t,e),d(t,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),t}(r.Component));var M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,o=e.className,a=void 0===o?"lockscroll":o,c=0,i=0;function u(e){var t=n.scrollingElement||n.body;e&&(i=t.scrollTop);var r=e?"add":"remove";t.classList[r](a),n.documentElement.classList[r](a),e||(t.scrollTop=i)}function s(){0===c&&u(!0),++c}function l(){1===c&&u(!1),--c}return function(e){function t(){return f(this,t),h(this,g(t).apply(this,arguments))}return y(t,e),d(t,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),t}(r.Component)}();function V(e){e.stopPropagation()}var B=Object(r.forwardRef)((function(e,t){var n=e.children,o=Object(l.a)(e,["children"]);return Object(r.createElement)("div",Object(s.a)({},o,{ref:t,onMouseDown:V}),n)})),z=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),q=z.Provider,U=z.Consumer,H=(r.Component,0);function W(e){var t=e.name,n=e.children,a=e.registerFill,c=e.unregisterFill,i=function(e){var t=Object(r.useContext)(z),n=t.getSlot,o=t.subscribe,a=Object(r.useState)(n(e)),c=Object(O.a)(a,2),i=c[0],u=c[1];return Object(r.useEffect)((function(){return u(n(e)),o((function(){u(n(e))}))}),[e]),i}(t),u=Object(r.useRef)({name:t,children:n});return u.current.occurrence||(u.current.occurrence=++H),Object(r.useLayoutEffect)((function(){return a(t,u.current),function(){return c(t,u.current)}}),[]),Object(r.useLayoutEffect)((function(){u.current.children=n,i&&!i.props.bubblesVirtually&&i.forceUpdate()}),[n]),Object(r.useLayoutEffect)((function(){t!==u.current.name&&(c(u.current.name,u.current),u.current.name=t,a(t,u.current))}),[t]),i&&i.node&&i.props.bubblesVirtually?(Object(o.isFunction)(n)&&(n=n(i.props.fillProps)),Object(r.createPortal)(n,i.node)):null}var K=function(e){return Object(r.createElement)(U,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(W,Object(s.a)({},e,{registerFill:n,unregisterFill:o}))}))},Q=function(e){function t(){var e;return f(this,t),(e=h(this,g(t).apply(this,arguments))).bindNode=e.bindNode.bind(Object(b.a)(e)),e}return y(t,e),d(t,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){(0,this.props.unregisterSlot)(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:"render",value:function(){var e=this.props,t=e.children,n=e.name,a=e.bubblesVirtually,c=void 0!==a&&a,i=e.fillProps,u=void 0===i?{}:i,s=e.getFills,l=e.className;if(c)return Object(r.createElement)("div",{ref:this.bindNode,className:l});var f=Object(o.map)(s(n,this),(function(e){var t=e.occurrence,n=Object(o.isFunction)(e.children)?e.children(u):e.children;return r.Children.map(n,(function(e,n){if(!e||Object(o.isString)(e))return e;var a="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:a})}))})).filter(Object(o.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(o.isFunction)(t)?t(f):f)}}]),t}(r.Component),Y=function(e){return Object(r.createElement)(U,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,a=t.getFills;return Object(r.createElement)(Q,Object(s.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:a}))}))},G=n(46);var $=function(e){var t=e.type,n=e.options,r=void 0===n?{}:n,o=e.children;if("appear"===t){var a,i=r.origin,u=(void 0===i?"top":i).split(" "),s=Object(O.a)(u,2),l=s[0],f=s[1],p=void 0===f?"center":f;return o({className:c()("components-animate__appear",(a={},Object(G.a)(a,"is-from-"+p,"center"!==p),Object(G.a)(a,"is-from-"+l,"middle"!==l),a))})}if("slide-in"===t){var d=r.origin,m=void 0===d?"left":d;return o({className:c()("components-animate__slide-in","is-from-"+m)})}return o("loading"===t?{className:c()("components-animate__loading")}:{})},Z=D(A((function(e){return e.children})));function J(e,t){var n=window.getComputedStyle(t),r=n.paddingTop,o=n.paddingBottom,a=n.paddingLeft,c=n.paddingRight,i=r?parseInt(r,10):0,u=o?parseInt(o,10):0,s=a?parseInt(a,10):0,l=c?parseInt(c,10):0;return{x:e.left+s,y:e.top+i,width:e.width-s-l,height:e.height-i-u,left:e.left+s,right:e.right-l,top:e.top+i,bottom:e.bottom-u}}function X(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function ee(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function te(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var ne=function(e){var t=e.headerTitle,n=e.onClose,o=e.onKeyDown,a=e.children,i=e.className,u=e.noArrow,f=void 0!==u&&u,p=e.position,d=void 0===p?"top":p,m=(e.range,e.focusOnMount),b=void 0===m?"firstElement":m,h=e.anchorRef,g=e.shouldAnchorIncludePadding,v=e.anchorVerticalBuffer,y=e.anchorHorizontalBuffer,k=e.anchorRect,R=e.getAnchorRect,N=e.expandOnMobile,P=e.animate,T=void 0===P||P,I=e.onClickOutside,A=e.onFocusOutside,D=Object(l.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorVerticalBuffer","anchorHorizontalBuffer","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside"]),F=Object(r.useRef)(null),V=Object(r.useRef)(null),z=Object(r.useRef)(),q=Object(r.useRef)(),H=Object(_.useViewportMatch)("medium","<"),W=Object(r.useState)(),Q=Object(O.a)(W,2),Y=Q[0],G=Q[1],ne=N&&H;f=ne||f,Object(r.useEffect)((function(){var e=z.current,t=V.current;if(ne)return te(e,"is-without-arrow",f),X(e,"data-x-axis"),X(e,"data-y-axis"),ee(e,"top"),ee(e,"left"),ee(t,"maxHeight"),void ee(t,"maxWidth");var n=function(){var n=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)return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);var a=r.getBoundingClientRect();return o?a:J(a,r)}if(e.current){var c=e.current.parentNode,i=c.getBoundingClientRect();return o?i:J(i,c)}}(F,k,R,h,g);if(n){n=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return{x:e.left-n,y:e.top-t,width:e.width+2*n,height:e.height+2*t,left:e.left-n,right:e.right+n,top:e.top-t,bottom:e.bottom+t}}(n,v,y),q.current||(q.current=t.getBoundingClientRect());var r=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=n.split(" "),o=Object(O.a)(r,2),a=o[0],c=o[1],i=void 0===c?"center":c,u=C(e,t,a),s=x(e,t,i,u.yAxis);return Object(S.a)({},s,u)}(n,q.current,d),o=r.popoverTop,a=r.popoverLeft,c=r.xAxis,i=r.yAxis,u=r.contentHeight,s=r.contentWidth;te(e,"is-without-arrow",f||"center"===c&&"middle"===i),X(e,"data-x-axis",c),X(e,"data-y-axis",i),ee(e,"top","number"==typeof o?o+"px":""),ee(e,"left","number"==typeof a?a+"px":""),ee(t,"maxHeight","number"==typeof u?u+"px":""),ee(t,"maxWidth","number"==typeof s?s+"px":"");G(({left:"right",right:"left"}[c]||"center")+" "+({top:"bottom",bottom:"top"}[i]||"middle"))}},r=window.setTimeout(n),o=window.setInterval(n,500);return window.addEventListener("resize",n),window.addEventListener("scroll",n,!0),function(){window.clearTimeout(r),window.clearInterval(o),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0)}}),[ne,k,R,h,g,v,y,d]),function(e,t){Object(r.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)}}),[])}(b,V);var re=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)};var oe=Object(r.createElement)(L,{onFocusOutside:function(e){if(A)A(e);else if(I){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}}),E()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),I(t)}else n&&n()}},Object(r.createElement)($,{type:T&&Y?"appear":null,options:{origin:Y}},(function(e){var o=e.className;return Object(r.createElement)(B,Object(s.a)({className:c()("components-popover",i,o,{"is-expanded":ne,"is-without-arrow":f})},D,{onKeyDown:re,ref:z}),ne&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},t),Object(r.createElement)(ie,{className:"components-popover__close",icon:"no-alt",onClick:n})),Object(r.createElement)("div",{ref:V,className:"components-popover__content",tabIndex:"-1"},a))})));return b&&(oe=Object(r.createElement)(Z,null,oe)),Object(r.createElement)(U,null,(function(e){var t=e.getSlot;return t&&t("Popover")&&(oe=Object(r.createElement)(K,{name:"Popover"},oe)),Object(r.createElement)("span",{ref:F},oe,H&&N&&Object(r.createElement)(M,null))}))};ne.Slot=function(){return Object(r.createElement)(Y,{bubblesVirtually:!0,name:"Popover"})};var re=ne;var oe=function(e){var t,n,a=e.shortcut,c=e.className;return a?(Object(o.isString)(a)&&(t=a),Object(o.isObject)(a)&&(t=a.display,n=a.ariaLabel),Object(r.createElement)("span",{className:c,"aria-label":n},t)):null},ae=function(e){function t(){var e;return f(this,t),(e=h(this,g(t).apply(this,arguments))).delayedSetIsOver=Object(o.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return y(t,e),d(t,[{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===r.Children.count(n)){var o=r.Children.only(n);"function"==typeof o.props[e]&&o.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 a=Object(o.includes)(["focus","mouseenter"],r.type);a!==n.state.isOver&&(t?n.delayedSetIsOver(a):n.setState({isOver:a}))}}}},{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,o=e.text,a=e.shortcut;if(1!==r.Children.count(t))return t;var c=r.Children.only(t),i=this.state.isOver;return Object(r.cloneElement)(c,{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(r.concatChildren)(c.props.children,i&&Object(r.createElement)(re,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1},o,Object(r.createElement)(oe,{className:"components-tooltip__shortcut",shortcut:a})))})}}]),t}(r.Component),ce=n(78);var ie=Object(r.forwardRef)((function(e,t){var n=e.icon,a=e.children,i=e.label,f=e.className,p=e.tooltip,d=e.shortcut,m=e.labelPosition,b=e.size,h=Object(l.a)(e,["icon","children","label","className","tooltip","shortcut","labelPosition","size"]),g=c()("components-icon-button",f,{"has-text":a}),v=p||i,y=!h.disabled&&(p||d||!!i&&(!a||Object(o.isArray)(a)&&!a.length)&&!1!==p),O=Object(r.createElement)(u.a,Object(s.a)({"aria-label":i},h,{className:g,ref:t}),Object(r.createElement)(ce.a,{icon:n,size:b}),a);return y&&(O=Object(r.createElement)(ae,{text:v,shortcut:d,position:m},O)),O}));t.a=function(e){var t=e.className,n=e.status,a=e.children,s=e.onRemove,l=void 0===s?o.noop:s,f=e.isDismissible,p=void 0===f||f,d=e.actions,m=void 0===d?[]:d,b=e.__unstableHTML,h=c()(t,"components-notice","is-"+n,{"is-dismissible":p});return b&&(a=Object(r.createElement)(r.RawHTML,null,a)),Object(r.createElement)("div",{className:h},Object(r.createElement)("div",{className:"components-notice__content"},a,m.map((function(e,t){var n=e.className,o=e.label,a=e.noDefaultClasses,i=void 0!==a&&a,s=e.onClick,l=e.url;return Object(r.createElement)(u.a,{key:t,href:l,isDefault:!i&&!l,isLink:!i&&!!l,onClick:l?void 0:s,className:c()("components-notice__action",n)},o)}))),p&&Object(r.createElement)(ie,{className:"components-notice__dismiss",icon:"no-alt",label:Object(i.__)("Dismiss this notice"),onClick:l,tooltip:!1}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return Ve}));var r=n(37),o=n(11),a=n.n(o),c=n(12),i=n.n(c),u=(n(5),n(4)),s=n.n(u),l=n(1),f=n(0),p=n(8),d=n.n(p),m=n(13),b=n(79),h=n(16),g=n(15),v=n(66),y=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},O=function(e){var t=Object(m.useDispatch)(h.CART_STORE_KEY).addItemToCart,n=Object(b.a)(),r=n.cartItems,o=n.cartIsLoading,a=Object(v.a)(),c=a.addErrorNotice,i=a.removeNotice,u=Object(f.useState)(!1),s=d()(u,2),l=s[0],p=s[1],O=Object(f.useRef)(y(r,e));return Object(f.useEffect)((function(){var t=y(r,e);t!==O.current&&(O.current=t)}),[r,e]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:l,cartIsLoading:o,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;p(!0),t(e,n).then((function(e){!0===e&&i("add-to-cart")})).catch((function(e){c(Object(g.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){p(!1)}))}}},j=n(184),w=n(17),k=(n(141),function(e){var t=e.product,n=Object(f.useRef)(!0),r=t.id,o=t.permalink,c=t.add_to_cart,i=t.has_options,u=t.is_purchasable,p=t.is_in_stock,d=O(r),m=d.cartQuantity,b=d.addingToCart,h=d.addToCart;Object(f.useEffect)((function(){n.current?n.current=!1:Object(j.a)()}),[m]);var v=Number.isFinite(m)&&m>0,y=!i&&u&&p,w=Object(g.decodeEntities)((null==c?void 0:c.description)||""),k=v?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",m,"woo-gutenberg-products-block"),m):Object(g.decodeEntities)((null==c?void 0:c.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),E=y?"button":"a",_={};return y?_.onClick=function(){h()}:(_.href=o,_.rel="nofollow"),React.createElement(E,a()({"aria-label":w,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:b,added:v}),disabled:b},_),k)}),E=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})},_=function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=n.product||o.product;return React.createElement("div",{className:s()(t,"wp-block-button","wc-block-components-product-button","".concat(r,"__product-add-to-cart"))},a?React.createElement(k,{product:a}):React.createElement(E,null))},S=n(21),R=n(144),x=function(e){return function(t){return function(n){var r=Object(R.a)(e,n);return React.createElement(t,a()({},n,r))}}},C=n(6),N=n.n(C),P=n(9),T=n(28),I=(n(142),function(e){var t=e.className,n=e.align,r=i()(e,["className","align"]),o=Object(w.useInnerBlockLayoutContext)().parentClassName,a=Object(w.useProductDataContext)(),c=r.product||a.product;if(!c||!c.on_sale)return null;var u="string"==typeof n?"wc-block-components-product-sale-badge--align".concat(n):"";return React.createElement("div",{className:s()("wc-block-components-product-sale-badge",t,u,"".concat(o,"__product-onsale"))},React.createElement(T.a,{label:Object(l.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(l.__)("Product on sale","woo-gutenberg-products-block")}))});n(143);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){N()(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 F=function(){return React.createElement("img",{src:P.p,alt:""})},L=function(e){var t=e.image,n=e.onLoad,r=e.loaded,o=e.showFullSize,a=t||{},c=a.thumbnail,i=a.src,u=a.srcset,s=a.sizes,l={alt:a.alt,onLoad:n,hidden:!r,src:c};return o&&(l=D(D({},l),{},{src:i,srcSet:u,sizes:s})),React.createElement(React.Fragment,null,React.createElement("img",l),!r&&React.createElement(F,null))},M=function(e){var t=e.className,n=e.imageSizing,r=void 0===n?"full-size":n,o=e.productLink,a=void 0===o||o,c=e.showSaleBadge,u=e.saleBadgeAlign,l=void 0===u?"right":u,p=i()(e,["className","imageSizing","productLink","showSaleBadge","saleBadgeAlign"]),m=Object(w.useInnerBlockLayoutContext)().parentClassName,b=Object(w.useProductDataContext)(),h=p.product||b.product,g=Object(f.useState)(!1),v=d()(g,2),y=v[0],O=v[1];if(!h)return React.createElement("div",{className:s()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder","".concat(m,"__product-image"))},React.createElement(F,null));var j=(null==h?void 0:h.images)&&h.images.length?h.images[0]:null;return React.createElement("div",{className:s()(t,"wc-block-components-product-image","".concat(m,"__product-image"))},a?React.createElement("a",{href:h.permalink,rel:"nofollow"},!!c&&React.createElement(I,{align:l,product:h}),React.createElement(L,{image:j,onLoad:function(){return O(!0)},loaded:y,showFullSize:"cropped"!==r})):React.createElement(React.Fragment,null,!!c&&React.createElement(I,{align:l,product:h}),React.createElement(L,{image:j,onLoad:function(){return O(!0)},loaded:y,showFullSize:"cropped"!==r})))},V={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"}},B=Object(S.compose)(x(V))(M),z=n(31),q=n(121),U=(n(145),function(e){return e.price_range&&e.price_range.min_amount&&e.price_range.max_amount}),H=function(e){var t=e.currency,n=e.minAmount,r=e.maxAmount,o=Object(w.useInnerBlockLayoutContext)().parentClassName;return React.createElement("span",{className:s()("wc-block-components-product-price__value","".concat(o,"__product-price__value"))},React.createElement(z.a,{currency:t,value:n})," — ",React.createElement(z.a,{currency:t,value:r}))},W=function(e){var t=e.currency,n=e.price,r=e.regularPrice,o=Object(w.useInnerBlockLayoutContext)().parentClassName;return React.createElement(React.Fragment,null,r!==n&&React.createElement("del",{className:s()("wc-block-components-product-price__regular","".concat(o,"__product-price__regular"))},React.createElement(z.a,{currency:t,value:r})),React.createElement("span",{className:s()("wc-block-components-product-price__value","".concat(o,"__product-price__value"))},React.createElement(z.a,{currency:t,value:n})))},K=function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=n.product||o.product;if(!a)return React.createElement("div",{className:s()(t,"price","wc-block-components-product-price","".concat(r,"__product-price"))});var c=a.prices||{},u=Object(q.c)(c);return React.createElement("div",{className:s()(t,"price","wc-block-components-product-price","".concat(r,"__product-price"))},U(c)?React.createElement(H,{currency:u,minAmount:c.price_range.min_amount,maxAmount:c.price_range.max_amount}):React.createElement(W,{currency:u,price:c.price,regularPrice:c.regular_price}))},Q=(n(146),function(e){var t=parseFloat((null==e?void 0:e.average_rating)||0);return Number.isFinite(t)&&t>0?t:0}),Y=function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=n.product||o.product,c=Q(a);if(!c)return null;var u={width:c/5*100+"%"},f=Object(l.sprintf)(Object(l.__)("Rated %f out of 5","woo-gutenberg-products-block"),c);return React.createElement("div",{className:s()(t,"star-rating","wc-block-components-product-rating","".concat(r,"__product-rating"))},React.createElement("div",{className:s()("wc-block-components-product-rating__stars","".concat(r,"__product-rating__stars")),role:"img","aria-label":f},React.createElement("span",{style:u},f)))},G=n(85),$=n(2),Z=(n(147),function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=(Object(w.useProductDataContext)()||n).product;if(!o)return React.createElement("div",{className:s()(t,"wc-block-components-product-summary")});var a=o.short_description?o.short_description:o.description;if(!a)return null;var c=Object($.getSetting)("wordCountType","words");return React.createElement(G.a,{className:s()(t,"wc-block-components-product-summary","".concat(r,"__product-summary")),source:a,maxLength:150,countType:c})}),J=(n(148),function(e){var t=e.className,n=e.headingLevel,r=void 0===n?2:n,o=e.productLink,a=void 0===o||o,c=i()(e,["className","headingLevel","productLink"]),u=Object(w.useInnerBlockLayoutContext)().parentClassName,l=Object(w.useProductDataContext)(),f=c.product||l.product,p="h".concat(r);if(!f)return React.createElement(p,{className:s()(t,"wc-block-components-product-title","".concat(u,"__product-title"))});var d=Object(g.decodeEntities)(f.name);return React.createElement(p,{className:s()(t,"wc-block-components-product-title","".concat(u,"__product-title"))},a?React.createElement("a",{href:f.permalink,rel:"nofollow"},d):d)}),X={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0}},ee=Object(S.compose)(x(X))(J),te=(n(149),function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=(n.product||o.product||{}).sku||"";return a?React.createElement("div",{className:s()(t,"wc-block-components-product-sku","".concat(r,"__product-sku"))},Object(l.__)("SKU:","woo-gutenberg-products-block")," ",React.createElement("strong",null,a)):null}),ne=n(7),re=(n(150),function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=(Object(w.useProductDataContext)()||n||{}).product;return Object(ne.isEmpty)(o)||Object(ne.isEmpty)(o.categories)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-category-list","".concat(r,"__product-category-list"))},Object(l.__)("Categories:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(o.categories).map((function(e){var t=e.name,n=e.link,r=e.slug;return React.createElement("li",{key:"category-list-item-".concat(r)},React.createElement("a",{href:n},t))}))))}),oe=(n(151),function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=(Object(w.useProductDataContext)()||n||{}).product;return Object(ne.isEmpty)(o)||Object(ne.isEmpty)(o.tags)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-tag-list","".concat(r,"__product-tag-list"))},Object(l.__)("Tags:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(o.tags).map((function(e){var t=e.name,n=e.link,r=e.slug;return React.createElement("li",{key:"tag-list-item-".concat(r)},React.createElement("a",{href:n},t))}))))}),ae=(n(152),function(e){return Object(l.sprintf)(Object(l.__)("%d left in stock","woo-gutenberg-products-block"),e)}),ce=function(e,t){return t?Object(l.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(l.__)("In Stock","woo-gutenberg-products-block"):Object(l.__)("Out of Stock","woo-gutenberg-products-block")},ie=function(e){var t=e.className,n=i()(e,["className"]),r=Object(w.useInnerBlockLayoutContext)().parentClassName,o=Object(w.useProductDataContext)(),a=n.product||o.product||{};if(Object(ne.isEmpty)(a)||!a.is_purchasable)return null;var c=!!a.is_in_stock,u=a.low_stock_remaining,l=a.is_on_backorder;return React.createElement("div",{className:s()(t,"wc-block-components-product-stock-indicator","".concat(r,"__stock-indicator"),{"wc-block-components-product-stock-indicator--in-stock":c,"wc-block-components-product-stock-indicator--out-of-stock":!c,"wc-block-components-product-stock-indicator--low-stock":!!u,"wc-block-components-product-stock-indicator--available-on-backorder":!!l})},u?ae(u):ce(c,l))},ue=Object(f.createContext)({product:{},productId:0,variationId:0,variationData:{},cartItemData:{},quantity:1,minQuantity:1,maxQuantity:99,quantityInCart:0,setQuantity:function(e){},setVariationId:function(e){},setVariationData:function(e){},setCartItemData:function(e){},showFormElements:!1,formInitialized:!1,formDisabled:!0,formSubmitting:!1,onChange:function(){},onSubmit:function(){},onSuccess:function(){},onFail:function(){}}),se=function(){return Object(f.useContext)(ue)},le=function(e){var t=e.children,n=e.product,r=e.showFormElements,o=n.id||0,a=Object(f.useState)(0),c=d()(a,2),i=c[0],u=c[1],s=Object(f.useState)({}),l=d()(s,2),p=l[0],m=l[1],b=Object(f.useState)({}),h=d()(b,2),g=h[0],v=h[1],y=Object(f.useState)(1),w=d()(y,2),k=w[0],E=w[1],_=O(o),S=_.addToCart,R=_.addingToCart,x=_.cartQuantity,C=_.cartIsLoading;!function(e){var t=Object(f.useRef)(!0);Object(f.useEffect)((function(){t.current?t.current=!1:Object(j.a)()}),[e])}(x);var N=!C&&o>0,P=R||!N||!fe(n),T=Object(f.useCallback)((function(){S(k)}),[S,k]),I=Object(f.useCallback)((function(){}),[]),A=Object(f.useCallback)((function(){}),[]),D=Object(f.useCallback)((function(){}),[]),F={product:n,productId:o,variationId:i,variationData:p,cartItemData:g,quantity:k,minQuantity:1,maxQuantity:n.quantity_limit||99,quantityInCart:x,setQuantity:E,setVariationId:u,setVariationData:m,setCartItemData:v,showFormElements:r,formInitialized:N,formDisabled:P,formSubmitting:R,onChange:I,onSubmit:T,onSuccess:A,onFail:D};return React.createElement(ue.Provider,{value:F},t)},fe=function(e){var t=e.is_purchasable;return void 0!==t&&t},pe=(n(153),n(52)),de=n(140),me=n(185),be=function(e){var t=e.className,n=e.href,r=e.text;return React.createElement(pe.a,{className:t,href:n,rel:"nofollow"},r)},he=function(e){var t=e.className,n=e.quantityInCart,r=e.loading,o=e.disabled,a=e.onClick,c=Object(f.useState)(!1),i=d()(c,2),u=i[0],s=i[1];return React.createElement(pe.a,{className:t,disabled:o,showSpinner:r,onClick:function(){a(),s(!0)}},n>0?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",n,"woo-gutenberg-products-block"),n):Object(l.__)("Add to cart","woo-gutenberg-products-block"),u&&React.createElement(de.a,{srcElement:me.a,alt:Object(l.__)("Done","woo-gutenberg-products-block")}))},ge=function(){var e=se(),t=e.showFormElements,n=e.product,r=e.quantityInCart,o=e.formDisabled,a=e.formSubmitting,c=e.onSubmit,i=n.is_purchasable,u=void 0===i||i,s=n.has_options,f=n.add_to_cart,p=void 0===f?{url:"",text:""}:f;return!t&&s||!u?React.createElement(be,{className:"wc-block-components-product-add-to-cart-button",href:p.url,text:p.text||Object(l.__)("View Product","woo-gutenberg-products-block")}):React.createElement(he,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:r,disabled:o,loading:a,onClick:c})},ve=function(e){var t=e.disabled,n=e.min,r=e.max,o=e.value,a=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:n,max:r,hidden:1===r,disabled:t,onChange:function(e){a(e.target.value)}})},ye=function(e){var t=e.reason,n=void 0===t?Object(l.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},n)},Oe=function(){var e=se(),t=e.product,n=e.quantity,r=e.minQuantity,o=e.maxQuantity,a=e.setQuantity,c=e.formDisabled;return t.id&&!t.is_purchasable?React.createElement(ye,null):t.id&&!t.is_in_stock?React.createElement(ye,{reason:Object(l.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(ve,{value:n,min:r,max:o,disabled:c,onChange:a}),React.createElement(ge,null))},je=(n(154),n(57)),we=n.n(je),ke=n(96),Ee={value:"",label:Object(l.__)("Select an option","woo-gutenberg-products-block")},_e=function(e){var t=e.attributeName,n=e.options,r=void 0===n?[]:n,o=e.selected,a=void 0===o?"":o,c=e.onChange,i=void 0===c?function(){}:c;return React.createElement(ke.SelectControl,{className:"wc-block-components-product-add-to-cart-attribute-picker__select",label:Object(g.decodeEntities)(t),value:a||"",options:[Ee].concat(we()(r)),onChange:i})},Se=function(e){var t=e.selectedAttributes,n=e.variationAttributes,r=e.attributeNames;return Object.keys(n).filter((function(e){return r.every((function(r){var o=t[r]||"",a=n[e][r];return""===o||(null===a||a===o)}))}))};function Re(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 xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){N()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ce=function(e){var t=e.attributes,n=e.variationAttributes,r=Object(f.useState)(0),o=d()(r,2),a=o[0],c=o[1],i=Object(f.useState)([]),u=d()(i,2),s=u[0],l=u[1],p=Object.keys(t),m=Object.values(s).filter(Boolean).length>0,b=Object.values(s).filter((function(e){return""!==e})).length===p.length,h=Object(f.useMemo)((function(){var e=[];return p.forEach((function(r){var o=t[r],a=p.filter((function(e){return e!==r})),c=m?Se({selectedAttributes:s,variationAttributes:n,attributeNames:a}):null,i=null!==c?c.map((function(e){return n[e][r]})):null;e[r]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var n=e.name,r=e.slug;return null===t||t.includes(null)||t.includes(r)?{value:r,label:n}:null})).filter(Boolean)}(o.terms,i)})),e}),[t,n,p,s,m]);return Object(f.useEffect)((function(){if(b){var e=Se({selectedAttributes:s,variationAttributes:n,attributeNames:p});c(e[0]||0)}else c(0)}),[s,n,p,b]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},p.map((function(e){return React.createElement(_e,{key:e,attributeName:e,options:h[e],selected:s[e],onChange:function(t){l(xe(xe({},s),{},N()({},e,t)))}})})),React.createElement("p",null,"Matched variation ID: ",a))},Ne=function(e){var t=e.product,n=t.attributes,r=void 0===n?{}:n,o=t.variations,a=void 0===o?[]:o,c=function(e){return e?Object(ne.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):[]}(r),i=function(e){if(!e)return{};var t={};return e.forEach((function(e){var n=e.id,r=e.attributes;t[n]=r.reduce((function(e,t){var n=t.name,r=t.value;return e[n]=r,e}),[])})),t}(a);return 0===Object.keys(c).length||0===i.length?null:React.createElement(Ce,{attributes:c,variationAttributes:i})},Pe=function(){var e=se(),t=e.product,n=e.quantity,r=e.minQuantity,o=e.maxQuantity,a=e.setQuantity,c=e.formDisabled;return t.id&&!t.is_purchasable?React.createElement(ye,null):t.id&&!t.is_in_stock?React.createElement(ye,{reason:Object(l.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Ne,{product:t}),React.createElement(ve,{value:n,min:r,max:o,disabled:c,onChange:a}),React.createElement(ge,null))},Te=function(){return React.createElement(ge,null)},Ie=function(){return React.createElement(ke.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Ae=function(){return React.createElement(Ie,null)},De=function(e){var t=e.productType;return"variable"===t?React.createElement(Pe,null):"grouped"===t?React.createElement(Ae,null):"external"===t?React.createElement(Te,null):"simple"===t||"variation"===t?React.createElement(Oe,null):null},Fe=function(e){var t=e.className,n=e.showFormElements,r=i()(e,["className","showFormElements"]),o=Object(w.useProductDataContext)(),a=r.product||o.product||{},c=s()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(ne.isEmpty)(a)});return React.createElement(le,{product:a,showFormElements:n},React.createElement("div",{className:c},React.createElement(React.Fragment,null,n?React.createElement(De,{productType:a.type||"simple"}):React.createElement(ge,null))))},Le={showFormElements:{type:"boolean",default:!1}},Me=Object(S.compose)(x(Le))(Fe);Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:K}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:B}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:ee}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Y}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:_}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Z}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:I}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:te}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:re}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:oe}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:ie}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Me});var Ve=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),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,n.current]),n.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=window.Event||null,o=function(){if("function"==typeof r){var e=new r("wc_fragment_refresh",{bubbles:!0,cancelable:!0});document.body.dispatchEvent(e)}else{var t=document.createEvent("Event");t.initEvent("wc_fragment_refresh",!0,!0),document.body.dispatchEvent(t)}}},function(e,t,n){"use strict";var r=n(73),o=React.createElement(r.a,{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=o},,,,,,,,,,,,,,function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(122),o=n(114),a=n(103),c=n(32),i=n.n(c),u=n(33),s=n.n(u),l=n(34),f=n.n(l),p=n(35),d=n.n(p),m=n(24),b=n.n(m),h=n(3),g=(n(5),n(8)),v=n.n(g),y=n(0),O=n(22),j=n.n(O),w=n(12),k=n.n(w),E=n(6),_=n.n(E),S=n(1),R=n(7),x=n(4),C=n.n(x),N=n(28),P=(n(201),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,a=e.onPageChange,c=e.totalPages,i=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),a=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(a-t))),2),maxIndex:a}}(o,t,c),u=i.minIndex,s=i.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==c),p=n&&Boolean(u>3),d=n&&Boolean(s<c-2);l&&3===u&&(u-=1),f&&s===c-2&&(s+=1);var m=[];if(u&&s)for(var b=u;b<=s;b++)m.push(b);return React.createElement("div",{className:"wc-block-pagination wc-block-components-pagination"},React.createElement(N.a,{screenReaderLabel:Object(S.__)("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 a(t-1)},title:Object(S.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(N.a,{label:"<",screenReaderLabel:Object(S.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:C()("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 a(1)},disabled:1===t},React.createElement(N.a,{label:1,screenReaderLabel:Object(S.sprintf)(Object(S.__)("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(S.__)("…","woo-gutenberg-products-block")),m.map((function(e){return React.createElement("button",{key:e,className:C()("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 a(e)},disabled:t===e},React.createElement(N.a,{label:e,screenReaderLabel:Object(S.sprintf)(Object(S.__)("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(S.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:C()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===c,"wc-block-components-pagination__page--active":t===c}),onClick:function(){return a(c)},disabled:t===c},React.createElement(N.a,{label:c,screenReaderLabel:Object(S.sprintf)(Object(S.__)("Page %d","woo-gutenberg-products-block"),c)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return a(t+1)},title:Object(S.__)("Next page","woo-gutenberg-products-block"),disabled:t>=c},React.createElement(N.a,{label:">",screenReaderLabel:Object(S.__)("Next page","woo-gutenberg-products-block")})))});P.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var T=P,I=n(127),A=(n(200),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(I.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(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:r,screenReaderLabel:Object(S.__)("Order products by","woo-gutenberg-products-block"),value:o})}),D=n(17),F=n(99),L=n(11),M=n.n(L),V=n(177),B=Object(F.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,a=Object(D.useInnerBlockLayoutContext)(),c=a.parentClassName,i=a.parentName,u=0===Object.keys(t).length,s=C()("".concat(c,"__product"),{"is-loading":u,"wc-block-layout--is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var a=Object(V.a)(t);return r.map((function(r,c){var i=v()(r,2),u=i[0],s=i[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=a[u];if(!p)return null;var d=n.id||0,m=["layout",u,c,o,d];return React.createElement(p,M()({key:m.join("_")},l,{children:f,product:n}))}))}}(i,t,o,r))})),z=n(98),q=n(109),U=n(16),H=n(13),W=n(39);function K(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 Q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){_()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e){var t={namespace:"/wc/store",resourceName:"products"},n=Object(q.a)(Q(Q({},t),{},{query:e})),r=n.results,o=n.isLoading,a=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,a=void 0===o?[]:o,c=t.query,i=void 0===c?{}:c;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)(i),s=Object(W.a)(a),l=Object(H.useSelect)((function(t){var o=t(U.COLLECTIONS_STORE_KEY),a=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,a),isLoading:o.hasFinishedResolution("getCollectionHeader",a)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",Q(Q({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(a,10),productsLoading:o}},G=n(183),$=n(129),Z=n(43),J=(n(199),n(140)),X=n(73),ee=React.createElement(X.a,{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"})),te=function(){var e=Object(D.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement(J.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(S.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(S.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ne=React.createElement(X.a,{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"})),re=function(e){var t=e.resetCallback,n=void 0===t?function(){}:t,r=Object(D.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement(J.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ne,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(S.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(S.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(S.__)("Reset Search","woo-gutenberg-products-block")))};function oe(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 ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){_()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce=Object($.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,a=e.sortValue,c=e.scrollToTop,i=Object(z.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,a=r.rows;return ae(ae({},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*a,page:n})}({attributes:t,sortValue:a,currentPage:n})),u=v()(i,1)[0],s=Y(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(D.useInnerBlockLayoutContext)().parentClassName,m=function(e){e.order,e.orderby,e.page,e.per_page;return k()(e,["order","orderby","page","per_page"])}(u),b=Object(z.b)("attributes",[]),h=v()(b,2),g=h[0],O=h[1],w=Object(z.b)("min_price"),E=v()(w,2),_=E[0],x=E[1],N=Object(z.b)("max_price"),P=v()(N,2),I=P[0],F=P[1],L=Object(G.a)({totalQuery:m,totalProducts:f},(function(e){var t=e.totalQuery,n=e.totalProducts,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.totalQuery;return!Object(R.isEqual)(t,o)&&Number.isFinite(n)})),M="object"===j()(L)&&Object(R.isEqual)(m,L.totalQuery);Object(y.useEffect)((function(){M||(r(1),L&&function(e){Number.isFinite(e)&&(0===e?Object(Z.speak)(Object(S.__)("No products found","woo-gutenberg-products-block")):Object(Z.speak)(Object(S.sprintf)(Object(S._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[u]);var V,q,U,H,W,K=t.contentVisibility,Q=t.columns*t.rows,$=!Number.isFinite(f)&&M?Math.ceil(L.totalProducts/Q):Math.ceil(f/Q),J=l.length?l:Array.from({length:Q}),X=0!==l.length||p,ee=g.length>0||Number.isFinite(_)||Number.isFinite(I);return React.createElement("div",{className:(V=t.columns,q=t.rows,U=t.alignButtons,H=t.align,W=void 0!==H?"align"+H:"",C()(d,W,"has-"+V+"-columns",{"has-multiple-rows":q>1,"has-aligned-buttons":U}))},K.orderBy&&X&&React.createElement(A,{onChange:o,value:a}),!X&&ee&&React.createElement(re,{resetCallback:function(){O([]),x(null),F(null)}}),!X&&!ee&&React.createElement(te,null),X&&React.createElement("ul",{className:"".concat(d,"__products")},J.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(B,{key:e.id||n,attributes:t,product:e})}))),$>1&&React.createElement(T,{currentPage:n,onPageChange:function(e){c({focusableSelector:"a, button"}),r(e)},totalPages:$}))})),ie=function(e){var t=e.attributes,n=Object(y.useState)(1),r=v()(n,2),o=r[0],a=r[1],c=Object(y.useState)(t.orderby),i=v()(c,2),u=i[0],s=i[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return React.createElement(ce,{attributes:t,currentPage:o,onPageChange:function(e){a(e)},onSortChange:function(e){var t=e.target.value;s(t),a(1)},sortValue:u})},ue=n(9),se=React.createElement("img",{src:ue.A+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}});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=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 fe=function(e){f()(n,e);var t=le(n);function n(){return i()(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?se:React.createElement(D.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ie,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(a.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(fe,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', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wp-a11y', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wp-a11y', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '16efe84868a234e290d6c5ceeff3dfd3');
|
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],u=t[1],l=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 u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(s&&s(t);p.length;)p.shift()();return o.push.apply(o,l||[]),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 u=r[i];0!==c[u]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5: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.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="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var s=u;return o.push([855,2,0,1]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},106:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(8),c=r.n(n),o=r(211),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 u(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 l=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,l=Object(a.useRef)(t);Object(a.useEffect)((function(){l.current=t}),[t]);var s=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return l.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l.current.map((function(t){return null!==e&&t.status!==e||n(t.id),!0}))},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,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,u({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return u(u(u({notices:t},s),b),{},{setIsSuppressed:i})}},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(41),c=r(36),o=r(209),a=r(30),i=r(6),u={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(o.b)(),r=t.isEditor,l=t.previewData,s=(null==l?void 0:l.previewCart)||{},b=e.shouldSelect,p=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!b)return u;if(r)return{cartCoupons:s.coupons,cartItems:s.items,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:[],cartTotals:s.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:s.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:function(){}};var o=e(n.CART_STORE_KEY),l=o.getCartData(),p=o.getCartErrors(),d=o.getCartTotals(),m=!o.hasFinishedResolution("getCartData"),g=o.areShippingRatesLoading(),f=c(n.CART_STORE_KEY).receiveCart,O=Object(i.mapValues)(l.shippingAddress,(function(e){return Object(a.decodeEntities)(e)}));return{cartCoupons:l.coupons,cartItems:l.items||[],cartItemsCount:l.itemsCount,cartItemsWeight:l.itemsWeight,cartNeedsPayment:l.needsPayment,cartNeedsShipping:l.needsShipping,cartItemErrors:l.errors||[],cartTotals:d,cartIsLoading:m,cartErrors:p,shippingAddress:O,shippingRates:l.shippingRates||[],shippingRatesLoading:g,hasShippingAddress:!!O.country,receiveCart:f}}),[b]);return p}},109:function(e,t){!function(){e.exports=this.wp.wordcount}()},131:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(60),a=r(161),i=r(3),u=r(22),l=r(37);t.a=function(e){var t=(Object(l.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(n.createElement)(u.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}},134:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),u=r.n(i),l=r(44),s=r(37);r(492);t.a=function(e){var t=e.className,r=e.align,n=c()(e,["className","align"]),i=Object(s.useInnerBlockLayoutContext)().parentClassName,b=Object(s.useProductDataContext)(),p=n.product||b.product;if(!p||!p.on_sale)return null;var d="string"==typeof r?"wc-block-components-product-sale-badge--align".concat(r):"";return Object(o.createElement)("div",{className:u()("wc-block-components-product-sale-badge",t,d,"".concat(i,"__product-onsale"))},Object(o.createElement)(l.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}},14:function(e,t){!function(){e.exports=this.wp.blocks}()},140:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},145:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(44),i=r(183);r(283);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,u=e.onChange,l=e.options,s=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:s,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:u,readOnly:b,value:p},l.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},147:function(e,t,r){"use strict";var n=r(23),c=r.n(n),o=r(26),a=r.n(o),i=r(24),u=r.n(i),l=r(25),s=r.n(l),b=r(12),p=r.n(b),d=r(0),m=r(6),g=r(1),f=r(4);function O(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)(f.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(f.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 s()(this,r)}}var v=function(e){u()(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)(O,{level:e}),title:Object(g.sprintf)(Object(g.__)("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)(f.Toolbar,{isCollapsed:n,icon:Object(d.createElement)(O,{level:a}),controls:Object(m.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},148:function(e,t,r){"use strict";var n=r(0),c=r(109),o=r(78),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,"")},u=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},l=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)(u(c,r))},s=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)(u(a,n));var l=a.match(/([\s]+)/g),s=l?l.length:0,b=c.slice(0,t+s);return Object(o.autop)(u(b,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,u=e.countType,b=void 0===u?"words":u,p=e.className,d=void 0===p?"":p,m=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 u=a(n),b=Object(c.count)(u,r);return b<=t?u:"words"===r?l(u,t):s(u,t,"characters_including_spaces"===r)}(t,i,b)}),[t,i,b]);return Object(n.createElement)(n.RawHTML,{className:d},m)}},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(11),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},16:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},161:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},166:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return d}));var n=r(11),c=r.n(n),o=r(41),a=r(36),i=r(0),u=r(97),l=r(6),s=r(58),b=function(e){var t=Object(u.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])]},p=function(e,t,r){var n=Object(u.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),l=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){l(r,e,t)}),[r,e])]},d=function(e,t){var r=Object(u.a)(),n=b(t=t||r),o=c()(n,2),a=o[0],p=o[1],d=Object(s.a)(e),m=Object(i.useRef)(!1);return Object(i.useEffect)((function(){p(Object(l.assign)({},a,d)),m.current=!0}),[d]),m.current?[a,p]:[e,p]}},168:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(5),o=Object(n.createElement)("img",{src:c.Q+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},189:function(e,t,r){"use strict";r.d(t,"c",(function(){return d})),r.d(t,"b",(function(){return m})),r.d(t,"a",(function(){return g}));var n=r(8),c=r.n(n),o=r(55),a=r.n(o),i=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}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}var s,b,p={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(s=i.CURRENCY.symbol,b=i.CURRENCY.symbolPosition,{left:s,left_space:" "+s,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},d=function(e){if(!e||"object"!==a()(e))return p;var t=e.currency_code,r=e.currency_symbol,n=e.currency_thousand_separator,c=e.currency_decimal_separator,o=e.currency_minor_unit,i=e.currency_prefix,u=e.currency_suffix;return{code:t||"USD",symbol:r||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(o)?o:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof u?u:""}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(l({},p),e)},g=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=m(t),c=r/Math.pow(10,n.minorUnit),o=n.prefix+c+n.suffix,a=document.createElement("textarea");return a.innerHTML=o,a.value}},191:function(e,t,r){"use strict";t.a={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0}}},192:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),u=r(30),l=r(37);r(489);t.a=function(e){var t=e.className,r=e.headingLevel,n=void 0===r?2:r,a=e.productLink,s=void 0===a||a,b=c()(e,["className","headingLevel","productLink"]),p=Object(l.useInnerBlockLayoutContext)().parentClassName,d=Object(l.useProductDataContext)(),m=b.product||d.product,g="h".concat(n);if(!m)return Object(o.createElement)(g,{className:i()(t,"wc-block-components-product-title","".concat(p,"__product-title"))});var f=Object(u.decodeEntities)(m.name);return Object(o.createElement)(g,{className:i()(t,"wc-block-components-product-title","".concat(p,"__product-title"))},s?Object(o.createElement)("a",{href:m.permalink,rel:"nofollow"},f):f)}},193:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),u=r(54),l=r(189),s=r(37),b=(r(490),function(e){return e.price_range&&e.price_range.min_amount&&e.price_range.max_amount}),p=function(e){var t=e.currency,r=e.minAmount,n=e.maxAmount,c=Object(s.useInnerBlockLayoutContext)().parentClassName;return Object(o.createElement)("span",{className:i()("wc-block-components-product-price__value","".concat(c,"__product-price__value"))},Object(o.createElement)(u.a,{currency:t,value:r})," — ",Object(o.createElement)(u.a,{currency:t,value:n}))},d=function(e){var t=e.currency,r=e.price,n=e.regularPrice,c=Object(s.useInnerBlockLayoutContext)().parentClassName;return Object(o.createElement)(o.Fragment,null,n!==r&&Object(o.createElement)("del",{className:i()("wc-block-components-product-price__regular","".concat(c,"__product-price__regular"))},Object(o.createElement)(u.a,{currency:t,value:n})),Object(o.createElement)("span",{className:i()("wc-block-components-product-price__value","".concat(c,"__product-price__value"))},Object(o.createElement)(u.a,{currency:t,value:r})))};t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(s.useInnerBlockLayoutContext)().parentClassName,a=Object(s.useProductDataContext)(),u=r.product||a.product;if(!u)return Object(o.createElement)("div",{className:i()(t,"price","wc-block-components-product-price","".concat(n,"__product-price"))});var m=u.prices||{},g=Object(l.c)(m);return Object(o.createElement)("div",{className:i()(t,"price","wc-block-components-product-price","".concat(n,"__product-price"))},b(m)?Object(o.createElement)(p,{currency:g,minAmount:m.price_range.min_amount,maxAmount:m.price_range.max_amount}):Object(o.createElement)(d,{currency:g,price:m.price,regularPrice:m.regular_price}))}},194: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"}}},195:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(15),u=r.n(i),l=r(0),s=(r(2),r(7)),b=r.n(s),p=r(5),d=r(37),m=r(134);r(493);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 f(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){c()(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 O=function(){return Object(l.createElement)("img",{src:p.C,alt:""})},j=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,o=t||{},a=o.thumbnail,i=o.src,u=o.srcset,s=o.sizes,b={alt:o.alt,onLoad:r,hidden:!n,src:a};return c&&(b=f(f({},b),{},{src:i,srcSet:u,sizes:s})),Object(l.createElement)(l.Fragment,null,Object(l.createElement)("img",b),!n&&Object(l.createElement)(O,null))};t.a=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,s=e.saleBadgeAlign,p=void 0===s?"right":s,g=u()(e,["className","imageSizing","productLink","showSaleBadge","saleBadgeAlign"]),f=Object(d.useInnerBlockLayoutContext)().parentClassName,v=Object(d.useProductDataContext)(),h=g.product||v.product,w=Object(l.useState)(!1),y=a()(w,2),_=y[0],k=y[1];if(!h)return Object(l.createElement)("div",{className:b()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder","".concat(f,"__product-image"))},Object(l.createElement)(O,null));var E=(null==h?void 0:h.images)&&h.images.length?h.images[0]:null;return Object(l.createElement)("div",{className:b()(t,"wc-block-components-product-image","".concat(f,"__product-image"))},o?Object(l.createElement)("a",{href:h.permalink,rel:"nofollow"},!!i&&Object(l.createElement)(m.a,{align:p,product:h}),Object(l.createElement)(j,{image:E,onLoad:function(){return k(!0)},loaded:_,showFullSize:"cropped"!==n})):Object(l.createElement)(l.Fragment,null,!!i&&Object(l.createElement)(m.a,{align:p,product:h}),Object(l.createElement)(j,{image:E,onLoad:function(){return k(!0)},loaded:_,showFullSize:"cropped"!==n})))}},196:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),u=r.n(i),l=r(37),s=(r(494),function(e){var t=parseFloat((null==e?void 0:e.average_rating)||0);return Number.isFinite(t)&&t>0?t:0});t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)(),b=r.product||i.product,p=s(b);if(!p)return null;var d={width:p/5*100+"%"},m=Object(a.sprintf)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),p);return Object(o.createElement)("div",{className:u()(t,"star-rating","wc-block-components-product-rating","".concat(n,"__product-rating"))},Object(o.createElement)("div",{className:u()("wc-block-components-product-rating__stars","".concat(n,"__product-rating__stars")),role:"img","aria-label":m},Object(o.createElement)("span",{style:d},m)))}},197:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(15),a=r.n(o),i=r(0),u=(r(2),r(7)),l=r.n(u),s=r(1),b=r(357),p=r(30),d=r(291),m=r(37),g=(r(495),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,u=t.has_options,m=t.is_purchasable,g=t.is_in_stock,f=Object(b.a)(n),O=f.cartQuantity,j=f.addingToCart,v=f.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.a)()}),[O]);var h=Number.isFinite(O)&&O>0,w=!u&&m&&g,y=Object(p.decodeEntities)((null==a?void 0:a.description)||""),_=h?Object(s.sprintf)(Object(s._n)("%d in cart","%d in cart",O,"woo-gutenberg-products-block"),O):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(s.__)("Add to cart","woo-gutenberg-products-block")),k=w?"button":"a",E={};return w?E.onClick=function(){v()}:(E.href=o,E.rel="nofollow"),Object(i.createElement)(k,c()({"aria-label":y,className:l()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:h}),disabled:j},E),_)}),f=function(){return Object(i.createElement)("button",{className:l()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};t.a=function(e){var t=e.className,r=a()(e,["className"]),n=Object(m.useInnerBlockLayoutContext)().parentClassName,c=Object(m.useProductDataContext)(),o=r.product||c.product;return Object(i.createElement)("div",{className:l()(t,"wp-block-button","wc-block-components-product-button","".concat(n,"__product-add-to-cart"))},o?Object(i.createElement)(g,{product:o}):Object(i.createElement)(f,null))}},198:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),u=r(148),l=r(3),s=r(37);r(496);t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(s.useInnerBlockLayoutContext)().parentClassName,a=(Object(s.useProductDataContext)()||r).product;if(!a)return Object(o.createElement)("div",{className:i()(t,"wc-block-components-product-summary")});var b=a.short_description?a.short_description:a.description;if(!b)return null;var p=Object(l.getSetting)("wordCountType","words");return Object(o.createElement)(u.a,{className:i()(t,"wc-block-components-product-summary","".concat(n,"__product-summary")),source:b,maxLength:150,countType:p})}},199:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),u=r.n(i),l=r(37);r(497);t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)(),s=(r.product||i.product||{}).sku||"";return s?Object(o.createElement)("div",{className:u()(t,"wc-block-components-product-sku","".concat(n,"__product-sku"))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,s)):null}},200:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),u=r.n(i),l=r(37),s=r(6);r(498);t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=(Object(l.useProductDataContext)()||r||{}).product;return Object(s.isEmpty)(i)||Object(s.isEmpty)(i.categories)?null:Object(o.createElement)("div",{className:u()(t,"wc-block-components-product-category-list","".concat(n,"__product-category-list"))},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(i.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))}))))}},201:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),u=r.n(i),l=r(37),s=r(6);r(499);t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=(Object(l.useProductDataContext)()||r||{}).product;return Object(s.isEmpty)(i)||Object(s.isEmpty)(i.tags)?null:Object(o.createElement)("div",{className:u()(t,"wc-block-components-product-tag-list","".concat(n,"__product-tag-list"))},Object(a.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(i.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))}))))}},202:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),u=r.n(i),l=r(37),s=r(6),b=(r(500),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.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,a=Object(l.useProductDataContext)(),i=r.product||a.product||{};if(Object(s.isEmpty)(i)||!i.is_purchasable)return null;var d=!!i.is_in_stock,m=i.low_stock_remaining,g=i.is_on_backorder;return Object(o.createElement)("div",{className:u()(t,"wc-block-components-product-stock-indicator","".concat(n,"__stock-indicator"),{"wc-block-components-product-stock-indicator--in-stock":d,"wc-block-components-product-stock-indicator--out-of-stock":!d,"wc-block-components-product-stock-indicator--low-stock":!!m,"wc-block-components-product-stock-indicator--available-on-backorder":!!g})},m?b(m):p(d,g))}},203:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1}}},204:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(41),c=r(36),o=r(0),a=r(150),i=r(58),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,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 m=Object(o.useRef)({results:[],isLoading:!0}),g=Object(i.a)(b),f=Object(i.a)(l),O=Object(a.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,g,f],a=c.getCollectionError.apply(c,o);return a&&O(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,f,g,d]);return null!==j&&(m.current=j),m.current}},205:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),u=r(11),l=r.n(u),s=r(357),b=r(291),p=Object(o.createContext)({product:{},productId:0,variationId:0,variationData:{},cartItemData:{},quantity:1,minQuantity:1,maxQuantity:99,quantityInCart:0,setQuantity:function(e){},setVariationId:function(e){},setVariationData:function(e){},setCartItemData:function(e){},showFormElements:!1,formInitialized:!1,formDisabled:!0,formSubmitting:!1,onChange:function(){},onSubmit:function(){},onSuccess:function(){},onFail:function(){}}),d=function(){return Object(o.useContext)(p)},m=function(e){var t=e.children,r=e.product,n=e.showFormElements,c=r.id||0,a=Object(o.useState)(0),i=l()(a,2),u=i[0],d=i[1],m=Object(o.useState)({}),f=l()(m,2),O=f[0],j=f[1],v=Object(o.useState)({}),h=l()(v,2),w=h[0],y=h[1],_=Object(o.useState)(1),k=l()(_,2),E=k[0],P=k[1],C=Object(s.a)(c),S=C.addToCart,N=C.addingToCart,x=C.cartQuantity,D=C.cartIsLoading;!function(e){var t=Object(o.useRef)(!0);Object(o.useEffect)((function(){t.current?t.current=!1:Object(b.a)()}),[e])}(x);var B=!D&&c>0,L=N||!B||!g(r),R=Object(o.useCallback)((function(){S(E)}),[S,E]),I=Object(o.useCallback)((function(){}),[]),T=Object(o.useCallback)((function(){}),[]),z=Object(o.useCallback)((function(){}),[]),V={product:r,productId:c,variationId:u,variationData:O,cartItemData:w,quantity:E,minQuantity:1,maxQuantity:r.quantity_limit||99,quantityInCart:x,setQuantity:P,setVariationId:d,setVariationData:j,setCartItemData:y,showFormElements:n,formInitialized:B,formDisabled:L,formSubmitting:N,onChange:I,onSubmit:R,onSuccess:T,onFail:z};return Object(o.createElement)(p.Provider,{value:V},t)},g=function(e){var t=e.is_purchasable;return void 0!==t&&t},f=r(37),O=r(6),j=(r(352),r(1)),v=r(10),h=r.n(v),w=r(295),y=(r(501),function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,a=e.children,u=c()(e,["className","showSpinner","children"]),l=i()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(o.createElement)(w.a,h()({className:l},u),n&&Object(o.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(o.createElement)("span",{className:"wc-block-components-button__text"},a))}),_=r(60),k=r(502),E=function(e){var t=e.className,r=e.href,n=e.text;return Object(o.createElement)(y,{className:t,href:r,rel:"nofollow"},n)},P=function(e){var t=e.className,r=e.quantityInCart,n=e.loading,c=e.disabled,a=e.onClick,i=Object(o.useState)(!1),u=l()(i,2),s=u[0],b=u[1];return Object(o.createElement)(y,{className:t,disabled:c,showSpinner:n,onClick:function(){a(),b(!0)}},r>0?Object(j.sprintf)(Object(j._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(j.__)("Add to cart","woo-gutenberg-products-block"),s&&Object(o.createElement)(_.a,{srcElement:k.a,alt:Object(j.__)("Done","woo-gutenberg-products-block")}))},C=function(){var e=d(),t=e.showFormElements,r=e.product,n=e.quantityInCart,c=e.formDisabled,a=e.formSubmitting,i=e.onSubmit,u=r.is_purchasable,l=void 0===u||u,s=r.has_options,b=r.add_to_cart,p=void 0===b?{url:"",text:""}:b;return!t&&s||!l?Object(o.createElement)(E,{className:"wc-block-components-product-add-to-cart-button",href:p.url,text:p.text||Object(j.__)("View Product","woo-gutenberg-products-block")}):Object(o.createElement)(P,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:n,disabled:c,loading:a,onClick:i})},S=function(e){var t=e.disabled,r=e.min,n=e.max,c=e.value,a=e.onChange;return Object(o.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:c,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){a(e.target.value)}})},N=function(e){var t=e.reason,r=void 0===t?Object(j.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(o.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},x=function(){var e=d(),t=e.product,r=e.quantity,n=e.minQuantity,c=e.maxQuantity,a=e.setQuantity,i=e.formDisabled;return t.id&&!t.is_purchasable?Object(o.createElement)(N,null):t.id&&!t.is_in_stock?Object(o.createElement)(N,{reason:Object(j.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,{value:r,min:n,max:c,disabled:i,onChange:a}),Object(o.createElement)(C,null))},D=(r(503),r(8)),B=r.n(D),L=r(62),R=r.n(L),I=r(30),T=r(4),z={value:"",label:Object(j.__)("Select an option","woo-gutenberg-products-block")},V=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,c=e.selected,a=void 0===c?"":c,i=e.onChange,u=void 0===i?function(){}:i;return Object(o.createElement)(T.SelectControl,{className:"wc-block-components-product-add-to-cart-attribute-picker__select",label:Object(I.decodeEntities)(t),value:a||"",options:[z].concat(R()(n)),onChange:u})},M=function(e){var t=e.selectedAttributes,r=e.variationAttributes,n=e.attributeNames;return Object.keys(r).filter((function(e){return n.every((function(n){var c=t[n]||"",o=r[e][n];return""===c||(null===o||o===c)}))}))};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 H(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){B()(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 F=function(e){var t=e.attributes,r=e.variationAttributes,n=Object(o.useState)(0),c=l()(n,2),a=c[0],i=c[1],u=Object(o.useState)([]),s=l()(u,2),b=s[0],p=s[1],d=Object.keys(t),m=Object.values(b).filter(Boolean).length>0,g=Object.values(b).filter((function(e){return""!==e})).length===d.length,f=Object(o.useMemo)((function(){var e=[];return d.forEach((function(n){var c=t[n],o=d.filter((function(e){return e!==n})),a=m?M({selectedAttributes:b,variationAttributes:r,attributeNames:o}):null,i=null!==a?a.map((function(e){return r[e][n]})):null;e[n]=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:r}:null})).filter(Boolean)}(c.terms,i)})),e}),[t,r,d,b,m]);return Object(o.useEffect)((function(){if(g){var e=M({selectedAttributes:b,variationAttributes:r,attributeNames:d});i(e[0]||0)}else i(0)}),[b,r,d,g]),Object(o.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},d.map((function(e){return Object(o.createElement)(V,{key:e,attributeName:e,options:f[e],selected:b[e],onChange:function(t){p(H(H({},b),{},B()({},e,t)))}})})),Object(o.createElement)("p",null,"Matched variation ID: ",a))},Q=function(e){var t=e.product,r=t.attributes,n=void 0===r?{}:r,c=t.variations,a=void 0===c?[]:c,i=function(e){return e?Object(O.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):[]}(n),u=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t[r]=n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),[])})),t}(a);return 0===Object.keys(i).length||0===u.length?null:Object(o.createElement)(F,{attributes:i,variationAttributes:u})},U=function(){var e=d(),t=e.product,r=e.quantity,n=e.minQuantity,c=e.maxQuantity,a=e.setQuantity,i=e.formDisabled;return t.id&&!t.is_purchasable?Object(o.createElement)(N,null):t.id&&!t.is_in_stock?Object(o.createElement)(N,{reason:Object(j.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(Q,{product:t}),Object(o.createElement)(S,{value:r,min:n,max:c,disabled:i,onChange:a}),Object(o.createElement)(C,null))},q=function(){return Object(o.createElement)(C,null)},Y=function(){return Object(o.createElement)(T.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},G=function(){return Object(o.createElement)(Y,null)},K=function(e){var t=e.productType;return"variable"===t?Object(o.createElement)(U,null):"grouped"===t?Object(o.createElement)(G,null):"external"===t?Object(o.createElement)(q,null):"simple"===t||"variation"===t?Object(o.createElement)(x,null):null};t.a=function(e){var t=e.className,r=e.showFormElements,n=c()(e,["className","showFormElements"]),a=Object(f.useProductDataContext)(),u=n.product||a.product||{},l=i()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(O.isEmpty)(u)});return Object(o.createElement)(m,{product:u,showFormElements:r},Object(o.createElement)("div",{className:l},Object(o.createElement)(o.Fragment,null,r?Object(o.createElement)(K,{productType:u.type||"simple"}):Object(o.createElement)(C,null))))}},209: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(36),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,u=void 0===i?{}:i,l={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:u};return Object(n.createElement)(o.Provider,{value:l},t)}},21:function(e,t){!function(){e.exports=this.wp.compose}()},211:function(e,t,r){"use strict";r.d(t,"b",(function(){return _})),r.d(t,"a",(function(){return k}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),u=(r(2),r(36)),l=r(10),s=r.n(l),b=r(7),p=r.n(b),d=r(900),m=(r(284),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""}),g=function(e){var t=e.className,r=e.notices,n=_().removeNotice,c=p()(t,"wc-block-components-notices"),o=r.filter((function(e){return"snackbar"!==e.type}));return o.length?Object(i.createElement)("div",{className:c},o.map((function(e){return Object(i.createElement)(d.a,s()({key:"store-notice-"+e.id},e,{className:p()("wc-block-components-notices__notice","woocommerce-message",m(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)}))):null},f=r(904),O=r(106),j=r(209),v=function(){var e=Object(j.b)().isEditor,t=Object(O.a)(),r=t.notices,n=t.removeNotice,c=r.filter((function(e){return"snackbar"===e.type}));return e?null:Object(i.createElement)(f.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:n})};function h(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?h(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),_=function(){return Object(i.useContext)(y)},k=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,s=void 0===l?"wc/core":l,b=Object(u.useDispatch)("core/notices"),p=b.createNotice,d=b.removeNotice,m=Object(i.useState)(!1),f=a()(m,2),O=f[0],j=f[1],h=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]:{};p(e,t,w(w({},r),{},{context:r.context||s}))}),[p,s]),_=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;d(e,t)}),[d,s]),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]:{};h("default",e,w(w({},t),{},{type:"snackbar"}))}),[h]),E={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(s)}}),[s]).notices,createNotice:h,createSnackbarNotice:k,removeNotice:_,context:s,setIsSuppressed:j},P=O?null:Object(i.createElement)(g,{className:n,notices:E.notices}),C=O?null:Object(i.createElement)(v,null);return Object(i.createElement)(y.Provider,{value:E},o&&P,t,C)}},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},230:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(15),a=r.n(o),i=r(0),u=r(59),l=r(7),s=r.n(l),b=function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]),o=s()("dashicon","dashicons-arrow-down-alt2",t);return Object(i.createElement)(u.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:o,width:r,height:r},n),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},p=function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]),o=s()("dashicon","dashicons-arrow-down-alt2",t);return Object(i.createElement)(u.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:o,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"}))};t.a=function(e){let t=function(){return null};switch(e.icon){case"arrow-down-alt2":t=b;break;case"no-alt":t=p}return Object(i.createElement)(t,{size:e.size||20,className:e.className})}},254:function(e,t){!function(){e.exports=this.wp.deprecated}()},255:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(23),a=r.n(o),i=r(26),u=r.n(i),l=r(20),s=r.n(l),b=r(24),p=r.n(b),d=r(25),m=r.n(d),g=r(12),f=r.n(g),O=r(8),j=r.n(O),v=r(0),h=r(9);r(505);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 r,n=f()(e);if(t){var c=f()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return m()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=w(n);function n(){var e;return a()(this,n),e=r.call(this),j()(s()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(s()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(s()(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 u()(n,[{key:"render",value:function(){return Object(v.createElement)(h.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}},291:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=window.Event||null,c=function(){if("function"==typeof n){var e=new n("wc_fragment_refresh",{bubbles:!0,cancelable:!0});document.body.dispatchEvent(e)}else{var t=document.createEvent("Event");t.initEvent("wc_fragment_refresh",!0,!0),document.body.dispatchEvent(t)}}},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},357:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(11),c=r.n(n),o=r(0),a=r(36),i=r(107),u=r(41),l=r(30),s=r(106),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)(u.CART_STORE_KEY).addItemToCart,r=Object(i.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(s.a)(),m=d.addErrorNotice,g=d.removeNotice,f=Object(o.useState)(!1),O=c()(f,2),j=O[0],v=O[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&&g("add-to-cart")})).catch((function(e){m(Object(l.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},36:function(e,t){!function(){e.exports=this.wp.data}()},37:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},44:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r(7),u=r.n(i);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 s(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 b=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,l=null!=r,b=null!=n;return!l&&b?(t=c||"span",i=s(s({},i),{},{className:u()(i.className,"screen-reader-text")}),Object(o.createElement)(t,i,n)):(t=c||a.Fragment,l&&b&&r!==n?Object(o.createElement)(t,i,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,i,r))};b.defaultProps={wrapperProps:{}},t.a=b},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},491:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},5:function(e,t,r){"use strict";r.d(t,"k",(function(){return c})),r.d(t,"G",(function(){return o})),r.d(t,"M",(function(){return a})),r.d(t,"x",(function(){return i})),r.d(t,"z",(function(){return u})),r.d(t,"l",(function(){return l})),r.d(t,"y",(function(){return s})),r.d(t,"B",(function(){return b})),r.d(t,"n",(function(){return p})),r.d(t,"A",(function(){return d})),r.d(t,"m",(function(){return m})),r.d(t,"C",(function(){return g})),r.d(t,"t",(function(){return f})),r.d(t,"w",(function(){return O})),r.d(t,"q",(function(){return j})),r.d(t,"r",(function(){return v})),r.d(t,"s",(function(){return h})),r.d(t,"j",(function(){return w})),r.d(t,"I",(function(){return y})),r.d(t,"N",(function(){return _})),r.d(t,"p",(function(){return k})),r.d(t,"o",(function(){return E})),r.d(t,"F",(function(){return P})),r.d(t,"c",(function(){return C})),r.d(t,"u",(function(){return S})),r.d(t,"v",(function(){return N})),r.d(t,"Q",(function(){return D})),r.d(t,"H",(function(){return B})),r.d(t,"a",(function(){return L})),r.d(t,"K",(function(){return R})),r.d(t,"b",(function(){return I})),r.d(t,"J",(function(){return T})),r.d(t,"h",(function(){return z})),r.d(t,"L",(function(){return A})),r.d(t,"g",(function(){return H})),r.d(t,"i",(function(){return F})),r.d(t,"E",(function(){return Q})),r.d(t,"D",(function(){return U})),r.d(t,"P",(function(){return q})),r.d(t,"O",(function(){return Y})),r.d(t,"d",(function(){return G})),r.d(t,"e",(function(){return K})),r.d(t,"f",(function(){return W})),r.d(t,"R",(function(){return $})),r.d(t,"S",(function(){return X}));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),u=Object(n.getSetting)("min_columns",1),l=Object(n.getSetting)("default_columns",3),s=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),m=Object(n.getSetting)("default_height",500),g=Object(n.getSetting)("placeholderImgSrc",""),f=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),O=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),v=Object(n.getSetting)("hasTags",!0),h=Object(n.getSetting)("homeUrl",""),w=Object(n.getSetting)("couponsEnabled",!0),y=Object(n.getSetting)("shippingEnabled",!0),_=Object(n.getSetting)("taxesEnabled",!0),k=Object(n.getSetting)("displayItemizedTaxes",!1),E=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(n.getSetting)("productCount",0),C=Object(n.getSetting)("attributes",[]),S=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=Object(n.getSetting)("isShippingCostHidden",!1),x=Object(n.getSetting)("woocommerceBlocksPhase",1),D=Object(n.getSetting)("wcBlocksAssetUrl",""),B=Object(n.getSetting)("shippingCountries",{}),L=Object(n.getSetting)("allowedCountries",{}),R=Object(n.getSetting)("shippingStates",{}),I=Object(n.getSetting)("allowedStates",{}),T=Object(n.getSetting)("shippingMethodsExist",!1),z=Object(n.getSetting)("checkoutShowLoginReminder",!0),V={id:0,title:"",permalink:""},M=Object(n.getSetting)("storePages",{shop:V,cart:V,checkout:V,privacy:V,terms:V}),A=M.shop.permalink,H=M.checkout.id,F=M.checkout.permalink,Q=M.privacy.permalink,U=M.privacy.title,q=M.terms.permalink,Y=M.terms.title,G=M.cart.id,K=M.cart.permalink,W=Object(n.getSetting)("checkoutAllowsGuest",!1),J=(Object(n.getSetting)("checkoutAllowsSignup",!1),r(14)),$=function(e,t){if(x>2)return Object(J.registerBlockType)(e,t)},X=function(e,t){if(x>1)return Object(J.registerBlockType)(e,t)}},502:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},504: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,r.current]),r.current}},53:function(e,t){!function(){e.exports=this.wp.keycodes}()},54:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(15),u=r.n(i),l=r(0),s=r(154),b=r(7),p=r.n(b);r(252);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 m(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=u()(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=m(m(m({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}),g=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(l.createElement)(s.a,c()({className:b},d,{value:i,onValueChange:g}))}},57:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},58:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(48),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(15),a=r.n(o),i=r(9);r(2);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,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?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}({width:n,height:n},o))}},71:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(23),a=r.n(o),i=r(26),u=r.n(i),l=r(20),s=r.n(l),b=r(24),p=r.n(b),d=r(25),m=r.n(d),g=r(12),f=r.n(g),O=r(0),j=r(6),v=r(7),h=r.n(v),w=r(4),y=r(21);r(169);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 c=f()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return m()(this,r)}}var k=function(e){p()(r,e);var t=_(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return u()(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,u=r.help,l=r.options,s=r.value,b="inspector-toggle-button-control-".concat(a);return u&&(e=Object(j.isFunction)(u)?u(o):u),Object(O.createElement)(w.BaseControl,{id:b,help:e,className:h()("components-toggle-button-control",i)},Object(O.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(O.createElement)(w.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,r){var o={};return s===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(O.createElement)(w.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}(O.Component);t.a=Object(y.withInstanceId)(k)},74:function(e,t){!function(){e.exports=this.wp.dom}()},76:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(6),a=(r(2),r(4)),i=r(5);t.a=function(e){var t=e.columns,r=e.rows,u=e.setAttributes,l=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.z,i.x);u({columns:Object(o.isNaN)(t)?"":t})},min:i.z,max:i.x}),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.B,i.y);u({rows:Object(o.isNaN)(t)?"":t})},min:i.B,max:i.y}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:l?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:l,onChange:function(){return u({alignButtons:!l})}}))}},78:function(e,t){!function(){e.exports=this.wp.autop}()},785:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},789:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},794:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},795:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(5),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.Q+"img/pennant.jpg",thumbnail:c.Q+"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}]},796:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},802:function(e,t,r){"use strict";var n=r(0),c=r(59),o=Object(n.createElement)(c.a,{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},803:function(e,t,r){},84:function(e,t){!function(){e.exports=this.wp.a11y}()},855:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(10),a=r.n(o),i=r(0),u=r(1),l=r(22),s=r(14),b=r(60),p=r(59),d=Object(i.createElement)(p.a,{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"})),m=r(7),g=r.n(m),f=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:g()("is-loading",t.className)})},O={category:"woocommerce",keywords:[Object(u.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:["woocommerce/all-products","woocommerce/single-product"],save:f,deprecated:[{save:function(){}}]},j=r(191),v=r(4),h=r(147),w=r(192);function y(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 _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k={title:Object(u.__)("Product Title","woo-gutenberg-products-block"),description:Object(u.__)("Display the name of a product.","woo-gutenberg-products-block"),icon:{src:"heading",foreground:"#96588a"},attributes:j.a,edit:function(e){var t=e.attributes,r=e.setAttributes,n=t.headingLevel,c=t.productLink;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(l.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)("p",null,Object(u.__)("Level","woo-gutenberg-products-block")),Object(i.createElement)(h.a,{isCollapsed:!1,minLevel:1,maxLevel:7,selectedLevel:n,onChange:function(e){return r({headingLevel:e})}}),Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(u.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:c,onChange:function(){return r({productLink:!c})}}))),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(w.a,t)))}};Object(s.registerBlockType)("woocommerce/product-title",_(_({},O),k));var E=r(491),P=r(193);function C(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?C(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var N={title:Object(u.__)("Product Price","woo-gutenberg-products-block"),description:Object(u.__)("Display the price of a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:E.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(P.a,t)}};Object(s.registerBlockType)("woocommerce/product-price",S(S({},O),N));var x=Object(i.createElement)(p.a,{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"})),D=r(194),B=r(182),L=r(71),R=r(3),I=r(195);function T(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?T(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V={title:Object(u.__)("Product Image","woo-gutenberg-products-block"),description:Object(u.__)("Display the main product image","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:x}),foreground:"#96588a"},attributes:D.a,edit: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)(l.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(u.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(u.__)('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)(L.a,{label:Object(u.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(u.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(u.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(u.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(L.a,{label:Object(u.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(B.a)(Object(u.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(R.getAdminLink)("customize.php"),"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images"),target:"_blank",rel:"noopener noreferrer"})}),value:c,options:[{label:Object(u.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(u.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:function(e){return r({imageSizing:e})}}))),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(I.a,t)))}};Object(s.registerBlockType)("woocommerce/product-image",z(z({},O),V));var M=r(794),A=r(196);function H(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?H(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q={title:Object(u.__)("Product Rating","woo-gutenberg-products-block"),description:Object(u.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:M.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(A.a,t)}};Object(s.registerBlockType)("woocommerce/product-rating",F(F({},O),Q));var U=r(802),q=r(197);function Y(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 G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var K={title:Object(u.__)("Add to Cart Button","woo-gutenberg-products-block"),description:Object(u.__)("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:Object(i.createElement)(b.a,{srcElement:U.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(v.Disabled,null,Object(i.createElement)(q.a,t))}};Object(s.registerBlockType)("woocommerce/product-button",G(G({},O),K));var W=Object(i.createElement)(p.a,{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"})),J=r(198);function $(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 X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Z={title:Object(u.__)("Product Summary","woo-gutenberg-products-block"),description:Object(u.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:W}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(J.a,t)}};Object(s.registerBlockType)("woocommerce/product-summary",X(X({},O),Z));var ee=r(789),te=r(134);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 ne(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 ce={title:Object(u.__)("On-Sale Badge","woo-gutenberg-products-block"),description:Object(u.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:ee.a}),foreground:"#96588a"},supports:{html:!1},edit:function(e){var t=e.attributes;return Object(i.createElement)(te.a,t)}};Object(s.registerBlockType)("woocommerce/product-sale-badge",ne(ne({},O),ce));var oe=Object(i.createElement)(p.a,{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"})),ae=r(5),ie=r(131),ue=r(199);function le(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 se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var be={title:Object(u.__)("Product SKU","woo-gutenberg-products-block"),description:Object(u.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:oe}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ie.a,null),Object(i.createElement)(ue.a,t))}};Object(ae.R)("woocommerce/product-sku",se(se({},O),be));var pe=r(785),de=r(200);function me(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 ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var fe={title:Object(u.__)("Product Category List","woo-gutenberg-products-block"),description:Object(u.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:pe.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ie.a,null),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(de.a,t)))}};Object(ae.R)("woocommerce/product-category-list",ge(ge({},O),fe));var Oe=r(201);function je(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 ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he={title:Object(u.__)("Product Tag List","woo-gutenberg-products-block"),description:Object(u.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:ee.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ie.a,null),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(Oe.a,t)))}};Object(ae.R)("woocommerce/product-tag-list",ve(ve({},O),he));var we=Object(i.createElement)(p.a,{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"}))),ye=r(202);function _e(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 ke(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ee={title:Object(u.__)("Product Stock Indicator","woo-gutenberg-products-block"),description:Object(u.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:we}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ie.a,null),Object(i.createElement)(ye.a,t))}};Object(ae.R)("woocommerce/product-stock-indicator",ke(ke({},O),Ee));var Pe=r(37),Ce=(r(352),r(205)),Se=r(203);function Ne(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 xe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var De={title:Object(u.__)("Add to Cart","woo-gutenberg-products-block"),description:Object(u.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:U.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes,r=e.setAttributes,n=Object(Pe.useProductDataContext)().product||{},c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:g()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(ie.a,{productId:n.id||0}),"external"!==n.type&&Object(i.createElement)(l.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Layout","woo-gutenberg-products-block")},Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Display form elements","woo-gutenberg-products-block"),help:Object(u.__)("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)(v.Disabled,null,Object(i.createElement)(Ce.a,t)))},attributes:Se.a};Object(ae.R)("woocommerce/product-add-to-cart",xe(xe({},O),De));var Be=r(11),Le=r.n(Be),Re=r(23),Ie=r.n(Re),Te=r(20),ze=r.n(Te),Ve=r(24),Me=r.n(Ve),Ae=r(25),He=r.n(Ae),Fe=r(12),Qe=r.n(Fe),Ue=r(36),qe=r(21),Ye=(r(2),r(76)),Ge=r(863),Ke=r(795),We=r(161),Je=function(e,t){var r=t.className,n=t.contentVisibility;return g()(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})},$e=function(e,t){return Object(i.createElement)(v.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(u.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(v.Button,{className:"wc-block-products__add-product-button",isDefault:!0,isLarge:!0,href:R.adminUrl+"post-new.php?post_type=product"},Object(u.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:We.a})),Object(i.createElement)(v.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(u.__)("Learn more","woo-gutenberg-products-block")))},Xe=function(e,t){return Object(i.createElement)(v.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(u.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function Ze(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 et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tt=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],rt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,et(et({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};r(803);function nt(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 ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ot=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:ct(ct({},r),{},{orderBy:!r.orderBy})})}})},at=function(e,t){return Object(i.createElement)(v.SelectControl,{label:Object(u.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(u.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(u.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(u.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(u.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(u.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(u.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},it=r(26),ut=r.n(it),lt=r(9),st=r(55),bt=r.n(st),pt=r(15),dt=r.n(pt),mt=r(6),gt=r(44),ft=(r(806),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,l=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),s=l.minIndex,b=l.maxIndex,p=r&&Boolean(1!==s),d=r&&Boolean(b!==a),m=r&&Boolean(s>3),f=r&&Boolean(b<a-2);p&&3===s&&(s-=1),d&&b===a-2&&(b+=1);var O=[];if(s&&b)for(var j=s;j<=b;j++)O.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(gt.a,{screenReaderLabel:Object(u.__)("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(u.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(gt.a,{label:"<",screenReaderLabel:Object(u.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:g()("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)(gt.a,{label:1,screenReaderLabel:Object(u.sprintf)(Object(u.__)("Page %d","woo-gutenberg-products-block"),1)})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(u.__)("…","woo-gutenberg-products-block")),O.map((function(e){return Object(i.createElement)("button",{key:e,className:g()("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)(gt.a,{label:e,screenReaderLabel:Object(u.sprintf)(Object(u.__)("Page %d","woo-gutenberg-products-block"),e)}))})),f&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(u.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:g()("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)(gt.a,{label:a,screenReaderLabel:Object(u.sprintf)(Object(u.__)("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(u.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(gt.a,{label:">",screenReaderLabel:Object(u.__)("Next page","woo-gutenberg-products-block")})))});ft.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var Ot=ft,jt=r(145),vt=(r(805),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(jt.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(u.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(u.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(u.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(u.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(u.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(u.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(u.__)("Order products by","woo-gutenberg-products-block"),value:c})}),ht=r(183),wt=Object(ht.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(Pe.useInnerBlockLayoutContext)(),u=o.parentClassName,l=o.parentName,s=0===Object.keys(t).length,b=g()("".concat(u,"__product"),{"is-loading":s,"wc-block-layout--is-loading":s});return Object(i.createElement)("li",{className:b,"aria-hidden":s},function e(t,r,n,c){if(n){var o=Object(Ge.a)(t);return n.map((function(n,u){var l=Le()(n,2),s=l[0],b=l[1],p=void 0===b?{}:b,d=[];p.children&&p.children.length>0&&(d=e(t,r,p.children,c));var m=o[s];if(!m)return null;var g=r.id||0,f=["layout",s,u,c,g];return Object(i.createElement)(m,a()({key:f.join("_")},p,{children:d,product:r}))}))}}(l,t,c,n))})),yt=r(166),_t=r(204),kt=r(41),Et=r(58);function Pt(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 Ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var St=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(_t.a)(Ct(Ct({},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 u=Object(Et.a)(i),l=Object(Et.a)(o),s=Object(Ue.useSelect)((function(t){var c=t(kt.COLLECTIONS_STORE_KEY),o=[e,r,n,u,l];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,l,u]),b=s.value,p=s.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",Ct(Ct({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},Nt=r(504),xt=r(255),Dt=r(84),Bt=(r(804),r(140)),Lt=function(){var e=Object(Pe.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:Bt.a,size:100}),Object(i.createElement)("strong",{className:"".concat(e,"__no-products-title")},Object(u.__)("No products","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(e,"__no-products-description")},Object(u.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Rt=r(796),It=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(Pe.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:Rt.a,size:100}),Object(i.createElement)("strong",{className:"".concat(n,"__no-products-title")},Object(u.__)("No products found","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(n,"__no-products-description")},Object(u.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(i.createElement)("button",{onClick:r},Object(u.__)("Reset Search","woo-gutenberg-products-block")))};function Tt(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 zt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Vt=Object(xt.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,l=Object(yt.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return zt(zt({},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})),s=Le()(l,1)[0],b=St(s),p=b.products,d=b.totalProducts,m=b.productsLoading,f=Object(Pe.useInnerBlockLayoutContext)().parentClassName,O=function(e){e.order,e.orderby,e.page,e.per_page;return dt()(e,["order","orderby","page","per_page"])}(s),j=Object(yt.b)("attributes",[]),v=Le()(j,2),h=v[0],w=v[1],y=Object(yt.b)("min_price"),_=Le()(y,2),k=_[0],E=_[1],P=Object(yt.b)("max_price"),C=Le()(P,2),S=C[0],N=C[1],x=Object(Nt.a)({totalQuery:O,totalProducts:d},(function(e){var t=e.totalQuery,r=e.totalProducts,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n.totalQuery;return!Object(mt.isEqual)(t,c)&&Number.isFinite(r)})),D="object"===bt()(x)&&Object(mt.isEqual)(O,x.totalQuery);Object(i.useEffect)((function(){D||(n(1),x&&function(e){Number.isFinite(e)&&(0===e?Object(Dt.speak)(Object(u.__)("No products found","woo-gutenberg-products-block")):Object(Dt.speak)(Object(u.sprintf)(Object(u._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[s]);var B,L,R,I,T,z=t.contentVisibility,V=t.columns*t.rows,M=!Number.isFinite(d)&&D?Math.ceil(x.totalProducts/V):Math.ceil(d/V),A=p.length?p:Array.from({length:V}),H=0!==p.length||m,F=h.length>0||Number.isFinite(k)||Number.isFinite(S);return Object(i.createElement)("div",{className:(B=t.columns,L=t.rows,R=t.alignButtons,I=t.align,T=void 0!==I?"align"+I:"",g()(f,T,"has-"+B+"-columns",{"has-multiple-rows":L>1,"has-aligned-buttons":R}))},z.orderBy&&H&&Object(i.createElement)(vt,{onChange:c,value:o}),!H&&F&&Object(i.createElement)(It,{resetCallback:function(){w([]),E(null),N(null)}}),!H&&!F&&Object(i.createElement)(Lt,null),H&&Object(i.createElement)("ul",{className:"".concat(f,"__products")},A.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)(wt,{key:e.id||r,attributes:t,product:e})}))),M>1&&Object(i.createElement)(Ot,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:M}))})),Mt=function(e){var t=e.attributes,r=Object(i.useState)(1),n=Le()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),u=Le()(a,2),l=u[0],s=u[1];Object(i.useEffect)((function(){s(t.orderby)}),[t.orderby]);return Object(i.createElement)(Vt,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;s(t),o(1)},sortValue:l})},At=r(168);function Ht(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=Qe()(e);if(t){var c=Qe()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return He()(this,r)}}var Ft=function(e){Me()(r,e);var t=Ht(r);function r(){return Ie()(this,r),t.apply(this,arguments)}return ut()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?At.a:Object(i.createElement)(Pe.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(Mt,{attributes:t,urlParameterSuffix:r}))}}]),r}(lt.Component);function Qt(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=Qe()(e);if(t){var c=Qe()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return He()(this,r)}}var Ut=function(e){Me()(r,e);var t=Qt(r);function r(){var e;Ie()(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()(ze()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(ze()(e),"blockMap",Object(Ge.a)("woocommerce/all-products")),c()(ze()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(ze()(e),"getTitle",(function(){return Object(u.__)("All Products","woo-gutenberg-products-block")})),c()(ze()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(ze()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(u.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(ze()(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)(l.InspectorControls,{key:"inspector"},Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ye.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Content Settings","woo-gutenberg-products-block")},ot(r,n),at(r,n)))})),c()(ze()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(l.BlockControls,null,Object(i.createElement)(v.Toolbar,{controls:[{icon:"edit",title:Object(u.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(ze()(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)(v.Placeholder,{icon:e.getIcon(),label:e.getTitle()},Object(u.__)("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)(v.Tip,null,Object(u.__)("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)(Pe.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(Pe.ProductDataContextProvider,{product:Ke.a[0]},Object(i.createElement)(l.InnerBlocks,t)))))),Object(i.createElement)("div",{className:"wc-block-all-products__actions"},Object(i.createElement)(v.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,isLarge:!0,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:rt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(u.__)("Done","woo-gutenberg-products-block")),Object(i.createElement)(v.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(u.__)("Cancel","woo-gutenberg-products-block")),Object(i.createElement)(v.IconButton,{className:"wc-block-all-products__reset-button",icon:Object(i.createElement)(b.a,{srcElement:d}),label:Object(u.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];tt.map((function(e){var t=Le()(e,2),r=t[0],n=t[1];return c.push(Object(s.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(u.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(ze()(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)(v.Disabled,null,Object(i.createElement)(Ft,{attributes:t})):Xe(c,o)})),c()(ze()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return ae.q?Object(i.createElement)("div",{className:Je("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):$e(n,c)})),e}return r}(i.Component),qt=Object(qe.compose)(v.withSpokenMessages,Object(Ue.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Ue.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Ut),Yt={columns:ae.l,rows:ae.n,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:tt,isPreview:!1};function Gt(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 Kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wt={title:Object(u.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(u.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(u.__)("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:Yt,edit:function(e){return Object(i.createElement)(qt,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:Je("wc-block-all-products",t)},n),Object(i.createElement)(l.InnerBlocks.Content,null))}};Object(s.registerBlockType)("woocommerce/all-products",Kt(Kt({},Wt),{},{deprecated:[{attributes:Object.assign({},Wt.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:Je("wc-block-all-products",t)},r),Object(i.createElement)(l.InnerBlocks.Content,null))}}]}))},863:function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(57),c=r(197),o=r(21),a=r(10),i=r.n(a),u=r(0),l=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},s=function(e){return function(t){return function(r){var n=l(e,r);return Object(u.createElement)(t,i()({},r,n))}}},b=r(195),p=r(194),d=Object(o.compose)(s(p.a))(b.a),m=r(193),g=r(196),f=r(134),O=r(198),j=r(192),v=r(191),h=Object(o.compose)(s(v.a))(j.a),w=r(199),y=r(200),_=r(201),k=r(202),E=r(205),P=r(203),C=Object(o.compose)(s(P.a))(E.a);Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:m.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:d}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:h}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:g.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:c.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:O.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:f.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:w.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:y.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:_.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:k.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:C});var S=function(e){return Object(n.getRegisteredBlockComponents)(e)}},9:function(e,t){!function(){e.exports=this.React}()},97: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}});
|
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],u=t[1],l=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 u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(s&&s(t);p.length;)p.shift()();return o.push.apply(o,l||[]),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 u=r[i];0!==c[u]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5: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.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="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var s=u;return o.push([853,2,0,1]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(8),c=r.n(n),o=r(212),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 u(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 l=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,l=Object(a.useRef)(t);Object(a.useEffect)((function(){l.current=t}),[t]);var s=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return l.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;l.current.map((function(t){return null!==e&&t.status!==e||n(t.id),!0}))},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,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,u({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return u(u(u({notices:t},s),b),{},{setIsSuppressed:i})}},108:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(41),c=r(36),o=r(210),a=r(30),i=r(6),u={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(o.b)(),r=t.isEditor,l=t.previewData,s=(null==l?void 0:l.previewCart)||{},b=e.shouldSelect,p=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!b)return u;if(r)return{cartCoupons:s.coupons,cartItems:s.items,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:[],cartTotals:s.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:s.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:function(){}};var o=e(n.CART_STORE_KEY),l=o.getCartData(),p=o.getCartErrors(),d=o.getCartTotals(),m=!o.hasFinishedResolution("getCartData"),g=o.areShippingRatesLoading(),O=c(n.CART_STORE_KEY).receiveCart,f=Object(i.mapValues)(l.shippingAddress,(function(e){return Object(a.decodeEntities)(e)}));return{cartCoupons:l.coupons,cartItems:l.items||[],cartItemsCount:l.itemsCount,cartItemsWeight:l.itemsWeight,cartNeedsPayment:l.needsPayment,cartNeedsShipping:l.needsShipping,cartItemErrors:l.errors||[],cartTotals:d,cartIsLoading:m,cartErrors:p,shippingAddress:f,shippingRates:l.shippingRates||[],shippingRatesLoading:g,hasShippingAddress:!!f.country,receiveCart:O}}),[b]);return p}},110:function(e,t){!function(){e.exports=this.wp.wordcount}()},131:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(58),a=r(162),i=r(3),u=r(22),l=r(37);t.a=function(e){var t=(Object(l.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(n.createElement)(u.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}},134:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),u=r.n(i),l=r(44),s=r(37);r(493);t.a=function(e){var t=e.className,r=e.align,n=c()(e,["className","align"]),i=Object(s.useInnerBlockLayoutContext)().parentClassName,b=Object(s.useProductDataContext)(),p=n.product||b.product;if(!p||!p.on_sale)return null;var d="string"==typeof r?"wc-block-components-product-sale-badge--align".concat(r):"";return Object(o.createElement)("div",{className:u()("wc-block-components-product-sale-badge",t,d,"".concat(i,"__product-onsale"))},Object(o.createElement)(l.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}},141:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},146:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(44),i=r(184);r(284);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,u=e.onChange,l=e.options,s=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:s,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:u,readOnly:b,value:p},l.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},148:function(e,t,r){"use strict";var n=r(23),c=r.n(n),o=r(26),a=r.n(o),i=r(24),u=r.n(i),l=r(25),s=r.n(l),b=r(12),p=r.n(b),d=r(0),m=r(6),g=r(1),O=r(4);function f(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 s()(this,r)}}var v=function(e){u()(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)(f,{level:e}),title:Object(g.sprintf)(Object(g.__)("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.Toolbar,{isCollapsed:n,icon:Object(d.createElement)(f,{level:a}),controls:Object(m.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},149:function(e,t,r){"use strict";var n=r(0),c=r(110),o=r(79),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,"")},u=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},l=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)(u(c,r))},s=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)(u(a,n));var l=a.match(/([\s]+)/g),s=l?l.length:0,b=c.slice(0,t+s);return Object(o.autop)(u(b,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,u=e.countType,b=void 0===u?"words":u,p=e.className,d=void 0===p?"":p,m=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 u=a(n),b=Object(c.count)(u,r);return b<=t?u:"words"===r?l(u,t):s(u,t,"characters_including_spaces"===r)}(t,i,b)}),[t,i,b]);return Object(n.createElement)(n.RawHTML,{className:d},m)}},15:function(e,t){!function(){e.exports=this.wp.blocks}()},151:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(11),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},16:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},162:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},167:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return d}));var n=r(11),c=r.n(n),o=r(41),a=r(36),i=r(0),u=r(98),l=r(6),s=r(59),b=function(e){var t=Object(u.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])]},p=function(e,t,r){var n=Object(u.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),l=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){l(r,e,t)}),[r,e])]},d=function(e,t){var r=Object(u.a)(),n=b(t=t||r),o=c()(n,2),a=o[0],p=o[1],d=Object(s.a)(e),m=Object(i.useRef)(!1);return Object(i.useEffect)((function(){p(Object(l.assign)({},a,d)),m.current=!0}),[d]),m.current?[a,p]:[e,p]}},169:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(5),o=Object(n.createElement)("img",{src:c.Q+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},190:function(e,t,r){"use strict";r.d(t,"c",(function(){return d})),r.d(t,"b",(function(){return m})),r.d(t,"a",(function(){return g}));var n=r(8),c=r.n(n),o=r(55),a=r.n(o),i=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}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}var s,b,p={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(s=i.CURRENCY.symbol,b=i.CURRENCY.symbolPosition,{left:s,left_space:" "+s,right:"",right_space:""}[b]||""),suffix:function(e,t){return{left:"",left_space:"",right:e,right_space:" "+e}[t]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},d=function(e){if(!e||"object"!==a()(e))return p;var t=e.currency_code,r=e.currency_symbol,n=e.currency_thousand_separator,c=e.currency_decimal_separator,o=e.currency_minor_unit,i=e.currency_prefix,u=e.currency_suffix;return{code:t||"USD",symbol:r||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof c?c:".",minorUnit:Number.isFinite(o)?o:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof u?u:""}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l(l({},p),e)},g=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=m(t),c=r/Math.pow(10,n.minorUnit),o=n.prefix+c+n.suffix,a=document.createElement("textarea");return a.innerHTML=o,a.value}},192:function(e,t,r){"use strict";t.a={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0}}},193:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),u=r(30),l=r(37);r(490);t.a=function(e){var t=e.className,r=e.headingLevel,n=void 0===r?2:r,a=e.productLink,s=void 0===a||a,b=c()(e,["className","headingLevel","productLink"]),p=Object(l.useInnerBlockLayoutContext)().parentClassName,d=Object(l.useProductDataContext)(),m=b.product||d.product,g="h".concat(n);if(!m)return Object(o.createElement)(g,{className:i()(t,"wc-block-components-product-title","".concat(p,"__product-title"))});var O=Object(u.decodeEntities)(m.name);return Object(o.createElement)(g,{className:i()(t,"wc-block-components-product-title","".concat(p,"__product-title"))},s?Object(o.createElement)("a",{href:m.permalink,rel:"nofollow"},O):O)}},194:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),u=r(54),l=r(190),s=r(37),b=(r(491),function(e){return e.price_range&&e.price_range.min_amount&&e.price_range.max_amount}),p=function(e){var t=e.currency,r=e.minAmount,n=e.maxAmount,c=Object(s.useInnerBlockLayoutContext)().parentClassName;return Object(o.createElement)("span",{className:i()("wc-block-components-product-price__value","".concat(c,"__product-price__value"))},Object(o.createElement)(u.a,{currency:t,value:r})," — ",Object(o.createElement)(u.a,{currency:t,value:n}))},d=function(e){var t=e.currency,r=e.price,n=e.regularPrice,c=Object(s.useInnerBlockLayoutContext)().parentClassName;return Object(o.createElement)(o.Fragment,null,n!==r&&Object(o.createElement)("del",{className:i()("wc-block-components-product-price__regular","".concat(c,"__product-price__regular"))},Object(o.createElement)(u.a,{currency:t,value:n})),Object(o.createElement)("span",{className:i()("wc-block-components-product-price__value","".concat(c,"__product-price__value"))},Object(o.createElement)(u.a,{currency:t,value:r})))};t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(s.useInnerBlockLayoutContext)().parentClassName,a=Object(s.useProductDataContext)(),u=r.product||a.product;if(!u)return Object(o.createElement)("div",{className:i()(t,"price","wc-block-components-product-price","".concat(n,"__product-price"))});var m=u.prices||{},g=Object(l.c)(m);return Object(o.createElement)("div",{className:i()(t,"price","wc-block-components-product-price","".concat(n,"__product-price"))},b(m)?Object(o.createElement)(p,{currency:g,minAmount:m.price_range.min_amount,maxAmount:m.price_range.max_amount}):Object(o.createElement)(d,{currency:g,price:m.price,regularPrice:m.regular_price}))}},195: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"}}},196:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(14),u=r.n(i),l=r(0),s=(r(2),r(7)),b=r.n(s),p=r(5),d=r(37),m=r(134);r(494);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 O(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){c()(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 f=function(){return Object(l.createElement)("img",{src:p.C,alt:""})},j=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,o=t||{},a=o.thumbnail,i=o.src,u=o.srcset,s=o.sizes,b={alt:o.alt,onLoad:r,hidden:!n,src:a};return c&&(b=O(O({},b),{},{src:i,srcSet:u,sizes:s})),Object(l.createElement)(l.Fragment,null,Object(l.createElement)("img",b),!n&&Object(l.createElement)(f,null))};t.a=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,s=e.saleBadgeAlign,p=void 0===s?"right":s,g=u()(e,["className","imageSizing","productLink","showSaleBadge","saleBadgeAlign"]),O=Object(d.useInnerBlockLayoutContext)().parentClassName,v=Object(d.useProductDataContext)(),h=g.product||v.product,w=Object(l.useState)(!1),y=a()(w,2),_=y[0],k=y[1];if(!h)return Object(l.createElement)("div",{className:b()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder","".concat(O,"__product-image"))},Object(l.createElement)(f,null));var E=(null==h?void 0:h.images)&&h.images.length?h.images[0]:null;return Object(l.createElement)("div",{className:b()(t,"wc-block-components-product-image","".concat(O,"__product-image"))},o?Object(l.createElement)("a",{href:h.permalink,rel:"nofollow"},!!i&&Object(l.createElement)(m.a,{align:p,product:h}),Object(l.createElement)(j,{image:E,onLoad:function(){return k(!0)},loaded:_,showFullSize:"cropped"!==n})):Object(l.createElement)(l.Fragment,null,!!i&&Object(l.createElement)(m.a,{align:p,product:h}),Object(l.createElement)(j,{image:E,onLoad:function(){return k(!0)},loaded:_,showFullSize:"cropped"!==n})))}},197:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),u=r.n(i),l=r(37),s=(r(495),function(e){var t=parseFloat((null==e?void 0:e.average_rating)||0);return Number.isFinite(t)&&t>0?t:0});t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)(),b=r.product||i.product,p=s(b);if(!p)return null;var d={width:p/5*100+"%"},m=Object(a.sprintf)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),p);return Object(o.createElement)("div",{className:u()(t,"star-rating","wc-block-components-product-rating","".concat(n,"__product-rating"))},Object(o.createElement)("div",{className:u()("wc-block-components-product-rating__stars","".concat(n,"__product-rating__stars")),role:"img","aria-label":m},Object(o.createElement)("span",{style:d},m)))}},198:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(14),a=r.n(o),i=r(0),u=(r(2),r(7)),l=r.n(u),s=r(1),b=r(358),p=r(30),d=r(293),m=r(37),g=(r(496),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,u=t.has_options,m=t.is_purchasable,g=t.is_in_stock,O=Object(b.a)(n),f=O.cartQuantity,j=O.addingToCart,v=O.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.a)()}),[f]);var h=Number.isFinite(f)&&f>0,w=!u&&m&&g,y=Object(p.decodeEntities)((null==a?void 0:a.description)||""),_=h?Object(s.sprintf)(Object(s._n)("%d in cart","%d in cart",f,"woo-gutenberg-products-block"),f):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(s.__)("Add to cart","woo-gutenberg-products-block")),k=w?"button":"a",E={};return w?E.onClick=function(){v()}:(E.href=o,E.rel="nofollow"),Object(i.createElement)(k,c()({"aria-label":y,className:l()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:h}),disabled:j},E),_)}),O=function(){return Object(i.createElement)("button",{className:l()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};t.a=function(e){var t=e.className,r=a()(e,["className"]),n=Object(m.useInnerBlockLayoutContext)().parentClassName,c=Object(m.useProductDataContext)(),o=r.product||c.product;return Object(i.createElement)("div",{className:l()(t,"wp-block-button","wc-block-components-product-button","".concat(n,"__product-add-to-cart"))},o?Object(i.createElement)(g,{product:o}):Object(i.createElement)(O,null))}},199:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),u=r(149),l=r(3),s=r(37);r(497);t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(s.useInnerBlockLayoutContext)().parentClassName,a=(Object(s.useProductDataContext)()||r).product;if(!a)return Object(o.createElement)("div",{className:i()(t,"wc-block-components-product-summary")});var b=a.short_description?a.short_description:a.description;if(!b)return null;var p=Object(l.getSetting)("wordCountType","words");return Object(o.createElement)(u.a,{className:i()(t,"wc-block-components-product-summary","".concat(n,"__product-summary")),source:b,maxLength:150,countType:p})}},200:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),u=r.n(i),l=r(37);r(498);t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)(),s=(r.product||i.product||{}).sku||"";return s?Object(o.createElement)("div",{className:u()(t,"wc-block-components-product-sku","".concat(n,"__product-sku"))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,s)):null}},201:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),u=r.n(i),l=r(37),s=r(6);r(499);t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=(Object(l.useProductDataContext)()||r||{}).product;return Object(s.isEmpty)(i)||Object(s.isEmpty)(i.categories)?null:Object(o.createElement)("div",{className:u()(t,"wc-block-components-product-category-list","".concat(n,"__product-category-list"))},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(i.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))}))))}},202:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),u=r.n(i),l=r(37),s=r(6);r(500);t.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=(Object(l.useProductDataContext)()||r||{}).product;return Object(s.isEmpty)(i)||Object(s.isEmpty)(i.tags)?null:Object(o.createElement)("div",{className:u()(t,"wc-block-components-product-tag-list","".concat(n,"__product-tag-list"))},Object(a.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(i.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))}))))}},203:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),u=r.n(i),l=r(37),s=r(6),b=(r(501),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.a=function(e){var t=e.className,r=c()(e,["className"]),n=Object(l.useInnerBlockLayoutContext)().parentClassName,a=Object(l.useProductDataContext)(),i=r.product||a.product||{};if(Object(s.isEmpty)(i)||!i.is_purchasable)return null;var d=!!i.is_in_stock,m=i.low_stock_remaining,g=i.is_on_backorder;return Object(o.createElement)("div",{className:u()(t,"wc-block-components-product-stock-indicator","".concat(n,"__stock-indicator"),{"wc-block-components-product-stock-indicator--in-stock":d,"wc-block-components-product-stock-indicator--out-of-stock":!d,"wc-block-components-product-stock-indicator--low-stock":!!m,"wc-block-components-product-stock-indicator--available-on-backorder":!!g})},m?b(m):p(d,g))}},204:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1}}},205:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(41),c=r(36),o=r(0),a=r(151),i=r(59),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,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 m=Object(o.useRef)({results:[],isLoading:!0}),g=Object(i.a)(b),O=Object(i.a)(l),f=Object(a.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,g,O],a=c.getCollectionError.apply(c,o);return a&&f(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,O,g,d]);return null!==j&&(m.current=j),m.current}},206:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),u=r(11),l=r.n(u),s=r(358),b=r(293),p=Object(o.createContext)({product:{},productId:0,variationId:0,variationData:{},cartItemData:{},quantity:1,minQuantity:1,maxQuantity:99,quantityInCart:0,setQuantity:function(e){},setVariationId:function(e){},setVariationData:function(e){},setCartItemData:function(e){},showFormElements:!1,formInitialized:!1,formDisabled:!0,formSubmitting:!1,onChange:function(){},onSubmit:function(){},onSuccess:function(){},onFail:function(){}}),d=function(){return Object(o.useContext)(p)},m=function(e){var t=e.children,r=e.product,n=e.showFormElements,c=r.id||0,a=Object(o.useState)(0),i=l()(a,2),u=i[0],d=i[1],m=Object(o.useState)({}),O=l()(m,2),f=O[0],j=O[1],v=Object(o.useState)({}),h=l()(v,2),w=h[0],y=h[1],_=Object(o.useState)(1),k=l()(_,2),E=k[0],P=k[1],C=Object(s.a)(c),S=C.addToCart,N=C.addingToCart,x=C.cartQuantity,D=C.cartIsLoading;!function(e){var t=Object(o.useRef)(!0);Object(o.useEffect)((function(){t.current?t.current=!1:Object(b.a)()}),[e])}(x);var B=!D&&c>0,L=N||!B||!g(r),R=Object(o.useCallback)((function(){S(E)}),[S,E]),I=Object(o.useCallback)((function(){}),[]),T=Object(o.useCallback)((function(){}),[]),z=Object(o.useCallback)((function(){}),[]),V={product:r,productId:c,variationId:u,variationData:f,cartItemData:w,quantity:E,minQuantity:1,maxQuantity:r.quantity_limit||99,quantityInCart:x,setQuantity:P,setVariationId:d,setVariationData:j,setCartItemData:y,showFormElements:n,formInitialized:B,formDisabled:L,formSubmitting:N,onChange:I,onSubmit:R,onSuccess:T,onFail:z};return Object(o.createElement)(p.Provider,{value:V},t)},g=function(e){var t=e.is_purchasable;return void 0!==t&&t},O=r(37),f=r(6),j=(r(353),r(1)),v=r(85),h=r(58),w=r(502),y=function(e){var t=e.className,r=e.href,n=e.text;return Object(o.createElement)(v.a,{className:t,href:r,rel:"nofollow"},n)},_=function(e){var t=e.className,r=e.quantityInCart,n=e.loading,c=e.disabled,a=e.onClick,i=Object(o.useState)(!1),u=l()(i,2),s=u[0],b=u[1];return Object(o.createElement)(v.a,{className:t,disabled:c,showSpinner:n,onClick:function(){a(),b(!0)}},r>0?Object(j.sprintf)(Object(j._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(j.__)("Add to cart","woo-gutenberg-products-block"),s&&Object(o.createElement)(h.a,{srcElement:w.a,alt:Object(j.__)("Done","woo-gutenberg-products-block")}))},k=function(){var e=d(),t=e.showFormElements,r=e.product,n=e.quantityInCart,c=e.formDisabled,a=e.formSubmitting,i=e.onSubmit,u=r.is_purchasable,l=void 0===u||u,s=r.has_options,b=r.add_to_cart,p=void 0===b?{url:"",text:""}:b;return!t&&s||!l?Object(o.createElement)(y,{className:"wc-block-components-product-add-to-cart-button",href:p.url,text:p.text||Object(j.__)("View Product","woo-gutenberg-products-block")}):Object(o.createElement)(_,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:n,disabled:c,loading:a,onClick:i})},E=function(e){var t=e.disabled,r=e.min,n=e.max,c=e.value,a=e.onChange;return Object(o.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:c,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){a(e.target.value)}})},P=function(e){var t=e.reason,r=void 0===t?Object(j.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(o.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},C=function(){var e=d(),t=e.product,r=e.quantity,n=e.minQuantity,c=e.maxQuantity,a=e.setQuantity,i=e.formDisabled;return t.id&&!t.is_purchasable?Object(o.createElement)(P,null):t.id&&!t.is_in_stock?Object(o.createElement)(P,{reason:Object(j.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(E,{value:r,min:n,max:c,disabled:i,onChange:a}),Object(o.createElement)(k,null))},S=(r(503),r(8)),N=r.n(S),x=r(62),D=r.n(x),B=r(30),L=r(4),R={value:"",label:Object(j.__)("Select an option","woo-gutenberg-products-block")},I=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,c=e.selected,a=void 0===c?"":c,i=e.onChange,u=void 0===i?function(){}:i;return Object(o.createElement)(L.SelectControl,{className:"wc-block-components-product-add-to-cart-attribute-picker__select",label:Object(B.decodeEntities)(t),value:a||"",options:[R].concat(D()(n)),onChange:u})},T=function(e){var t=e.selectedAttributes,r=e.variationAttributes,n=e.attributeNames;return Object.keys(r).filter((function(e){return n.every((function(n){var c=t[n]||"",o=r[e][n];return""===c||(null===o||o===c)}))}))};function z(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?z(Object(r),!0).forEach((function(t){N()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var M=function(e){var t=e.attributes,r=e.variationAttributes,n=Object(o.useState)(0),c=l()(n,2),a=c[0],i=c[1],u=Object(o.useState)([]),s=l()(u,2),b=s[0],p=s[1],d=Object.keys(t),m=Object.values(b).filter(Boolean).length>0,g=Object.values(b).filter((function(e){return""!==e})).length===d.length,O=Object(o.useMemo)((function(){var e=[];return d.forEach((function(n){var c=t[n],o=d.filter((function(e){return e!==n})),a=m?T({selectedAttributes:b,variationAttributes:r,attributeNames:o}):null,i=null!==a?a.map((function(e){return r[e][n]})):null;e[n]=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:r}:null})).filter(Boolean)}(c.terms,i)})),e}),[t,r,d,b,m]);return Object(o.useEffect)((function(){if(g){var e=T({selectedAttributes:b,variationAttributes:r,attributeNames:d});i(e[0]||0)}else i(0)}),[b,r,d,g]),Object(o.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},d.map((function(e){return Object(o.createElement)(I,{key:e,attributeName:e,options:O[e],selected:b[e],onChange:function(t){p(V(V({},b),{},N()({},e,t)))}})})),Object(o.createElement)("p",null,"Matched variation ID: ",a))},A=function(e){var t=e.product,r=t.attributes,n=void 0===r?{}:r,c=t.variations,a=void 0===c?[]:c,i=function(e){return e?Object(f.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):[]}(n),u=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t[r]=n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),[])})),t}(a);return 0===Object.keys(i).length||0===u.length?null:Object(o.createElement)(M,{attributes:i,variationAttributes:u})},H=function(){var e=d(),t=e.product,r=e.quantity,n=e.minQuantity,c=e.maxQuantity,a=e.setQuantity,i=e.formDisabled;return t.id&&!t.is_purchasable?Object(o.createElement)(P,null):t.id&&!t.is_in_stock?Object(o.createElement)(P,{reason:Object(j.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(A,{product:t}),Object(o.createElement)(E,{value:r,min:n,max:c,disabled:i,onChange:a}),Object(o.createElement)(k,null))},F=function(){return Object(o.createElement)(k,null)},Q=function(){return Object(o.createElement)(L.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},U=function(){return Object(o.createElement)(Q,null)},q=function(e){var t=e.productType;return"variable"===t?Object(o.createElement)(H,null):"grouped"===t?Object(o.createElement)(U,null):"external"===t?Object(o.createElement)(F,null):"simple"===t||"variation"===t?Object(o.createElement)(C,null):null};t.a=function(e){var t=e.className,r=e.showFormElements,n=c()(e,["className","showFormElements"]),a=Object(O.useProductDataContext)(),u=n.product||a.product||{},l=i()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(f.isEmpty)(u)});return Object(o.createElement)(m,{product:u,showFormElements:r},Object(o.createElement)("div",{className:l},Object(o.createElement)(o.Fragment,null,r?Object(o.createElement)(q,{productType:u.type||"simple"}):Object(o.createElement)(k,null))))}},21:function(e,t){!function(){e.exports=this.wp.compose}()},210: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(36),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,u=void 0===i?{}:i,l={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:u};return Object(n.createElement)(o.Provider,{value:l},t)}},212:function(e,t,r){"use strict";r.d(t,"b",(function(){return _})),r.d(t,"a",(function(){return k}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),u=(r(2),r(36)),l=r(10),s=r.n(l),b=r(7),p=r.n(b),d=r(898),m=(r(285),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""}),g=function(e){var t=e.className,r=e.notices,n=_().removeNotice,c=p()(t,"wc-block-components-notices"),o=r.filter((function(e){return"snackbar"!==e.type}));return o.length?Object(i.createElement)("div",{className:c},o.map((function(e){return Object(i.createElement)(d.a,s()({key:"store-notice-"+e.id},e,{className:p()("wc-block-components-notices__notice","woocommerce-message",m(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)}))):null},O=r(902),f=r(107),j=r(210),v=function(){var e=Object(j.b)().isEditor,t=Object(f.a)(),r=t.notices,n=t.removeNotice,c=r.filter((function(e){return"snackbar"===e.type}));return e?null:Object(i.createElement)(O.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:n})};function h(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?h(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),_=function(){return Object(i.useContext)(y)},k=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,s=void 0===l?"wc/core":l,b=Object(u.useDispatch)("core/notices"),p=b.createNotice,d=b.removeNotice,m=Object(i.useState)(!1),O=a()(m,2),f=O[0],j=O[1],h=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]:{};p(e,t,w(w({},r),{},{context:r.context||s}))}),[p,s]),_=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;d(e,t)}),[d,s]),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]:{};h("default",e,w(w({},t),{},{type:"snackbar"}))}),[h]),E={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(s)}}),[s]).notices,createNotice:h,createSnackbarNotice:k,removeNotice:_,context:s,setIsSuppressed:j},P=f?null:Object(i.createElement)(g,{className:n,notices:E.notices}),C=f?null:Object(i.createElement)(v,null);return Object(i.createElement)(y.Provider,{value:E},o&&P,t,C)}},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},231:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(14),a=r.n(o),i=r(0),u=r(60),l=r(7),s=r.n(l),b=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]),l=s()("dashicon","dashicons-arrow-down-alt2",t);return Object(i.createElement)(u.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:l,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),p=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]),o=s()("dashicon","dashicons-arrow-down-alt2",t);return Object(i.createElement)(u.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:o,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=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=b;break;case"no-alt":t=p}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},256:function(e,t){!function(){e.exports=this.wp.deprecated}()},257:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(23),a=r.n(o),i=r(26),u=r.n(i),l=r(20),s=r.n(l),b=r(24),p=r.n(b),d=r(25),m=r.n(d),g=r(12),O=r.n(g),f=r(8),j=r.n(f),v=r(0),h=r(9);r(505);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 r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return m()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=w(n);function n(){var e;return a()(this,n),e=r.call(this),j()(s()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(s()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(s()(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 u()(n,[{key:"render",value:function(){return Object(v.createElement)(h.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}},293:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=window.Event||null,c=function(){if("function"==typeof n){var e=new n("wc_fragment_refresh",{bubbles:!0,cancelable:!0});document.body.dispatchEvent(e)}else{var t=document.createEvent("Event");t.initEvent("wc_fragment_refresh",!0,!0),document.body.dispatchEvent(t)}}},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},358:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(11),c=r.n(n),o=r(0),a=r(36),i=r(108),u=r(41),l=r(30),s=r(107),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)(u.CART_STORE_KEY).addItemToCart,r=Object(i.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(s.a)(),m=d.addErrorNotice,g=d.removeNotice,O=Object(o.useState)(!1),f=c()(O,2),j=f[0],v=f[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&&g("add-to-cart")})).catch((function(e){m(Object(l.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},36:function(e,t){!function(){e.exports=this.wp.data}()},37:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},44:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r(7),u=r.n(i);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 s(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 b=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,l=null!=r,b=null!=n;return!l&&b?(t=c||"span",i=s(s({},i),{},{className:u()(i.className,"screen-reader-text")}),Object(o.createElement)(t,i,n)):(t=c||a.Fragment,l&&b&&r!==n?Object(o.createElement)(t,i,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,i,r))};b.defaultProps={wrapperProps:{}},t.a=b},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},492:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},5:function(e,t,r){"use strict";r.d(t,"k",(function(){return c})),r.d(t,"G",(function(){return o})),r.d(t,"M",(function(){return a})),r.d(t,"x",(function(){return i})),r.d(t,"z",(function(){return u})),r.d(t,"l",(function(){return l})),r.d(t,"y",(function(){return s})),r.d(t,"B",(function(){return b})),r.d(t,"n",(function(){return p})),r.d(t,"A",(function(){return d})),r.d(t,"m",(function(){return m})),r.d(t,"C",(function(){return g})),r.d(t,"t",(function(){return O})),r.d(t,"w",(function(){return f})),r.d(t,"q",(function(){return j})),r.d(t,"r",(function(){return v})),r.d(t,"s",(function(){return h})),r.d(t,"j",(function(){return w})),r.d(t,"I",(function(){return y})),r.d(t,"N",(function(){return _})),r.d(t,"p",(function(){return k})),r.d(t,"o",(function(){return E})),r.d(t,"F",(function(){return P})),r.d(t,"c",(function(){return C})),r.d(t,"u",(function(){return S})),r.d(t,"v",(function(){return N})),r.d(t,"Q",(function(){return D})),r.d(t,"H",(function(){return B})),r.d(t,"a",(function(){return L})),r.d(t,"K",(function(){return R})),r.d(t,"b",(function(){return I})),r.d(t,"J",(function(){return T})),r.d(t,"h",(function(){return z})),r.d(t,"L",(function(){return A})),r.d(t,"g",(function(){return H})),r.d(t,"i",(function(){return F})),r.d(t,"E",(function(){return Q})),r.d(t,"D",(function(){return U})),r.d(t,"P",(function(){return q})),r.d(t,"O",(function(){return Y})),r.d(t,"d",(function(){return G})),r.d(t,"e",(function(){return K})),r.d(t,"f",(function(){return W})),r.d(t,"R",(function(){return $})),r.d(t,"S",(function(){return X}));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),u=Object(n.getSetting)("min_columns",1),l=Object(n.getSetting)("default_columns",3),s=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),m=Object(n.getSetting)("default_height",500),g=Object(n.getSetting)("placeholderImgSrc",""),O=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),f=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),v=Object(n.getSetting)("hasTags",!0),h=Object(n.getSetting)("homeUrl",""),w=Object(n.getSetting)("couponsEnabled",!0),y=Object(n.getSetting)("shippingEnabled",!0),_=Object(n.getSetting)("taxesEnabled",!0),k=Object(n.getSetting)("displayItemizedTaxes",!1),E=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(n.getSetting)("productCount",0),C=Object(n.getSetting)("attributes",[]),S=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=Object(n.getSetting)("isShippingCostHidden",!1),x=Object(n.getSetting)("woocommerceBlocksPhase",1),D=Object(n.getSetting)("wcBlocksAssetUrl",""),B=Object(n.getSetting)("shippingCountries",{}),L=Object(n.getSetting)("allowedCountries",{}),R=Object(n.getSetting)("shippingStates",{}),I=Object(n.getSetting)("allowedStates",{}),T=Object(n.getSetting)("shippingMethodsExist",!1),z=Object(n.getSetting)("checkoutShowLoginReminder",!0),V={id:0,title:"",permalink:""},M=Object(n.getSetting)("storePages",{shop:V,cart:V,checkout:V,privacy:V,terms:V}),A=M.shop.permalink,H=M.checkout.id,F=M.checkout.permalink,Q=M.privacy.permalink,U=M.privacy.title,q=M.terms.permalink,Y=M.terms.title,G=M.cart.id,K=M.cart.permalink,W=Object(n.getSetting)("checkoutAllowsGuest",!1),J=(Object(n.getSetting)("checkoutAllowsSignup",!1),r(15)),$=function(e,t){if(x>2)return Object(J.registerBlockType)(e,t)},X=function(e,t){if(x>1)return Object(J.registerBlockType)(e,t)}},502:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},504: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,r.current]),r.current}},53:function(e,t){!function(){e.exports=this.wp.keycodes}()},54:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(14),u=r.n(i),l=r(0),s=r(155),b=r(7),p=r.n(b);r(254);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 m(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=u()(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=m(m(m({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}),g=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(l.createElement)(s.a,c()({className:b},d,{value:i,onValueChange:g}))}},57:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},58:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(14),a=r.n(o),i=r(9);r(2);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,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?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}({width:n,height:n},o))}},59:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(48),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},71:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(23),a=r.n(o),i=r(26),u=r.n(i),l=r(20),s=r.n(l),b=r(24),p=r.n(b),d=r(25),m=r.n(d),g=r(12),O=r.n(g),f=r(0),j=r(6),v=r(7),h=r.n(v),w=r(4),y=r(21);r(170);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=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return m()(this,r)}}var k=function(e){p()(r,e);var t=_(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return u()(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,u=r.help,l=r.options,s=r.value,b="inspector-toggle-button-control-".concat(a);return u&&(e=Object(j.isFunction)(u)?u(o):u),Object(f.createElement)(w.BaseControl,{id:b,help:e,className:h()("components-toggle-button-control",i)},Object(f.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(f.createElement)(w.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,r){var o={};return s===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(f.createElement)(w.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}(f.Component);t.a=Object(y.withInstanceId)(k)},74:function(e,t){!function(){e.exports=this.wp.dom}()},77:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(6),a=(r(2),r(4)),i=r(5);t.a=function(e){var t=e.columns,r=e.rows,u=e.setAttributes,l=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.z,i.x);u({columns:Object(o.isNaN)(t)?"":t})},min:i.z,max:i.x}),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.B,i.y);u({rows:Object(o.isNaN)(t)?"":t})},min:i.B,max:i.y}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:l?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:l,onChange:function(){return u({alignButtons:!l})}}))}},783:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},787:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},79:function(e,t){!function(){e.exports=this.wp.autop}()},792:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},793:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(5),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.Q+"img/pennant.jpg",thumbnail:c.Q+"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}]},794:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},800:function(e,t,r){"use strict";var n=r(0),c=r(60),o=Object(n.createElement)(c.a,{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},801:function(e,t,r){},85:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(14),a=r.n(o),i=r(0),u=r(236),l=(r(2),r(7)),s=r.n(l);r(286);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,l=a()(e,["className","showSpinner","children"]),b=s()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(u.a,c()({className:b},l),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))}},853:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(10),a=r.n(o),i=r(0),u=r(1),l=r(22),s=r(15),b=r(58),p=r(60),d=Object(i.createElement)(p.a,{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"})),m=r(7),g=r.n(m),O=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:g()("is-loading",t.className)})},f={category:"woocommerce",keywords:[Object(u.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:["woocommerce/all-products","woocommerce/single-product"],save:O,deprecated:[{save:function(){}}]},j=r(192),v=r(4),h=r(148),w=r(193);function y(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 _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k={title:Object(u.__)("Product Title","woo-gutenberg-products-block"),description:Object(u.__)("Display the name of a product.","woo-gutenberg-products-block"),icon:{src:"heading",foreground:"#96588a"},attributes:j.a,edit:function(e){var t=e.attributes,r=e.setAttributes,n=t.headingLevel,c=t.productLink;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(l.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)("p",null,Object(u.__)("Level","woo-gutenberg-products-block")),Object(i.createElement)(h.a,{isCollapsed:!1,minLevel:1,maxLevel:7,selectedLevel:n,onChange:function(e){return r({headingLevel:e})}}),Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(u.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:c,onChange:function(){return r({productLink:!c})}}))),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(w.a,t)))}};Object(s.registerBlockType)("woocommerce/product-title",_(_({},f),k));var E=r(492),P=r(194);function C(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?C(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var N={title:Object(u.__)("Product Price","woo-gutenberg-products-block"),description:Object(u.__)("Display the price of a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:E.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(P.a,t)}};Object(s.registerBlockType)("woocommerce/product-price",S(S({},f),N));var x=Object(i.createElement)(p.a,{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"})),D=r(195),B=r(183),L=r(71),R=r(3),I=r(196);function T(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?T(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V={title:Object(u.__)("Product Image","woo-gutenberg-products-block"),description:Object(u.__)("Display the main product image","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:x}),foreground:"#96588a"},attributes:D.a,edit: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)(l.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(u.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(u.__)('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)(L.a,{label:Object(u.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(u.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(u.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(u.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(L.a,{label:Object(u.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(B.a)(Object(u.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(R.getAdminLink)("customize.php"),"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images"),target:"_blank",rel:"noopener noreferrer"})}),value:c,options:[{label:Object(u.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(u.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:function(e){return r({imageSizing:e})}}))),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(I.a,t)))}};Object(s.registerBlockType)("woocommerce/product-image",z(z({},f),V));var M=r(792),A=r(197);function H(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?H(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Q={title:Object(u.__)("Product Rating","woo-gutenberg-products-block"),description:Object(u.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:M.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(A.a,t)}};Object(s.registerBlockType)("woocommerce/product-rating",F(F({},f),Q));var U=r(800),q=r(198);function Y(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 G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var K={title:Object(u.__)("Add to Cart Button","woo-gutenberg-products-block"),description:Object(u.__)("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:Object(i.createElement)(b.a,{srcElement:U.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(v.Disabled,null,Object(i.createElement)(q.a,t))}};Object(s.registerBlockType)("woocommerce/product-button",G(G({},f),K));var W=Object(i.createElement)(p.a,{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"})),J=r(199);function $(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 X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Z={title:Object(u.__)("Product Summary","woo-gutenberg-products-block"),description:Object(u.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:W}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(J.a,t)}};Object(s.registerBlockType)("woocommerce/product-summary",X(X({},f),Z));var ee=r(787),te=r(134);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 ne(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 ce={title:Object(u.__)("On-Sale Badge","woo-gutenberg-products-block"),description:Object(u.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:ee.a}),foreground:"#96588a"},supports:{html:!1},edit:function(e){var t=e.attributes;return Object(i.createElement)(te.a,t)}};Object(s.registerBlockType)("woocommerce/product-sale-badge",ne(ne({},f),ce));var oe=Object(i.createElement)(p.a,{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"})),ae=r(5),ie=r(131),ue=r(200);function le(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 se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?le(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var be={title:Object(u.__)("Product SKU","woo-gutenberg-products-block"),description:Object(u.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:oe}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ie.a,null),Object(i.createElement)(ue.a,t))}};Object(ae.R)("woocommerce/product-sku",se(se({},f),be));var pe=r(783),de=r(201);function me(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 ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?me(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Oe={title:Object(u.__)("Product Category List","woo-gutenberg-products-block"),description:Object(u.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:pe.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ie.a,null),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(de.a,t)))}};Object(ae.R)("woocommerce/product-category-list",ge(ge({},f),Oe));var fe=r(202);function je(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 ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?je(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var he={title:Object(u.__)("Product Tag List","woo-gutenberg-products-block"),description:Object(u.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:ee.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ie.a,null),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(fe.a,t)))}};Object(ae.R)("woocommerce/product-tag-list",ve(ve({},f),he));var we=Object(i.createElement)(p.a,{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"}))),ye=r(203);function _e(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 ke(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ee={title:Object(u.__)("Product Stock Indicator","woo-gutenberg-products-block"),description:Object(u.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:we}),foreground:"#96588a"},edit:function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(ie.a,null),Object(i.createElement)(ye.a,t))}};Object(ae.R)("woocommerce/product-stock-indicator",ke(ke({},f),Ee));var Pe=r(37),Ce=(r(353),r(206)),Se=r(204);function Ne(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 xe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var De={title:Object(u.__)("Add to Cart","woo-gutenberg-products-block"),description:Object(u.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:U.a}),foreground:"#96588a"},edit:function(e){var t=e.attributes,r=e.setAttributes,n=Object(Pe.useProductDataContext)().product||{},c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:g()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(ie.a,{productId:n.id||0}),"external"!==n.type&&Object(i.createElement)(l.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Layout","woo-gutenberg-products-block")},Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Display form elements","woo-gutenberg-products-block"),help:Object(u.__)("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)(v.Disabled,null,Object(i.createElement)(Ce.a,t)))},attributes:Se.a};Object(ae.R)("woocommerce/product-add-to-cart",xe(xe({},f),De));var Be=r(11),Le=r.n(Be),Re=r(23),Ie=r.n(Re),Te=r(20),ze=r.n(Te),Ve=r(24),Me=r.n(Ve),Ae=r(25),He=r.n(Ae),Fe=r(12),Qe=r.n(Fe),Ue=r(36),qe=r(21),Ye=(r(2),r(77)),Ge=r(861),Ke=r(793),We=r(162),Je=function(e,t){var r=t.className,n=t.contentVisibility;return g()(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})},$e=function(e,t){return Object(i.createElement)(v.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(u.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(v.Button,{className:"wc-block-products__add-product-button",isDefault:!0,isLarge:!0,href:R.adminUrl+"post-new.php?post_type=product"},Object(u.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:We.a})),Object(i.createElement)(v.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(u.__)("Learn more","woo-gutenberg-products-block")))},Xe=function(e,t){return Object(i.createElement)(v.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(u.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function Ze(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 et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ze(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tt=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],rt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,et(et({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};r(801);function nt(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 ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ot=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(v.ToggleControl,{label:Object(u.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:ct(ct({},r),{},{orderBy:!r.orderBy})})}})},at=function(e,t){return Object(i.createElement)(v.SelectControl,{label:Object(u.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(u.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(u.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(u.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(u.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(u.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(u.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},it=r(26),ut=r.n(it),lt=r(9),st=r(55),bt=r.n(st),pt=r(14),dt=r.n(pt),mt=r(6),gt=r(44),Ot=(r(804),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,l=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),s=l.minIndex,b=l.maxIndex,p=r&&Boolean(1!==s),d=r&&Boolean(b!==a),m=r&&Boolean(s>3),O=r&&Boolean(b<a-2);p&&3===s&&(s-=1),d&&b===a-2&&(b+=1);var f=[];if(s&&b)for(var j=s;j<=b;j++)f.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(gt.a,{screenReaderLabel:Object(u.__)("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(u.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(gt.a,{label:"<",screenReaderLabel:Object(u.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:g()("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)(gt.a,{label:1,screenReaderLabel:Object(u.sprintf)(Object(u.__)("Page %d","woo-gutenberg-products-block"),1)})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(u.__)("…","woo-gutenberg-products-block")),f.map((function(e){return Object(i.createElement)("button",{key:e,className:g()("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)(gt.a,{label:e,screenReaderLabel:Object(u.sprintf)(Object(u.__)("Page %d","woo-gutenberg-products-block"),e)}))})),O&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(u.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:g()("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)(gt.a,{label:a,screenReaderLabel:Object(u.sprintf)(Object(u.__)("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(u.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(gt.a,{label:">",screenReaderLabel:Object(u.__)("Next page","woo-gutenberg-products-block")})))});Ot.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var ft=Ot,jt=r(146),vt=(r(803),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(jt.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(u.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(u.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(u.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(u.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(u.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(u.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(u.__)("Order products by","woo-gutenberg-products-block"),value:c})}),ht=r(184),wt=Object(ht.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(Pe.useInnerBlockLayoutContext)(),u=o.parentClassName,l=o.parentName,s=0===Object.keys(t).length,b=g()("".concat(u,"__product"),{"is-loading":s,"wc-block-layout--is-loading":s});return Object(i.createElement)("li",{className:b,"aria-hidden":s},function e(t,r,n,c){if(n){var o=Object(Ge.a)(t);return n.map((function(n,u){var l=Le()(n,2),s=l[0],b=l[1],p=void 0===b?{}:b,d=[];p.children&&p.children.length>0&&(d=e(t,r,p.children,c));var m=o[s];if(!m)return null;var g=r.id||0,O=["layout",s,u,c,g];return Object(i.createElement)(m,a()({key:O.join("_")},p,{children:d,product:r}))}))}}(l,t,c,n))})),yt=r(167),_t=r(205),kt=r(41),Et=r(59);function Pt(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 Ct(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var St=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(_t.a)(Ct(Ct({},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 u=Object(Et.a)(i),l=Object(Et.a)(o),s=Object(Ue.useSelect)((function(t){var c=t(kt.COLLECTIONS_STORE_KEY),o=[e,r,n,u,l];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,l,u]),b=s.value,p=s.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",Ct(Ct({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},Nt=r(504),xt=r(257),Dt=r(86),Bt=(r(802),r(141)),Lt=function(){var e=Object(Pe.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:Bt.a,size:100}),Object(i.createElement)("strong",{className:"".concat(e,"__no-products-title")},Object(u.__)("No products","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(e,"__no-products-description")},Object(u.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Rt=r(794),It=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(Pe.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:Rt.a,size:100}),Object(i.createElement)("strong",{className:"".concat(n,"__no-products-title")},Object(u.__)("No products found","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(n,"__no-products-description")},Object(u.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(i.createElement)("button",{onClick:r},Object(u.__)("Reset Search","woo-gutenberg-products-block")))};function Tt(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 zt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Vt=Object(xt.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,l=Object(yt.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return zt(zt({},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})),s=Le()(l,1)[0],b=St(s),p=b.products,d=b.totalProducts,m=b.productsLoading,O=Object(Pe.useInnerBlockLayoutContext)().parentClassName,f=function(e){e.order,e.orderby,e.page,e.per_page;return dt()(e,["order","orderby","page","per_page"])}(s),j=Object(yt.b)("attributes",[]),v=Le()(j,2),h=v[0],w=v[1],y=Object(yt.b)("min_price"),_=Le()(y,2),k=_[0],E=_[1],P=Object(yt.b)("max_price"),C=Le()(P,2),S=C[0],N=C[1],x=Object(Nt.a)({totalQuery:f,totalProducts:d},(function(e){var t=e.totalQuery,r=e.totalProducts,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n.totalQuery;return!Object(mt.isEqual)(t,c)&&Number.isFinite(r)})),D="object"===bt()(x)&&Object(mt.isEqual)(f,x.totalQuery);Object(i.useEffect)((function(){D||(n(1),x&&function(e){Number.isFinite(e)&&(0===e?Object(Dt.speak)(Object(u.__)("No products found","woo-gutenberg-products-block")):Object(Dt.speak)(Object(u.sprintf)(Object(u._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[s]);var B,L,R,I,T,z=t.contentVisibility,V=t.columns*t.rows,M=!Number.isFinite(d)&&D?Math.ceil(x.totalProducts/V):Math.ceil(d/V),A=p.length?p:Array.from({length:V}),H=0!==p.length||m,F=h.length>0||Number.isFinite(k)||Number.isFinite(S);return Object(i.createElement)("div",{className:(B=t.columns,L=t.rows,R=t.alignButtons,I=t.align,T=void 0!==I?"align"+I:"",g()(O,T,"has-"+B+"-columns",{"has-multiple-rows":L>1,"has-aligned-buttons":R}))},z.orderBy&&H&&Object(i.createElement)(vt,{onChange:c,value:o}),!H&&F&&Object(i.createElement)(It,{resetCallback:function(){w([]),E(null),N(null)}}),!H&&!F&&Object(i.createElement)(Lt,null),H&&Object(i.createElement)("ul",{className:"".concat(O,"__products")},A.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)(wt,{key:e.id||r,attributes:t,product:e})}))),M>1&&Object(i.createElement)(ft,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:M}))})),Mt=function(e){var t=e.attributes,r=Object(i.useState)(1),n=Le()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),u=Le()(a,2),l=u[0],s=u[1];Object(i.useEffect)((function(){s(t.orderby)}),[t.orderby]);return Object(i.createElement)(Vt,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;s(t),o(1)},sortValue:l})},At=r(169);function Ht(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=Qe()(e);if(t){var c=Qe()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return He()(this,r)}}var Ft=function(e){Me()(r,e);var t=Ht(r);function r(){return Ie()(this,r),t.apply(this,arguments)}return ut()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?At.a:Object(i.createElement)(Pe.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(Mt,{attributes:t,urlParameterSuffix:r}))}}]),r}(lt.Component);function Qt(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=Qe()(e);if(t){var c=Qe()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return He()(this,r)}}var Ut=function(e){Me()(r,e);var t=Qt(r);function r(){var e;Ie()(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()(ze()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(ze()(e),"blockMap",Object(Ge.a)("woocommerce/all-products")),c()(ze()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(ze()(e),"getTitle",(function(){return Object(u.__)("All Products","woo-gutenberg-products-block")})),c()(ze()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(ze()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(u.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(ze()(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)(l.InspectorControls,{key:"inspector"},Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ye.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(v.PanelBody,{title:Object(u.__)("Content Settings","woo-gutenberg-products-block")},ot(r,n),at(r,n)))})),c()(ze()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(l.BlockControls,null,Object(i.createElement)(v.Toolbar,{controls:[{icon:"edit",title:Object(u.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(ze()(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)(v.Placeholder,{icon:e.getIcon(),label:e.getTitle()},Object(u.__)("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)(v.Tip,null,Object(u.__)("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)(Pe.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(Pe.ProductDataContextProvider,{product:Ke.a[0]},Object(i.createElement)(l.InnerBlocks,t)))))),Object(i.createElement)("div",{className:"wc-block-all-products__actions"},Object(i.createElement)(v.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,isLarge:!0,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:rt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(u.__)("Done","woo-gutenberg-products-block")),Object(i.createElement)(v.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(u.__)("Cancel","woo-gutenberg-products-block")),Object(i.createElement)(v.IconButton,{className:"wc-block-all-products__reset-button",icon:Object(i.createElement)(b.a,{srcElement:d}),label:Object(u.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];tt.map((function(e){var t=Le()(e,2),r=t[0],n=t[1];return c.push(Object(s.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(u.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(ze()(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)(v.Disabled,null,Object(i.createElement)(Ft,{attributes:t})):Xe(c,o)})),c()(ze()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return ae.q?Object(i.createElement)("div",{className:Je("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):$e(n,c)})),e}return r}(i.Component),qt=Object(qe.compose)(v.withSpokenMessages,Object(Ue.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Ue.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Ut),Yt={columns:ae.l,rows:ae.n,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:tt,isPreview:!1};function Gt(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 Kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Gt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wt={title:Object(u.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(u.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(u.__)("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:Yt,edit:function(e){return Object(i.createElement)(qt,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:Je("wc-block-all-products",t)},n),Object(i.createElement)(l.InnerBlocks.Content,null))}};Object(s.registerBlockType)("woocommerce/all-products",Kt(Kt({},Wt),{},{deprecated:[{attributes:Object.assign({},Wt.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:Je("wc-block-all-products",t)},r),Object(i.createElement)(l.InnerBlocks.Content,null))}}]}))},86:function(e,t){!function(){e.exports=this.wp.a11y}()},861:function(e,t,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(57),c=r(198),o=r(21),a=r(10),i=r.n(a),u=r(0),l=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},s=function(e){return function(t){return function(r){var n=l(e,r);return Object(u.createElement)(t,i()({},r,n))}}},b=r(196),p=r(195),d=Object(o.compose)(s(p.a))(b.a),m=r(194),g=r(197),O=r(134),f=r(199),j=r(193),v=r(192),h=Object(o.compose)(s(v.a))(j.a),w=r(200),y=r(201),_=r(202),k=r(203),E=r(206),P=r(204),C=Object(o.compose)(s(P.a))(E.a);Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:m.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:d}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:h}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:g.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:c.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:f.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:O.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:w.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:y.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:_.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:k.a}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:C});var S=function(e){return Object(n.getRegisteredBlockComponents)(e)}},9:function(e,t){!function(){e.exports=this.React}()},98: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}});
|
build/all-reviews-legacy.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-compose', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '469dd70bf09cd398a9bef6a74bb78d22');
|
build/all-reviews-legacy.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={4: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([614,2,0,1]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},101:function(e,t,r){},102: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}}},103:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(0),i=(r(101),r(44));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,a=t.orderby,s=t.productId,l={"data-image-type":n,"data-orderby":a,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return s&&(l["data-product-id"]=s,u="wc-block-reviews-by-product"),Array.isArray(r)&&(l["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(i.a)(u,t)},l))}},104:function(e,t,r){"use strict";var n=r(18),o=r.n(n),c=r(19),i=r.n(c),a=r(20),s=r.n(a),l=r(21),u=r.n(l),b=r(10),d=r.n(b),p=r(0),w=r(1),g=r(11),m=(r(2),r(5)),v=r(4),f=r(6),h=r(57),O=r(8),j=r.n(O),y=r(7),_=r.n(y);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 R(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){j()(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 E=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,i=null!=r,a=null!=n;return!i&&a?(t=o||"span",c=R(R({},c),{},{className:_()(c.className,"screen-reader-text")}),Object(p.createElement)(t,c,n)):(t=o||g.Fragment,i&&a&&r!==n?Object(p.createElement)(t,c,Object(p.createElement)("span",{"aria-hidden":"true"},r),Object(p.createElement)("span",{className:"screen-reader-text"},n)):Object(p.createElement)(t,c,r))};E.defaultProps={wrapperProps:{}};var P=E,S=(r(213),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)(P,{label:r,screenReaderLabel:n})))});S.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var C=S,N=r(22),x=(r(210),Object(N.withInstanceId)((function(e){var t=e.className,r=e.instanceId,n=e.defaultValue,o=e.label,c=e.onChange,i=e.options,a=e.screenReaderLabel,s=e.readOnly,l=e.value,u="wc-block-components-sort-select__select-".concat(r);return Object(p.createElement)("div",{className:_()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(p.createElement)(P,{label:o,screenReaderLabel:a,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:u}}),Object(p.createElement)("select",{id:u,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:n,onChange:c,readOnly:s,value:l},i.map((function(e){return Object(p.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))),L=(r(209),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(x,{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})}),T=r(17),D=r.n(T),I=r(126),M=r.n(I),A=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=M()(e,{suffix:r,limit:t});return n.html},H=function(e,t,r,n){var o=B(e,t,r);return A(e,o-n.length,n)},B=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=A(e,n.middle),n=F(n,t.clientHeight,r);return n.middle},F=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};function V(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 z=function(e){s()(r,e);var t=V(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(D()(n)),n.onClick=n.onClick.bind(D()(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:H(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);z.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 W=z;r(212);var U=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:_()("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+"%"};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"},Object(p.createElement)("span",{style:r},Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t))))}(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)(W,{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(211);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 G(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){j()(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 q=function(e){var t=e.attributes,r=e.reviews,n=(f.n||"product"===t.imageType)&&t.showReviewImage,o=f.m&&t.showReviewRating,c=G(G({},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)(U,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(U,{key:e.id||t,attributes:c,review:e})})))},Y=r(16),K=r.n(Y),Q=r(13),X=r.n(Q),Z=r(24),$=r.n(Z),ee=r(70),te=r.n(ee),re=r(44),ne=r(26);function oe(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 ce(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 ie=function(e){var t=function(t){s()(n,t);var r=oe(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)),j()(D()(e),"isPreview",!!e.props.attributes.previewReviews),j()(D()(e),"delayedAppendReviews",e.props.delayFunction(e.appendReviews)),j()(D()(e),"state",{error:null,loading:!0,reviews:e.isPreview?e.props.attributes.previewReviews:[],totalReviews:e.isPreview?e.props.attributes.previewReviews.length:0}),j()(D()(e),"setError",function(){var t=$()(X.a.mark((function t(r){var n,o;return X.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object(ne.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||!te()(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(re.b)(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,K()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(g.Component);j()(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=ce(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)(v.Disabled,null,t.showOrderby&&f.m&&Object(p.createElement)(L,{readOnly:!0,value:t.orderby}),Object(p.createElement)(q,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(C,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ae(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 se=function(e){s()(r,e);var t=ae(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)(v.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.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,i=t.reviewsOnPageLoad,a=t.showProductName,s=t.showReviewDate,l=t.showReviewerName,u=t.showReviewContent,b=t.showReviewImage,d=t.showReviewRating,w=Object(re.c)(t.orderby),g=w.order,v=w.orderby;return!(u||d||s||l||b||a)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(re.a)(r,t)},Object(p.createElement)(ie,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(m.debounce)(e,400)},noReviewsPlaceholder:n,orderby:v,order:g,productId:c,reviewsToDisplay:i}))}}]),r}(g.Component);t.a=se},11:function(e,t){!function(){e.exports=this.React}()},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},15:function(e,t){!function(){e.exports=this.wp.blocks}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blockEditor}()},26:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(13),o=r.n(n),c=r(24),i=r.n(c),a=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)}}()},28:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(28));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")))}},4:function(e,t){!function(){e.exports=this.wp.components}()},44:function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(9),o=r.n(n),c=r(7),i=r.n(c),a=r(6),s=function(e){if(a.m){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,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,a=t.showProductName,s=t.showReviewImage,l=t.showReviewRating;return i()(e,r,{"has-image":s,"has-name":o,"has-date":n,"has-rating":l,"has-content":c,"has-product-name":a})}},5:function(e,t){!function(){e.exports=this.lodash}()},57:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(63)),i=r(636),a=Object(n.createElement)(i.a,{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"})),s=r(7),l=r.n(s),u=r(4),b=r(30);r(98),t.a=function(e){var t=e.className,r=e.error,i=e.isLoading,s=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",t)},Object(n.createElement)(b.a,{error:r}),s&&Object(n.createElement)(n.Fragment,null,i?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isDefault:!0,onClick:s},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},6:function(e,t,r){"use strict";r.d(t,"m",(function(){return o})),r.d(t,"n",(function(){return c})),r.d(t,"h",(function(){return i})),r.d(t,"j",(function(){return a})),r.d(t,"a",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"l",(function(){return u})),r.d(t,"c",(function(){return b})),r.d(t,"k",(function(){return d})),r.d(t,"b",(function(){return p})),r.d(t,"f",(function(){return w})),r.d(t,"g",(function(){return g})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return v})),r.d(t,"o",(function(){return f}));var n=r(3),o=(Object(n.getSetting)("currentUserIsAdmin",!1),Object(n.getSetting)("reviewRatingsEnabled",!0)),c=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),a=Object(n.getSetting)("min_columns",1),s=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),u=Object(n.getSetting)("min_rows",1),b=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),p=Object(n.getSetting)("default_height",500),w=(Object(n.getSetting)("placeholderImgSrc",""),Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),m=(Object(n.getSetting)("hasProducts",!0),Object(n.getSetting)("hasTags",!0)),v=Object(n.getSetting)("homeUrl",""),f=(Object(n.getSetting)("couponsEnabled",!0),Object(n.getSetting)("shippingEnabled",!0),Object(n.getSetting)("taxesEnabled",!0),Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1),Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[]),Object(n.getSetting)("isShippingCalculatorEnabled",!0),Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1),Object(n.getSetting)("wcBlocksAssetUrl","")),h=(Object(n.getSetting)("shippingCountries",{}),Object(n.getSetting)("allowedCountries",{}),Object(n.getSetting)("shippingStates",{}),Object(n.getSetting)("allowedStates",{}),Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("checkoutShowLoginReminder",!0),{id:0,title:"",permalink:""}),O=Object(n.getSetting)("storePages",{shop:h,cart:h,checkout:h,privacy:h,terms:h});O.shop.permalink,O.checkout.id,O.checkout.permalink,O.privacy.permalink,O.privacy.title,O.terms.permalink,O.terms.title,O.cart.id,O.cart.permalink,Object(n.getSetting)("checkoutAllowsGuest",!1),Object(n.getSetting)("checkoutAllowsSignup",!1),r(15)},614:function(e,t,r){"use strict";r.r(t);var n=r(8),o=r.n(n),c=r(0),i=r(1),a=r(15),s=r(63),l=r(636),u=Object(c.createElement)(l.a,{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(101),r(23)),d=r(4),p=(r(2),r(104)),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(71),m=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,className:"wc-block-all-reviews",icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},v=r(102),f=r(103),h=r(91);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({},v.a),{},{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(m,e)},save:f.a})},63:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(37),i=r.n(c),a=r(11);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))}},70:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},71: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(128),i=r(4),a=r(23),s=r(3),l=r(6),u=r(90),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.Toolbar,{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.m&&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.n&&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}))}},9:function(e,t){!function(){e.exports=this.wp.apiFetch}()},90:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(18),i=r.n(c),a=r(19),s=r.n(a),l=r(17),u=r.n(l),b=r(20),d=r.n(b),p=r(21),w=r.n(p),g=r(10),m=r.n(g),v=r(0),f=r(5),h=r(7),O=r.n(h),j=r(4),y=r(22);r(161);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=m()(e);if(t){var o=m()(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(f.isFunction)(s)?s(c):s),Object(v.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",a)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(v.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.isDefault=!0,c["aria-pressed"]=!1),Object(v.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}(v.Component);t.a=Object(y.withInstanceId)(k)},91: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.o+"img/avatar.jpg",96:o.o+"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.o+"img/avatar.jpg",96:o.o+"img/avatar.jpg"},rating:null,verified:!1}]}}},98:function(e,t,r){}});
|
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={4: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([614,2,0,1]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.React}()},101:function(e,t,r){},102: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}}},103:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(0),i=(r(101),r(44));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,a=t.orderby,s=t.productId,l={"data-image-type":n,"data-orderby":a,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return s&&(l["data-product-id"]=s,u="wc-block-reviews-by-product"),Array.isArray(r)&&(l["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(i.a)(u,t)},l))}},104:function(e,t,r){"use strict";var n=r(18),o=r.n(n),c=r(19),i=r.n(c),a=r(20),s=r.n(a),l=r(21),u=r.n(l),b=r(11),d=r.n(b),p=r(0),w=r(1),g=r(10),m=(r(2),r(5)),v=r(4),f=r(6),h=r(57),O=r(8),j=r.n(O),y=r(7),_=r.n(y);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 R(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){j()(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 E=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,i=null!=r,a=null!=n;return!i&&a?(t=o||"span",c=R(R({},c),{},{className:_()(c.className,"screen-reader-text")}),Object(p.createElement)(t,c,n)):(t=o||g.Fragment,i&&a&&r!==n?Object(p.createElement)(t,c,Object(p.createElement)("span",{"aria-hidden":"true"},r),Object(p.createElement)("span",{className:"screen-reader-text"},n)):Object(p.createElement)(t,c,r))};E.defaultProps={wrapperProps:{}};var P=E,S=(r(213),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)(P,{label:r,screenReaderLabel:n})))});S.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var C=S,N=r(22),x=(r(210),Object(N.withInstanceId)((function(e){var t=e.className,r=e.instanceId,n=e.defaultValue,o=e.label,c=e.onChange,i=e.options,a=e.screenReaderLabel,s=e.readOnly,l=e.value,u="wc-block-components-sort-select__select-".concat(r);return Object(p.createElement)("div",{className:_()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(p.createElement)(P,{label:o,screenReaderLabel:a,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:u}}),Object(p.createElement)("select",{id:u,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:n,onChange:c,readOnly:s,value:l},i.map((function(e){return Object(p.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))),L=(r(209),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(x,{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})}),T=r(17),D=r.n(T),I=r(126),M=r.n(I),A=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=M()(e,{suffix:r,limit:t});return n.html},H=function(e,t,r,n){var o=B(e,t,r);return A(e,o-n.length,n)},B=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=A(e,n.middle),n=F(n,t.clientHeight,r);return n.middle},F=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};function V(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 z=function(e){s()(r,e);var t=V(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(D()(n)),n.onClick=n.onClick.bind(D()(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:H(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);z.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 W=z;r(212);var U=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:_()("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+"%"};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"},Object(p.createElement)("span",{style:r},Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t))))}(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)(W,{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(211);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 G(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){j()(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 q=function(e){var t=e.attributes,r=e.reviews,n=(f.n||"product"===t.imageType)&&t.showReviewImage,o=f.m&&t.showReviewRating,c=G(G({},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)(U,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(U,{key:e.id||t,attributes:c,review:e})})))},Y=r(16),K=r.n(Y),Q=r(13),X=r.n(Q),Z=r(24),$=r.n(Z),ee=r(70),te=r.n(ee),re=r(44),ne=r(26);function oe(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 ce(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 ie=function(e){var t=function(t){s()(n,t);var r=oe(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)),j()(D()(e),"isPreview",!!e.props.attributes.previewReviews),j()(D()(e),"delayedAppendReviews",e.props.delayFunction(e.appendReviews)),j()(D()(e),"state",{error:null,loading:!0,reviews:e.isPreview?e.props.attributes.previewReviews:[],totalReviews:e.isPreview?e.props.attributes.previewReviews.length:0}),j()(D()(e),"setError",function(){var t=$()(X.a.mark((function t(r){var n,o;return X.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object(ne.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||!te()(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(re.b)(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,K()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(g.Component);j()(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=ce(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)(v.Disabled,null,t.showOrderby&&f.m&&Object(p.createElement)(L,{readOnly:!0,value:t.orderby}),Object(p.createElement)(q,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(C,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ae(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 se=function(e){s()(r,e);var t=ae(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)(v.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.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,i=t.reviewsOnPageLoad,a=t.showProductName,s=t.showReviewDate,l=t.showReviewerName,u=t.showReviewContent,b=t.showReviewImage,d=t.showReviewRating,w=Object(re.c)(t.orderby),g=w.order,v=w.orderby;return!(u||d||s||l||b||a)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(re.a)(r,t)},Object(p.createElement)(ie,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(m.debounce)(e,400)},noReviewsPlaceholder:n,orderby:v,order:g,productId:c,reviewsToDisplay:i}))}}]),r}(g.Component);t.a=se},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},15:function(e,t){!function(){e.exports=this.wp.blocks}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},23:function(e,t){!function(){e.exports=this.wp.blockEditor}()},26:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(13),o=r.n(n),c=r(24),i=r.n(c),a=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)}}()},28:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(28));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")))}},4:function(e,t){!function(){e.exports=this.wp.components}()},44:function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(9),o=r.n(n),c=r(7),i=r.n(c),a=r(6),s=function(e){if(a.m){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,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,a=t.showProductName,s=t.showReviewImage,l=t.showReviewRating;return i()(e,r,{"has-image":s,"has-name":o,"has-date":n,"has-rating":l,"has-content":c,"has-product-name":a})}},5:function(e,t){!function(){e.exports=this.lodash}()},57:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(60)),i=r(635),a=Object(n.createElement)(i.a,{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"})),s=r(7),l=r.n(s),u=r(4),b=r(30);r(98),t.a=function(e){var t=e.className,r=e.error,i=e.isLoading,s=e.onRetry;return Object(n.createElement)(u.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",t)},Object(n.createElement)(b.a,{error:r}),s&&Object(n.createElement)(n.Fragment,null,i?Object(n.createElement)(u.Spinner,null):Object(n.createElement)(u.Button,{isDefault:!0,onClick:s},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},6:function(e,t,r){"use strict";r.d(t,"m",(function(){return o})),r.d(t,"n",(function(){return c})),r.d(t,"h",(function(){return i})),r.d(t,"j",(function(){return a})),r.d(t,"a",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"l",(function(){return u})),r.d(t,"c",(function(){return b})),r.d(t,"k",(function(){return d})),r.d(t,"b",(function(){return p})),r.d(t,"f",(function(){return w})),r.d(t,"g",(function(){return g})),r.d(t,"d",(function(){return m})),r.d(t,"e",(function(){return v})),r.d(t,"o",(function(){return f}));var n=r(3),o=(Object(n.getSetting)("currentUserIsAdmin",!1),Object(n.getSetting)("reviewRatingsEnabled",!0)),c=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),a=Object(n.getSetting)("min_columns",1),s=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),u=Object(n.getSetting)("min_rows",1),b=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),p=Object(n.getSetting)("default_height",500),w=(Object(n.getSetting)("placeholderImgSrc",""),Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),m=(Object(n.getSetting)("hasProducts",!0),Object(n.getSetting)("hasTags",!0)),v=Object(n.getSetting)("homeUrl",""),f=(Object(n.getSetting)("couponsEnabled",!0),Object(n.getSetting)("shippingEnabled",!0),Object(n.getSetting)("taxesEnabled",!0),Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1),Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[]),Object(n.getSetting)("isShippingCalculatorEnabled",!0),Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1),Object(n.getSetting)("wcBlocksAssetUrl","")),h=(Object(n.getSetting)("shippingCountries",{}),Object(n.getSetting)("allowedCountries",{}),Object(n.getSetting)("shippingStates",{}),Object(n.getSetting)("allowedStates",{}),Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("checkoutShowLoginReminder",!0),{id:0,title:"",permalink:""}),O=Object(n.getSetting)("storePages",{shop:h,cart:h,checkout:h,privacy:h,terms:h});O.shop.permalink,O.checkout.id,O.checkout.permalink,O.privacy.permalink,O.privacy.title,O.terms.permalink,O.terms.title,O.cart.id,O.cart.permalink,Object(n.getSetting)("checkoutAllowsGuest",!1),Object(n.getSetting)("checkoutAllowsSignup",!1),r(15)},60:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(35),i=r.n(c),a=r(10);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))}},614:function(e,t,r){"use strict";r.r(t);var n=r(8),o=r.n(n),c=r(0),i=r(1),a=r(15),s=r(60),l=r(635),u=Object(c.createElement)(l.a,{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(101),r(23)),d=r(4),p=(r(2),r(104)),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(71),m=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,className:"wc-block-all-reviews",icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},v=r(102),f=r(103),h=r(91);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({},v.a),{},{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(m,e)},save:f.a})},70:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},71: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(128),i=r(4),a=r(23),s=r(3),l=r(6),u=r(90),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.Toolbar,{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.m&&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.n&&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}))}},9:function(e,t){!function(){e.exports=this.wp.apiFetch}()},90:function(e,t,r){"use strict";var n=r(16),o=r.n(n),c=r(18),i=r.n(c),a=r(19),s=r.n(a),l=r(17),u=r.n(l),b=r(20),d=r.n(b),p=r(21),w=r.n(p),g=r(11),m=r.n(g),v=r(0),f=r(5),h=r(7),O=r.n(h),j=r(4),y=r(22);r(161);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=m()(e);if(t){var o=m()(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(f.isFunction)(s)?s(c):s),Object(v.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",a)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(v.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.isDefault=!0,c["aria-pressed"]=!1),Object(v.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}(v.Component);t.a=Object(y.withInstanceId)(k)},91: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.o+"img/avatar.jpg",96:o.o+"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.o+"img/avatar.jpg",96:o.o+"img/avatar.jpg"},rating:null,verified:!1}]}}},98:function(e,t,r){}});
|
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-compose', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'e7635aae41315cc68104d6a348cf7402');
|
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([869,2,0,1]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},135: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(182),i=r(4),a=r(22),s=r(3),l=r(5),u=r(71),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.Toolbar,{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.G&&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.M&&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}))}},14:function(e,t){!function(){e.exports=this.wp.blocks}()},140:function(e,t,r){"use strict";var n=r(0),o=r(59),c=Object(n.createElement)(o.a,{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},143:function(e,t,r){},145:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(7)),c=r.n(o),i=r(44),a=r(183);r(283);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)}))))}))},152:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(5),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.Q+"img/avatar.jpg",96:o.Q+"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.Q+"img/avatar.jpg",96:o.Q+"img/avatar.jpg"},rating:null,verified:!1}]}}},16:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},170:function(e,t,r){},175: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}}},176:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(0),i=(r(170),r(77));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,a=t.orderby,s=t.productId,l={"data-image-type":n,"data-orderby":a,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return s&&(l["data-product-id"]=s,u="wc-block-reviews-by-product"),Array.isArray(r)&&(l["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(i.a)(u,t)},l))}},179:function(e,t,r){"use strict";var n=r(23),o=r.n(n),c=r(26),i=r.n(c),a=r(24),s=r.n(a),l=r(25),u=r.n(l),b=r(12),d=r.n(b),p=r(0),w=r(1),g=r(9),f=(r(2),r(6)),m=r(4),v=r(5),h=r(89),O=r(44),j=(r(349),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(145),k=(r(346),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(8),E=r.n(R),P=r(7),S=r.n(P),C=r(20),N=r.n(C),x=r(232),L=r.n(x),T=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=L()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return T(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=T(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(348);var F=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:S()("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+"%"};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"},Object(p.createElement)("span",{style:r},Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t))))}(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(347);function V(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?V(Object(r),!0).forEach((function(t){E()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(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.M||"product"===t.imageType)&&t.showReviewImage,o=v.G&&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)(F,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(F,{key:e.id||t,attributes:c,review:e})})))},W=r(10),J=r.n(W),Q=r(16),U=r.n(Q),q=r(39),K=r.n(q),Y=r(48),X=r.n(Y),Z=r(77),$=r(43);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=K()(U.a.mark((function t(r){var n,o;return U.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||!X()(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.b)(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,J()({},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.G&&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.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,i=t.reviewsOnPageLoad,a=t.showProductName,s=t.showReviewDate,l=t.showReviewerName,u=t.showReviewContent,b=t.showReviewImage,d=t.showReviewRating,w=Object(Z.c)(t.orderby),g=w.order,m=w.orderby;return!(u||d||s||l||b||a)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(r,t)},Object(p.createElement)(re,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:n,orderby:m,order:g,productId:c,reviewsToDisplay:i}))}}]),r}(g.Component);t.a=oe},21:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},4:function(e,t){!function(){e.exports=this.wp.components}()},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(16),o=r.n(n),c=r(39),i=r.n(c),a=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)}}()},44:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(0),i=(r(2),r(9)),a=r(7),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}var b=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,l=null!=r,b=null!=n;return!l&&b?(t=o||"span",a=u(u({},a),{},{className:s()(a.className,"screen-reader-text")}),Object(c.createElement)(t,a,n)):(t=o||i.Fragment,l&&b&&r!==n?Object(c.createElement)(t,a,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,a,r))};b.defaultProps={wrapperProps:{}},t.a=b},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},49:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(47));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")))}},5:function(e,t,r){"use strict";r.d(t,"k",(function(){return o})),r.d(t,"G",(function(){return c})),r.d(t,"M",(function(){return i})),r.d(t,"x",(function(){return a})),r.d(t,"z",(function(){return s})),r.d(t,"l",(function(){return l})),r.d(t,"y",(function(){return u})),r.d(t,"B",(function(){return b})),r.d(t,"n",(function(){return d})),r.d(t,"A",(function(){return p})),r.d(t,"m",(function(){return w})),r.d(t,"C",(function(){return g})),r.d(t,"t",(function(){return f})),r.d(t,"w",(function(){return m})),r.d(t,"q",(function(){return v})),r.d(t,"r",(function(){return h})),r.d(t,"s",(function(){return O})),r.d(t,"j",(function(){return j})),r.d(t,"I",(function(){return y})),r.d(t,"N",(function(){return _})),r.d(t,"p",(function(){return k})),r.d(t,"o",(function(){return R})),r.d(t,"F",(function(){return E})),r.d(t,"c",(function(){return P})),r.d(t,"u",(function(){return S})),r.d(t,"v",(function(){return C})),r.d(t,"Q",(function(){return x})),r.d(t,"H",(function(){return L})),r.d(t,"a",(function(){return T})),r.d(t,"K",(function(){return D})),r.d(t,"b",(function(){return I})),r.d(t,"J",(function(){return M})),r.d(t,"h",(function(){return A})),r.d(t,"L",(function(){return F})),r.d(t,"g",(function(){return V})),r.d(t,"i",(function(){return z})),r.d(t,"E",(function(){return G})),r.d(t,"D",(function(){return W})),r.d(t,"P",(function(){return J})),r.d(t,"O",(function(){return Q})),r.d(t,"d",(function(){return U})),r.d(t,"e",(function(){return q})),r.d(t,"f",(function(){return K})),r.d(t,"R",(function(){return X})),r.d(t,"S",(function(){return Z}));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),R=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),E=Object(n.getSetting)("productCount",0),P=Object(n.getSetting)("attributes",[]),S=Object(n.getSetting)("isShippingCalculatorEnabled",!0),C=Object(n.getSetting)("isShippingCostHidden",!1),N=Object(n.getSetting)("woocommerceBlocksPhase",1),x=Object(n.getSetting)("wcBlocksAssetUrl",""),L=Object(n.getSetting)("shippingCountries",{}),T=Object(n.getSetting)("allowedCountries",{}),D=Object(n.getSetting)("shippingStates",{}),I=Object(n.getSetting)("allowedStates",{}),M=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("checkoutShowLoginReminder",!0),B={id:0,title:"",permalink:""},H=Object(n.getSetting)("storePages",{shop:B,cart:B,checkout:B,privacy:B,terms:B}),F=H.shop.permalink,V=H.checkout.id,z=H.checkout.permalink,G=H.privacy.permalink,W=H.privacy.title,J=H.terms.permalink,Q=H.terms.title,U=H.cart.id,q=H.cart.permalink,K=Object(n.getSetting)("checkoutAllowsGuest",!1),Y=(Object(n.getSetting)("checkoutAllowsSignup",!1),r(14)),X=function(e,t){if(N>2)return Object(Y.registerBlockType)(e,t)},Z=function(e,t){if(N>1)return Object(Y.registerBlockType)(e,t)}},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(15),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))}},71:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(23),i=r.n(c),a=r(26),s=r.n(a),l=r(20),u=r.n(l),b=r(24),d=r.n(b),p=r(25),w=r.n(p),g=r(12),f=r.n(g),m=r(0),v=r(6),h=r(7),O=r.n(h),j=r(4),y=r(21);r(169);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.isDefault=!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.withInstanceId)(k)},77:function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(13),o=r.n(n),c=r(7),i=r.n(c),a=r(5),s=function(e){if(a.G){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,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,a=t.showProductName,s=t.showReviewImage,l=t.showReviewRating;return i()(e,r,{"has-image":s,"has-name":o,"has-date":n,"has-rating":l,"has-content":c,"has-product-name":a})}},869:function(e,t,r){"use strict";r.r(t);var n=r(8),o=r.n(n),c=r(0),i=r(1),a=r(14),s=r(60),l=r(59),u=Object(c.createElement)(l.a,{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(170),r(22)),d=r(4),p=(r(2),r(179)),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(135),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,className:"wc-block-all-reviews",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(175),v=r(176),h=r(152);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})},89:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(60)),i=r(140),a=r(7),s=r.n(a),l=r(4),u=r(49);r(143);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,{isDefault:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},9:function(e,t){!function(){e.exports=this.React}()}});
|
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([868,2,0,1]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},135: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(183),i=r(4),a=r(22),s=r(3),l=r(5),u=r(71),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.Toolbar,{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.G&&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.M&&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}))}},141:function(e,t,r){"use strict";var n=r(0),o=r(60),c=Object(n.createElement)(o.a,{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},144:function(e,t,r){},146:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(7)),c=r.n(o),i=r(44),a=r(184);r(284);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)}))))}))},15:function(e,t){!function(){e.exports=this.wp.blocks}()},153:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(5),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.Q+"img/avatar.jpg",96:o.Q+"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.Q+"img/avatar.jpg",96:o.Q+"img/avatar.jpg"},rating:null,verified:!1}]}}},16:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},171:function(e,t,r){},176: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}}},177:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(0),i=(r(171),r(78));t.a=function(e){var t=e.attributes,r=t.categoryIds,n=t.imageType,a=t.orderby,s=t.productId,l={"data-image-type":n,"data-orderby":a,"data-reviews-on-page-load":t.reviewsOnPageLoad,"data-reviews-on-load-more":t.reviewsOnLoadMore,"data-show-load-more":t.showLoadMore,"data-show-orderby":t.showOrderby},u="wc-block-all-reviews";return s&&(l["data-product-id"]=s,u="wc-block-reviews-by-product"),Array.isArray(r)&&(l["data-category-ids"]=r.join(","),u="wc-block-reviews-by-category"),Object(c.createElement)("div",o()({className:Object(i.a)(u,t)},l))}},180:function(e,t,r){"use strict";var n=r(23),o=r.n(n),c=r(26),i=r.n(c),a=r(24),s=r.n(a),l=r(25),u=r.n(l),b=r(12),d=r.n(b),p=r(0),w=r(1),g=r(9),f=(r(2),r(6)),m=r(4),v=r(5),h=r(91),O=r(44),j=(r(350),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(146),k=(r(347),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(8),E=r.n(R),P=r(7),S=r.n(P),C=r(20),N=r.n(C),x=r(233),L=r.n(x),T=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=L()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return T(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=T(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(349);var F=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:S()("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+"%"};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"},Object(p.createElement)("span",{style:r},Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t))))}(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(348);function V(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?V(Object(r),!0).forEach((function(t){E()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(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.M||"product"===t.imageType)&&t.showReviewImage,o=v.G&&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)(F,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(F,{key:e.id||t,attributes:c,review:e})})))},W=r(10),J=r.n(W),Q=r(16),U=r.n(Q),q=r(39),K=r.n(q),Y=r(48),X=r.n(Y),Z=r(78),$=r(43);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=K()(U.a.mark((function t(r){var n,o;return U.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||!X()(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.b)(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,J()({},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.G&&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.className,n=e.noReviewsPlaceholder,o=t.categoryIds,c=t.productId,i=t.reviewsOnPageLoad,a=t.showProductName,s=t.showReviewDate,l=t.showReviewerName,u=t.showReviewContent,b=t.showReviewImage,d=t.showReviewRating,w=Object(Z.c)(t.orderby),g=w.order,m=w.orderby;return!(u||d||s||l||b||a)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(r,t)},Object(p.createElement)(re,{attributes:t,categoryIds:o,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:n,orderby:m,order:g,productId:c,reviewsToDisplay:i}))}}]),r}(g.Component);t.a=oe},21:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},4:function(e,t){!function(){e.exports=this.wp.components}()},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(16),o=r.n(n),c=r(39),i=r.n(c),a=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)}}()},44:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(0),i=(r(2),r(9)),a=r(7),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}var b=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,l=null!=r,b=null!=n;return!l&&b?(t=o||"span",a=u(u({},a),{},{className:s()(a.className,"screen-reader-text")}),Object(c.createElement)(t,a,n)):(t=o||i.Fragment,l&&b&&r!==n?Object(c.createElement)(t,a,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,a,r))};b.defaultProps={wrapperProps:{}},t.a=b},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},49:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(47));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")))}},5:function(e,t,r){"use strict";r.d(t,"k",(function(){return o})),r.d(t,"G",(function(){return c})),r.d(t,"M",(function(){return i})),r.d(t,"x",(function(){return a})),r.d(t,"z",(function(){return s})),r.d(t,"l",(function(){return l})),r.d(t,"y",(function(){return u})),r.d(t,"B",(function(){return b})),r.d(t,"n",(function(){return d})),r.d(t,"A",(function(){return p})),r.d(t,"m",(function(){return w})),r.d(t,"C",(function(){return g})),r.d(t,"t",(function(){return f})),r.d(t,"w",(function(){return m})),r.d(t,"q",(function(){return v})),r.d(t,"r",(function(){return h})),r.d(t,"s",(function(){return O})),r.d(t,"j",(function(){return j})),r.d(t,"I",(function(){return y})),r.d(t,"N",(function(){return _})),r.d(t,"p",(function(){return k})),r.d(t,"o",(function(){return R})),r.d(t,"F",(function(){return E})),r.d(t,"c",(function(){return P})),r.d(t,"u",(function(){return S})),r.d(t,"v",(function(){return C})),r.d(t,"Q",(function(){return x})),r.d(t,"H",(function(){return L})),r.d(t,"a",(function(){return T})),r.d(t,"K",(function(){return D})),r.d(t,"b",(function(){return I})),r.d(t,"J",(function(){return M})),r.d(t,"h",(function(){return A})),r.d(t,"L",(function(){return F})),r.d(t,"g",(function(){return V})),r.d(t,"i",(function(){return z})),r.d(t,"E",(function(){return G})),r.d(t,"D",(function(){return W})),r.d(t,"P",(function(){return J})),r.d(t,"O",(function(){return Q})),r.d(t,"d",(function(){return U})),r.d(t,"e",(function(){return q})),r.d(t,"f",(function(){return K})),r.d(t,"R",(function(){return X})),r.d(t,"S",(function(){return Z}));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),R=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),E=Object(n.getSetting)("productCount",0),P=Object(n.getSetting)("attributes",[]),S=Object(n.getSetting)("isShippingCalculatorEnabled",!0),C=Object(n.getSetting)("isShippingCostHidden",!1),N=Object(n.getSetting)("woocommerceBlocksPhase",1),x=Object(n.getSetting)("wcBlocksAssetUrl",""),L=Object(n.getSetting)("shippingCountries",{}),T=Object(n.getSetting)("allowedCountries",{}),D=Object(n.getSetting)("shippingStates",{}),I=Object(n.getSetting)("allowedStates",{}),M=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("checkoutShowLoginReminder",!0),B={id:0,title:"",permalink:""},H=Object(n.getSetting)("storePages",{shop:B,cart:B,checkout:B,privacy:B,terms:B}),F=H.shop.permalink,V=H.checkout.id,z=H.checkout.permalink,G=H.privacy.permalink,W=H.privacy.title,J=H.terms.permalink,Q=H.terms.title,U=H.cart.id,q=H.cart.permalink,K=Object(n.getSetting)("checkoutAllowsGuest",!1),Y=(Object(n.getSetting)("checkoutAllowsSignup",!1),r(15)),X=function(e,t){if(N>2)return Object(Y.registerBlockType)(e,t)},Z=function(e,t){if(N>1)return Object(Y.registerBlockType)(e,t)}},58:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(14),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){!function(){e.exports=this.lodash}()},71:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(23),i=r.n(c),a=r(26),s=r.n(a),l=r(20),u=r.n(l),b=r(24),d=r.n(b),p=r(25),w=r.n(p),g=r(12),f=r.n(g),m=r(0),v=r(6),h=r(7),O=r.n(h),j=r(4),y=r(21);r(170);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.isDefault=!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.withInstanceId)(k)},78:function(e,t,r){"use strict";r.d(t,"c",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return u}));var n=r(13),o=r.n(n),c=r(7),i=r.n(c),a=r(5),s=function(e){if(a.G){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,t){var r=t.className,n=t.showReviewDate,o=t.showReviewerName,c=t.showReviewContent,a=t.showProductName,s=t.showReviewImage,l=t.showReviewRating;return i()(e,r,{"has-image":s,"has-name":o,"has-date":n,"has-rating":l,"has-content":c,"has-product-name":a})}},868:function(e,t,r){"use strict";r.r(t);var n=r(8),o=r.n(n),c=r(0),i=r(1),a=r(15),s=r(58),l=r(60),u=Object(c.createElement)(l.a,{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(171),r(22)),d=r(4),p=(r(2),r(180)),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(135),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,className:"wc-block-all-reviews",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(176),v=r(177),h=r(153);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})},9:function(e,t){!function(){e.exports=this.React}()},91:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(58)),i=r(141),a=r(7),s=r.n(a),l=r(4),u=r(49);r(144);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,{isDefault:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}}});
|
build/attribute-filter-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', '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'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', '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'), 'version' => '712fd4f1843db829289fdd497be09ff2');
|
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=
|
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 u in r)n.call(r,u)&&r[u]&&e.push(u)}}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){e.exports=n(61)()},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){var r=n(73),o=n(74),i=n(54),c=n(75);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"s",(function(){return i})),n.d(t,"w",(function(){return c})),n.d(t,"p",(function(){return u})),n.d(t,"l",(function(){return a})),n.d(t,"o",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"x",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"m",(function(){return g})),n.d(t,"n",(function(){return m})),n.d(t,"A",(function(){return h})),n.d(t,"t",(function(){return v})),n.d(t,"a",(function(){return y})),n.d(t,"u",(function(){return O})),n.d(t,"b",(function(){return w})),n.d(t,"f",(function(){return j})),n.d(t,"v",(function(){return E})),n.d(t,"g",(function(){return _})),n.d(t,"r",(function(){return x})),n.d(t,"q",(function(){return k})),n.d(t,"z",(function(){return R})),n.d(t,"y",(function(){return P})),n.d(t,"d",(function(){return C})),n.d(t,"e",(function(){return D}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),u=(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","")),a=(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),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),h=(Object(r.getSetting)("woocommerceBlocksPhase",1),Object(r.getSetting)("wcBlocksAssetUrl","")),v=Object(r.getSetting)("shippingCountries",{}),y=Object(r.getSetting)("allowedCountries",{}),O=Object(r.getSetting)("shippingStates",{}),w=Object(r.getSetting)("allowedStates",{}),j=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("checkoutShowLoginReminder",!0)),S={id:0,title:"",permalink:""},I=Object(r.getSetting)("storePages",{shop:S,cart:S,checkout:S,privacy:S,terms:S}),E=I.shop.permalink,_=(I.checkout.id,I.checkout.permalink),x=I.privacy.permalink,k=I.privacy.title,R=I.terms.permalink,P=I.terms.title,C=(I.cart.id,I.cart.permalink),D=Object(r.getSetting)("checkoutAllowsGuest",!1);Object(r.getSetting)("checkoutAllowsSignup",!1),n(41)},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){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){!function(){e.exports=this.wp.htmlEntities}()},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 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 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,n){"use strict";var r=n(6),o=n.n(r),i=(n(5),n(3)),c=n(4),u=n.n(c);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){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 l=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,a=null!=n,l=null!=r;return!a&&l?(t=o||"span",c=s(s({},c),{},{className:u()(c.className,"screen-reader-text")}),React.createElement(t,c,r)):(t=o||i.Fragment,a&&l&&n!==r?React.createElement(t,c,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,c,n))};l.defaultProps={wrapperProps:{}},t.a=l},,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){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(60);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(22),o=n(19);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},,,function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(38),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){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(32),o=n.n(r),i=n(33),c=n.n(i),u=n(19),a=n.n(u),s=n(34),l=n.n(s),p=n(35),d=n.n(p),f=n(24),b=n.n(f),g=n(6),m=n.n(g),h=(n(5),n(3)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.A,"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,u=e.errorMessage,a=e.errorMessagePrefix,s=void 0===a?Object(v.__)("Error:","woo-gutenberg-products-block"):a;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),u&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",u)))};n(63);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()(a()(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=this.state,u=c.errorMessage;return c.hasError?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(h.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){!function(){e.exports=this.ReactDOM}()},,,,,,,,,function(e,t,n){var r=n(55);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,n){var r=n(91),o=n(92),i=n(54),c=n(93);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},,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(62);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var u=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 u.name="Invariant Violation",u}}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,u=e[Symbol.iterator]();!(r=(c=u.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.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(3);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),u=n.leading,a=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 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||!u||s.current||(d.current.apply(d,e),s.current=!0),l.current=setTimeout((function(){var t=!0;u&&s.current&&(t=!1),f(),!p.current&&a&&t&&d.current.apply(d,e)}),t),o&&!i.current&&a&&(i.current=setTimeout((function(){var e=c.current;f(),p.current||d.current.apply(null,e)}),o))}),[o,t,f,u,a]),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 c}));var r=n(8),o=n.n(r),i=n(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},function(e,t,n){"use strict";e.exports=n(121)},,,,function(e,t,n){var r=n(55);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 p})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return f}));var r=n(8),o=n.n(r),i=n(16),c=n(13),u=n(0),a=n(58),s=n(7),l=n(39),p=function(e){var t=Object(a.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(u.useCallback)((function(t){r(e,t)}),[e])]},d=function(e,t,n){var r=Object(a.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(u.useCallback)((function(t){s(n,e,t)}),[n,e])]},f=function(e,t){var n=Object(a.a)(),r=p(t=t||n),i=o()(r,2),c=i[0],d=i[1],f=Object(l.a)(e),b=Object(u.useRef)(!1);return Object(u.useEffect)((function(){d(Object(s.assign)({},c,f)),b.current=!0}),[f]),b.current?[c,d]:[e,d]}},,,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,u){return i<e&&c>t||i>e&&c<t?0:i<=e&&u<=n||c>=t&&u>=n?i-e-r:c>t&&u<n||i<e&&u>n?c-t+o:0}t.a=function(e,t){var n=t.scrollMode,o=t.block,u=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!r(e))throw new TypeError("Invalid target");for(var p=document.scrollingElement||document.documentElement,d=[],f=e;r(f)&&l(f);){if((f=f.parentNode)===p){d.push(f);break}f===document.body&&i(f)&&!i(document.documentElement)||i(f,s)&&d.push(f)}for(var b=window.visualViewport?visualViewport.width:innerWidth,g=window.visualViewport?visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),y=v.height,O=v.width,w=v.top,j=v.right,S=v.bottom,I=v.left,E="start"===o||"nearest"===o?w:"end"===o?S:w+y/2,_="center"===u?I+O/2:"end"===u?j:I,x=[],k=0;k<d.length;k++){var R=d[k],P=R.getBoundingClientRect(),C=P.height,D=P.width,T=P.top,M=P.right,A=P.bottom,H=P.left;if("if-needed"===n&&w>=0&&I>=0&&S<=g&&j<=b&&w>=T&&S<=A&&I>=H&&j<=M)return x;var N=getComputedStyle(R),L=parseInt(N.borderLeftWidth,10),V=parseInt(N.borderTopWidth,10),B=parseInt(N.borderRightWidth,10),K=parseInt(N.borderBottomWidth,10),F=0,U=0,q="offsetWidth"in R?R.offsetWidth-R.clientWidth-L-B:0,$="offsetHeight"in R?R.offsetHeight-R.clientHeight-V-K:0;if(p===R)F="start"===o?E:"end"===o?E-g:"nearest"===o?c(h,h+g,g,V,K,h+E,h+E+y,y):E-g/2,U="start"===u?_:"center"===u?_-b/2:"end"===u?_-b:c(m,m+b,b,L,B,m+_,m+_+O,O),F=Math.max(0,F+h),U=Math.max(0,U+m);else{F="start"===o?E-T-V:"end"===o?E-A+K+$:"nearest"===o?c(T,A,C,V,K+$,E,E+y,y):E-(T+C/2)+$/2,U="start"===u?_-H-L:"center"===u?_-(H+D/2)+q/2:"end"===u?_-M+B+q:c(H,M,D,L,B+q,_,_+O,O);var W=R.scrollLeft,Y=R.scrollTop;E+=Y-(F=Math.max(0,Math.min(Y+F,R.scrollHeight-C+$))),_+=W-(U=Math.max(0,Math.min(W+U,R.scrollWidth-D+q)))}x.push({el:R,top:F,left:U})}return x}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(11),o=n.n(r),i=n(6),c=n.n(i),u=n(45),a=n(44);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=function(e){var t=e.Block,n=e.selector,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c,p=document.querySelectorAll(n);p.length&&Array.prototype.forEach.call(p,(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(u.render)(React.createElement(a.a,c,React.createElement(t,o()({},r,{attributes:p}))),e)}))}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(16),o=n(13),i=n(0),c=n(86),u=n(39),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,s=void 0===a?[]:a,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(u.a)(p),m=Object(u.a)(s),h=Object(c.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";var r=n(0),o=n(2),i=n(16),c=n(13);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,u=t.dispatch(i.SCHEMA_STORE_KEY),a=u.receiveRoutes,s=u.startResolution,l=u.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||c("getRoutes",[e])||(s("getRoutes",[e]),a(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},function(e,t,n){"use strict";
|
7 |
/** @license React v16.13.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="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case d:case c:case a:case u:case b:return e;default:switch(e=e&&e.$$typeof){case l:case f:case h:case m:case s:return e;default:return t}}case i:return t}}}function S(e){return j(e)===d}t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=f,t.Fragment=c,t.Lazy=h,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=u,t.Suspense=b,t.isAsyncMode=function(e){return S(e)||j(e)===p},t.isConcurrentMode=S,t.isContextConsumer=function(e){return j(e)===l},t.isContextProvider=function(e){return j(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return j(e)===f},t.isFragment=function(e){return j(e)===c},t.isLazy=function(e){return j(e)===h},t.isMemo=function(e){return j(e)===m},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===a},t.isStrictMode=function(e){return j(e)===u},t.isSuspense=function(e){return j(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===d||e===a||e===u||e===b||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===f||e.$$typeof===y||e.$$typeof===O||e.$$typeof===w||e.$$typeof===v)},t.typeOf=j},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),o=n(83);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,u=Object(r.useState)(e),a=u[0],s=u[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]),[a,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(5),n(4)),i=n.n(o),c=n(28),u=(n(156),function(e){var t=e.className,n=e.disabled,o=e.label,u=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,a=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:a},React.createElement(c.a,{label:u,screenReaderLabel:l}))});u.defaultProps={disabled:!1},t.a=u},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(7),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 u=c.slug.filter((function(e){return e!==o})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(c.slug=u.sort(),a.push(c)),t(Object(r.sortBy)(a,"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){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(6),o=n.n(r),i=n(56),c=n.n(i),u=n(22),a=n.n(u),s=n(8),l=n.n(s),p=n(0),d=n(97),f=n(107),b=n(58),g=n(128),m=n(7),h=n(39);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(b.a)();o="".concat(o,"-collection-data");var i=Object(d.a)(o),u=l()(i,1)[0],s=Object(d.b)("calculate_attribute_counts",[],o),v=l()(s,2),O=v[0],w=v[1],j=Object(d.b)("calculate_price_range",null,o),S=l()(j,2),I=S[0],E=S[1],_=Object(h.a)(t||{}),x=Object(h.a)(n);Object(p.useEffect)((function(){"object"===a()(_)&&Object.keys(_).length&&(O.find((function(e){return e.taxonomy===_.taxonomy}))||w([].concat(c()(O),[_])))}),[_,O,w]),Object(p.useEffect)((function(){I!==x&&void 0!==x&&E(x)}),[x,E,I]);var k=Object(p.useState)(!1),R=l()(k,2),P=R[0],C=R[1],D=Object(g.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(m.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(u)}),[u]);return Object(f.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){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(120),o=n(102),i=n(6),c=n.n(i),u=n(8),a=n.n(u),s=n(1),l=n(43),p=n(97),d=n(107),f=n(203),b=n(39),g=n(0),m=n(56),h=n.n(m),v=n(5),y=n.n(v),O=n(4),w=n.n(O),j=(n(207),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,u=void 0===c?[]:c,l=e.isLoading,p=void 0!==l&&l,d=e.isDisabled,f=void 0!==d&&d,b=e.limit,m=void 0===b?10:b,v=Object(g.useState)(!1),y=a()(v,2),O=y[0],j=y[1],S=Object(g.useMemo)((function(){return h()(Array(5)).map((function(e,t){return React.createElement("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),I=Object(g.useMemo)((function(){var e=i.length-m;return!O&&React.createElement("li",{key:"show-more",className:"show-more"},React.createElement("button",{onClick:function(){j(!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,m,O]),E=Object(g.useMemo)((function(){return O&&React.createElement("li",{key:"show-less",className:"show-less"},React.createElement("button",{onClick:function(){j(!1)},"aria-expanded":!0,"aria-label":Object(s.__)("Show less options","woo-gutenberg-products-block")},Object(s.__)("Show less","woo-gutenberg-products-block")))}),[O]),_=Object(g.useMemo)((function(){var e=i.length>m+5;return React.createElement(g.Fragment,null,i.map((function(t,n){return React.createElement(g.Fragment,{key:t.value},React.createElement("li",e&&!O&&n>=m&&{hidden:!0},React.createElement("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:u.includes(t.value),disabled:f}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===m-1&&I)})),e&&E)}),[i,u,O,m,E,I,f]),x=w()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":p},t);return React.createElement("ul",{className:x},p?S:_)}),S=n(30),I=n(10),E=n(14),_=n(100),x=n(3),k=(n(87),n(101)),R=0;function P(e){return"function"==typeof e?e:C}function C(){}function D(e,t){null!==e&&Object(k.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 T(e,t){return e===t||e.contains&&e.contains(t)}function M(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 A(){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 H(){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 N(e){var t=e.isOpen,n=e.selectedItem,r=e.resultCount,o=e.previousResultCount,i=e.itemToString;return t?r?r!==o?r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":n?i(n):""}function L(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function V(e){return"string"==typeof e.type}function B(e){return e.props}var K=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function F(e){void 0===e&&(e={});var t={};return K.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function U(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=q(t,r)?t[r]:e[r],n}),{})}function q(e,t){return void 0!==e[t]}function $(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function W(e,t,n,r,o){void 0===o&&(o=!0);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 u=Y(e,c,n,r,o);return-1===u?t:u}function Y(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 u=t-1;u>=0;u--)if(!r(u).hasAttribute("disabled"))return u;return o?e>0?Y(1,0,n,r,!1):Y(-1,n-1,n,r,!1):-1}function Q(e,t,n,r,o){return void 0===o&&(o=!0),[t,n].some((function(t){return t&&(T(t,e)||o&&T(t,r.activeElement))}))}var z=M((function(){X().textContent=""}),500);function G(e,t){var n=X(t);e&&(n.textContent=e,z())}function X(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 J=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}),Z=function(){var e=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+String(R++),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=F(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=F(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 u=c?e(t):e;u=n.props.stateReducer(t,u),r=u.hasOwnProperty("selectedItem");var a={},s={};return r&&u.selectedItem!==t.selectedItem&&(o=u.selectedItem),u.type=u.type||0,Object.keys(u).forEach((function(e){t[e]!==u[e]&&(i[e]=u[e]),"type"!==e&&(s[e]=u[e],q(n.props,e)||(a[e]=u[e]))})),c&&u.hasOwnProperty("inputValue")&&n.props.onInputValueChange(u.inputValue,Object(I.a)({},n.getStateAndHelpers(),{},u)),a}),(function(){P(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,u=o.ref,a=Object(S.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]=H(u,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),a)},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=W(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=W(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){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({type:5,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;e.preventDefault();var n=this.getItemCount(),r=this.getState().isOpen;if(!(n<=0)&&r){var o=Y(1,0,n,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}},End:function(e){var t=this;e.preventDefault();var n=this.getItemCount(),r=this.getState().isOpen;if(!(n<=0)&&r){var o=Y(-1,n-1,n,(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,u=Object(S.a)(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),a=n.getState().isOpen,s={onClick:A(r,n.buttonHandleClick),onKeyDown:A(o,n.buttonHandleKeyDown),onKeyUp:A(i,n.buttonHandleKeyUp),onBlur:A(c,n.buttonHandleBlur)},l=u.disabled?{}:s;return Object(I.a)({type:"button",role:"button","aria-label":a?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,{},u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=$(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(Object(E.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,u=(t.onChangeText,Object(S.a)(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),a={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;u.disabled||((s={}).onChange=A(i,c,n.inputHandleChange),s.onKeyDown=A(r,n.inputHandleKeyDown),s.onBlur=A(o,n.inputHandleBlur),a=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},a,{},u)},n.inputHandleKeyDown=function(e){var t=$(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(Object(E.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,u=o.ref,a=Object(S.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]=H(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=a&&a["aria-label"]?null:n.labelId,r.id=n.menuId,r),a)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick,u=(r.onPress,r.index),a=r.item,s=void 0===a?void 0:a,l=Object(S.a)(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===u?(n.items.push(s),u=n.items.indexOf(s)):n.items[u]=s;var p=c,d=((t={onMouseMove:A(o,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:A(i,(function(e){e.preventDefault()}))}).onClick=A(p,(function(){n.selectItemAtIndex(u,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return Object(I.a)({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},f,{},l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=F(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=F(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),P(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=M((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,G(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,c=void 0===i?o:i,u=r.defaultIsOpen,a=r.initialIsOpen,s=void 0===a?u:a,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}Object(_.a)(t,e);var n=t.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},n.getState=function(e){return void 0===e&&(e=this.state),U(e,this.props)},n.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},n.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},n.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},n.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=W(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},n.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,c=this.id,u=this.getRootProps,a=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,p=this.getInputProps,d=this.getItemProps,f=this.openMenu,b=this.closeMenu,g=this.toggleMenu,m=this.selectItem,h=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,O=this.clearSelection,w=this.clearItems;return{getRootProps:u,getToggleButtonProps:a,getLabelProps:s,getMenuProps:l,getInputProps:p,getItemProps:d,reset:this.reset,openMenu:f,closeMenu:b,toggleMenu:g,selectItem:m,selectItemAtIndex:h,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:O,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:c,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},n.componentDidMount=function(){var e=this;var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!Q(t.target,e._rootNode,e._menuNode,e.props.environment.document)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=Q(t.target,e._rootNode,e._menuNode,e.props.environment.document,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},c=this.props.environment;c.addEventListener("mousedown",t),c.addEventListener("mouseup",n),c.addEventListener("touchstart",r),c.addEventListener("touchmove",o),c.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),c.removeEventListener("mousedown",t),c.removeEventListener("mouseup",n),c.removeEventListener("touchstart",r),c.removeEventListener("touchmove",o),c.removeEventListener("touchend",i)}},n.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},n.componentDidUpdate=function(e,t){q(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var e=L(this.props.children,C);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=L(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:V(t)?Object(x.cloneElement)(t,this.getRootProps(B(t))):void 0:null},t}(x.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:N,itemToString:function(e){return null==e?"":String(e)},onStateChange:C,onInputValueChange:C,onUserAction:C,onChange:C,onSelect:C,onOuterClick:C,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:D},e.stateChangeTypes=J,e}();var ee={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11yStatusMessage:function(e){var t=e.isOpen,n=e.items;if(!n)return"";var r=n.length;return t?0===r?"No results are available":r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":""},getA11ySelectionMessage:function(e){var t=e.selectedItem;return(0,e.itemToString)(t)+" has been selected."},scrollIntoView:D,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};y.a.array.isRequired,y.a.func,y.a.func,y.a.func,y.a.bool,y.a.number,y.a.number,y.a.number,y.a.bool,y.a.bool,y.a.bool,y.a.any,y.a.any,y.a.any,y.a.string,y.a.string,y.a.string,y.a.func,y.a.string,y.a.func,y.a.func,y.a.func,y.a.func,y.a.func,y.a.shape({addEventListener:y.a.func,removeEventListener:y.a.func,document:y.a.shape({getElementById:y.a.func,activeElement:y.a.any,body:y.a.any})});y.a.array.isRequired,y.a.func,y.a.func,y.a.func,y.a.bool,y.a.number,y.a.number,y.a.number,y.a.bool,y.a.bool,y.a.bool,y.a.any,y.a.any,y.a.any,y.a.string,y.a.string,y.a.string,y.a.string,y.a.string,y.a.string,y.a.func,y.a.string,y.a.string,y.a.func,y.a.func,y.a.func,y.a.func,y.a.func,y.a.func,y.a.shape({addEventListener:y.a.func,removeEventListener:y.a.func,document:y.a.shape({getElementById:y.a.func,activeElement:y.a.any,body:y.a.any})}),Object(I.a)({},ee,{circularNavigation:!0});var te=Z,ne=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,o=e.isDisabled,i=e.onFocus,c=e.onRemoveItem,u=e.placeholder,a=e.tabIndex,s=e.value;return React.createElement("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&c(t[t.length-1])},placeholder:u,tabIndex:a}))},re=function(e){var t=e.children,n=e.onClick;return React.createElement("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},oe=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,o=e.highlightedIndex,i=e.options;return React.createElement("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),i.map((function(e,r){var i=t.includes(e.value);return React.createElement("li",n({key:e.value,className:w()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":i,"is-highlighted":o===r}),index:r,item:e.value,"aria-label":i?Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},ie=function(e){var t=e.onRemoveItem,n=e.option;return React.createElement("button",{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",onClick:function(){t(n.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||t(n.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),n.name)},React.createElement("span",{className:"wc-block-dropdown-selector__selected-chip__label wc-block-components-dropdown-selector__selected-chip__label"},n.label),React.createElement("span",{className:"wc-block-dropdown-selector__selected-chip__remove wc-block-components-dropdown-selector__selected-chip__remove"},"𝘅"))},ce=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,o=Object(g.useRef)(null);return Object(g.useEffect)((function(){o.current.focus()}),[o]),React.createElement("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},React.createElement("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),React.createElement("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},"𝘅"))};n(206);function ue(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 ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var se=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,o=e.checked,i=void 0===o?[]:o,c=e.inputLabel,u=void 0===c?"":c,a=e.isDisabled,l=void 0!==a&&a,p=e.isLoading,d=void 0!==p&&p,f=e.multiple,b=void 0!==f&&f,m=e.onChange,h=void 0===m?function(){}:m,v=e.options,y=void 0===v?[]:v,O=Object(g.useRef)(null),j=w()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":l,"is-loading":d}),S=Object(g.useCallback)((function(e,t){switch(t.type){case te.stateChangeTypes.keyDownEnter:case te.stateChangeTypes.clickItem:return ae(ae({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:b,inputValue:""});case te.stateChangeTypes.blurInput:case te.stateChangeTypes.mouseUp:return ae(ae({},t),{},{inputValue:e.inputValue});default:return t}}),[b]);return React.createElement(te,{onChange:h,selectedItem:null,stateReducer:S},(function(e){var t=e.getInputProps,r=e.getItemProps,o=e.getLabelProps,c=e.getMenuProps,a=e.highlightedIndex,p=e.inputValue,d=e.isOpen,f=e.openMenu;return React.createElement("div",{className:w()(j,{"is-multiple":b,"is-single":!b})},React.createElement("label",o({className:"screen-reader-text"}),u),React.createElement(re,{isOpen:d,onClick:function(){return O.current.focus()}},i.map((function(e){var t=y.find((function(t){return t.value===e})),n=function(e){h(e),O.current.focus()};return b?React.createElement(ie,{key:e,onRemoveItem:n,option:t}):React.createElement(ce,{key:e,onClick:function(){return O.current.focus()},onRemoveItem:n,option:t})})),React.createElement(ne,{checked:i,getInputProps:t,inputRef:O,isDisabled:l,onFocus:f,onRemoveItem:function(e){h(e),O.current.focus()},placeholder:i.length>0&&b?null:Object(s.sprintf)(Object(s.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!b&&i.length>0?"-1":"0",value:p})),d&&!l&&React.createElement(oe,{checked:i,getItemProps:r,getMenuProps:c,highlightedIndex:a,options:y.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},le=n(129),pe=n(38),de=n.n(pe),fe=n(15),be=n(130),ge=n(131),me=n(28),he=function(e){var t=e.name,n=e.count;return React.createElement(g.Fragment,null,t,Number.isFinite(n)&&React.createElement(me.a,{label:n,screenReaderLabel:Object(s.sprintf)(Object(s._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},ve=[{value:"preview-1",name:"Blue",label:React.createElement(he,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:React.createElement(he,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:React.createElement(he,{name:"Red",count:2})}],ye={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(205);function Oe(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 we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var je=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,o=t.isPreview&&!t.attributeId?ye:Object(be.a)(t.attributeId),i=Object(g.useState)([]),c=a()(i,2),u=c[0],m=c[1],h=Object(g.useState)(t.isPreview&&!t.attributeId?ve:[]),v=a()(h,2),y=v[0],O=v[1],w=Object(p.a)(),S=a()(w,1)[0],I=Object(p.b)("attributes",[]),E=a()(I,2),_=E[0],x=E[1],k=Object(d.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[o.id],shouldSelect:t.attributeId>0}),R=k.results,P=k.isLoading,C="dropdown"!==t.displayStyle&&"and"===t.queryType,D=Object(f.a)({queryAttribute:{taxonomy:o.taxonomy,queryType:t.queryType},queryState:we(we({},S),{},{attributes:C?S.attributes:null})}),T=D.results,M=D.isLoading,A=Object(g.useCallback)((function(e){return T.attribute_counts?T.attribute_counts.find((function(t){return t.term===e})):null}),[T]);Object(g.useEffect)((function(){if(!P&&!M){var e=R.map((function(e){var n,r=A(e.id);if(!(r||u.includes(e.slug)||(n=e.slug,S&&S.attributes&&S.attributes.some((function(e){var t=e.attribute,r=e.slug,i=void 0===r?[]:r;return t===o.taxonomy&&i.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(fe.decodeEntities)(e.name),label:React.createElement(he,{name:Object(fe.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);O(e)}}),[o.taxonomy,R,P,t.showCounts,M,A,u,S.attributes]),Object(g.useEffect)((function(){t.showFilterButton||V()}),[u,V]);var H=Object(g.useMemo)((function(){return _.filter((function(e){return e.attribute===o.taxonomy})).flatMap((function(e){return e.slug}))}),[_,o.taxonomy]),N=Object(b.a)(H);Object(g.useEffect)((function(){de()(u,H)||m(H)}),[N]);var L=Object(g.useCallback)((function(e){return R.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[R]),V=function(){r||Object(ge.b)(_,x,o,L(u),"or"===t.queryType?"in":"and")},B="dropdown"!==t.displayStyle||"or"===t.queryType,K=Object(g.useCallback)((function(e){var t,n=function(e){return y.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,o=t?n(t):null,i=r?n(r):null;o&&i?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter replaced with %s.","woo-gutenberg-products-block"),o,i)):o?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter added.","woo-gutenberg-products-block"),o)):i&&Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter removed.","woo-gutenberg-products-block"),i))},o=u.includes(e);B?(t=u.filter((function(t){return t!==e})),o?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=o?[]:[e],r({filterAdded:o?null:e,filterRemoved:1===u.length?u[0]:null}));m(t)}),[u,y,B]);if(0===y.length&&!P)return null;var F="h".concat(t.headingLevel),U=!t.isPreview&&P,q=!t.isPreview&&M;return React.createElement(g.Fragment,null,!r&&t.heading&&React.createElement(F,null,t.heading),React.createElement("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?React.createElement(se,{attributeLabel:o.label,checked:u,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:U,multiple:B,onChange:K,options:y}):React.createElement(j,{className:"wc-block-attribute-filter-list",options:y,checked:u,onChange:K,isLoading:U,isDisabled:q}),t.showFilterButton&&React.createElement(le.a,{className:"wc-block-attribute-filter__button",disabled:U||q,onClick:V})))};Object(o.a)({selector:".wp-block-woocommerce-attribute-filter",Block:Object(r.a)(je),getProps:function(e){return{attributes:{attributeId:parseInt(e.dataset.attributeId||0,10),showCounts:"true"===e.dataset.showCounts,queryType:e.dataset.queryType,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,displayStyle:e.dataset.displayStyle,showFilterButton:"true"===e.dataset.showFilterButton}}}})}]);
|
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=258)}([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.wc.wcSettings}()},function(e,t){!function(){e.exports=this.React}()},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 u in r)n.call(r,u)&&r[u]&&e.push(u)}}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){e.exports=n(62)()},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){var r=n(74),o=n(75),i=n(55),c=n(76);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"s",(function(){return i})),n.d(t,"w",(function(){return c})),n.d(t,"p",(function(){return u})),n.d(t,"l",(function(){return a})),n.d(t,"o",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"x",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"j",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"m",(function(){return g})),n.d(t,"n",(function(){return m})),n.d(t,"A",(function(){return h})),n.d(t,"t",(function(){return v})),n.d(t,"a",(function(){return y})),n.d(t,"u",(function(){return O})),n.d(t,"b",(function(){return w})),n.d(t,"f",(function(){return j})),n.d(t,"v",(function(){return E})),n.d(t,"g",(function(){return _})),n.d(t,"r",(function(){return x})),n.d(t,"q",(function(){return k})),n.d(t,"z",(function(){return R})),n.d(t,"y",(function(){return P})),n.d(t,"d",(function(){return C})),n.d(t,"e",(function(){return D}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),u=(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","")),a=(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),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),h=(Object(r.getSetting)("woocommerceBlocksPhase",1),Object(r.getSetting)("wcBlocksAssetUrl","")),v=Object(r.getSetting)("shippingCountries",{}),y=Object(r.getSetting)("allowedCountries",{}),O=Object(r.getSetting)("shippingStates",{}),w=Object(r.getSetting)("allowedStates",{}),j=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("checkoutShowLoginReminder",!0)),S={id:0,title:"",permalink:""},I=Object(r.getSetting)("storePages",{shop:S,cart:S,checkout:S,privacy:S,terms:S}),E=I.shop.permalink,_=(I.checkout.id,I.checkout.permalink),x=I.privacy.permalink,k=I.privacy.title,R=I.terms.permalink,P=I.terms.title,C=(I.cart.id,I.cart.permalink),D=Object(r.getSetting)("checkoutAllowsGuest",!1);Object(r.getSetting)("checkoutAllowsSignup",!1),n(41)},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){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){!function(){e.exports=this.wp.htmlEntities}()},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 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 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,n){"use strict";var r=n(6),o=n.n(r),i=(n(5),n(3)),c=n(4),u=n.n(c);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){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 l=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,a=null!=n,l=null!=r;return!a&&l?(t=o||"span",c=s(s({},c),{},{className:u()(c.className,"screen-reader-text")}),React.createElement(t,c,r)):(t=o||i.Fragment,a&&l&&n!==r?React.createElement(t,c,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,c,n))};l.defaultProps={wrapperProps:{}},t.a=l},,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){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(61);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(22),o=n(19);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},,,function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(38),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){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(32),o=n.n(r),i=n(33),c=n.n(i),u=n(19),a=n.n(u),s=n(34),l=n.n(s),p=n(35),d=n.n(p),f=n(24),b=n.n(f),g=n(6),m=n.n(g),h=(n(5),n(3)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.A,"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,u=e.errorMessage,a=e.errorMessagePrefix,s=void 0===a?Object(v.__)("Error:","woo-gutenberg-products-block"):a;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),u&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",u)))};n(64);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()(a()(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=this.state,u=c.errorMessage;return c.hasError?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(h.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){!function(){e.exports=this.ReactDOM}()},,,,,,,,,,function(e,t,n){var r=n(56);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,n){var r=n(92),o=n(93),i=n(55),c=n(94);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},,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(63);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var u=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 u.name="Invariant Violation",u}}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,u=e[Symbol.iterator]();!(r=(c=u.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.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(3);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),u=n.leading,a=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 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||!u||s.current||(d.current.apply(d,e),s.current=!0),l.current=setTimeout((function(){var t=!0;u&&s.current&&(t=!1),f(),!p.current&&a&&t&&d.current.apply(d,e)}),t),o&&!i.current&&a&&(i.current=setTimeout((function(){var e=c.current;f(),p.current||d.current.apply(null,e)}),o))}),[o,t,f,u,a]),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 c}));var r=n(8),o=n.n(r),i=n(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},function(e,t,n){"use strict";e.exports=n(123)},,,,function(e,t,n){var r=n(56);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 p})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return f}));var r=n(8),o=n.n(r),i=n(16),c=n(13),u=n(0),a=n(59),s=n(7),l=n(39),p=function(e){var t=Object(a.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(u.useCallback)((function(t){r(e,t)}),[e])]},d=function(e,t,n){var r=Object(a.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(u.useCallback)((function(t){s(n,e,t)}),[n,e])]},f=function(e,t){var n=Object(a.a)(),r=p(t=t||n),i=o()(r,2),c=i[0],d=i[1],f=Object(l.a)(e),b=Object(u.useRef)(!1);return Object(u.useEffect)((function(){d(Object(s.assign)({},c,f)),b.current=!0}),[f]),b.current?[c,d]:[e,d]}},,,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,u){return i<e&&c>t||i>e&&c<t?0:i<=e&&u<=n||c>=t&&u>=n?i-e-r:c>t&&u<n||i<e&&u>n?c-t+o:0}t.a=function(e,t){var n=t.scrollMode,o=t.block,u=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!r(e))throw new TypeError("Invalid target");for(var p=document.scrollingElement||document.documentElement,d=[],f=e;r(f)&&l(f);){if((f=f.parentNode)===p){d.push(f);break}f===document.body&&i(f)&&!i(document.documentElement)||i(f,s)&&d.push(f)}for(var b=window.visualViewport?visualViewport.width:innerWidth,g=window.visualViewport?visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,h=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),y=v.height,O=v.width,w=v.top,j=v.right,S=v.bottom,I=v.left,E="start"===o||"nearest"===o?w:"end"===o?S:w+y/2,_="center"===u?I+O/2:"end"===u?j:I,x=[],k=0;k<d.length;k++){var R=d[k],P=R.getBoundingClientRect(),C=P.height,D=P.width,T=P.top,M=P.right,A=P.bottom,H=P.left;if("if-needed"===n&&w>=0&&I>=0&&S<=g&&j<=b&&w>=T&&S<=A&&I>=H&&j<=M)return x;var N=getComputedStyle(R),L=parseInt(N.borderLeftWidth,10),V=parseInt(N.borderTopWidth,10),B=parseInt(N.borderRightWidth,10),K=parseInt(N.borderBottomWidth,10),F=0,U=0,q="offsetWidth"in R?R.offsetWidth-R.clientWidth-L-B:0,$="offsetHeight"in R?R.offsetHeight-R.clientHeight-V-K:0;if(p===R)F="start"===o?E:"end"===o?E-g:"nearest"===o?c(h,h+g,g,V,K,h+E,h+E+y,y):E-g/2,U="start"===u?_:"center"===u?_-b/2:"end"===u?_-b:c(m,m+b,b,L,B,m+_,m+_+O,O),F=Math.max(0,F+h),U=Math.max(0,U+m);else{F="start"===o?E-T-V:"end"===o?E-A+K+$:"nearest"===o?c(T,A,C,V,K+$,E,E+y,y):E-(T+C/2)+$/2,U="start"===u?_-H-L:"center"===u?_-(H+D/2)+q/2:"end"===u?_-M+B+q:c(H,M,D,L,B+q,_,_+O,O);var W=R.scrollLeft,Y=R.scrollTop;E+=Y-(F=Math.max(0,Math.min(Y+F,R.scrollHeight-C+$))),_+=W-(U=Math.max(0,Math.min(W+U,R.scrollWidth-D+q)))}x.push({el:R,top:F,left:U})}return x}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(11),o=n.n(r),i=n(6),c=n.n(i),u=n(45),a=n(44);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=function(e){var t=e.Block,n=e.selector,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c,p=document.querySelectorAll(n);p.length&&Array.prototype.forEach.call(p,(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(u.render)(React.createElement(a.a,c,React.createElement(t,o()({},r,{attributes:p}))),e)}))}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(16),o=n(13),i=n(0),c=n(87),u=n(39),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,s=void 0===a?[]:a,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(u.a)(p),m=Object(u.a)(s),h=Object(c.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";var r=n(0),o=n(2),i=n(16),c=n(13);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,u=t.dispatch(i.SCHEMA_STORE_KEY),a=u.receiveRoutes,s=u.startResolution,l=u.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||c("getRoutes",[e])||(s("getRoutes",[e]),a(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},function(e,t,n){"use strict";
|
7 |
/** @license React v16.13.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.
|
14 |
+
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,c=r?Symbol.for("react.fragment"):60107,u=r?Symbol.for("react.strict_mode"):60108,a=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,b=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,h=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function j(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case p:case d:case c:case a:case u:case b:return e;default:switch(e=e&&e.$$typeof){case l:case f:case h:case m:case s:return e;default:return t}}case i:return t}}}function S(e){return j(e)===d}t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=f,t.Fragment=c,t.Lazy=h,t.Memo=m,t.Portal=i,t.Profiler=a,t.StrictMode=u,t.Suspense=b,t.isAsyncMode=function(e){return S(e)||j(e)===p},t.isConcurrentMode=S,t.isContextConsumer=function(e){return j(e)===l},t.isContextProvider=function(e){return j(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return j(e)===f},t.isFragment=function(e){return j(e)===c},t.isLazy=function(e){return j(e)===h},t.isMemo=function(e){return j(e)===m},t.isPortal=function(e){return j(e)===i},t.isProfiler=function(e){return j(e)===a},t.isStrictMode=function(e){return j(e)===u},t.isSuspense=function(e){return j(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===d||e===a||e===u||e===b||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===l||e.$$typeof===f||e.$$typeof===y||e.$$typeof===O||e.$$typeof===w||e.$$typeof===v)},t.typeOf=j},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),o=n(84);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,u=Object(r.useState)(e),a=u[0],s=u[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]),[a,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(5),n(4)),i=n.n(o),c=n(28),u=(n(156),function(e){var t=e.className,n=e.disabled,o=e.label,u=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,a=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:a},React.createElement(c.a,{label:u,screenReaderLabel:l}))});u.defaultProps={disabled:!1},t.a=u},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(7),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 u=c.slug.filter((function(e){return e!==o})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(c.slug=u.sort(),a.push(c)),t(Object(r.sortBy)(a,"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){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(6),o=n.n(r),i=n(57),c=n.n(i),u=n(22),a=n.n(u),s=n(8),l=n.n(s),p=n(0),d=n(98),f=n(109),b=n(59),g=n(130),m=n(7),h=n(39);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(b.a)();o="".concat(o,"-collection-data");var i=Object(d.a)(o),u=l()(i,1)[0],s=Object(d.b)("calculate_attribute_counts",[],o),v=l()(s,2),O=v[0],w=v[1],j=Object(d.b)("calculate_price_range",null,o),S=l()(j,2),I=S[0],E=S[1],_=Object(h.a)(t||{}),x=Object(h.a)(n);Object(p.useEffect)((function(){"object"===a()(_)&&Object.keys(_).length&&(O.find((function(e){return e.taxonomy===_.taxonomy}))||w([].concat(c()(O),[_])))}),[_,O,w]),Object(p.useEffect)((function(){I!==x&&void 0!==x&&E(x)}),[x,E,I]);var k=Object(p.useState)(!1),R=l()(k,2),P=R[0],C=R[1],D=Object(g.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(m.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(u)}),[u]);return Object(f.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){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(122),o=n(103),i=n(6),c=n.n(i),u=n(8),a=n.n(u),s=n(1),l=n(43),p=n(98),d=n(109),f=n(202),b=n(39),g=n(0),m=n(57),h=n.n(m),v=n(5),y=n.n(v),O=n(4),w=n.n(O),j=(n(206),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,u=void 0===c?[]:c,l=e.isLoading,p=void 0!==l&&l,d=e.isDisabled,f=void 0!==d&&d,b=e.limit,m=void 0===b?10:b,v=Object(g.useState)(!1),y=a()(v,2),O=y[0],j=y[1],S=Object(g.useMemo)((function(){return h()(Array(5)).map((function(e,t){return React.createElement("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),I=Object(g.useMemo)((function(){var e=i.length-m;return!O&&React.createElement("li",{key:"show-more",className:"show-more"},React.createElement("button",{onClick:function(){j(!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,m,O]),E=Object(g.useMemo)((function(){return O&&React.createElement("li",{key:"show-less",className:"show-less"},React.createElement("button",{onClick:function(){j(!1)},"aria-expanded":!0,"aria-label":Object(s.__)("Show less options","woo-gutenberg-products-block")},Object(s.__)("Show less","woo-gutenberg-products-block")))}),[O]),_=Object(g.useMemo)((function(){var e=i.length>m+5;return React.createElement(g.Fragment,null,i.map((function(t,n){return React.createElement(g.Fragment,{key:t.value},React.createElement("li",e&&!O&&n>=m&&{hidden:!0},React.createElement("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:u.includes(t.value),disabled:f}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===m-1&&I)})),e&&E)}),[i,u,O,m,E,I,f]),x=w()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":p},t);return React.createElement("ul",{className:x},p?S:_)}),S=n(30),I=n(10),E=n(14),_=n(101),x=n(3),k=(n(88),n(102)),R=0;function P(e){return"function"==typeof e?e:C}function C(){}function D(e,t){null!==e&&Object(k.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 T(e,t){return e===t||e.contains&&e.contains(t)}function M(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 A(){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 H(){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 N(e){var t=e.isOpen,n=e.selectedItem,r=e.resultCount,o=e.previousResultCount,i=e.itemToString;return t?r?r!==o?r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":n?i(n):""}function L(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function V(e){return"string"==typeof e.type}function B(e){return e.props}var K=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function F(e){void 0===e&&(e={});var t={};return K.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function U(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=q(t,r)?t[r]:e[r],n}),{})}function q(e,t){return void 0!==e[t]}function $(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function W(e,t,n,r,o){void 0===o&&(o=!0);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 u=Y(e,c,n,r,o);return-1===u?t:u}function Y(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 u=t-1;u>=0;u--)if(!r(u).hasAttribute("disabled"))return u;return o?e>0?Y(1,0,n,r,!1):Y(-1,n-1,n,r,!1):-1}function Q(e,t,n,r,o){return void 0===o&&(o=!0),[t,n].some((function(t){return t&&(T(t,e)||o&&T(t,r.activeElement))}))}var z=M((function(){X().textContent=""}),500);function G(e,t){var n=X(t);e&&(n.textContent=e,z())}function X(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 J=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}),Z=function(){var e=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.props.id||"downshift-"+String(R++),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=F(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=F(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 u=c?e(t):e;u=n.props.stateReducer(t,u),r=u.hasOwnProperty("selectedItem");var a={},s={};return r&&u.selectedItem!==t.selectedItem&&(o=u.selectedItem),u.type=u.type||0,Object.keys(u).forEach((function(e){t[e]!==u[e]&&(i[e]=u[e]),"type"!==e&&(s[e]=u[e],q(n.props,e)||(a[e]=u[e]))})),c&&u.hasOwnProperty("inputValue")&&n.props.onInputValueChange(u.inputValue,Object(I.a)({},n.getStateAndHelpers(),{},u)),a}),(function(){P(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,u=o.ref,a=Object(S.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]=H(u,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),a)},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=W(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=W(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){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({type:5,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;e.preventDefault();var n=this.getItemCount(),r=this.getState().isOpen;if(!(n<=0)&&r){var o=Y(1,0,n,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}},End:function(e){var t=this;e.preventDefault();var n=this.getItemCount(),r=this.getState().isOpen;if(!(n<=0)&&r){var o=Y(-1,n-1,n,(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,u=Object(S.a)(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),a=n.getState().isOpen,s={onClick:A(r,n.buttonHandleClick),onKeyDown:A(o,n.buttonHandleKeyDown),onKeyUp:A(i,n.buttonHandleKeyUp),onBlur:A(c,n.buttonHandleBlur)},l=u.disabled?{}:s;return Object(I.a)({type:"button",role:"button","aria-label":a?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,{},u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=$(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(Object(E.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,u=(t.onChangeText,Object(S.a)(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),a={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;u.disabled||((s={}).onChange=A(i,c,n.inputHandleChange),s.onKeyDown=A(r,n.inputHandleKeyDown),s.onBlur=A(o,n.inputHandleBlur),a=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},a,{},u)},n.inputHandleKeyDown=function(e){var t=$(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(Object(E.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,u=o.ref,a=Object(S.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]=H(u,n.menuRef),r.role="listbox",r["aria-labelledby"]=a&&a["aria-label"]?null:n.labelId,r.id=n.menuId,r),a)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick,u=(r.onPress,r.index),a=r.item,s=void 0===a?void 0:a,l=Object(S.a)(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===u?(n.items.push(s),u=n.items.indexOf(s)):n.items[u]=s;var p=c,d=((t={onMouseMove:A(o,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:A(i,(function(e){e.preventDefault()}))}).onClick=A(p,(function(){n.selectItemAtIndex(u,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return Object(I.a)({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},f,{},l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=F(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=F(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),P(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=M((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,G(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,c=void 0===i?o:i,u=r.defaultIsOpen,a=r.initialIsOpen,s=void 0===a?u:a,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}Object(_.a)(t,e);var n=t.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},n.getState=function(e){return void 0===e&&(e=this.state),U(e,this.props)},n.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},n.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},n.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},n.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=W(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},n.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,c=this.id,u=this.getRootProps,a=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,p=this.getInputProps,d=this.getItemProps,f=this.openMenu,b=this.closeMenu,g=this.toggleMenu,m=this.selectItem,h=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,O=this.clearSelection,w=this.clearItems;return{getRootProps:u,getToggleButtonProps:a,getLabelProps:s,getMenuProps:l,getInputProps:p,getItemProps:d,reset:this.reset,openMenu:f,closeMenu:b,toggleMenu:g,selectItem:m,selectItemAtIndex:h,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:O,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:c,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},n.componentDidMount=function(){var e=this;var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!Q(t.target,e._rootNode,e._menuNode,e.props.environment.document)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=Q(t.target,e._rootNode,e._menuNode,e.props.environment.document,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},c=this.props.environment;c.addEventListener("mousedown",t),c.addEventListener("mouseup",n),c.addEventListener("touchstart",r),c.addEventListener("touchmove",o),c.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),c.removeEventListener("mousedown",t),c.removeEventListener("mouseup",n),c.removeEventListener("touchstart",r),c.removeEventListener("touchmove",o),c.removeEventListener("touchend",i)}},n.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},n.componentDidUpdate=function(e,t){q(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var e=L(this.props.children,C);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=L(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:V(t)?Object(x.cloneElement)(t,this.getRootProps(B(t))):void 0:null},t}(x.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:N,itemToString:function(e){return null==e?"":String(e)},onStateChange:C,onInputValueChange:C,onUserAction:C,onChange:C,onSelect:C,onOuterClick:C,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:D},e.stateChangeTypes=J,e}();var ee={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11yStatusMessage:function(e){var t=e.isOpen,n=e.items;if(!n)return"";var r=n.length;return t?0===r?"No results are available":r+" result"+(1===r?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":""},getA11ySelectionMessage:function(e){var t=e.selectedItem;return(0,e.itemToString)(t)+" has been selected."},scrollIntoView:D,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};y.a.array.isRequired,y.a.func,y.a.func,y.a.func,y.a.bool,y.a.number,y.a.number,y.a.number,y.a.bool,y.a.bool,y.a.bool,y.a.any,y.a.any,y.a.any,y.a.string,y.a.string,y.a.string,y.a.func,y.a.string,y.a.func,y.a.func,y.a.func,y.a.func,y.a.func,y.a.shape({addEventListener:y.a.func,removeEventListener:y.a.func,document:y.a.shape({getElementById:y.a.func,activeElement:y.a.any,body:y.a.any})});y.a.array.isRequired,y.a.func,y.a.func,y.a.func,y.a.bool,y.a.number,y.a.number,y.a.number,y.a.bool,y.a.bool,y.a.bool,y.a.any,y.a.any,y.a.any,y.a.string,y.a.string,y.a.string,y.a.string,y.a.string,y.a.string,y.a.func,y.a.string,y.a.string,y.a.func,y.a.func,y.a.func,y.a.func,y.a.func,y.a.func,y.a.shape({addEventListener:y.a.func,removeEventListener:y.a.func,document:y.a.shape({getElementById:y.a.func,activeElement:y.a.any,body:y.a.any})}),Object(I.a)({},ee,{circularNavigation:!0});var te=Z,ne=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,o=e.isDisabled,i=e.onFocus,c=e.onRemoveItem,u=e.placeholder,a=e.tabIndex,s=e.value;return React.createElement("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&c(t[t.length-1])},placeholder:u,tabIndex:a}))},re=function(e){var t=e.children,n=e.onClick;return React.createElement("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},oe=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,o=e.highlightedIndex,i=e.options;return React.createElement("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),i.map((function(e,r){var i=t.includes(e.value);return React.createElement("li",n({key:e.value,className:w()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":i,"is-highlighted":o===r}),index:r,item:e.value,"aria-label":i?Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},ie=function(e){var t=e.onRemoveItem,n=e.option;return React.createElement("button",{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",onClick:function(){t(n.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||t(n.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),n.name)},React.createElement("span",{className:"wc-block-dropdown-selector__selected-chip__label wc-block-components-dropdown-selector__selected-chip__label"},n.label),React.createElement("span",{className:"wc-block-dropdown-selector__selected-chip__remove wc-block-components-dropdown-selector__selected-chip__remove"},"𝘅"))},ce=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,o=Object(g.useRef)(null);return Object(g.useEffect)((function(){o.current.focus()}),[o]),React.createElement("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},React.createElement("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),React.createElement("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},"𝘅"))};n(205);function ue(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 ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var se=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,o=e.checked,i=void 0===o?[]:o,c=e.inputLabel,u=void 0===c?"":c,a=e.isDisabled,l=void 0!==a&&a,p=e.isLoading,d=void 0!==p&&p,f=e.multiple,b=void 0!==f&&f,m=e.onChange,h=void 0===m?function(){}:m,v=e.options,y=void 0===v?[]:v,O=Object(g.useRef)(null),j=w()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":l,"is-loading":d}),S=Object(g.useCallback)((function(e,t){switch(t.type){case te.stateChangeTypes.keyDownEnter:case te.stateChangeTypes.clickItem:return ae(ae({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:b,inputValue:""});case te.stateChangeTypes.blurInput:case te.stateChangeTypes.mouseUp:return ae(ae({},t),{},{inputValue:e.inputValue});default:return t}}),[b]);return React.createElement(te,{onChange:h,selectedItem:null,stateReducer:S},(function(e){var t=e.getInputProps,r=e.getItemProps,o=e.getLabelProps,c=e.getMenuProps,a=e.highlightedIndex,p=e.inputValue,d=e.isOpen,f=e.openMenu;return React.createElement("div",{className:w()(j,{"is-multiple":b,"is-single":!b})},React.createElement("label",o({className:"screen-reader-text"}),u),React.createElement(re,{isOpen:d,onClick:function(){return O.current.focus()}},i.map((function(e){var t=y.find((function(t){return t.value===e})),n=function(e){h(e),O.current.focus()};return b?React.createElement(ie,{key:e,onRemoveItem:n,option:t}):React.createElement(ce,{key:e,onClick:function(){return O.current.focus()},onRemoveItem:n,option:t})})),React.createElement(ne,{checked:i,getInputProps:t,inputRef:O,isDisabled:l,onFocus:f,onRemoveItem:function(e){h(e),O.current.focus()},placeholder:i.length>0&&b?null:Object(s.sprintf)(Object(s.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!b&&i.length>0?"-1":"0",value:p})),d&&!l&&React.createElement(oe,{checked:i,getItemProps:r,getMenuProps:c,highlightedIndex:a,options:y.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},le=n(131),pe=n(38),de=n.n(pe),fe=n(15),be=n(132),ge=n(133),me=n(28),he=function(e){var t=e.name,n=e.count;return React.createElement(g.Fragment,null,t,Number.isFinite(n)&&React.createElement(me.a,{label:n,screenReaderLabel:Object(s.sprintf)(Object(s._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},ve=[{value:"preview-1",name:"Blue",label:React.createElement(he,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:React.createElement(he,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:React.createElement(he,{name:"Red",count:2})}],ye={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(204);function Oe(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 we(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var je=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,o=t.isPreview&&!t.attributeId?ye:Object(be.a)(t.attributeId),i=Object(g.useState)([]),c=a()(i,2),u=c[0],m=c[1],h=Object(g.useState)(t.isPreview&&!t.attributeId?ve:[]),v=a()(h,2),y=v[0],O=v[1],w=Object(p.a)(),S=a()(w,1)[0],I=Object(p.b)("attributes",[]),E=a()(I,2),_=E[0],x=E[1],k=Object(d.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[o.id],shouldSelect:t.attributeId>0}),R=k.results,P=k.isLoading,C="dropdown"!==t.displayStyle&&"and"===t.queryType,D=Object(f.a)({queryAttribute:{taxonomy:o.taxonomy,queryType:t.queryType},queryState:we(we({},S),{},{attributes:C?S.attributes:null})}),T=D.results,M=D.isLoading,A=Object(g.useCallback)((function(e){return T.attribute_counts?T.attribute_counts.find((function(t){return t.term===e})):null}),[T]);Object(g.useEffect)((function(){if(!P&&!M){var e=R.map((function(e){var n,r=A(e.id);if(!(r||u.includes(e.slug)||(n=e.slug,S&&S.attributes&&S.attributes.some((function(e){var t=e.attribute,r=e.slug,i=void 0===r?[]:r;return t===o.taxonomy&&i.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(fe.decodeEntities)(e.name),label:React.createElement(he,{name:Object(fe.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);O(e)}}),[o.taxonomy,R,P,t.showCounts,M,A,u,S.attributes]),Object(g.useEffect)((function(){t.showFilterButton||V()}),[u,V]);var H=Object(g.useMemo)((function(){return _.filter((function(e){return e.attribute===o.taxonomy})).flatMap((function(e){return e.slug}))}),[_,o.taxonomy]),N=Object(b.a)(H);Object(g.useEffect)((function(){de()(u,H)||m(H)}),[N]);var L=Object(g.useCallback)((function(e){return R.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[R]),V=function(){r||Object(ge.b)(_,x,o,L(u),"or"===t.queryType?"in":"and")},B="dropdown"!==t.displayStyle||"or"===t.queryType,K=Object(g.useCallback)((function(e){var t,n=function(e){return y.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,o=t?n(t):null,i=r?n(r):null;o&&i?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter replaced with %s.","woo-gutenberg-products-block"),o,i)):o?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter added.","woo-gutenberg-products-block"),o)):i&&Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter removed.","woo-gutenberg-products-block"),i))},o=u.includes(e);B?(t=u.filter((function(t){return t!==e})),o?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=o?[]:[e],r({filterAdded:o?null:e,filterRemoved:1===u.length?u[0]:null}));m(t)}),[u,y,B]);if(0===y.length&&!P)return null;var F="h".concat(t.headingLevel),U=!t.isPreview&&P,q=!t.isPreview&&M;return React.createElement(g.Fragment,null,!r&&t.heading&&React.createElement(F,null,t.heading),React.createElement("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?React.createElement(se,{attributeLabel:o.label,checked:u,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:U,multiple:B,onChange:K,options:y}):React.createElement(j,{className:"wc-block-attribute-filter-list",options:y,checked:u,onChange:K,isLoading:U,isDisabled:q}),t.showFilterButton&&React.createElement(le.a,{className:"wc-block-attribute-filter__button",disabled:U||q,onClick:V})))};Object(o.a)({selector:".wp-block-woocommerce-attribute-filter",Block:Object(r.a)(je),getProps:function(e){return{attributes:{attributeId:parseInt(e.dataset.attributeId||0,10),showCounts:"true"===e.dataset.showCounts,queryType:e.dataset.queryType,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,displayStyle:e.dataset.displayStyle,showFilterButton:"true"===e.dataset.showFilterButton}}}})}]);
|
build/attribute-filter.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport'), 'version' => 'f19d04ea5592b5b49d8558f9c9af95ec');
|
build/attribute-filter.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var r,i,u=t[0],a=t[1],l=t[2],b=0,d=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(c,i)&&c[i]&&d.push(c[i][0]),c[i]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(s&&s(t);d.length;)d.shift()();return o.push.apply(o,l||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={7:0},o=[];function i(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,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},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 u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var l=0;l<u.length;l++)t(u[l]);var s=a;return o.push([858,2,0,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},112: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){},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){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},14:function(e,t){!function(){e.exports=this.wp.blocks}()},147:function(e,t,n){"use strict";var r=n(23),c=n.n(r),o=n(26),i=n.n(o),u=n(24),a=n.n(u),l=n(25),s=n.n(l),b=n(12),d=n.n(b),p=n(0),f=n(6),g=n(1),O=n(4);function m(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(p.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(O.Path,{d:n[t]})):null}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 n,r=d()(e);if(t){var c=d()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var j=function(e){a()(n,e);var t=h(n);function n(){return c()(this,n),t.apply(this,arguments)}return i()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(m,{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,o=t.maxLevel,i=t.selectedLevel,u=t.onChange;return Object(p.createElement)(O.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(m,{level:i}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,i,u)}))})}}]),n}(p.Component);t.a=j},150:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(11),c=n.n(r),o=n(0),i=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},161:function(e,t,n){"use strict";var r=n(0),c=n(59),o=Object(r.createElement)(c.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.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(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},166:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return p}));var r=n(11),c=n.n(r),o=n(41),i=n(36),u=n(0),a=n(97),l=n(6),s=n(58),b=function(e){var t=Object(a.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(u.useCallback)((function(t){r(e,t)}),[e])]},d=function(e,t,n){var r=Object(a.a)();n=n||r;var c=Object(i.useSelect)((function(r){return r(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(u.useCallback)((function(t){l(n,e,t)}),[n,e])]},p=function(e,t){var n=Object(a.a)(),r=b(t=t||n),o=c()(r,2),i=o[0],d=o[1],p=Object(s.a)(e),f=Object(u.useRef)(!1);return Object(u.useEffect)((function(){d(Object(l.assign)({},i,p)),f.current=!0}),[p]),f.current?[i,d]:[e,d]}},177:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),o=n(7),i=n.n(o);n(253);t.a=function(e){var t=e.className,n=e.headingLevel,o=e.onChange,u=e.heading,a="h".concat(n);return Object(r.createElement)(a,null,Object(r.createElement)(c.PlainText,{className:i()("wc-block-editor-components-title",t),value:u,onChange:o}))}},18:function(e,t){!function(){e.exports=this.wp.url}()},204:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41),c=n(36),o=n(0),i=n(150),u=n(58),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,l=void 0===a?[]:a,s=e.query,b=void 0===s?{}:s,d=e.shouldSelect,p=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 f=Object(o.useRef)({results:[],isLoading:!0}),g=Object(u.a)(b),O=Object(u.a)(l),m=Object(i.a)(),h=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),o=[t,n,g,O],i=c.getCollectionError.apply(c,o);return i&&m(i),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,n,O,g,p]);return null!==h&&(f.current=h),f.current}},21:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},253:function(e,t,n){},256:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(7)),i=n.n(o),u=n(44),a=(n(506),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(c.__)("Go","woo-gutenberg-products-block"):o,l=e.onClick,s=e.screenReaderLabel,b=void 0===s?Object(c.__)("Apply filter","woo-gutenberg-products-block"):s;return Object(r.createElement)("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:l},Object(r.createElement)(u.a,{label:a,screenReaderLabel:b}))});a.defaultProps={disabled:!1},t.a=a},257:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(5),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}),[]),o=function(e){if(e)return c.find((function(t){return t.id===e}))},i=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},258:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o}));var r=n(6),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]:"",o=e.filter((function(e){return e.attribute===n.taxonomy})),i=o.length?o[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(c)){var u=i.slug.filter((function(e){return e!==c})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(i.slug=u.sort(),a.push(i)),t(Object(r.sortBy)(a,"attribute"))}},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,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(i):(i.push({attribute:n.taxonomy,operator:o,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(i,"attribute")))}},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},34:function(e,t){!function(){e.exports=this.moment}()},36:function(e,t){!function(){e.exports=this.wp.data}()},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},44:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),i=(n(2),n(9)),u=n(7),a=n.n(u);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}var b=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,u=e.wrapperProps,l=null!=n,b=null!=r;return!l&&b?(t=c||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,r)):(t=c||i.Fragment,l&&b&&n!==r?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,u,n))};b.defaultProps={wrapperProps:{}},t.a=b},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},5:function(e,t,n){"use strict";n.d(t,"k",(function(){return c})),n.d(t,"G",(function(){return o})),n.d(t,"M",(function(){return i})),n.d(t,"x",(function(){return u})),n.d(t,"z",(function(){return a})),n.d(t,"l",(function(){return l})),n.d(t,"y",(function(){return s})),n.d(t,"B",(function(){return b})),n.d(t,"n",(function(){return d})),n.d(t,"A",(function(){return p})),n.d(t,"m",(function(){return f})),n.d(t,"C",(function(){return g})),n.d(t,"t",(function(){return O})),n.d(t,"w",(function(){return m})),n.d(t,"q",(function(){return h})),n.d(t,"r",(function(){return j})),n.d(t,"s",(function(){return v})),n.d(t,"j",(function(){return w})),n.d(t,"I",(function(){return y})),n.d(t,"N",(function(){return _})),n.d(t,"p",(function(){return k})),n.d(t,"o",(function(){return E})),n.d(t,"F",(function(){return S})),n.d(t,"c",(function(){return P})),n.d(t,"u",(function(){return x})),n.d(t,"v",(function(){return C})),n.d(t,"Q",(function(){return N})),n.d(t,"H",(function(){return D})),n.d(t,"a",(function(){return T})),n.d(t,"K",(function(){return I})),n.d(t,"b",(function(){return L})),n.d(t,"J",(function(){return B})),n.d(t,"h",(function(){return A})),n.d(t,"L",(function(){return F})),n.d(t,"g",(function(){return H})),n.d(t,"i",(function(){return z})),n.d(t,"E",(function(){return q})),n.d(t,"D",(function(){return Y})),n.d(t,"P",(function(){return K})),n.d(t,"O",(function(){return Q})),n.d(t,"d",(function(){return U})),n.d(t,"e",(function(){return G})),n.d(t,"f",(function(){return W})),n.d(t,"R",(function(){return X})),n.d(t,"S",(function(){return Z}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),o=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),u=Object(r.getSetting)("max_columns",6),a=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),d=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),f=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),O=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),m=Object(r.getSetting)("limitTags"),h=Object(r.getSetting)("hasProducts",!0),j=Object(r.getSetting)("hasTags",!0),v=Object(r.getSetting)("homeUrl",""),w=Object(r.getSetting)("couponsEnabled",!0),y=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),k=Object(r.getSetting)("displayItemizedTaxes",!1),E=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),S=Object(r.getSetting)("productCount",0),P=Object(r.getSetting)("attributes",[]),x=Object(r.getSetting)("isShippingCalculatorEnabled",!0),C=Object(r.getSetting)("isShippingCostHidden",!1),R=Object(r.getSetting)("woocommerceBlocksPhase",1),N=Object(r.getSetting)("wcBlocksAssetUrl",""),D=Object(r.getSetting)("shippingCountries",{}),T=Object(r.getSetting)("allowedCountries",{}),I=Object(r.getSetting)("shippingStates",{}),L=Object(r.getSetting)("allowedStates",{}),B=Object(r.getSetting)("shippingMethodsExist",!1),A=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},V=Object(r.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),F=V.shop.permalink,H=V.checkout.id,z=V.checkout.permalink,q=V.privacy.permalink,Y=V.privacy.title,K=V.terms.permalink,Q=V.terms.title,U=V.cart.id,G=V.cart.permalink,W=Object(r.getSetting)("checkoutAllowsGuest",!1),J=(Object(r.getSetting)("checkoutAllowsSignup",!1),n(14)),X=function(e,t){if(R>2)return Object(J.registerBlockType)(e,t)},Z=function(e,t){if(R>1)return Object(J.registerBlockType)(e,t)}},53:function(e,t){!function(){e.exports=this.wp.keycodes}()},58:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=n(48),o=n.n(c),i=function(e){var t=Object(r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(15),i=n.n(o),u=n(9);n(2);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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=i()(e,["srcElement","size"]);return Object(u.isValidElement)(t)&&Object(u.cloneElement)(t,function(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}({width:r,height:r},o))}},71:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(23),i=n.n(o),u=n(26),a=n.n(u),l=n(20),s=n.n(l),b=n(24),d=n.n(b),p=n(25),f=n.n(p),g=n(12),O=n.n(g),m=n(0),h=n(6),j=n(7),v=n.n(j),w=n(4),y=n(21);n(169);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=O()(e);if(t){var c=O()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return f()(this,n)}}var k=function(e){d()(n,e);var t=_(n);function n(){var e;return i()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return a()(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,o=n.checked,i=n.instanceId,u=n.className,a=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(i);return a&&(e=Object(h.isFunction)(a)?a(o):a),Object(m.createElement)(w.BaseControl,{id:b,help:e,className:v()("components-toggle-button-control",u)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(m.createElement)(w.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var o={};return s===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(m.createElement)(w.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},o),e.label)}))))}}]),n}(m.Component);t.a=Object(y.withInstanceId)(k)},74:function(e,t){!function(){e.exports=this.wp.dom}()},80:function(e,t){!function(){e.exports=this.ReactDOM}()},808:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(8),c=n.n(r),o=n(62),i=n.n(o),u=n(55),a=n.n(u),l=n(11),s=n.n(l),b=n(0),d=n(166),p=n(204),f=n(97),g=n(534),O=n(6),m=n(58);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 j(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){c()(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 v=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,c=Object(f.a)();c="".concat(c,"-collection-data");var o=Object(d.a)(c),u=s()(o,1)[0],l=Object(d.b)("calculate_attribute_counts",[],c),h=s()(l,2),v=h[0],w=h[1],y=Object(d.b)("calculate_price_range",null,c),_=s()(y,2),k=_[0],E=_[1],S=Object(m.a)(t||{}),P=Object(m.a)(n);Object(b.useEffect)((function(){"object"===a()(S)&&Object.keys(S).length&&(v.find((function(e){return e.taxonomy===S.taxonomy}))||w([].concat(i()(v),[S])))}),[S,v,w]),Object(b.useEffect)((function(){k!==P&&void 0!==P&&E(P)}),[P,E,k]);var x=Object(b.useState)(!1),C=s()(x,2),R=C[0],N=C[1],D=Object(g.a)(R,200),T=s()(D,1)[0];R||N(!0);var I=Object(b.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(O.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(u)}),[u]);return Object(p.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:j(j({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},I),shouldSelect:T})}},810:function(e,t,n){},83:function(e,t){!function(){e.exports=this.wp.viewport}()},84:function(e,t){!function(){e.exports=this.wp.a11y}()},858:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),o=n(0),i=n(1),u=n(14),a=n(60),l=n(59),s=Object(o.createElement)(l.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"})),b=n(7),d=n.n(b),p=n(11),f=n.n(p),g=n(22),O=n(4),m=n(161),h=n(50),j=n(6),v=n(5),w=n(3),y=n(147),_=n(177),k=n(8),E=n.n(k),S=n(84),P=n(166),x=n(204),C=n(808),R=n(58),N=n(62),D=n.n(N),T=(n(2),n(813),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,c=e.options,u=void 0===c?[]:c,a=e.checked,l=void 0===a?[]:a,s=e.isLoading,b=void 0!==s&&s,p=e.isDisabled,g=void 0!==p&&p,O=e.limit,m=void 0===O?10:O,h=Object(o.useState)(!1),j=f()(h,2),v=j[0],w=j[1],y=Object(o.useMemo)((function(){return D()(Array(5)).map((function(e,t){return Object(o.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),_=Object(o.useMemo)((function(){var e=u.length-m;return!v&&Object(o.createElement)("li",{key:"show-more",className:"show-more"},Object(o.createElement)("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(i.sprintf)(Object(i._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(i.sprintf)(Object(i._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[u,m,v]),k=Object(o.useMemo)((function(){return v&&Object(o.createElement)("li",{key:"show-less",className:"show-less"},Object(o.createElement)("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(i.__)("Show less options","woo-gutenberg-products-block")},Object(i.__)("Show less","woo-gutenberg-products-block")))}),[v]),E=Object(o.useMemo)((function(){var e=u.length>m+5;return Object(o.createElement)(o.Fragment,null,u.map((function(t,n){return Object(o.createElement)(o.Fragment,{key:t.value},Object(o.createElement)("li",e&&!v&&n>=m&&{hidden:!0},Object(o.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:l.includes(t.value),disabled:g}),Object(o.createElement)("label",{htmlFor:t.value},t.label)),e&&n===m-1&&_)})),e&&k)}),[u,l,v,m,k,_,g]),S=d()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":b},t);return Object(o.createElement)("ul",{className:S},b?y:E)}),I=n(235),L=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,c=e.isDisabled,i=e.onFocus,u=e.onRemoveItem,a=e.placeholder,l=e.tabIndex,s=e.value;return Object(o.createElement)("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:c,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&u(t[t.length-1])},placeholder:a,tabIndex:l}))},B=function(e){var t=e.children,n=e.onClick;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},A=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,c=e.highlightedIndex,u=e.options;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),u.map((function(e,r){var u=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:d()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":u,"is-highlighted":c===r}),index:r,item:e.value,"aria-label":u?Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},M=function(e){var t=e.onRemoveItem,n=e.option;return Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",onClick:function(){t(n.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||t(n.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),n.name)},Object(o.createElement)("span",{className:"wc-block-dropdown-selector__selected-chip__label wc-block-components-dropdown-selector__selected-chip__label"},n.label),Object(o.createElement)("span",{className:"wc-block-dropdown-selector__selected-chip__remove wc-block-components-dropdown-selector__selected-chip__remove"},"𝘅"))},V=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,c=Object(o.useRef)(null);return Object(o.useEffect)((function(){c.current.focus()}),[c]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:c,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},"𝘅"))};n(812);function F(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 H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){E()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,c=e.checked,u=void 0===c?[]:c,a=e.inputLabel,l=void 0===a?"":a,s=e.isDisabled,b=void 0!==s&&s,p=e.isLoading,f=void 0!==p&&p,g=e.multiple,O=void 0!==g&&g,m=e.onChange,h=void 0===m?function(){}:m,j=e.options,v=void 0===j?[]:j,w=Object(o.useRef)(null),y=d()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":b,"is-loading":f}),_=Object(o.useCallback)((function(e,t){switch(t.type){case I.a.stateChangeTypes.keyDownEnter:case I.a.stateChangeTypes.clickItem:return H(H({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:O,inputValue:""});case I.a.stateChangeTypes.blurInput:case I.a.stateChangeTypes.mouseUp:return H(H({},t),{},{inputValue:e.inputValue});default:return t}}),[O]);return Object(o.createElement)(I.a,{onChange:h,selectedItem:null,stateReducer:_},(function(e){var t=e.getInputProps,r=e.getItemProps,c=e.getLabelProps,a=e.getMenuProps,s=e.highlightedIndex,p=e.inputValue,f=e.isOpen,g=e.openMenu;return Object(o.createElement)("div",{className:d()(y,{"is-multiple":O,"is-single":!O})},Object(o.createElement)("label",c({className:"screen-reader-text"}),l),Object(o.createElement)(B,{isOpen:f,onClick:function(){return w.current.focus()}},u.map((function(e){var t=v.find((function(t){return t.value===e})),n=function(e){h(e),w.current.focus()};return O?Object(o.createElement)(M,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(V,{key:e,onClick:function(){return w.current.focus()},onRemoveItem:n,option:t})})),Object(o.createElement)(L,{checked:u,getInputProps:t,inputRef:w,isDisabled:b,onFocus:g,onRemoveItem:function(e){h(e),w.current.focus()},placeholder:u.length>0&&O?null:Object(i.sprintf)(Object(i.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!O&&u.length>0?"-1":"0",value:p})),f&&!b&&Object(o.createElement)(A,{checked:u,getItemProps:r,getMenuProps:a,highlightedIndex:s,options:v.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},q=n(256),Y=n(48),K=n.n(Y),Q=n(30),U=n(257),G=n(258),W=n(44),J=function(e){var t=e.name,n=e.count;return Object(o.createElement)(o.Fragment,null,t,Number.isFinite(n)&&Object(o.createElement)(W.a,{label:n,screenReaderLabel:Object(i.sprintf)(Object(i._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},X=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(J,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(J,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(J,{name:"Red",count:2})}],Z={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(811);function $(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 ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){E()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=t.isPreview&&!t.attributeId?Z:Object(U.a)(t.attributeId),u=Object(o.useState)([]),a=f()(u,2),l=a[0],s=a[1],b=Object(o.useState)(t.isPreview&&!t.attributeId?X:[]),d=f()(b,2),p=d[0],g=d[1],O=Object(P.a)(),m=f()(O,1)[0],h=Object(P.b)("attributes",[]),j=f()(h,2),v=j[0],w=j[1],y=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[c.id],shouldSelect:t.attributeId>0}),_=y.results,k=y.isLoading,E="dropdown"!==t.displayStyle&&"and"===t.queryType,N=Object(C.a)({queryAttribute:{taxonomy:c.taxonomy,queryType:t.queryType},queryState:ee(ee({},m),{},{attributes:E?m.attributes:null})}),D=N.results,I=N.isLoading,L=Object(o.useCallback)((function(e){return D.attribute_counts?D.attribute_counts.find((function(t){return t.term===e})):null}),[D]);Object(o.useEffect)((function(){if(!k&&!I){var e=_.map((function(e){var n,r=L(e.id);if(!(r||l.includes(e.slug)||(n=e.slug,m&&m.attributes&&m.attributes.some((function(e){var t=e.attribute,r=e.slug,o=void 0===r?[]:r;return t===c.taxonomy&&o.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(Q.decodeEntities)(e.name),label:Object(o.createElement)(J,{name:Object(Q.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);g(e)}}),[c.taxonomy,_,k,t.showCounts,I,L,l,m.attributes]),Object(o.useEffect)((function(){t.showFilterButton||V()}),[l,V]);var B=Object(o.useMemo)((function(){return v.filter((function(e){return e.attribute===c.taxonomy})).flatMap((function(e){return e.slug}))}),[v,c.taxonomy]),A=Object(R.a)(B);Object(o.useEffect)((function(){K()(l,B)||s(B)}),[A]);var M=Object(o.useCallback)((function(e){return _.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[_]),V=function(){r||Object(G.b)(v,w,c,M(l),"or"===t.queryType?"in":"and")},F="dropdown"!==t.displayStyle||"or"===t.queryType,H=Object(o.useCallback)((function(e){var t,n=function(e){return p.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,c=t?n(t):null,o=r?n(r):null;c&&o?Object(S.speak)(Object(i.sprintf)(Object(i.__)("%s filter replaced with %s.","woo-gutenberg-products-block"),c,o)):c?Object(S.speak)(Object(i.sprintf)(Object(i.__)("%s filter added.","woo-gutenberg-products-block"),c)):o&&Object(S.speak)(Object(i.sprintf)(Object(i.__)("%s filter removed.","woo-gutenberg-products-block"),o))},c=l.includes(e);F?(t=l.filter((function(t){return t!==e})),c?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=c?[]:[e],r({filterAdded:c?null:e,filterRemoved:1===l.length?l[0]:null}));s(t)}),[l,p,F]);if(0===p.length&&!k)return null;var Y="h".concat(t.headingLevel),W=!t.isPreview&&k,$=!t.isPreview&&I;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(Y,null,t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?Object(o.createElement)(z,{attributeLabel:c.label,checked:l,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:W,multiple:F,onChange:H,options:p}):Object(o.createElement)(T,{className:"wc-block-attribute-filter-list",options:p,checked:l,onChange:H,isLoading:W,isDisabled:$}),t.showFilterButton&&Object(o.createElement)(q.a,{className:"wc-block-attribute-filter__button",disabled:W||$,onClick:V})))},ne=(n(810),n(71)),re=Object(O.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=e.debouncedSpeak,c=t.attributeId,u=t.className,l=t.displayStyle,b=t.heading,d=t.headingLevel,p=t.isPreview,k=t.queryType,E=t.showCounts,S=t.showFilterButton,P=Object(o.useState)(!c&&!p),x=f()(P,2),C=x[0],R=x[1],N=Object(o.useCallback)((function(){R(!1),r(Object(i.__)("Showing Filter Products by Attribute block preview.","woo-gutenberg-products-block"))}),[]),D=Object(o.useCallback)((function(e){if(e&&e.length){var t=e[0].id,r=Object(j.find)(v.c,["attribute_id",t.toString()]);if(r&&c!==t){var o=r.attribute_label;n({attributeId:t,heading:Object(i.sprintf)(Object(i.__)("Filter by %s","woo-gutenberg-products-block"),o)})}}}),[c]),T=function(){var e={clear:Object(i.__)("Clear selected attribute","woo-gutenberg-products-block"),list:Object(i.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(i.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(i.__)("Search for a product attribute:","woo-gutenberg-products-block"),selected:function(e){return Object(i.sprintf)(Object(i._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e)},updated:Object(i.__)("Product attribute search results updated.","woo-gutenberg-products-block")},t=Object(j.sortBy)(Object(j.toArray)(Object(j.mapValues)(v.c,(function(e){return{id:parseInt(e.attribute_id,10),name:e.attribute_label}}))),"name");return Object(o.createElement)(h.a,{className:"woocommerce-product-attributes",list:t,selected:t.filter((function(e){return e.id===c})),onChange:D,messages:e,isSingle:!0})};return 0===Object.keys(v.c).length?Object(o.createElement)(O.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("p",null,Object(i.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woo-gutenberg-products-block")),Object(o.createElement)(O.Button,{className:"wc-block-attribute-filter__add-attribute-button",isDefault:!0,isLarge:!0,href:Object(w.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(i.__)("Add new attribute","woo-gutenberg-products-block")+" ",Object(o.createElement)(a.a,{srcElement:m.a})),Object(o.createElement)(O.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(i.__)("Learn more","woo-gutenberg-products-block"))):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(g.BlockControls,null,Object(o.createElement)(O.Toolbar,{controls:[{icon:"edit",title:Object(i.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return R(!C)},isActive:C}]})),Object(o.createElement)(g.InspectorControls,{key:"inspector"},Object(o.createElement)(O.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(O.ToggleControl,{label:Object(i.__)("Product count","woo-gutenberg-products-block"),help:E?Object(i.__)("Product count is visible.","woo-gutenberg-products-block"):Object(i.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:E,onChange:function(){return n({showCounts:!E})}}),Object(o.createElement)("p",null,Object(i.__)("Heading Level","woo-gutenberg-products-block")),Object(o.createElement)(y.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:d,onChange:function(e){return n({headingLevel:e})}})),Object(o.createElement)(O.PanelBody,{title:Object(i.__)("Block Settings","woo-gutenberg-products-block")},Object(o.createElement)(ne.a,{label:Object(i.__)("Query Type","woo-gutenberg-products-block"),help:"and"===k?Object(i.__)("Products that have all of the selected attributes will be shown.","woo-gutenberg-products-block"):Object(i.__)("Products that have any of the selected attributes will be shown.","woo-gutenberg-products-block"),value:k,options:[{label:Object(i.__)("And","woo-gutenberg-products-block"),value:"and"},{label:Object(i.__)("Or","woo-gutenberg-products-block"),value:"or"}],onChange:function(e){return n({queryType:e})}}),Object(o.createElement)(ne.a,{label:Object(i.__)("Display Style","woo-gutenberg-products-block"),value:l,options:[{label:Object(i.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(i.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({displayStyle:e})}}),Object(o.createElement)(O.ToggleControl,{label:Object(i.__)("Filter button","woo-gutenberg-products-block"),help:S?Object(i.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(i.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:S,onChange:function(e){return n({showFilterButton:e})}})),Object(o.createElement)(O.PanelBody,{title:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),initialOpen:!1},T())),C?Object(o.createElement)(O.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("div",{className:"wc-block-attribute-filter__selection"},T(),Object(o.createElement)(O.Button,{isPrimary:!0,onClick:N},Object(i.__)("Done","woo-gutenberg-products-block")))):Object(o.createElement)("div",{className:u},Object(o.createElement)(_.a,{headingLevel:d,heading:b,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(O.Disabled,null,Object(o.createElement)(te,{attributes:t,isEditor:!0}))))}));Object(u.registerBlockType)("woocommerce/attribute-filter",{title:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Allow customers to filter the grid by product attribute, such as color. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1},example:{attributes:{isPreview:!0}},attributes:{attributeId:{type:"number",default:0},showCounts:{type:"boolean",default:!0},queryType:{type:"string",default:"or"},heading:{type:"string",default:Object(i.__)("Filter by attribute","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},displayStyle:{type:"string",default:"list"},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:re,save:function(e){var t=e.attributes,n=t.className,r=t.showCounts,i=t.queryType,u=t.attributeId,a=t.heading,l=t.headingLevel,s=t.displayStyle,b=t.showFilterButton,p={"data-attribute-id":u,"data-show-counts":r,"data-query-type":i,"data-heading":a,"data-heading-level":l};return"list"!==s&&(p["data-display-style"]=s),b&&(p["data-show-filter-button"]=b),Object(o.createElement)("div",c()({className:d()("is-loading",n)},p),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},9:function(e,t){!function(){e.exports=this.React}()},90:function(e,t){!function(){e.exports=this.wp.hooks}()},95:function(e,t){!function(){e.exports=this.wp.date}()},97:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=Object(r.createContext)("page"),o=function(){return Object(r.useContext)(c)};c.Provider}});
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var r,i,u=t[0],a=t[1],l=t[2],b=0,d=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(c,i)&&c[i]&&d.push(c[i][0]),c[i]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(s&&s(t);d.length;)d.shift()();return o.push.apply(o,l||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={7:0},o=[];function i(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,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},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 u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var l=0;l<u.length;l++)t(u[l]);var s=a;return o.push([856,2,0,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},112: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){},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){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},148:function(e,t,n){"use strict";var r=n(23),c=n.n(r),o=n(26),i=n.n(o),u=n(24),a=n.n(u),l=n(25),s=n.n(l),b=n(12),d=n.n(b),p=n(0),f=n(6),g=n(1),O=n(4);function m(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(p.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(O.Path,{d:n[t]})):null}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 n,r=d()(e);if(t){var c=d()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var j=function(e){a()(n,e);var t=h(n);function n(){return c()(this,n),t.apply(this,arguments)}return i()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(m,{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,o=t.maxLevel,i=t.selectedLevel,u=t.onChange;return Object(p.createElement)(O.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(m,{level:i}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,i,u)}))})}}]),n}(p.Component);t.a=j},15:function(e,t){!function(){e.exports=this.wp.blocks}()},151:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(11),c=n.n(r),o=n(0),i=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return function(e){return t((function(){throw e}))}}},162:function(e,t,n){"use strict";var r=n(0),c=n(60),o=Object(r.createElement)(c.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.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(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},167:function(e,t,n){"use strict";n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return p}));var r=n(11),c=n.n(r),o=n(41),i=n(36),u=n(0),a=n(98),l=n(6),s=n(59),b=function(e){var t=Object(a.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(u.useCallback)((function(t){r(e,t)}),[e])]},d=function(e,t,n){var r=Object(a.a)();n=n||r;var c=Object(i.useSelect)((function(r){return r(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(u.useCallback)((function(t){l(n,e,t)}),[n,e])]},p=function(e,t){var n=Object(a.a)(),r=b(t=t||n),o=c()(r,2),i=o[0],d=o[1],p=Object(s.a)(e),f=Object(u.useRef)(!1);return Object(u.useEffect)((function(){d(Object(l.assign)({},i,p)),f.current=!0}),[p]),f.current?[i,d]:[e,d]}},178:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),o=n(7),i=n.n(o);n(255);t.a=function(e){var t=e.className,n=e.headingLevel,o=e.onChange,u=e.heading,a="h".concat(n);return Object(r.createElement)(a,null,Object(r.createElement)(c.PlainText,{className:i()("wc-block-editor-components-title",t),value:u,onChange:o}))}},18:function(e,t){!function(){e.exports=this.wp.url}()},205:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(41),c=n(36),o=n(0),i=n(151),u=n(59),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,l=void 0===a?[]:a,s=e.query,b=void 0===s?{}:s,d=e.shouldSelect,p=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 f=Object(o.useRef)({results:[],isLoading:!0}),g=Object(u.a)(b),O=Object(u.a)(l),m=Object(i.a)(),h=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),o=[t,n,g,O],i=c.getCollectionError.apply(c,o);return i&&m(i),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,n,O,g,p]);return null!==h&&(f.current=h),f.current}},21:function(e,t){!function(){e.exports=this.wp.compose}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},255:function(e,t,n){},258:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(7)),i=n.n(o),u=n(44),a=(n(506),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(c.__)("Go","woo-gutenberg-products-block"):o,l=e.onClick,s=e.screenReaderLabel,b=void 0===s?Object(c.__)("Apply filter","woo-gutenberg-products-block"):s;return Object(r.createElement)("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:l},Object(r.createElement)(u.a,{label:a,screenReaderLabel:b}))});a.defaultProps={disabled:!1},t.a=a},259:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(5),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}),[]),o=function(e){if(e)return c.find((function(t){return t.id===e}))},i=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},260:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o}));var r=n(6),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]:"",o=e.filter((function(e){return e.attribute===n.taxonomy})),i=o.length?o[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(c)){var u=i.slug.filter((function(e){return e!==c})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(i.slug=u.sort(),a.push(i)),t(Object(r.sortBy)(a,"attribute"))}},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,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(i):(i.push({attribute:n.taxonomy,operator:o,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(i,"attribute")))}},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},30:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},34:function(e,t){!function(){e.exports=this.moment}()},36:function(e,t){!function(){e.exports=this.wp.data}()},4:function(e,t){!function(){e.exports=this.wp.components}()},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},44:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(0),i=(n(2),n(9)),u=n(7),a=n.n(u);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}var b=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,u=e.wrapperProps,l=null!=n,b=null!=r;return!l&&b?(t=c||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,r)):(t=c||i.Fragment,l&&b&&n!==r?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,u,n))};b.defaultProps={wrapperProps:{}},t.a=b},48:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},5:function(e,t,n){"use strict";n.d(t,"k",(function(){return c})),n.d(t,"G",(function(){return o})),n.d(t,"M",(function(){return i})),n.d(t,"x",(function(){return u})),n.d(t,"z",(function(){return a})),n.d(t,"l",(function(){return l})),n.d(t,"y",(function(){return s})),n.d(t,"B",(function(){return b})),n.d(t,"n",(function(){return d})),n.d(t,"A",(function(){return p})),n.d(t,"m",(function(){return f})),n.d(t,"C",(function(){return g})),n.d(t,"t",(function(){return O})),n.d(t,"w",(function(){return m})),n.d(t,"q",(function(){return h})),n.d(t,"r",(function(){return j})),n.d(t,"s",(function(){return v})),n.d(t,"j",(function(){return w})),n.d(t,"I",(function(){return y})),n.d(t,"N",(function(){return _})),n.d(t,"p",(function(){return k})),n.d(t,"o",(function(){return E})),n.d(t,"F",(function(){return S})),n.d(t,"c",(function(){return P})),n.d(t,"u",(function(){return x})),n.d(t,"v",(function(){return C})),n.d(t,"Q",(function(){return N})),n.d(t,"H",(function(){return D})),n.d(t,"a",(function(){return T})),n.d(t,"K",(function(){return I})),n.d(t,"b",(function(){return L})),n.d(t,"J",(function(){return B})),n.d(t,"h",(function(){return A})),n.d(t,"L",(function(){return F})),n.d(t,"g",(function(){return H})),n.d(t,"i",(function(){return z})),n.d(t,"E",(function(){return q})),n.d(t,"D",(function(){return Y})),n.d(t,"P",(function(){return K})),n.d(t,"O",(function(){return Q})),n.d(t,"d",(function(){return U})),n.d(t,"e",(function(){return G})),n.d(t,"f",(function(){return W})),n.d(t,"R",(function(){return X})),n.d(t,"S",(function(){return Z}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),o=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),u=Object(r.getSetting)("max_columns",6),a=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),d=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),f=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),O=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),m=Object(r.getSetting)("limitTags"),h=Object(r.getSetting)("hasProducts",!0),j=Object(r.getSetting)("hasTags",!0),v=Object(r.getSetting)("homeUrl",""),w=Object(r.getSetting)("couponsEnabled",!0),y=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),k=Object(r.getSetting)("displayItemizedTaxes",!1),E=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),S=Object(r.getSetting)("productCount",0),P=Object(r.getSetting)("attributes",[]),x=Object(r.getSetting)("isShippingCalculatorEnabled",!0),C=Object(r.getSetting)("isShippingCostHidden",!1),R=Object(r.getSetting)("woocommerceBlocksPhase",1),N=Object(r.getSetting)("wcBlocksAssetUrl",""),D=Object(r.getSetting)("shippingCountries",{}),T=Object(r.getSetting)("allowedCountries",{}),I=Object(r.getSetting)("shippingStates",{}),L=Object(r.getSetting)("allowedStates",{}),B=Object(r.getSetting)("shippingMethodsExist",!1),A=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},V=Object(r.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),F=V.shop.permalink,H=V.checkout.id,z=V.checkout.permalink,q=V.privacy.permalink,Y=V.privacy.title,K=V.terms.permalink,Q=V.terms.title,U=V.cart.id,G=V.cart.permalink,W=Object(r.getSetting)("checkoutAllowsGuest",!1),J=(Object(r.getSetting)("checkoutAllowsSignup",!1),n(15)),X=function(e,t){if(R>2)return Object(J.registerBlockType)(e,t)},Z=function(e,t){if(R>1)return Object(J.registerBlockType)(e,t)}},53:function(e,t){!function(){e.exports=this.wp.keycodes}()},58:function(e,t,n){"use strict";var r=n(8),c=n.n(r),o=n(14),i=n.n(o),u=n(9);n(2);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}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=i()(e,["srcElement","size"]);return Object(u.isValidElement)(t)&&Object(u.cloneElement)(t,function(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}({width:r,height:r},o))}},59:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=n(48),o=n.n(c),i=function(e){var t=Object(r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},6:function(e,t){!function(){e.exports=this.lodash}()},71:function(e,t,n){"use strict";var r=n(10),c=n.n(r),o=n(23),i=n.n(o),u=n(26),a=n.n(u),l=n(20),s=n.n(l),b=n(24),d=n.n(b),p=n(25),f=n.n(p),g=n(12),O=n.n(g),m=n(0),h=n(6),j=n(7),v=n.n(j),w=n(4),y=n(21);n(170);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=O()(e);if(t){var c=O()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return f()(this,n)}}var k=function(e){d()(n,e);var t=_(n);function n(){var e;return i()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return a()(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,o=n.checked,i=n.instanceId,u=n.className,a=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(i);return a&&(e=Object(h.isFunction)(a)?a(o):a),Object(m.createElement)(w.BaseControl,{id:b,help:e,className:v()("components-toggle-button-control",u)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(m.createElement)(w.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var o={};return s===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(m.createElement)(w.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},o),e.label)}))))}}]),n}(m.Component);t.a=Object(y.withInstanceId)(k)},74:function(e,t){!function(){e.exports=this.wp.dom}()},75:function(e,t){!function(){e.exports=this.wp.hooks}()},806:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(8),c=n.n(r),o=n(62),i=n.n(o),u=n(55),a=n.n(u),l=n(11),s=n.n(l),b=n(0),d=n(167),p=n(205),f=n(98),g=n(533),O=n(6),m=n(59);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 j(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){c()(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 v=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,c=Object(f.a)();c="".concat(c,"-collection-data");var o=Object(d.a)(c),u=s()(o,1)[0],l=Object(d.b)("calculate_attribute_counts",[],c),h=s()(l,2),v=h[0],w=h[1],y=Object(d.b)("calculate_price_range",null,c),_=s()(y,2),k=_[0],E=_[1],S=Object(m.a)(t||{}),P=Object(m.a)(n);Object(b.useEffect)((function(){"object"===a()(S)&&Object.keys(S).length&&(v.find((function(e){return e.taxonomy===S.taxonomy}))||w([].concat(i()(v),[S])))}),[S,v,w]),Object(b.useEffect)((function(){k!==P&&void 0!==P&&E(P)}),[P,E,k]);var x=Object(b.useState)(!1),C=s()(x,2),R=C[0],N=C[1],D=Object(g.a)(R,200),T=s()(D,1)[0];R||N(!0);var I=Object(b.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(O.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(u)}),[u]);return Object(p.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:j(j({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},I),shouldSelect:T})}},808:function(e,t,n){},81:function(e,t){!function(){e.exports=this.ReactDOM}()},84:function(e,t){!function(){e.exports=this.wp.viewport}()},856:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),o=n(0),i=n(1),u=n(15),a=n(58),l=n(60),s=Object(o.createElement)(l.a,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"})),b=n(7),d=n.n(b),p=n(11),f=n.n(p),g=n(22),O=n(4),m=n(162),h=n(50),j=n(6),v=n(5),w=n(3),y=n(148),_=n(178),k=n(8),E=n.n(k),S=n(86),P=n(167),x=n(205),C=n(806),R=n(59),N=n(62),D=n.n(N),T=(n(2),n(811),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,c=e.options,u=void 0===c?[]:c,a=e.checked,l=void 0===a?[]:a,s=e.isLoading,b=void 0!==s&&s,p=e.isDisabled,g=void 0!==p&&p,O=e.limit,m=void 0===O?10:O,h=Object(o.useState)(!1),j=f()(h,2),v=j[0],w=j[1],y=Object(o.useMemo)((function(){return D()(Array(5)).map((function(e,t){return Object(o.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),_=Object(o.useMemo)((function(){var e=u.length-m;return!v&&Object(o.createElement)("li",{key:"show-more",className:"show-more"},Object(o.createElement)("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(i.sprintf)(Object(i._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(i.sprintf)(Object(i._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[u,m,v]),k=Object(o.useMemo)((function(){return v&&Object(o.createElement)("li",{key:"show-less",className:"show-less"},Object(o.createElement)("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(i.__)("Show less options","woo-gutenberg-products-block")},Object(i.__)("Show less","woo-gutenberg-products-block")))}),[v]),E=Object(o.useMemo)((function(){var e=u.length>m+5;return Object(o.createElement)(o.Fragment,null,u.map((function(t,n){return Object(o.createElement)(o.Fragment,{key:t.value},Object(o.createElement)("li",e&&!v&&n>=m&&{hidden:!0},Object(o.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:l.includes(t.value),disabled:g}),Object(o.createElement)("label",{htmlFor:t.value},t.label)),e&&n===m-1&&_)})),e&&k)}),[u,l,v,m,k,_,g]),S=d()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":b},t);return Object(o.createElement)("ul",{className:S},b?y:E)}),I=n(237),L=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,c=e.isDisabled,i=e.onFocus,u=e.onRemoveItem,a=e.placeholder,l=e.tabIndex,s=e.value;return Object(o.createElement)("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:c,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&u(t[t.length-1])},placeholder:a,tabIndex:l}))},B=function(e){var t=e.children,n=e.onClick;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},A=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,c=e.highlightedIndex,u=e.options;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),u.map((function(e,r){var u=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:d()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":u,"is-highlighted":c===r}),index:r,item:e.value,"aria-label":u?Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},M=function(e){var t=e.onRemoveItem,n=e.option;return Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",onClick:function(){t(n.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||t(n.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),n.name)},Object(o.createElement)("span",{className:"wc-block-dropdown-selector__selected-chip__label wc-block-components-dropdown-selector__selected-chip__label"},n.label),Object(o.createElement)("span",{className:"wc-block-dropdown-selector__selected-chip__remove wc-block-components-dropdown-selector__selected-chip__remove"},"𝘅"))},V=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,c=Object(o.useRef)(null);return Object(o.useEffect)((function(){c.current.focus()}),[c]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:c,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},"𝘅"))};n(810);function F(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 H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){E()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,c=e.checked,u=void 0===c?[]:c,a=e.inputLabel,l=void 0===a?"":a,s=e.isDisabled,b=void 0!==s&&s,p=e.isLoading,f=void 0!==p&&p,g=e.multiple,O=void 0!==g&&g,m=e.onChange,h=void 0===m?function(){}:m,j=e.options,v=void 0===j?[]:j,w=Object(o.useRef)(null),y=d()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":b,"is-loading":f}),_=Object(o.useCallback)((function(e,t){switch(t.type){case I.a.stateChangeTypes.keyDownEnter:case I.a.stateChangeTypes.clickItem:return H(H({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:O,inputValue:""});case I.a.stateChangeTypes.blurInput:case I.a.stateChangeTypes.mouseUp:return H(H({},t),{},{inputValue:e.inputValue});default:return t}}),[O]);return Object(o.createElement)(I.a,{onChange:h,selectedItem:null,stateReducer:_},(function(e){var t=e.getInputProps,r=e.getItemProps,c=e.getLabelProps,a=e.getMenuProps,s=e.highlightedIndex,p=e.inputValue,f=e.isOpen,g=e.openMenu;return Object(o.createElement)("div",{className:d()(y,{"is-multiple":O,"is-single":!O})},Object(o.createElement)("label",c({className:"screen-reader-text"}),l),Object(o.createElement)(B,{isOpen:f,onClick:function(){return w.current.focus()}},u.map((function(e){var t=v.find((function(t){return t.value===e})),n=function(e){h(e),w.current.focus()};return O?Object(o.createElement)(M,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(V,{key:e,onClick:function(){return w.current.focus()},onRemoveItem:n,option:t})})),Object(o.createElement)(L,{checked:u,getInputProps:t,inputRef:w,isDisabled:b,onFocus:g,onRemoveItem:function(e){h(e),w.current.focus()},placeholder:u.length>0&&O?null:Object(i.sprintf)(Object(i.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!O&&u.length>0?"-1":"0",value:p})),f&&!b&&Object(o.createElement)(A,{checked:u,getItemProps:r,getMenuProps:a,highlightedIndex:s,options:v.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},q=n(258),Y=n(48),K=n.n(Y),Q=n(30),U=n(259),G=n(260),W=n(44),J=function(e){var t=e.name,n=e.count;return Object(o.createElement)(o.Fragment,null,t,Number.isFinite(n)&&Object(o.createElement)(W.a,{label:n,screenReaderLabel:Object(i.sprintf)(Object(i._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},X=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(J,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(J,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(J,{name:"Red",count:2})}],Z={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(809);function $(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 ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){E()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var te=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=t.isPreview&&!t.attributeId?Z:Object(U.a)(t.attributeId),u=Object(o.useState)([]),a=f()(u,2),l=a[0],s=a[1],b=Object(o.useState)(t.isPreview&&!t.attributeId?X:[]),d=f()(b,2),p=d[0],g=d[1],O=Object(P.a)(),m=f()(O,1)[0],h=Object(P.b)("attributes",[]),j=f()(h,2),v=j[0],w=j[1],y=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[c.id],shouldSelect:t.attributeId>0}),_=y.results,k=y.isLoading,E="dropdown"!==t.displayStyle&&"and"===t.queryType,N=Object(C.a)({queryAttribute:{taxonomy:c.taxonomy,queryType:t.queryType},queryState:ee(ee({},m),{},{attributes:E?m.attributes:null})}),D=N.results,I=N.isLoading,L=Object(o.useCallback)((function(e){return D.attribute_counts?D.attribute_counts.find((function(t){return t.term===e})):null}),[D]);Object(o.useEffect)((function(){if(!k&&!I){var e=_.map((function(e){var n,r=L(e.id);if(!(r||l.includes(e.slug)||(n=e.slug,m&&m.attributes&&m.attributes.some((function(e){var t=e.attribute,r=e.slug,o=void 0===r?[]:r;return t===c.taxonomy&&o.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(Q.decodeEntities)(e.name),label:Object(o.createElement)(J,{name:Object(Q.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);g(e)}}),[c.taxonomy,_,k,t.showCounts,I,L,l,m.attributes]),Object(o.useEffect)((function(){t.showFilterButton||V()}),[l,V]);var B=Object(o.useMemo)((function(){return v.filter((function(e){return e.attribute===c.taxonomy})).flatMap((function(e){return e.slug}))}),[v,c.taxonomy]),A=Object(R.a)(B);Object(o.useEffect)((function(){K()(l,B)||s(B)}),[A]);var M=Object(o.useCallback)((function(e){return _.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[_]),V=function(){r||Object(G.b)(v,w,c,M(l),"or"===t.queryType?"in":"and")},F="dropdown"!==t.displayStyle||"or"===t.queryType,H=Object(o.useCallback)((function(e){var t,n=function(e){return p.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,c=t?n(t):null,o=r?n(r):null;c&&o?Object(S.speak)(Object(i.sprintf)(Object(i.__)("%s filter replaced with %s.","woo-gutenberg-products-block"),c,o)):c?Object(S.speak)(Object(i.sprintf)(Object(i.__)("%s filter added.","woo-gutenberg-products-block"),c)):o&&Object(S.speak)(Object(i.sprintf)(Object(i.__)("%s filter removed.","woo-gutenberg-products-block"),o))},c=l.includes(e);F?(t=l.filter((function(t){return t!==e})),c?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=c?[]:[e],r({filterAdded:c?null:e,filterRemoved:1===l.length?l[0]:null}));s(t)}),[l,p,F]);if(0===p.length&&!k)return null;var Y="h".concat(t.headingLevel),W=!t.isPreview&&k,$=!t.isPreview&&I;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(Y,null,t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?Object(o.createElement)(z,{attributeLabel:c.label,checked:l,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:W,multiple:F,onChange:H,options:p}):Object(o.createElement)(T,{className:"wc-block-attribute-filter-list",options:p,checked:l,onChange:H,isLoading:W,isDisabled:$}),t.showFilterButton&&Object(o.createElement)(q.a,{className:"wc-block-attribute-filter__button",disabled:W||$,onClick:V})))},ne=(n(808),n(71)),re=Object(O.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=e.debouncedSpeak,c=t.attributeId,u=t.className,l=t.displayStyle,b=t.heading,d=t.headingLevel,p=t.isPreview,k=t.queryType,E=t.showCounts,S=t.showFilterButton,P=Object(o.useState)(!c&&!p),x=f()(P,2),C=x[0],R=x[1],N=Object(o.useCallback)((function(){R(!1),r(Object(i.__)("Showing Filter Products by Attribute block preview.","woo-gutenberg-products-block"))}),[]),D=Object(o.useCallback)((function(e){if(e&&e.length){var t=e[0].id,r=Object(j.find)(v.c,["attribute_id",t.toString()]);if(r&&c!==t){var o=r.attribute_label;n({attributeId:t,heading:Object(i.sprintf)(Object(i.__)("Filter by %s","woo-gutenberg-products-block"),o)})}}}),[c]),T=function(){var e={clear:Object(i.__)("Clear selected attribute","woo-gutenberg-products-block"),list:Object(i.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(i.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(i.__)("Search for a product attribute:","woo-gutenberg-products-block"),selected:function(e){return Object(i.sprintf)(Object(i._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e)},updated:Object(i.__)("Product attribute search results updated.","woo-gutenberg-products-block")},t=Object(j.sortBy)(Object(j.toArray)(Object(j.mapValues)(v.c,(function(e){return{id:parseInt(e.attribute_id,10),name:e.attribute_label}}))),"name");return Object(o.createElement)(h.a,{className:"woocommerce-product-attributes",list:t,selected:t.filter((function(e){return e.id===c})),onChange:D,messages:e,isSingle:!0})};return 0===Object.keys(v.c).length?Object(o.createElement)(O.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("p",null,Object(i.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woo-gutenberg-products-block")),Object(o.createElement)(O.Button,{className:"wc-block-attribute-filter__add-attribute-button",isDefault:!0,isLarge:!0,href:Object(w.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(i.__)("Add new attribute","woo-gutenberg-products-block")+" ",Object(o.createElement)(a.a,{srcElement:m.a})),Object(o.createElement)(O.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(i.__)("Learn more","woo-gutenberg-products-block"))):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(g.BlockControls,null,Object(o.createElement)(O.Toolbar,{controls:[{icon:"edit",title:Object(i.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return R(!C)},isActive:C}]})),Object(o.createElement)(g.InspectorControls,{key:"inspector"},Object(o.createElement)(O.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(O.ToggleControl,{label:Object(i.__)("Product count","woo-gutenberg-products-block"),help:E?Object(i.__)("Product count is visible.","woo-gutenberg-products-block"):Object(i.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:E,onChange:function(){return n({showCounts:!E})}}),Object(o.createElement)("p",null,Object(i.__)("Heading Level","woo-gutenberg-products-block")),Object(o.createElement)(y.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:d,onChange:function(e){return n({headingLevel:e})}})),Object(o.createElement)(O.PanelBody,{title:Object(i.__)("Block Settings","woo-gutenberg-products-block")},Object(o.createElement)(ne.a,{label:Object(i.__)("Query Type","woo-gutenberg-products-block"),help:"and"===k?Object(i.__)("Products that have all of the selected attributes will be shown.","woo-gutenberg-products-block"):Object(i.__)("Products that have any of the selected attributes will be shown.","woo-gutenberg-products-block"),value:k,options:[{label:Object(i.__)("And","woo-gutenberg-products-block"),value:"and"},{label:Object(i.__)("Or","woo-gutenberg-products-block"),value:"or"}],onChange:function(e){return n({queryType:e})}}),Object(o.createElement)(ne.a,{label:Object(i.__)("Display Style","woo-gutenberg-products-block"),value:l,options:[{label:Object(i.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(i.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({displayStyle:e})}}),Object(o.createElement)(O.ToggleControl,{label:Object(i.__)("Filter button","woo-gutenberg-products-block"),help:S?Object(i.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(i.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:S,onChange:function(e){return n({showFilterButton:e})}})),Object(o.createElement)(O.PanelBody,{title:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),initialOpen:!1},T())),C?Object(o.createElement)(O.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("div",{className:"wc-block-attribute-filter__selection"},T(),Object(o.createElement)(O.Button,{isPrimary:!0,onClick:N},Object(i.__)("Done","woo-gutenberg-products-block")))):Object(o.createElement)("div",{className:u},Object(o.createElement)(_.a,{headingLevel:d,heading:b,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(O.Disabled,null,Object(o.createElement)(te,{attributes:t,isEditor:!0}))))}));Object(u.registerBlockType)("woocommerce/attribute-filter",{title:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Allow customers to filter the grid by product attribute, such as color. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1},example:{attributes:{isPreview:!0}},attributes:{attributeId:{type:"number",default:0},showCounts:{type:"boolean",default:!0},queryType:{type:"string",default:"or"},heading:{type:"string",default:Object(i.__)("Filter by attribute","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},displayStyle:{type:"string",default:"list"},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:re,save:function(e){var t=e.attributes,n=t.className,r=t.showCounts,i=t.queryType,u=t.attributeId,a=t.heading,l=t.headingLevel,s=t.displayStyle,b=t.showFilterButton,p={"data-attribute-id":u,"data-show-counts":r,"data-query-type":i,"data-heading":a,"data-heading-level":l};return"list"!==s&&(p["data-display-style"]=s),b&&(p["data-show-filter-button"]=b),Object(o.createElement)("div",c()({className:d()("is-loading",n)},p),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},86:function(e,t){!function(){e.exports=this.wp.a11y}()},9:function(e,t){!function(){e.exports=this.React}()},96:function(e,t){!function(){e.exports=this.wp.date}()},98:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=Object(r.createContext)("page"),o=function(){return Object(r.useContext)(c)};c.Provider}});
|
build/block-error-boundary-legacy.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => 'c9708770e897bcb5faefb3b1600d9367');
|
build/block-error-boundary-legacy.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["block-error-boundary"]=function(e){function r(r){for(var n,c,l=r[0],i=r[1],a=r[2],p=0,s=[];p<l.length;p++)c=l[p],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&s.push(o[c][0]),o[c]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=c(c.s=t[0]))}return e}var n={},o={5:0},u=[];function c(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.m=e,c.c=n,c.d=function(e,r,t){c.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,r){if(1&r&&(e=c(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(c.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)c.d(t,n,function(r){return e[r]}.bind(null,n));return t},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var f=i;return u.push([
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["block-error-boundary"]=function(e){function r(r){for(var n,c,l=r[0],i=r[1],a=r[2],p=0,s=[];p<l.length;p++)c=l[p],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&s.push(o[c][0]),o[c]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=c(c.s=t[0]))}return e}var n={},o={5:0},u=[];function c(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.m=e,c.c=n,c.d=function(e,r,t){c.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,r){if(1&r&&(e=c(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(c.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)c.d(t,n,function(r){return e[r]}.bind(null,n));return t},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var f=i;return u.push([634,0]),t()}([]);
|
build/block-error-boundary.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '47fdebb7685713cf5923fff2b5532c34');
|
build/block-error-boundary.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["block-error-boundary"]=function(e){function r(r){for(var n,c,l=r[0],i=r[1],a=r[2],p=0,s=[];p<l.length;p++)c=l[p],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&s.push(o[c][0]),o[c]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=c(c.s=t[0]))}return e}var n={},o={8:0},u=[];function c(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.m=e,c.c=n,c.d=function(e,r,t){c.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,r){if(1&r&&(e=c(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(c.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)c.d(t,n,function(r){return e[r]}.bind(null,n));return t},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var f=i;return u.push([
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["block-error-boundary"]=function(e){function r(r){for(var n,c,l=r[0],i=r[1],a=r[2],p=0,s=[];p<l.length;p++)c=l[p],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&s.push(o[c][0]),o[c]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,l=1;l<t.length;l++){var i=t[l];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=c(c.s=t[0]))}return e}var n={},o={8:0},u=[];function c(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,c),t.l=!0,t.exports}c.m=e,c.c=n,c.d=function(e,r,t){c.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,r){if(1&r&&(e=c(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(c.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)c.d(t,n,function(r){return e[r]}.bind(null,n));return t},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=r,l=l.slice();for(var a=0;a<l.length;a++)r(l[a]);var f=i;return u.push([354,0]),t()}([]);
|
build/blocks-legacy.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wc-settings', 'wp-blocks', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-blocks', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '5f3600dd99419a95ced3bdd55b8e4916');
|
build/blocks-legacy.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(t){function e(e){for(var
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(t){function e(e){for(var r,i,s=e[0],u=e[1],a=e[2],f=0,p=[];f<s.length;f++)i=s[f],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);for(l&&l(e);p.length;)p.shift()();return c.push.apply(c,a||[]),n()}function n(){for(var t,e=0;e<c.length;e++){for(var n=c[e],r=!0,s=1;s<n.length;s++){var u=n[s];0!==o[u]&&(r=!1)}r&&(c.splice(e--,1),t=i(i.s=n[0]))}return t}var r={},o={6:0},c=[];function i(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=e,s=s.slice();for(var a=0;a<s.length;a++)e(s[a]);var l=u;return c.push([612,2,0,1]),n()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},10:function(t,e){!function(){t.exports=this.React}()},15:function(t,e){!function(){t.exports=this.wp.blocks}()},22:function(t,e){!function(){t.exports=this.wp.compose}()},3:function(t,e){!function(){t.exports=this.wc.wcSettings}()},355:function(t,e,n){},47:function(t,e){!function(){t.exports=this.wp.hooks}()},5:function(t,e){!function(){t.exports=this.lodash}()},60:function(t,e,n){"use strict";var r=n(8),o=n.n(r),c=n(35),i=n.n(c),s=n(10);n(2);function u(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}e.a=function(t){var e=t.srcElement,n=t.size,r=void 0===n?24:n,c=i()(t,["srcElement","size"]);return Object(s.isValidElement)(e)&&Object(s.cloneElement)(e,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({width:r,height:r},c))}},612:function(t,e,n){"use strict";n.r(e);var r=n(92),o=n.n(r),c=n(0),i=n(15),s=n(1),u=n(60),a=n(16),l=n.n(a),f=n(35),p=n.n(f),b=n(635),h=n(7),m=n.n(h),d=Object(c.createElement)((function(t){var e=t.className,n=t.height,r=t.width,o=p()(t,["className","height","width"]);return Object(c.createElement)(b.a,l()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 245 145",className:m()("woo-icon",e),width:r,height:n},o),Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))}),null),v=(n(355),n(356),n(18)),w=n.n(v),O=n(19),y=n.n(O),g=n(17),j=n.n(g),k=n(20),x=n.n(k),P=n(21),E=n.n(P),D=n(11),W=n.n(D),A=n(8),z=n.n(A),M=n(22),S=n(3),C=n(47);function _(t){var e=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(t){return!1}}();return function(){var n,r=W()(t);if(e){var o=W()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E()(this,n)}}var B=Object(M.createHigherOrderComponent)((function(t){return function(e){x()(r,e);var n=_(r);function r(){var t;w()(this,r);for(var e=arguments.length,o=new Array(e),c=0;c<e;c++)o[c]=arguments[c];return t=n.call.apply(n,[this].concat(o)),z()(j()(t),"mounted",!1),t}return y()(r,[{key:"componentDidMount",value:function(){var t=this.props,e=t.block,n=t.setAttributes;e.name.startsWith("woocommerce/")&&n(this.getAttributesWithDefaults())}},{key:"componentDidUpdate",value:function(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}},{key:"getAttributesWithDefaults",value:function(){var t=Object(i.getBlockType)(this.props.block.name),e=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==t.attributes&&void 0!==t.defaults&&(e=Object.assign({},this.props.attributes||{}),Object.keys(t.attributes).map((function(n){return void 0===e[n]&&void 0!==t.defaults[n]&&(e[n]=t.defaults[n]),n}))),e}},{key:"render",value:function(){return Object(c.createElement)(t,l()({},this.props,{attributes:this.getAttributesWithDefaults()}))}}]),r}(c.Component)}),"withDefaultAttributes");Object(S.compareWithWpVersion)("5.3","<=")&&Object(C.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",B);Object(C.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",(function(t,e){return e.name.startsWith("woocommerce/")&&Object.keys(e.attributes).map((function(n){return void 0===t[n]&&void 0!==e.defaults&&void 0!==e.defaults[n]&&(t[n]=e.defaults[n]),n})),t})),Object(i.setCategories)([].concat(o()(Object(i.getCategories)().filter((function(t){return"woocommerce"!==t.slug}))),[{slug:"woocommerce",title:Object(s.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(c.createElement)(u.a,{srcElement:d})}]))}});
|
build/blocks.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'wc-settings', 'wp-blocks', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-blocks', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'ac0ef35d58a57e2134e8a630d56aa74f');
|
build/blocks.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(t){function e(e){for(var
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(t){function e(e){for(var r,i,s=e[0],u=e[1],a=e[2],f=0,p=[];f<s.length;f++)i=s[f],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);for(l&&l(e);p.length;)p.shift()();return c.push.apply(c,a||[]),n()}function n(){for(var t,e=0;e<c.length;e++){for(var n=c[e],r=!0,s=1;s<n.length;s++){var u=n[s];0!==o[u]&&(r=!1)}r&&(c.splice(e--,1),t=i(i.s=n[0]))}return t}var r={},o={9:0},c=[];function i(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=e,s=s.slice();for(var a=0;a<s.length;a++)e(s[a]);var l=u;return c.push([866,2,0,1]),n()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},15:function(t,e){!function(){t.exports=this.wp.blocks}()},21:function(t,e){!function(){t.exports=this.wp.compose}()},3:function(t,e){!function(){t.exports=this.wc.wcSettings}()},544:function(t,e,n){},58:function(t,e,n){"use strict";var r=n(8),o=n.n(r),c=n(14),i=n.n(c),s=n(9);n(2);function u(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}e.a=function(t){var e=t.srcElement,n=t.size,r=void 0===n?24:n,c=i()(t,["srcElement","size"]);return Object(s.isValidElement)(e)&&Object(s.cloneElement)(e,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({width:r,height:r},c))}},6:function(t,e){!function(){t.exports=this.lodash}()},75:function(t,e){!function(){t.exports=this.wp.hooks}()},866:function(t,e,n){"use strict";n.r(e);var r=n(62),o=n.n(r),c=n(0),i=n(15),s=n(1),u=n(58),a=n(10),l=n.n(a),f=n(14),p=n.n(f),b=n(60),h=n(7),m=n.n(h),d=Object(c.createElement)((function(t){var e=t.className,n=t.height,r=t.width,o=p()(t,["className","height","width"]);return Object(c.createElement)(b.a,l()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 245 145",className:m()("woo-icon",e),width:r,height:n},o),Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))}),null),v=(n(544),n(545),n(23)),w=n.n(v),O=n(26),y=n.n(O),g=n(20),j=n.n(g),k=n(24),x=n.n(k),P=n(25),E=n.n(P),D=n(12),W=n.n(D),A=n(8),z=n.n(A),M=n(21),S=n(3),C=n(75);function _(t){var e=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(t){return!1}}();return function(){var n,r=W()(t);if(e){var o=W()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E()(this,n)}}var B=Object(M.createHigherOrderComponent)((function(t){return function(e){x()(r,e);var n=_(r);function r(){var t;w()(this,r);for(var e=arguments.length,o=new Array(e),c=0;c<e;c++)o[c]=arguments[c];return t=n.call.apply(n,[this].concat(o)),z()(j()(t),"mounted",!1),t}return y()(r,[{key:"componentDidMount",value:function(){var t=this.props,e=t.block,n=t.setAttributes;e.name.startsWith("woocommerce/")&&n(this.getAttributesWithDefaults())}},{key:"componentDidUpdate",value:function(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}},{key:"getAttributesWithDefaults",value:function(){var t=Object(i.getBlockType)(this.props.block.name),e=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==t.attributes&&void 0!==t.defaults&&(e=Object.assign({},this.props.attributes||{}),Object.keys(t.attributes).map((function(n){return void 0===e[n]&&void 0!==t.defaults[n]&&(e[n]=t.defaults[n]),n}))),e}},{key:"render",value:function(){return Object(c.createElement)(t,l()({},this.props,{attributes:this.getAttributesWithDefaults()}))}}]),r}(c.Component)}),"withDefaultAttributes");Object(S.compareWithWpVersion)("5.3","<=")&&Object(C.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",B);Object(C.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",(function(t,e){return e.name.startsWith("woocommerce/")&&Object.keys(e.attributes).map((function(n){return void 0===t[n]&&void 0!==e.defaults&&void 0!==e.defaults[n]&&(t[n]=e.defaults[n]),n})),t})),Object(i.setCategories)([].concat(o()(Object(i.getCategories)().filter((function(t){return"woocommerce"!==t.slug}))),[{slug:"woocommerce",title:Object(s.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(c.createElement)(u.a,{srcElement:d})}]))},9:function(t,e){!function(){t.exports=this.React}()}});
|
build/cart-frontend.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wp-a11y', 'wp-autop', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-wordcount'), 'version' => '83874c1b82c1cc81fdd3ad52e078fd69');
|
build/cart-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=
|
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 a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===a)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}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){e.exports=n(61)()},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){var r=n(73),o=n(74),a=n(54),c=n(75);e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||c()}},function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"s",(function(){return a})),n.d(t,"w",(function(){return c})),n.d(t,"p",(function(){return i})),n.d(t,"l",(function(){return s})),n.d(t,"o",(function(){return u})),n.d(t,"h",(function(){return l})),n.d(t,"x",(function(){return d})),n.d(t,"k",(function(){return p})),n.d(t,"j",(function(){return f})),n.d(t,"c",(function(){return m})),n.d(t,"m",(function(){return b})),n.d(t,"n",(function(){return g})),n.d(t,"A",(function(){return h})),n.d(t,"t",(function(){return v})),n.d(t,"a",(function(){return y})),n.d(t,"u",(function(){return O})),n.d(t,"b",(function(){return j})),n.d(t,"f",(function(){return w})),n.d(t,"v",(function(){return k})),n.d(t,"g",(function(){return S})),n.d(t,"r",(function(){return R})),n.d(t,"q",(function(){return P})),n.d(t,"z",(function(){return x})),n.d(t,"y",(function(){return C})),n.d(t,"d",(function(){return N})),n.d(t,"e",(function(){return I}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),a=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),i=(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","")),s=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),u=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),d=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=Object(r.getSetting)("displayItemizedTaxes",!1),f=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),m=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),b=Object(r.getSetting)("isShippingCalculatorEnabled",!0),g=Object(r.getSetting)("isShippingCostHidden",!1),h=(Object(r.getSetting)("woocommerceBlocksPhase",1),Object(r.getSetting)("wcBlocksAssetUrl","")),v=Object(r.getSetting)("shippingCountries",{}),y=Object(r.getSetting)("allowedCountries",{}),O=Object(r.getSetting)("shippingStates",{}),j=Object(r.getSetting)("allowedStates",{}),w=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("checkoutShowLoginReminder",!0)),E={id:0,title:"",permalink:""},_=Object(r.getSetting)("storePages",{shop:E,cart:E,checkout:E,privacy:E,terms:E}),k=_.shop.permalink,S=(_.checkout.id,_.checkout.permalink),R=_.privacy.permalink,P=_.privacy.title,x=_.terms.permalink,C=_.terms.title,N=(_.cart.id,_.cart.permalink),I=Object(r.getSetting)("checkoutAllowsGuest",!1);Object(r.getSetting)("checkoutAllowsSignup",!1),n(41)},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){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,n){var r=n(76);e.exports=function(e,t){if(null==e)return{};var n,o,a=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)&&(a[n]=e[n])}return a}},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){!function(){e.exports=this.wp.htmlEntities}()},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.compose}()},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 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,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),o.forEach((function(t){Object(r.a)(e,t,n[t])}))}return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(52);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,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}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";var r=n(6),o=n.n(r),a=(n(5),n(3)),c=n(4),i=n.n(c);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 u(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){o()(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 l=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,s=null!=n,l=null!=r;return!s&&l?(t=o||"span",c=u(u({},c),{},{className:i()(c.className,"screen-reader-text")}),React.createElement(t,c,r)):(t=o||a.Fragment,s&&l&&n!==r?React.createElement(t,c,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,c,n))};l.defaultProps={wrapperProps:{}},t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(30);function o(e,t){if(null==e)return{};var n,o,a=Object(r.a)(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)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),a=n(6),c=n.n(a),i=n(12),s=n.n(i),u=n(3),l=n.n(u);function d(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 p(){return(p=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)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(){}function h(){}h.resetWarningCache=g;var v=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var c=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 c.name="Invariant Violation",c}}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:h,resetWarningCache:g};return n.PropTypes=n,n}()}));function y(){}function O(e){return!!(e||"").match(/\d/)}function j(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function w(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),a=o[0],c=o[1]||"";return{beforeDecimal:a,afterDecimal:c,hasNagation:n,addNegation:r}}function E(e,t,n){for(var r="",o=n?"0":"",a=0;a<=t-1;a++)r+=e[a]||o;return r}function _(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function k(e,t,n){return Math.min(Math.max(e,t),n)}function S(e){return Math.max(e.selectionStart,e.selectionEnd)}var R={thousandSeparator:v.oneOfType([v.string,v.oneOf([!0])]),decimalSeparator:v.string,allowedDecimalSeparators:v.arrayOf(v.string),thousandsGroupStyle:v.oneOf(["thousand","lakh","wan"]),decimalScale:v.number,fixedDecimalScale:v.bool,displayType:v.oneOf(["input","text"]),prefix:v.string,suffix:v.string,format:v.oneOfType([v.string,v.func]),removeFormatting:v.func,mask:v.oneOfType([v.string,v.arrayOf(v.string)]),value:v.oneOfType([v.number,v.string]),defaultValue:v.oneOfType([v.number,v.string]),isNumericString:v.bool,customInput:v.elementType,allowNegative:v.bool,allowEmptyFormatting:v.bool,allowLeadingZeros:v.bool,onValueChange:v.func,onKeyDown:v.func,onMouseUp:v.func,onChange:v.func,onFocus:v.func,onBlur:v.func,type:v.oneOf(["text","tel","password"]),isAllowed:v.func,renderText:v.func,getInputRef:v.oneOfType([v.func,v.shape({current:v.any})])},P={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:y,onChange:y,onKeyDown:y,onMouseUp:y,onFocus:y,onBlur:y,isAllowed:function(){return!0}},x=function(e){function t(e){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n=!(o=f(t).call(this,e))||"object"!=typeof o&&"function"!=typeof o?b(r):o;var a=e.defaultValue;n.validateProps();var c=n.formatValueProp(a);return n.state={value:c,numAsString:n.removeFormatting(c)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(b(n)),n.onKeyDown=n.onKeyDown.bind(b(n)),n.onMouseUp=n.onMouseUp.bind(b(n)),n.onFocus=n.onFocus.bind(b(n)),n.onBlur=n.onBlur.bind(b(n)),n}var n,r,o;return 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&&m(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,a=n.numAsString,c=void 0===a?"":a;if(e!==t){this.validateProps();var i=this.formatNumString(c),s=void 0===t.value?i:this.formatValueProp(),u=this.removeFormatting(s),l=parseFloat(u),d=parseFloat(c);(isNaN(l)&&isNaN(d)||l===d)&&i===o&&(null!==r||s===o)||this.updateValue({formattedValue:s,numAsString:u,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var c=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==c&&(e="".concat(e.substring(0,c),".").concat(e.substring(c+1,e.length).replace(new RegExp(j(r),"g"),""))),a&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,a=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!a||0===o||t||r?"":"|"+j(a)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){_(e,t),setTimeout((function(){e.value===n&&_(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,a=r.suffix,c=r.format;if(""===e)return 0;if(t=k(t,0,e.length),!c){var i="-"===e[0];return k(t,o.length+(i?1:0),e.length-a.length)}if("function"==typeof c)return t;if("#"===c[t]&&O(e[t]))return t;if("#"===c[t-1]&&O(e[t-1]))return t;var s=c.indexOf("#");t=k(t,s,c.lastIndexOf("#")+1);for(var u=c.substring(t,c.length).indexOf("#"),l=t,d=t+(-1===u?0:u);l>s&&("#"!==c[l]||!O(e[l]));)l-=1;return!O(e[d])||"left"===n&&t!==s||t-l<d-t?O(e[l])?l+1:l:d}},{key:"getCaretPosition",value:function(e,t,n){var r,o,a=this.props.format,c=this.state.value,i=this.getNumberRegex(!0),s=(e.match(i)||[]).join(""),u=(t.match(i)||[]).join("");for(r=0,o=0;o<n;o++){var l=e[o]||"",d=t[r]||"";if((l.match(i)||l===d)&&("0"!==l||!d.match(i)||"0"===d||s.length===u.length)){for(;l!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof a||c||(r=t.length),r=this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var a="-"===e[0];a&&(e=e.substring(1,e.length));var c=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==c&&c===e.length-o.length?e.substring(0,c):e,a&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,a=t.length;o<=a;o++){var c=t[o]||"",i=o===a?e.length:e.indexOf(c,n);if(-1===i){r=e;break}r+=e.substring(n,i),n=i+c.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,a=t.length;o<a;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,a=t.suffix,c=t.allowNegative,i=t.thousandsGroupStyle,s=this.getSeparators(),u=s.thousandSeparator,l=s.decimalSeparator,d=-1!==e.indexOf(".")||n&&r,p=w(e,c),f=p.beforeDecimal,m=p.afterDecimal,b=p.addNegation;return void 0!==n&&(m=E(m,n,r)),u&&(f=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(f,u,i)),o&&(f=o+f),a&&(m+=a),b&&(f="-"+f),e=f+(d&&l||"")+m}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,a=t.allowEmptyFormatting,c=this.props,i=c.value,s=void 0===i?e:i,u=c.isNumericString,l=!s&&0!==s;return l&&a&&(s=""),l&&!a?"":("number"==typeof s&&(s=s.toString(),u=!0),"Infinity"===s&&u&&(s=""),u&&!n&&"number"==typeof r&&(s=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=w(e),a=o.beforeDecimal,c=o.afterDecimal,i=o.hasNagation,s=parseFloat("0.".concat(c||"0")).toFixed(t).split("."),u=a.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),s[0]),l=E(s[1]||"",Math.min(t,c.length),n),d=r?".":"";return"".concat(i?"-":"").concat(u).concat(d).concat(l)}(s,r,o)),u?this.formatNumString(s):this.formatInput(s))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),a=r.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,a=n.suffix,c=n.decimalScale,i=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-a.length||c&&i&&t[e]===s))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,a=r.allowNegative,c=r.prefix,i=r.suffix,s=r.decimalScale,u=this.getSeparators(),l=u.allowedDecimalSeparators,d=u.decimalSeparator,p=this.state.numAsString||"",f=this.selectionBeforeInput,m=f.selectionStart,b=f.selectionEnd,g=function(e,t){for(var n=0,r=0,o=e.length,a=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[a-1-r]&&a-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),h=g.start,v=g.end;if(!o&&h===v&&-1!==l.indexOf(n[m])){var y=0===s?"":d;return n.substr(0,m)+y+n.substr(m+1,n.length)}var O=o?0:c.length,j=t.length-(o?0:i.length);if(n.length>t.length||!n.length||h===v||0===m&&b===t.length||m===O&&b===j)return n;if(this.checkIfFormatGotDeleted(h,v,t)&&(n=t),!o){var E=this.removeFormatting(n),_=w(E,a),k=_.beforeDecimal,S=_.afterDecimal,R=_.addNegation,P=e<n.indexOf(d)+1;if(E.length<p.length&&P&&""===k&&!parseFloat(S))return R?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,a=e.numAsString,c=e.caretPos,i=this.props.onValueChange,s=this.state.value;if(n)if(o){if(!c){var u=e.inputValue||n.value,l=S(n);n.value=t,c=this.getCaretPosition(u,t,l)}this.setPatchedCaretPosition(n,c,t)}else n.value=t;void 0===a&&(a=this.removeFormatting(t)),t!==s&&(this.setState({value:t,numAsString:a}),i(this.getValueObject(t,a)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,a=o.isAllowed,c=r.value||"",i=S(t);n=this.correctInputValue(i,c,n);var s=this.formatInput(n)||"",u=this.removeFormatting(s);a(this.getValueObject(s,u))||(s=c),this.updateValue({formattedValue:s,numAsString:u,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,a=t.allowLeadingZeros,c=n.numAsString,i=n.value;if(this.focusedElm=null,this.focusTimeout&&clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(c))&&(c=""),a||(c=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(c));var s=this.formatNumString(c);if(s!==i)return this.updateValue({formattedValue:s,numAsString:c,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,a=n.selectionEnd,c=n.value,i=void 0===c?"":c,s=this.props,u=s.decimalScale,l=s.fixedDecimalScale,d=s.prefix,p=s.suffix,f=s.format,m=s.onKeyDown,b=void 0!==u&&l,g=this.getNumberRegex(!1,b),h=new RegExp("-"),v="string"==typeof f;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:a},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===a){var y=t,O=v?f.indexOf("#"):d.length,j=v?f.lastIndexOf("#")+1:i.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var w="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(i,t,w)}else if("Delete"!==r||g.test(i[t])||h.test(i[t])){if("Backspace"===r&&!g.test(i[t]))if(o<=O+1&&"-"===i[0]&&void 0===f){var E=i.substring(1);this.updateValue({formattedValue:E,caretPos:y,input:n})}else if(!h.test(i[t])){for(;!g.test(i[y-1])&&y>O;)y--;y=this.correctCaretPosition(i,y,"left")}}else for(;!g.test(i[y])&&y<j;)y++;(y!==t||t<O||t>j)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,i),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,a=void 0===o?"":o;if(n===r){var c=this.correctCaretPosition(a,n);c!==n&&this.setPatchedCaretPosition(t,c,a)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,a=n.value,c=void 0===a?"":a,i=t.correctCaretPosition(c,r);i===r||0===r&&o===c.length||t.setPatchedCaretPosition(n,i,c),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,a=r.displayType,c=r.customInput,i=r.renderText,s=r.getInputRef,u=this.state.value,d=(e=this.props,t=R,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),f=p({inputMode:"numeric"},d,{type:o,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===a)return i?i(u)||null:l.a.createElement("span",p({},d,{ref:s}),u);if(c){var m=c;return l.a.createElement(m,p({},f,{ref:s}))}return l.a.createElement("input",p({},f,{ref:s}))}}])&&d(n.prototype,r),o&&d(n,o),t}(l.a.Component);x.propTypes=R,x.defaultProps=P;var C=x,N=n(4),I=n.n(N);n(90);function M(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 A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.className,n=e.value,r=e.currency,a=e.onValueChange,c=s()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var i=n/Math.pow(10,r.minorUnit);if(!Number.isFinite(i))return null;var u=I()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),l=A(A(A({displayType:"text"},c),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(r)),{},{value:void 0,currency:void 0,onValueChange:void 0}),d=a?function(e){var t=e.value*Math.pow(10,r.minorUnit);a(t)}:function(){};return React.createElement(C,o()({className:u},l,{value:i,onValueChange:d}))}},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(60);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(22),o=n(19);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(47);var o=n(52);function a(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){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(38),a=n.n(o),c=function(e){var t=Object(r.useRef)();return a()(e,t.current)||(t.current=e),t.current}},,function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";n(5);var r=n(4),o=n.n(r),a=n(0),c=n(31);n(164);t.a=function(e){var t=e.className,n=e.currency,r=e.label,i=e.value,s=e.description;return React.createElement("div",{className:o()("wc-block-components-totals-item",t)},React.createElement("span",{className:"wc-block-components-totals-item__label"},r),Object(a.isValidElement)(i)?React.createElement("div",{className:"wc-block-components-totals-item__value"},i):React.createElement(c.a,{className:"wc-block-components-totals-item__value",currency:n,displayType:"text",value:i}),React.createElement("div",{className:"wc-block-components-totals-item__description"},s))}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(32),o=n.n(r),a=n(33),c=n.n(a),i=n(19),s=n.n(i),u=n(34),l=n.n(u),d=n(35),p=n.n(d),f=n(24),m=n.n(f),b=n(6),g=n.n(b),h=(n(5),n(3)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.A,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,a=e.text,c=void 0===a?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):a,i=e.errorMessage,s=e.errorMessagePrefix,u=void 0===s?Object(v.__)("Error:","woo-gutenberg-products-block"):s;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),i&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},u?u+" ":"",i)))};n(63);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=m()(e);if(t){var o=m()(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,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return e=t.call.apply(t,[this].concat(a)),g()(s()(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,a=e.errorMessagePrefix,c=this.state,i=c.errorMessage;return c.hasError?React.createElement(O,{errorMessage:r?i:null,header:t,imageUrl:n,text:o,errorMessagePrefix:a}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(h.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);w.defaultProps={showErrorMessage:!0};t.a=w},function(e,t){!function(){e.exports=this.ReactDOM}()},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,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.dom}()},function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},function(e,t){function n(e,t,n,r,o,a,c){try{var i=e[a](c),s=i.value}catch(e){return void n(e)}i.done?t(s):Promise.resolve(s).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var c=e.apply(t,r);function i(e){n(c,o,a,i,s,"next",e)}function s(e){n(c,o,a,i,s,"throw",e)}i(void 0)}))}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(47);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){var r=n(55);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,n){var r=n(91),o=n(92),a=n(54),c=n(93);e.exports=function(e){return r(e)||o(e)||a(e)||c()}},function(e,t,n){"use strict";n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return b}));var r=n(6),o=n.n(r),a=n(8),c=n.n(a),i=n(0),s=n(7),u=n(38),l=n.n(u);function d(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=Object(i.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}}),m=function(){return Object(i.useContext)(f)},b=function(e){var t=e.children,n=Object(i.useState)({}),r=c()(n,2),a=r[0],u=r[1],d=Object(i.useCallback)((function(e){return a[e]}),[a]),m=Object(i.useCallback)((function(e){var t=a[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[a]),b=Object(i.useCallback)((function(e){u((function(t){return t[e]?Object(s.omit)(t,[e]):t}))}),[]),g=Object(i.useCallback)((function(){u({})}),[]),h=Object(i.useCallback)((function(e){e&&u((function(t){return e=Object(s.pickBy)(e,(function(e,n){return"string"==typeof e.message&&(!t.hasOwnProperty(n)||!l()(t[n],e))})),0===Object.values(e).length?t:p(p({},t),e)}))}),[]),v=Object(i.useCallback)((function(e,t){u((function(n){if(!n.hasOwnProperty(e))return n;var r=p(p({},n[e]),t);return l()(n[e],r)?n:p(p({},n),{},o()({},e,r))}))}),[]),y={getValidationError:d,setValidationErrors:h,clearValidationError:b,clearAllValidationErrors:g,hideValidationError:Object(i.useCallback)((function(e){v(e,{hidden:!0})}),[v]),showValidationError:Object(i.useCallback)((function(e){v(e,{hidden:!1})}),[v]),showAllValidationErrors:Object(i.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(n){e[n].hidden&&(t[n]=p(p({},e[n]),{},{hidden:!1}))})),0===Object.values(t).length?e:p(p({},e),t)}))}),[]),hasValidationErrors:Object.keys(a).length>0,getValidationErrorId:m};return React.createElement(f.Provider,{value:y},t)}},,,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(62);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,c){if(c!==r){var i=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 i.name="Invariant Violation",i}}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:a,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,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";n.d(t,"a",(function(){return u}));var r=n(6),o=n.n(r),a=n(112),c=n(0);function i(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?i(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var e=Object(a.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(c.useRef)(t);Object(c.useEffect)((function(){u.current=t}),[t]);var l=Object(c.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.map((function(t){return null!==e&&t.status!==e||r(t.id),!0}))},removeNotice:r}}),[r]),d=Object(c.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]:{};o(e,t)}}}),[n,o]);return s(s(s({notices:t},l),d),{},{setIsSuppressed:i})}},function(e,t,n){"use strict";var r=n(1),o=(n(5),n(4)),a=n.n(o),c=n(0);function i(){return Object(c.createElement)("span",{className:"components-spinner"})}n(157),t.a=function(e){var t=e.children,n=e.className,o=e.screenReaderLabel,c=e.showSpinner,s=void 0!==c&&c,u=e.isLoading;return void 0===u||u?React.createElement("div",{className:a()(n,"wc-block-components-loading-mask")},s&&React.createElement(i,null),React.createElement("div",{className:"wc-block-components-loading-mask__children","aria-hidden":!0},t),React.createElement("span",{className:"screen-reader-text"},o||Object(r.__)("Loading…","woo-gutenberg-products-block"))):t}},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)),a=r(n(76)),c=n(3),i=r(c),s=r(n(104)),u=r(n(19)),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 d(){var e=c.useState(!1)[1];return c.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function f(e){return l.und(e)?[]:l.arr(e)?e:[e]}function m(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 b(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,a(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 a;return l.und(t[r])?o({},n,((a={})[r]=e[r],a)):n}),{});return o({to:t},n)}var g,h,v=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 v&&e.addChild(u(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(u(t))}))},t}return s(t,e),t}(v),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 v&&e.addChild(u(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.removeChild(u(t))}))},t}s(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 v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function j(e,t){g={fn:e,transform:t}}function w(e){h=e}var E,_=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},k=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function S(e){E=e}var R,P=function(){return Date.now()};function x(e){R=e}var C,N,I=function(e){return e.current};function M(e){C=e}var A=Object.freeze({get applyAnimatedValues(){return g},injectApplyAnimatedValues:j,get colorNames(){return h},injectColorNames:w,get requestFrame(){return _},get cancelFrame(){return k},injectFrame:function(e,t){_=e,k=t},get interpolation(){return E},injectStringInterpolator:S,get now(){return P},injectNow:function(e){P=e},get defaultElement(){return R},injectDefaultElement:x,get animatedApi(){return I},injectAnimatedApi:function(e){I=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:M,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),D=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 s(t,e),t}(O),T=!1,F=new Set,L=function e(){if(!T)return!1;var t=P(),n=F,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var a;if(r){if(o>=n.length)break;a=n[o++]}else{if((o=n.next()).done)break;a=o.value}for(var c=a,i=!1,s=0;s<c.configs.length;s++){for(var u=c.configs[s],l=void 0,d=void 0,p=0;p<u.animatedValues.length;p++){var f=u.animatedValues[p];if(!f.done){var m=u.fromValues[p],b=u.toValues[p],g=f.lastPosition,h=b instanceof v,y=Array.isArray(u.initialVelocity)?u.initialVelocity[p]:u.initialVelocity;if(h&&(b=b.getValue()),u.immediate)f.setValue(b),f.done=!0;else if("string"!=typeof m&&"string"!=typeof b){if(void 0!==u.duration)g=m+u.easing((t-f.startTime)/u.duration)*(b-m),l=t>=f.startTime+u.duration;else if(u.decay)g=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(l=Math.abs(f.lastPosition-g)<.1)&&(b=g);else{d=void 0!==f.lastTime?f.lastTime:t,y=void 0!==f.lastVelocity?f.lastVelocity:u.initialVelocity,t>d+64&&(d=t);for(var O=Math.floor(t-d),j=0;j<O;++j){g+=1*(y+=1*((-u.tension*(g-b)+-u.friction*y)/u.mass)/1e3)/1e3}var w=!(!u.clamp||0===u.tension)&&(m<b?g>b:g<b),E=Math.abs(y)<=u.precision,k=0===u.tension||Math.abs(b-g)<=u.precision;l=w||E&&k,f.lastVelocity=y,f.lastTime=t}h&&!u.toValues[p].done&&(l=!1),l?(f.value!==b&&(g=b),f.done=!0):i=!0,f.setValue(g),f.lastPosition=g}else f.setValue(b),f.done=!0}}c.props.onFrame&&(c.values[u.name]=u.interpolation.getValue())}c.props.onFrame&&c.props.onFrame(c.values),i||(F.delete(c),c.stop(!0))}return F.size?N?N():_(e):T=!1,T};function V(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:n});if(E&&"string"==typeof e.output[0])return E(e);var r=e,o=r.output,a=r.range||[0,1],c=r.extrapolateLeft||r.extrapolate||"extend",i=r.extrapolateRight||r.extrapolate||"extend",s=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,a);return function(e,t,n,r,o,a,c,i,s){var u=s?s(e):e;if(u<t){if("identity"===c)return u;"clamp"===c&&(u=t)}if(u>n){if("identity"===i)return u;"clamp"===i&&(u=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t);u=a(u),r===-1/0?u=-u:o===1/0?u+=r:u=u*(o-r)+r;return u}(e,a[t],a[t+1],o[t],o[t+1],s,c,i,r.map)}}var B=function(e){function t(n,r,o,a){var c;return(c=e.call(this)||this).calc=void 0,c.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],c.calc=V(r,o,a),c}s(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=V(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var U=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}s(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 B(this,e,t,n)},t}(v),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new U(e)})),n}s(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 B(this,e,t)},t}(y),H=0,W=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=H++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=b(e),n=t.delay,r=void 0===n?0:n,c=t.to,i=a(t,["delay","to"]);if(l.arr(c)||l.fun(c))this.queue.push(o({},i,{delay:r,to:c}));else if(c){var s={};Object.entries(c).forEach((function(e){var t,n=e[0],a=e[1],c=o({to:(t={},t[n]=a,t),delay:m(r,n)},i),u=s[c.delay]&&s[c.delay].to;s[c.delay]=o({},s[c.delay],c,{to:o({},u,c.to)})})),this.queue=Object.values(s)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),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,a=e.to,c=void 0===a?{}:a;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(c)&&(n.merged=o({},n.merged,c))}));var r=this.local=++this.guid,c=this.localQueue=this.queue;this.queue=[],c.forEach((function(t,o){var i=t.delay,s=a(t,["delay"]),u=function(t){o===c.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},d=l.arr(s.to)||l.fun(s.to);i?setTimeout((function(){r===n.guid&&(d?n.runAsync(s,u):n.diff(s).start(u))}),i):d?n.runAsync(s,u):n.diff(s).start(u)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,F.has(t)||F.add(t),T||(T=!0,_(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,F.has(t)&&F.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,a(e,["delay"])),c=this.local,i=Promise.resolve(void 0);if(l.arr(r.to))for(var s=function(e){var t=e,a=o({},r,b(r.to[t]));l.arr(a.config)&&(a.config=a.config[t]),i=i.then((function(){if(c===n.guid)return new Promise((function(e){return n.diff(a).start(e)}))}))},u=0;u<r.to.length;u++)s(u);else if(l.fun(r.to)){var d,p=0;i=i.then((function(){return r.to((function(e){var t=o({},r,b(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,c===n.guid)return d=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return d}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,a=void 0===r?{}:r,c=n.to,i=void 0===c?{}:c,s=n.config,u=void 0===s?{}:s,d=n.reverse,b=n.attach,g=n.reset,v=n.immediate;if(d){var y=[i,a];a=y[0],i=y[1]}this.merged=o({},a,this.merged,i),this.hasChanged=!1;var O=b&&b(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],c=n[1],i=e[r]||{},s=l.num(c),d=l.str(c)&&!c.startsWith("#")&&!/\d/.test(c)&&!h[c],b=l.arr(c),y=!s&&!b&&!d,j=l.und(a[r])?c:a[r],w=s||b||d?c:1,_=m(u,r);O&&(w=O.animations[r].parent);var k,S=i.parent,R=i.interpolation,x=f(O?w.getPayload():w),C=c;y&&(C=E({range:[0,1],output:[c,c]})(1));var N,I=R&&R.getValue(),M=!l.und(S)&&i.animatedValues.some((function(e){return!e.done})),A=!l.equ(C,I),D=!l.equ(C,i.previous),T=!l.equ(_,i.config);if(g||D&&A||T){var F;if(s||d)S=R=i.parent||new U(j);else if(b)S=R=i.parent||new q(j);else if(y){var L=i.interpolation&&i.interpolation.calc(i.parent.value);L=void 0===L||g?j:L,i.parent?(S=i.parent).setValue(0,!1):S=new U(0);var V={output:[L,c]};i.interpolation?(R=i.interpolation,i.interpolation.updateConfig(V)):R=S.interpolate(V)}return x=f(O?w.getPayload():w),k=f(S.getPayload()),g&&!y&&S.setValue(j,!1),t.hasChanged=!0,k.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=M?e.lastVelocity:void 0,e.lastTime=M?e.lastTime:void 0,e.startTime=P(),e.done=!1,e.animatedStyles.clear()})),m(v,r)&&S.setValue(y?w:c,!1),o({},e,((F={})[r]=o({},i,{name:r,parent:S,interpolation:R,animatedValues:k,toValues:x,previous:C,config:_,fromValues:f(S.getValue()),immediate:m(v,r),initialVelocity:p(_.velocity,0),clamp:p(_.clamp,!1),precision:p(_.precision,.01),tension:p(_.tension,170),friction:p(_.friction,26),mass:p(_.mass,1),duration:_.duration,easing:p(_.easing,(function(e){return e})),decay:_.decay}),F))}return A?e:(y&&(S.setValue(1,!1),R.updateConfig({output:[C,C]})),S.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}(),z=function(e,t){var n=c.useRef(!1),r=c.useRef(),o=l.fun(t),a=c.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 a=new W,c=o?m(t,r,a):t[r];return 0===r&&(n=c.ref),a.update(c),n||a.start(),a})),n]}),[e]),i=a[0],s=a[1];r.current=i;c.useImperativeHandle(s,(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 u=c.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),s||t.start()}))}}),[e]);c.useEffect((function(){n.current?o||u(t):s||r.current.forEach((function(e){return e.start()}))})),c.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var d=r.current.map((function(e){return e.getValues()}));return o?[d,u,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:d},K=0,Y=function(e,t){return("function"==typeof t?e.map(t):f(t)).map(String)},$=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,c=a(e,["items","keys"]);return t=f(void 0!==t?t:null),o({items:t,keys:Y(t,r)},c)};function G(e,t){var n=function(){if(o){if(a>=r.length)return"break";c=r[a++]}else{if((a=r.next()).done)return"break";c=a.value}var n=c.key,i=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},r=e.current.deleted,o=Array.isArray(r),a=0;for(r=o?r:r[Symbol.iterator]();;){var c;if("break"===n())break}e.current.forceUpdate()}var Z=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=g.transform(t)),n.payload=t,n}return s(t,e),t}(O),Q={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},X="[-+]?\\d*\\.?\\d+";function J(){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"+J(X,X,X)),te=new RegExp("rgba"+J(X,X,X,X)),ne=new RegExp("hsl"+J(X,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(X,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",X)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function se(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 ue(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,a=se(o,r,e+1/3),c=se(o,r,e),i=se(o,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*c)<<16|Math.round(255*i)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(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 fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ce.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[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=ie.exec(t))?parseInt(n[1],16)>>>0:(n=ae.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|ue(de(n[1]),fe(n[2]),fe(n[3])))>>>0:(n=re.exec(t))?(ue(de(n[1]),fe(n[2]),fe(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 be=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ge=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,he=new RegExp("("+Object.keys(Q).join("|")+")","g"),ve={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||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).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}),ve);var je={};M((function(e){return new Z(e)})),x("div"),S((function(e){var t=e.output.map((function(e){return e.replace(ge,me)})).map((function(e){return e.replace(he,me)})),n=t[0].match(be).map((function(){return[]}));t.forEach((function(e){e.match(be).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(be).map((function(t,r){return V(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(be,(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(Q),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,c=t.scrollLeft,i=a(t,["style","children","scrollTop","scrollLeft"]),s="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==o&&(e.scrollTop=o),void 0!==c&&(e.scrollLeft=c),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(u)){var l=0===u.indexOf("--"),d=Oe(u,n[u],l);"float"===u&&(u="cssFloat"),l?e.style.setProperty(u,d):e.style[u]=d}for(var p in i){var f=s?p:je[p]||(je[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,i[p])}}),(function(e){return e}));var we,Ee,_e=(we=function(e){return c.forwardRef((function(t,n){var r=d(),s=c.useRef(!0),u=c.useRef(null),p=c.useRef(null),f=c.useCallback((function(e){var t=u.current;u.current=new D(e,(function(){var e=!1;p.current&&(e=g.fn(p.current,u.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){s.current=!1,u.current&&u.current.detach()}}),[]),c.useImperativeHandle(n,(function(){return I(p,s,r)})),f(t);var m,b=u.current.getValue(),h=(b.scrollTop,b.scrollLeft,a(b,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof i.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 i.createElement(e,o({},h,{ref:v}))}))},void 0===(Ee=!1)&&(Ee=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=Ee?t[0].toLowerCase()+t.substring(1):t;return e[n]=we(n),e}),we)}),ke=_e(["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=_e,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=ke,t.a=ke,t.interpolate=function(e,t,n){return e&&new B(e,t,n)},t.Globals=A,t.useSpring=function(e){var t=l.fun(e),n=z(1,t?e:[e]),r=n[0],o=n[1],a=n[2];return t?[r[0],o,a]:r},t.useTrail=function(e,t){var n=c.useRef(!1),r=l.fun(t),a=m(t),i=c.useRef(),s=z(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},a,{config:m(a.config,e),attach:e>0&&function(){return i.current[e-1]}})})),u=s[0],d=s[1],p=s[2],f=c.useMemo((function(){return function(e){return d((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,c=i.current[r];return o({},e,{config:m(e.config||a.config,t),attach:c&&function(){return c}})}))}}),[e,a.reverse]);return c.useEffect((function(){n.current&&!r&&f(t)})),c.useEffect((function(){n.current=!0}),[]),r?[u,f,p]:u},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),i=$(r),s=i.lazy,u=void 0!==s&&s,l=(i.unique,i.reset),p=void 0!==l&&l,f=(i.enter,i.leave,i.update,i.onDestroyed),b=(i.keys,i.items,i.onFrame),g=i.onRest,h=i.onStart,v=i.ref,y=a(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=d(),j=c.useRef(!1),w=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return c.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,c=a(e,["first","prevProps"]),i=$(t),s=i.items,u=i.keys,l=i.initial,d=i.from,p=i.enter,f=i.leave,b=i.update,g=i.trail,h=void 0===g?0:g,v=i.unique,y=i.config,O=i.order,j=void 0===O?["enter","leave","update"]:O,w=$(r),E=w.keys,_=w.items,k=o({},c.current),S=[].concat(c.deleted),R=Object.keys(k),P=new Set(R),x=new Set(u),C=u.filter((function(e){return!P.has(e)})),N=c.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),I=u.filter((function(e){return P.has(e)})),M=-h;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){v&&S.find((function(t){return t.originalKey===e}))&&(S=S.filter((function(t){return t.originalKey!==e})));var r=u.indexOf(e),o=s[r],a=n&&void 0!==l?"initial":"enter";k[e]={slot:a,originalKey:e,key:v?String(e):K++,item:o,trail:M+=h,config:m(y,o,a),from:m(n&&void 0!==l?l||{}:d,o),to:m(p,o)}}));break;case"leave":N.forEach((function(e){var t=E.indexOf(e),n=_[t];S.unshift(o({},k[e],{slot:"leave",destroyed:!0,left:E[Math.max(0,t-1)],right:E[Math.min(E.length,t+1)],trail:M+=h,config:m(y,n,"leave"),to:m(f,n)})),delete k[e]}));break;case"update":I.forEach((function(e){var t=u.indexOf(e),n=s[t];k[e]=o({},k[e],{item:n,slot:"update",trail:M+=h,config:m(y,n,"update"),to:m(b,n)})}))}}var A=u.map((function(e){return k[e]}));return S.forEach((function(e){var t,n=e.left,r=(e.right,a(e,["left","right"]));-1!==(t=A.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),A=[].concat(A.slice(0,t),[r],A.slice(t))})),o({},c,{changed:C.length||N.length||I.length,first:n&&0===C.length,transitions:A,current:k,deleted:S,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,a=e.config,c=e.trail,i=e.key,s=e.item;w.current.instances.has(i)||w.current.instances.set(i,new W);var l=w.current.instances.get(i),d=o({},y,{to:r,from:n,config:a,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||u||G(w,i),f&&f(s)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(v||u)&&w.current.deleted.length>0&&G(w),g&&g(s,t,n))},onStart:h&&function(){return h(s,t)},onFrame:b&&function(e){return b(s,t,e)},delay:c,reset:p&&"enter"===t});l.update(d),w.current.paused||l.start()})),c.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=c.useRef();c.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 a=e.current;if(a){var c=a.controllers;if(c.length){var i=n*t[r];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),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=z},function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){"use strict";var r=n(11),o=n.n(r),a=n(12),c=n.n(a),i=n(72),s=n(4),u=n.n(s),l=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]),a=u()("dashicon","dashicons-arrow-down-alt2",t);return React.createElement(i.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:a,width:n,height:n},r),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},d=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]),a=u()("dashicon","dashicons-arrow-down-alt2",t);return React.createElement(i.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:a,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"}))},p=n(0);t.a=function(e){let t=function(){return null};switch(e.icon){case"arrow-down-alt2":t=l;break;case"no-alt":t=d}return Object(p.createElement)(t,{size:e.size||20,className:e.className})}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(26),o=n(7),a=n(0),c=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(a.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},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,a=void 0;try{for(var c,i=e[Symbol.iterator]();!(r=(c=i.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw a}}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){e.exports=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";var r=n(26),o=n(10),a=n(29),c=n(0),i=n(69),s=n(72);t.a=function(e){var t=e.icon,n=void 0===t?null:t,u=e.size,l=Object(a.a)(e,["icon","size"]),d=u||20;if("string"==typeof n)return Object(c.createElement)(i.a,Object(o.a)({icon:n,size:d},l));if(n&&i.a===n.type)return Object(c.cloneElement)(n,Object(r.a)({size:d},l));var p=u||24;if("function"==typeof n)return n.prototype instanceof c.Component?Object(c.createElement)(n,Object(r.a)({size:p},l)):n(Object(r.a)({size:p},l));if(n&&("svg"===n.type||n.type===s.a)){var f=Object(r.a)({width:p,height:p},n.props,l);return Object(c.createElement)(s.a,f)}return Object(c.isValidElement)(n)?Object(c.cloneElement)(n,Object(r.a)({size:p},l)):n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(16),o=n(13),a=n(110),c=n(15),i=n(7),s={cartCoupons:[],cartItems:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:[],shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:function(){}},u=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(a.a)(),n=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},d=e.shouldSelect,p=Object(o.useSelect)((function(e,t){var o=t.dispatch;if(!d)return s;if(n)return{cartCoupons:l.coupons,cartItems:l.items,cartItemsCount:l.items_count,cartItemsWeight:l.items_weight,cartNeedsPayment:l.needs_payment,cartNeedsShipping:l.needs_shipping,cartItemErrors:[],cartTotals:l.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:l.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==l?void 0:l.receiveCart)?l.receiveCart:function(){}};var a=e(r.CART_STORE_KEY),u=a.getCartData(),p=a.getCartErrors(),f=a.getCartTotals(),m=!a.hasFinishedResolution("getCartData"),b=a.areShippingRatesLoading(),g=o(r.CART_STORE_KEY).receiveCart,h=Object(i.mapValues)(u.shippingAddress,(function(e){return Object(c.decodeEntities)(e)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:f,cartIsLoading:m,cartErrors:p,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:b,hasShippingAddress:!!h.country,receiveCart:g}}),[d]);return p}},function(e,t,n){"use strict";var r=n(26),o=n(29),a=n(4),c=n.n(a),i=n(0);t.a=Object(i.forwardRef)((function(e,t){var n=e.href,a=e.target,s=e.isPrimary,u=e.isLarge,l=e.isSmall,d=e.isTertiary,p=e.isToggled,f=e.isBusy,m=e.isDefault,b=e.isLink,g=e.isDestructive,h=e.className,v=e.disabled,y=Object(o.a)(e,["href","target","isPrimary","isLarge","isSmall","isTertiary","isToggled","isBusy","isDefault","isLink","isDestructive","className","disabled"]),O=c()("components-button",h,{"is-button":m||s||u||l,"is-default":m||!s&&(u||l),"is-primary":s,"is-large":u,"is-small":l,"is-tertiary":d,"is-toggled":p,"is-busy":f,"is-link":b,"is-destructive":g}),j=void 0===n||v?"button":"a",w="a"===j?{href:n,target:a}:{type:"button",disabled:v};return Object(i.createElement)(j,Object(r.a)({},w,y,{className:O,ref:t}))}))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),a=n(12),c=n.n(a),i=n(4),s=n.n(i);n(5),n(159);t.a=function(e){var t=e.children,n=e.className,r=e.headingLevel,a=c()(e,["children","className","headingLevel"]),i=s()("wc-block-components-title",n),u="h".concat(r);return React.createElement(u,o()({className:i},a),t)}},function(e,t,n){"use strict";var r=n(8),o=n.n(r),a=n(3),c=(n(5),n(4)),i=n.n(c),s=n(0),u=n(28),l=(n(124),Object(a.forwardRef)((function(e,t){var n=e.className,r=e.id,a=e.type,c=void 0===a?"text":a,l=e.ariaLabel,d=e.ariaDescribedBy,p=e.label,f=e.screenReaderLabel,m=e.disabled,b=e.help,g=e.autoComplete,h=void 0===g?"off":g,v=e.value,y=void 0===v?"":v,O=e.onChange,j=e.required,w=void 0!==j&&j,E=e.onBlur,_=void 0===E?function(){}:E,k=e.feedback,S=Object(s.useState)(!1),R=o()(S,2),P=R[0],x=R[1];return React.createElement("div",{className:i()("wc-block-components-text-input",n,{"is-active":P||y})},React.createElement("input",{type:c,id:r,value:y,ref:t,autoComplete:h,onChange:function(e){O(e.target.value)},onFocus:function(){return x(!0)},onBlur:function(){_(),x(!1)},"aria-label":l||p,disabled:m,"aria-describedby":b&&!d?r+"__help":d,required:w}),React.createElement(u.a,{label:p,screenReaderLabel:f||p,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&React.createElement("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),k)})));t.a=l},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(3);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,a=Object(r.useRef)(null),c=Object(r.useRef)([]),i=n.leading,s=void 0===n.trailing||n.trailing,u=Object(r.useRef)(!1),l=Object(r.useRef)(null),d=Object(r.useRef)(!1),p=Object(r.useRef)(e);p.current=e;var f=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(a.current),a.current=null,c.current=[],l.current=null,u.current=!1}),[]);Object(r.useEffect)((function(){return function(){d.current=!0}}),[]);var m=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c.current=e,clearTimeout(l.current),u.current&&(u.current=!1),l.current||!i||u.current||(p.current.apply(p,e),u.current=!0),l.current=setTimeout((function(){var t=!0;i&&u.current&&(t=!1),f(),!d.current&&s&&t&&p.current.apply(p,e)}),t),o&&!a.current&&s&&(a.current=setTimeout((function(){var e=c.current;f(),d.current||p.current.apply(null,e)}),o))}),[o,t,f,i,s]),b=Object(r.useCallback)((function(){l.current&&(p.current.apply(null,c.current),f())}),[f]);return[m,f,b]}},function(e,t,n){"use strict";var r=n(0),o=n(68),a=n(49),c=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(
|
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=257)}([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.wc.wcSettings}()},function(e,t){!function(){e.exports=this.React}()},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
|
|