WooCommerce Gutenberg Products Block - Version 3.6.0

Version Description

  • 2020-10-12 =

Bug Fixes

  • Make 'retry' property on errors from checkoutAfterProcessingWithSuccess/Error observers default to true if it's undefined. (3261)
  • Ensure new payment methods are only displayed when no saved payment method is selected. (3247)
  • Load WC Blocks CSS after editor CSS. (3219)
  • Restore saved payment method data after closing an express payment method. (3210)

refactor

  • Don't load contents of payment method hidden tabs. (3227)
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Gutenberg Products Block
Version 3.6.0
Comparing to
See all releases

Code changes from version 3.5.0 to 3.6.0

Files changed (51) hide show
  1. assets/js/base/components/label/index.js +5 -9
  2. assets/js/base/components/payment-methods/express-payment-methods.js +13 -2
  3. assets/js/base/components/payment-methods/index.js +1 -0
  4. assets/js/base/components/payment-methods/payment-method-options.js +87 -0
  5. assets/js/base/components/payment-methods/payment-method-tab.js +61 -0
  6. assets/js/base/components/payment-methods/payment-methods.js +15 -147
  7. assets/js/base/components/payment-methods/saved-payment-method-options.js +20 -17
  8. assets/js/base/components/payment-methods/test/payment-methods.js +112 -0
  9. assets/js/base/components/tabs/index.js +2 -1
  10. assets/js/base/components/title/index.js +3 -3
  11. assets/js/base/context/cart-checkout/checkout-state/actions.js +5 -0
  12. assets/js/base/context/cart-checkout/checkout-state/constants.js +1 -0
  13. assets/js/base/context/cart-checkout/checkout-state/index.js +6 -5
  14. assets/js/base/context/cart-checkout/checkout-state/reducer.js +11 -1
  15. assets/js/base/context/cart-checkout/checkout/processor/index.js +3 -0
  16. assets/js/base/context/cart-checkout/payment-methods/test/payment-method-data-context.js +109 -2
  17. assets/js/base/context/shared/event-emit/emitters.js +6 -10
  18. assets/js/base/hooks/checkout/use-emit-response.js +5 -0
  19. assets/js/blocks/cart-checkout/checkout/attributes.js +8 -1
  20. assets/js/blocks/cart-checkout/checkout/block.js +7 -2
  21. assets/js/blocks/cart-checkout/checkout/edit.js +23 -0
  22. assets/js/blocks/cart-checkout/checkout/form/address-step.js +2 -0
  23. assets/js/blocks/cart-checkout/checkout/form/contact-fields-step.js +32 -3
  24. assets/js/blocks/cart-checkout/checkout/form/index.js +2 -0
  25. assets/js/blocks/cart-checkout/checkout/form/style.scss +1 -1
  26. assets/js/payment-method-extensions/payment-methods/stripe/credit-card/payment-method.js +3 -4
  27. assets/js/type-defs/hooks.js +2 -0
  28. assets/js/type-defs/registered-payment-method-props.js +1 -1
  29. build/active-filters-frontend.asset.php +1 -1
  30. build/active-filters-frontend.js +2 -2
  31. build/active-filters.asset.php +1 -1
  32. build/active-filters.js +1 -1
  33. build/all-products-frontend.asset.php +1 -1
  34. build/all-products-frontend.js +1 -1
  35. build/all-products.asset.php +1 -1
  36. build/all-products.js +1 -1
  37. build/all-reviews.asset.php +1 -1
  38. build/all-reviews.js +1 -1
  39. build/atomic-block-components/add-to-cart-frontend.js +1 -1
  40. build/atomic-block-components/add-to-cart.js +1 -1
  41. build/atomic-block-components/button-frontend.js +1 -1
  42. build/atomic-block-components/image-frontend.js +1 -1
  43. build/atomic-block-components/image.js +1 -1
  44. build/atomic-block-components/price-frontend.js +1 -1
  45. build/atomic-block-components/price.js +1 -1
  46. build/atomic-block-components/sale-badge-frontend.js +1 -1
  47. build/atomic-block-components/sale-badge.js +1 -1
  48. build/atomic-block-components/title-frontend.js +1 -1
  49. build/atomic-block-components/title.js +1 -1
  50. build/attribute-filter-frontend.asset.php +1 -1
  51. build/attribute-filter-frontend.js +2 -2
assets/js/base/components/label/index.js CHANGED
@@ -11,16 +11,16 @@ import classNames from 'classnames';
11
  * specified via props.
12
  *
13
  * @param {Object} props Incoming props for the component.
14
- * @param {string} props.label Label content.
15
- * @param {string} props.screenReaderLabel Content for screen readers.
16
- * @param {string} props.wrapperElement What element is used to wrap the label.
17
- * @param {Object} props.wrapperProps Props passed into wrapper element.
18
  */
19
  const Label = ( {
20
  label,
21
  screenReaderLabel,
22
  wrapperElement,
23
- wrapperProps,
24
  } ) => {
25
  let Wrapper;
26
 
@@ -64,8 +64,4 @@ Label.propTypes = {
64
  wrapperProps: PropTypes.object,
65
  };
66
 
67
- Label.defaultProps = {
68
- wrapperProps: {},
69
- };
70
-
71
  export default Label;
11
  * specified via props.
12
  *
13
  * @param {Object} props Incoming props for the component.
14
+ * @param {string} [props.label] Label content.
15
+ * @param {string} [props.screenReaderLabel] Content for screen readers.
16
+ * @param {string} [props.wrapperElement] What element is used to wrap the label.
17
+ * @param {Object} [props.wrapperProps] Props passed into wrapper element.
18
  */
19
  const Label = ( {
20
  label,
21
  screenReaderLabel,
22
  wrapperElement,
23
+ wrapperProps = {},
24
  } ) => {
25
  let Wrapper;
26
 
64
  wrapperProps: PropTypes.object,
65
  };
66
 
 
 
 
 
67
  export default Label;
assets/js/base/components/payment-methods/express-payment-methods.js CHANGED
@@ -26,23 +26,34 @@ const ExpressPaymentMethods = () => {
26
  const {
27
  setActivePaymentMethod,
28
  activePaymentMethod,
 
29
  setPaymentStatus,
30
  } = usePaymentMethodDataContext();
31
  const paymentMethodInterface = usePaymentMethodInterface();
32
  const { paymentMethods } = useExpressPaymentMethods();
33
  const previousActivePaymentMethod = useRef( activePaymentMethod );
 
34
 
35
  const onExpressPaymentClick = useCallback(
36
  ( paymentMethodId ) => () => {
37
  previousActivePaymentMethod.current = activePaymentMethod;
 
38
  setPaymentStatus().started();
39
  setActivePaymentMethod( paymentMethodId );
40
  },
41
- [ setActivePaymentMethod, setPaymentStatus, activePaymentMethod ]
 
 
 
 
 
42
  );
43
  const onExpressPaymentClose = useCallback( () => {
44
  setActivePaymentMethod( previousActivePaymentMethod.current );
45
- }, [ setActivePaymentMethod ] );
 
 
 
46
  const paymentMethodIds = Object.keys( paymentMethods );
47
  const content =
48
  paymentMethodIds.length > 0 ? (
26
  const {
27
  setActivePaymentMethod,
28
  activePaymentMethod,
29
+ paymentMethodData,
30
  setPaymentStatus,
31
  } = usePaymentMethodDataContext();
32
  const paymentMethodInterface = usePaymentMethodInterface();
33
  const { paymentMethods } = useExpressPaymentMethods();
34
  const previousActivePaymentMethod = useRef( activePaymentMethod );
35
+ const previousPaymentMethodData = useRef( paymentMethodData );
36
 
37
  const onExpressPaymentClick = useCallback(
38
  ( paymentMethodId ) => () => {
39
  previousActivePaymentMethod.current = activePaymentMethod;
40
+ previousPaymentMethodData.current = paymentMethodData;
41
  setPaymentStatus().started();
42
  setActivePaymentMethod( paymentMethodId );
43
  },
44
+ [
45
+ activePaymentMethod,
46
+ paymentMethodData,
47
+ setActivePaymentMethod,
48
+ setPaymentStatus,
49
+ ]
50
  );
51
  const onExpressPaymentClose = useCallback( () => {
52
  setActivePaymentMethod( previousActivePaymentMethod.current );
53
+ if ( previousPaymentMethodData.current.isSavedToken ) {
54
+ setPaymentStatus().success( previousPaymentMethodData.current );
55
+ }
56
+ }, [ setActivePaymentMethod, setPaymentStatus ] );
57
  const paymentMethodIds = Object.keys( paymentMethods );
58
  const content =
59
  paymentMethodIds.length > 0 ? (
assets/js/base/components/payment-methods/index.js CHANGED
@@ -1,3 +1,4 @@
1
  export { default as PaymentMethods } from './payment-methods';
2
  export { default as ExpressPaymentMethods } from './express-payment-methods';
3
  export { CartExpressPayment, CheckoutExpressPayment } from './express-payment';
 
1
  export { default as PaymentMethods } from './payment-methods';
2
  export { default as ExpressPaymentMethods } from './express-payment-methods';
3
  export { CartExpressPayment, CheckoutExpressPayment } from './express-payment';
4
+ export { default as SavedPaymentMethodOptions } from './saved-payment-method-options';
assets/js/base/components/payment-methods/payment-method-options.js ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import {
5
+ usePaymentMethods,
6
+ usePaymentMethodInterface,
7
+ useStoreNotices,
8
+ useEmitResponse,
9
+ } from '@woocommerce/base-hooks';
10
+ import { cloneElement } from '@wordpress/element';
11
+ import { __ } from '@wordpress/i18n';
12
+ import {
13
+ useEditorContext,
14
+ usePaymentMethodDataContext,
15
+ } from '@woocommerce/base-context';
16
+
17
+ /**
18
+ * Internal dependencies
19
+ */
20
+ import Tabs from '../tabs';
21
+ import PaymentMethodTab from './payment-method-tab';
22
+
23
+ /**
24
+ * Component used to render all non-saved payment method options.
25
+ *
26
+ * @return {*} The rendered component.
27
+ */
28
+ const PaymentMethodOptions = () => {
29
+ const { setActivePaymentMethod } = usePaymentMethodDataContext();
30
+ const { paymentMethods } = usePaymentMethods();
31
+ const {
32
+ activePaymentMethod,
33
+ ...paymentMethodInterface
34
+ } = usePaymentMethodInterface();
35
+ const { noticeContexts } = useEmitResponse();
36
+ const { removeNotice } = useStoreNotices();
37
+ const { isEditor } = useEditorContext();
38
+
39
+ return (
40
+ <Tabs
41
+ className="wc-block-components-checkout-payment-methods"
42
+ onSelect={ ( tabName ) => {
43
+ setActivePaymentMethod( tabName );
44
+ removeNotice( 'wc-payment-error', noticeContexts.PAYMENTS );
45
+ } }
46
+ tabs={ Object.keys( paymentMethods ).map( ( name ) => {
47
+ const {
48
+ ariaLabel,
49
+ edit,
50
+ content,
51
+ label,
52
+ supports,
53
+ } = paymentMethods[ name ];
54
+ const component = isEditor ? edit : content;
55
+ return {
56
+ name,
57
+ title:
58
+ typeof label === 'string'
59
+ ? label
60
+ : cloneElement( label, {
61
+ components:
62
+ paymentMethodInterface.components,
63
+ } ),
64
+ ariaLabel,
65
+ content: (
66
+ <PaymentMethodTab
67
+ allowsSaving={ supports.savePaymentInfo }
68
+ >
69
+ { cloneElement( component, {
70
+ activePaymentMethod,
71
+ ...paymentMethodInterface,
72
+ } ) }
73
+ </PaymentMethodTab>
74
+ ),
75
+ };
76
+ } ) }
77
+ initialTabName={ activePaymentMethod }
78
+ ariaLabel={ __(
79
+ 'Payment Methods',
80
+ 'woo-gutenberg-products-block'
81
+ ) }
82
+ id="wc-block-payment-methods"
83
+ />
84
+ );
85
+ };
86
+
87
+ export default PaymentMethodOptions;
assets/js/base/components/payment-methods/payment-method-tab.js ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import {
6
+ useCheckoutContext,
7
+ useEditorContext,
8
+ usePaymentMethodDataContext,
9
+ } from '@woocommerce/base-context';
10
+ import CheckboxControl from '@woocommerce/base-components/checkbox-control';
11
+ import PropTypes from 'prop-types';
12
+
13
+ /**
14
+ * Internal dependencies
15
+ */
16
+ import PaymentMethodErrorBoundary from './payment-method-error-boundary';
17
+
18
+ /**
19
+ * Component used to render the contents of a payment method tab.
20
+ *
21
+ * @param {Object} props Incoming props for the component.
22
+ * @param {boolean} props.allowsSaving Whether that payment method allows saving
23
+ * the data for future purchases.
24
+ * @param {Object} props.children Content of the payment method tab.
25
+ *
26
+ * @return {*} The rendered component.
27
+ */
28
+ const PaymentMethodTab = ( { children, allowsSaving } ) => {
29
+ const { isEditor } = useEditorContext();
30
+ const {
31
+ shouldSavePayment,
32
+ setShouldSavePayment,
33
+ } = usePaymentMethodDataContext();
34
+ const { customerId } = useCheckoutContext();
35
+
36
+ return (
37
+ <PaymentMethodErrorBoundary isEditor={ isEditor }>
38
+ { children }
39
+ { customerId > 0 && allowsSaving && (
40
+ <CheckboxControl
41
+ className="wc-block-components-payment-methods__save-card-info"
42
+ label={ __(
43
+ 'Save payment information to my account for future purchases.',
44
+ 'woo-gutenberg-products-block'
45
+ ) }
46
+ checked={ shouldSavePayment }
47
+ onChange={ () =>
48
+ setShouldSavePayment( ! shouldSavePayment )
49
+ }
50
+ />
51
+ ) }
52
+ </PaymentMethodErrorBoundary>
53
+ );
54
+ };
55
+
56
+ PaymentMethodTab.propTypes = {
57
+ allowsSaving: PropTypes.bool,
58
+ children: PropTypes.node,
59
+ };
60
+
61
+ export default PaymentMethodTab;
assets/js/base/components/payment-methods/payment-methods.js CHANGED
@@ -1,50 +1,15 @@
1
  /**
2
  * External dependencies
3
  */
4
- import {
5
- usePaymentMethods,
6
- usePaymentMethodInterface,
7
- useStoreNotices,
8
- useEmitResponse,
9
- } from '@woocommerce/base-hooks';
10
- import {
11
- cloneElement,
12
- useRef,
13
- useEffect,
14
- useCallback,
15
- } from '@wordpress/element';
16
- import { __ } from '@wordpress/i18n';
17
- import {
18
- useCheckoutContext,
19
- useEditorContext,
20
- usePaymentMethodDataContext,
21
- } from '@woocommerce/base-context';
22
- import CheckboxControl from '@woocommerce/base-components/checkbox-control';
23
 
24
  /**
25
  * Internal dependencies
26
  */
27
- import Tabs from '../tabs';
28
  import NoPaymentMethods from './no-payment-methods';
 
29
  import SavedPaymentMethodOptions from './saved-payment-method-options';
30
- import PaymentMethodErrorBoundary from './payment-method-error-boundary';
31
-
32
- /**
33
- * Returns a payment method for the given context.
34
- *
35
- * @param {string} name The payment method slug to return.
36
- * @param {Object} paymentMethods The current registered payment methods
37
- * @param {boolean} isEditor Whether in the editor context (true) or not (false).
38
- *
39
- * @return {Object} The payment method matching the name for the given context.
40
- */
41
- const getPaymentMethod = ( name, paymentMethods, isEditor ) => {
42
- let paymentMethod = paymentMethods[ name ] || null;
43
- if ( paymentMethod ) {
44
- paymentMethod = isEditor ? paymentMethod.edit : paymentMethod.content;
45
- }
46
- return paymentMethod;
47
- };
48
 
49
  /**
50
  * PaymentMethods component.
@@ -52,124 +17,27 @@ const getPaymentMethod = ( name, paymentMethods, isEditor ) => {
52
  * @return {*} The rendered component.
53
  */
54
  const PaymentMethods = () => {
55
- const { isEditor } = useEditorContext();
56
- const {
57
- customerPaymentMethods = {},
58
- paymentMethodData,
59
- setActivePaymentMethod,
60
- shouldSavePayment,
61
- setShouldSavePayment,
62
- } = usePaymentMethodDataContext();
63
  const { isInitialized, paymentMethods } = usePaymentMethods();
64
- const currentPaymentMethods = useRef( paymentMethods );
65
- const {
66
- activePaymentMethod,
67
- ...paymentMethodInterface
68
- } = usePaymentMethodInterface();
69
- const currentPaymentMethodInterface = useRef( paymentMethodInterface );
70
- const { noticeContexts } = useEmitResponse();
71
- const { removeNotice } = useStoreNotices();
72
- const { customerId } = useCheckoutContext();
73
-
74
- // update ref on change.
75
- useEffect( () => {
76
- currentPaymentMethods.current = paymentMethods;
77
- currentPaymentMethodInterface.current = paymentMethodInterface;
78
- }, [ paymentMethods, paymentMethodInterface, activePaymentMethod ] );
79
-
80
- const getRenderedTab = useCallback(
81
- ( selectedTab ) => {
82
- const paymentMethod = getPaymentMethod(
83
- selectedTab,
84
- currentPaymentMethods.current,
85
- isEditor
86
- );
87
- const { supports = {} } =
88
- paymentMethod &&
89
- currentPaymentMethods.current[ activePaymentMethod ]
90
- ? currentPaymentMethods.current[ activePaymentMethod ]
91
- : {};
92
- return paymentMethod && activePaymentMethod ? (
93
- <PaymentMethodErrorBoundary isEditor={ isEditor }>
94
- { cloneElement( paymentMethod, {
95
- activePaymentMethod,
96
- ...currentPaymentMethodInterface.current,
97
- } ) }
98
- { customerId > 0 && supports.savePaymentInfo && (
99
- <CheckboxControl
100
- className="wc-block-components-payment-methods__save-card-info"
101
- label={ __(
102
- 'Save payment information to my account for future purchases.',
103
- 'woo-gutenberg-products-block'
104
- ) }
105
- checked={ shouldSavePayment }
106
- onChange={ () =>
107
- setShouldSavePayment( ! shouldSavePayment )
108
- }
109
- />
110
- ) }
111
- </PaymentMethodErrorBoundary>
112
- ) : null;
113
  },
114
- [
115
- isEditor,
116
- activePaymentMethod,
117
- shouldSavePayment,
118
- setShouldSavePayment,
119
- customerId,
120
- ]
121
  );
122
- if (
123
- isInitialized &&
124
- Object.keys( currentPaymentMethods.current ).length === 0
125
- ) {
126
  return <NoPaymentMethods />;
127
  }
128
- const renderedTabs = (
129
- <Tabs
130
- className="wc-block-components-checkout-payment-methods"
131
- onSelect={ ( tabName ) => {
132
- setActivePaymentMethod( tabName );
133
- removeNotice( 'wc-payment-error', noticeContexts.PAYMENTS );
134
- } }
135
- tabs={ Object.keys( paymentMethods ).map( ( name ) => {
136
- const { label, ariaLabel } = paymentMethods[ name ];
137
- return {
138
- name,
139
- title:
140
- typeof label === 'string'
141
- ? label
142
- : cloneElement( label, {
143
- components:
144
- currentPaymentMethodInterface.current
145
- .components,
146
- } ),
147
- ariaLabel,
148
- content: getRenderedTab( name ),
149
- };
150
- } ) }
151
- initialTabName={ activePaymentMethod }
152
- ariaLabel={ __(
153
- 'Payment Methods',
154
- 'woo-gutenberg-products-block'
155
- ) }
156
- id="wc-block-payment-methods"
157
- />
158
- );
159
-
160
- const renderedSavedPaymentOptions = <SavedPaymentMethodOptions />;
161
 
162
- const renderedTabsAndSavedPaymentOptions = (
163
  <>
164
- { renderedSavedPaymentOptions }
165
- { renderedTabs }
166
  </>
167
  );
168
-
169
- return Object.keys( customerPaymentMethods ).length > 0 &&
170
- paymentMethodData.isSavedToken
171
- ? renderedSavedPaymentOptions
172
- : renderedTabsAndSavedPaymentOptions;
173
  };
174
 
175
  export default PaymentMethods;
1
  /**
2
  * External dependencies
3
  */
4
+ import { usePaymentMethods } from '@woocommerce/base-hooks';
5
+ import { useCallback, useState } from '@wordpress/element';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
  /**
8
  * Internal dependencies
9
  */
 
10
  import NoPaymentMethods from './no-payment-methods';
11
+ import PaymentMethodOptions from './payment-method-options';
12
  import SavedPaymentMethodOptions from './saved-payment-method-options';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  /**
15
  * PaymentMethods component.
17
  * @return {*} The rendered component.
18
  */
19
  const PaymentMethods = () => {
 
 
 
 
 
 
 
 
20
  const { isInitialized, paymentMethods } = usePaymentMethods();
21
+ const [ showNewPaymentMethods, setShowNewPaymentMethods ] = useState(
22
+ true
23
+ );
24
+ const onChange = useCallback(
25
+ ( token ) => {
26
+ setShowNewPaymentMethods( token === '0' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  },
28
+ [ setShowNewPaymentMethods ]
 
 
 
 
 
 
29
  );
30
+
31
+ if ( isInitialized && Object.keys( paymentMethods ).length === 0 ) {
 
 
32
  return <NoPaymentMethods />;
33
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
+ return (
36
  <>
37
+ <SavedPaymentMethodOptions onChange={ onChange } />
38
+ { showNewPaymentMethods && <PaymentMethodOptions /> }
39
  </>
40
  );
 
 
 
 
 
41
  };
42
 
43
  export default PaymentMethods;
assets/js/base/components/payment-methods/saved-payment-method-options.js CHANGED
@@ -9,6 +9,7 @@ import {
9
  } from '@woocommerce/base-context';
10
  import RadioControl from '@woocommerce/base-components/radio-control';
11
  import { getPaymentMethods } from '@woocommerce/blocks-registry';
 
12
 
13
  /**
14
  * @typedef {import('@woocommerce/type-defs/contexts').CustomerPaymentMethod} CustomerPaymentMethod
@@ -87,7 +88,7 @@ const getDefaultPaymentMethodOptions = (
87
  };
88
  };
89
 
90
- const SavedPaymentMethodOptions = () => {
91
  const { isEditor } = useEditorContext();
92
  const {
93
  setPaymentStatus,
@@ -102,6 +103,18 @@ const SavedPaymentMethodOptions = () => {
102
  * @property {Array} current The current options on the type.
103
  */
104
  const currentOptions = useRef( [] );
 
 
 
 
 
 
 
 
 
 
 
 
105
  useEffect( () => {
106
  const types = Object.keys( customerPaymentMethods );
107
  const options = types
@@ -126,7 +139,7 @@ const SavedPaymentMethodOptions = () => {
126
  setPaymentStatus
127
  );
128
  if ( paymentMethod.is_default && selectedToken === '' ) {
129
- setSelectedToken( paymentMethod.tokenId + '' );
130
  option.onChange( paymentMethod.tokenId );
131
  }
132
  return option;
@@ -136,27 +149,13 @@ const SavedPaymentMethodOptions = () => {
136
  currentOptions.current = options;
137
  }, [
138
  customerPaymentMethods,
 
139
  selectedToken,
140
  setActivePaymentMethod,
141
  setPaymentStatus,
142
  standardMethods,
143
  ] );
144
 
145
- const updateToken = useCallback(
146
- ( token ) => {
147
- if ( token === '0' ) {
148
- setPaymentStatus().started();
149
- }
150
- setSelectedToken( token );
151
- },
152
- [ setSelectedToken, setPaymentStatus ]
153
- );
154
- useEffect( () => {
155
- if ( selectedToken && currentOptions.current.length > 0 ) {
156
- updateToken( selectedToken );
157
- }
158
- }, [ selectedToken, updateToken ] );
159
-
160
  // In the editor, show `Use a new payment method` option as selected.
161
  const selectedOption = isEditor ? '0' : selectedToken + '';
162
  const newPaymentMethodOption = {
@@ -174,4 +173,8 @@ const SavedPaymentMethodOptions = () => {
174
  ) : null;
175
  };
176
 
 
 
 
 
177
  export default SavedPaymentMethodOptions;
9
  } from '@woocommerce/base-context';
10
  import RadioControl from '@woocommerce/base-components/radio-control';
11
  import { getPaymentMethods } from '@woocommerce/blocks-registry';
12
+ import PropTypes from 'prop-types';
13
 
14
  /**
15
  * @typedef {import('@woocommerce/type-defs/contexts').CustomerPaymentMethod} CustomerPaymentMethod
88
  };
89
  };
90
 
91
+ const SavedPaymentMethodOptions = ( { onChange } ) => {
92
  const { isEditor } = useEditorContext();
93
  const {
94
  setPaymentStatus,
103
  * @property {Array} current The current options on the type.
104
  */
105
  const currentOptions = useRef( [] );
106
+
107
+ const updateToken = useCallback(
108
+ ( token ) => {
109
+ if ( token === '0' ) {
110
+ setPaymentStatus().started();
111
+ }
112
+ setSelectedToken( token );
113
+ onChange( token );
114
+ },
115
+ [ onChange, setSelectedToken, setPaymentStatus ]
116
+ );
117
+
118
  useEffect( () => {
119
  const types = Object.keys( customerPaymentMethods );
120
  const options = types
139
  setPaymentStatus
140
  );
141
  if ( paymentMethod.is_default && selectedToken === '' ) {
142
+ updateToken( paymentMethod.tokenId + '' );
143
  option.onChange( paymentMethod.tokenId );
144
  }
145
  return option;
149
  currentOptions.current = options;
150
  }, [
151
  customerPaymentMethods,
152
+ updateToken,
153
  selectedToken,
154
  setActivePaymentMethod,
155
  setPaymentStatus,
156
  standardMethods,
157
  ] );
158
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  // In the editor, show `Use a new payment method` option as selected.
160
  const selectedOption = isEditor ? '0' : selectedToken + '';
161
  const newPaymentMethodOption = {
173
  ) : null;
174
  };
175
 
176
+ SavedPaymentMethodOptions.propTypes = {
177
+ onChange: PropTypes.func.isRequired,
178
+ };
179
+
180
  export default SavedPaymentMethodOptions;
assets/js/base/components/payment-methods/test/payment-methods.js ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { render, screen, fireEvent, waitFor } from '@testing-library/react';
5
+ import {
6
+ registerPaymentMethod,
7
+ __experimentalDeRegisterPaymentMethod,
8
+ } from '@woocommerce/blocks-registry';
9
+ import { PaymentMethodDataProvider } from '@woocommerce/base-context';
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+ import PaymentMethods from '../payment-methods';
15
+
16
+ jest.mock( '../payment-method-options', () => () => (
17
+ <span>Payment method options</span>
18
+ ) );
19
+ jest.mock( '../saved-payment-method-options', () => ( { onChange } ) => (
20
+ <>
21
+ <span>Saved payment method options</span>
22
+ <button onClick={ () => onChange( '1' ) }>Select saved</button>
23
+ <button onClick={ () => onChange( '0' ) }>Select not saved</button>
24
+ </>
25
+ ) );
26
+
27
+ const registerMockPaymentMethods = () => {
28
+ [ 'cheque' ].forEach( ( name ) => {
29
+ registerPaymentMethod(
30
+ ( Config ) =>
31
+ new Config( {
32
+ name,
33
+ label: name,
34
+ content: <div>A payment method</div>,
35
+ edit: <div>A payment method</div>,
36
+ icons: null,
37
+ canMakePayment: () => true,
38
+ ariaLabel: name,
39
+ } )
40
+ );
41
+ } );
42
+ };
43
+
44
+ const resetMockPaymentMethods = () => {
45
+ [ 'cheque' ].forEach( ( name ) => {
46
+ __experimentalDeRegisterPaymentMethod( name );
47
+ } );
48
+ };
49
+
50
+ describe( 'PaymentMethods', () => {
51
+ test( 'should show no payment methods component when there are no payment methods', async () => {
52
+ render(
53
+ <PaymentMethodDataProvider>
54
+ <PaymentMethods />
55
+ </PaymentMethodDataProvider>
56
+ );
57
+
58
+ await waitFor( () => {
59
+ const noPaymentMethods = screen.queryByText(
60
+ /no payment methods available/
61
+ );
62
+ expect( noPaymentMethods ).not.toBeNull();
63
+ } );
64
+ } );
65
+
66
+ test( 'should hide/show PaymentMethodOptions when a saved payment method is checked/unchecked', async () => {
67
+ registerMockPaymentMethods();
68
+ render(
69
+ <PaymentMethodDataProvider>
70
+ <PaymentMethods />
71
+ </PaymentMethodDataProvider>
72
+ );
73
+
74
+ await waitFor( () => {
75
+ const savedPaymentMethodOptions = screen.queryByText(
76
+ /Saved payment method options/
77
+ );
78
+ const paymentMethodOptions = screen.queryByText(
79
+ /Payment method options/
80
+ );
81
+ expect( savedPaymentMethodOptions ).not.toBeNull();
82
+ expect( paymentMethodOptions ).not.toBeNull();
83
+ } );
84
+
85
+ fireEvent.click( screen.getByText( 'Select saved' ) );
86
+
87
+ await waitFor( () => {
88
+ const savedPaymentMethodOptions = screen.queryByText(
89
+ /Saved payment method options/
90
+ );
91
+ const paymentMethodOptions = screen.queryByText(
92
+ /Payment method options/
93
+ );
94
+ expect( savedPaymentMethodOptions ).not.toBeNull();
95
+ expect( paymentMethodOptions ).toBeNull();
96
+ } );
97
+
98
+ fireEvent.click( screen.getByText( 'Select not saved' ) );
99
+
100
+ await waitFor( () => {
101
+ const savedPaymentMethodOptions = screen.queryByText(
102
+ /Saved payment method options/
103
+ );
104
+ const paymentMethodOptions = screen.queryByText(
105
+ /Payment method options/
106
+ );
107
+ expect( savedPaymentMethodOptions ).not.toBeNull();
108
+ expect( paymentMethodOptions ).not.toBeNull();
109
+ } );
110
+ resetMockPaymentMethods();
111
+ } );
112
+ } );
assets/js/base/components/tabs/index.js CHANGED
@@ -69,7 +69,8 @@ const Tabs = ( {
69
  tabId={ `${ instanceId }-${ name }` }
70
  className="wc-block-components-tabs__content"
71
  >
72
- { content }
 
73
  </TabPanel>
74
  ) ) }
75
  </div>
69
  tabId={ `${ instanceId }-${ name }` }
70
  className="wc-block-components-tabs__content"
71
  >
72
+ { tabState.selectedId === `${ instanceId }-${ name }` &&
73
+ content }
74
  </TabPanel>
75
  ) ) }
76
  </div>
assets/js/base/components/title/index.js CHANGED
@@ -15,10 +15,10 @@ import './style.scss';
15
  * Component that renders a block title.
16
  *
17
  * @param {Object} props Incoming props for the component.
18
- * @param {React.ReactChildren} props.children Children elements this component wraps.
19
- * @param {string} props.className CSS class used.
20
  * @param {string} props.headingLevel Heading level for title.
21
- * @param {Object} props.props Rest of props passed through to component.
22
  */
23
  const Title = ( { children, className, headingLevel, ...props } ) => {
24
  const buttonClassName = classNames(
15
  * Component that renders a block title.
16
  *
17
  * @param {Object} props Incoming props for the component.
18
+ * @param {React.ReactChildren} [props.children] Children elements this component wraps.
19
+ * @param {string} [props.className] CSS class used.
20
  * @param {string} props.headingLevel Heading level for title.
21
+ * @param {Object} [props.props] Rest of props passed through to component.
22
  */
23
  const Title = ( { children, className, headingLevel, ...props } ) => {
24
  const buttonClassName = classNames(
assets/js/base/context/cart-checkout/checkout-state/actions.js CHANGED
@@ -17,6 +17,7 @@ const {
17
  INCREMENT_CALCULATING,
18
  DECREMENT_CALCULATING,
19
  SET_ORDER_ID,
 
20
  SET_ORDER_NOTES,
21
  } = TYPES;
22
 
@@ -65,6 +66,10 @@ export const actions = {
65
  type: SET_ORDER_ID,
66
  orderId,
67
  } ),
 
 
 
 
68
  setOrderNotes: ( orderNotes ) => ( {
69
  type: SET_ORDER_NOTES,
70
  orderNotes,
17
  INCREMENT_CALCULATING,
18
  DECREMENT_CALCULATING,
19
  SET_ORDER_ID,
20
+ SET_SHOULD_CREATE_ACCOUNT,
21
  SET_ORDER_NOTES,
22
  } = TYPES;
23
 
66
  type: SET_ORDER_ID,
67
  orderId,
68
  } ),
69
+ setShouldCreateAccount: ( shouldCreateAccount ) => ( {
70
+ type: SET_SHOULD_CREATE_ACCOUNT,
71
+ shouldCreateAccount,
72
+ } ),
73
  setOrderNotes: ( orderNotes ) => ( {
74
  type: SET_ORDER_NOTES,
75
  orderNotes,
assets/js/base/context/cart-checkout/checkout-state/constants.js CHANGED
@@ -28,6 +28,7 @@ export const DEFAULT_STATE = {
28
  orderId: checkoutData.order_id,
29
  orderNotes: '',
30
  customerId: checkoutData.customer_id,
 
31
  processingResponse: null,
32
  };
33
 
28
  orderId: checkoutData.order_id,
29
  orderNotes: '',
30
  customerId: checkoutData.customer_id,
31
+ shouldCreateAccount: false,
32
  processingResponse: null,
33
  };
34
 
assets/js/base/context/cart-checkout/checkout-state/index.js CHANGED
@@ -101,6 +101,7 @@ export const CheckoutStateProvider = ( {
101
  isSuccessResponse,
102
  isErrorResponse,
103
  isFailResponse,
 
104
  } = useEmitResponse();
105
 
106
  // set observers on ref so it's always current.
@@ -237,10 +238,7 @@ export const CheckoutStateProvider = ( {
237
  addErrorNotice( response.message, errorOptions );
238
  }
239
  // irrecoverable error so set complete
240
- if (
241
- typeof response.retry !== 'undefined' &&
242
- response.retry !== true
243
- ) {
244
  dispatch( actions.setComplete( response ) );
245
  } else {
246
  dispatch( actions.setIdle() );
@@ -278,7 +276,7 @@ export const CheckoutStateProvider = ( {
278
  : undefined;
279
  addErrorNotice( response.message, errorOptions );
280
  }
281
- if ( ! response.retry ) {
282
  dispatch( actions.setComplete( response ) );
283
  } else {
284
  // this will set an error which will end up
@@ -335,6 +333,9 @@ export const CheckoutStateProvider = ( {
335
  hasOrder: !! checkoutState.orderId,
336
  customerId: checkoutState.customerId,
337
  orderNotes: checkoutState.orderNotes,
 
 
 
338
  };
339
  return (
340
  <CheckoutContext.Provider value={ checkoutData }>
101
  isSuccessResponse,
102
  isErrorResponse,
103
  isFailResponse,
104
+ shouldRetry,
105
  } = useEmitResponse();
106
 
107
  // set observers on ref so it's always current.
238
  addErrorNotice( response.message, errorOptions );
239
  }
240
  // irrecoverable error so set complete
241
+ if ( ! shouldRetry( response ) ) {
 
 
 
242
  dispatch( actions.setComplete( response ) );
243
  } else {
244
  dispatch( actions.setIdle() );
276
  : undefined;
277
  addErrorNotice( response.message, errorOptions );
278
  }
279
+ if ( ! shouldRetry( response ) ) {
280
  dispatch( actions.setComplete( response ) );
281
  } else {
282
  // this will set an error which will end up
333
  hasOrder: !! checkoutState.orderId,
334
  customerId: checkoutState.customerId,
335
  orderNotes: checkoutState.orderNotes,
336
+ shouldCreateAccount: checkoutState.shouldCreateAccount,
337
+ setShouldCreateAccount: ( value ) =>
338
+ dispatch( actions.setShouldCreateAccount( value ) ),
339
  };
340
  return (
341
  <CheckoutContext.Provider value={ checkoutData }>
assets/js/base/context/cart-checkout/checkout-state/reducer.js CHANGED
@@ -18,6 +18,7 @@ const {
18
  DECREMENT_CALCULATING,
19
  SET_ORDER_ID,
20
  SET_ORDER_NOTES,
 
21
  } = TYPES;
22
 
23
  const {
@@ -68,11 +69,12 @@ export const prepareResponseData = ( data ) => {
68
  * @param {string} action.type Type of action.
69
  * @param {string} action.orderId Order ID.
70
  * @param {Array} action.orderNotes Order notes.
 
71
  * @param {Object} action.data Other action payload.
72
  */
73
  export const reducer = (
74
  state = DEFAULT_STATE,
75
- { url, type, orderId, orderNotes, data }
76
  ) => {
77
  let newState = state;
78
  switch ( type ) {
@@ -190,6 +192,14 @@ export const reducer = (
190
  orderId,
191
  };
192
  break;
 
 
 
 
 
 
 
 
193
  case SET_ORDER_NOTES:
194
  if ( state.orderNotes !== orderNotes ) {
195
  newState = {
18
  DECREMENT_CALCULATING,
19
  SET_ORDER_ID,
20
  SET_ORDER_NOTES,
21
+ SET_SHOULD_CREATE_ACCOUNT,
22
  } = TYPES;
23
 
24
  const {
69
  * @param {string} action.type Type of action.
70
  * @param {string} action.orderId Order ID.
71
  * @param {Array} action.orderNotes Order notes.
72
+ * @param {boolean} action.shouldCreateAccount True if shopper has requested a user account (signup checkbox).
73
  * @param {Object} action.data Other action payload.
74
  */
75
  export const reducer = (
76
  state = DEFAULT_STATE,
77
+ { url, type, orderId, orderNotes, shouldCreateAccount, data }
78
  ) => {
79
  let newState = state;
80
  switch ( type ) {
192
  orderId,
193
  };
194
  break;
195
+ case SET_SHOULD_CREATE_ACCOUNT:
196
+ if ( shouldCreateAccount !== state.shouldCreateAccount ) {
197
+ newState = {
198
+ ...state,
199
+ shouldCreateAccount,
200
+ };
201
+ }
202
+ break;
203
  case SET_ORDER_NOTES:
204
  if ( state.orderNotes !== orderNotes ) {
205
  newState = {
assets/js/base/context/cart-checkout/checkout/processor/index.js CHANGED
@@ -63,6 +63,7 @@ const CheckoutProcessor = () => {
63
  isBeforeProcessing: checkoutIsBeforeProcessing,
64
  isComplete: checkoutIsComplete,
65
  orderNotes,
 
66
  } = useCheckoutContext();
67
  const { hasValidationErrors } = useValidationContext();
68
  const { shippingAddress, shippingErrorStatus } = useShippingDataContext();
@@ -188,6 +189,7 @@ const CheckoutProcessor = () => {
188
  billing_address: currentBillingData.current,
189
  shipping_address: currentShippingAddress.current,
190
  customer_note: orderNotes,
 
191
  };
192
  if ( cartNeedsPayment ) {
193
  data = {
@@ -258,6 +260,7 @@ const CheckoutProcessor = () => {
258
  receiveCart,
259
  dispatchActions,
260
  orderNotes,
 
261
  ] );
262
  // redirect when checkout is complete and there is a redirect url.
263
  useEffect( () => {
63
  isBeforeProcessing: checkoutIsBeforeProcessing,
64
  isComplete: checkoutIsComplete,
65
  orderNotes,
66
+ shouldCreateAccount,
67
  } = useCheckoutContext();
68
  const { hasValidationErrors } = useValidationContext();
69
  const { shippingAddress, shippingErrorStatus } = useShippingDataContext();
189
  billing_address: currentBillingData.current,
190
  shipping_address: currentShippingAddress.current,
191
  customer_note: orderNotes,
192
+ should_create_account: shouldCreateAccount,
193
  };
194
  if ( cartNeedsPayment ) {
195
  data = {
260
  receiveCart,
261
  dispatchActions,
262
  orderNotes,
263
+ shouldCreateAccount,
264
  ] );
265
  // redirect when checkout is complete and there is a redirect url.
266
  useEffect( () => {
assets/js/base/context/cart-checkout/payment-methods/test/payment-method-data-context.js CHANGED
@@ -11,7 +11,10 @@ import {
11
  __experimentalDeRegisterPaymentMethod,
12
  __experimentalDeRegisterExpressPaymentMethod,
13
  } from '@woocommerce/blocks-registry';
14
- import { CheckoutExpressPayment } from '@woocommerce/base-components/payment-methods';
 
 
 
15
  /**
16
  * Internal dependencies
17
  */
@@ -21,6 +24,33 @@ import {
21
  } from '../payment-method-data-context';
22
  import { defaultCartState } from '../../../../../data/default-states';
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  const registerMockPaymentMethods = () => {
25
  [ 'cheque', 'bacs' ].forEach( ( name ) => {
26
  registerPaymentMethod(
@@ -36,6 +66,23 @@ const registerMockPaymentMethods = () => {
36
  } )
37
  );
38
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  [ 'express-payment' ].forEach( ( name ) => {
40
  registerExpressPaymentMethod( ( Config ) => {
41
  const Content = ( {
@@ -65,7 +112,7 @@ const registerMockPaymentMethods = () => {
65
  };
66
 
67
  const resetMockPaymentMethods = () => {
68
- [ 'cheque', 'bacs' ].forEach( ( name ) => {
69
  __experimentalDeRegisterPaymentMethod( name );
70
  } );
71
  [ 'express-payment' ].forEach( ( name ) => {
@@ -135,4 +182,64 @@ describe( 'Testing Payment Method Data Context Provider', () => {
135
  expect( activePaymentMethod ).not.toBeNull();
136
  } );
137
  } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  } );
11
  __experimentalDeRegisterPaymentMethod,
12
  __experimentalDeRegisterExpressPaymentMethod,
13
  } from '@woocommerce/blocks-registry';
14
+ import {
15
+ CheckoutExpressPayment,
16
+ SavedPaymentMethodOptions,
17
+ } from '@woocommerce/base-components/payment-methods';
18
  /**
19
  * Internal dependencies
20
  */
24
  } from '../payment-method-data-context';
25
  import { defaultCartState } from '../../../../../data/default-states';
26
 
27
+ jest.mock( '@woocommerce/settings', () => {
28
+ const originalModule = jest.requireActual( '@woocommerce/settings' );
29
+ return {
30
+ // @ts-ignore We know @woocommerce/settings is an object.
31
+ ...originalModule,
32
+ getSetting: ( setting, ...rest ) => {
33
+ if ( setting === 'customerPaymentMethods' ) {
34
+ return {
35
+ cc: [
36
+ {
37
+ method: {
38
+ gateway: 'stripe',
39
+ last4: '4242',
40
+ brand: 'Visa',
41
+ },
42
+ expires: '12/22',
43
+ is_default: true,
44
+ tokenId: 1,
45
+ },
46
+ ],
47
+ };
48
+ }
49
+ return originalModule.getSetting( setting, ...rest );
50
+ },
51
+ };
52
+ } );
53
+
54
  const registerMockPaymentMethods = () => {
55
  [ 'cheque', 'bacs' ].forEach( ( name ) => {
56
  registerPaymentMethod(
66
  } )
67
  );
68
  } );
69
+ [ 'stripe' ].forEach( ( name ) => {
70
+ registerPaymentMethod(
71
+ ( Config ) =>
72
+ new Config( {
73
+ name,
74
+ label: name,
75
+ content: <div>A payment method</div>,
76
+ edit: <div>A payment method</div>,
77
+ icons: null,
78
+ canMakePayment: () => true,
79
+ supports: {
80
+ savePaymentInfo: true,
81
+ },
82
+ ariaLabel: name,
83
+ } )
84
+ );
85
+ } );
86
  [ 'express-payment' ].forEach( ( name ) => {
87
  registerExpressPaymentMethod( ( Config ) => {
88
  const Content = ( {
112
  };
113
 
114
  const resetMockPaymentMethods = () => {
115
+ [ 'cheque', 'bacs', 'stripe' ].forEach( ( name ) => {
116
  __experimentalDeRegisterPaymentMethod( name );
117
  } );
118
  [ 'express-payment' ].forEach( ( name ) => {
182
  expect( activePaymentMethod ).not.toBeNull();
183
  } );
184
  } );
185
+
186
+ it( 'resets saved payment method data after starting and closing an express payment method', async () => {
187
+ const TriggerActiveExpressPaymentMethod = () => {
188
+ const {
189
+ activePaymentMethod,
190
+ paymentMethodData,
191
+ } = usePaymentMethodDataContext();
192
+ return (
193
+ <>
194
+ <CheckoutExpressPayment />
195
+ <SavedPaymentMethodOptions onChange={ () => void null } />
196
+ { 'Active Payment Method: ' + activePaymentMethod }
197
+ { paymentMethodData[ 'wc-stripe-payment-token' ] && (
198
+ <span>Stripe token</span>
199
+ ) }
200
+ </>
201
+ );
202
+ };
203
+ const TestComponent = () => {
204
+ return (
205
+ <PaymentMethodDataProvider>
206
+ <TriggerActiveExpressPaymentMethod />
207
+ </PaymentMethodDataProvider>
208
+ );
209
+ };
210
+ render( <TestComponent /> );
211
+ // Should initialize by default the default saved payment method.
212
+ await waitFor( () => {
213
+ const activePaymentMethod = screen.queryByText(
214
+ /Active Payment Method: stripe/
215
+ );
216
+ const stripeToken = screen.queryByText( /Stripe token/ );
217
+ expect( activePaymentMethod ).not.toBeNull();
218
+ expect( stripeToken ).not.toBeNull();
219
+ } );
220
+ // Express payment method clicked.
221
+ fireEvent.click(
222
+ screen.getByText( 'express-payment express payment method' )
223
+ );
224
+ await waitFor( () => {
225
+ const activePaymentMethod = screen.queryByText(
226
+ /Active Payment Method: express-payment/
227
+ );
228
+ const stripeToken = screen.queryByText( /Stripe token/ );
229
+ expect( activePaymentMethod ).not.toBeNull();
230
+ expect( stripeToken ).toBeNull();
231
+ } );
232
+ // Express payment method closed.
233
+ fireEvent.click(
234
+ screen.getByText( 'express-payment express payment method close' )
235
+ );
236
+ await waitFor( () => {
237
+ const activePaymentMethod = screen.queryByText(
238
+ /Active Payment Method: stripe/
239
+ );
240
+ const stripeToken = screen.queryByText( /Stripe token/ );
241
+ expect( activePaymentMethod ).not.toBeNull();
242
+ expect( stripeToken ).not.toBeNull();
243
+ } );
244
+ } );
245
  } );
assets/js/base/context/shared/event-emit/emitters.js CHANGED
@@ -58,22 +58,18 @@ export const emitEvent = async ( observers, eventType, data ) => {
58
  */
59
  export const emitEventWithAbort = async ( observers, eventType, data ) => {
60
  const observersByType = getObserversByPriority( observers, eventType );
61
- let emitterResponse = true;
62
  for ( const observer of observersByType ) {
63
  try {
64
  const response = await Promise.resolve( observer.callback( data ) );
65
- if (
66
- typeof response === 'object' &&
67
- typeof response.type === 'undefined'
68
- ) {
69
  throw new Error(
70
  'If you want to abort event emitter processing, your observer must return an object with a type property'
71
  );
72
  }
73
- emitterResponse = typeof response === 'object' ? response : true;
74
- if ( emitterResponse !== true ) {
75
- return emitterResponse;
76
- }
77
  } catch ( e ) {
78
  // We don't handle thrown errors but just console.log for troubleshooting.
79
  // eslint-disable-next-line no-console
@@ -81,5 +77,5 @@ export const emitEventWithAbort = async ( observers, eventType, data ) => {
81
  return { type: 'error' };
82
  }
83
  }
84
- return emitterResponse;
85
  };
58
  */
59
  export const emitEventWithAbort = async ( observers, eventType, data ) => {
60
  const observersByType = getObserversByPriority( observers, eventType );
 
61
  for ( const observer of observersByType ) {
62
  try {
63
  const response = await Promise.resolve( observer.callback( data ) );
64
+ if ( typeof response !== 'object' ) {
65
+ continue;
66
+ }
67
+ if ( typeof response.type === 'undefined' ) {
68
  throw new Error(
69
  'If you want to abort event emitter processing, your observer must return an object with a type property'
70
  );
71
  }
72
+ return response;
 
 
 
73
  } catch ( e ) {
74
  // We don't handle thrown errors but just console.log for troubleshooting.
75
  // eslint-disable-next-line no-console
77
  return { type: 'error' };
78
  }
79
  }
80
+ return true;
81
  };
assets/js/base/hooks/checkout/use-emit-response.js CHANGED
@@ -37,6 +37,10 @@ const isFailResponse = ( response ) => {
37
  return isResponseOf( response, responseTypes.FAIL );
38
  };
39
 
 
 
 
 
40
  /**
41
  * A custom hook exposing response utilities for emitters.
42
  *
@@ -47,6 +51,7 @@ export const useEmitResponse = () => {
47
  return {
48
  responseTypes,
49
  noticeContexts,
 
50
  isSuccessResponse,
51
  isErrorResponse,
52
  isFailResponse,
37
  return isResponseOf( response, responseTypes.FAIL );
38
  };
39
 
40
+ const shouldRetry = ( response ) => {
41
+ return typeof response.retry === 'undefined' || response.retry === true;
42
+ };
43
+
44
  /**
45
  * A custom hook exposing response utilities for emitters.
46
  *
51
  return {
52
  responseTypes,
53
  noticeContexts,
54
+ shouldRetry,
55
  isSuccessResponse,
56
  isErrorResponse,
57
  isFailResponse,
assets/js/blocks/cart-checkout/checkout/attributes.js CHANGED
@@ -1,7 +1,10 @@
1
  /**
2
  * External dependencies
3
  */
4
- import { HAS_DARK_EDITOR_STYLE_SUPPORT } from '@woocommerce/block-settings';
 
 
 
5
 
6
  const blockAttributes = {
7
  isPreview: {
@@ -17,6 +20,10 @@ const blockAttributes = {
17
  type: 'boolean',
18
  default: false,
19
  },
 
 
 
 
20
  showApartmentField: {
21
  type: 'boolean',
22
  default: true,
1
  /**
2
  * External dependencies
3
  */
4
+ import {
5
+ HAS_DARK_EDITOR_STYLE_SUPPORT,
6
+ CHECKOUT_ALLOWS_SIGNUP,
7
+ } from '@woocommerce/block-settings';
8
 
9
  const blockAttributes = {
10
  isPreview: {
20
  type: 'boolean',
21
  default: false,
22
  },
23
+ allowCreateAccount: {
24
+ type: 'boolean',
25
+ default: CHECKOUT_ALLOWS_SIGNUP,
26
+ },
27
  showApartmentField: {
28
  type: 'boolean',
29
  default: true,
assets/js/blocks/cart-checkout/checkout/block.js CHANGED
@@ -92,7 +92,12 @@ const Checkout = ( { attributes, scrollToTop } ) => {
92
  return <CheckoutOrderError />;
93
  }
94
 
95
- if ( ! isEditor && ! customerId && ! CHECKOUT_ALLOWS_GUEST ) {
 
 
 
 
 
96
  return (
97
  <>
98
  { __(
@@ -108,7 +113,6 @@ const Checkout = ( { attributes, scrollToTop } ) => {
108
  </>
109
  );
110
  }
111
-
112
  const checkoutClassName = classnames( 'wc-block-checkout', {
113
  'has-dark-controls': attributes.hasDarkControls,
114
  } );
@@ -124,6 +128,7 @@ const Checkout = ( { attributes, scrollToTop } ) => {
124
  showPhoneField={ attributes.showPhoneField }
125
  requireCompanyField={ attributes.requireCompanyField }
126
  requirePhoneField={ attributes.requirePhoneField }
 
127
  />
128
  <div className="wc-block-checkout__actions">
129
  { attributes.showReturnToCart && (
92
  return <CheckoutOrderError />;
93
  }
94
 
95
+ if (
96
+ ! isEditor &&
97
+ ! customerId &&
98
+ ! CHECKOUT_ALLOWS_GUEST &&
99
+ ! attributes.allowCreateAccount
100
+ ) {
101
  return (
102
  <>
103
  { __(
113
  </>
114
  );
115
  }
 
116
  const checkoutClassName = classnames( 'wc-block-checkout', {
117
  'has-dark-controls': attributes.hasDarkControls,
118
  } );
128
  showPhoneField={ attributes.showPhoneField }
129
  requireCompanyField={ attributes.requireCompanyField }
130
  requirePhoneField={ attributes.requirePhoneField }
131
+ allowCreateAccount={ attributes.allowCreateAccount }
132
  />
133
  <div className="wc-block-checkout__actions">
134
  { attributes.showReturnToCart && (
assets/js/blocks/cart-checkout/checkout/edit.js CHANGED
@@ -17,6 +17,7 @@ import {
17
  PRIVACY_URL,
18
  TERMS_URL,
19
  CHECKOUT_PAGE_ID,
 
20
  } from '@woocommerce/block-settings';
21
  import { getAdminLink } from '@woocommerce/settings';
22
  import { createInterpolateElement } from 'wordpress-element';
@@ -45,6 +46,7 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
45
  showPhoneField,
46
  requireCompanyField,
47
  requirePhoneField,
 
48
  showOrderNotes,
49
  showPolicyLinks,
50
  showReturnToCart,
@@ -154,6 +156,27 @@ const BlockSettings = ( { attributes, setAttributes } ) => {
154
  />
155
  ) }
156
  </PanelBody>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
  <PanelBody
158
  title={ __( 'Order notes', 'woo-gutenberg-products-block' ) }
159
  >
17
  PRIVACY_URL,
18
  TERMS_URL,
19
  CHECKOUT_PAGE_ID,
20
+ isExperimentalBuild,
21
  } from '@woocommerce/block-settings';
22
  import { getAdminLink } from '@woocommerce/settings';
23
  import { createInterpolateElement } from 'wordpress-element';
46
  showPhoneField,
47
  requireCompanyField,
48
  requirePhoneField,
49
+ allowCreateAccount,
50
  showOrderNotes,
51
  showPolicyLinks,
52
  showReturnToCart,
156
  />
157
  ) }
158
  </PanelBody>
159
+ { isExperimentalBuild() && (
160
+ <PanelBody
161
+ title={ __(
162
+ 'Account options',
163
+ 'woo-gutenberg-products-block'
164
+ ) }
165
+ >
166
+ <ToggleControl
167
+ label={ __(
168
+ 'Allow shopper to sign up for a user account during checkout',
169
+ 'woo-gutenberg-products-block'
170
+ ) }
171
+ checked={ allowCreateAccount }
172
+ onChange={ () =>
173
+ setAttributes( {
174
+ allowCreateAccount: ! allowCreateAccount,
175
+ } )
176
+ }
177
+ />
178
+ </PanelBody>
179
+ ) }
180
  <PanelBody
181
  title={ __( 'Order notes', 'woo-gutenberg-products-block' ) }
182
  >
assets/js/blocks/cart-checkout/checkout/form/address-step.js CHANGED
@@ -20,6 +20,7 @@ const AddressStep = ( {
20
  showApartmentField,
21
  showCompanyField,
22
  showPhoneField,
 
23
  } ) => {
24
  const {
25
  defaultAddressFields,
@@ -58,6 +59,7 @@ const AddressStep = ( {
58
  <ContactFieldsStep
59
  emailValue={ billingFields.email }
60
  onChangeEmail={ setEmail }
 
61
  />
62
  { needsShipping && (
63
  <ShippingFieldsStep
20
  showApartmentField,
21
  showCompanyField,
22
  showPhoneField,
23
+ allowCreateAccount,
24
  } ) => {
25
  const {
26
  defaultAddressFields,
59
  <ContactFieldsStep
60
  emailValue={ billingFields.email }
61
  onChangeEmail={ setEmail }
62
+ allowCreateAccount={ allowCreateAccount }
63
  />
64
  { needsShipping && (
65
  <ShippingFieldsStep
assets/js/blocks/cart-checkout/checkout/form/contact-fields-step.js CHANGED
@@ -5,15 +5,43 @@ import { __ } from '@wordpress/i18n';
5
  import { FormStep } from '@woocommerce/base-components/cart-checkout';
6
  import { DebouncedValidatedTextInput } from '@woocommerce/base-components/text-input';
7
  import { useCheckoutContext } from '@woocommerce/base-context';
 
 
 
 
 
8
 
9
  /**
10
  * Internal dependencies
11
  */
12
  import LoginPrompt from './login-prompt';
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- const ContactFieldsStep = ( { emailValue, onChangeEmail } ) => {
15
- const { isProcessing: checkoutIsProcessing } = useCheckoutContext();
16
-
 
 
 
 
 
 
 
 
 
 
 
 
17
  return (
18
  <FormStep
19
  id="contact-fields"
@@ -38,6 +66,7 @@ const ContactFieldsStep = ( { emailValue, onChangeEmail } ) => {
38
  onChange={ onChangeEmail }
39
  required={ true }
40
  />
 
41
  </FormStep>
42
  );
43
  };
5
  import { FormStep } from '@woocommerce/base-components/cart-checkout';
6
  import { DebouncedValidatedTextInput } from '@woocommerce/base-components/text-input';
7
  import { useCheckoutContext } from '@woocommerce/base-context';
8
+ import {
9
+ CHECKOUT_ALLOWS_GUEST,
10
+ isExperimentalBuild,
11
+ } from '@woocommerce/block-settings';
12
+ import CheckboxControl from '@woocommerce/base-components/checkbox-control';
13
 
14
  /**
15
  * Internal dependencies
16
  */
17
  import LoginPrompt from './login-prompt';
18
+ const ContactFieldsStep = ( {
19
+ emailValue,
20
+ onChangeEmail,
21
+ allowCreateAccount,
22
+ } ) => {
23
+ const {
24
+ isProcessing: checkoutIsProcessing,
25
+ customerId,
26
+ shouldCreateAccount,
27
+ setShouldCreateAccount,
28
+ } = useCheckoutContext();
29
 
30
+ // "Create Account" checkbox is gated to dev builds only.
31
+ const createAccountUI = ! customerId &&
32
+ allowCreateAccount &&
33
+ CHECKOUT_ALLOWS_GUEST &&
34
+ isExperimentalBuild() && (
35
+ <CheckboxControl
36
+ className="wc-block-checkout__create-account"
37
+ label={ __(
38
+ 'Create an account?',
39
+ 'woo-gutenberg-products-block'
40
+ ) }
41
+ checked={ shouldCreateAccount }
42
+ onChange={ ( value ) => setShouldCreateAccount( value ) }
43
+ />
44
+ );
45
  return (
46
  <FormStep
47
  id="contact-fields"
66
  onChange={ onChangeEmail }
67
  required={ true }
68
  />
69
+ { createAccountUI }
70
  </FormStep>
71
  );
72
  };
assets/js/blocks/cart-checkout/checkout/form/index.js CHANGED
@@ -21,6 +21,7 @@ const CheckoutForm = ( {
21
  showCompanyField,
22
  showOrderNotes,
23
  showPhoneField,
 
24
  } ) => {
25
  const { onSubmit } = useCheckoutContext();
26
 
@@ -32,6 +33,7 @@ const CheckoutForm = ( {
32
  showApartmentField={ showApartmentField }
33
  showCompanyField={ showCompanyField }
34
  showPhoneField={ showPhoneField }
 
35
  />
36
  <ShippingOptionsStep />
37
  <PaymentMethodStep />
21
  showCompanyField,
22
  showOrderNotes,
23
  showPhoneField,
24
+ allowCreateAccount,
25
  } ) => {
26
  const { onSubmit } = useCheckoutContext();
27
 
33
  showApartmentField={ showApartmentField }
34
  showCompanyField={ showCompanyField }
35
  showPhoneField={ showPhoneField }
36
+ allowCreateAccount={ allowCreateAccount }
37
  />
38
  <ShippingOptionsStep />
39
  <PaymentMethodStep />
assets/js/blocks/cart-checkout/checkout/form/style.scss CHANGED
@@ -2,7 +2,7 @@
2
  margin: 0;
3
  max-width: 100%;
4
  }
5
-
6
  .wc-block-checkout__use-address-for-billing {
7
  margin-top: em($gap-large);
8
  }
2
  margin: 0;
3
  max-width: 100%;
4
  }
5
+ .wc-block-checkout__create-account,
6
  .wc-block-checkout__use-address-for-billing {
7
  margin-top: em($gap-large);
8
  }
assets/js/payment-method-extensions/payment-methods/stripe/credit-card/payment-method.js CHANGED
@@ -7,7 +7,6 @@ import { useState } from '@wordpress/element';
7
  /**
8
  * Internal dependencies
9
  */
10
- import { PAYMENT_METHOD_NAME } from './constants';
11
  import { getStripeServerData } from '../stripe-utils';
12
  import { useCheckoutSubscriptions } from './use-checkout-subscriptions';
13
  import { InlineCard, CardElements } from './elements';
@@ -83,11 +82,11 @@ const CreditCardComponent = ( {
83
 
84
  export const StripeCreditCard = ( props ) => {
85
  const { locale } = getStripeServerData().button;
86
- const { activePaymentMethod, stripe } = props;
87
 
88
- return activePaymentMethod === PAYMENT_METHOD_NAME ? (
89
  <Elements stripe={ stripe } locale={ locale }>
90
  <CreditCardComponent { ...props } />
91
  </Elements>
92
- ) : null;
93
  };
7
  /**
8
  * Internal dependencies
9
  */
 
10
  import { getStripeServerData } from '../stripe-utils';
11
  import { useCheckoutSubscriptions } from './use-checkout-subscriptions';
12
  import { InlineCard, CardElements } from './elements';
82
 
83
  export const StripeCreditCard = ( props ) => {
84
  const { locale } = getStripeServerData().button;
85
+ const { stripe } = props;
86
 
87
+ return (
88
  <Elements stripe={ stripe } locale={ locale }>
89
  <CreditCardComponent { ...props } />
90
  </Elements>
91
+ );
92
  };
assets/js/type-defs/hooks.js CHANGED
@@ -148,6 +148,8 @@
148
  * be used in returned response objects.
149
  * @property {NoticeContexts} noticeContexts An object of various notice contexts that can
150
  * be used for targeting where a notice appears.
 
 
151
  * @property {function(Object):boolean} isSuccessResponse Returns whether the given response is of a
152
  * success response type.
153
  * @property {function(Object):boolean} isErrorResponse Returns whether the given response is of an
148
  * be used in returned response objects.
149
  * @property {NoticeContexts} noticeContexts An object of various notice contexts that can
150
  * be used for targeting where a notice appears.
151
+ * @property {function(Object):boolean} shouldRetry Returns whether the user is allowed to retry
152
+ * the payment after a failed one.
153
  * @property {function(Object):boolean} isSuccessResponse Returns whether the given response is of a
154
  * success response type.
155
  * @property {function(Object):boolean} isErrorResponse Returns whether the given response is of an
assets/js/type-defs/registered-payment-method-props.js CHANGED
@@ -199,7 +199,7 @@
199
  * observer response objects.
200
  * @property {Function} [onSubmit] Used to trigger checkout
201
  * processing.
202
- * @property {string} [activePaymentMethod] Indicates what the active payment
203
  * method is.
204
  * @property {ComponentProps} components Components exposed to payment
205
  * methods for use.
199
  * observer response objects.
200
  * @property {Function} [onSubmit] Used to trigger checkout
201
  * processing.
202
+ * @property {string} activePaymentMethod Indicates what the active payment
203
  * method is.
204
  * @property {ComponentProps} components Components exposed to payment
205
  * methods for use.
build/active-filters-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '623e892e33d4d4ee6c83dc15ac4d14f2');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'c929777a4dfa5faca8fe731949a82382');
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=217)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,r){var n=r(71),o=r(72),c=r(54),i=r(73);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||i()}},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(11),o=r.n(n),c=r(6),i=r.n(c),a=r(0),u=r(45);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,r=e.containers,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==r.length&&Array.prototype.forEach.call(r,(function(e,r){var n=c(e,r),i=s(e,r),f=l(l({},e.dataset),n.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},n,{attributes:f})))),e)}))},b=function(e){var t=e.Block,r=e.getProps,n=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})},d=function(e){var t=document.body.querySelectorAll(f.join(","));b(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;r=l(l({},e),{},{wrapper:t}),n=r.Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},11:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},110:function(e,t){},113:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),o=r(13),c=r(0),i=r(85),a=r(37),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,f=void 0===l?{}:l,p=e.shouldSelect,b=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var d=Object(c.useRef)({results:[],isLoading:!0}),g=Object(a.a)(f),m=Object(a.a)(s),y=Object(i.a)(),O=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,g,m],i=o.getCollectionError.apply(o,c);return i&&y(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,m,g,b]);return null!==O&&(d.current=O),d.current}},125:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(50),u=function(e){var t=e.className,r=e.size,n=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},126:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(14),i=r.n(c),a=r(3);r(4);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},128:function(e,t,r){"use strict";var n=r(0),o=r(2),c=r(15),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,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},13:function(e,t){!function(){e.exports=this.wp.data}()},14:function(e,t,r){var n=r(56);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},141:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var n=r(8),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}))}},142: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 a=i.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==r.taxonomy}));a.length>0&&(i.slug=a.sort(),u.push(i)),t(Object(n.sortBy)(u,"attribute"))}},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==r.taxonomy}));0===o.length?t(i):(i.push({attribute:r.taxonomy,operator:c,slug:Object(n.map)(o,"slug").sort()}),t(Object(n.sortBy)(i,"attribute")))}},146:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=(r(4),r(5)),u=r.n(a),s=r(1),l=r(126),f=r(125),p=(r(110),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,c=e.element,a=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,b=e.children,d=void 0===b?null:b,g=i()(e,["text","screenReaderText","element","className","radius","children"]),m=a,y=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),O=Boolean(n&&n!==t);return React.createElement(m,o()({className:y},g),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},n),d)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,c=void 0===n?"":n,a=e.disabled,b=void 0!==a&&a,d=e.onRemove,g=void 0===d?function(){}:d,m=e.removeOnAnyClick,y=void 0!==m&&m,O=e.text,v=e.screenReaderText,h=void 0===v?"":v,j=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=y?"span":"button";if(!r){var w=h&&"string"==typeof h?h:O;r="string"!=typeof w?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),w)}var E={"aria-label":r,disabled:b,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},S=y?E:{},R=y?{"aria-hidden":!0}:E;return React.createElement(p,o()({},j,S,{className:u()(c,"is-removable"),element:y?"button":j.element,screenReaderText:h,text:O}),React.createElement(_,o()({className:"wc-block-components-chip__remove"},R),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},15:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},152:function(e,t,r){"use strict";r.d(t,"c",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"a",(function(){return g}));var n=r(6),o=r.n(n),c=r(23),i=r.n(c),a=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}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,f,p={code:a.CURRENCY.code,symbol:a.CURRENCY.symbol,thousandSeparator:a.CURRENCY.thousandSeparator,decimalSeparator:a.CURRENCY.decimalSeparator,minorUnit:a.CURRENCY.precision,prefix:(l=a.CURRENCY.symbol,f=a.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]||""}(a.CURRENCY.symbol,a.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,a=e.currency_prefix,u=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 a?a:"$",suffix:"string"==typeof u?u:""}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},p),e)},g=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=d(t),o=r/Math.pow(10,n.minorUnit),c=n.prefix+o+n.suffix,i=document.createElement("textarea");return i.innerHTML=c,i.value}},17:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},18: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}},19: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},2:function(e,t){!function(){e.exports=this.wc.wcSettings}()},217:function(e,t,r){e.exports=r(273)},218:function(e,t){},22:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(40);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Object(n.a)(e,t,r[t])}))}return e}},23: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},273:function(e,t,r){"use strict";r.r(t);var n=r(128),o=r(107),c=r(10),i=r.n(c),a=r(1),u=r(98),s=r(0),l=r(5),f=r.n(l),p=(r(4),r(33)),b=(r(218),r(141)),d=r(152),g=r(146),m=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(a.sprintf)(Object(a.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(d.a)(e),Object(d.a)(t)):Number.isFinite(e)?Object(a.sprintf)(Object(a.__)("From %s","woo-gutenberg-products-block"),Object(d.a)(e)):Object(a.sprintf)(Object(a.__)("Up to %s","woo-gutenberg-products-block"),Object(d.a)(t))},y=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,u=void 0===i||i,s=e.displayStyle,l=n?React.createElement(React.Fragment,null,n," ",r):r,f=Object(a.sprintf)(Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),r);return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},u&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?React.createElement(g.a,{element:"span",text:l,onRemove:c,radius:"large",ariaLabel:f}):React.createElement("span",{className:"wc-block-active-filters__list-item-name"},l,React.createElement("button",{className:"wc-block-active-filters__list-item-remove",onClick:c},f)))},O=r(113),v=r(17),h=r(142),j=function(e){var t=e.attributeObject,r=void 0===t?{}:t,n=e.slugs,o=void 0===n?[]:n,c=e.operator,s=void 0===c?"in":c,l=e.displayStyle,f=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),p=f.results,b=f.isLoading,d=Object(u.b)("attributes",[]),g=i()(d,2),m=g[0],j=g[1];if(b)return null;var _=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},_,":"),React.createElement("ul",null,o.map((function(e,t){var n=p.find((function(t){return t.slug===e}));if(!n)return null;var o="";return t>0&&"and"===s&&(o=React.createElement("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),y({type:_,name:Object(v.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(h.a)(m,j,r,e)},showLabel:!1,displayStyle:l})}))))},_=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(u.b)("attributes",[]),c=i()(o,2),l=c[0],d=c[1],g=Object(u.b)("min_price"),O=i()(g,2),v=O[0],h=O[1],_=Object(u.b)("max_price"),w=i()(_,2),E=w[0],S=w[1],R=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(E)?y({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:m(v,E),removeCallback:function(){h(void 0),S(void 0)},displayStyle:t.displayStyle}):null}),[v,E,m]),x=Object(s.useMemo)((function(){return l.map((function(e){var r=Object(b.b)(e.attribute);return React.createElement(j,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(E)||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,y({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),y({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):React.createElement(s.Fragment,null,R,x)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){h(void 0),S(void 0),d([])}},React.createElement(p.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(_),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},29:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},3:function(e,t){!function(){e.exports=this.React}()},30: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}},31: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)}},32:function(e,t,r){var n=r(23),o=r(18);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},33:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=(r(4),r(3)),i=r(5),a=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=null!=r,l=null!=n;return!u&&l?(t=o||"span",i=s(s({},i),{},{className:a()(i.className,"screen-reader-text")}),React.createElement(t,i,n)):(t=o||c.Fragment,u&&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},36:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(36),c=r.n(o),i=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},39:function(e,t){!function(){e.exports=this.wp.blocks}()},4:function(e,t,r){e.exports=r(61)()},40:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},45:function(e,t,r){"use strict";var n=r(29),o=r.n(n),c=r(30),i=r.n(c),a=r(18),u=r.n(a),s=r(31),l=r.n(s),f=r(32),p=r.n(f),b=r(19),d=r.n(b),g=r(6),m=r.n(g),y=(r(4),r(3)),O=r(1),v=r(8),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.D,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(O.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(O.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(O.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},r&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};r(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 r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p()(this,r)}}var _=function(e){l()(r,e);var t=j(r);function r(){var e;o()(this,r);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=this.state,a=i.errorMessage;return i.hasError?React.createElement(h,{errorMessage:n?a: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(y.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(y.Component);_.defaultProps={showErrorMessage:!0};t.a=_},5:function(e,t,r){var n;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},50:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(22),o=r(7),c=r(0),i=function(e){var t=Object(n.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(c.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},54:function(e,t,r){var n=r(55);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}}},55: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}},56:function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},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}},60: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},61:function(e,t,r){"use strict";var n=r(62);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,c,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return r.PropTypes=r,r}},62:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},63:function(e,t){},7:function(e,t){!function(){e.exports=this.lodash}()},71:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},72:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw c}}return r}}},73: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){"use strict";r.d(t,"i",(function(){return o})),r.d(t,"v",(function(){return c})),r.d(t,"z",(function(){return i})),r.d(t,"s",(function(){return a})),r.d(t,"m",(function(){return u})),r.d(t,"p",(function(){return s})),r.d(t,"h",(function(){return l})),r.d(t,"A",(function(){return f})),r.d(t,"k",(function(){return p})),r.d(t,"l",(function(){return b})),r.d(t,"j",(function(){return d})),r.d(t,"c",(function(){return g})),r.d(t,"n",(function(){return m})),r.d(t,"o",(function(){return y})),r.d(t,"D",(function(){return v})),r.d(t,"E",(function(){return h})),r.d(t,"w",(function(){return j})),r.d(t,"a",(function(){return _})),r.d(t,"x",(function(){return w})),r.d(t,"b",(function(){return E})),r.d(t,"r",(function(){return S})),r.d(t,"f",(function(){return R})),r.d(t,"y",(function(){return P})),r.d(t,"g",(function(){return C})),r.d(t,"u",(function(){return N})),r.d(t,"t",(function(){return T})),r.d(t,"C",(function(){return A})),r.d(t,"B",(function(){return D})),r.d(t,"d",(function(){return U})),r.d(t,"e",(function(){return L})),r.d(t,"q",(function(){return B})),r.d(t,"F",(function(){return F}));var n=r(2),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=(Object(n.getSetting)("max_columns",6),Object(n.getSetting)("min_columns",1),Object(n.getSetting)("default_columns",3),Object(n.getSetting)("max_rows",6),Object(n.getSetting)("min_rows",1),Object(n.getSetting)("default_rows",3),Object(n.getSetting)("min_height",500),Object(n.getSetting)("default_height",500),Object(n.getSetting)("placeholderImgSrc","")),u=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),s=Object(n.getSetting)("limitTags"),l=(Object(n.getSetting)("hasProducts",!0),Object(n.getSetting)("hasTags",!0),Object(n.getSetting)("homeUrl",""),Object(n.getSetting)("couponsEnabled",!0)),f=(Object(n.getSetting)("shippingEnabled",!0),Object(n.getSetting)("taxesEnabled",!0)),p=Object(n.getSetting)("displayItemizedTaxes",!1),b=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),d=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),g=(Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[])),m=Object(n.getSetting)("isShippingCalculatorEnabled",!0),y=Object(n.getSetting)("isShippingCostHidden",!1),O=Object(n.getSetting)("woocommerceBlocksPhase",1),v=Object(n.getSetting)("wcBlocksAssetUrl",""),h=Object(n.getSetting)("wcBlocksBuildUrl",""),j=Object(n.getSetting)("shippingCountries",{}),_=Object(n.getSetting)("allowedCountries",{}),w=Object(n.getSetting)("shippingStates",{}),E=Object(n.getSetting)("allowedStates",{}),S=(Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("paymentGatewaySortOrder",[])),R=Object(n.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},k=Object(n.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),P=k.shop.permalink,C=(k.checkout.id,k.checkout.permalink),N=k.privacy.permalink,T=k.privacy.title,A=k.terms.permalink,D=k.terms.title,U=(k.cart.id,k.cart.permalink),L=Object(n.getSetting)("checkoutAllowsGuest",!1),B=(Object(n.getSetting)("checkoutAllowsSignup",!1),Object(n.getSetting)("loginUrl","/wp-login.php")),F=(r(39),function(){return O>1})},85:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(10),o=r.n(n),c=r(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},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(10),o=r.n(n),c=r(15),i=r(13),a=r(0),u=r(59),s=r(7),l=r(37),f=function(e){var t=Object(u.a)();e=e||t;var r=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(a.useCallback)((function(t){n(e,t)}),[e])]},p=function(e,t,r){var n=Object(u.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(r,e,t)}),[r,e])]},b=function(e,t){var r=Object(u.a)(),n=f(t=t||r),c=o()(n,2),i=c[0],p=c[1],b=Object(l.a)(e),d=Object(a.useRef)(!1);return Object(a.useEffect)((function(){p(Object(s.assign)({},i,b)),d.current=!0}),[b]),d.current?[i,p]:[e,p]}}});
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=217)}({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 d}));var n=r(11),o=r.n(n),c=r(6),i=r.n(c),a=r(0),u=r(45);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,r=e.containers,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==r.length&&Array.prototype.forEach.call(r,(function(e,r){var n=c(e,r),i=s(e,r),f=l(l({},e.dataset),n.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},n,{attributes:f})))),e)}))},b=function(e){var t=e.Block,r=e.getProps,n=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})},d=function(e){var t=document.body.querySelectorAll(f.join(","));b(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;r=l(l({},e),{},{wrapper:t}),n=r.Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},11:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},110:function(e,t){},113:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),o=r(13),c=r(0),i=r(85),a=r(37),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,f=void 0===l?{}:l,p=e.shouldSelect,b=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var d=Object(c.useRef)({results:[],isLoading:!0}),g=Object(a.a)(f),m=Object(a.a)(s),y=Object(i.a)(),O=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,g,m],i=o.getCollectionError.apply(o,c);return i&&y(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,m,g,b]);return null!==O&&(d.current=O),d.current}},125:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(50),u=function(e){var t=e.className,r=e.size,n=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},126:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=r(14),i=r.n(c),a=r(3);r(4);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},128:function(e,t,r){"use strict";var n=r(0),o=r(2),c=r(15),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,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},13:function(e,t){!function(){e.exports=this.wp.data}()},14:function(e,t,r){var n=r(56);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},141:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var n=r(8),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}))}},142: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 a=i.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==r.taxonomy}));a.length>0&&(i.slug=a.sort(),u.push(i)),t(Object(n.sortBy)(u,"attribute"))}},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==r.taxonomy}));0===o.length?t(i):(i.push({attribute:r.taxonomy,operator:c,slug:Object(n.map)(o,"slug").sort()}),t(Object(n.sortBy)(i,"attribute")))}},146:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=(r(4),r(5)),u=r.n(a),s=r(1),l=r(126),f=r(125),p=(r(110),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,c=e.element,a=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,b=e.children,d=void 0===b?null:b,g=i()(e,["text","screenReaderText","element","className","radius","children"]),m=a,y=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),O=Boolean(n&&n!==t);return React.createElement(m,o()({className:y},g),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},n),d)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,c=void 0===n?"":n,a=e.disabled,b=void 0!==a&&a,d=e.onRemove,g=void 0===d?function(){}:d,m=e.removeOnAnyClick,y=void 0!==m&&m,O=e.text,v=e.screenReaderText,h=void 0===v?"":v,j=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=y?"span":"button";if(!r){var w=h&&"string"==typeof h?h:O;r="string"!=typeof w?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),w)}var E={"aria-label":r,disabled:b,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},S=y?E:{},R=y?{"aria-hidden":!0}:E;return React.createElement(p,o()({},j,S,{className:u()(c,"is-removable"),element:y?"button":j.element,screenReaderText:h,text:O}),React.createElement(_,o()({className:"wc-block-components-chip__remove"},R),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},15:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},152:function(e,t,r){"use strict";r.d(t,"c",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"a",(function(){return g}));var n=r(6),o=r.n(n),c=r(24),i=r.n(c),a=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}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,f,p={code:a.CURRENCY.code,symbol:a.CURRENCY.symbol,thousandSeparator:a.CURRENCY.thousandSeparator,decimalSeparator:a.CURRENCY.decimalSeparator,minorUnit:a.CURRENCY.precision,prefix:(l=a.CURRENCY.symbol,f=a.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]||""}(a.CURRENCY.symbol,a.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,a=e.currency_prefix,u=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 a?a:"$",suffix:"string"==typeof u?u:""}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},p),e)},g=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=d(t),o=r/Math.pow(10,n.minorUnit),c=n.prefix+o+n.suffix,i=document.createElement("textarea");return i.innerHTML=c,i.value}},17:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},18: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}},19: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},2:function(e,t){!function(){e.exports=this.wc.wcSettings}()},217:function(e,t,r){e.exports=r(273)},218:function(e,t){},22:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(40);function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?Object(arguments[t]):{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){Object(n.a)(e,t,r[t])}))}return e}},24: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},273:function(e,t,r){"use strict";r.r(t);var n=r(128),o=r(107),c=r(9),i=r.n(c),a=r(1),u=r(98),s=r(0),l=r(5),f=r.n(l),p=(r(4),r(33)),b=(r(218),r(141)),d=r(152),g=r(146),m=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(a.sprintf)(Object(a.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(d.a)(e),Object(d.a)(t)):Number.isFinite(e)?Object(a.sprintf)(Object(a.__)("From %s","woo-gutenberg-products-block"),Object(d.a)(e)):Object(a.sprintf)(Object(a.__)("Up to %s","woo-gutenberg-products-block"),Object(d.a)(t))},y=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,u=void 0===i||i,s=e.displayStyle,l=n?React.createElement(React.Fragment,null,n," ",r):r,f=Object(a.sprintf)(Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),r);return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},u&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?React.createElement(g.a,{element:"span",text:l,onRemove:c,radius:"large",ariaLabel:f}):React.createElement("span",{className:"wc-block-active-filters__list-item-name"},l,React.createElement("button",{className:"wc-block-active-filters__list-item-remove",onClick:c},f)))},O=r(113),v=r(17),h=r(142),j=function(e){var t=e.attributeObject,r=void 0===t?{}:t,n=e.slugs,o=void 0===n?[]:n,c=e.operator,s=void 0===c?"in":c,l=e.displayStyle,f=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),p=f.results,b=f.isLoading,d=Object(u.b)("attributes",[]),g=i()(d,2),m=g[0],j=g[1];if(b)return null;var _=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},_,":"),React.createElement("ul",null,o.map((function(e,t){var n=p.find((function(t){return t.slug===e}));if(!n)return null;var o="";return t>0&&"and"===s&&(o=React.createElement("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),y({type:_,name:Object(v.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(h.a)(m,j,r,e)},showLabel:!1,displayStyle:l})}))))},_=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(u.b)("attributes",[]),c=i()(o,2),l=c[0],d=c[1],g=Object(u.b)("min_price"),O=i()(g,2),v=O[0],h=O[1],_=Object(u.b)("max_price"),w=i()(_,2),E=w[0],S=w[1],R=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(E)?y({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:m(v,E),removeCallback:function(){h(void 0),S(void 0)},displayStyle:t.displayStyle}):null}),[v,E,m]),x=Object(s.useMemo)((function(){return l.map((function(e){var r=Object(b.b)(e.attribute);return React.createElement(j,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(E)||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,y({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),y({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):React.createElement(s.Fragment,null,R,x)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){h(void 0),S(void 0),d([])}},React.createElement(p.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(_),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},29:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},3:function(e,t){!function(){e.exports=this.React}()},30: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}},31: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)}},32:function(e,t,r){var n=r(24),o=r(18);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},33:function(e,t,r){"use strict";var n=r(6),o=r.n(n),c=(r(4),r(3)),i=r(5),a=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=r,f=null!=n;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=o||c.Fragment,l&&f&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}},36:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(36),c=r.n(o),i=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},39:function(e,t){!function(){e.exports=this.wp.blocks}()},4:function(e,t,r){e.exports=r(61)()},40:function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r.d(t,"a",(function(){return n}))},45:function(e,t,r){"use strict";var n=r(29),o=r.n(n),c=r(30),i=r.n(c),a=r(18),u=r.n(a),s=r(31),l=r.n(s),f=r(32),p=r.n(f),b=r(19),d=r.n(b),g=r(6),m=r.n(g),y=(r(4),r(3)),O=r(1),v=r(8),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.E,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(O.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(O.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(O.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},r&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};r(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 r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p()(this,r)}}var _=function(e){l()(r,e);var t=j(r);function r(){var e;o()(this,r);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=this.state,a=i.errorMessage;return i.hasError?React.createElement(h,{errorMessage:n?a: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(y.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(y.Component);_.defaultProps={showErrorMessage:!0};t.a=_},5:function(e,t,r){var n;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},50:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(22),o=r(7),c=r(0),i=function(e){var t=Object(n.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(c.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},54:function(e,t,r){var n=r(55);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}}},55: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}},56:function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},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}},60: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},61:function(e,t,r){"use strict";var n=r(62);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,c,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return r.PropTypes=r,r}},62:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},63:function(e,t){},7:function(e,t){!function(){e.exports=this.lodash}()},71:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},72:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw c}}return r}}},73: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){"use strict";r.d(t,"j",(function(){return o})),r.d(t,"w",(function(){return c})),r.d(t,"A",(function(){return i})),r.d(t,"t",(function(){return a})),r.d(t,"n",(function(){return u})),r.d(t,"q",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"B",(function(){return f})),r.d(t,"l",(function(){return p})),r.d(t,"m",(function(){return b})),r.d(t,"k",(function(){return d})),r.d(t,"c",(function(){return g})),r.d(t,"o",(function(){return m})),r.d(t,"p",(function(){return y})),r.d(t,"E",(function(){return v})),r.d(t,"F",(function(){return h})),r.d(t,"x",(function(){return j})),r.d(t,"a",(function(){return _})),r.d(t,"y",(function(){return w})),r.d(t,"b",(function(){return E})),r.d(t,"s",(function(){return S})),r.d(t,"g",(function(){return R})),r.d(t,"z",(function(){return P})),r.d(t,"h",(function(){return C})),r.d(t,"v",(function(){return N})),r.d(t,"u",(function(){return T})),r.d(t,"D",(function(){return A})),r.d(t,"C",(function(){return D})),r.d(t,"d",(function(){return U})),r.d(t,"e",(function(){return L})),r.d(t,"f",(function(){return B})),r.d(t,"r",(function(){return F})),r.d(t,"G",(function(){return M})),r.d(t,"H",(function(){return Y}));var n=r(2),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=(Object(n.getSetting)("max_columns",6),Object(n.getSetting)("min_columns",1),Object(n.getSetting)("default_columns",3),Object(n.getSetting)("max_rows",6),Object(n.getSetting)("min_rows",1),Object(n.getSetting)("default_rows",3),Object(n.getSetting)("min_height",500),Object(n.getSetting)("default_height",500),Object(n.getSetting)("placeholderImgSrc","")),u=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),s=Object(n.getSetting)("limitTags"),l=(Object(n.getSetting)("hasProducts",!0),Object(n.getSetting)("hasTags",!0),Object(n.getSetting)("homeUrl",""),Object(n.getSetting)("couponsEnabled",!0)),f=(Object(n.getSetting)("shippingEnabled",!0),Object(n.getSetting)("taxesEnabled",!0)),p=Object(n.getSetting)("displayItemizedTaxes",!1),b=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),d=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),g=(Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[])),m=Object(n.getSetting)("isShippingCalculatorEnabled",!0),y=Object(n.getSetting)("isShippingCostHidden",!1),O=Object(n.getSetting)("woocommerceBlocksPhase",1),v=Object(n.getSetting)("wcBlocksAssetUrl",""),h=Object(n.getSetting)("wcBlocksBuildUrl",""),j=Object(n.getSetting)("shippingCountries",{}),_=Object(n.getSetting)("allowedCountries",{}),w=Object(n.getSetting)("shippingStates",{}),E=Object(n.getSetting)("allowedStates",{}),S=(Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("paymentGatewaySortOrder",[])),R=Object(n.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},k=Object(n.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),P=k.shop.permalink,C=(k.checkout.id,k.checkout.permalink),N=k.privacy.permalink,T=k.privacy.title,A=k.terms.permalink,D=k.terms.title,U=(k.cart.id,k.cart.permalink),L=Object(n.getSetting)("checkoutAllowsGuest",!1),B=Object(n.getSetting)("checkoutAllowsSignup",!1),F=Object(n.getSetting)("loginUrl","/wp-login.php"),M=(r(39),function(){return O>2}),Y=function(){return O>1}},85:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(9),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){var n=r(71),o=r(72),c=r(54),i=r(73);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||i()}},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(9),o=r.n(n),c=r(15),i=r(13),a=r(0),u=r(59),s=r(7),l=r(37),f=function(e){var t=Object(u.a)();e=e||t;var r=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(a.useCallback)((function(t){n(e,t)}),[e])]},p=function(e,t,r){var n=Object(u.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(r,e,t)}),[r,e])]},b=function(e,t){var r=Object(u.a)(),n=f(t=t||r),c=o()(n,2),i=c[0],p=c[1],b=Object(l.a)(e),d=Object(a.useRef)(!1);return Object(a.useEffect)((function(){p(Object(s.assign)({},i,b)),d.current=!0}),[b]),d.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' => '9c84f205318b908395066aafeb793272');
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' => '5f89cbbdb25655c770b9c0205d86daf8');
build/active-filters.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var r,o,a=t[0],u=t[1],l=t[2],b=0,f=[];b<a.length;b++)o=a[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==c[u]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},c={4:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var s=u;return i.push([858,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102: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},122:function(e,t){},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},152:function(e,t,n){"use strict";var r=n(21),c=n.n(r),i=n(24),o=n.n(i),a=n(22),u=n.n(a),l=n(23),s=n.n(l),b=n(12),f=n.n(b),p=n(0),d=n(6),g=n(1),m=n(4);function v(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(p.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(m.Path,{d:n[t]})):null}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var h=function(e){u()(n,e);var t=O(n);function n(){return c()(this,n),t.apply(this,arguments)}return o()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(v,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,i=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(p.createElement)(m.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(v,{level:o}),controls:Object(d.range)(c,i).map((function(t){return e.createLevelControl(t,o,a)}))})}}]),n}(p.Component);t.a=h},155: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}))}}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},171: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),a=n(0),u=n(102),l=n(6),s=n(60),b=function(e){var t=Object(u.a)();e=e||t;var n=Object(o.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e])]},f=function(e,t,n){var r=Object(u.a)();n=n||r;var c=Object(o.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(a.useCallback)((function(t){l(n,e,t)}),[n,e])]},p=function(e,t){var n=Object(u.a)(),r=b(t=t||n),i=c()(r,2),o=i[0],f=i[1],p=Object(s.a)(e),d=Object(a.useRef)(!1);return Object(a.useEffect)((function(){f(Object(l.assign)({},o,p)),d.current=!0}),[p]),d.current?[o,f]:[e,f]}},185:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(14)),i=n(7),o=n.n(i);n(260);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,a=e.heading,u="h".concat(n);return Object(r.createElement)(u,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:a,onChange:i}))}},202:function(e,t){},206:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(41),c=n(36),i=n(0),o=n(155),a=n(60),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,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(a.a)(b),m=Object(a.a)(l),v=Object(o.a)(),O=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],o=c.getCollectionError.apply(c,i);return o&&v(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,p]);return null!==O&&(d.current=O),d.current}},25:function(e,t){!function(){e.exports=this.wp.compose}()},258: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(53),o=n.n(i),a=n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s,b,f={code:a.CURRENCY.code,symbol:a.CURRENCY.symbol,thousandSeparator:a.CURRENCY.thousandSeparator,decimalSeparator:a.CURRENCY.decimalSeparator,minorUnit:a.CURRENCY.precision,prefix:(s=a.CURRENCY.symbol,b=a.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]||""}(a.CURRENCY.symbol,a.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,a=e.currency_prefix,u=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 a?a:"$",suffix:"string"==typeof u?u:""}},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}},260:function(e,t){},270: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}))}},271: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 a=o.slug.filter((function(e){return e!==c})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(o.slug=a.sort(),u.push(o)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",o=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(o):(o.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(o,"attribute")))}},276:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(27),o=n.n(i),a=n(0),u=(n(2),n(7)),l=n.n(u),s=n(1),b=n(61),f=n(283),p=(n(202),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,u=void 0===i?"li":i,s=e.className,b=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,d=e.children,g=void 0===d?null:d,m=o()(e,["text","screenReaderText","element","className","radius","children"]),v=u,O=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+p),h=Boolean(r&&r!==t);return Object(a.createElement)(v,c()({className:O},m),Object(a.createElement)("span",{"aria-hidden":h,className:"wc-block-components-chip__text"},t),h&&Object(a.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,u=e.disabled,d=void 0!==u&&u,g=e.onRemove,m=void 0===g?function(){}:g,v=e.removeOnAnyClick,O=void 0!==v&&v,h=e.text,j=e.screenReaderText,y=void 0===j?"":j,w=o()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=O?"span":"button";if(!n){var E=y&&"string"==typeof y?y:h;n="string"!=typeof E?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),E)}var S={"aria-label":n,disabled:d,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},k=O?S:{},x=O?{"aria-hidden":!0}:S;return Object(a.createElement)(p,c()({},w,k,{className:l()(i,"is-removable"),element:O?"button":w.element,screenReaderText:y,text:h}),Object(a.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(a.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},283:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(27),o=n.n(i),a=n(0),u=n(58),l=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(u.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=l},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},33: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}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},48:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(0),o=(n(2),n(9)),a=n(7),u=n.n(a);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,l=null!=n,b=null!=r;return!l&&b?(t=c||"span",a=s(s({},a),{},{className:u()(a.className,"screen-reader-text")}),Object(i.createElement)(t,a,r)):(t=c||o.Fragment,l&&b&&n!==r?Object(i.createElement)(t,a,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,a,n))};b.defaultProps={wrapperProps:{}},t.a=b},5:function(e,t,n){"use strict";n.d(t,"k",(function(){return c})),n.d(t,"J",(function(){return i})),n.d(t,"P",(function(){return o})),n.d(t,"z",(function(){return a})),n.d(t,"B",(function(){return u})),n.d(t,"l",(function(){return l})),n.d(t,"A",(function(){return s})),n.d(t,"D",(function(){return b})),n.d(t,"n",(function(){return f})),n.d(t,"C",(function(){return p})),n.d(t,"m",(function(){return d})),n.d(t,"F",(function(){return g})),n.d(t,"u",(function(){return m})),n.d(t,"x",(function(){return v})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return j})),n.d(t,"j",(function(){return y})),n.d(t,"L",(function(){return w})),n.d(t,"Q",(function(){return _})),n.d(t,"p",(function(){return E})),n.d(t,"q",(function(){return S})),n.d(t,"o",(function(){return k})),n.d(t,"I",(function(){return x})),n.d(t,"c",(function(){return C})),n.d(t,"v",(function(){return R})),n.d(t,"w",(function(){return N})),n.d(t,"T",(function(){return L})),n.d(t,"U",(function(){return T})),n.d(t,"K",(function(){return H})),n.d(t,"a",(function(){return z})),n.d(t,"N",(function(){return D})),n.d(t,"b",(function(){return V})),n.d(t,"M",(function(){return B})),n.d(t,"E",(function(){return F})),n.d(t,"h",(function(){return U})),n.d(t,"O",(function(){return Y})),n.d(t,"g",(function(){return I})),n.d(t,"i",(function(){return Q})),n.d(t,"H",(function(){return K})),n.d(t,"G",(function(){return G})),n.d(t,"S",(function(){return W})),n.d(t,"R",(function(){return $})),n.d(t,"d",(function(){return q})),n.d(t,"e",(function(){return J})),n.d(t,"f",(function(){return X})),n.d(t,"y",(function(){return Z})),n.d(t,"X",(function(){return te})),n.d(t,"Y",(function(){return ne})),n.d(t,"V",(function(){return re})),n.d(t,"W",(function(){return ce}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),a=Object(r.getSetting)("max_columns",6),u=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),f=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),d=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),v=Object(r.getSetting)("limitTags"),O=Object(r.getSetting)("hasProducts",!0),h=Object(r.getSetting)("hasTags",!0),j=Object(r.getSetting)("homeUrl",""),y=Object(r.getSetting)("couponsEnabled",!0),w=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),E=Object(r.getSetting)("displayItemizedTaxes",!1),S=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),k=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),x=Object(r.getSetting)("productCount",0),C=Object(r.getSetting)("attributes",[]),R=Object(r.getSetting)("isShippingCalculatorEnabled",!0),N=Object(r.getSetting)("isShippingCostHidden",!1),P=Object(r.getSetting)("woocommerceBlocksPhase",1),L=Object(r.getSetting)("wcBlocksAssetUrl",""),T=Object(r.getSetting)("wcBlocksBuildUrl",""),H=Object(r.getSetting)("shippingCountries",{}),z=Object(r.getSetting)("allowedCountries",{}),D=Object(r.getSetting)("shippingStates",{}),V=Object(r.getSetting)("allowedStates",{}),B=Object(r.getSetting)("shippingMethodsExist",!1),F=Object(r.getSetting)("paymentGatewaySortOrder",[]),U=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},A=Object(r.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),Y=A.shop.permalink,I=A.checkout.id,Q=A.checkout.permalink,K=A.privacy.permalink,G=A.privacy.title,W=A.terms.permalink,$=A.terms.title,q=A.cart.id,J=A.cart.permalink,X=Object(r.getSetting)("checkoutAllowsGuest",!1),Z=(Object(r.getSetting)("checkoutAllowsSignup",!1),Object(r.getSetting)("loginUrl","/wp-login.php")),ee=n(17),te=function(e,t){if(P>2)return Object(ee.registerBlockType)(e,t)},ne=function(e,t){if(P>1)return Object(ee.registerBlockType)(e,t)},re=function(){return P>2},ce=function(){return P>1}},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(46),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},61:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(27),o=n.n(i),a=n(9);n(2);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=o()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},74:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(21),o=n.n(i),a=n(24),u=n.n(a),l=n(19),s=n.n(l),b=n(22),f=n.n(b),p=n(23),d=n.n(p),g=n(12),m=n.n(g),v=n(0),O=n(6),h=n(7),j=n.n(h),y=n(4),w=n(25);n(122);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return 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 u()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,i=n.checked,o=n.instanceId,a=n.className,u=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return u&&(e=Object(O.isFunction)(u)?u(i):u),Object(v.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",a)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(v.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var i={};return s===e.value?(i.isPrimary=!0,i["aria-pressed"]=!0):(i.isDefault=!0,i["aria-pressed"]=!1),Object(v.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},i),e.label)}))))}}]),n}(v.Component);t.a=Object(w.withInstanceId)(E)},858:function(e,t,n){e.exports=n(907)},859:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()},907:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),i=n(0),o=n(1),a=n(17),u=n(61),l=n(58),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(14),d=n(4),g=n(152),m=n(185),v=n(74),O=n(11),h=n.n(O),j=n(171),y=(n(2),n(48)),w=(n(859),n(270)),_=n(258),E=n(276),S=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.a)(e),Object(_.a)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.a)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.a)(t))},k=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,a=void 0===c?function(){}:c,u=e.showLabel,l=void 0===u||u,s=e.displayStyle,b=r?Object(i.createElement)(i.Fragment,null,r," ",n):n,f=Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n);return Object(i.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+n},l&&Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(i.createElement)(E.a,{element:"span",text:b,onRemove:a,radius:"large",ariaLabel:f}):Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},b,Object(i.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:a},f)))},x=n(206),C=n(33),R=n(271),N=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,a=e.operator,u=void 0===a?"in":a,l=e.displayStyle,s=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),b=s.results,f=s.isLoading,p=Object(j.b)("attributes",[]),d=h()(p,2),g=d[0],m=d[1];if(f)return null;var v=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},v,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=b.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===u&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),k({type:v,name:Object(C.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(R.a)(g,m,n,e)},showLabel:!1,displayStyle:l})}))))},P=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(j.b)("attributes",[]),a=h()(c,2),u=a[0],l=a[1],s=Object(j.b)("min_price"),b=h()(s,2),p=b[0],d=b[1],g=Object(j.b)("max_price"),m=h()(g,2),v=m[0],O=m[1],_=Object(i.useMemo)((function(){return Number.isFinite(p)||Number.isFinite(v)?k({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:S(p,v),removeCallback:function(){d(void 0),O(void 0)},displayStyle:t.displayStyle}):null}),[p,v,S]),E=Object(i.useMemo)((function(){return u.map((function(e){var n=Object(w.b)(e.attribute);return Object(i.createElement)(N,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[u]);if(!(u.length>0||Number.isFinite(p)||Number.isFinite(v)||r))return null;var x="h".concat(t.headingLevel),C=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(i.createElement)(i.Fragment,null,!r&&t.heading&&Object(i.createElement)(x,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:C},r?Object(i.createElement)(i.Fragment,null,k({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),k({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(i.createElement)(i.Fragment,null,_,E)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){d(void 0),O(void 0),l([])}},Object(i.createElement)(y.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},L=Object(d.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,a=t.heading,u=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(p.InspectorControls,{key:"inspector"},Object(i.createElement)(d.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(v.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:c,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:function(e){return n({displayStyle:e})}}),Object(i.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(i.createElement)(g.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:u,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(m.a,{headingLevel:u,heading:a,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(d.Disabled,null,Object(i.createElement)(P,{attributes:t,isEditor:!0})))}));Object(a.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(u.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:L,save:function(e){var t=e.attributes,n=t.className,r={"data-display-style":t.displayStyle,"data-heading":t.heading,"data-heading-level":t.headingLevel};return Object(i.createElement)("div",c()({className:f()("is-loading",n)},r),Object(i.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var r,o,a=t[0],u=t[1],l=t[2],b=0,f=[];b<a.length;b++)o=a[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==c[u]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},c={4:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var s=u;return i.push([858,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},102: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},122:function(e,t){},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},152:function(e,t,n){"use strict";var r=n(21),c=n.n(r),i=n(24),o=n.n(i),a=n(22),u=n.n(a),l=n(23),s=n.n(l),b=n(12),f=n.n(b),p=n(0),d=n(6),g=n(1),m=n(4);function v(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(p.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(m.Path,{d:n[t]})):null}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var h=function(e){u()(n,e);var t=O(n);function n(){return c()(this,n),t.apply(this,arguments)}return o()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(v,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,i=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(p.createElement)(m.Toolbar,{isCollapsed:r,icon:Object(p.createElement)(v,{level:o}),controls:Object(d.range)(c,i).map((function(t){return e.createLevelControl(t,o,a)}))})}}]),n}(p.Component);t.a=h},155: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}))}}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},171: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),a=n(0),u=n(102),l=n(6),s=n(60),b=function(e){var t=Object(u.a)();e=e||t;var n=Object(o.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e])]},f=function(e,t,n){var r=Object(u.a)();n=n||r;var c=Object(o.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(a.useCallback)((function(t){l(n,e,t)}),[n,e])]},p=function(e,t){var n=Object(u.a)(),r=b(t=t||n),i=c()(r,2),o=i[0],f=i[1],p=Object(s.a)(e),d=Object(a.useRef)(!1);return Object(a.useEffect)((function(){f(Object(l.assign)({},o,p)),d.current=!0}),[p]),d.current?[o,f]:[e,f]}},185:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(14)),i=n(7),o=n.n(i);n(260);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,a=e.heading,u="h".concat(n);return Object(r.createElement)(u,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:a,onChange:i}))}},202:function(e,t){},206:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(41),c=n(36),i=n(0),o=n(155),a=n(60),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,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(a.a)(b),m=Object(a.a)(l),v=Object(o.a)(),O=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],o=c.getCollectionError.apply(c,i);return o&&v(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,p]);return null!==O&&(d.current=O),d.current}},25:function(e,t){!function(){e.exports=this.wp.compose}()},258: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(56),o=n.n(i),a=n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s,b,f={code:a.CURRENCY.code,symbol:a.CURRENCY.symbol,thousandSeparator:a.CURRENCY.thousandSeparator,decimalSeparator:a.CURRENCY.decimalSeparator,minorUnit:a.CURRENCY.precision,prefix:(s=a.CURRENCY.symbol,b=a.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]||""}(a.CURRENCY.symbol,a.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,a=e.currency_prefix,u=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 a?a:"$",suffix:"string"==typeof u?u:""}},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}},260:function(e,t){},270: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}))}},271: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 a=o.slug.filter((function(e){return e!==c})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(o.slug=a.sort(),u.push(o)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",o=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(o):(o.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(o,"attribute")))}},276:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(27),o=n.n(i),a=n(0),u=(n(2),n(7)),l=n.n(u),s=n(1),b=n(61),f=n(283),p=(n(202),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,u=void 0===i?"li":i,s=e.className,b=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,d=e.children,g=void 0===d?null:d,m=o()(e,["text","screenReaderText","element","className","radius","children"]),v=u,O=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+p),h=Boolean(r&&r!==t);return Object(a.createElement)(v,c()({className:O},m),Object(a.createElement)("span",{"aria-hidden":h,className:"wc-block-components-chip__text"},t),h&&Object(a.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,u=e.disabled,d=void 0!==u&&u,g=e.onRemove,m=void 0===g?function(){}:g,v=e.removeOnAnyClick,O=void 0!==v&&v,h=e.text,j=e.screenReaderText,y=void 0===j?"":j,w=o()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=O?"span":"button";if(!n){var E=y&&"string"==typeof y?y:h;n="string"!=typeof E?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),E)}var S={"aria-label":n,disabled:d,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},k=O?S:{},x=O?{"aria-hidden":!0}:S;return Object(a.createElement)(p,c()({},w,k,{className:l()(i,"is-removable"),element:O?"button":w.element,screenReaderText:y,text:h}),Object(a.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(a.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},283:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(27),o=n.n(i),a=n(0),u=n(58),l=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(u.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=l},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},33: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}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},48:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(0),o=(n(2),n(9)),a=n(7),u=n.n(a);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=n,f=null!=r;return!b&&f?(t=c||"span",l=s(s({},l),{},{className:u()(l.className,"screen-reader-text")}),Object(i.createElement)(t,l,r)):(t=c||o.Fragment,b&&f&&n!==r?Object(i.createElement)(t,l,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,l,n))}},5:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"K",(function(){return i})),n.d(t,"Q",(function(){return o})),n.d(t,"A",(function(){return a})),n.d(t,"C",(function(){return u})),n.d(t,"m",(function(){return l})),n.d(t,"B",(function(){return s})),n.d(t,"E",(function(){return b})),n.d(t,"o",(function(){return f})),n.d(t,"D",(function(){return p})),n.d(t,"n",(function(){return d})),n.d(t,"G",(function(){return g})),n.d(t,"v",(function(){return m})),n.d(t,"y",(function(){return v})),n.d(t,"s",(function(){return O})),n.d(t,"t",(function(){return h})),n.d(t,"u",(function(){return j})),n.d(t,"k",(function(){return y})),n.d(t,"M",(function(){return w})),n.d(t,"R",(function(){return _})),n.d(t,"q",(function(){return E})),n.d(t,"r",(function(){return S})),n.d(t,"p",(function(){return k})),n.d(t,"J",(function(){return x})),n.d(t,"c",(function(){return C})),n.d(t,"w",(function(){return R})),n.d(t,"x",(function(){return N})),n.d(t,"U",(function(){return L})),n.d(t,"V",(function(){return T})),n.d(t,"L",(function(){return H})),n.d(t,"a",(function(){return z})),n.d(t,"O",(function(){return D})),n.d(t,"b",(function(){return V})),n.d(t,"N",(function(){return B})),n.d(t,"F",(function(){return F})),n.d(t,"i",(function(){return U})),n.d(t,"P",(function(){return Y})),n.d(t,"h",(function(){return I})),n.d(t,"j",(function(){return Q})),n.d(t,"I",(function(){return K})),n.d(t,"H",(function(){return G})),n.d(t,"T",(function(){return W})),n.d(t,"S",(function(){return $})),n.d(t,"d",(function(){return q})),n.d(t,"e",(function(){return J})),n.d(t,"f",(function(){return X})),n.d(t,"g",(function(){return Z})),n.d(t,"z",(function(){return ee})),n.d(t,"Y",(function(){return ne})),n.d(t,"Z",(function(){return re})),n.d(t,"W",(function(){return ce})),n.d(t,"X",(function(){return ie}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),a=Object(r.getSetting)("max_columns",6),u=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),f=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),d=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),v=Object(r.getSetting)("limitTags"),O=Object(r.getSetting)("hasProducts",!0),h=Object(r.getSetting)("hasTags",!0),j=Object(r.getSetting)("homeUrl",""),y=Object(r.getSetting)("couponsEnabled",!0),w=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),E=Object(r.getSetting)("displayItemizedTaxes",!1),S=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),k=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),x=Object(r.getSetting)("productCount",0),C=Object(r.getSetting)("attributes",[]),R=Object(r.getSetting)("isShippingCalculatorEnabled",!0),N=Object(r.getSetting)("isShippingCostHidden",!1),P=Object(r.getSetting)("woocommerceBlocksPhase",1),L=Object(r.getSetting)("wcBlocksAssetUrl",""),T=Object(r.getSetting)("wcBlocksBuildUrl",""),H=Object(r.getSetting)("shippingCountries",{}),z=Object(r.getSetting)("allowedCountries",{}),D=Object(r.getSetting)("shippingStates",{}),V=Object(r.getSetting)("allowedStates",{}),B=Object(r.getSetting)("shippingMethodsExist",!1),F=Object(r.getSetting)("paymentGatewaySortOrder",[]),U=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},A=Object(r.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),Y=A.shop.permalink,I=A.checkout.id,Q=A.checkout.permalink,K=A.privacy.permalink,G=A.privacy.title,W=A.terms.permalink,$=A.terms.title,q=A.cart.id,J=A.cart.permalink,X=Object(r.getSetting)("checkoutAllowsGuest",!1),Z=Object(r.getSetting)("checkoutAllowsSignup",!1),ee=Object(r.getSetting)("loginUrl","/wp-login.php"),te=n(17),ne=function(e,t){if(P>2)return Object(te.registerBlockType)(e,t)},re=function(e,t){if(P>1)return Object(te.registerBlockType)(e,t)},ce=function(){return P>2},ie=function(){return P>1}},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(46),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},61:function(e,t,n){"use strict";var r=n(8),c=n.n(r),i=n(27),o=n.n(i),a=n(9);n(2);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=o()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},74:function(e,t,n){"use strict";var r=n(10),c=n.n(r),i=n(21),o=n.n(i),a=n(24),u=n.n(a),l=n(19),s=n.n(l),b=n(22),f=n.n(b),p=n(23),d=n.n(p),g=n(12),m=n.n(g),v=n(0),O=n(6),h=n(7),j=n.n(h),y=n(4),w=n(25);n(122);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return 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 u()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,i=n.checked,o=n.instanceId,a=n.className,u=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return u&&(e=Object(O.isFunction)(u)?u(i):u),Object(v.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",a)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(v.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var i={};return s===e.value?(i.isPrimary=!0,i["aria-pressed"]=!0):(i.isDefault=!0,i["aria-pressed"]=!1),Object(v.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},i),e.label)}))))}}]),n}(v.Component);t.a=Object(w.withInstanceId)(E)},858:function(e,t,n){e.exports=n(907)},859:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()},907:function(e,t,n){"use strict";n.r(t);var r=n(10),c=n.n(r),i=n(0),o=n(1),a=n(17),u=n(61),l=n(58),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(14),d=n(4),g=n(152),m=n(185),v=n(74),O=n(11),h=n.n(O),j=n(171),y=(n(2),n(48)),w=(n(859),n(270)),_=n(258),E=n(276),S=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.a)(e),Object(_.a)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.a)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.a)(t))},k=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,a=void 0===c?function(){}:c,u=e.showLabel,l=void 0===u||u,s=e.displayStyle,b=r?Object(i.createElement)(i.Fragment,null,r," ",n):n,f=Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n);return Object(i.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+n},l&&Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(i.createElement)(E.a,{element:"span",text:b,onRemove:a,radius:"large",ariaLabel:f}):Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},b,Object(i.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:a},f)))},x=n(206),C=n(33),R=n(271),N=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,a=e.operator,u=void 0===a?"in":a,l=e.displayStyle,s=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),b=s.results,f=s.isLoading,p=Object(j.b)("attributes",[]),d=h()(p,2),g=d[0],m=d[1];if(f)return null;var v=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},v,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=b.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===u&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),k({type:v,name:Object(C.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(R.a)(g,m,n,e)},showLabel:!1,displayStyle:l})}))))},P=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(j.b)("attributes",[]),a=h()(c,2),u=a[0],l=a[1],s=Object(j.b)("min_price"),b=h()(s,2),p=b[0],d=b[1],g=Object(j.b)("max_price"),m=h()(g,2),v=m[0],O=m[1],_=Object(i.useMemo)((function(){return Number.isFinite(p)||Number.isFinite(v)?k({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:S(p,v),removeCallback:function(){d(void 0),O(void 0)},displayStyle:t.displayStyle}):null}),[p,v,S]),E=Object(i.useMemo)((function(){return u.map((function(e){var n=Object(w.b)(e.attribute);return Object(i.createElement)(N,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[u]);if(!(u.length>0||Number.isFinite(p)||Number.isFinite(v)||r))return null;var x="h".concat(t.headingLevel),C=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(i.createElement)(i.Fragment,null,!r&&t.heading&&Object(i.createElement)(x,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:C},r?Object(i.createElement)(i.Fragment,null,k({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),k({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(i.createElement)(i.Fragment,null,_,E)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){d(void 0),O(void 0),l([])}},Object(i.createElement)(y.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},L=Object(d.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,a=t.heading,u=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(p.InspectorControls,{key:"inspector"},Object(i.createElement)(d.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(v.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:c,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:function(e){return n({displayStyle:e})}}),Object(i.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(i.createElement)(g.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:u,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(m.a,{headingLevel:u,heading:a,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(d.Disabled,null,Object(i.createElement)(P,{attributes:t,isEditor:!0})))}));Object(a.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(u.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:L,save:function(e){var t=e.attributes,n=t.className,r={"data-display-style":t.displayStyle,"data-heading":t.heading,"data-heading-level":t.headingLevel};return Object(i.createElement)("div",c()({className:f()("is-loading",n)},r),Object(i.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})}});
build/all-products-frontend.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', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', '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' => '7565e879b279a2abb10f40bd71958e50');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', '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' => '010c33ae87c18c6b2c23122773b2c261');
build/all-products-frontend.js CHANGED
@@ -3,4 +3,4 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"v",(function(){return c})),n.d(t,"z",(function(){return i})),n.d(t,"s",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"p",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"A",(function(){return f})),n.d(t,"k",(function(){return p})),n.d(t,"l",(function(){return d})),n.d(t,"j",(function(){return m})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return h})),n.d(t,"o",(function(){return g})),n.d(t,"D",(function(){return y})),n.d(t,"E",(function(){return O})),n.d(t,"w",(function(){return j})),n.d(t,"a",(function(){return w})),n.d(t,"x",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"r",(function(){return S})),n.d(t,"f",(function(){return _})),n.d(t,"y",(function(){return P})),n.d(t,"g",(function(){return C})),n.d(t,"u",(function(){return N})),n.d(t,"t",(function(){return T})),n.d(t,"C",(function(){return A})),n.d(t,"B",(function(){return F})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return I})),n.d(t,"q",(function(){return D})),n.d(t,"F",(function(){return B}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),f=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=Object(r.getSetting)("displayItemizedTaxes",!1),d=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),m=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),h=Object(r.getSetting)("isShippingCalculatorEnabled",!0),g=Object(r.getSetting)("isShippingCostHidden",!1),v=Object(r.getSetting)("woocommerceBlocksPhase",1),y=Object(r.getSetting)("wcBlocksAssetUrl",""),O=Object(r.getSetting)("wcBlocksBuildUrl",""),j=Object(r.getSetting)("shippingCountries",{}),w=Object(r.getSetting)("allowedCountries",{}),k=Object(r.getSetting)("shippingStates",{}),E=Object(r.getSetting)("allowedStates",{}),S=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),_=Object(r.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},R=Object(r.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),P=R.shop.permalink,C=(R.checkout.id,R.checkout.permalink),N=R.privacy.permalink,T=R.privacy.title,A=R.terms.permalink,F=R.terms.title,M=(R.cart.id,R.cart.permalink),I=Object(r.getSetting)("checkoutAllowsGuest",!1),D=(Object(r.getSetting)("checkoutAllowsSignup",!1),Object(r.getSetting)("loginUrl","/wp-login.php")),B=(n(39),function(){return v>1})},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,n){var r=n(71),o=n(72),c=n(54),i=n(73);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,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.data}()},function(e,t,n){var r=n(56);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},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 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";n.d(t,"a",(function(){return o}));var r=n(40);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){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},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,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(28);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){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(23),o=n(18);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=(n(4),n(3)),i=n(5),a=n.n(i);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=null!=n,l=null!=r;return!u&&l?(t=o||"span",i=s(s({},i),{},{className:a()(i.className,"screen-reader-text")}),React.createElement(t,i,r)):(t=o||c.Fragment,u&&l&&n!==r?React.createElement(t,i,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,i,n))};l.defaultProps={wrapperProps:{}},t.a=l},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(46);var o=n(53);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(36),c=n.n(o),i=function(e){var t=Object(r.useRef)();return c()(e,t.current)||(t.current=e),t.current}},,function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,,,function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(29),o=n.n(r),c=n(30),i=n.n(c),a=n(18),u=n.n(a),s=n(31),l=n.n(s),f=n(32),p=n.n(f),d=n(19),m=n.n(d),b=n(6),h=n.n(b),g=(n(4),n(3)),v=n(1),y=n(8),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.D,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,i=void 0===c?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(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,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=this.state,a=i.errorMessage;return i.hasError?React.createElement(O,{errorMessage:r?a:null,header:t,imageUrl:n,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(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,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.keycodes}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(22),o=n(7),c=n(0),i=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(c.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);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){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=Object(r.createContext)("page"),c=function(){return Object(r.useContext)(o)};o.Provider},function(e,t){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 c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,function(e,t,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";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),c=r(n(56)),i=n(3),a=r(i),u=r(n(109)),s=r(n(18)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||e===t}};function f(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function d(e){return l.und(e)?[]:l.arr(e)?e:[e]}function 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,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return l.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var h,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},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function _(e){k=e}var x,R=function(){return Date.now()};function P(e){x=e}var C,N,T=function(e){return e.current};function A(e){C=e}var F=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return g},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return k},injectStringInterpolator:_,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return x},injectDefaultElement:P,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:A,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),M=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:C(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),I=!1,D=new Set,B=function e(){if(!I)return!1;var t=R(),n=D,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,u=0;u<i.configs.length;u++){for(var s=i.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var 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,S=0===s.tension||Math.abs(b-h)<=s.precision;l=w||k&&S,d.lastVelocity=y,d.lastTime=t}g&&!s.toValues[p].done&&(l=!1),l?(d.value!==b&&(h=b),d.done=!0):a=!0,d.setValue(h),d.lastPosition=h}else d.setValue(b),d.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(D.delete(i),i.stop(!0))}return D.size?N?N():E(e):I=!1,I};function L(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return L({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,u){var s=u?u(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],u,i,a,r.map)}}var V=function(e){function t(n,r,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=L(r,o,c),i}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=L(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(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 V(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,i=t.to,a=c(t,["delay","to"]);if(l.arr(i)||l.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var u={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:m(r,n)},a),s=u[i.delay]&&u[i.delay].to;u[i.delay]=o({},u[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,u=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);a?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),a):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,D.has(t)||D.add(t),I||(I=!0,E(N||B));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,D.has(t)&&D.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,b(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;a=a.then((function(){return r.to((function(e){var t=o({},r,b(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,i===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,u=n.config,s=void 0===u?{}:u,f=n.reverse,b=n.attach,h=n.reset,v=n.immediate;if(f){var y=[a,c];c=y[0],a=y[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var O=b&&b(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},u=l.num(i),f=l.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!g[i],b=l.arr(i),y=!u&&!b&&!f,j=l.und(c[r])?i:c[r],w=u||b||f?i:1,E=m(s,r);O&&(w=O.animations[r].parent);var S,_=a.parent,x=a.interpolation,P=d(O?w.getPayload():w),C=i;y&&(C=k({range:[0,1],output:[i,i]})(1));var N,T=x&&x.getValue(),A=!l.und(_)&&a.animatedValues.some((function(e){return!e.done})),F=!l.equ(C,T),M=!l.equ(C,a.previous),I=!l.equ(E,a.config);if(h||M&&F||I){var D;if(u||f)_=x=a.parent||new z(j);else if(b)_=x=a.parent||new q(j);else if(y){var B=a.interpolation&&a.interpolation.calc(a.parent.value);B=void 0===B||h?j:B,a.parent?(_=a.parent).setValue(0,!1):_=new z(0);var L={output:[B,i]};a.interpolation?(x=a.interpolation,a.interpolation.updateConfig(L)):x=_.interpolate(L)}return P=d(O?w.getPayload():w),S=d(_.getPayload()),h&&!y&&_.setValue(j,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=A?e.lastVelocity:void 0,e.lastTime=A?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),m(v,r)&&_.setValue(y?w:i,!1),o({},e,((D={})[r]=o({},a,{name:r,parent:_,interpolation:x,animatedValues:S,toValues:P,previous:C,config:E,fromValues:d(_.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}),D))}return F?e:(y&&(_.setValue(1,!1),x.updateConfig({output:[C,C]})),_.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:C}),N)))}),this.animations),this.hasChanged)for(var j in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[j]=this.animations[j].interpolation,this.values[j]=this.animations[j].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),U=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=l.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new W,i=o?m(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],u=c[1];r.current=a;i.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},K=0,Q=function(e,t){return("function"==typeof t?e.map(t):d(t)).map(String)},Y=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},i)};function G(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(Z,Z,Z)),te=new RegExp("rgba"+X(Z,Z,Z,Z)),ne=new RegExp("hsl"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ue(o,r,e+1/3),i=ue(o,r,e),a=ue(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function de(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|pe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),de(n[2]),de(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),de(n[2]),de(n[3]))|pe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var 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(J).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={};A((function(e){return new $(e)})),P("div"),_((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 L(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(J),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=Oe(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var p in a){var d=u?p:je[p]||(je[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(d)&&e.setAttribute(d,a[p])}}),(function(e){return e}));var we,ke,Ee=(we=function(e){return i.forwardRef((function(t,n){var r=f(),u=i.useRef(!0),s=i.useRef(null),p=i.useRef(null),d=i.useCallback((function(e){var t=s.current;s.current=new M(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var m,b=s.current.getValue(),g=(b.scrollTop,b.scrollLeft,c(b,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return a.createElement(e,o({},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)}),Se=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=B,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=F,t.useSpring=function(e){var t=l.fun(e),n=U(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=l.fun(t),c=m(t),a=i.useRef(),u=U(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:m(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=i.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:m(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&d(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,d,p]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=Y(r),u=a.lazy,s=void 0!==u&&u,l=(a.unique,a.reset),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),b=(a.keys,a.items,a.onFrame),h=a.onRest,g=a.onStart,v=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=i.useRef(!1),w=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=Y(t),u=a.items,s=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,b=a.update,h=a.trail,g=void 0===h?0:h,v=a.unique,y=a.config,O=a.order,j=void 0===O?["enter","leave","update"]:O,w=Y(r),k=w.keys,E=w.items,S=o({},i.current),_=[].concat(i.deleted),x=Object.keys(S),R=new Set(x),P=new Set(s),C=s.filter((function(e){return!R.has(e)})),N=i.transitions.filter((function(e){return!e.destroyed&&!P.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return R.has(e)})),A=-g;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){v&&_.find((function(t){return t.originalKey===e}))&&(_=_.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";S[e]={slot:c,originalKey:e,key:v?String(e):K++,item:o,trail:A+=g,config:m(y,o,c),from:m(n&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":N.forEach((function(e){var t=k.indexOf(e),n=E[t];_.unshift(o({},S[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:A+=g,config:m(y,n,"leave"),to:m(d,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];S[e]=o({},S[e],{item:n,slot:"update",trail:A+=g,config:m(y,n,"update"),to:m(b,n)})}))}}var F=s.map((function(e){return S[e]}));return _.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=F.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),F=[].concat(F.slice(0,t),[r],F.slice(t))})),o({},i,{changed:C.length||N.length||T.length,first:n&&0===C.length,transitions:F,current:S,deleted:_,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,u=e.item;w.current.instances.has(a)||w.current.instances.set(a,new W);var l=w.current.instances.get(a),f=o({},y,{to:r,from:n,config:c,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||s||G(w,a),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:i,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),i.useEffect((function(){return w.current.mounted=j.current=!0,function(){w.current.mounted=j.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=U},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(50),u=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,c=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},c),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},s=React.createElement(u,null),l=n(125),f=n(0);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=s;break;case"no-alt":t=l.a}return t?Object(f.cloneElement)(t,{size:e.size||20,className:e.className}):null}},function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,function(e,t,n){"use strict";var r=n(22),o=n(9),c=n(27),i=n(0),a=n(68),u=n(50);t.a=function(e){var t=e.icon,n=void 0===t?null:t,s=e.size,l=Object(c.a)(e,["icon","size"]),f=s||20;if("string"==typeof n)return Object(i.createElement)(a.a,Object(o.a)({icon:n,size:f},l));if(n&&a.a===n.type)return Object(i.cloneElement)(n,Object(r.a)({size:f},l));var p=s||24;if("function"==typeof n)return n.prototype instanceof i.Component?Object(i.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(i.createElement)(u.a,d)}return Object(i.isValidElement)(n)?Object(i.cloneElement)(n,Object(r.a)({size:p},l)):n}},function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(5),i=n.n(c),a=n(0);t.a=Object(a.forwardRef)((function(e,t){var n=e.href,c=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=i()("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:c}:{type:"button",disabled:v};return Object(a.createElement)(j,Object(r.a)({},w,y,{className:O,ref:t}))}))},,,function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),o=n.n(r),c=n(88),i=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(c.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,a=e.setIsSuppressed,s=Object(i.useRef)(t);Object(i.useEffect)((function(){s.current=t}),[t]);var l=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return s.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),f=Object(i.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,u({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(e,t)}}}),[n,o]);return u(u(u({notices:t},l),f),{},{setIsSuppressed:a})}},,function(e,t){!function(){e.exports=this.wp.deprecated}()},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),o=n.n(r),c=n(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return N})),n.d(t,"a",(function(){return T}));var r=n(6),o=n.n(r),c=n(10),i=n.n(c),a=(n(4),n(0)),u=n(13),s=n(138),l=n(9),f=n(24),p=n.n(f);function d(e,t,n,r,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){d(c,r,o,i,a,"next",e)}function a(e){d(c,r,o,i,a,"throw",e)}i(void 0)}))}}var b=n(25),h=n(5),g=n.n(h),v=n(7),y=n(67),O=n(26),j=n(1),w=n(76);var k=Object(a.forwardRef)((function(e,t){var n=e.className,r=e.children,o=e.actions,c=void 0===o?[]:o,i=e.onRemove,u=void 0===i?v.noop:i;Object(a.useEffect)((function(){var e=setTimeout((function(){u()}),1e4);return function(){return clearTimeout(e)}}),[]);var s=g()(n,"components-snackbar");return c&&c.length>1&&(console.warn("Snackbar can only have 1 action, use Notice if your message require many messages"),c=[c[0]]),Object(a.createElement)("div",{ref:t,className:s,onClick:u,tabIndex:"0",role:"button",onKeyPress:u,label:Object(j.__)("Dismiss this notice")},Object(a.createElement)("div",{className:"components-snackbar__content"},r,c.map((function(e,t){var n=e.label,r=e.onClick,o=e.url;return Object(a.createElement)(w.a,{key:t,href:o,isTertiary:!0,onClick:function(e){e.stopPropagation(),r&&r(e)},className:"components-snackbar__action"},n)}))))}));var E=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?v.noop:o,i=Object(O.useReducedMotion)(),u=Object(a.useState)((function(){return new WeakMap})),s=Object(b.a)(u,1)[0],f=Object(y.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=m(p.a.mark((function t(n){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:s.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=m(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:i});n=g()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(a.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(a.createElement)(y.animated.div,{key:n,style:r},Object(a.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(a.createElement)(k,Object(l.a)({},Object(v.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},S=n(80),_=n(117),x=function(){var e=Object(_.a)().isEditor,t=Object(S.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(E,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function R(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?R(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),N=function(){return Object(a.useContext)(C)},T=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,c=void 0===o||o,l=e.context,f=void 0===l?"wc/core":l,p=Object(u.useDispatch)("core/notices"),d=p.createNotice,m=p.removeNotice,b=Object(a.useState)(!1),h=i()(b,2),g=h[0],v=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,P(P({},n),{},{context:n.context||f}))}),[d,f]),O=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;m(e,t)}),[m,f]),j=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,P(P({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(f)}}),[f]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:f,setIsSuppressed:v},k=g?null:React.createElement(s.a,{className:r,notices:w.notices}),E=g?null:React.createElement(x,null);return React.createElement(C.Provider,{value:w},c&&k,t,E)}},,,,,,,function(e,t){!function(){e.exports=this.wp.wordcount}()},,,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(10),o=n.n(r),c=n(15),i=n(13),a=n(0),u=n(59),s=n(7),l=n(37),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e])]},p=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(i.useSelect)((function(r){return r(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e])]},d=function(e,t){var n=Object(u.a)(),r=f(t=t||n),c=o()(r,2),i=c[0],p=c[1],d=Object(l.a)(e),m=Object(a.useRef)(!1);return Object(a.useEffect)((function(){p(Object(s.assign)({},i,d)),m.current=!0}),[d]),m.current?[i,p]:[e,p]}},function(e,t,n){"use strict";var r=n(9),o=n(0),c=n(7);var i=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(i,")"),r}},a=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=a.get(e)||0;return a.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=i((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(29),i=n.n(c),a=n(30),u=n.n(a),s=n(18),l=n.n(s),f=n(31),p=n.n(f),d=n(32),m=n.n(d),b=n(19),h=n.n(b),g=n(6),v=n.n(g),y=n(3);n(127);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 i()(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,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(11),o=n.n(r),c=n(6),i=n.n(c),a=n(0),u=n(45);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,n=e.containers,r=e.getProps,c=void 0===r?function(){}:r,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),i=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:f})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})},m=function(e){var t=document.body.querySelectorAll(f.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,c=n.getErrorBoundaryProps,i=n.selector,a=n.wrapper.querySelectorAll(i),p({Block:r,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t){},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(13),c=n(0),i=n(85),a=n(37),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(c.useRef)({results:[],isLoading:!0}),b=Object(a.a)(f),h=Object(a.a)(s),g=Object(i.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,b,h],i=o.getCollectionError.apply(o,c);return i&&g(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[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 c}));var r=n(0),o=(n(13),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),c=function(){return Object(r.useContext)(o)}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=n(5),i=n.n(c),a=n(1),u=n(76),s=n(9),l=n(27);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(12);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(25),j=n(47),w=n(49),k=n(82),E=n.n(k),S=n(26),_=n(22),x=function(){return"rtl"===document.documentElement.dir};function R(e,t,n,r){var o=t.width;"left"===n&&x()?n="right":"right"===n&&x()&&(n="left");var c,i=Math.round(e.left+e.width/2),a={popoverLeft:i,contentWidth:(i-o/2>0?o/2:i)+(i+o/2>window.innerWidth?window.innerWidth-i:o/2)},u="middle"===r?e.left:i,s={popoverLeft:u,contentWidth:u-o>0?o:u},l="middle"===r?e.right:i,f={popoverLeft:l,contentWidth:l+o>window.innerWidth?window.innerWidth-l:o},p=null;if("center"===n&&a.contentWidth===o)c="center";else if("left"===n&&s.contentWidth===o)c="left";else if("right"===n&&f.contentWidth===o)c="right";else{var d="left"===(c=s.contentWidth>f.contentWidth?"left":"right")?s.contentWidth:f.contentWidth;p=d!==o?d:null}return{xAxis:c,popoverLeft:"center"===c?a.popoverLeft:"left"===c?s.popoverLeft:f.popoverLeft,contentWidth:p}}function P(e,t,n){var r,o=t.height,c=e.top+e.height/2,i={popoverTop:c,contentHeight:(c-o/2>0?o/2:c)+(c+o/2>window.innerHeight?window.innerHeight-c:o/2)},a={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&&i.contentHeight===o)r="middle";else if("top"===n&&a.contentHeight===o)r="top";else if("bottom"===n&&u.contentHeight===o)r="bottom";else{var l="top"===(r=a.contentHeight>u.contentHeight?"top":"bottom")?a.contentHeight:u.contentHeight;s=l!==o?l:null}return{yAxis:r,popoverTop:"middle"===r?i.popoverTop:"top"===r?a.popoverTop:u.popoverTop,contentHeight:s}}var C=n(35),N=Object(r.createContext)({focusHistory:[]}),T=N.Provider,A=N.Consumer;T.displayName="FocusReturnProvider",A.displayName="FocusReturnConsumer";r.Component;var F=Object(S.createHigherOrderComponent)((function e(t){if((c=t)instanceof r.Component||"function"==typeof c){var n=t;return e({})(n)}var c,i=t.onFocusReturn,a=void 0===i?o.stubTrue:i;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!==a())for(var r,c=[].concat(Object(C.a)(o.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(C.a)(n)))),[e]);r=c.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)(A,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn"),M=Object(S.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"),I=["button","submit"];var D=Object(S.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)(I,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 B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,o=e.className,c=void 0===o?"lockscroll":o,i=0,a=0;function u(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](c),n.documentElement.classList[r](c),e||(t.scrollTop=a)}function s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}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 L(e){e.stopPropagation()}var V=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:L}),n)})),z=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),q=z.Provider,H=z.Consumer,W=(r.Component,0);function U(e){var t=e.name,n=e.children,c=e.registerFill,i=e.unregisterFill,a=function(e){var t=Object(r.useContext)(z),n=t.getSlot,o=t.subscribe,c=Object(r.useState)(n(e)),i=Object(O.a)(c,2),a=i[0],u=i[1];return Object(r.useEffect)((function(){return u(n(e)),o((function(){u(n(e))}))}),[e]),a}(t),u=Object(r.useRef)({name:t,children:n});return u.current.occurrence||(u.current.occurrence=++W),Object(r.useLayoutEffect)((function(){return c(t,u.current),function(){return i(t,u.current)}}),[]),Object(r.useLayoutEffect)((function(){u.current.children=n,a&&!a.props.bubblesVirtually&&a.forceUpdate()}),[n]),Object(r.useLayoutEffect)((function(){t!==u.current.name&&(i(u.current.name,u.current),u.current.name=t,c(t,u.current))}),[t]),a&&a.node&&a.props.bubblesVirtually?(Object(o.isFunction)(n)&&(n=n(a.props.fillProps)),Object(r.createPortal)(n,a.node)):null}var K=function(e){return Object(r.createElement)(H,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(U,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,c=e.bubblesVirtually,i=void 0!==c&&c,a=e.fillProps,u=void 0===a?{}:a,s=e.getFills,l=e.className;if(i)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 c="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:c})}))})).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)(H,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,c=t.getFills;return Object(r.createElement)(Q,Object(s.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:c}))}))},G=n(40);var $=function(e){var t=e.type,n=e.options,r=void 0===n?{}:n,o=e.children;if("appear"===t){var c,a=r.origin,u=(void 0===a?"top":a).split(" "),s=Object(O.a)(u,2),l=s[0],f=s[1],p=void 0===f?"center":f;return o({className:i()("components-animate__appear",(c={},Object(G.a)(c,"is-from-"+p,"center"!==p),Object(G.a)(c,"is-from-"+l,"middle"!==l),c))})}if("slide-in"===t){var d=r.origin,m=void 0===d?"left":d;return o({className:i()("components-animate__slide-in","is-from-"+m)})}return o("loading"===t?{className:i()("components-animate__loading")}:{})},J=M(F((function(e){return e.children})));function Z(e,t){var n=window.getComputedStyle(t),r=n.paddingTop,o=n.paddingBottom,c=n.paddingLeft,i=n.paddingRight,a=r?parseInt(r,10):0,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=i?parseInt(i,10):0;return{x:e.left+s,y:e.top+a,width:e.width-s-l,height:e.height-a-u,left:e.left+s,right:e.right-l,top:e.top+a,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,c=e.children,a=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,x=e.getAnchorRect,C=e.expandOnMobile,N=e.animate,T=void 0===N||N,A=e.onClickOutside,F=e.onFocusOutside,M=Object(l.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorVerticalBuffer","anchorHorizontalBuffer","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside"]),I=Object(r.useRef)(null),L=Object(r.useRef)(null),z=Object(r.useRef)(),q=Object(r.useRef)(),W=Object(S.useViewportMatch)("medium","<"),U=Object(r.useState)(),Q=Object(O.a)(U,2),Y=Q[0],G=Q[1],ne=C&&W;f=ne||f,Object(r.useEffect)((function(){var e=z.current,t=L.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 c=r.getBoundingClientRect();return o?c:Z(c,r)}if(e.current){var i=e.current.parentNode,a=i.getBoundingClientRect();return o?a:Z(a,i)}}(I,k,x,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),c=o[0],i=o[1],a=void 0===i?"center":i,u=P(e,t,c),s=R(e,t,a,u.yAxis);return Object(_.a)({},s,u)}(n,q.current,d),o=r.popoverTop,c=r.popoverLeft,i=r.xAxis,a=r.yAxis,u=r.contentHeight,s=r.contentWidth;te(e,"is-without-arrow",f||"center"===i&&"middle"===a),X(e,"data-x-axis",i),X(e,"data-y-axis",a),ee(e,"top","number"==typeof o?o+"px":""),ee(e,"left","number"==typeof c?c+"px":""),ee(t,"maxHeight","number"==typeof u?u+"px":""),ee(t,"maxWidth","number"==typeof s?s+"px":"");G(({left:"right",right:"left"}[i]||"center")+" "+({top:"bottom",bottom:"top"}[a]||"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,x,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,L);var re=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)};var oe=Object(r.createElement)(D,{onFocusOutside:function(e){if(F)F(e);else if(A){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"}),A(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)(V,Object(s.a)({className:i()("components-popover",a,o,{"is-expanded":ne,"is-without-arrow":f})},M,{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)(ae,{className:"components-popover__close",icon:"no-alt",onClick:n})),Object(r.createElement)("div",{ref:L,className:"components-popover__content",tabIndex:"-1"},c))})));return b&&(oe=Object(r.createElement)(J,null,oe)),Object(r.createElement)(H,null,(function(e){var t=e.getSlot;return t&&t("Popover")&&(oe=Object(r.createElement)(K,{name:"Popover"},oe)),Object(r.createElement)("span",{ref:I},oe,W&&C&&Object(r.createElement)(B,null))}))};ne.Slot=function(){return Object(r.createElement)(Y,{bubblesVirtually:!0,name:"Popover"})};var re=ne;var oe=function(e){var t,n,c=e.shortcut,i=e.className;return c?(Object(o.isString)(c)&&(t=c),Object(o.isObject)(c)&&(t=c.display,n=c.ariaLabel),Object(r.createElement)("span",{className:i,"aria-label":n},t)):null},ce=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 c=Object(o.includes)(["focus","mouseenter"],r.type);c!==n.state.isOver&&(t?n.delayedSetIsOver(c):n.setState({isOver:c}))}}}},{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,c=e.shortcut;if(1!==r.Children.count(t))return t;var i=r.Children.only(t),a=this.state.isOver;return Object(r.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(r.concatChildren)(i.props.children,a&&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:c})))})}}]),t}(r.Component),ie=n(75);var ae=Object(r.forwardRef)((function(e,t){var n=e.icon,c=e.children,a=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=i()("components-icon-button",f,{"has-text":c}),v=p||a,y=!h.disabled&&(p||d||!!a&&(!c||Object(o.isArray)(c)&&!c.length)&&!1!==p),O=Object(r.createElement)(u.a,Object(s.a)({"aria-label":a},h,{className:g,ref:t}),Object(r.createElement)(ie.a,{icon:n,size:b}),c);return y&&(O=Object(r.createElement)(ce,{text:v,shortcut:d,position:m},O)),O}));t.a=function(e){var t=e.className,n=e.status,c=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=i()(t,"components-notice","is-"+n,{"is-dismissible":p});return b&&(c=Object(r.createElement)(r.RawHTML,null,c)),Object(r.createElement)("div",{className:h},Object(r.createElement)("div",{className:"components-notice__content"},c,m.map((function(e,t){var n=e.className,o=e.label,c=e.noDefaultClasses,a=void 0!==c&&c,s=e.onClick,l=e.url;return Object(r.createElement)(u.a,{key:t,href:l,isDefault:!a&&!l,isLink:!a&&!!l,onClick:l?void 0:s,className:i()("components-notice__action",n)},o)}))),p&&Object(r.createElement)(ae,{className:"components-notice__dismiss",icon:"no-alt",label:Object(a.__)("Dismiss this notice"),onClick:l,tooltip:!1}))}},,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(50),u=function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(14),i=n.n(c),a=n(3);n(4);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(2),c=n(15),i=n(13);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,i=r.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,,function(e,t,n){"use strict";n(4);var r=n(5),o=n.n(r),c=n(33),i=n(99);n(155);t.a=Object(i.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,i=e.label,a=e.onChange,u=e.options,s=e.screenReaderLabel,l=e.readOnly,f=e.value,p="wc-block-components-sort-select__select-".concat(n);return React.createElement("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},React.createElement(c.a,{label:i,screenReaderLabel:s,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),React.createElement("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:r,onChange:a,readOnly:l,value:f},u.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(4),n(5)),i=n.n(c),a=n(118),u=n(88),s=(n(108),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=i()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(a.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",s(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(34),o=n(0),c=n(8);n.p=c.E,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)((function(){return Promise.all([n.e(20),n.e(6)]).then(n.bind(null,297))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return n.e(5).then(n.bind(null,307))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return n.e(13).then(n.bind(null,306))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return n.e(7).then(n.bind(null,298))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return n.e(3).then(n.bind(null,299))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return n.e(11).then(n.bind(null,300))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return n.e(8).then(n.bind(null,284))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return n.e(9).then(n.bind(null,301))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return n.e(4).then(n.bind(null,302))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return n.e(12).then(n.bind(null,303))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return n.e(10).then(n.bind(null,304))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return n.e(2).then(n.bind(null,305))}))});var i=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,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){!function(){e.exports=this.wc.wcSharedHocs}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,,,,,,function(e,t,n){e.exports=n(265)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(128),o=n(88),c=n(107),i=n(29),a=n.n(i),u=n(30),s=n.n(u),l=n(31),f=n.n(l),p=n(32),d=n.n(p),m=n(19),b=n.n(m),h=n(3),g=(n(4),n(10)),v=n.n(g),y=n(0),O=n(23),j=n.n(O),w=n(14),k=n.n(w),E=n(6),S=n.n(E),_=n(1),x=n(7),R=n(5),P=n.n(R),C=n(33),N=(n(209),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,c=e.onPageChange,i=e.totalPages,a=function(e,t,n){if(n<=2)return{minIndex:null,maxIndex:null};var r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}}(o,t,i),u=a.minIndex,s=a.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==i),p=n&&Boolean(u>3),d=n&&Boolean(s<i-2);l&&3===u&&(u-=1),f&&s===i-2&&(s+=1);var 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(C.a,{screenReaderLabel:Object(_.__)("Navigate to another page","woo-gutenberg-products-block")}),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t-1)},title:Object(_.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(C.a,{label:"<",screenReaderLabel:Object(_.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return c(1)},disabled:1===t},React.createElement(C.a,{label:1,screenReaderLabel:Object(_.sprintf)(Object(_.__)("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(_.__)("…","woo-gutenberg-products-block")),m.map((function(e){return React.createElement("button",{key:e,className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return c(e)},disabled:t===e},React.createElement(C.a,{label:e,screenReaderLabel:Object(_.sprintf)(Object(_.__)("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(_.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===i,"wc-block-components-pagination__page--active":t===i}),onClick:function(){return c(i)},disabled:t===i},React.createElement(C.a,{label:i,screenReaderLabel:Object(_.sprintf)(Object(_.__)("Page %d","woo-gutenberg-products-block"),i)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t+1)},title:Object(_.__)("Next page","woo-gutenberg-products-block"),disabled:t>=i},React.createElement(C.a,{label:">",screenReaderLabel:Object(_.__)("Next page","woo-gutenberg-products-block")})))});N.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var T=N,A=n(136),F=(n(208),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(A.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(_.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(_.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(_.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(_.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(_.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(_.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(_.__)("Order products by","woo-gutenberg-products-block"),value:o})}),M=n(69),I=n(99),D=n(11),B=n.n(D),L=n(145),V=Object(I.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,c=Object(M.useInnerBlockLayoutContext)(),i=c.parentClassName,a=c.parentName,u=0===Object.keys(t).length,s=P()("".concat(i,"__product"),"wc-block-layout",{"is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var c=Object(L.a)(t);return r.map((function(r,i){var a=v()(r,2),u=a[0],s=a[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=c[u];if(!p)return null;var d=n.id||0,m=["layout",u,i,o,d];return React.createElement(y.Suspense,{key:m.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,B()({},l,{children:f,product:n})))}))}}(a,t,o,r))})),z=n(98),q=n(113),H=n(15),W=n(13),U=n(37);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){S()(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,c=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,c=void 0===o?[]:o,i=t.query,a=void 0===i?{}:i;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var u=Object(U.a)(a),s=Object(U.a)(c),l=Object(W.useSelect)((function(t){var o=t(H.COLLECTIONS_STORE_KEY),c=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,c),isLoading:o.hasFinishedResolution("getCollectionHeader",c)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",Q(Q({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(c,10),productsLoading:o}},G=n(184),$=n(101),J=n(44),Z=(n(207),n(126)),X=n(50),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(M.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement(Z.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(_.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(_.__)("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(M.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement(Z.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ne,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(_.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(_.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(_.__)("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 ce(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){S()(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 ie=Object($.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,c=e.sortValue,i=e.scrollToTop,a=Object(z.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,c=r.rows;return ce(ce({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:o*c,page:n})}({attributes:t,sortValue:c,currentPage:n})),u=v()(a,1)[0],s=Y(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(M.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),S=E[0],R=E[1],C=Object(z.b)("max_price"),N=v()(C,2),A=N[0],I=N[1],D=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(x.isEqual)(t,o)&&Number.isFinite(n)})),B="object"===j()(D)&&Object(x.isEqual)(m,D.totalQuery);Object(y.useEffect)((function(){B||(r(1),D&&function(e){Number.isFinite(e)&&(0===e?Object(J.speak)(Object(_.__)("No products found","woo-gutenberg-products-block")):Object(J.speak)(Object(_.sprintf)(Object(_._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[u]);var L,q,H,W,U,K=t.contentVisibility,Q=t.columns*t.rows,$=!Number.isFinite(f)&&B?Math.ceil(D.totalProducts/Q):Math.ceil(f/Q),Z=l.length?l:Array.from({length:Q}),X=0!==l.length||p,ee=g.length>0||Number.isFinite(S)||Number.isFinite(A);return React.createElement("div",{className:(L=t.columns,q=t.rows,H=t.alignButtons,W=t.align,U=void 0!==W?"align"+W:"",P()(d,U,"has-"+L+"-columns",{"has-multiple-rows":q>1,"has-aligned-buttons":H}))},K.orderBy&&X&&React.createElement(F,{onChange:o,value:c}),!X&&ee&&React.createElement(re,{resetCallback:function(){O([]),R(null),I(null)}}),!X&&!ee&&React.createElement(te,null),X&&React.createElement("ul",{className:"".concat(d,"__products")},Z.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(V,{key:e.id||n,attributes:t,product:e})}))),$>1&&React.createElement(T,{currentPage:n,onPageChange:function(e){i({focusableSelector:"a, button"}),r(e)},totalPages:$}))})),ae=function(e){var t=e.attributes,n=Object(y.useState)(1),r=v()(n,2),o=r[0],c=r[1],i=Object(y.useState)(t.orderby),a=v()(i,2),u=a[0],s=a[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return React.createElement(ie,{attributes:t,currentPage:o,onPageChange:function(e){c(e)},onSortChange:function(e){var t=e.target.value;s(t),c(1)},sortValue:u})},ue=n(8),se=React.createElement("img",{src:ue.D+"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 a()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.urlParameterSuffix;return t.isPreview?se:React.createElement(M.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ae,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(c.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(fe,e))})),getProps:function(e){return{attributes:JSON.parse(e.dataset.attributes)}}})}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"w",(function(){return c})),n.d(t,"A",(function(){return i})),n.d(t,"t",(function(){return a})),n.d(t,"n",(function(){return u})),n.d(t,"q",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"B",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"m",(function(){return d})),n.d(t,"k",(function(){return m})),n.d(t,"c",(function(){return b})),n.d(t,"o",(function(){return h})),n.d(t,"p",(function(){return g})),n.d(t,"E",(function(){return y})),n.d(t,"F",(function(){return O})),n.d(t,"x",(function(){return j})),n.d(t,"a",(function(){return w})),n.d(t,"y",(function(){return k})),n.d(t,"b",(function(){return E})),n.d(t,"s",(function(){return S})),n.d(t,"g",(function(){return _})),n.d(t,"z",(function(){return P})),n.d(t,"h",(function(){return C})),n.d(t,"v",(function(){return N})),n.d(t,"u",(function(){return T})),n.d(t,"D",(function(){return A})),n.d(t,"C",(function(){return F})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return I})),n.d(t,"f",(function(){return B})),n.d(t,"r",(function(){return D})),n.d(t,"G",(function(){return L})),n.d(t,"H",(function(){return V}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),f=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=Object(r.getSetting)("displayItemizedTaxes",!1),d=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),m=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),h=Object(r.getSetting)("isShippingCalculatorEnabled",!0),g=Object(r.getSetting)("isShippingCostHidden",!1),v=Object(r.getSetting)("woocommerceBlocksPhase",1),y=Object(r.getSetting)("wcBlocksAssetUrl",""),O=Object(r.getSetting)("wcBlocksBuildUrl",""),j=Object(r.getSetting)("shippingCountries",{}),w=Object(r.getSetting)("allowedCountries",{}),k=Object(r.getSetting)("shippingStates",{}),E=Object(r.getSetting)("allowedStates",{}),S=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),_=Object(r.getSetting)("checkoutShowLoginReminder",!0),x={id:0,title:"",permalink:""},R=Object(r.getSetting)("storePages",{shop:x,cart:x,checkout:x,privacy:x,terms:x}),P=R.shop.permalink,C=(R.checkout.id,R.checkout.permalink),N=R.privacy.permalink,T=R.privacy.title,A=R.terms.permalink,F=R.terms.title,M=(R.cart.id,R.cart.permalink),I=Object(r.getSetting)("checkoutAllowsGuest",!1),B=Object(r.getSetting)("checkoutAllowsSignup",!1),D=Object(r.getSetting)("loginUrl","/wp-login.php"),L=(n(39),function(){return v>2}),V=function(){return v>1}},function(e,t,n){var r=n(71),o=n(72),c=n(54),i=n(73);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()}},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){"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.data}()},function(e,t,n){var r=n(56);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},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 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";n.d(t,"a",(function(){return o}));var r=n(40);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){!function(){e.exports=this.regeneratorRuntime}()},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t,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,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){!function(){e.exports=this.wp.compose}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(28);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){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(24),o=n(18);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=(n(4),n(3)),i=n(5),a=n.n(i);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=n,f=null!=r;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||c.Fragment,l&&f&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(46);var o=n(53);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(36),c=n.n(o),i=function(e){var t=Object(r.useRef)();return c()(e,t.current)||(t.current=e),t.current}},,function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},,,,function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(29),o=n.n(r),c=n(30),i=n.n(c),a=n(18),u=n.n(a),s=n(31),l=n.n(s),f=n(32),p=n.n(f),d=n(19),m=n.n(d),b=n(6),h=n.n(b),g=(n(4),n(3)),v=n(1),y=n(8),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.E,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,i=void 0===c?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(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,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=this.state,a=i.errorMessage;return i.hasError?React.createElement(O,{errorMessage:r?a:null,header:t,imageUrl:n,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(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,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.keycodes}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(22),o=n(7),c=n(0),i=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(c.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(46);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){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){!function(){e.exports=this.wp.apiFetch}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=Object(r.createContext)("page"),c=function(){return Object(r.useContext)(o)};o.Provider},function(e,t){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 c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,function(e,t,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";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),c=r(n(56)),i=n(3),a=r(i),u=r(n(109)),s=r(n(18)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||e===t}};function f(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function d(e){return l.und(e)?[]:l.arr(e)?e:[e]}function 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,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return l.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var h,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},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function _(e){k=e}var x,R=function(){return Date.now()};function P(e){x=e}var C,N,T=function(e){return e.current};function A(e){C=e}var F=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return g},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return k},injectStringInterpolator:_,get now(){return R},injectNow:function(e){R=e},get defaultElement(){return x},injectDefaultElement:P,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:A,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),M=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:C(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),I=!1,B=new Set,D=function e(){if(!I)return!1;var t=R(),n=B,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,u=0;u<i.configs.length;u++){for(var s=i.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var 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,S=0===s.tension||Math.abs(b-h)<=s.precision;l=w||k&&S,d.lastVelocity=y,d.lastTime=t}g&&!s.toValues[p].done&&(l=!1),l?(d.value!==b&&(h=b),d.done=!0):a=!0,d.setValue(h),d.lastPosition=h}else d.setValue(b),d.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(B.delete(i),i.stop(!0))}return B.size?N?N():E(e):I=!1,I};function L(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return L({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,u){var s=u?u(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],u,i,a,r.map)}}var V=function(e){function t(n,r,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=L(r,o,c),i}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=L(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(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 V(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,i=t.to,a=c(t,["delay","to"]);if(l.arr(i)||l.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var u={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:m(r,n)},a),s=u[i.delay]&&u[i.delay].to;u[i.delay]=o({},u[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,u=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);a?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),a):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,B.has(t)||B.add(t),I||(I=!0,E(N||D));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,B.has(t)&&B.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,b(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;a=a.then((function(){return r.to((function(e){var t=o({},r,b(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,i===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,u=n.config,s=void 0===u?{}:u,f=n.reverse,b=n.attach,h=n.reset,v=n.immediate;if(f){var y=[a,c];c=y[0],a=y[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var O=b&&b(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},u=l.num(i),f=l.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!g[i],b=l.arr(i),y=!u&&!b&&!f,j=l.und(c[r])?i:c[r],w=u||b||f?i:1,E=m(s,r);O&&(w=O.animations[r].parent);var S,_=a.parent,x=a.interpolation,P=d(O?w.getPayload():w),C=i;y&&(C=k({range:[0,1],output:[i,i]})(1));var N,T=x&&x.getValue(),A=!l.und(_)&&a.animatedValues.some((function(e){return!e.done})),F=!l.equ(C,T),M=!l.equ(C,a.previous),I=!l.equ(E,a.config);if(h||M&&F||I){var B;if(u||f)_=x=a.parent||new z(j);else if(b)_=x=a.parent||new q(j);else if(y){var D=a.interpolation&&a.interpolation.calc(a.parent.value);D=void 0===D||h?j:D,a.parent?(_=a.parent).setValue(0,!1):_=new z(0);var L={output:[D,i]};a.interpolation?(x=a.interpolation,a.interpolation.updateConfig(L)):x=_.interpolate(L)}return P=d(O?w.getPayload():w),S=d(_.getPayload()),h&&!y&&_.setValue(j,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=A?e.lastVelocity:void 0,e.lastTime=A?e.lastTime:void 0,e.startTime=R(),e.done=!1,e.animatedStyles.clear()})),m(v,r)&&_.setValue(y?w:i,!1),o({},e,((B={})[r]=o({},a,{name:r,parent:_,interpolation:x,animatedValues:S,toValues:P,previous:C,config:E,fromValues:d(_.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}),B))}return F?e:(y&&(_.setValue(1,!1),x.updateConfig({output:[C,C]})),_.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:C}),N)))}),this.animations),this.hasChanged)for(var j in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[j]=this.animations[j].interpolation,this.values[j]=this.animations[j].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),U=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=l.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new W,i=o?m(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],u=c[1];r.current=a;i.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},K=0,Q=function(e,t){return("function"==typeof t?e.map(t):d(t)).map(String)},Y=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},i)};function G(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(Z,Z,Z)),te=new RegExp("rgba"+X(Z,Z,Z,Z)),ne=new RegExp("hsl"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ue(o,r,e+1/3),i=ue(o,r,e),a=ue(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function de(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|pe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),de(n[2]),de(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),de(n[2]),de(n[3]))|pe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var 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(J).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={};A((function(e){return new $(e)})),P("div"),_((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 L(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(J),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=Oe(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var p in a){var d=u?p:je[p]||(je[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(d)&&e.setAttribute(d,a[p])}}),(function(e){return e}));var we,ke,Ee=(we=function(e){return i.forwardRef((function(t,n){var r=f(),u=i.useRef(!0),s=i.useRef(null),p=i.useRef(null),d=i.useCallback((function(e){var t=s.current;s.current=new M(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var m,b=s.current.getValue(),g=(b.scrollTop,b.scrollLeft,c(b,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return a.createElement(e,o({},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)}),Se=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=D,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=F,t.useSpring=function(e){var t=l.fun(e),n=U(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=l.fun(t),c=m(t),a=i.useRef(),u=U(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:m(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=i.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:m(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&d(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,d,p]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=Y(r),u=a.lazy,s=void 0!==u&&u,l=(a.unique,a.reset),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),b=(a.keys,a.items,a.onFrame),h=a.onRest,g=a.onStart,v=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=i.useRef(!1),w=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=Y(t),u=a.items,s=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,b=a.update,h=a.trail,g=void 0===h?0:h,v=a.unique,y=a.config,O=a.order,j=void 0===O?["enter","leave","update"]:O,w=Y(r),k=w.keys,E=w.items,S=o({},i.current),_=[].concat(i.deleted),x=Object.keys(S),R=new Set(x),P=new Set(s),C=s.filter((function(e){return!R.has(e)})),N=i.transitions.filter((function(e){return!e.destroyed&&!P.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return R.has(e)})),A=-g;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){v&&_.find((function(t){return t.originalKey===e}))&&(_=_.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";S[e]={slot:c,originalKey:e,key:v?String(e):K++,item:o,trail:A+=g,config:m(y,o,c),from:m(n&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":N.forEach((function(e){var t=k.indexOf(e),n=E[t];_.unshift(o({},S[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:A+=g,config:m(y,n,"leave"),to:m(d,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];S[e]=o({},S[e],{item:n,slot:"update",trail:A+=g,config:m(y,n,"update"),to:m(b,n)})}))}}var F=s.map((function(e){return S[e]}));return _.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=F.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),F=[].concat(F.slice(0,t),[r],F.slice(t))})),o({},i,{changed:C.length||N.length||T.length,first:n&&0===C.length,transitions:F,current:S,deleted:_,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,u=e.item;w.current.instances.has(a)||w.current.instances.set(a,new W);var l=w.current.instances.get(a),f=o({},y,{to:r,from:n,config:c,ref:v,onRest:function(n){w.current.mounted&&(e.destroyed&&(v||s||G(w,a),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:i,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),i.useEffect((function(){return w.current.mounted=j.current=!0,function(){w.current.mounted=j.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=U},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(50),u=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,c=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},c),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},s=React.createElement(u,null),l=n(125),f=n(0);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=s;break;case"no-alt":t=l.a}return t?Object(f.cloneElement)(t,{size:e.size||20,className:e.className}):null}},function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,function(e,t,n){"use strict";var r=n(22),o=n(10),c=n(27),i=n(0),a=n(68),u=n(50);t.a=function(e){var t=e.icon,n=void 0===t?null:t,s=e.size,l=Object(c.a)(e,["icon","size"]),f=s||20;if("string"==typeof n)return Object(i.createElement)(a.a,Object(o.a)({icon:n,size:f},l));if(n&&a.a===n.type)return Object(i.cloneElement)(n,Object(r.a)({size:f},l));var p=s||24;if("function"==typeof n)return n.prototype instanceof i.Component?Object(i.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(i.createElement)(u.a,d)}return Object(i.isValidElement)(n)?Object(i.cloneElement)(n,Object(r.a)({size:p},l)):n}},function(e,t,n){"use strict";var r=n(22),o=n(27),c=n(5),i=n.n(c),a=n(0);t.a=Object(a.forwardRef)((function(e,t){var n=e.href,c=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=i()("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:c}:{type:"button",disabled:v};return Object(a.createElement)(j,Object(r.a)({},w,y,{className:O,ref:t}))}))},,,function(e,t){!function(){e.exports=this.wp.autop}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),o=n.n(r),c=n(88),i=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(c.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,a=e.setIsSuppressed,s=Object(i.useRef)(t);Object(i.useEffect)((function(){s.current=t}),[t]);var l=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return s.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),f=Object(i.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,u({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(e,t)}}}),[n,o]);return u(u(u({notices:t},l),f),{},{setIsSuppressed:a})}},,function(e,t){!function(){e.exports=this.wp.deprecated}()},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(9),o=n.n(r),c=n(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return N})),n.d(t,"a",(function(){return T}));var r=n(6),o=n.n(r),c=n(9),i=n.n(c),a=(n(4),n(0)),u=n(13),s=n(138),l=n(10),f=n(23),p=n.n(f);function d(e,t,n,r,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){d(c,r,o,i,a,"next",e)}function a(e){d(c,r,o,i,a,"throw",e)}i(void 0)}))}}var b=n(25),h=n(5),g=n.n(h),v=n(7),y=n(67),O=n(26),j=n(1),w=n(76);var k=Object(a.forwardRef)((function(e,t){var n=e.className,r=e.children,o=e.actions,c=void 0===o?[]:o,i=e.onRemove,u=void 0===i?v.noop:i;Object(a.useEffect)((function(){var e=setTimeout((function(){u()}),1e4);return function(){return clearTimeout(e)}}),[]);var s=g()(n,"components-snackbar");return c&&c.length>1&&(console.warn("Snackbar can only have 1 action, use Notice if your message require many messages"),c=[c[0]]),Object(a.createElement)("div",{ref:t,className:s,onClick:u,tabIndex:"0",role:"button",onKeyPress:u,label:Object(j.__)("Dismiss this notice")},Object(a.createElement)("div",{className:"components-snackbar__content"},r,c.map((function(e,t){var n=e.label,r=e.onClick,o=e.url;return Object(a.createElement)(w.a,{key:t,href:o,isTertiary:!0,onClick:function(e){e.stopPropagation(),r&&r(e)},className:"components-snackbar__action"},n)}))))}));var E=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?v.noop:o,i=Object(O.useReducedMotion)(),u=Object(a.useState)((function(){return new WeakMap})),s=Object(b.a)(u,1)[0],f=Object(y.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=m(p.a.mark((function t(n){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:s.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=m(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:i});n=g()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(a.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(a.createElement)(y.animated.div,{key:n,style:r},Object(a.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(a.createElement)(k,Object(l.a)({},Object(v.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},S=n(80),_=n(117),x=function(){var e=Object(_.a)().isEditor,t=Object(S.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(E,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function R(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?R(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),N=function(){return Object(a.useContext)(C)},T=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,c=void 0===o||o,l=e.context,f=void 0===l?"wc/core":l,p=Object(u.useDispatch)("core/notices"),d=p.createNotice,m=p.removeNotice,b=Object(a.useState)(!1),h=i()(b,2),g=h[0],v=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,P(P({},n),{},{context:n.context||f}))}),[d,f]),O=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;m(e,t)}),[m,f]),j=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,P(P({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(f)}}),[f]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:f,setIsSuppressed:v},k=g?null:React.createElement(s.a,{className:r,notices:w.notices}),E=g?null:React.createElement(x,null);return React.createElement(C.Provider,{value:w},c&&k,t,E)}},,,,,,,function(e,t){!function(){e.exports=this.wp.wordcount}()},,,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(9),o=n.n(r),c=n(15),i=n(13),a=n(0),u=n(59),s=n(7),l=n(37),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e])]},p=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(i.useSelect)((function(r){return r(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e])]},d=function(e,t){var n=Object(u.a)(),r=f(t=t||n),c=o()(r,2),i=c[0],p=c[1],d=Object(l.a)(e),m=Object(a.useRef)(!1);return Object(a.useEffect)((function(){p(Object(s.assign)({},i,d)),m.current=!0}),[d]),m.current?[i,p]:[e,p]}},function(e,t,n){"use strict";var r=n(10),o=n(0),c=n(7);var i=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(i,")"),r}},a=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=a.get(e)||0;return a.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=i((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(29),i=n.n(c),a=n(30),u=n.n(a),s=n(18),l=n.n(s),f=n(31),p=n.n(f),d=n(32),m=n.n(d),b=n(19),h=n.n(b),g=n(6),v=n.n(g),y=n(3);n(127);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 i()(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,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(11),o=n.n(r),c=n(6),i=n.n(c),a=n(0),u=n(45);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,n=e.containers,r=e.getProps,c=void 0===r?function(){}:r,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),i=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:f})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})},m=function(e){var t=document.body.querySelectorAll(f.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,c=n.getErrorBoundaryProps,i=n.selector,a=n.wrapper.querySelectorAll(i),p({Block:r,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t){},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(13),c=n(0),i=n(85),a=n(37),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(c.useRef)({results:[],isLoading:!0}),b=Object(a.a)(f),h=Object(a.a)(s),g=Object(i.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,b,h],i=o.getCollectionError.apply(o,c);return i&&g(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[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 c}));var r=n(0),o=(n(13),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),c=function(){return Object(r.useContext)(o)}},function(e,t,n){"use strict";var r=n(0),o=n(7),c=n(5),i=n.n(c),a=n(1),u=n(76),s=n(10),l=n(27);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(12);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(25),j=n(47),w=n(49),k=n(82),E=n.n(k),S=n(26),_=n(22),x=function(){return"rtl"===document.documentElement.dir};function R(e,t,n,r){var o=t.width;"left"===n&&x()?n="right":"right"===n&&x()&&(n="left");var c,i=Math.round(e.left+e.width/2),a={popoverLeft:i,contentWidth:(i-o/2>0?o/2:i)+(i+o/2>window.innerWidth?window.innerWidth-i:o/2)},u="middle"===r?e.left:i,s={popoverLeft:u,contentWidth:u-o>0?o:u},l="middle"===r?e.right:i,f={popoverLeft:l,contentWidth:l+o>window.innerWidth?window.innerWidth-l:o},p=null;if("center"===n&&a.contentWidth===o)c="center";else if("left"===n&&s.contentWidth===o)c="left";else if("right"===n&&f.contentWidth===o)c="right";else{var d="left"===(c=s.contentWidth>f.contentWidth?"left":"right")?s.contentWidth:f.contentWidth;p=d!==o?d:null}return{xAxis:c,popoverLeft:"center"===c?a.popoverLeft:"left"===c?s.popoverLeft:f.popoverLeft,contentWidth:p}}function P(e,t,n){var r,o=t.height,c=e.top+e.height/2,i={popoverTop:c,contentHeight:(c-o/2>0?o/2:c)+(c+o/2>window.innerHeight?window.innerHeight-c:o/2)},a={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&&i.contentHeight===o)r="middle";else if("top"===n&&a.contentHeight===o)r="top";else if("bottom"===n&&u.contentHeight===o)r="bottom";else{var l="top"===(r=a.contentHeight>u.contentHeight?"top":"bottom")?a.contentHeight:u.contentHeight;s=l!==o?l:null}return{yAxis:r,popoverTop:"middle"===r?i.popoverTop:"top"===r?a.popoverTop:u.popoverTop,contentHeight:s}}var C=n(35),N=Object(r.createContext)({focusHistory:[]}),T=N.Provider,A=N.Consumer;T.displayName="FocusReturnProvider",A.displayName="FocusReturnConsumer";r.Component;var F=Object(S.createHigherOrderComponent)((function e(t){if((c=t)instanceof r.Component||"function"==typeof c){var n=t;return e({})(n)}var c,i=t.onFocusReturn,a=void 0===i?o.stubTrue:i;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!==a())for(var r,c=[].concat(Object(C.a)(o.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(C.a)(n)))),[e]);r=c.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)(A,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn"),M=Object(S.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"),I=["button","submit"];var B=Object(S.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)(I,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 D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,o=e.className,c=void 0===o?"lockscroll":o,i=0,a=0;function u(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](c),n.documentElement.classList[r](c),e||(t.scrollTop=a)}function s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}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 L(e){e.stopPropagation()}var V=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:L}),n)})),z=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),q=z.Provider,H=z.Consumer,W=(r.Component,0);function U(e){var t=e.name,n=e.children,c=e.registerFill,i=e.unregisterFill,a=function(e){var t=Object(r.useContext)(z),n=t.getSlot,o=t.subscribe,c=Object(r.useState)(n(e)),i=Object(O.a)(c,2),a=i[0],u=i[1];return Object(r.useEffect)((function(){return u(n(e)),o((function(){u(n(e))}))}),[e]),a}(t),u=Object(r.useRef)({name:t,children:n});return u.current.occurrence||(u.current.occurrence=++W),Object(r.useLayoutEffect)((function(){return c(t,u.current),function(){return i(t,u.current)}}),[]),Object(r.useLayoutEffect)((function(){u.current.children=n,a&&!a.props.bubblesVirtually&&a.forceUpdate()}),[n]),Object(r.useLayoutEffect)((function(){t!==u.current.name&&(i(u.current.name,u.current),u.current.name=t,c(t,u.current))}),[t]),a&&a.node&&a.props.bubblesVirtually?(Object(o.isFunction)(n)&&(n=n(a.props.fillProps)),Object(r.createPortal)(n,a.node)):null}var K=function(e){return Object(r.createElement)(H,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(U,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,c=e.bubblesVirtually,i=void 0!==c&&c,a=e.fillProps,u=void 0===a?{}:a,s=e.getFills,l=e.className;if(i)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 c="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:c})}))})).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)(H,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,c=t.getFills;return Object(r.createElement)(Q,Object(s.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:c}))}))},G=n(40);var $=function(e){var t=e.type,n=e.options,r=void 0===n?{}:n,o=e.children;if("appear"===t){var c,a=r.origin,u=(void 0===a?"top":a).split(" "),s=Object(O.a)(u,2),l=s[0],f=s[1],p=void 0===f?"center":f;return o({className:i()("components-animate__appear",(c={},Object(G.a)(c,"is-from-"+p,"center"!==p),Object(G.a)(c,"is-from-"+l,"middle"!==l),c))})}if("slide-in"===t){var d=r.origin,m=void 0===d?"left":d;return o({className:i()("components-animate__slide-in","is-from-"+m)})}return o("loading"===t?{className:i()("components-animate__loading")}:{})},J=M(F((function(e){return e.children})));function Z(e,t){var n=window.getComputedStyle(t),r=n.paddingTop,o=n.paddingBottom,c=n.paddingLeft,i=n.paddingRight,a=r?parseInt(r,10):0,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=i?parseInt(i,10):0;return{x:e.left+s,y:e.top+a,width:e.width-s-l,height:e.height-a-u,left:e.left+s,right:e.right-l,top:e.top+a,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,c=e.children,a=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,x=e.getAnchorRect,C=e.expandOnMobile,N=e.animate,T=void 0===N||N,A=e.onClickOutside,F=e.onFocusOutside,M=Object(l.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorVerticalBuffer","anchorHorizontalBuffer","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside"]),I=Object(r.useRef)(null),L=Object(r.useRef)(null),z=Object(r.useRef)(),q=Object(r.useRef)(),W=Object(S.useViewportMatch)("medium","<"),U=Object(r.useState)(),Q=Object(O.a)(U,2),Y=Q[0],G=Q[1],ne=C&&W;f=ne||f,Object(r.useEffect)((function(){var e=z.current,t=L.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 c=r.getBoundingClientRect();return o?c:Z(c,r)}if(e.current){var i=e.current.parentNode,a=i.getBoundingClientRect();return o?a:Z(a,i)}}(I,k,x,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),c=o[0],i=o[1],a=void 0===i?"center":i,u=P(e,t,c),s=R(e,t,a,u.yAxis);return Object(_.a)({},s,u)}(n,q.current,d),o=r.popoverTop,c=r.popoverLeft,i=r.xAxis,a=r.yAxis,u=r.contentHeight,s=r.contentWidth;te(e,"is-without-arrow",f||"center"===i&&"middle"===a),X(e,"data-x-axis",i),X(e,"data-y-axis",a),ee(e,"top","number"==typeof o?o+"px":""),ee(e,"left","number"==typeof c?c+"px":""),ee(t,"maxHeight","number"==typeof u?u+"px":""),ee(t,"maxWidth","number"==typeof s?s+"px":"");G(({left:"right",right:"left"}[i]||"center")+" "+({top:"bottom",bottom:"top"}[a]||"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,x,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,L);var re=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)};var oe=Object(r.createElement)(B,{onFocusOutside:function(e){if(F)F(e);else if(A){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"}),A(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)(V,Object(s.a)({className:i()("components-popover",a,o,{"is-expanded":ne,"is-without-arrow":f})},M,{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)(ae,{className:"components-popover__close",icon:"no-alt",onClick:n})),Object(r.createElement)("div",{ref:L,className:"components-popover__content",tabIndex:"-1"},c))})));return b&&(oe=Object(r.createElement)(J,null,oe)),Object(r.createElement)(H,null,(function(e){var t=e.getSlot;return t&&t("Popover")&&(oe=Object(r.createElement)(K,{name:"Popover"},oe)),Object(r.createElement)("span",{ref:I},oe,W&&C&&Object(r.createElement)(D,null))}))};ne.Slot=function(){return Object(r.createElement)(Y,{bubblesVirtually:!0,name:"Popover"})};var re=ne;var oe=function(e){var t,n,c=e.shortcut,i=e.className;return c?(Object(o.isString)(c)&&(t=c),Object(o.isObject)(c)&&(t=c.display,n=c.ariaLabel),Object(r.createElement)("span",{className:i,"aria-label":n},t)):null},ce=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 c=Object(o.includes)(["focus","mouseenter"],r.type);c!==n.state.isOver&&(t?n.delayedSetIsOver(c):n.setState({isOver:c}))}}}},{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,c=e.shortcut;if(1!==r.Children.count(t))return t;var i=r.Children.only(t),a=this.state.isOver;return Object(r.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(r.concatChildren)(i.props.children,a&&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:c})))})}}]),t}(r.Component),ie=n(75);var ae=Object(r.forwardRef)((function(e,t){var n=e.icon,c=e.children,a=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=i()("components-icon-button",f,{"has-text":c}),v=p||a,y=!h.disabled&&(p||d||!!a&&(!c||Object(o.isArray)(c)&&!c.length)&&!1!==p),O=Object(r.createElement)(u.a,Object(s.a)({"aria-label":a},h,{className:g,ref:t}),Object(r.createElement)(ie.a,{icon:n,size:b}),c);return y&&(O=Object(r.createElement)(ce,{text:v,shortcut:d,position:m},O)),O}));t.a=function(e){var t=e.className,n=e.status,c=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=i()(t,"components-notice","is-"+n,{"is-dismissible":p});return b&&(c=Object(r.createElement)(r.RawHTML,null,c)),Object(r.createElement)("div",{className:h},Object(r.createElement)("div",{className:"components-notice__content"},c,m.map((function(e,t){var n=e.className,o=e.label,c=e.noDefaultClasses,a=void 0!==c&&c,s=e.onClick,l=e.url;return Object(r.createElement)(u.a,{key:t,href:l,isDefault:!a&&!l,isLink:!a&&!!l,onClick:l?void 0:s,className:i()("components-notice__action",n)},o)}))),p&&Object(r.createElement)(ae,{className:"components-notice__dismiss",icon:"no-alt",label:Object(a.__)("Dismiss this notice"),onClick:l,tooltip:!1}))}},,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(50),u=function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(6),o=n.n(r),c=n(14),i=n.n(c),a=n(3);n(4);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(2),c=n(15),i=n(13);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,i=r.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,,function(e,t,n){"use strict";n(4);var r=n(5),o=n.n(r),c=n(33),i=n(99);n(155);t.a=Object(i.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,i=e.label,a=e.onChange,u=e.options,s=e.screenReaderLabel,l=e.readOnly,f=e.value,p="wc-block-components-sort-select__select-".concat(n);return React.createElement("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},React.createElement(c.a,{label:i,screenReaderLabel:s,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),React.createElement("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:r,onChange:a,readOnly:l,value:f},u.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(4),n(5)),i=n.n(c),a=n(118),u=n(88),s=(n(108),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=i()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(a.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",s(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(34),o=n(0),c=n(8);n.p=c.F,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)((function(){return Promise.all([n.e(20),n.e(6)]).then(n.bind(null,297))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return n.e(5).then(n.bind(null,307))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return n.e(13).then(n.bind(null,306))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return n.e(7).then(n.bind(null,298))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return n.e(3).then(n.bind(null,299))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return n.e(11).then(n.bind(null,300))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return n.e(8).then(n.bind(null,284))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return n.e(9).then(n.bind(null,301))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return n.e(4).then(n.bind(null,302))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return n.e(12).then(n.bind(null,303))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return n.e(10).then(n.bind(null,304))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return n.e(2).then(n.bind(null,305))}))});var i=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,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){!function(){e.exports=this.wc.wcSharedHocs}()},function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,,,,,,function(e,t,n){e.exports=n(265)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(128),o=n(88),c=n(107),i=n(29),a=n.n(i),u=n(30),s=n.n(u),l=n(31),f=n.n(l),p=n(32),d=n.n(p),m=n(19),b=n.n(m),h=n(3),g=(n(4),n(9)),v=n.n(g),y=n(0),O=n(24),j=n.n(O),w=n(14),k=n.n(w),E=n(6),S=n.n(E),_=n(1),x=n(7),R=n(5),P=n.n(R),C=n(33),N=(n(209),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,c=e.onPageChange,i=e.totalPages,a=function(e,t,n){if(n<=2)return{minIndex:null,maxIndex:null};var r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}}(o,t,i),u=a.minIndex,s=a.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==i),p=n&&Boolean(u>3),d=n&&Boolean(s<i-2);l&&3===u&&(u-=1),f&&s===i-2&&(s+=1);var 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(C.a,{screenReaderLabel:Object(_.__)("Navigate to another page","woo-gutenberg-products-block")}),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t-1)},title:Object(_.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(C.a,{label:"<",screenReaderLabel:Object(_.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return c(1)},disabled:1===t},React.createElement(C.a,{label:1,screenReaderLabel:Object(_.sprintf)(Object(_.__)("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(_.__)("…","woo-gutenberg-products-block")),m.map((function(e){return React.createElement("button",{key:e,className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return c(e)},disabled:t===e},React.createElement(C.a,{label:e,screenReaderLabel:Object(_.sprintf)(Object(_.__)("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(_.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:P()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===i,"wc-block-components-pagination__page--active":t===i}),onClick:function(){return c(i)},disabled:t===i},React.createElement(C.a,{label:i,screenReaderLabel:Object(_.sprintf)(Object(_.__)("Page %d","woo-gutenberg-products-block"),i)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t+1)},title:Object(_.__)("Next page","woo-gutenberg-products-block"),disabled:t>=i},React.createElement(C.a,{label:">",screenReaderLabel:Object(_.__)("Next page","woo-gutenberg-products-block")})))});N.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var T=N,A=n(136),F=(n(208),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(A.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(_.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(_.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(_.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(_.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(_.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(_.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(_.__)("Order products by","woo-gutenberg-products-block"),value:o})}),M=n(69),I=n(99),B=n(11),D=n.n(B),L=n(145),V=Object(I.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,c=Object(M.useInnerBlockLayoutContext)(),i=c.parentClassName,a=c.parentName,u=0===Object.keys(t).length,s=P()("".concat(i,"__product"),"wc-block-layout",{"is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var c=Object(L.a)(t);return r.map((function(r,i){var a=v()(r,2),u=a[0],s=a[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=c[u];if(!p)return null;var d=n.id||0,m=["layout",u,i,o,d];return React.createElement(y.Suspense,{key:m.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,D()({},l,{children:f,product:n})))}))}}(a,t,o,r))})),z=n(98),q=n(113),H=n(15),W=n(13),U=n(37);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){S()(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,c=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,c=void 0===o?[]:o,i=t.query,a=void 0===i?{}:i;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var u=Object(U.a)(a),s=Object(U.a)(c),l=Object(W.useSelect)((function(t){var o=t(H.COLLECTIONS_STORE_KEY),c=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,c),isLoading:o.hasFinishedResolution("getCollectionHeader",c)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",Q(Q({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(c,10),productsLoading:o}},G=n(184),$=n(101),J=n(44),Z=(n(207),n(126)),X=n(50),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(M.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement(Z.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(_.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(_.__)("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(M.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement(Z.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ne,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(_.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(_.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(_.__)("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 ce(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){S()(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 ie=Object($.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,c=e.sortValue,i=e.scrollToTop,a=Object(z.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,c=r.rows;return ce(ce({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:o*c,page:n})}({attributes:t,sortValue:c,currentPage:n})),u=v()(a,1)[0],s=Y(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(M.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),S=E[0],R=E[1],C=Object(z.b)("max_price"),N=v()(C,2),A=N[0],I=N[1],B=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(x.isEqual)(t,o)&&Number.isFinite(n)})),D="object"===j()(B)&&Object(x.isEqual)(m,B.totalQuery);Object(y.useEffect)((function(){D||(r(1),B&&function(e){Number.isFinite(e)&&(0===e?Object(J.speak)(Object(_.__)("No products found","woo-gutenberg-products-block")):Object(J.speak)(Object(_.sprintf)(Object(_._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[u]);var L,q,H,W,U,K=t.contentVisibility,Q=t.columns*t.rows,$=!Number.isFinite(f)&&D?Math.ceil(B.totalProducts/Q):Math.ceil(f/Q),Z=l.length?l:Array.from({length:Q}),X=0!==l.length||p,ee=g.length>0||Number.isFinite(S)||Number.isFinite(A);return React.createElement("div",{className:(L=t.columns,q=t.rows,H=t.alignButtons,W=t.align,U=void 0!==W?"align"+W:"",P()(d,U,"has-"+L+"-columns",{"has-multiple-rows":q>1,"has-aligned-buttons":H}))},K.orderBy&&X&&React.createElement(F,{onChange:o,value:c}),!X&&ee&&React.createElement(re,{resetCallback:function(){O([]),R(null),I(null)}}),!X&&!ee&&React.createElement(te,null),X&&React.createElement("ul",{className:"".concat(d,"__products")},Z.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(V,{key:e.id||n,attributes:t,product:e})}))),$>1&&React.createElement(T,{currentPage:n,onPageChange:function(e){i({focusableSelector:"a, button"}),r(e)},totalPages:$}))})),ae=function(e){var t=e.attributes,n=Object(y.useState)(1),r=v()(n,2),o=r[0],c=r[1],i=Object(y.useState)(t.orderby),a=v()(i,2),u=a[0],s=a[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return React.createElement(ie,{attributes:t,currentPage:o,onPageChange:function(e){c(e)},onSortChange:function(e){var t=e.target.value;s(t),c(1)},sortValue:u})},ue=n(8),se=React.createElement("img",{src:ue.E+"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 a()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.urlParameterSuffix;return t.isPreview?se:React.createElement(M.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ae,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(c.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(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', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '995d5d9794da97b1dcac099d5ab317b0');
1
+ <?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-url', 'wp-viewport', 'wp-wordcount'), 'version' => '70bf694d9609f18075af81550bf1df46');
build/all-products.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-products"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],b=0,p=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==c[s]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5:0,2:0,3:0,8:0,9:0,11:0,12:0,13:0,14:0,15:0,16:0},o=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({1:"atomic-block-components/add-to-cart~atomic-block-components/image~atomic-block-components/title",2:"atomic-block-components/add-to-cart~atomic-block-components/button",3:"atomic-block-components/sale-badge",7:"atomic-block-components/add-to-cart",8:"atomic-block-components/button",9:"atomic-block-components/category-list",10:"atomic-block-components/image",11:"atomic-block-components/price",12:"atomic-block-components/rating",13:"atomic-block-components/sku",14:"atomic-block-components/stock-indicator",15:"atomic-block-components/summary",16:"atomic-block-components/tag-list",17:"atomic-block-components/title"}[e]||e)+".js"}(e);var s=new Error;o=function(t){i.onerror=i.onload=null,clearTimeout(u);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,r[1](s)}c[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:i})}),12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=s;return o.push([839,0]),r()}({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 o}));var n=r(0),c=Object(n.createContext)("page"),o=function(){return Object(n.useContext)(c)};c.Provider},108:function(e,t){},109:function(e,t){},110:function(e,t){},111:function(e,t){},112:function(e,t){},113:function(e,t){},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},120:function(e,t){},121:function(e,t){},122:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(41),c=r(36),o=r(211),a=r(33),i=r(6),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(o.b)(),r=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},b=e.shouldSelect,p=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!b)return s;if(r)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 o=e(n.CART_STORE_KEY),u=o.getCartData(),p=o.getCartErrors(),d=o.getCartTotals(),f=!o.hasFinishedResolution("getCartData"),m=o.areShippingRatesLoading(),O=c(n.CART_STORE_KEY).receiveCart,g=Object(i.mapValues)(u.shippingAddress,(function(e){return Object(a.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:d,cartIsLoading:f,cartErrors:p,shippingAddress:g,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!g.country,receiveCart:O}}),[b]);return p}},135:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(61),a=r(167),i=r(3),s=r(14),u=r(44);t.a=function(e){var t=(Object(u.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(n.createElement)("a",{href:"".concat(i.ADMIN_URL,"post.php?post=").concat(t,"&action=edit"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Edit this product's details","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:a.a,size:16}))),Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(c.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},140:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(8),c=r.n(n),o=r(190),a=r(0);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),b=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return s(s(s({notices:t},l),b),{},{setIsSuppressed:i})}},142:function(e,t){!function(){e.exports=this.wp.wordcount}()},143:function(e,t,r){"use strict";var n=r(51),c=r.n(n),o=r(10),a=r.n(o),i=r(0),s=r(1),u=r(6),l=(r(2),r(50)),b=r(4),p=r(7),d=r.n(p),f=r(21),m=r.n(f),O=r(24),g=r.n(O),j=r(22),h=r.n(j),v=r(23),y=r.n(v),w=r(12),E=r.n(w),_=r(25);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var P=Object(_.createHigherOrderComponent)((function(e){var t=function(t){h()(n,t);var r=k(n);function n(){return m()(this,n),r.apply(this,arguments)}return g()(n,[{key:"render",value:function(){var t=this.props.selected;return Object(i.createElement)(e,a()({},this.props,{selected:Object(u.isNil)(t)?[]:[t]}))}}]),n}(i.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),C=r(301),S=r(15),N=r.n(S),x=r(37),D=r.n(x),B=r(19),z=r.n(B),R=r(8),T=r.n(R),I=r(46),L=r.n(I),A=r(40),V=r(42);function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){T()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var q=Object(_.createHigherOrderComponent)((function(e){var t=function(t){h()(n,t);var r=H(n);function n(){var e;m()(this,n);for(var t=arguments.length,c=new Array(t),o=0;o<t;o++)c[o]=arguments[o];return e=r.call.apply(r,[this].concat(c)),T()(z()(e),"state",{error:null,loading:!1,variations:{}}),T()(z()(e),"loadVariations",(function(){var t=e.props.products,r=e.state,n=r.loading,c=r.variations;if(!n){var o=e.getExpandedProduct();if(o&&!c[o]){var a=t.find((function(e){return e.id===o}));a.variations&&0!==a.variations.length?(e.setState({loading:!0}),Object(A.g)(o).then((function(t){var r=t.map((function(e){return M(M({},e),{},{parent:o})}));e.setState({variations:M(M({},e.state.variations),{},T()({},o,r)),loading:!1,error:null})})).catch(function(){var t=D()(N.a.mark((function t(r){var n;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(V.a)(r);case 2:n=t.sent,e.setState({variations:M(M({},e.state.variations),{},T()({},o,null)),loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({variations:M(M({},e.state.variations),{},T()({},o,null)),loading:!1,error:null})}}})),e}return g()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.selected,r=e.showVariations;t&&r&&this.loadVariations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isLoading,n=t.selected;t.showVariations&&(!L()(e.selected,n)||e.isLoading&&!r)&&this.loadVariations()}},{key:"isProductId",value:function(e){return this.props.products.some((function(t){return t.id===e}))}},{key:"findParentProduct",value:function(e){return this.props.products.filter((function(t){return t.variations&&t.variations.find((function(t){return t.id===e}))}))[0].id}},{key:"getExpandedProduct",value:function(){var e=this.props,t=e.isLoading,r=e.selected;if(!e.showVariations)return null;var n=r&&r.length?r[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(t||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!t&&n?this.isProductId(n)?n:this.findParentProduct(n):null}},{key:"render",value:function(){var t=this.props,r=t.error,n=t.isLoading,c=this.state,o=c.error,s=c.loading,u=c.variations;return Object(i.createElement)(e,a()({},this.props,{error:o||r,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:u,variationsLoading:s}))}}]),n}(i.Component);return T()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),W=r(61),U=r(58),Q=Object(i.createElement)(U.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),Y=Object(i.createElement)(U.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),G=r(49);r(199);function K(e,t){if(!t)return e;var r=new RegExp(Object(u.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var X=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(i.createElement)(W.a,{srcElement:Q}):Object(i.createElement)(W.a,{srcElement:Y})},$={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},J=function(e){var t=e.expandedProduct,r=e.error,n=e.isLoading,o=e.onChange,p=e.onSearch,f=e.products,m=e.renderItem,O=e.selected,g=e.showVariations,j=e.variations,h=e.variationsLoading,v=function(e){var r=e.item,n=e.search,c=e.depth,o=void 0===c?0:c,p=e.isSelected,f=e.onSelect,m=r.variations&&Array.isArray(r.variations)?r.variations.length:0,O=d()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":n.length>0,"is-skip-level":0===o&&0!==r.parent,"is-variable":m>0}),g=Object.assign({},e);delete g.isSingle;var j={role:"menuitemradio"};return r.breadcrumbs.length&&(j["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),m&&(j["aria-expanded"]=r.id===t),r.breadcrumbs.length?(Object(u.isEmpty)(r.variation)||(r.name=r.variation),Object(i.createElement)(l.b,a()({className:O},e,j))):[Object(i.createElement)(b.MenuItem,a()({key:"product-".concat(r.id),isSelected:p},g,j,{className:O,onClick:function(){f(r)()}}),Object(i.createElement)("span",{className:"woocommerce-search-list__item-state"},X(p)),Object(i.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(i.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:K(r.name,n)}})),m?Object(i.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(s.sprintf)(Object(s._n)("%d variation","%d variations",m,"woo-gutenberg-products-block"),m)):null),t===r.id&&m>0&&h&&Object(i.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(i.createElement)(b.Spinner,null))]};if(r)return Object(i.createElement)(G.a,{error:r});var y=j&&j[t]?j[t]:[],w=[].concat(c()(f),c()(y));return Object(i.createElement)(l.a,{className:"woocommerce-products",list:w,isLoading:n,isSingle:!0,selected:w.filter((function(e){var t=e.id;return O.includes(t)})),onChange:o,renderItem:m||(g?v:null),onSearch:p,messages:$,isHierarchical:!0})};J.defaultProps={expandedProduct:null,selected:[],showVariations:!1};t.a=P(Object(C.a)(q(J)))},144:function(e,t,r){"use strict";var n=r(0),c=r(58),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},149:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(48),i=r(192);r(201);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,s=e.onChange,u=e.options,l=e.screenReaderLabel,b=e.readOnly,p=e.value,d="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.a,{label:i,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:c,onChange:s,readOnly:b,value:p},u.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},15:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(8),c=r.n(n),o=r(6);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:s,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case s:return b.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,b));case u:return b.delete(o),i(i({},e),{},c()({},n,b))}return e}},152:function(e,t,r){"use strict";var n=r(21),c=r.n(n),o=r(24),a=r.n(o),i=r(22),s=r.n(i),u=r(23),l=r.n(u),b=r(12),p=r.n(b),d=r(0),f=r(6),m=r(1),O=r(4);function g(e){var t=e.level,r={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return r.hasOwnProperty(t)?Object(d.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(O.Path,{d:r[t]})):null}function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p()(e);if(t){var c=p()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return l()(this,r)}}var h=function(e){s()(r,e);var t=j(r);function r(){return c()(this,r),t.apply(this,arguments)}return a()(r,[{key:"createLevelControl",value:function(e,t,r){var n=e===t;return{icon:Object(d.createElement)(g,{level:e}),title:Object(m.sprintf)(Object(m.__)("Heading %d"),e),isActive:n,onClick:function(){return r(e)}}}},{key:"render",value:function(){var e=this,t=this.props,r=t.isCollapsed,n=void 0===r||r,c=t.minLevel,o=t.maxLevel,a=t.selectedLevel,i=t.onChange;return Object(d.createElement)(O.Toolbar,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=h},155: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}))}}},164:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=r(1),i=r(56),s=r(7),u=r.n(s),l=(r(2),r(236),function(e){var t=e.className,r=e.currency,n=e.maxPrice,c=e.minPrice,a=e.priceClassName,s=e.priceStyle;return Object(o.createElement)("span",{className:t},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:c,style:s})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:n,style:s}))}),b=function(e){var t=e.className,r=e.currency,n=e.regularPriceClassName,c=e.regularPriceStyle,s=e.regularPrice,l=e.priceClassName,b=e.priceStyle,p=e.price;return Object(o.createElement)("span",{className:t},Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",n),style:c},e)},value:s}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",l),style:b},e)},value:p}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.maxPrice,s=void 0===a?null:a,p=e.minPrice,d=void 0===p?null:p,f=e.price,m=void 0===f?null:f,O=e.priceClassName,g=e.priceStyle,j=e.regularPrice,h=e.regularPriceClassName,v=e.regularPriceStyle,y=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return j&&m!==j?Object(o.createElement)(b,{className:y,currency:n,price:m,priceClassName:O,priceStyle:g,regularPrice:j,regularPriceClassName:h,regularPriceStyle:v}):null!==d&&null!==s?Object(o.createElement)(l,{className:y,currency:n,maxPrice:s,minPrice:d,priceClassName:O,priceStyle:g}):null!==m?Object(o.createElement)("span",{className:y},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",O),currency:n,value:m,style:g})):Object(o.createElement)("span",{className:y},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",O)}))}},167:function(e,t,r){"use strict";var n=r(0),c=r(58),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},17:function(e,t){!function(){e.exports=this.wp.blocks}()},171: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),s=r(102),u=r(6),l=r(60),b=function(e){var t=Object(s.a)();e=e||t;var r=Object(a.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(i.useCallback)((function(t){n(e,t)}),[e])]},p=function(e,t,r){var n=Object(s.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){u(r,e,t)}),[r,e])]},d=function(e,t){var r=Object(s.a)(),n=b(t=t||r),o=c()(n,2),a=o[0],p=o[1],d=Object(l.a)(e),f=Object(i.useRef)(!1);return Object(i.useEffect)((function(){p(Object(u.assign)({},a,d)),f.current=!0}),[d]),f.current?[a,p]:[e,p]}},175: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.T+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},176:function(e,t,r){"use strict";var n=r(0),c=r(142),o=r(95),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;",n=i(e),c=n.split(" ").splice(0,t).join(" ");return Object(o.autop)(s(c,r))},l=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;",c=i(e),a=c.slice(0,t);if(r)return Object(o.autop)(s(a,n));var u=a.match(/([\s]+)/g),l=u?u.length:0,b=c.slice(0,t+l);return Object(o.autop)(s(b,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,b=void 0===s?"words":s,p=e.className,d=void 0===p?"":p,f=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),b=Object(c.count)(s,r);return b<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,b)}),[t,i,b]);return Object(n.createElement)(n.RawHTML,{className:d},f)}},18:function(e,t){!function(){e.exports=this.wp.url}()},184:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(24),s=r.n(i),u=r(19),l=r.n(u),b=r(22),p=r.n(b),d=r(23),f=r.n(d),m=r(12),O=r.n(m),g=r(8),j=r.n(g),h=r(0),v=r(9);r(259);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=y(n);function n(){var e;return a()(this,n),e=r.call(this),j()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(l()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(v.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(h.createElement)(v.Fragment,null,Object(h.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(h.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),n}(v.Component);return t.displayName="withScrollToTop",t}},190:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return j}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=(r(2),r(36)),u=r(302),l=r(944),b=r(140),p=r(211),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),r=t.notices,n=t.removeNotice;if(e)return null;var c=r.filter((function(e){return"snackbar"===e.type}));return Object(i.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:n})};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(i.useContext)(O)},j=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(s.useDispatch)("core/notices"),f=p.createNotice,g=p.removeNotice,j=Object(i.useState)(!1),h=a()(j,2),v=h[0],y=h[1],w=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(e,t,m(m({},r),{},{context:r.context||b}))}),[f,b]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;g(e,t)}),[g,b]),_=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w("default",e,m(m({},t),{},{type:"snackbar"}))}),[w]),k={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:w,createSnackbarNotice:_,removeNotice:E,context:b,setIsSuppressed:y},P=v?null:Object(i.createElement)(u.a,{className:n,notices:k.notices}),C=v?null:Object(i.createElement)(d,null);return Object(i.createElement)(O.Provider,{value:k},o&&P,t,C)}},193:function(e,t){},199:function(e,t){},201:function(e,t){},206:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(41),c=r(36),o=r(0),a=r(155),i=r(60),s=function(e){var t=e.namespace,r=e.resourceName,s=e.resourceValues,u=void 0===s?[]:s,l=e.query,b=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),m=Object(i.a)(b),O=Object(i.a)(u),g=Object(a.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,m,O],a=c.getCollectionError.apply(c,o);return a&&g(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,O,m,d]);return null!==j&&(f.current=j),f.current}},211: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,s=void 0===i?{}:i,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:s};return Object(n.createElement)(o.Provider,{value:u},t)}},232:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(86),o=(r(2),r(239),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,i=e.elementId,s=void 0===i?"":i,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var p=l(a)||{};if(!p.message||p.hidden)return null;r=p.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(s)},r))})},236:function(e,t){},237:function(e,t){},238:function(e,t){},239:function(e,t){},25:function(e,t){!function(){e.exports=this.wp.compose}()},258:function(e,t,r){"use strict";r.d(t,"c",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m}));var n=r(8),c=r.n(n),o=r(53),a=r.n(o),i=r(3);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,b,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,b=i.CURRENCY.symbolPosition,{left:l,left_space:" "+l,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,s=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 s?s:""}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},p),e)},m=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=f(t),c=r/Math.pow(10,n.minorUnit),o=n.prefix+c+n.suffix,a=document.createElement("textarea");return a.innerHTML=o,a.value}},259:function(e,t){},266:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),s=r.n(i),u=r(48),l=r(44),b=r(73);r(553);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)().product;if(!i.id||!i.on_sale)return null;var b="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(o.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,b,c()({},"".concat(n,"__product-onsale"),n))},Object(o.createElement)(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},267:function(e,t){!function(){e.exports=this.wp.deprecated}()},268:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(58),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]);return Object(i.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=r(283);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},283:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(58),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},301:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(15),a=r.n(o),i=r(37),s=r.n(i),u=r(21),l=r.n(u),b=r(24),p=r.n(b),d=r(19),f=r.n(d),m=r(22),O=r.n(m),g=r(23),j=r.n(g),h=r(12),v=r.n(h),y=r(0),w=r(6),E=r(25),_=(r(2),r(5)),k=r(40),P=r(42);function C(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=v()(e);if(t){var c=v()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return j()(this,r)}}var S=Object(E.createHigherOrderComponent)((function(e){var t=function(t){O()(o,t);var r,n=C(o);function o(){var e;return l()(this,o),(e=n.apply(this,arguments)).state={list:[],loading:!0},e.setError=e.setError.bind(f()(e)),e.debouncedOnSearch=Object(w.debounce)(e.onSearch.bind(f()(e)),400),e}return p()(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(k.h)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(k.h)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"setError",value:(r=s()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)(t);case 2:r=e.sent,this.setState({list:[],loading:!1,error:r});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.error,o=r.list,a=r.loading;return Object(y.createElement)(e,c()({},this.props,{error:n,products:o,isLoading:a,onSearch:_.u?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),o}(y.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=S},302:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(389),u=r(190),l=(r(237),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,r=e.notices,n=Object(u.b)().removeNotice,a=r.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=i()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))}},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},35:function(e,t){!function(){e.exports=this.moment}()},36:function(e,t){!function(){e.exports=this.wp.data}()},361:function(e,t,r){"use strict";var n=r(0),c=r(58),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},390:function(e,t){},391:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(5);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.W)()&&(s=i(i({},s),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=s},392:function(e,t,r){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},393:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=(r(2),r(7)),u=r.n(s),l=r(5),b=r(44),p=r(73),d=r(6),f=r(266);r(554);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var g=function(){return Object(i.createElement)("img",{src:l.F,alt:"",width:500,height:500})},j=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,o=t||{},a=o.thumbnail,s=o.src,u=o.srcset,l=o.sizes,b={alt:o.alt,onLoad:r,hidden:!n,src:a};return c&&(b=O(O({},b),{},{src:s,srcSet:u,sizes:l})),Object(i.createElement)(i.Fragment,null,Object(i.createElement)("img",b),!n&&Object(i.createElement)(g,null))};t.a=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,o=e.productLink,s=void 0===o||o,l=e.showSaleBadge,p=e.saleBadgeAlign,m=void 0===p?"right":p,O=Object(b.useInnerBlockLayoutContext)().parentClassName,h=Object(b.useProductDataContext)().product,v=Object(i.useState)(!1),y=a()(v,2),w=y[0],E=y[1];if(!h.id)return Object(i.createElement)("div",{className:u()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",c()({},"".concat(O,"__product-image"),O))},Object(i.createElement)(g,null));var _=Object(d.isEmpty)(h.images)?null:h.images[0];return Object(i.createElement)("div",{className:u()(t,"wc-block-components-product-image",c()({},"".concat(O,"__product-image"),O))},s?Object(i.createElement)("a",{href:h.permalink,rel:"nofollow"},!!l&&Object(i.createElement)(f.default,{align:m,product:h}),Object(i.createElement)(j,{image:_,onLoad:function(){return E(!0)},loaded:w,showFullSize:"cropped"!==n})):Object(i.createElement)(i.Fragment,null,!!l&&Object(i.createElement)(f.default,{align:m,product:h}),Object(i.createElement)(j,{image:_,onLoad:function(){return E(!0)},loaded:w,showFullSize:"cropped"!==n})))}))},394:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},i=function(e){return n(e,c.ERROR)},s=function(e){return n(e,c.FAIL)},u=function(){return{responseTypes:c,noticeContexts:o,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},395:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(150),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},396:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d}));var n=r(15),c=r.n(n),o=r(53),a=r.n(o),i=r(37),s=r.n(i);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=[],s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(n));case 10:d=e.sent,"object"===a()(d)&&i.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=!0,s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=24;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(n));case 10:if(d=e.sent,"object"!==a()(d)||void 0!==d.type){e.next=13;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 13:if(!0===(i="object"!==a()(d)||d)){e.next=16;break}return e.abrupt("return",i);case 16:e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(7),console.error(e.t0),e.abrupt("return",{type:"error"});case 22:e.next=5;break;case 24:e.next=29;break;case 26:e.prev=26,e.t1=e.catch(3),s.e(e.t1);case 29:return e.prev=29,s.f(),e.finish(29);case 32:return e.abrupt("return",i);case 33:case"end":return e.stop()}}),e,null,[[3,26,29,32],[7,18]])})));return function(t,r,n){return e.apply(this,arguments)}}()},397:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},398:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(86),i=r(11),s=r.n(i),u=r(1),l=r(60),b=r(140),p=r(394),d=r(929),f="pristine",m="idle",O="disabled",g="processing",j="before_processing",h="after_processing",v={status:f,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},y="set_pristine",w="set_idle",E="set_disabled",_="set_processing",k="set_before_processing",P="set_after_processing",C="set_processing_response",S="set_has_error",N="set_no_error",x="set_quantity",D="set_request_params",B=y,z=w,R=E,T=_,I=k,L=P,A=C,V=S,F=N,M=x,H=D,q=function(){return{type:B}},W=function(){return{type:z}},U=function(){return{type:R}},Q=function(){return{type:T}},Y=function(){return{type:I}},G=function(){return{type:L}},K=function(e){return{type:A,data:e}},X=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?V:F;return{type:t}},$=function(e){return{type:M,quantity:e}},J=function(e){return{type:H,data:e}},Z=r(8),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=y,ce=w,oe=E,ae=_,ie=k,se=P,ue=C,le=S,be=N,pe=x,de=D,fe=f,me=m,Oe=O,ge=g,je=j,he=h,ve=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case ne:e=v;break;case ce:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case oe:e=t.status!==Oe?re(re({},t),{},{status:Oe}):t;break;case pe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case de:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),o)});break;case ue:e=re(re({},t),{},{processingResponse:o});break;case ae:e=!1===(e=t.status!==ge?re(re({},t),{},{status:ge,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case ie:e=t.status!==je?re(re({},t),{},{status:je,hasError:!1}):t;break;case se:e=t.status!==he?re(re({},t),{},{status:he}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===ge||t.status===je?re(re({},e),{},{status:me}):e;break;case be:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&c!==ne&&e.status===fe&&(e.status=me),e},ye=r(150),we=r(395),Ee="add_to_cart_before_processing",_e="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",Pe=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(we.a)(_e,e),onAddToCartProcessingWithError:Object(we.a)(ke,e),onAddToCartBeforeProcessing:Object(we.a)(Ee,e)}},Ce=r(396),Se=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ne=function(){return Object(n.useContext)(Se)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ve,v),i=s()(o,2),f=i[0],y=i[1],w=Object(n.useReducer)(ye.b,{}),E=s()(w,2),_=E[0],k=E[1],P=Object(l.a)(_),C=Object(b.a)(),S=C.addErrorNotice,N=C.removeNotices,x=Object(a.b)().setValidationErrors,D=Object(p.a)(),B=D.isSuccessResponse,z=D.isErrorResponse,R=D.isFailResponse,T=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Pe(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Pe(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Pe(k).onAddToCartBeforeProcessing}}),[k]),I=Object(n.useMemo)((function(){return{resetForm:function(){y(q())},submitForm:function(){y(Y())},setQuantity:function(e){y($(e))},setHasError:function(e){y(X(e))},setRequestParams:function(e){y(J(e))},setAfterProcessing:function(e){y(K(e)),y(G())}}}),[]);Object(n.useEffect)((function(){var e=f.status,t=!r.id||!Object(d.a)(r);e!==O||t?e!==O&&t&&y(U()):y(W())}),[f.status,r,y]),Object(n.useEffect)((function(){f.status===j&&(N("error"),Object(Ce.a)(P,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&x(r)})),y(W())):y(Q())})))}),[f.status,x,S,N,y,P]),Object(n.useEffect)((function(){if(f.status===h){var e={processingResponse:f.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;S(e.message,t)}};if(f.hasError)return void Object(Ce.b)(P,ke,e).then((function(r){if(z(r)||R(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");S(c,{id:"add-to-cart"})}y(W())}));Object(Ce.b)(P,_e,e).then((function(e){z(e)||R(e)?(t(e),y(X(!0))):y(W())}))}}),[f.status,f.hasError,f.processingResponse,I,S,z,R,B,P]);var L=Object(d.b)(r),A={product:r,productType:r.type||"simple",productIsPurchasable:Object(d.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:L,showFormElements:c&&L,quantity:f.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:f.requestParams,isIdle:f.status===m,isDisabled:f.status===O,isProcessing:f.status===g,isBeforeProcessing:f.status===j,isAfterProcessing:f.status===h,hasError:f.hasError,eventRegistration:T,dispatchActions:I};return Object(n.createElement)(Se.Provider,{value:A},t)},De=r(13),Be=r.n(De),ze=r(134),Re=r(33),Te=r(536);function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Le=function(){var e=Ne(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,i=e.hasError,l=e.isProcessing,p=e.requestParams,d=Object(a.b)(),f=d.hasValidationErrors,m=d.showAllValidationErrors,O=Object(b.a)(),g=O.addErrorNotice,j=O.removeNotice,h=Object(ze.a)().receiveCart,v=Object(n.useState)(!1),y=s()(v,2),w=y[0],E=y[1],_=!i&&l,k=Object(n.useCallback)((function(){return!f||(m(),{type:"error"})}),[f,m]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var P=Object(n.useCallback)((function(){E(!0),j("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},p);Be()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Be.a.setNonce(e.headers),e.json().then((function(r){e.ok?h(r):(r.body&&r.body.message?g(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):g(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&h(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,g,j,h,t,c,p]);return Object(n.useEffect)((function(){_&&!w&&P()}),[_,P,w]),null},Ae=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(a.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Le,null)))},Ve=r(44),Fe=r(6),Me=r(73),He=(r(390),r(99)),qe=r(61),We=r(563),Ue=r(842),Qe=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(He.a,{className:t,href:r,rel:"nofollow"},c)},Ye=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,i=e.onClick;return Object(n.createElement)(He.a,{className:t,disabled:o,showSpinner:c,onClick:i},a&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(qe.a,{srcElement:We.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},Ge=function(){var e=Ne(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,i=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(Ue.a)(o.id||0).cartQuantity,m=Object(n.useState)(!1),O=s()(m,2),g=O[0],j=O[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return p||j(!0),!0}),0);return function(){e()}}),[b,p]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Ye,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:f,isDisabled:i,isProcessing:l,isDone:g,onClick:function(){return d.submitForm()}}):Object(n.createElement)(Qe,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ke=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(u.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ge,null))},Je=(r(562),r(51)),Ze=r.n(Je),et=r(4),tt=r(9),rt=r(232),nt={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,i=e.value,s=void 0===i?"":i,l=e.onChange,b=void 0===l?function(){}:l,p=e.errorMessage,d=void 0===p?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):p,f=Object(a.b)(),m=f.getValidationError,O=f.setValidationErrors,g=f.clearValidationError,j=t,h=m(j)||{};return Object(tt.useEffect)((function(){s?g(j):O(ee()({},j,{message:d,hidden:!0}))}),[s,j,d,g,O]),Object(tt.useEffect)((function(){return function(){g(j)}}),[j,g]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Re.decodeEntities)(t),value:s||"",options:[nt].concat(Ze()(c)),onChange:b,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),Object(n.createElement)(rt.a,{propertyName:j,elementId:j}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},st=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],i=at(at({},r),{},ee()({},c,null)),s=o?it(e,t,i):null,u=null!==s?s.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Re.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(l.a)(t),a=Object(l.a)(r),i=Object(n.useState)(0),u=s()(i,2),b=u[0],p=u[1],d=Object(n.useState)({}),f=s()(d,2),m=f[0],O=f[1],g=Object(n.useMemo)((function(){return st(o,a,m)}),[m,o,a]);return Object(n.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(o).length?p(function(e,t,r){return it(e,t,r)[0]||0}(o,a,m)):b>0&&p(0)}),[m,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[c,b,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:g[e],value:m[e],onChange:function(t){O(lt(lt({},m),{},ee()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Fe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(pt,{product:t,dispatchers:a}),Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ge,null))},ft=function(){return Object(n.createElement)(Ge,null)},mt=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Ot=function(){return Object(n.createElement)(mt,null)},gt=function(){var e=Ne(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(Ot,null):"external"===r?Object(n.createElement)(ft,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Ge,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Ve.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Fe.isEmpty)(c)});return Object(n.createElement)(Ae,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(gt,null)))}))},399:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(33),u=r(44),l=r(14),b=r(5),p=function(e){var t=e.color,r=e.fontSize;return Object(b.W)()?{color:t,fontSize:r}:{}},d=r(73);r(552),t.a=Object(d.withProductDataContext)((function(e){var t,r,n,a=e.className,d=e.headingLevel,f=void 0===d?2:d,m=e.productLink,O=void 0===m||m,g=e.align,j=e.color,h=e.customColor,v=e.fontSize,y=e.customFontSize,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,_="h".concat(f),k=Object(l.getColorClassName)("color",j),P=Object(l.getFontSizeClass)(v),C=i()((t={"has-text-color":j||h,"has-font-size":v||y},c()(t,k,k),c()(t,P,P),t));if(!E.id)return Object(o.createElement)(_,{className:i()(a,"wc-block-components-product-title",(n={},c()(n,"".concat(w,"__product-title"),w),c()(n,"wc-block-components-product-title--align-".concat(g),g&&Object(b.W)()),c()(n,C,Object(b.W)()),n)),style:p({color:h,fontSize:y})});var S=Object(s.decodeEntities)(E.name);return Object(o.createElement)(_,{className:i()(a,"wc-block-components-product-title",(r={},c()(r,"".concat(w,"__product-title"),w),c()(r,"wc-block-components-product-title--align-".concat(g),g&&Object(b.W)()),r))},O?Object(o.createElement)("a",{href:E.permalink,rel:"nofollow",className:i()(c()({},C,Object(b.W)())),style:p({color:h,fontSize:y})},S):Object(o.createElement)("span",{className:i()(c()({},C,Object(b.W)())),style:p({color:h,fontSize:y})},S))}))},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"f",(function(){return O})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return j})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return v}));var n=r(8),c=r.n(n),o=r(18),a=r(13),i=r.n(a),s=r(6),u=r(5);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,l=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:u.u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},s),i))];return u.u&&r.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),l}({selected:r,search:c,queryArgs:void 0===a?[]:a});return Promise.all(l.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},d=function(e){return i()({path:"/wc/store/products/".concat(e)})},f=function(){return i()({path:"wc/store/products/attributes"})},m=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},O=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.x?100:0,orderby:u.x?"count":"name",order:u.x?"desc":"asc",search:n})];return u.x&&r.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),c}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},g=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},j=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},h=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},v=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},42:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(15),c=r.n(n),o=r(37),a=r.n(o),i=function(){var e=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()},44:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48: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),s=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,u=null!=r,b=null!=n;return!u&&b?(t=c||"span",i=l(l({},i),{},{className:s()(i.className,"screen-reader-text")}),Object(o.createElement)(t,i,n)):(t=c||a.Fragment,u&&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},49:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(47));t.a=function(e){var t,r,a,i=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=i).message,a=t.type,r?"general"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},5:function(e,t,r){"use strict";r.d(t,"k",(function(){return c})),r.d(t,"J",(function(){return o})),r.d(t,"P",(function(){return a})),r.d(t,"z",(function(){return i})),r.d(t,"B",(function(){return s})),r.d(t,"l",(function(){return u})),r.d(t,"A",(function(){return l})),r.d(t,"D",(function(){return b})),r.d(t,"n",(function(){return p})),r.d(t,"C",(function(){return d})),r.d(t,"m",(function(){return f})),r.d(t,"F",(function(){return m})),r.d(t,"u",(function(){return O})),r.d(t,"x",(function(){return g})),r.d(t,"r",(function(){return j})),r.d(t,"s",(function(){return h})),r.d(t,"t",(function(){return v})),r.d(t,"j",(function(){return y})),r.d(t,"L",(function(){return w})),r.d(t,"Q",(function(){return E})),r.d(t,"p",(function(){return _})),r.d(t,"q",(function(){return k})),r.d(t,"o",(function(){return P})),r.d(t,"I",(function(){return C})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return N})),r.d(t,"w",(function(){return x})),r.d(t,"T",(function(){return B})),r.d(t,"U",(function(){return z})),r.d(t,"K",(function(){return R})),r.d(t,"a",(function(){return T})),r.d(t,"N",(function(){return I})),r.d(t,"b",(function(){return L})),r.d(t,"M",(function(){return A})),r.d(t,"E",(function(){return V})),r.d(t,"h",(function(){return F})),r.d(t,"O",(function(){return q})),r.d(t,"g",(function(){return W})),r.d(t,"i",(function(){return U})),r.d(t,"H",(function(){return Q})),r.d(t,"G",(function(){return Y})),r.d(t,"S",(function(){return G})),r.d(t,"R",(function(){return K})),r.d(t,"d",(function(){return X})),r.d(t,"e",(function(){return $})),r.d(t,"f",(function(){return J})),r.d(t,"y",(function(){return Z})),r.d(t,"X",(function(){return te})),r.d(t,"Y",(function(){return re})),r.d(t,"V",(function(){return ne})),r.d(t,"W",(function(){return ce}));var n=r(3),c=Object(n.getSetting)("currentUserIsAdmin",!1),o=Object(n.getSetting)("reviewRatingsEnabled",!0),a=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),u=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),p=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),f=Object(n.getSetting)("default_height",500),m=Object(n.getSetting)("placeholderImgSrc",""),O=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),h=Object(n.getSetting)("hasTags",!0),v=Object(n.getSetting)("homeUrl",""),y=Object(n.getSetting)("couponsEnabled",!0),w=Object(n.getSetting)("shippingEnabled",!0),E=Object(n.getSetting)("taxesEnabled",!0),_=Object(n.getSetting)("displayItemizedTaxes",!1),k=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),P=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),C=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),N=Object(n.getSetting)("isShippingCalculatorEnabled",!0),x=Object(n.getSetting)("isShippingCostHidden",!1),D=Object(n.getSetting)("woocommerceBlocksPhase",1),B=Object(n.getSetting)("wcBlocksAssetUrl",""),z=Object(n.getSetting)("wcBlocksBuildUrl",""),R=Object(n.getSetting)("shippingCountries",{}),T=Object(n.getSetting)("allowedCountries",{}),I=Object(n.getSetting)("shippingStates",{}),L=Object(n.getSetting)("allowedStates",{}),A=Object(n.getSetting)("shippingMethodsExist",!1),V=Object(n.getSetting)("paymentGatewaySortOrder",[]),F=Object(n.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},H=Object(n.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),q=H.shop.permalink,W=H.checkout.id,U=H.checkout.permalink,Q=H.privacy.permalink,Y=H.privacy.title,G=H.terms.permalink,K=H.terms.title,X=H.cart.id,$=H.cart.permalink,J=Object(n.getSetting)("checkoutAllowsGuest",!1),Z=(Object(n.getSetting)("checkoutAllowsSignup",!1),Object(n.getSetting)("loginUrl","/wp-login.php")),ee=r(17),te=function(e,t){if(D>2)return Object(ee.registerBlockType)(e,t)},re=function(e,t){if(D>1)return Object(ee.registerBlockType)(e,t)},ne=function(){return D>2},ce=function(){return D>1}},533:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(164),u=r(258),l=r(44),b=r(14),p=r(5),d=r(73);t.default=Object(d.withProductDataContext)((function(e){var t,r,n,a,d,f,m,O=e.className,g=e.align,j=e.fontSize,h=e.customFontSize,v=e.saleFontSize,y=e.customSaleFontSize,w=e.color,E=e.customColor,_=e.saleColor,k=e.customSaleColor,P=Object(l.useInnerBlockLayoutContext)().parentClassName,C=Object(l.useProductDataContext)().product,S=i()(O,c()({},"".concat(P,"__product-price"),P));if(!C.id)return Object(o.createElement)(s.a,{align:g,className:S});var N=Object(b.getColorClassName)("color",w),x=Object(b.getFontSizeClass)(j),D=Object(b.getColorClassName)("color",_),B=Object(b.getFontSizeClass)(v),z=i()((t={"has-text-color":w||E,"has-font-size":j||h},c()(t,N,N),c()(t,x,x),t)),R=i()((r={"has-text-color":_||k,"has-font-size":v||y},c()(r,D,D),c()(r,B,B),r)),T={color:E,fontSize:h},I={color:k,fontSize:y},L=C.prices,A=Object(u.c)(L),V=L.price!==L.regular_price,F=V?i()((n={},c()(n,"".concat(P,"__product-price__value"),P),c()(n,R,Object(p.W)()),n)):i()((a={},c()(a,"".concat(P,"__product-price__value"),P),c()(a,z,Object(p.W)()),a)),M=V?I:T;return Object(o.createElement)(s.a,{align:g,className:S,currency:A,price:L.price,priceClassName:F,priceStyle:Object(p.W)()?M:{},minPrice:null==L||null===(d=L.price_range)||void 0===d?void 0:d.min_amount,maxPrice:null==L||null===(f=L.price_range)||void 0===f?void 0:f.max_amount,regularPrice:L.regular_price,regularPriceClassName:i()((m={},c()(m,"".concat(P,"__product-price__regular"),P),c()(m,z,Object(p.W)()),m)),regularPriceStyle:Object(p.W)()?T:{}})}))},534:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),s=r.n(i),u=r(44),l=r(73),b=(r(555),function(e){var t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0});t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product,i=b(n);if(!i)return null;var l={width:i/5*100+"%"},p=Object(a.sprintf)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),i);return Object(o.createElement)("div",{className:s()(t,"star-rating","wc-block-components-product-rating",c()({},"".concat(r,"__product-rating"),r))},Object(o.createElement)("div",{className:s()("wc-block-components-product-rating__stars","".concat(r,"__product-rating__stars")),role:"img","aria-label":p},Object(o.createElement)("span",{style:l},p)))}))},535:function(e,t,r){"use strict";r.r(t);var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(0),s=(r(2),r(7)),u=r.n(s),l=r(1),b=r(842),p=r(33),d=r(536),f=r(44),m=r(73),O=(r(556),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,s=t.has_options,f=t.is_purchasable,m=t.is_in_stock,O=Object(b.a)(n),g=O.cartQuantity,j=O.addingToCart,h=O.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.c)()}),[g]);var v=Number.isFinite(g)&&g>0,y=!s&&f&&m,w=Object(p.decodeEntities)((null==a?void 0:a.description)||""),E=v?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",g,"woo-gutenberg-products-block"),g):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),_=y?"button":"a",k={};return y?k.onClick=function(){h()}:(k.href=o,k.rel="nofollow"),Object(i.createElement)(_,c()({"aria-label":w,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:v}),disabled:j},k),E)}),g=function(){return Object(i.createElement)("button",{className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};t.default=Object(m.withProductDataContext)((function(e){var t=e.className,r=Object(f.useInnerBlockLayoutContext)().parentClassName,n=Object(f.useProductDataContext)().product;return Object(i.createElement)("div",{className:u()(t,"wp-block-button","wc-block-components-product-button",a()({},"".concat(r,"__product-add-to-cart"),r))},n.id?Object(i.createElement)(O,{product:n}):Object(i.createElement)(g,null))}))},536:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a}));var n=window.Event||null,c=function(e,t){var r=t.bubbles,c=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element;if(i||(i=document.body),"function"==typeof n){var s=new n(e,{bubbles:c,cancelable:a});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,a),i.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var o=function(){c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},537:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(176),u=r(3),l=r(44),b=r(73);r(557);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product;if(!n)return Object(o.createElement)("div",{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r))});var a=n.short_description?n.short_description:n.description;if(!a)return null;var b=Object(u.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r)),source:a,maxLength:150,countType:b})}))},538:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(73);r(558);t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product.sku;return n?Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-sku",c()({},"".concat(r,"__product-sku"),r))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,n)):null}))},539:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(6),b=r(73);r(559);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-category-list",c()({},"".concat(r,"__product-category-list"),r))},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"category-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},540:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(6),b=r(73);r(560);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-tag-list",c()({},"".concat(r,"__product-tag-list"),r))},Object(a.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},541:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(73),b=(r(561),function(e){return Object(a.sprintf)(Object(a.__)("%d left in stock","woo-gutenberg-products-block"),e)}),p=function(e,t){return t?Object(a.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(a.__)("In Stock","woo-gutenberg-products-block"):Object(a.__)("Out of Stock","woo-gutenberg-products-block")};t.default=Object(l.withProductDataContext)((function(e){var t,r=e.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;if(!a.id||!a.is_purchasable)return null;var i=!!a.is_in_stock,l=a.low_stock_remaining,d=a.is_on_backorder;return Object(o.createElement)("div",{className:s()(r,"wc-block-components-product-stock-indicator",(t={},c()(t,"".concat(n,"__stock-indicator"),n),c()(t,"wc-block-components-product-stock-indicator--in-stock",i),c()(t,"wc-block-components-product-stock-indicator--out-of-stock",!i),c()(t,"wc-block-components-product-stock-indicator--low-stock",!!l),c()(t,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),t))},l?b(l):p(i,d))}))},542: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}},55:function(e,t){!function(){e.exports=this.wp.keycodes}()},552:function(e,t){},553:function(e,t){},554:function(e,t){},555:function(e,t){},556:function(e,t){},557:function(e,t){},558:function(e,t){},559:function(e,t){},56:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(27),s=r.n(i),u=r(0),l=r(183),b=r(7),p=r.n(b);r(193);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,o=e.onValueChange,a=s()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var i=r/Math.pow(10,n.minorUnit);if(!Number.isFinite(i))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=f(f(f({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),m=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:i,onValueChange:m}))}},560:function(e,t){},561:function(e,t){},562:function(e,t){},563:function(e,t,r){"use strict";var n=r(0),c=r(58),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},57:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},61:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(27),a=r.n(o),i=r(9);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))}},73:function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},74:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(24),s=r.n(i),u=r(19),l=r.n(u),b=r(22),p=r.n(b),d=r(23),f=r.n(d),m=r(12),O=r.n(m),g=r(0),j=r(6),h=r(7),v=r.n(h),y=r(4),w=r(25);r(122);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}var _=function(e){p()(r,e);var t=E(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,o=r.checked,a=r.instanceId,i=r.className,s=r.help,u=r.options,l=r.value,b="inspector-toggle-button-control-".concat(a);return s&&(e=Object(j.isFunction)(s)?s(o):s),Object(g.createElement)(y.BaseControl,{id:b,help:e,className:v()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((function(e,r){var o={};return l===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(g.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},o),e.label)}))))}}]),r}(g.Component);t.a=Object(w.withInstanceId)(_)},75:function(e,t){!function(){e.exports=this.wp.hooks}()},77:function(e,t){!function(){e.exports=this.ReactDOM}()},78:function(e,t){!function(){e.exports=this.wp.dom}()},81: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,s=e.setAttributes,u=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(o.clamp)(e,i.B,i.z);s({columns:Object(o.isNaN)(t)?"":t})},min:i.B,max:i.z}),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.D,i.A);s({rows:Object(o.isNaN)(t)?"":t})},min:i.D,max:i.A}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:u?Object(c.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return s({alignButtons:!u})}}))}},811:function(e,t,r){"use strict";var n=r(0),c=r(58),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},818:function(e,t,r){"use strict";var n=r(0),c=r(58),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},826:function(e,t,r){"use strict";var n=r(0),c=r(58),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},827: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.T+"img/pennant.jpg",thumbnail:c.T+"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}]},83:function(e,t){!function(){e.exports=this.wp.viewport}()},832:function(e,t,r){"use strict";var n=r(0),c=r(58),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},839:function(e,t,r){e.exports=r(899)},840:function(e,t){},841:function(e,t){},842: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(134),s=r(41),u=r(33),l=r(140),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)(s.CART_STORE_KEY).addItemToCart,r=Object(i.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(l.a)(),f=d.addErrorNotice,m=d.removeNotice,O=Object(o.useState)(!1),g=c()(O,2),j=g[0],h=g[1],v=Object(o.useRef)(b(n,e));return Object(o.useEffect)((function(){var t=b(n,e);t!==v.current&&(v.current=t)}),[n,e]),{cartQuantity:Number.isFinite(v.current)?v.current:0,addingToCart:j,cartIsLoading:p,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;h(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){f(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){h(!1)}))}}}},844:function(e,t,r){"use strict";var n=r(0),c=r(58),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},845:function(e,t){},846:function(e,t){},847:function(e,t){},848:function(e,t){},86:function(e,t,r){"use strict";r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(6),u=r(46),l=r.n(u);function b(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 p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=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}}),f=function(){return Object(i.useContext)(d)},m=function(e){var t=e.children,r=Object(i.useState)({}),n=a()(r,2),o=n[0],u=n[1],b=Object(i.useCallback)((function(e){return o[e]}),[o]),f=Object(i.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),m=Object(i.useCallback)((function(e){u((function(t){return t[e]?Object(s.omit)(t,[e]):t}))}),[]),O=Object(i.useCallback)((function(){u({})}),[]),g=Object(i.useCallback)((function(e){e&&u((function(t){return e=Object(s.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:p(p({},t),e)}))}),[]),j=Object(i.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=p(p({},r[e]),t);return l()(r[e],n)?r:p(p({},r),{},c()({},e,n))}))}),[]),h={getValidationError:b,setValidationErrors:g,clearValidationError:m,clearAllValidationErrors:O,hideValidationError:Object(i.useCallback)((function(e){j(e,{hidden:!0})}),[j]),showValidationError:Object(i.useCallback)((function(e){j(e,{hidden:!1})}),[j]),showAllValidationErrors:Object(i.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=p(p({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:p(p({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:f};return Object(i.createElement)(d.Provider,{value:h},t)}},87:function(e,t){!function(){e.exports=this.wp.a11y}()},899: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),s=r(1),u=r(14),l=r(17),b=r(61),p=r(58),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"})),f=r(5),m=r(7),O=r.n(m),g=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:O()("is-loading",t.className)})},j={category:"woocommerce-product-elements",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:Object(f.V)()?null:["@woocommerce/all-products","@woocommerce/single-product"],save:g,deprecated:[{save:function(){}}]},h=r(391),v=r(4),y=r(25),w=r(152),E=r(399),_=r(11),k=r.n(_),P=r(143),C=r(27),S=r.n(C);r(841);var N=function(e){var t=e.className,r=void 0===t?"":t,n=S()(e,["className"]),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(v.Button,a()({className:c},n))},x=r(44),D=(r(840),function(e){return function(t){return function(r){var n=Object(x.useProductDataContext)(),c=r.attributes,o=r.setAttributes,a=c.productId,l=Object(i.useState)(!a),b=k()(l,2),p=b[0],d=b[1];return n.hasContext?Object(i.createElement)(t,r):Object(i.createElement)(i.Fragment,null,p?Object(i.createElement)(v.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(i.createElement)("div",null,e.description),Object(i.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(i.createElement)(P.a,{selected:a||0,showVariations:!0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o({productId:e[0]?e[0].id:0})}}),Object(i.createElement)(v.Button,{isDefault:!0,disabled:!a,onClick:function(){d(!1)}},Object(s.__)("Done","woo-gutenberg-products-block")))):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(v.Toolbar,null,Object(i.createElement)(N,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),B=Object(i.createElement)(p.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 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"})),z=Object(s.__)("Product Title","woo-gutenberg-products-block"),R=Object(i.createElement)(b.a,{srcElement:B}),T=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),I=function(e){var t=e.color,r=e.fontSize,n=e.setFontSize,c=e.setColor,o=e.attributes,a=e.setAttributes,l=o.headingLevel,b=o.productLink,p=o.align;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(w.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:l,onChange:function(e){return a({headingLevel:e})}}),Object(f.W)()&&Object(i.createElement)(u.AlignmentToolbar,{value:p,onChange:function(e){a({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(v.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:b,onChange:function(){return a({productLink:!b})}})),Object(f.W)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(v.PanelBody,{title:Object(s.__)("Text settings","woo-gutenberg-products-block")},Object(i.createElement)(u.FontSizePicker,{value:r.size,onChange:n})),Object(i.createElement)(u.PanelColorSettings,{title:Object(s.__)("Color settings","woo-gutenberg-products-block"),colorSettings:[{value:t.color,onChange:c,label:Object(s.__)("Text color","woo-gutenberg-products-block")}]}))),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(E.a,o)))},L=Object(f.W)()?Object(y.compose)([Object(u.withFontSizes)("fontSize"),Object(u.withColors)("color",{textColor:"color"}),D({icon:R,label:z,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(I):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 V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F={title:z,description:T,icon:{src:R,foreground:"#874FB9"},attributes:h.a,edit:L};Object(l.registerBlockType)("woocommerce/product-title",V(V({},j),F));var M=r(533),H=r(361),q=Object(s.__)("Product Price","woo-gutenberg-products-block"),W=Object(i.createElement)(b.a,{srcElement:H.a}),U=Object(s.__)("Display the price of a product.","woo-gutenberg-products-block"),Q=function(e){var t=e.fontSize,r=e.setFontSize,n=e.color,c=e.setColor,o=e.colorLabel;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.FontSizePicker,{value:t.size,onChange:r}),Object(i.createElement)(v.BaseControl,{label:o},Object(i.createElement)(u.ColorPalette,{value:n.color,onChange:c,label:Object(s.__)("Color")})))},Y=function(e){var t=e.fontSize,r=e.saleFontSize,n=e.setFontSize,c=e.setSaleFontSize,o=e.color,a=e.saleColor,l=e.setColor,b=e.setSaleColor,p=e.attributes,d=e.setAttributes,m=p.align;return Object(i.createElement)(i.Fragment,null,Object(f.W)()&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(u.AlignmentToolbar,{value:m,onChange:function(e){d({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(f.W)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(v.PanelBody,{title:Object(s.__)("Price","woo-gutenberg-products-block")},Object(i.createElement)(Q,{color:o,setColor:l,fontSize:t,setFontSize:n,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})),Object(i.createElement)(v.PanelBody,{title:Object(s.__)("Sale price","woo-gutenberg-products-block")},Object(i.createElement)(Q,{color:a,setColor:b,fontSize:r,setFontSize:c,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})))),Object(i.createElement)(M.default,p))},G=Object(f.W)()?Object(y.compose)([Object(u.withFontSizes)("fontSize"),Object(u.withFontSizes)("saleFontSize"),Object(u.withFontSizes)("originalFontSize"),Object(u.withColors)("color",{textColor:"color"}),Object(u.withColors)("saleColor",{textColor:"saleColor"}),Object(u.withColors)("originalColor",{textColor:"originalColor"}),D({icon:W,label:q,description:Object(s.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(Y):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 X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $={productId:{type:"number",default:0}};function 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 Z(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){c()(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}Object(f.W)()&&($=X(X({},$),{},{align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}}));var ee={title:q,description:U,icon:{src:W,foreground:"#874FB9"},attributes:$,edit:G};Object(l.registerBlockType)("woocommerce/product-price",Z(Z({},j),ee));var te=r(392),re=r(191),ne=r(74),ce=r(3),oe=r(393),ae=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"})),ie=Object(s.__)("Product Image","woo-gutenberg-products-block"),se=Object(i.createElement)(b.a,{srcElement:ae}),ue=Object(s.__)("Display the main product image","woo-gutenberg-products-block"),le=D({icon:se,label:ie,description:Object(s.__)("Choose a product to display its image.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=t.productLink,c=t.imageSizing,o=t.showSaleBadge,a=t.saleBadgeAlign;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(v.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(v.ToggleControl,{label:Object(s.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(s.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showSaleBadge:!o})}}),o&&Object(i.createElement)(ne.a,{label:Object(s.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(s.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(s.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(s.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(ne.a,{label:Object(s.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(re.a)(Object(s.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(ce.getAdminLink)("customize.php"),"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images"),target:"_blank",rel:"noopener noreferrer"})}),value:c,options:[{label:Object(s.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(s.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:function(e){return r({imageSizing:e})}}))),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(oe.a,t)))}));function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var de={title:ie,description:ue,icon:{src:se,foreground:"#874FB9"},attributes:te.a,edit:le};Object(l.registerBlockType)("woocommerce/product-image",pe(pe({},j),de));var fe={productId:{type:"number",default:0}},me=r(534),Oe=r(826),ge=Object(s.__)("Product Rating","woo-gutenberg-products-block"),je=Object(i.createElement)(b.a,{srcElement:Oe.a});function he(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?he(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):he(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye={title:ge,description:Object(s.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:je,foreground:"#874FB9"},attributes:fe,edit:D({icon:je,label:ge,description:Object(s.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(me.default,t)}))};Object(l.registerBlockType)("woocommerce/product-rating",ve(ve({},j),ye));var we={productId:{type:"number",default:0}},Ee=r(535),_e=r(844),ke=Object(s.__)("Add to Cart Button","woo-gutenberg-products-block"),Pe=Object(i.createElement)(b.a,{srcElement:_e.a});function Ce(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?Ce(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={title:ke,description:Object(s.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:Pe,foreground:"#874FB9"},attributes:we,edit:D({icon:Pe,label:ke,description:Object(s.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(v.Disabled,null,Object(i.createElement)(Ee.default,t))}))};Object(l.registerBlockType)("woocommerce/product-button",Se(Se({},j),Ne));var xe={productId:{type:"number",default:0}},De=r(537),Be=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"})),ze=Object(s.__)("Product Summary","woo-gutenberg-products-block"),Re=Object(i.createElement)(b.a,{srcElement:Be});function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Le={title:ze,description:Object(s.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Re,foreground:"#874FB9"},attributes:xe,edit:D({icon:Re,label:ze,description:Object(s.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(De.default,t)}))};Object(l.registerBlockType)("woocommerce/product-summary",Ie(Ie({},j),Le));var Ae={productId:{type:"number",default:0}},Ve=r(266),Fe=r(818),Me=Object(s.__)("On-Sale Badge","woo-gutenberg-products-block"),He=Object(i.createElement)(b.a,{srcElement:Fe.a});function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function We(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ue={title:Me,description:Object(s.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:He,foreground:"#874FB9"},supports:{html:!1},attributes:Ae,edit:D({icon:He,label:Me,description:Object(s.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(Ve.default,t)}))};Object(l.registerBlockType)("woocommerce/product-sale-badge",We(We({},j),Ue));var Qe={productId:{type:"number",default:0}},Ye=r(135),Ge=r(538),Ke=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"})),Xe=Object(s.__)("Product SKU","woo-gutenberg-products-block"),$e=Object(i.createElement)(b.a,{srcElement:Ke});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 Ze(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 et={title:Xe,description:Object(s.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:$e,foreground:"#874FB9"},attributes:Qe,edit:D({icon:$e,label:Xe,description:Object(s.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ye.a,null),Object(i.createElement)(Ge.default,t))}))};Object(f.X)("woocommerce/product-sku",Ze(Ze({},j),et));var tt={productId:{type:"number",default:0}},rt=r(539),nt=r(811),ct=Object(s.__)("Product Category List","woo-gutenberg-products-block"),ot=Object(i.createElement)(b.a,{srcElement:nt.a});function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st={title:ct,description:Object(s.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:ot,foreground:"#874FB9"},attributes:tt,edit:D({icon:ot,label:ct,description:Object(s.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ye.a,null),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(rt.default,t)))}))};Object(f.X)("woocommerce/product-category-list",it(it({},j),st));var ut={productId:{type:"number",default:0}},lt=r(540),bt=Object(s.__)("Product Tag List","woo-gutenberg-products-block"),pt=Object(i.createElement)(b.a,{srcElement:Fe.a});function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt={title:bt,description:Object(s.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:pt,foreground:"#874FB9"},attributes:ut,edit:D({icon:pt,label:bt,description:Object(s.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ye.a,null),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(lt.default,t)))}))};Object(f.X)("woocommerce/product-tag-list",ft(ft({},j),mt));var Ot={productId:{type:"number",default:0}},gt=r(541),jt=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"}))),ht=Object(s.__)("Product Stock Indicator","woo-gutenberg-products-block"),vt=Object(i.createElement)(b.a,{srcElement:jt});function yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Et={title:ht,description:Object(s.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:vt,foreground:"#874FB9"},attributes:Ot,edit:D({icon:vt,label:ht,description:Object(s.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ye.a,null),Object(i.createElement)(gt.default,t))}))};Object(f.X)("woocommerce/product-stock-indicator",wt(wt({},j),Et));var _t=r(929),kt=(r(390),r(398)),Pt=Object(s.__)("Add to Cart","woo-gutenberg-products-block"),Ct=Object(i.createElement)(b.a,{srcElement:_e.a});function St(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?St(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xt={title:Pt,description:Object(s.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:Ct,foreground:"#874FB9"},edit:D({icon:Ct,label:Pt,description:Object(s.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=Object(x.useProductDataContext)().product,c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:O()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(Ye.a,{productId:n.id}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(v.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block")},Object(_t.b)(n)?Object(i.createElement)(v.ToggleControl,{label:Object(s.__)("Display form elements","woo-gutenberg-products-block"),help:Object(s.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showFormElements:!o})}}):Object(i.createElement)(v.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(s.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(i.createElement)(v.Disabled,null,Object(i.createElement)(kt.a,t)))})),attributes:r(397).a};Object(f.X)("woocommerce/product-add-to-cart",Nt(Nt({},j),xt));var Dt=r(21),Bt=r.n(Dt),zt=r(19),Rt=r.n(zt),Tt=r(22),It=r.n(Tt),Lt=r(23),At=r.n(Lt),Vt=r(12),Ft=r.n(Vt),Mt=r(36),Ht=(r(2),r(81)),qt=r(927),Wt=r(827),Ut=r(167),Qt=function(e,t){var r=t.className,n=t.contentVisibility;return O()(e,r,{"has-image":n&&n.image,"has-title":n&&n.title,"has-rating":n&&n.rating,"has-price":n&&n.price,"has-button":n&&n.button})},Yt=function(e,t){return Object(i.createElement)(v.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(s.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(v.Button,{className:"wc-block-products__add-product-button",isDefault:!0,isLarge:!0,href:ce.ADMIN_URL+"post-new.php?post_type=product"},Object(s.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:Ut.a})),Object(i.createElement)(v.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(s.__)("Learn more","woo-gutenberg-products-block")))},Gt=function(e,t){return Object(i.createElement)(v.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(s.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $t=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],Jt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,Xt(Xt({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};r(845);function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tr=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(v.ToggleControl,{label:Object(s.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:er(er({},r),{},{orderBy:!r.orderBy})})}})},rr=function(e,t){return Object(i.createElement)(v.SelectControl,{label:Object(s.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(s.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(s.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(s.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(s.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(s.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(s.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},nr=r(24),cr=r.n(nr),or=r(9),ar=r(53),ir=r.n(ar),sr=r(6),ur=r(48),lr=(r(848),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,u=function(e,t,r){if(r<=2)return{minIndex:null,maxIndex:null};var n=e-1,c=Math.max(Math.floor(t-n/2),2),o=Math.min(Math.ceil(t+(n-(t-c))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(o-t))),2),maxIndex:o}}(c,t,a),l=u.minIndex,b=u.maxIndex,p=r&&Boolean(1!==l),d=r&&Boolean(b!==a),f=r&&Boolean(l>3),m=r&&Boolean(b<a-2);p&&3===l&&(l-=1),d&&b===a-2&&(b+=1);var g=[];if(l&&b)for(var j=l;j<=b;j++)g.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(ur.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t-1)},title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(ur.a,{label:"<",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return o(1)},disabled:1===t},Object(i.createElement)(ur.a,{label:1,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),g.map((function(e){return Object(i.createElement)("button",{key:e,className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return o(e)},disabled:t===e},Object(i.createElement)(ur.a,{label:e,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),e)}))})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===a,"wc-block-components-pagination__page--active":t===a}),onClick:function(){return o(a)},disabled:t===a},Object(i.createElement)(ur.a,{label:a,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),a)})),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t+1)},title:Object(s.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(ur.a,{label:">",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))});lr.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var br=lr,pr=r(149),dr=(r(847),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(pr.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:r,options:[{key:"menu_order",label:Object(s.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(s.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(s.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(s.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(s.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(s.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:c})}),fr=r(192),mr=Object(fr.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(x.useInnerBlockLayoutContext)(),s=o.parentClassName,u=o.parentName,l=0===Object.keys(t).length,b=O()("".concat(s,"__product"),"wc-block-layout",{"is-loading":l});return Object(i.createElement)("li",{className:b,"aria-hidden":l},function e(t,r,n,c){if(n){var o=Object(qt.a)(t);return n.map((function(n,s){var u=k()(n,2),l=u[0],b=u[1],p=void 0===b?{}:b,d=[];p.children&&p.children.length>0&&(d=e(t,r,p.children,c));var f=o[l];if(!f)return null;var m=r.id||0,O=["layout",l,s,c,m];return Object(i.createElement)(i.Suspense,{key:O.join("_"),fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},Object(i.createElement)(f,a()({},p,{children:d,product:r})))}))}}(u,t,c,n))})),Or=r(171),gr=r(206),jr=r(41),hr=r(60);function vr(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 yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wr=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(gr.a)(yr(yr({},t),{},{query:e})),n=r.results,c=r.isLoading,o=function(e,t){var r=t.namespace,n=t.resourceName,c=t.resourceValues,o=void 0===c?[]:c,a=t.query,i=void 0===a?{}:a;if(!r||!n)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var s=Object(hr.a)(i),u=Object(hr.a)(o),l=Object(Mt.useSelect)((function(t){var c=t(jr.COLLECTIONS_STORE_KEY),o=[e,r,n,s,u];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,u,s]),b=l.value,p=l.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",yr(yr({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},Er=r(542),_r=r(184),kr=r(87),Pr=(r(846),r(144)),Cr=function(){var e=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(e,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:Pr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(e,"__no-products-title")},Object(s.__)("No products","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(e,"__no-products-description")},Object(s.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Sr=r(832),Nr=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(n,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(n,"__no-products-image"),alt:"",srcElement:Sr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(n,"__no-products-title")},Object(s.__)("No products found","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(n,"__no-products-description")},Object(s.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(i.createElement)("button",{onClick:r},Object(s.__)("Reset Search","woo-gutenberg-products-block")))};function xr(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 Dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Br=Object(_r.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,u=Object(Or.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return Dr(Dr({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:c*o,page:r})}({attributes:t,sortValue:o,currentPage:r})),l=k()(u,1)[0],b=wr(l),p=b.products,d=b.totalProducts,f=b.productsLoading,m=Object(x.useInnerBlockLayoutContext)().parentClassName,g=function(e){e.order,e.orderby,e.page,e.per_page;return S()(e,["order","orderby","page","per_page"])}(l),j=Object(Or.b)("attributes",[]),h=k()(j,2),v=h[0],y=h[1],w=Object(Or.b)("min_price"),E=k()(w,2),_=E[0],P=E[1],C=Object(Or.b)("max_price"),N=k()(C,2),D=N[0],B=N[1],z=Object(Er.a)({totalQuery:g,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(sr.isEqual)(t,c)&&Number.isFinite(r)})),R="object"===ir()(z)&&Object(sr.isEqual)(g,z.totalQuery);Object(i.useEffect)((function(){R||(n(1),z&&function(e){Number.isFinite(e)&&(0===e?Object(kr.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(kr.speak)(Object(s.sprintf)(Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[l]);var T,I,L,A,V,F=t.contentVisibility,M=t.columns*t.rows,H=!Number.isFinite(d)&&R?Math.ceil(z.totalProducts/M):Math.ceil(d/M),q=p.length?p:Array.from({length:M}),W=0!==p.length||f,U=v.length>0||Number.isFinite(_)||Number.isFinite(D);return Object(i.createElement)("div",{className:(T=t.columns,I=t.rows,L=t.alignButtons,A=t.align,V=void 0!==A?"align"+A:"",O()(m,V,"has-"+T+"-columns",{"has-multiple-rows":I>1,"has-aligned-buttons":L}))},F.orderBy&&W&&Object(i.createElement)(dr,{onChange:c,value:o}),!W&&U&&Object(i.createElement)(Nr,{resetCallback:function(){y([]),P(null),B(null)}}),!W&&!U&&Object(i.createElement)(Cr,null),W&&Object(i.createElement)("ul",{className:"".concat(m,"__products")},q.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)(mr,{key:e.id||r,attributes:t,product:e})}))),H>1&&Object(i.createElement)(br,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:H}))})),zr=function(e){var t=e.attributes,r=Object(i.useState)(1),n=k()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=k()(a,2),u=s[0],l=s[1];Object(i.useEffect)((function(){l(t.orderby)}),[t.orderby]);return Object(i.createElement)(Br,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;l(t),o(1)},sortValue:u})},Rr=r(175);function Tr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return At()(this,r)}}var Ir=function(e){It()(r,e);var t=Tr(r);function r(){return Bt()(this,r),t.apply(this,arguments)}return cr()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?Rr.a:Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(zr,{attributes:t,urlParameterSuffix:r}))}}]),r}(or.Component);function Lr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return At()(this,r)}}var Ar=function(e){It()(r,e);var t=Lr(r);function r(){var e;Bt()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),c()(Rt()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(Rt()(e),"blockMap",Object(qt.a)("woocommerce/all-products")),c()(Rt()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(Rt()(e),"getTitle",(function(){return Object(s.__)("All Products","woo-gutenberg-products-block")})),c()(Rt()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(Rt()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(s.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(Rt()(e),"getInspectorControls",(function(){var t=e.props,r=t.attributes,n=t.setAttributes,c=r.columns,o=r.rows,a=r.alignButtons;return Object(i.createElement)(u.InspectorControls,{key:"inspector"},Object(i.createElement)(v.PanelBody,{title:Object(s.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ht.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(v.PanelBody,{title:Object(s.__)("Content Settings","woo-gutenberg-products-block")},tr(r,n),rr(r,n)))})),c()(Rt()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(v.Toolbar,{controls:[{icon:"edit",title:Object(s.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(Rt()(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(s.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(i.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(i.createElement)(v.Tip,null,Object(s.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(x.ProductDataContextProvider,{product:Wt.a[0]},Object(i.createElement)(u.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:Jt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(s.__)("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(s.__)("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(s.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];$t.map((function(e){var t=k()(e,2),r=t[0],n=t[1];return c.push(Object(l.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(s.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(Rt()(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)(Ir,{attributes:t})):Gt(c,o)})),c()(Rt()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return f.r?Object(i.createElement)("div",{className:Qt("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):Yt(n,c)})),e}return r}(i.Component),Vr=Object(y.compose)(v.withSpokenMessages,Object(Mt.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Mt.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Ar),Fr={columns:f.l,rows:f.n,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:$t,isPreview:!1};function Mr(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 Hr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qr={title:Object(s.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Fr,edit:function(e){return Object(i.createElement)(Vr,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:Qt("wc-block-all-products",t)},n),Object(i.createElement)(u.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",Hr(Hr({},qr),{},{deprecated:[{attributes:Object.assign({},qr.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:Qt("wc-block-all-products",t)},r),Object(i.createElement)(u.InnerBlocks.Content,null))}}]}))},9:function(e,t){!function(){e.exports=this.React}()},927:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(57),c=r(0),o=r(5);r.p=o.U,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(11)]).then(r.bind(null,533))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(3),r.e(10)]).then(r.bind(null,947))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(17)]).then(r.bind(null,948))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)((function(){return r.e(12).then(r.bind(null,534))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(2),r.e(8)]).then(r.bind(null,535))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)((function(){return r.e(15).then(r.bind(null,537))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)((function(){return r.e(3).then(r.bind(null,266))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)((function(){return r.e(13).then(r.bind(null,538))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)((function(){return r.e(9).then(r.bind(null,539))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)((function(){return r.e(16).then(r.bind(null,540))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)((function(){return r.e(14).then(r.bind(null,541))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(7)]).then(r.bind(null,949))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},929:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},94:function(e,t){!function(){e.exports=this.wp.date}()},95:function(e,t){!function(){e.exports=this.wp.autop}()},99:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(279),u=(r(2),r(7)),l=r.n(u);r(238);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(s.a,c()({className:b},u),n&&Object(i.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(i.createElement)("span",{className:"wc-block-components-button__text"},o))}}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-products"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],b=0,p=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==c[s]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5:0,2:0,3:0,8:0,9:0,11:0,12:0,13:0,14:0,15:0,16:0},o=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({1:"atomic-block-components/add-to-cart~atomic-block-components/image~atomic-block-components/title",2:"atomic-block-components/add-to-cart~atomic-block-components/button",3:"atomic-block-components/sale-badge",7:"atomic-block-components/add-to-cart",8:"atomic-block-components/button",9:"atomic-block-components/category-list",10:"atomic-block-components/image",11:"atomic-block-components/price",12:"atomic-block-components/rating",13:"atomic-block-components/sku",14:"atomic-block-components/stock-indicator",15:"atomic-block-components/summary",16:"atomic-block-components/tag-list",17:"atomic-block-components/title"}[e]||e)+".js"}(e);var s=new Error;o=function(t){i.onerror=i.onload=null,clearTimeout(u);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,r[1](s)}c[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:i})}),12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=s;return o.push([839,0]),r()}({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 o}));var n=r(0),c=Object(n.createContext)("page"),o=function(){return Object(n.useContext)(c)};c.Provider},108:function(e,t){},109:function(e,t){},110:function(e,t){},111:function(e,t){},112:function(e,t){},113:function(e,t){},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},120:function(e,t){},121:function(e,t){},122:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(41),c=r(36),o=r(211),a=r(33),i=r(6),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(o.b)(),r=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},b=e.shouldSelect,p=Object(c.useSelect)((function(e,t){var c=t.dispatch;if(!b)return s;if(r)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 o=e(n.CART_STORE_KEY),u=o.getCartData(),p=o.getCartErrors(),d=o.getCartTotals(),f=!o.hasFinishedResolution("getCartData"),m=o.areShippingRatesLoading(),O=c(n.CART_STORE_KEY).receiveCart,g=Object(i.mapValues)(u.shippingAddress,(function(e){return Object(a.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:d,cartIsLoading:f,cartErrors:p,shippingAddress:g,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!g.country,receiveCart:O}}),[b]);return p}},135:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(61),a=r(167),i=r(3),s=r(14),u=r(44);t.a=function(e){var t=(Object(u.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(n.createElement)("a",{href:"".concat(i.ADMIN_URL,"post.php?post=").concat(t,"&action=edit"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Edit this product's details","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:a.a,size:16}))),Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(c.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},14:function(e,t){!function(){e.exports=this.wp.blockEditor}()},140:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(8),c=r.n(n),o=r(190),a=r(0);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),b=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return s(s(s({notices:t},l),b),{},{setIsSuppressed:i})}},142:function(e,t){!function(){e.exports=this.wp.wordcount}()},143:function(e,t,r){"use strict";var n=r(51),c=r.n(n),o=r(10),a=r.n(o),i=r(0),s=r(1),u=r(6),l=(r(2),r(50)),b=r(4),p=r(7),d=r.n(p),f=r(21),m=r.n(f),O=r(24),g=r.n(O),j=r(22),v=r.n(j),h=r(23),y=r.n(h),w=r(12),E=r.n(w),_=r(25);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var P=Object(_.createHigherOrderComponent)((function(e){var t=function(t){v()(n,t);var r=k(n);function n(){return m()(this,n),r.apply(this,arguments)}return g()(n,[{key:"render",value:function(){var t=this.props.selected;return Object(i.createElement)(e,a()({},this.props,{selected:Object(u.isNil)(t)?[]:[t]}))}}]),n}(i.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),C=r(301),S=r(15),N=r.n(S),x=r(37),D=r.n(x),B=r(19),z=r.n(B),R=r(8),T=r.n(R),I=r(46),L=r.n(I),A=r(40),V=r(43);function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){T()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var q=Object(_.createHigherOrderComponent)((function(e){var t=function(t){v()(n,t);var r=H(n);function n(){var e;m()(this,n);for(var t=arguments.length,c=new Array(t),o=0;o<t;o++)c[o]=arguments[o];return e=r.call.apply(r,[this].concat(c)),T()(z()(e),"state",{error:null,loading:!1,variations:{}}),T()(z()(e),"loadVariations",(function(){var t=e.props.products,r=e.state,n=r.loading,c=r.variations;if(!n){var o=e.getExpandedProduct();if(o&&!c[o]){var a=t.find((function(e){return e.id===o}));a.variations&&0!==a.variations.length?(e.setState({loading:!0}),Object(A.g)(o).then((function(t){var r=t.map((function(e){return M(M({},e),{},{parent:o})}));e.setState({variations:M(M({},e.state.variations),{},T()({},o,r)),loading:!1,error:null})})).catch(function(){var t=D()(N.a.mark((function t(r){var n;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(V.a)(r);case 2:n=t.sent,e.setState({variations:M(M({},e.state.variations),{},T()({},o,null)),loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({variations:M(M({},e.state.variations),{},T()({},o,null)),loading:!1,error:null})}}})),e}return g()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.selected,r=e.showVariations;t&&r&&this.loadVariations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isLoading,n=t.selected;t.showVariations&&(!L()(e.selected,n)||e.isLoading&&!r)&&this.loadVariations()}},{key:"isProductId",value:function(e){return this.props.products.some((function(t){return t.id===e}))}},{key:"findParentProduct",value:function(e){return this.props.products.filter((function(t){return t.variations&&t.variations.find((function(t){return t.id===e}))}))[0].id}},{key:"getExpandedProduct",value:function(){var e=this.props,t=e.isLoading,r=e.selected;if(!e.showVariations)return null;var n=r&&r.length?r[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(t||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!t&&n?this.isProductId(n)?n:this.findParentProduct(n):null}},{key:"render",value:function(){var t=this.props,r=t.error,n=t.isLoading,c=this.state,o=c.error,s=c.loading,u=c.variations;return Object(i.createElement)(e,a()({},this.props,{error:o||r,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:u,variationsLoading:s}))}}]),n}(i.Component);return T()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),U=r(61),Q=r(58),Y=Object(i.createElement)(Q.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),W=Object(i.createElement)(Q.a,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),X=r(49);r(199);function G(e,t){if(!t)return e;var r=new RegExp(Object(u.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var K=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(i.createElement)(U.a,{srcElement:Y}):Object(i.createElement)(U.a,{srcElement:W})},$={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},J=function(e){var t=e.expandedProduct,r=e.error,n=e.isLoading,o=e.onChange,p=e.onSearch,f=e.products,m=e.renderItem,O=e.selected,g=e.showVariations,j=e.variations,v=e.variationsLoading,h=function(e){var r=e.item,n=e.search,c=e.depth,o=void 0===c?0:c,p=e.isSelected,f=e.onSelect,m=r.variations&&Array.isArray(r.variations)?r.variations.length:0,O=d()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":n.length>0,"is-skip-level":0===o&&0!==r.parent,"is-variable":m>0}),g=Object.assign({},e);delete g.isSingle;var j={role:"menuitemradio"};return r.breadcrumbs.length&&(j["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),m&&(j["aria-expanded"]=r.id===t),r.breadcrumbs.length?(Object(u.isEmpty)(r.variation)||(r.name=r.variation),Object(i.createElement)(l.b,a()({className:O},e,j))):[Object(i.createElement)(b.MenuItem,a()({key:"product-".concat(r.id),isSelected:p},g,j,{className:O,onClick:function(){f(r)()}}),Object(i.createElement)("span",{className:"woocommerce-search-list__item-state"},K(p)),Object(i.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(i.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:G(r.name,n)}})),m?Object(i.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(s.sprintf)(Object(s._n)("%d variation","%d variations",m,"woo-gutenberg-products-block"),m)):null),t===r.id&&m>0&&v&&Object(i.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(i.createElement)(b.Spinner,null))]};if(r)return Object(i.createElement)(X.a,{error:r});var y=j&&j[t]?j[t]:[],w=[].concat(c()(f),c()(y));return Object(i.createElement)(l.a,{className:"woocommerce-products",list:w,isLoading:n,isSingle:!0,selected:w.filter((function(e){var t=e.id;return O.includes(t)})),onChange:o,renderItem:m||(g?h:null),onSearch:p,messages:$,isHierarchical:!0})};J.defaultProps={expandedProduct:null,selected:[],showVariations:!1};t.a=P(Object(C.a)(q(J)))},144:function(e,t,r){"use strict";var n=r(0),c=r(58),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},149:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(48),i=r(192);r(201);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,s=e.onChange,u=e.options,l=e.screenReaderLabel,b=e.readOnly,p=e.value,d="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.a,{label:i,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:c,onChange:s,readOnly:b,value:p},u.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},15:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},150:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(8),c=r.n(n),o=r(6);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:s,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case s:return b.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,b));case u:return b.delete(o),i(i({},e),{},c()({},n,b))}return e}},152:function(e,t,r){"use strict";var n=r(21),c=r.n(n),o=r(24),a=r.n(o),i=r(22),s=r.n(i),u=r(23),l=r.n(u),b=r(12),p=r.n(b),d=r(0),f=r(6),m=r(1),O=r(4);function g(e){var t=e.level,r={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return r.hasOwnProperty(t)?Object(d.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(O.Path,{d:r[t]})):null}function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p()(e);if(t){var c=p()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return l()(this,r)}}var v=function(e){s()(r,e);var t=j(r);function r(){return c()(this,r),t.apply(this,arguments)}return a()(r,[{key:"createLevelControl",value:function(e,t,r){var n=e===t;return{icon:Object(d.createElement)(g,{level:e}),title:Object(m.sprintf)(Object(m.__)("Heading %d"),e),isActive:n,onClick:function(){return r(e)}}}},{key:"render",value:function(){var e=this,t=this.props,r=t.isCollapsed,n=void 0===r||r,c=t.minLevel,o=t.maxLevel,a=t.selectedLevel,i=t.onChange;return Object(d.createElement)(O.Toolbar,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},155: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}))}}},164:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=r(1),i=r(55),s=r(7),u=r.n(s),l=(r(2),r(236),function(e){var t=e.className,r=e.currency,n=e.maxPrice,c=e.minPrice,a=e.priceClassName,s=e.priceStyle;return Object(o.createElement)("span",{className:t},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:c,style:s})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:n,style:s}))}),b=function(e){var t=e.className,r=e.currency,n=e.regularPriceClassName,c=e.regularPriceStyle,s=e.regularPrice,l=e.priceClassName,b=e.priceStyle,p=e.price;return Object(o.createElement)("span",{className:t},Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",n),style:c},e)},value:s}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:r,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",l),style:b},e)},value:p}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.maxPrice,s=void 0===a?null:a,p=e.minPrice,d=void 0===p?null:p,f=e.price,m=void 0===f?null:f,O=e.priceClassName,g=e.priceStyle,j=e.regularPrice,v=e.regularPriceClassName,h=e.regularPriceStyle,y=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));return j&&m!==j?Object(o.createElement)(b,{className:y,currency:n,price:m,priceClassName:O,priceStyle:g,regularPrice:j,regularPriceClassName:v,regularPriceStyle:h}):null!==d&&null!==s?Object(o.createElement)(l,{className:y,currency:n,maxPrice:s,minPrice:d,priceClassName:O,priceStyle:g}):null!==m?Object(o.createElement)("span",{className:y},Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",O),currency:n,value:m,style:g})):Object(o.createElement)("span",{className:y},Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",O)}))}},167:function(e,t,r){"use strict";var n=r(0),c=r(58),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},17:function(e,t){!function(){e.exports=this.wp.blocks}()},171: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),s=r(102),u=r(6),l=r(60),b=function(e){var t=Object(s.a)();e=e||t;var r=Object(a.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(i.useCallback)((function(t){n(e,t)}),[e])]},p=function(e,t,r){var n=Object(s.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){u(r,e,t)}),[r,e])]},d=function(e,t){var r=Object(s.a)(),n=b(t=t||r),o=c()(n,2),a=o[0],p=o[1],d=Object(l.a)(e),f=Object(i.useRef)(!1);return Object(i.useEffect)((function(){p(Object(u.assign)({},a,d)),f.current=!0}),[d]),f.current?[a,p]:[e,p]}},175: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.U+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},176:function(e,t,r){"use strict";var n=r(0),c=r(142),o=r(95),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"&hellip;",n=i(e),c=n.split(" ").splice(0,t).join(" ");return Object(o.autop)(s(c,r))},l=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&hellip;",c=i(e),a=c.slice(0,t);if(r)return Object(o.autop)(s(a,n));var u=a.match(/([\s]+)/g),l=u?u.length:0,b=c.slice(0,t+l);return Object(o.autop)(s(b,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,b=void 0===s?"words":s,p=e.className,d=void 0===p?"":p,f=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),b=Object(c.count)(s,r);return b<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,b)}),[t,i,b]);return Object(n.createElement)(n.RawHTML,{className:d},f)}},18:function(e,t){!function(){e.exports=this.wp.url}()},184:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(24),s=r.n(i),u=r(19),l=r.n(u),b=r(22),p=r.n(b),d=r(23),f=r.n(d),m=r(12),O=r.n(m),g=r(8),j=r.n(g),v=r(0),h=r(9);r(259);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=y(n);function n(){var e;return a()(this,n),e=r.call(this),j()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(l()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(h.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(v.createElement)(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}},190:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return j}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=(r(2),r(36)),u=r(302),l=r(944),b=r(140),p=r(211),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),r=t.notices,n=t.removeNotice;if(e)return null;var c=r.filter((function(e){return"snackbar"===e.type}));return Object(i.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:n})};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(i.useContext)(O)},j=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(s.useDispatch)("core/notices"),f=p.createNotice,g=p.removeNotice,j=Object(i.useState)(!1),v=a()(j,2),h=v[0],y=v[1],w=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(e,t,m(m({},r),{},{context:r.context||b}))}),[f,b]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;g(e,t)}),[g,b]),_=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w("default",e,m(m({},t),{},{type:"snackbar"}))}),[w]),k={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:w,createSnackbarNotice:_,removeNotice:E,context:b,setIsSuppressed:y},P=h?null:Object(i.createElement)(u.a,{className:n,notices:k.notices}),C=h?null:Object(i.createElement)(d,null);return Object(i.createElement)(O.Provider,{value:k},o&&P,t,C)}},193:function(e,t){},199:function(e,t){},201:function(e,t){},206:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(41),c=r(36),o=r(0),a=r(155),i=r(60),s=function(e){var t=e.namespace,r=e.resourceName,s=e.resourceValues,u=void 0===s?[]:s,l=e.query,b=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),m=Object(i.a)(b),O=Object(i.a)(u),g=Object(a.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,m,O],a=c.getCollectionError.apply(c,o);return a&&g(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,O,m,d]);return null!==j&&(f.current=j),f.current}},211: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,s=void 0===i?{}:i,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:s};return Object(n.createElement)(o.Provider,{value:u},t)}},232:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(86),o=(r(2),r(239),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,i=e.elementId,s=void 0===i?"":i,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var p=l(a)||{};if(!p.message||p.hidden)return null;r=p.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(s)},r))})},236:function(e,t){},237:function(e,t){},238:function(e,t){},239:function(e,t){},25:function(e,t){!function(){e.exports=this.wp.compose}()},258:function(e,t,r){"use strict";r.d(t,"c",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m}));var n=r(8),c=r.n(n),o=r(56),a=r.n(o),i=r(3);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l,b,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,b=i.CURRENCY.symbolPosition,{left:l,left_space:" "+l,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,s=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 s?s:""}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u(u({},p),e)},m=function(e,t){if(""===e||void 0===e)return"";var r=parseInt(e,10);if(!Number.isFinite(r))return"";var n=f(t),c=r/Math.pow(10,n.minorUnit),o=n.prefix+c+n.suffix,a=document.createElement("textarea");return a.innerHTML=o,a.value}},259:function(e,t){},266:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),s=r.n(i),u=r(48),l=r(44),b=r(73);r(553);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)().product;if(!i.id||!i.on_sale)return null;var b="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(o.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,b,c()({},"".concat(n,"__product-onsale"),n))},Object(o.createElement)(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},267:function(e,t){!function(){e.exports=this.wp.deprecated}()},268:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(58),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]);return Object(i.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=r(283);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},283:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(58),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.a,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},301:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(15),a=r.n(o),i=r(37),s=r.n(i),u=r(21),l=r.n(u),b=r(24),p=r.n(b),d=r(19),f=r.n(d),m=r(22),O=r.n(m),g=r(23),j=r.n(g),v=r(12),h=r.n(v),y=r(0),w=r(6),E=r(25),_=(r(2),r(5)),k=r(40),P=r(43);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h()(e);if(t){var c=h()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return j()(this,r)}}var S=Object(E.createHigherOrderComponent)((function(e){var t=function(t){O()(o,t);var r,n=C(o);function o(){var e;return l()(this,o),(e=n.apply(this,arguments)).state={list:[],loading:!0},e.setError=e.setError.bind(f()(e)),e.debouncedOnSearch=Object(w.debounce)(e.onSearch.bind(f()(e)),400),e}return p()(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(k.h)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(k.h)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"setError",value:(r=s()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)(t);case 2:r=e.sent,this.setState({list:[],loading:!1,error:r});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.error,o=r.list,a=r.loading;return Object(y.createElement)(e,c()({},this.props,{error:n,products:o,isLoading:a,onSearch:_.v?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),o}(y.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=S},302:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(389),u=r(190),l=(r(237),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,r=e.notices,n=Object(u.b)().removeNotice,a=r.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=i()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))}},33:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},35:function(e,t){!function(){e.exports=this.moment}()},36:function(e,t){!function(){e.exports=this.wp.data}()},361:function(e,t,r){"use strict";var n=r(0),c=r(58),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},390:function(e,t){},391:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(5);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.X)()&&(s=i(i({},s),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=s},392:function(e,t,r){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},393:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=(r(2),r(7)),u=r.n(s),l=r(5),b=r(44),p=r(73),d=r(6),f=r(266);r(554);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var g=function(){return Object(i.createElement)("img",{src:l.G,alt:"",width:500,height:500})},j=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,o=t||{},a=o.thumbnail,s=o.src,u=o.srcset,l=o.sizes,b={alt:o.alt,onLoad:r,hidden:!n,src:a};return c&&(b=O(O({},b),{},{src:s,srcSet:u,sizes:l})),Object(i.createElement)(i.Fragment,null,Object(i.createElement)("img",b),!n&&Object(i.createElement)(g,null))};t.a=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,o=e.productLink,s=void 0===o||o,l=e.showSaleBadge,p=e.saleBadgeAlign,m=void 0===p?"right":p,O=Object(b.useInnerBlockLayoutContext)().parentClassName,v=Object(b.useProductDataContext)().product,h=Object(i.useState)(!1),y=a()(h,2),w=y[0],E=y[1];if(!v.id)return Object(i.createElement)("div",{className:u()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",c()({},"".concat(O,"__product-image"),O))},Object(i.createElement)(g,null));var _=Object(d.isEmpty)(v.images)?null:v.images[0];return Object(i.createElement)("div",{className:u()(t,"wc-block-components-product-image",c()({},"".concat(O,"__product-image"),O))},s?Object(i.createElement)("a",{href:v.permalink,rel:"nofollow"},!!l&&Object(i.createElement)(f.default,{align:m,product:v}),Object(i.createElement)(j,{image:_,onLoad:function(){return E(!0)},loaded:w,showFullSize:"cropped"!==n})):Object(i.createElement)(i.Fragment,null,!!l&&Object(i.createElement)(f.default,{align:m,product:v}),Object(i.createElement)(j,{image:_,onLoad:function(){return E(!0)},loaded:w,showFullSize:"cropped"!==n})))}))},394:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},i=function(e){return n(e,c.ERROR)},s=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},395:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(150),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},396:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d}));var n=r(15),c=r.n(n),o=r(56),a=r.n(o),i=r(37),s=r.n(i);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=[],s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(n));case 10:d=e.sent,"object"===a()(d)&&i.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=u(o),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},397:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},398:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(86),i=r(11),s=r.n(i),u=r(1),l=r(60),b=r(140),p=r(394),d=r(929),f="pristine",m="idle",O="disabled",g="processing",j="before_processing",v="after_processing",h={status:f,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},y="set_pristine",w="set_idle",E="set_disabled",_="set_processing",k="set_before_processing",P="set_after_processing",C="set_processing_response",S="set_has_error",N="set_no_error",x="set_quantity",D="set_request_params",B=y,z=w,R=E,T=_,I=k,L=P,A=C,V=S,F=N,M=x,H=D,q=function(){return{type:B}},U=function(){return{type:z}},Q=function(){return{type:R}},Y=function(){return{type:T}},W=function(){return{type:I}},X=function(){return{type:L}},G=function(e){return{type:A,data:e}},K=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?V:F;return{type:t}},$=function(e){return{type:M,quantity:e}},J=function(e){return{type:H,data:e}},Z=r(8),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=y,ce=w,oe=E,ae=_,ie=k,se=P,ue=C,le=S,be=N,pe=x,de=D,fe=f,me=m,Oe=O,ge=g,je=j,ve=v,he=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case ne:e=h;break;case ce:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case oe:e=t.status!==Oe?re(re({},t),{},{status:Oe}):t;break;case pe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case de:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),o)});break;case ue:e=re(re({},t),{},{processingResponse:o});break;case ae:e=!1===(e=t.status!==ge?re(re({},t),{},{status:ge,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case ie:e=t.status!==je?re(re({},t),{},{status:je,hasError:!1}):t;break;case se:e=t.status!==ve?re(re({},t),{},{status:ve}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===ge||t.status===je?re(re({},e),{},{status:me}):e;break;case be:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&c!==ne&&e.status===fe&&(e.status=me),e},ye=r(150),we=r(395),Ee="add_to_cart_before_processing",_e="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",Pe=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(we.a)(_e,e),onAddToCartProcessingWithError:Object(we.a)(ke,e),onAddToCartBeforeProcessing:Object(we.a)(Ee,e)}},Ce=r(396),Se=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ne=function(){return Object(n.useContext)(Se)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(he,h),i=s()(o,2),f=i[0],y=i[1],w=Object(n.useReducer)(ye.b,{}),E=s()(w,2),_=E[0],k=E[1],P=Object(l.a)(_),C=Object(b.a)(),S=C.addErrorNotice,N=C.removeNotices,x=Object(a.b)().setValidationErrors,D=Object(p.a)(),B=D.isSuccessResponse,z=D.isErrorResponse,R=D.isFailResponse,T=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Pe(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Pe(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Pe(k).onAddToCartBeforeProcessing}}),[k]),I=Object(n.useMemo)((function(){return{resetForm:function(){y(q())},submitForm:function(){y(W())},setQuantity:function(e){y($(e))},setHasError:function(e){y(K(e))},setRequestParams:function(e){y(J(e))},setAfterProcessing:function(e){y(G(e)),y(X())}}}),[]);Object(n.useEffect)((function(){var e=f.status,t=!r.id||!Object(d.a)(r);e!==O||t?e!==O&&t&&y(Q()):y(U())}),[f.status,r,y]),Object(n.useEffect)((function(){f.status===j&&(N("error"),Object(Ce.a)(P,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&x(r)})),y(U())):y(Y())})))}),[f.status,x,S,N,y,P]),Object(n.useEffect)((function(){if(f.status===v){var e={processingResponse:f.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;S(e.message,t)}};if(f.hasError)return void Object(Ce.b)(P,ke,e).then((function(r){if(z(r)||R(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");S(c,{id:"add-to-cart"})}y(U())}));Object(Ce.b)(P,_e,e).then((function(e){z(e)||R(e)?(t(e),y(K(!0))):y(U())}))}}),[f.status,f.hasError,f.processingResponse,I,S,z,R,B,P]);var L=Object(d.b)(r),A={product:r,productType:r.type||"simple",productIsPurchasable:Object(d.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:L,showFormElements:c&&L,quantity:f.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:f.requestParams,isIdle:f.status===m,isDisabled:f.status===O,isProcessing:f.status===g,isBeforeProcessing:f.status===j,isAfterProcessing:f.status===v,hasError:f.hasError,eventRegistration:T,dispatchActions:I};return Object(n.createElement)(Se.Provider,{value:A},t)},De=r(13),Be=r.n(De),ze=r(134),Re=r(33),Te=r(536);function Ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Le=function(){var e=Ne(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,i=e.hasError,l=e.isProcessing,p=e.requestParams,d=Object(a.b)(),f=d.hasValidationErrors,m=d.showAllValidationErrors,O=Object(b.a)(),g=O.addErrorNotice,j=O.removeNotice,v=Object(ze.a)().receiveCart,h=Object(n.useState)(!1),y=s()(h,2),w=y[0],E=y[1],_=!i&&l,k=Object(n.useCallback)((function(){return!f||(m(),{type:"error"})}),[f,m]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var P=Object(n.useCallback)((function(){E(!0),j("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ie(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},p);Be()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Be.a.setNonce(e.headers),e.json().then((function(r){e.ok?v(r):(r.body&&r.body.message?g(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):g(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&v(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,g,j,v,t,c,p]);return Object(n.useEffect)((function(){_&&!w&&P()}),[_,P,w]),null},Ae=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(a.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Le,null)))},Ve=r(44),Fe=r(6),Me=r(73),He=(r(390),r(99)),qe=r(61),Ue=r(563),Qe=r(842),Ye=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(He.a,{className:t,href:r,rel:"nofollow"},c)},We=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,i=e.onClick;return Object(n.createElement)(He.a,{className:t,disabled:o,showSpinner:c,onClick:i},a&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(qe.a,{srcElement:Ue.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},Xe=function(){var e=Ne(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,i=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(Qe.a)(o.id||0).cartQuantity,m=Object(n.useState)(!1),O=s()(m,2),g=O[0],j=O[1],v=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return p||j(!0),!0}),0);return function(){e()}}),[b,p]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(We,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:f,isDisabled:i,isProcessing:l,isDone:g,onClick:function(){return d.submitForm()}}):Object(n.createElement)(Ye,{className:"wc-block-components-product-add-to-cart-button",href:v.url,text:v.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Ke=function(e){var t=e.reason,r=void 0===t?Object(u.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Ke,null):t.id&&!t.is_in_stock?Object(n.createElement)(Ke,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Xe,null))},Je=(r(562),r(51)),Ze=r.n(Je),et=r(4),tt=r(9),rt=r(232),nt={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,i=e.value,s=void 0===i?"":i,l=e.onChange,b=void 0===l?function(){}:l,p=e.errorMessage,d=void 0===p?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):p,f=Object(a.b)(),m=f.getValidationError,O=f.setValidationErrors,g=f.clearValidationError,j=t,v=m(j)||{};return Object(tt.useEffect)((function(){s?g(j):O(ee()({},j,{message:d,hidden:!0}))}),[s,j,d,g,O]),Object(tt.useEffect)((function(){return function(){g(j)}}),[j,g]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Re.decodeEntities)(t),value:s||"",options:[nt].concat(Ze()(c)),onChange:b,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":v.message&&!v.hidden})}),Object(n.createElement)(rt.a,{propertyName:j,elementId:j}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},st=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],i=at(at({},r),{},ee()({},c,null)),s=o?it(e,t,i):null,u=null!==s?s.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Re.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(l.a)(t),a=Object(l.a)(r),i=Object(n.useState)(0),u=s()(i,2),b=u[0],p=u[1],d=Object(n.useState)({}),f=s()(d,2),m=f[0],O=f[1],g=Object(n.useMemo)((function(){return st(o,a,m)}),[m,o,a]);return Object(n.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(o).length?p(function(e,t,r){return it(e,t,r)[0]||0}(o,a,m)):b>0&&p(0)}),[m,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[c,b,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:g[e],value:m[e],onChange:function(t){O(lt(lt({},m),{},ee()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Fe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Ke,null):t.id&&!t.is_in_stock?Object(n.createElement)(Ke,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(pt,{product:t,dispatchers:a}),Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Xe,null))},ft=function(){return Object(n.createElement)(Xe,null)},mt=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Ot=function(){return Object(n.createElement)(mt,null)},gt=function(){var e=Ne(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(Ot,null):"external"===r?Object(n.createElement)(ft,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Xe,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Ve.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Fe.isEmpty)(c)});return Object(n.createElement)(Ae,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(gt,null)))}))},399:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(33),u=r(44),l=r(14),b=r(5),p=function(e){var t=e.color,r=e.fontSize;return Object(b.X)()?{color:t,fontSize:r}:{}},d=r(73);r(552),t.a=Object(d.withProductDataContext)((function(e){var t,r,n,a=e.className,d=e.headingLevel,f=void 0===d?2:d,m=e.productLink,O=void 0===m||m,g=e.align,j=e.color,v=e.customColor,h=e.fontSize,y=e.customFontSize,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,_="h".concat(f),k=Object(l.getColorClassName)("color",j),P=Object(l.getFontSizeClass)(h),C=i()((t={"has-text-color":j||v,"has-font-size":h||y},c()(t,k,k),c()(t,P,P),t));if(!E.id)return Object(o.createElement)(_,{className:i()(a,"wc-block-components-product-title",(n={},c()(n,"".concat(w,"__product-title"),w),c()(n,"wc-block-components-product-title--align-".concat(g),g&&Object(b.X)()),c()(n,C,Object(b.X)()),n)),style:p({color:v,fontSize:y})});var S=Object(s.decodeEntities)(E.name);return Object(o.createElement)(_,{className:i()(a,"wc-block-components-product-title",(r={},c()(r,"".concat(w,"__product-title"),w),c()(r,"wc-block-components-product-title--align-".concat(g),g&&Object(b.X)()),r))},O?Object(o.createElement)("a",{href:E.permalink,rel:"nofollow",className:i()(c()({},C,Object(b.X)())),style:p({color:v,fontSize:y})},S):Object(o.createElement)("span",{className:i()(c()({},C,Object(b.X)())),style:p({color:v,fontSize:y})},S))}))},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"f",(function(){return O})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return j})),r.d(t,"g",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(8),c=r.n(n),o=r(18),a=r(13),i=r.n(a),s=r(6),u=r(5);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,l=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:u.v?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},s),i))];return u.v&&r.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),l}({selected:r,search:c,queryArgs:void 0===a?[]:a});return Promise.all(l.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},d=function(e){return i()({path:"/wc/store/products/".concat(e)})},f=function(){return i()({path:"wc/store/products/attributes"})},m=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},O=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.y?100:0,orderby:u.y?"count":"name",order:u.y?"desc":"asc",search:n})];return u.y&&r.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),c}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},g=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},j=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},h=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},41:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},43:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(15),c=r.n(n),o=r(37),a=r.n(o),i=function(){var e=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}()},44:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48: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),s=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,b=null!=r,p=null!=n;return!b&&p?(t=c||"span",u=l(l({},u),{},{className:s()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,n)):(t=c||a.Fragment,b&&p&&r!==n?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,u,r))}},49:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(47));t.a=function(e){var t,r,a,i=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=i).message,a=t.type,r?"general"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},5:function(e,t,r){"use strict";r.d(t,"l",(function(){return c})),r.d(t,"K",(function(){return o})),r.d(t,"Q",(function(){return a})),r.d(t,"A",(function(){return i})),r.d(t,"C",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"B",(function(){return l})),r.d(t,"E",(function(){return b})),r.d(t,"o",(function(){return p})),r.d(t,"D",(function(){return d})),r.d(t,"n",(function(){return f})),r.d(t,"G",(function(){return m})),r.d(t,"v",(function(){return O})),r.d(t,"y",(function(){return g})),r.d(t,"s",(function(){return j})),r.d(t,"t",(function(){return v})),r.d(t,"u",(function(){return h})),r.d(t,"k",(function(){return y})),r.d(t,"M",(function(){return w})),r.d(t,"R",(function(){return E})),r.d(t,"q",(function(){return _})),r.d(t,"r",(function(){return k})),r.d(t,"p",(function(){return P})),r.d(t,"J",(function(){return C})),r.d(t,"c",(function(){return S})),r.d(t,"w",(function(){return N})),r.d(t,"x",(function(){return x})),r.d(t,"U",(function(){return B})),r.d(t,"V",(function(){return z})),r.d(t,"L",(function(){return R})),r.d(t,"a",(function(){return T})),r.d(t,"O",(function(){return I})),r.d(t,"b",(function(){return L})),r.d(t,"N",(function(){return A})),r.d(t,"F",(function(){return V})),r.d(t,"i",(function(){return F})),r.d(t,"P",(function(){return q})),r.d(t,"h",(function(){return U})),r.d(t,"j",(function(){return Q})),r.d(t,"I",(function(){return Y})),r.d(t,"H",(function(){return W})),r.d(t,"T",(function(){return X})),r.d(t,"S",(function(){return G})),r.d(t,"d",(function(){return K})),r.d(t,"e",(function(){return $})),r.d(t,"f",(function(){return J})),r.d(t,"g",(function(){return Z})),r.d(t,"z",(function(){return ee})),r.d(t,"Y",(function(){return re})),r.d(t,"Z",(function(){return ne})),r.d(t,"W",(function(){return ce})),r.d(t,"X",(function(){return oe}));var n=r(3),c=Object(n.getSetting)("currentUserIsAdmin",!1),o=Object(n.getSetting)("reviewRatingsEnabled",!0),a=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),u=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),p=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),f=Object(n.getSetting)("default_height",500),m=Object(n.getSetting)("placeholderImgSrc",""),O=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),v=Object(n.getSetting)("hasTags",!0),h=Object(n.getSetting)("homeUrl",""),y=Object(n.getSetting)("couponsEnabled",!0),w=Object(n.getSetting)("shippingEnabled",!0),E=Object(n.getSetting)("taxesEnabled",!0),_=Object(n.getSetting)("displayItemizedTaxes",!1),k=Object(n.getSetting)("hasDarkEditorStyleSupport",!1),P=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),C=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),N=Object(n.getSetting)("isShippingCalculatorEnabled",!0),x=Object(n.getSetting)("isShippingCostHidden",!1),D=Object(n.getSetting)("woocommerceBlocksPhase",1),B=Object(n.getSetting)("wcBlocksAssetUrl",""),z=Object(n.getSetting)("wcBlocksBuildUrl",""),R=Object(n.getSetting)("shippingCountries",{}),T=Object(n.getSetting)("allowedCountries",{}),I=Object(n.getSetting)("shippingStates",{}),L=Object(n.getSetting)("allowedStates",{}),A=Object(n.getSetting)("shippingMethodsExist",!1),V=Object(n.getSetting)("paymentGatewaySortOrder",[]),F=Object(n.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},H=Object(n.getSetting)("storePages",{shop:M,cart:M,checkout:M,privacy:M,terms:M}),q=H.shop.permalink,U=H.checkout.id,Q=H.checkout.permalink,Y=H.privacy.permalink,W=H.privacy.title,X=H.terms.permalink,G=H.terms.title,K=H.cart.id,$=H.cart.permalink,J=Object(n.getSetting)("checkoutAllowsGuest",!1),Z=Object(n.getSetting)("checkoutAllowsSignup",!1),ee=Object(n.getSetting)("loginUrl","/wp-login.php"),te=r(17),re=function(e,t){if(D>2)return Object(te.registerBlockType)(e,t)},ne=function(e,t){if(D>1)return Object(te.registerBlockType)(e,t)},ce=function(){return D>2},oe=function(){return D>1}},533:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(164),u=r(258),l=r(44),b=r(14),p=r(5),d=r(73);t.default=Object(d.withProductDataContext)((function(e){var t,r,n,a,d,f,m,O=e.className,g=e.align,j=e.fontSize,v=e.customFontSize,h=e.saleFontSize,y=e.customSaleFontSize,w=e.color,E=e.customColor,_=e.saleColor,k=e.customSaleColor,P=Object(l.useInnerBlockLayoutContext)().parentClassName,C=Object(l.useProductDataContext)().product,S=i()(O,c()({},"".concat(P,"__product-price"),P));if(!C.id)return Object(o.createElement)(s.a,{align:g,className:S});var N=Object(b.getColorClassName)("color",w),x=Object(b.getFontSizeClass)(j),D=Object(b.getColorClassName)("color",_),B=Object(b.getFontSizeClass)(h),z=i()((t={"has-text-color":w||E,"has-font-size":j||v},c()(t,N,N),c()(t,x,x),t)),R=i()((r={"has-text-color":_||k,"has-font-size":h||y},c()(r,D,D),c()(r,B,B),r)),T={color:E,fontSize:v},I={color:k,fontSize:y},L=C.prices,A=Object(u.c)(L),V=L.price!==L.regular_price,F=V?i()((n={},c()(n,"".concat(P,"__product-price__value"),P),c()(n,R,Object(p.X)()),n)):i()((a={},c()(a,"".concat(P,"__product-price__value"),P),c()(a,z,Object(p.X)()),a)),M=V?I:T;return Object(o.createElement)(s.a,{align:g,className:S,currency:A,price:L.price,priceClassName:F,priceStyle:Object(p.X)()?M:{},minPrice:null==L||null===(d=L.price_range)||void 0===d?void 0:d.min_amount,maxPrice:null==L||null===(f=L.price_range)||void 0===f?void 0:f.max_amount,regularPrice:L.regular_price,regularPriceClassName:i()((m={},c()(m,"".concat(P,"__product-price__regular"),P),c()(m,z,Object(p.X)()),m)),regularPriceStyle:Object(p.X)()?T:{}})}))},534:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(7),s=r.n(i),u=r(44),l=r(73),b=(r(555),function(e){var t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0});t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product,i=b(n);if(!i)return null;var l={width:i/5*100+"%"},p=Object(a.sprintf)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),i);return Object(o.createElement)("div",{className:s()(t,"star-rating","wc-block-components-product-rating",c()({},"".concat(r,"__product-rating"),r))},Object(o.createElement)("div",{className:s()("wc-block-components-product-rating__stars","".concat(r,"__product-rating__stars")),role:"img","aria-label":p},Object(o.createElement)("span",{style:l},p)))}))},535:function(e,t,r){"use strict";r.r(t);var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(0),s=(r(2),r(7)),u=r.n(s),l=r(1),b=r(842),p=r(33),d=r(536),f=r(44),m=r(73),O=(r(556),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,s=t.has_options,f=t.is_purchasable,m=t.is_in_stock,O=Object(b.a)(n),g=O.cartQuantity,j=O.addingToCart,v=O.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.c)()}),[g]);var h=Number.isFinite(g)&&g>0,y=!s&&f&&m,w=Object(p.decodeEntities)((null==a?void 0:a.description)||""),E=h?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",g,"woo-gutenberg-products-block"),g):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),_=y?"button":"a",k={};return y?k.onClick=function(){v()}:(k.href=o,k.rel="nofollow"),Object(i.createElement)(_,c()({"aria-label":w,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:h}),disabled:j},k),E)}),g=function(){return Object(i.createElement)("button",{className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};t.default=Object(m.withProductDataContext)((function(e){var t=e.className,r=Object(f.useInnerBlockLayoutContext)().parentClassName,n=Object(f.useProductDataContext)().product;return Object(i.createElement)("div",{className:u()(t,"wp-block-button","wc-block-components-product-button",a()({},"".concat(r,"__product-add-to-cart"),r))},n.id?Object(i.createElement)(O,{product:n}):Object(i.createElement)(g,null))}))},536:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a}));var n=window.Event||null,c=function(e,t){var r=t.bubbles,c=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element;if(i||(i=document.body),"function"==typeof n){var s=new n(e,{bubbles:c,cancelable:a});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,a),i.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var o=function(){c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},537:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=(r(2),r(7)),i=r.n(a),s=r(176),u=r(3),l=r(44),b=r(73);r(557);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product;if(!n)return Object(o.createElement)("div",{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r))});var a=n.short_description?n.short_description:n.description;if(!a)return null;var b=Object(u.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r)),source:a,maxLength:150,countType:b})}))},538:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(73);r(558);t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product.sku;return n?Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-sku",c()({},"".concat(r,"__product-sku"),r))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,n)):null}))},539:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(6),b=r(73);r(559);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-category-list",c()({},"".concat(r,"__product-category-list"),r))},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"category-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},54:function(e,t){!function(){e.exports=this.wp.keycodes}()},540:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(6),b=r(73);r(560);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-tag-list",c()({},"".concat(r,"__product-tag-list"),r))},Object(a.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},541:function(e,t,r){"use strict";r.r(t);var n=r(8),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(7)),s=r.n(i),u=r(44),l=r(73),b=(r(561),function(e){return Object(a.sprintf)(Object(a.__)("%d left in stock","woo-gutenberg-products-block"),e)}),p=function(e,t){return t?Object(a.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(a.__)("In Stock","woo-gutenberg-products-block"):Object(a.__)("Out of Stock","woo-gutenberg-products-block")};t.default=Object(l.withProductDataContext)((function(e){var t,r=e.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;if(!a.id||!a.is_purchasable)return null;var i=!!a.is_in_stock,l=a.low_stock_remaining,d=a.is_on_backorder;return Object(o.createElement)("div",{className:s()(r,"wc-block-components-product-stock-indicator",(t={},c()(t,"".concat(n,"__stock-indicator"),n),c()(t,"wc-block-components-product-stock-indicator--in-stock",i),c()(t,"wc-block-components-product-stock-indicator--out-of-stock",!i),c()(t,"wc-block-components-product-stock-indicator--low-stock",!!l),c()(t,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),t))},l?b(l):p(i,d))}))},542: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}},55:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(8),a=r.n(o),i=r(27),s=r.n(i),u=r(0),l=r(183),b=r(7),p=r.n(b);r(193);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,o=e.onValueChange,a=s()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var i=r/Math.pow(10,n.minorUnit);if(!Number.isFinite(i))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=f(f(f({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),m=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:i,onValueChange:m}))}},552:function(e,t){},553:function(e,t){},554:function(e,t){},555:function(e,t){},556:function(e,t){},557:function(e,t){},558:function(e,t){},559:function(e,t){},560:function(e,t){},561:function(e,t){},562:function(e,t){},563:function(e,t,r){"use strict";var n=r(0),c=r(58),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},57:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},6:function(e,t){!function(){e.exports=this.lodash}()},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},61:function(e,t,r){"use strict";var n=r(8),c=r.n(n),o=r(27),a=r.n(o),i=r(9);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))}},73:function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},74:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(21),a=r.n(o),i=r(24),s=r.n(i),u=r(19),l=r.n(u),b=r(22),p=r.n(b),d=r(23),f=r.n(d),m=r(12),O=r.n(m),g=r(0),j=r(6),v=r(7),h=r.n(v),y=r(4),w=r(25);r(122);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}var _=function(e){p()(r,e);var t=E(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,o=r.checked,a=r.instanceId,i=r.className,s=r.help,u=r.options,l=r.value,b="inspector-toggle-button-control-".concat(a);return s&&(e=Object(j.isFunction)(s)?s(o):s),Object(g.createElement)(y.BaseControl,{id:b,help:e,className:h()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((function(e,r){var o={};return l===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isDefault=!0,o["aria-pressed"]=!1),Object(g.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},o),e.label)}))))}}]),r}(g.Component);t.a=Object(w.withInstanceId)(_)},75:function(e,t){!function(){e.exports=this.wp.hooks}()},77:function(e,t){!function(){e.exports=this.ReactDOM}()},78:function(e,t){!function(){e.exports=this.wp.dom}()},81: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,s=e.setAttributes,u=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(o.clamp)(e,i.C,i.A);s({columns:Object(o.isNaN)(t)?"":t})},min:i.C,max:i.A}),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.E,i.B);s({rows:Object(o.isNaN)(t)?"":t})},min:i.E,max:i.B}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:u?Object(c.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return s({alignButtons:!u})}}))}},811:function(e,t,r){"use strict";var n=r(0),c=r(58),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},818:function(e,t,r){"use strict";var n=r(0),c=r(58),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},826:function(e,t,r){"use strict";var n=r(0),c=r(58),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},827: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.U+"img/pennant.jpg",thumbnail:c.U+"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}]},83:function(e,t){!function(){e.exports=this.wp.viewport}()},832:function(e,t,r){"use strict";var n=r(0),c=r(58),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},839:function(e,t,r){e.exports=r(899)},840:function(e,t){},841:function(e,t){},842: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(134),s=r(41),u=r(33),l=r(140),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)(s.CART_STORE_KEY).addItemToCart,r=Object(i.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(l.a)(),f=d.addErrorNotice,m=d.removeNotice,O=Object(o.useState)(!1),g=c()(O,2),j=g[0],v=g[1],h=Object(o.useRef)(b(n,e));return Object(o.useEffect)((function(){var t=b(n,e);t!==h.current&&(h.current=t)}),[n,e]),{cartQuantity:Number.isFinite(h.current)?h.current:0,addingToCart:j,cartIsLoading:p,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){f(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},844:function(e,t,r){"use strict";var n=r(0),c=r(58),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},845:function(e,t){},846:function(e,t){},847:function(e,t){},848:function(e,t){},86:function(e,t,r){"use strict";r.d(t,"b",(function(){return f})),r.d(t,"a",(function(){return m}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(6),u=r(46),l=r.n(u);function b(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 p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=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}}),f=function(){return Object(i.useContext)(d)},m=function(e){var t=e.children,r=Object(i.useState)({}),n=a()(r,2),o=n[0],u=n[1],b=Object(i.useCallback)((function(e){return o[e]}),[o]),f=Object(i.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),m=Object(i.useCallback)((function(e){u((function(t){return t[e]?Object(s.omit)(t,[e]):t}))}),[]),O=Object(i.useCallback)((function(){u({})}),[]),g=Object(i.useCallback)((function(e){e&&u((function(t){return e=Object(s.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:p(p({},t),e)}))}),[]),j=Object(i.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=p(p({},r[e]),t);return l()(r[e],n)?r:p(p({},r),{},c()({},e,n))}))}),[]),v={getValidationError:b,setValidationErrors:g,clearValidationError:m,clearAllValidationErrors:O,hideValidationError:Object(i.useCallback)((function(e){j(e,{hidden:!0})}),[j]),showValidationError:Object(i.useCallback)((function(e){j(e,{hidden:!1})}),[j]),showAllValidationErrors:Object(i.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=p(p({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:p(p({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:f};return Object(i.createElement)(d.Provider,{value:v},t)}},87:function(e,t){!function(){e.exports=this.wp.a11y}()},899: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),s=r(1),u=r(14),l=r(17),b=r(61),p=r(58),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"})),f=r(5),m=r(7),O=r.n(m),g=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:O()("is-loading",t.className)})},j={category:"woocommerce-product-elements",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:Object(f.W)()?null:["@woocommerce/all-products","@woocommerce/single-product"],save:g,deprecated:[{save:function(){}}]},v=r(391),h=r(4),y=r(25),w=r(152),E=r(399),_=r(11),k=r.n(_),P=r(143),C=r(27),S=r.n(C);r(841);var N=function(e){var t=e.className,r=void 0===t?"":t,n=S()(e,["className"]),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(h.Button,a()({className:c},n))},x=r(44),D=(r(840),function(e){return function(t){return function(r){var n=Object(x.useProductDataContext)(),c=r.attributes,o=r.setAttributes,a=c.productId,l=Object(i.useState)(!a),b=k()(l,2),p=b[0],d=b[1];return n.hasContext?Object(i.createElement)(t,r):Object(i.createElement)(i.Fragment,null,p?Object(i.createElement)(h.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(i.createElement)("div",null,e.description),Object(i.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(i.createElement)(P.a,{selected:a||0,showVariations:!0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o({productId:e[0]?e[0].id:0})}}),Object(i.createElement)(h.Button,{isDefault:!0,disabled:!a,onClick:function(){d(!1)}},Object(s.__)("Done","woo-gutenberg-products-block")))):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.Toolbar,null,Object(i.createElement)(N,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),B=Object(i.createElement)(p.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 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"})),z=Object(s.__)("Product Title","woo-gutenberg-products-block"),R=Object(i.createElement)(b.a,{srcElement:B}),T=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),I=function(e){var t=e.color,r=e.fontSize,n=e.setFontSize,c=e.setColor,o=e.attributes,a=e.setAttributes,l=o.headingLevel,b=o.productLink,p=o.align;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(w.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:l,onChange:function(e){return a({headingLevel:e})}}),Object(f.X)()&&Object(i.createElement)(u.AlignmentToolbar,{value:p,onChange:function(e){a({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:b,onChange:function(){return a({productLink:!b})}})),Object(f.X)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Text settings","woo-gutenberg-products-block")},Object(i.createElement)(u.FontSizePicker,{value:r.size,onChange:n})),Object(i.createElement)(u.PanelColorSettings,{title:Object(s.__)("Color settings","woo-gutenberg-products-block"),colorSettings:[{value:t.color,onChange:c,label:Object(s.__)("Text color","woo-gutenberg-products-block")}]}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(E.a,o)))},L=Object(f.X)()?Object(y.compose)([Object(u.withFontSizes)("fontSize"),Object(u.withColors)("color",{textColor:"color"}),D({icon:R,label:z,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(I):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 V(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F={title:z,description:T,icon:{src:R,foreground:"#874FB9"},attributes:v.a,edit:L};Object(l.registerBlockType)("woocommerce/product-title",V(V({},j),F));var M=r(533),H=r(361),q=Object(s.__)("Product Price","woo-gutenberg-products-block"),U=Object(i.createElement)(b.a,{srcElement:H.a}),Q=Object(s.__)("Display the price of a product.","woo-gutenberg-products-block"),Y=function(e){var t=e.fontSize,r=e.setFontSize,n=e.color,c=e.setColor,o=e.colorLabel;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.FontSizePicker,{value:t.size,onChange:r}),Object(i.createElement)(h.BaseControl,{label:o},Object(i.createElement)(u.ColorPalette,{value:n.color,onChange:c,label:Object(s.__)("Color")})))},W=function(e){var t=e.fontSize,r=e.saleFontSize,n=e.setFontSize,c=e.setSaleFontSize,o=e.color,a=e.saleColor,l=e.setColor,b=e.setSaleColor,p=e.attributes,d=e.setAttributes,m=p.align;return Object(i.createElement)(i.Fragment,null,Object(f.X)()&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(u.AlignmentToolbar,{value:m,onChange:function(e){d({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(f.X)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Price","woo-gutenberg-products-block")},Object(i.createElement)(Y,{color:o,setColor:l,fontSize:t,setFontSize:n,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Sale price","woo-gutenberg-products-block")},Object(i.createElement)(Y,{color:a,setColor:b,fontSize:r,setFontSize:c,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})))),Object(i.createElement)(M.default,p))},X=Object(f.X)()?Object(y.compose)([Object(u.withFontSizes)("fontSize"),Object(u.withFontSizes)("saleFontSize"),Object(u.withFontSizes)("originalFontSize"),Object(u.withColors)("color",{textColor:"color"}),Object(u.withColors)("saleColor",{textColor:"saleColor"}),Object(u.withColors)("originalColor",{textColor:"originalColor"}),D({icon:U,label:q,description:Object(s.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(W):W;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 K(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 $={productId:{type:"number",default:0}};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 Z(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){c()(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}Object(f.X)()&&($=K(K({},$),{},{align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}}));var ee={title:q,description:Q,icon:{src:U,foreground:"#874FB9"},attributes:$,edit:X};Object(l.registerBlockType)("woocommerce/product-price",Z(Z({},j),ee));var te=r(392),re=r(191),ne=r(74),ce=r(3),oe=r(393),ae=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"})),ie=Object(s.__)("Product Image","woo-gutenberg-products-block"),se=Object(i.createElement)(b.a,{srcElement:ae}),ue=Object(s.__)("Display the main product image","woo-gutenberg-products-block"),le=D({icon:se,label:ie,description:Object(s.__)("Choose a product to display its image.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=t.productLink,c=t.imageSizing,o=t.showSaleBadge,a=t.saleBadgeAlign;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(s.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showSaleBadge:!o})}}),o&&Object(i.createElement)(ne.a,{label:Object(s.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(s.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(s.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(s.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(ne.a,{label:Object(s.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(re.a)(Object(s.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(ce.getAdminLink)("customize.php"),"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images"),target:"_blank",rel:"noopener noreferrer"})}),value:c,options:[{label:Object(s.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(s.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:function(e){return r({imageSizing:e})}}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(oe.a,t)))}));function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var de={title:ie,description:ue,icon:{src:se,foreground:"#874FB9"},attributes:te.a,edit:le};Object(l.registerBlockType)("woocommerce/product-image",pe(pe({},j),de));var fe={productId:{type:"number",default:0}},me=r(534),Oe=r(826),ge=Object(s.__)("Product Rating","woo-gutenberg-products-block"),je=Object(i.createElement)(b.a,{srcElement:Oe.a});function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye={title:ge,description:Object(s.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:je,foreground:"#874FB9"},attributes:fe,edit:D({icon:je,label:ge,description:Object(s.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(me.default,t)}))};Object(l.registerBlockType)("woocommerce/product-rating",he(he({},j),ye));var we={productId:{type:"number",default:0}},Ee=r(535),_e=r(844),ke=Object(s.__)("Add to Cart Button","woo-gutenberg-products-block"),Pe=Object(i.createElement)(b.a,{srcElement:_e.a});function Ce(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?Ce(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={title:ke,description:Object(s.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:Pe,foreground:"#874FB9"},attributes:we,edit:D({icon:Pe,label:ke,description:Object(s.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Ee.default,t))}))};Object(l.registerBlockType)("woocommerce/product-button",Se(Se({},j),Ne));var xe={productId:{type:"number",default:0}},De=r(537),Be=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"})),ze=Object(s.__)("Product Summary","woo-gutenberg-products-block"),Re=Object(i.createElement)(b.a,{srcElement:Be});function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ie(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Le={title:ze,description:Object(s.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Re,foreground:"#874FB9"},attributes:xe,edit:D({icon:Re,label:ze,description:Object(s.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(De.default,t)}))};Object(l.registerBlockType)("woocommerce/product-summary",Ie(Ie({},j),Le));var Ae={productId:{type:"number",default:0}},Ve=r(266),Fe=r(818),Me=Object(s.__)("On-Sale Badge","woo-gutenberg-products-block"),He=Object(i.createElement)(b.a,{srcElement:Fe.a});function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qe={title:Me,description:Object(s.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:He,foreground:"#874FB9"},supports:{html:!1},attributes:Ae,edit:D({icon:He,label:Me,description:Object(s.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(Ve.default,t)}))};Object(l.registerBlockType)("woocommerce/product-sale-badge",Ue(Ue({},j),Qe));var Ye={productId:{type:"number",default:0}},We=r(135),Xe=r(538),Ge=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"})),Ke=Object(s.__)("Product SKU","woo-gutenberg-products-block"),$e=Object(i.createElement)(b.a,{srcElement:Ge});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 Ze(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 et={title:Ke,description:Object(s.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:$e,foreground:"#874FB9"},attributes:Ye,edit:D({icon:$e,label:Ke,description:Object(s.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(Xe.default,t))}))};Object(f.Y)("woocommerce/product-sku",Ze(Ze({},j),et));var tt={productId:{type:"number",default:0}},rt=r(539),nt=r(811),ct=Object(s.__)("Product Category List","woo-gutenberg-products-block"),ot=Object(i.createElement)(b.a,{srcElement:nt.a});function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st={title:ct,description:Object(s.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:ot,foreground:"#874FB9"},attributes:tt,edit:D({icon:ot,label:ct,description:Object(s.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(rt.default,t)))}))};Object(f.Y)("woocommerce/product-category-list",it(it({},j),st));var ut={productId:{type:"number",default:0}},lt=r(540),bt=Object(s.__)("Product Tag List","woo-gutenberg-products-block"),pt=Object(i.createElement)(b.a,{srcElement:Fe.a});function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt={title:bt,description:Object(s.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:pt,foreground:"#874FB9"},attributes:ut,edit:D({icon:pt,label:bt,description:Object(s.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(lt.default,t)))}))};Object(f.Y)("woocommerce/product-tag-list",ft(ft({},j),mt));var Ot={productId:{type:"number",default:0}},gt=r(541),jt=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"}))),vt=Object(s.__)("Product Stock Indicator","woo-gutenberg-products-block"),ht=Object(i.createElement)(b.a,{srcElement:jt});function yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Et={title:vt,description:Object(s.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:ht,foreground:"#874FB9"},attributes:Ot,edit:D({icon:ht,label:vt,description:Object(s.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(We.a,null),Object(i.createElement)(gt.default,t))}))};Object(f.Y)("woocommerce/product-stock-indicator",wt(wt({},j),Et));var _t=r(929),kt=(r(390),r(398)),Pt=Object(s.__)("Add to Cart","woo-gutenberg-products-block"),Ct=Object(i.createElement)(b.a,{srcElement:_e.a});function St(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?St(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xt={title:Pt,description:Object(s.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:Ct,foreground:"#874FB9"},edit:D({icon:Ct,label:Pt,description:Object(s.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=Object(x.useProductDataContext)().product,c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:O()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(We.a,{productId:n.id}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block")},Object(_t.b)(n)?Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Display form elements","woo-gutenberg-products-block"),help:Object(s.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showFormElements:!o})}}):Object(i.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(s.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(kt.a,t)))})),attributes:r(397).a};Object(f.Y)("woocommerce/product-add-to-cart",Nt(Nt({},j),xt));var Dt=r(21),Bt=r.n(Dt),zt=r(19),Rt=r.n(zt),Tt=r(22),It=r.n(Tt),Lt=r(23),At=r.n(Lt),Vt=r(12),Ft=r.n(Vt),Mt=r(36),Ht=(r(2),r(81)),qt=r(927),Ut=r(827),Qt=r(167),Yt=function(e,t){var r=t.className,n=t.contentVisibility;return O()(e,r,{"has-image":n&&n.image,"has-title":n&&n.title,"has-rating":n&&n.rating,"has-price":n&&n.price,"has-button":n&&n.button})},Wt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(s.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-products__add-product-button",isDefault:!0,isLarge:!0,href:ce.ADMIN_URL+"post-new.php?post_type=product"},Object(s.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:Qt.a})),Object(i.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(s.__)("Learn more","woo-gutenberg-products-block")))},Xt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(s.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function 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 $t=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],Jt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,Kt(Kt({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};r(845);function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tr=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:er(er({},r),{},{orderBy:!r.orderBy})})}})},rr=function(e,t){return Object(i.createElement)(h.SelectControl,{label:Object(s.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(s.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(s.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(s.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(s.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(s.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(s.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},nr=r(24),cr=r.n(nr),or=r(9),ar=r(56),ir=r.n(ar),sr=r(6),ur=r(48),lr=(r(848),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,u=function(e,t,r){if(r<=2)return{minIndex:null,maxIndex:null};var n=e-1,c=Math.max(Math.floor(t-n/2),2),o=Math.min(Math.ceil(t+(n-(t-c))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(o-t))),2),maxIndex:o}}(c,t,a),l=u.minIndex,b=u.maxIndex,p=r&&Boolean(1!==l),d=r&&Boolean(b!==a),f=r&&Boolean(l>3),m=r&&Boolean(b<a-2);p&&3===l&&(l-=1),d&&b===a-2&&(b+=1);var g=[];if(l&&b)for(var j=l;j<=b;j++)g.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(ur.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t-1)},title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(ur.a,{label:"<",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return o(1)},disabled:1===t},Object(i.createElement)(ur.a,{label:1,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),g.map((function(e){return Object(i.createElement)("button",{key:e,className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return o(e)},disabled:t===e},Object(i.createElement)(ur.a,{label:e,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),e)}))})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===a,"wc-block-components-pagination__page--active":t===a}),onClick:function(){return o(a)},disabled:t===a},Object(i.createElement)(ur.a,{label:a,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),a)})),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t+1)},title:Object(s.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(ur.a,{label:">",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))});lr.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var br=lr,pr=r(149),dr=(r(847),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(pr.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:r,options:[{key:"menu_order",label:Object(s.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(s.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(s.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(s.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(s.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(s.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:c})}),fr=r(192),mr=Object(fr.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(x.useInnerBlockLayoutContext)(),s=o.parentClassName,u=o.parentName,l=0===Object.keys(t).length,b=O()("".concat(s,"__product"),"wc-block-layout",{"is-loading":l});return Object(i.createElement)("li",{className:b,"aria-hidden":l},function e(t,r,n,c){if(n){var o=Object(qt.a)(t);return n.map((function(n,s){var u=k()(n,2),l=u[0],b=u[1],p=void 0===b?{}:b,d=[];p.children&&p.children.length>0&&(d=e(t,r,p.children,c));var f=o[l];if(!f)return null;var m=r.id||0,O=["layout",l,s,c,m];return Object(i.createElement)(i.Suspense,{key:O.join("_"),fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},Object(i.createElement)(f,a()({},p,{children:d,product:r})))}))}}(u,t,c,n))})),Or=r(171),gr=r(206),jr=r(41),vr=r(60);function hr(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 yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wr=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(gr.a)(yr(yr({},t),{},{query:e})),n=r.results,c=r.isLoading,o=function(e,t){var r=t.namespace,n=t.resourceName,c=t.resourceValues,o=void 0===c?[]:c,a=t.query,i=void 0===a?{}:a;if(!r||!n)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var s=Object(vr.a)(i),u=Object(vr.a)(o),l=Object(Mt.useSelect)((function(t){var c=t(jr.COLLECTIONS_STORE_KEY),o=[e,r,n,s,u];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,u,s]),b=l.value,p=l.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",yr(yr({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},Er=r(542),_r=r(184),kr=r(87),Pr=(r(846),r(144)),Cr=function(){var e=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(e,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:Pr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(e,"__no-products-title")},Object(s.__)("No products","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(e,"__no-products-description")},Object(s.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Sr=r(832),Nr=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(n,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(n,"__no-products-image"),alt:"",srcElement:Sr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(n,"__no-products-title")},Object(s.__)("No products found","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(n,"__no-products-description")},Object(s.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(i.createElement)("button",{onClick:r},Object(s.__)("Reset Search","woo-gutenberg-products-block")))};function xr(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 Dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Br=Object(_r.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,u=Object(Or.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return Dr(Dr({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:c*o,page:r})}({attributes:t,sortValue:o,currentPage:r})),l=k()(u,1)[0],b=wr(l),p=b.products,d=b.totalProducts,f=b.productsLoading,m=Object(x.useInnerBlockLayoutContext)().parentClassName,g=function(e){e.order,e.orderby,e.page,e.per_page;return S()(e,["order","orderby","page","per_page"])}(l),j=Object(Or.b)("attributes",[]),v=k()(j,2),h=v[0],y=v[1],w=Object(Or.b)("min_price"),E=k()(w,2),_=E[0],P=E[1],C=Object(Or.b)("max_price"),N=k()(C,2),D=N[0],B=N[1],z=Object(Er.a)({totalQuery:g,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(sr.isEqual)(t,c)&&Number.isFinite(r)})),R="object"===ir()(z)&&Object(sr.isEqual)(g,z.totalQuery);Object(i.useEffect)((function(){R||(n(1),z&&function(e){Number.isFinite(e)&&(0===e?Object(kr.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(kr.speak)(Object(s.sprintf)(Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[l]);var T,I,L,A,V,F=t.contentVisibility,M=t.columns*t.rows,H=!Number.isFinite(d)&&R?Math.ceil(z.totalProducts/M):Math.ceil(d/M),q=p.length?p:Array.from({length:M}),U=0!==p.length||f,Q=h.length>0||Number.isFinite(_)||Number.isFinite(D);return Object(i.createElement)("div",{className:(T=t.columns,I=t.rows,L=t.alignButtons,A=t.align,V=void 0!==A?"align"+A:"",O()(m,V,"has-"+T+"-columns",{"has-multiple-rows":I>1,"has-aligned-buttons":L}))},F.orderBy&&U&&Object(i.createElement)(dr,{onChange:c,value:o}),!U&&Q&&Object(i.createElement)(Nr,{resetCallback:function(){y([]),P(null),B(null)}}),!U&&!Q&&Object(i.createElement)(Cr,null),U&&Object(i.createElement)("ul",{className:"".concat(m,"__products")},q.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)(mr,{key:e.id||r,attributes:t,product:e})}))),H>1&&Object(i.createElement)(br,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:H}))})),zr=function(e){var t=e.attributes,r=Object(i.useState)(1),n=k()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=k()(a,2),u=s[0],l=s[1];Object(i.useEffect)((function(){l(t.orderby)}),[t.orderby]);return Object(i.createElement)(Br,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;l(t),o(1)},sortValue:u})},Rr=r(175);function Tr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return At()(this,r)}}var Ir=function(e){It()(r,e);var t=Tr(r);function r(){return Bt()(this,r),t.apply(this,arguments)}return cr()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?Rr.a:Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(zr,{attributes:t,urlParameterSuffix:r}))}}]),r}(or.Component);function Lr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return At()(this,r)}}var Ar=function(e){It()(r,e);var t=Lr(r);function r(){var e;Bt()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),c()(Rt()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(Rt()(e),"blockMap",Object(qt.a)("woocommerce/all-products")),c()(Rt()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(Rt()(e),"getTitle",(function(){return Object(s.__)("All Products","woo-gutenberg-products-block")})),c()(Rt()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(Rt()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(s.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(Rt()(e),"getInspectorControls",(function(){var t=e.props,r=t.attributes,n=t.setAttributes,c=r.columns,o=r.rows,a=r.alignButtons;return Object(i.createElement)(u.InspectorControls,{key:"inspector"},Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ht.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content Settings","woo-gutenberg-products-block")},tr(r,n),rr(r,n)))})),c()(Rt()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.Toolbar,{controls:[{icon:"edit",title:Object(s.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(Rt()(e),"renderEditMode",(function(){var t={template:e.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(e.blockMap)};return 0!==e.props.attributes.layoutConfig.length&&(t.renderAppender=!1),Object(i.createElement)(h.Placeholder,{icon:e.getIcon(),label:e.getTitle()},Object(s.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(i.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(i.createElement)(h.Tip,null,Object(s.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(x.ProductDataContextProvider,{product:Ut.a[0]},Object(i.createElement)(u.InnerBlocks,t)))))),Object(i.createElement)("div",{className:"wc-block-all-products__actions"},Object(i.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,isLarge:!0,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:Jt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(s.__)("Done","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=e.state.innerBlocks;n(r.clientId,c,!1),e.togglePreview()}},Object(s.__)("Cancel","woo-gutenberg-products-block")),Object(i.createElement)(h.IconButton,{className:"wc-block-all-products__reset-button",icon:Object(i.createElement)(b.a,{srcElement:d}),label:Object(s.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];$t.map((function(e){var t=k()(e,2),r=t[0],n=t[1];return c.push(Object(l.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(s.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(Rt()(e),"renderViewMode",(function(){var t=e.props.attributes,r=t.layoutConfig,n=r&&0!==r.length,c=e.getTitle(),o=e.getIcon();return n?Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Ir,{attributes:t})):Xt(c,o)})),c()(Rt()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return f.s?Object(i.createElement)("div",{className:Yt("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):Wt(n,c)})),e}return r}(i.Component),Vr=Object(y.compose)(h.withSpokenMessages,Object(Mt.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Mt.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Ar),Fr={columns:f.m,rows:f.o,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:$t,isPreview:!1};function Mr(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 Hr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qr={title:Object(s.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Fr,edit:function(e){return Object(i.createElement)(Vr,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:Yt("wc-block-all-products",t)},n),Object(i.createElement)(u.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",Hr(Hr({},qr),{},{deprecated:[{attributes:Object.assign({},qr.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:Yt("wc-block-all-products",t)},r),Object(i.createElement)(u.InnerBlocks.Content,null))}}]}))},9:function(e,t){!function(){e.exports=this.React}()},927:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(57),c=r(0),o=r(5);r.p=o.V,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(11)]).then(r.bind(null,533))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(3),r.e(10)]).then(r.bind(null,947))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(17)]).then(r.bind(null,948))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)((function(){return r.e(12).then(r.bind(null,534))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(2),r.e(8)]).then(r.bind(null,535))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)((function(){return r.e(15).then(r.bind(null,537))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)((function(){return r.e(3).then(r.bind(null,266))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)((function(){return r.e(13).then(r.bind(null,538))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)((function(){return r.e(9).then(r.bind(null,539))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)((function(){return r.e(16).then(r.bind(null,540))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)((function(){return r.e(14).then(r.bind(null,541))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(7)]).then(r.bind(null,949))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},929:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},94:function(e,t){!function(){e.exports=this.wp.date}()},95:function(e,t){!function(){e.exports=this.wp.autop}()},99:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),i=r(0),s=r(279),u=(r(2),r(7)),l=r.n(u);r(238);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(s.a,c()({className:b},u),n&&Object(i.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(i.createElement)("span",{className:"wc-block-components-button__text"},o))}}});
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' => 'e1d1c40be959407de135204fe6b50e5c');
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' => '957b08a406056940a419d8f2c2deb799');
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([828,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},122:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},137: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(191),i=r(4),a=r(14),s=r(3),l=r(5),u=r(74),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.J&&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.P&&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.blockEditor}()},144:function(e,t,r){"use strict";var n=r(0),o=r(58),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},147:function(e,t){},149:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(7)),c=r.n(o),i=r(48),a=r(192);r(201);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.regeneratorRuntime}()},157: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.T+"img/avatar.jpg",96:o.T+"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.T+"img/avatar.jpg",96:o.T+"img/avatar.jpg"},rating:null,verified:!1}]}}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},181: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}}},182:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(0),i=(r(200),r(70));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},187:function(e,t,r){"use strict";var n=r(21),o=r.n(n),c=r(24),i=r.n(c),a=r(22),s=r.n(a),l=r(23),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(93),O=r(48),j=(r(257),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(149),k=(r(254),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(19),N=r.n(C),x=r(231),T=r.n(x),L=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=T()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return L(e,o-n.length,n)},I=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=L(e,n.middle),n=M(n,t.clientHeight,r);return n.middle},M=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var B=function(e){s()(r,e);var t=A(r);function r(e){var n;return o()(this,r),(n=t.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},n.reviewSummary=Object(g.createRef)(),n.reviewContent=Object(g.createRef)(),n.getButton=n.getButton.bind(N()(n)),n.onClick=n.onClick.bind(N()(n)),n}return i()(r,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:D(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),r}(g.Component);B.defaultProps={maxLines:3,ellipsis:"&hellip;",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(256);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(255);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 J=function(e){var t=e.attributes,r=e.reviews,n=(v.P||"product"===t.imageType)&&t.showReviewImage,o=v.J&&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})})))},U=r(10),W=r.n(U),G=r(15),q=r.n(G),Y=r(37),K=r.n(Y),Q=r(46),X=r.n(Q),Z=r(70),$=r(42);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()(q.a.mark((function t(r){var n,o;return q.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object($.a)(r);case 3:o=t.sent,e.setState({reviews:[],loading:!1,error:o}),n(o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return i()(n,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!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.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,i=r.totalReviews;return Object(p.createElement)(e,W()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(g.Component);E()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){s()(r,e);var t=te(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,i=e.totalReviews;return r?Object(p.createElement)(h.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(m.Disabled,null,t.showOrderby&&v.J&&Object(p.createElement)(k,{readOnly:!0,value:t.orderby}),Object(p.createElement)(J,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(y,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var oe=function(e){s()(r,e);var t=ne(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(m.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.noReviewsPlaceholder,n=t.categoryIds,o=t.productId,c=t.reviewsOnPageLoad,i=t.showProductName,a=t.showReviewDate,s=t.showReviewerName,l=t.showReviewContent,u=t.showReviewImage,b=t.showReviewRating,d=Object(Z.d)(t.orderby),w=d.order,g=d.orderby;return!(l||b||a||s||u||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(t)},Object(p.createElement)(re,{attributes:t,categoryIds:n,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:r,orderby:g,order:w,productId:o,reviewsToDisplay:c}))}}]),r}(g.Component);t.a=oe},200:function(e,t){},201:function(e,t){},25:function(e,t){!function(){e.exports=this.wp.compose}()},254:function(e,t){},255:function(e,t){},256:function(e,t){},257:function(e,t){},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},4:function(e,t){!function(){e.exports=this.wp.components}()},42:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(15),o=r.n(n),c=r(37),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)}}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48: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},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,"J",(function(){return c})),r.d(t,"P",(function(){return i})),r.d(t,"z",(function(){return a})),r.d(t,"B",(function(){return s})),r.d(t,"l",(function(){return l})),r.d(t,"A",(function(){return u})),r.d(t,"D",(function(){return b})),r.d(t,"n",(function(){return d})),r.d(t,"C",(function(){return p})),r.d(t,"m",(function(){return w})),r.d(t,"F",(function(){return g})),r.d(t,"u",(function(){return f})),r.d(t,"x",(function(){return m})),r.d(t,"r",(function(){return v})),r.d(t,"s",(function(){return h})),r.d(t,"t",(function(){return O})),r.d(t,"j",(function(){return j})),r.d(t,"L",(function(){return y})),r.d(t,"Q",(function(){return _})),r.d(t,"p",(function(){return k})),r.d(t,"q",(function(){return R})),r.d(t,"o",(function(){return E})),r.d(t,"I",(function(){return P})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return C})),r.d(t,"w",(function(){return N})),r.d(t,"T",(function(){return T})),r.d(t,"U",(function(){return L})),r.d(t,"K",(function(){return D})),r.d(t,"a",(function(){return I})),r.d(t,"N",(function(){return M})),r.d(t,"b",(function(){return A})),r.d(t,"M",(function(){return B})),r.d(t,"E",(function(){return H})),r.d(t,"h",(function(){return F})),r.d(t,"O",(function(){return J})),r.d(t,"g",(function(){return U})),r.d(t,"i",(function(){return W})),r.d(t,"H",(function(){return G})),r.d(t,"G",(function(){return q})),r.d(t,"S",(function(){return Y})),r.d(t,"R",(function(){return K})),r.d(t,"d",(function(){return Q})),r.d(t,"e",(function(){return X})),r.d(t,"f",(function(){return Z})),r.d(t,"y",(function(){return $})),r.d(t,"X",(function(){return te})),r.d(t,"Y",(function(){return re})),r.d(t,"V",(function(){return ne})),r.d(t,"W",(function(){return oe}));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)("hasDarkEditorStyleSupport",!1),E=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),C=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=Object(n.getSetting)("isShippingCostHidden",!1),x=Object(n.getSetting)("woocommerceBlocksPhase",1),T=Object(n.getSetting)("wcBlocksAssetUrl",""),L=Object(n.getSetting)("wcBlocksBuildUrl",""),D=Object(n.getSetting)("shippingCountries",{}),I=Object(n.getSetting)("allowedCountries",{}),M=Object(n.getSetting)("shippingStates",{}),A=Object(n.getSetting)("allowedStates",{}),B=Object(n.getSetting)("shippingMethodsExist",!1),H=Object(n.getSetting)("paymentGatewaySortOrder",[]),F=Object(n.getSetting)("checkoutShowLoginReminder",!0),V={id:0,title:"",permalink:""},z=Object(n.getSetting)("storePages",{shop:V,cart:V,checkout:V,privacy:V,terms:V}),J=z.shop.permalink,U=z.checkout.id,W=z.checkout.permalink,G=z.privacy.permalink,q=z.privacy.title,Y=z.terms.permalink,K=z.terms.title,Q=z.cart.id,X=z.cart.permalink,Z=Object(n.getSetting)("checkoutAllowsGuest",!1),$=(Object(n.getSetting)("checkoutAllowsSignup",!1),Object(n.getSetting)("loginUrl","/wp-login.php")),ee=r(17),te=function(e,t){if(x>2)return Object(ee.registerBlockType)(e,t)},re=function(e,t){if(x>1)return Object(ee.registerBlockType)(e,t)},ne=function(){return x>2},oe=function(){return x>1}},6:function(e,t){!function(){e.exports=this.lodash}()},61:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(27),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))}},70:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n=r(13),o=r.n(n),c=r(7),i=r.n(c),a=r(5),s=function(e){if(a.J){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/store/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e){var t=e.className,r=e.categoryIds,n=e.productId,o=e.showReviewDate,c=e.showReviewerName,a=e.showReviewContent,s=e.showProductName,l=e.showReviewImage,u=e.showReviewRating,b="wc-block-all-reviews";return n&&(b="wc-block-reviews-by-product"),Array.isArray(r)&&(b="wc-block-reviews-by-category"),i()(b,t,{"has-image":l,"has-name":c,"has-date":o,"has-rating":u,"has-content":a,"has-product-name":s})},b=function(e){var t=e.categoryIds,r=e.imageType,n=e.orderby,o=e.productId,c={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":e.reviewsOnPageLoad,"data-reviews-on-load-more":e.reviewsOnLoadMore,"data-show-load-more":e.showLoadMore,"data-show-orderby":e.showOrderby};return o&&(c["data-product-id"]=o),Array.isArray(t)&&(c["data-category-ids"]=t.join(",")),c}},74:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(21),i=r.n(c),a=r(24),s=r.n(a),l=r(19),u=r.n(l),b=r(22),d=r.n(b),p=r(23),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(25);r(122);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)},828:function(e,t,r){e.exports=r(913)},9:function(e,t){!function(){e.exports=this.React}()},913: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(17),s=r(61),l=r(58),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(200),r(14)),d=r(4),p=(r(2),r(187)),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(137),f=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(b.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(d.ToggleControl,{label:Object(i.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(g.b)(t,r)),Object(c.createElement)(d.PanelBody,{title:Object(i.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,r))),Object(c.createElement)(p.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},m=r(181),v=r(182),h=r(157);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})},93:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(61)),i=r(144),a=r(7),s=r.n(a),l=r(4),u=r(49);r(147);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"))))}}});
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([828,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},122:function(e,t){},13:function(e,t){!function(){e.exports=this.wp.apiFetch}()},137: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(191),i=r(4),a=r(14),s=r(3),l=r(5),u=r(74),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.K&&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.Q&&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.blockEditor}()},144:function(e,t,r){"use strict";var n=r(0),o=r(58),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},147:function(e,t){},149:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(7)),c=r.n(o),i=r(48),a=r(192);r(201);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.regeneratorRuntime}()},157: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.U+"img/avatar.jpg",96:o.U+"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.U+"img/avatar.jpg",96:o.U+"img/avatar.jpg"},rating:null,verified:!1}]}}},17:function(e,t){!function(){e.exports=this.wp.blocks}()},181: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}}},182:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(0),i=(r(200),r(70));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},187:function(e,t,r){"use strict";var n=r(21),o=r.n(n),c=r(24),i=r.n(c),a=r(22),s=r.n(a),l=r(23),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(93),O=r(48),j=(r(257),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(149),k=(r(254),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),S=r(7),P=r.n(S),C=r(19),N=r.n(C),x=r(231),T=r.n(x),L=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=T()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return L(e,o-n.length,n)},I=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=L(e,n.middle),n=M(n,t.clientHeight,r);return n.middle},M=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var B=function(e){s()(r,e);var t=A(r);function r(e){var n;return o()(this,r),(n=t.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},n.reviewSummary=Object(g.createRef)(),n.reviewContent=Object(g.createRef)(),n.getButton=n.getButton.bind(N()(n)),n.onClick=n.onClick.bind(N()(n)),n}return i()(r,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:D(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),r}(g.Component);B.defaultProps={maxLines:3,ellipsis:"&hellip;",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(256);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:P()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||i||a||g)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,o;return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(p.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(o=e.product_image)||void 0===o?void 0:o.thumbnail)||""}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(w.__)("Verified buyer","woo-gutenberg-products-block")},Object(w.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||i||g||c)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},g&&function(e){var t=e.rating,r={width:t/5*100+"%"};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(255);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 U(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 z=function(e){var t=e.attributes,r=e.reviews,n=(v.Q||"product"===t.imageType)&&t.showReviewImage,o=v.K&&t.showReviewRating,c=U(U({},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),G=r.n(W),J=r(15),K=r.n(J),Q=r(37),q=r.n(Q),Y=r(46),X=r.n(Y),Z=r(70),$=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=q()(K.a.mark((function t(r){var n,o;return K.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.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,i=r.totalReviews;return Object(p.createElement)(e,G()({},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.K&&Object(p.createElement)(k,{readOnly:!0,value:t.orderby}),Object(p.createElement)(z,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(y,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var oe=function(e){s()(r,e);var t=ne(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(m.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.noReviewsPlaceholder,n=t.categoryIds,o=t.productId,c=t.reviewsOnPageLoad,i=t.showProductName,a=t.showReviewDate,s=t.showReviewerName,l=t.showReviewContent,u=t.showReviewImage,b=t.showReviewRating,d=Object(Z.d)(t.orderby),w=d.order,g=d.orderby;return!(l||b||a||s||u||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(t)},Object(p.createElement)(re,{attributes:t,categoryIds:n,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:r,orderby:g,order:w,productId:o,reviewsToDisplay:c}))}}]),r}(g.Component);t.a=oe},200:function(e,t){},201:function(e,t){},25:function(e,t){!function(){e.exports=this.wp.compose}()},254:function(e,t){},255:function(e,t){},256:function(e,t){},257:function(e,t){},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(15),o=r.n(n),c=r(37),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)}}()},46:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},47:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},48: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}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=r,d=null!=n;return!b&&d?(t=o||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),Object(c.createElement)(t,l,n)):(t=o||i.Fragment,b&&d&&r!==n?Object(c.createElement)(t,l,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,l,r))}},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,"l",(function(){return o})),r.d(t,"K",(function(){return c})),r.d(t,"Q",(function(){return i})),r.d(t,"A",(function(){return a})),r.d(t,"C",(function(){return s})),r.d(t,"m",(function(){return l})),r.d(t,"B",(function(){return u})),r.d(t,"E",(function(){return b})),r.d(t,"o",(function(){return d})),r.d(t,"D",(function(){return p})),r.d(t,"n",(function(){return w})),r.d(t,"G",(function(){return g})),r.d(t,"v",(function(){return f})),r.d(t,"y",(function(){return m})),r.d(t,"s",(function(){return v})),r.d(t,"t",(function(){return h})),r.d(t,"u",(function(){return O})),r.d(t,"k",(function(){return j})),r.d(t,"M",(function(){return y})),r.d(t,"R",(function(){return _})),r.d(t,"q",(function(){return k})),r.d(t,"r",(function(){return R})),r.d(t,"p",(function(){return E})),r.d(t,"J",(function(){return S})),r.d(t,"c",(function(){return P})),r.d(t,"w",(function(){return C})),r.d(t,"x",(function(){return N})),r.d(t,"U",(function(){return T})),r.d(t,"V",(function(){return L})),r.d(t,"L",(function(){return D})),r.d(t,"a",(function(){return I})),r.d(t,"O",(function(){return M})),r.d(t,"b",(function(){return A})),r.d(t,"N",(function(){return B})),r.d(t,"F",(function(){return H})),r.d(t,"i",(function(){return F})),r.d(t,"P",(function(){return z})),r.d(t,"h",(function(){return W})),r.d(t,"j",(function(){return G})),r.d(t,"I",(function(){return J})),r.d(t,"H",(function(){return K})),r.d(t,"T",(function(){return Q})),r.d(t,"S",(function(){return q})),r.d(t,"d",(function(){return Y})),r.d(t,"e",(function(){return X})),r.d(t,"f",(function(){return Z})),r.d(t,"g",(function(){return $})),r.d(t,"z",(function(){return ee})),r.d(t,"Y",(function(){return re})),r.d(t,"Z",(function(){return ne})),r.d(t,"W",(function(){return oe})),r.d(t,"X",(function(){return ce}));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)("hasDarkEditorStyleSupport",!1),E=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),S=Object(n.getSetting)("productCount",0),P=Object(n.getSetting)("attributes",[]),C=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=Object(n.getSetting)("isShippingCostHidden",!1),x=Object(n.getSetting)("woocommerceBlocksPhase",1),T=Object(n.getSetting)("wcBlocksAssetUrl",""),L=Object(n.getSetting)("wcBlocksBuildUrl",""),D=Object(n.getSetting)("shippingCountries",{}),I=Object(n.getSetting)("allowedCountries",{}),M=Object(n.getSetting)("shippingStates",{}),A=Object(n.getSetting)("allowedStates",{}),B=Object(n.getSetting)("shippingMethodsExist",!1),H=Object(n.getSetting)("paymentGatewaySortOrder",[]),F=Object(n.getSetting)("checkoutShowLoginReminder",!0),V={id:0,title:"",permalink:""},U=Object(n.getSetting)("storePages",{shop:V,cart:V,checkout:V,privacy:V,terms:V}),z=U.shop.permalink,W=U.checkout.id,G=U.checkout.permalink,J=U.privacy.permalink,K=U.privacy.title,Q=U.terms.permalink,q=U.terms.title,Y=U.cart.id,X=U.cart.permalink,Z=Object(n.getSetting)("checkoutAllowsGuest",!1),$=Object(n.getSetting)("checkoutAllowsSignup",!1),ee=Object(n.getSetting)("loginUrl","/wp-login.php"),te=r(17),re=function(e,t){if(x>2)return Object(te.registerBlockType)(e,t)},ne=function(e,t){if(x>1)return Object(te.registerBlockType)(e,t)},oe=function(){return x>2},ce=function(){return x>1}},6:function(e,t){!function(){e.exports=this.lodash}()},61:function(e,t,r){"use strict";var n=r(8),o=r.n(n),c=r(27),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))}},70:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n=r(13),o=r.n(n),c=r(7),i=r.n(c),a=r(5),s=function(e){if(a.K){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/store/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e){var t=e.className,r=e.categoryIds,n=e.productId,o=e.showReviewDate,c=e.showReviewerName,a=e.showReviewContent,s=e.showProductName,l=e.showReviewImage,u=e.showReviewRating,b="wc-block-all-reviews";return n&&(b="wc-block-reviews-by-product"),Array.isArray(r)&&(b="wc-block-reviews-by-category"),i()(b,t,{"has-image":l,"has-name":c,"has-date":o,"has-rating":u,"has-content":a,"has-product-name":s})},b=function(e){var t=e.categoryIds,r=e.imageType,n=e.orderby,o=e.productId,c={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":e.reviewsOnPageLoad,"data-reviews-on-load-more":e.reviewsOnLoadMore,"data-show-load-more":e.showLoadMore,"data-show-orderby":e.showOrderby};return o&&(c["data-product-id"]=o),Array.isArray(t)&&(c["data-category-ids"]=t.join(",")),c}},74:function(e,t,r){"use strict";var n=r(10),o=r.n(n),c=r(21),i=r.n(c),a=r(24),s=r.n(a),l=r(19),u=r.n(l),b=r(22),d=r.n(b),p=r(23),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(25);r(122);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)},828:function(e,t,r){e.exports=r(913)},9:function(e,t){!function(){e.exports=this.React}()},913: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(17),s=r(61),l=r(58),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(200),r(14)),d=r(4),p=(r(2),r(187)),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(137),f=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(b.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(d.ToggleControl,{label:Object(i.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(g.b)(t,r)),Object(c.createElement)(d.PanelBody,{title:Object(i.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,r))),Object(c.createElement)(p.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},m=r(181),v=r(182),h=r(157);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})},93:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(61)),i=r(144),a=r(7),s=r.n(a),l=r(4),u=r(49);r(147);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/atomic-block-components/add-to-cart-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{112:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(6),a=r.n(n),c=r(7);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,c=t.id,o=t.callback,l=t.priority,d=new Map(e[n]);switch(r){case i:return d.set(c,{priority:l,callback:o}),s(s({},e),{},a()({},n,d));case u:return d.delete(c),s(s({},e),{},a()({},n,d))}return e}},147:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(58),a=(r(4),r(150),function(e){var t=e.errorMessage,r=void 0===t?"":t,a=e.propertyName,c=void 0===a?"":a,o=e.elementId,s=void 0===o?"":o,i=Object(n.b)(),u=i.getValidationError,l=i.getValidationErrorId;if(!r){var d=u(c)||{};if(!d.message||d.hidden)return null;r=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(s)},r))})},150:function(e,t){},151:function(e,t){},180:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},194:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=function(e,t){return!!e.type&&e.type===t},a={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},o=function(e){return n(e,a.SUCCESS)},s=function(e){return n(e,a.ERROR)},i=function(e){return n(e,a.FAIL)},u=function(){return{responseTypes:a,noticeContexts:c,isSuccessResponse:o,isErrorResponse:s,isFailResponse:i}}},195:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(112),a=function(e,t){return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=n.a.addEventCallback(e,r,a);return t(c),function(){t(n.a.removeEventCallback(e,c.id))}}}},196:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var n=r(24),a=r.n(n),c=r(23),o=r.n(c),s=r(51),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=[],i=u(c),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:p=e.sent,"object"===o()(p)&&s.push(p),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),p=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=!0,i=u(c),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=24;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:if(p=e.sent,"object"!==o()(p)||void 0!==p.type){e.next=13;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 13:if(!0===(s="object"!==o()(p)||p)){e.next=16;break}return e.abrupt("return",s);case 16:e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(7),console.error(e.t0),e.abrupt("return",{type:"error"});case 22:e.next=5;break;case 24:e.next=29;break;case 26:e.prev=26,e.t1=e.catch(3),i.e(e.t1);case 29:return e.prev=29,i.f(),e.finish(29);case 32:return e.abrupt("return",s);case 33:case"end":return e.stop()}}),e,null,[[3,26,29,32],[7,18]])})));return function(t,r,n){return e.apply(this,arguments)}}()},277:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o}));var n=window.Event||null,a=function(e,t){var r=t.bubbles,a=void 0!==r&&r,c=t.cancelable,o=void 0!==c&&c,s=t.element;if(s||(s=document.body),"function"==typeof n){var i=new n(e,{bubbles:a,cancelable:o});s.dispatchEvent(i)}else{var u=document.createEvent("Event");u.initEvent(e,a,o),s.dispatchEvent(u)}},c=function(){a("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var c=function(){a(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},278:function(e,t,r){"use strict";var n=r(50),a=React.createElement(n.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=a},282:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(180);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},289:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(10),a=r.n(n),c=r(0),o=r(13),s=r(81),i=r(15),u=r(17),l=r(80),d=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},f=function(e){var t=Object(o.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(s.a)(),n=r.cartItems,f=r.cartIsLoading,p=Object(l.a)(),b=p.addErrorNotice,m=p.removeNotice,v=Object(c.useState)(!1),h=a()(v,2),g=h[0],O=h[1],y=Object(c.useRef)(d(n,e));return Object(c.useEffect)((function(){var t=d(n,e);t!==y.current&&(y.current=t)}),[n,e]),{cartQuantity:Number.isFinite(y.current)?y.current:0,addingToCart:g,cartIsLoading:f,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;O(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){b(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){O(!1)}))}}}},295:function(e,t){},296:function(e,t){},305:function(e,t,r){"use strict";r.r(t);var n=r(26),a=r(282),c=(r(4),r(5)),o=r.n(c),s=r(58),i=r(10),u=r.n(i),l=r(0),d=r(1),f=r(37),p=r(80),b=r(194),m=function(e){return e.is_purchasable||!1},v="pristine",h="idle",g="disabled",O="processing",y="before_processing",j="after_processing",E={status:v,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},w="set_pristine",P="set_idle",k="set_disabled",_="set_processing",R="set_before_processing",C="set_after_processing",S="set_processing_response",A="set_has_error",x="set_no_error",T="set_quantity",I="set_request_params",D=w,N=P,q=k,V=_,F=R,Q=C,W=S,B=A,L=x,M=T,H=I,Y=function(){return{type:D}},J=function(){return{type:N}},K=function(){return{type:q}},U=function(){return{type:V}},z=function(){return{type:F}},G=function(){return{type:Q}},X=function(e){return{type:W,data:e}},$=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?B:L;return{type:t}},Z=function(e){return{type:M,quantity:e}},ee=function(e){return{type:H,data:e}},te=r(6),re=r.n(te);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 ae(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){re()(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 ce=w,oe=P,se=k,ie=_,ue=R,le=C,de=S,fe=A,pe=x,be=T,me=I,ve=v,he=h,ge=g,Oe=O,ye=y,je=j,Ee=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,a=r.type,c=r.data;switch(a){case ce:e=E;break;case oe:e=t.status!==he?ae(ae({},t),{},{status:he}):t;break;case se:e=t.status!==ge?ae(ae({},t),{},{status:ge}):t;break;case be:e=n!==t.quantity?ae(ae({},t),{},{quantity:n}):t;break;case me:e=ae(ae({},t),{},{requestParams:ae(ae({},t.requestParams),c)});break;case de:e=ae(ae({},t),{},{processingResponse:c});break;case ie:e=!1===(e=t.status!==Oe?ae(ae({},t),{},{status:Oe,hasError:!1}):t).hasError?e:ae(ae({},e),{},{hasError:!1});break;case ue:e=t.status!==ye?ae(ae({},t),{},{status:ye,hasError:!1}):t;break;case le:e=t.status!==je?ae(ae({},t),{},{status:je}):t;break;case fe:e=t.hasError?t:ae(ae({},t),{},{hasError:!0}),e=t.status===Oe||t.status===ye?ae(ae({},e),{},{status:he}):e;break;case pe:e=t.hasError?ae(ae({},t),{},{hasError:!1}):t}return e!==t&&a!==ce&&e.status===ve&&(e.status=he),e},we=r(112),Pe=r(195),ke="add_to_cart_before_processing",_e="add_to_cart_after_processing_with_success",Re="add_to_cart_after_processing_with_error",Ce=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Pe.a)(_e,e),onAddToCartProcessingWithError:Object(Pe.a)(Re,e),onAddToCartBeforeProcessing:Object(Pe.a)(ke,e)}},Se=r(196),Ae=Object(l.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),xe=function(){return Object(l.useContext)(Ae)},Te=function(e){var t=e.children,r=e.product,n=e.showFormElements,a=Object(l.useReducer)(Ee,E),c=u()(a,2),o=c[0],i=c[1],v=Object(l.useReducer)(we.b,{}),w=u()(v,2),P=w[0],k=w[1],_=Object(f.a)(P),R=Object(p.a)(),C=R.addErrorNotice,S=R.removeNotices,A=Object(s.b)().setValidationErrors,x=Object(b.a)(),T=x.isSuccessResponse,I=x.isErrorResponse,D=x.isFailResponse,N=Object(l.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Ce(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Ce(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Ce(k).onAddToCartBeforeProcessing}}),[k]),q=Object(l.useMemo)((function(){return{resetForm:function(){i(Y())},submitForm:function(){i(z())},setQuantity:function(e){i(Z(e))},setHasError:function(e){i($(e))},setRequestParams:function(e){i(ee(e))},setAfterProcessing:function(e){i(X(e)),i(G())}}}),[]);Object(l.useEffect)((function(){var e=o.status,t=!r.id||!m(r);e!==g||t?e!==g&&t&&i(K()):i(J())}),[o.status,r,i]),Object(l.useEffect)((function(){o.status===y&&(S("error"),Object(Se.a)(_,ke,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&C(t),r&&A(r)})),i(J())):i(U())})))}),[o.status,A,C,S,i,_]),Object(l.useEffect)((function(){if(o.status===j){var e={processingResponse:o.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;C(e.message,t)}};if(o.hasError)return void Object(Se.b)(_,Re,e).then((function(r){if(I(r)||D(r))t(r);else{var n,a=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(d.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");C(a,{id:"add-to-cart"})}i(J())}));Object(Se.b)(_,_e,e).then((function(e){I(e)||D(e)?(t(e),i($(!0))):i(J())}))}}),[o.status,o.hasError,o.processingResponse,q,C,I,D,T,_]);var V=function(e){return["simple","variable"].includes(e.type||"simple")}(r),F={product:r,productType:r.type||"simple",productIsPurchasable:m(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:n&&V,quantity:o.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:o.requestParams,isIdle:o.status===h,isDisabled:o.status===g,isProcessing:o.status===O,isBeforeProcessing:o.status===y,isAfterProcessing:o.status===j,hasError:o.hasError,eventRegistration:N,dispatchActions:q};return React.createElement(Ae.Provider,{value:F},t)},Ie=r(57),De=r.n(Ie),Ne=r(81),qe=r(17),Ve=r(277);function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Qe=function(){var e=xe(),t=e.dispatchActions,r=e.product,n=e.quantity,a=e.eventRegistration,c=e.hasError,o=e.isProcessing,i=e.requestParams,f=Object(s.b)(),b=f.hasValidationErrors,m=f.showAllValidationErrors,v=Object(p.a)(),h=v.addErrorNotice,g=v.removeNotice,O=Object(Ne.a)().receiveCart,y=Object(l.useState)(!1),j=u()(y,2),E=j[0],w=j[1],P=!c&&o,k=Object(l.useCallback)((function(){return!b||(m(),{type:"error"})}),[b,m]);Object(l.useEffect)((function(){var e=a.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[a,k]);var _=Object(l.useCallback)((function(){w(!0),g("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:n},i);De()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){De.a.setNonce(e.headers),e.json().then((function(r){e.ok?O(r):(r.body&&r.body.message?h(Object(qe.decodeEntities)(r.body.message),{id:"add-to-cart"}):h(Object(d.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Ve.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&O(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,h,g,O,t,n,i]);return Object(l.useEffect)((function(){P&&!E&&_()}),[P,_,E]),null},We=function(e){var t=e.children,r=e.product,n=e.showFormElements;return React.createElement(s.a,null,React.createElement(Te,{product:r,showFormElements:n},t,React.createElement(Qe,null)))},Be=r(69),Le=r(7),Me=r(191),He=(r(295),r(74)),Ye=r(126),Je=r(278),Ke=r(289),Ue=function(e){var t=e.className,r=e.href,n=e.text;return React.createElement(He.a,{className:t,href:r,rel:"nofollow"},n)},ze=function(e){var t=e.className,r=e.quantityInCart,n=e.isProcessing,a=e.isDisabled,c=e.isDone,o=e.onClick;return React.createElement(He.a,{className:t,disabled:a,showSpinner:n,onClick:o},c&&r>0?Object(d.sprintf)(Object(d._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(d.__)("Add to cart","woo-gutenberg-products-block"),!!c&&React.createElement(Ye.a,{srcElement:Je.a,alt:Object(d.__)("Done","woo-gutenberg-products-block")}))},Ge=function(){var e=xe(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,a=e.product,c=e.productType,o=e.isDisabled,s=e.isProcessing,i=e.eventRegistration,f=e.hasError,p=e.dispatchActions,b=Object(Ke.a)(a.id||0).cartQuantity,m=Object(l.useState)(!1),v=u()(m,2),h=v[0],g=v[1],O=a.add_to_cart||{url:"",text:""};return Object(l.useEffect)((function(){var e=i.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[i,f]),(t||!n&&"simple"===c)&&r?React.createElement(ze,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:b,isDisabled:o,isProcessing:s,isDone:h,onClick:function(){return p.submitForm()}}):React.createElement(Ue,{className:"wc-block-components-product-add-to-cart-button",href:O.url,text:O.text||Object(d.__)("View Product","woo-gutenberg-products-block")})},Xe=function(e){var t=e.disabled,r=e.min,n=e.max,a=e.value,c=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){c(e.target.value)}})},$e=function(e){var t=e.reason,r=void 0===t?Object(d.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},Ze=function(){var e=xe(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement($e,null):t.id&&!t.is_in_stock?React.createElement($e,{reason:Object(d.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Xe,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(Ge,null))},et=(r(296),r(42)),tt=r.n(et),rt=r(193),nt=r(3),at=r(147),ct={value:"",label:Object(d.__)("Select an option","woo-gutenberg-products-block")},ot=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,a=e.value,c=void 0===a?"":a,i=e.onChange,u=void 0===i?function(){}:i,l=e.errorMessage,f=void 0===l?Object(d.__)("Please select a value.","woo-gutenberg-products-block"):l,p=Object(s.b)(),b=p.getValidationError,m=p.setValidationErrors,v=p.clearValidationError,h=t,g=b(h)||{};return Object(nt.useEffect)((function(){c?v(h):m(re()({},h,{message:f,hidden:!0}))}),[c,h,f,v,m]),Object(nt.useEffect)((function(){return function(){v(h)}}),[h,v]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement(rt.SelectControl,{label:Object(qe.decodeEntities)(t),value:c||"",options:[ct].concat(tt()(n)),onChange:u,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":g.message&&!g.hidden})}),React.createElement(at.a,{propertyName:h,elementId:h}))};function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ut=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var a=Object.keys(e);return n.filter((function(e){return a.every((function(n){var a=r[n]||"",c=t["id:"+e].attributes[n];return""===a||(null===c||c===a)}))}))},lt=function(e,t,r){var n={},a=Object.keys(e),c=Object.values(r).filter(Boolean).length>0;return a.forEach((function(a){var o=e[a],s=it(it({},r),{},re()({},a,null)),i=c?ut(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[a]})):null;n[a]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(qe.decodeEntities)(r)}:null})).filter(Boolean)}(o.terms,u)})),n};function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pt=function(e){var t=e.attributes,r=e.variationAttributes,n=e.setRequestParams,a=Object(f.a)(t),c=Object(f.a)(r),o=Object(l.useState)(0),s=u()(o,2),i=s[0],d=s[1],p=Object(l.useState)({}),b=u()(p,2),m=b[0],v=b[1],h=Object(l.useMemo)((function(){return lt(a,c,m)}),[m,a,c]);return Object(l.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(a).length?d(function(e,t,r){return ut(e,t,r)[0]||0}(a,c,m)):i>0&&d(0)}),[m,i,a,c]),Object(l.useEffect)((function(){n({id:i,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[n,i,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map((function(e){return React.createElement(ot,{key:e,attributeName:e,options:h[e],value:m[e],onChange:function(t){v(ft(ft({},m),{},re()({},e,t)))}})})))},bt=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(Le.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),a=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(n).length||0===a.length?null:React.createElement(pt,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},mt=function(){var e=xe(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement($e,null):t.id&&!t.is_in_stock?React.createElement($e,{reason:Object(d.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(bt,{product:t,dispatchers:c}),React.createElement(Xe,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(Ge,null))},vt=function(){return React.createElement(Ge,null)},ht=function(){return React.createElement(rt.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},gt=function(){return React.createElement(ht,null)},Ot=function(){var e=xe(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(mt,null):"grouped"===r?React.createElement(gt,null):"external"===r?React.createElement(vt,null):"simple"===r||"variation"===r?React.createElement(Ze,null):null:React.createElement(Ge,null)},yt=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Le.isEmpty)(n)});return React.createElement(We,{product:n,showFormElements:r},React.createElement("div",{className:a},React.createElement(Ot,null)))})),jt={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}};t.default=Object(n.compose)(Object(a.a)(jt))(yt)},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),a=r(36),c=r.n(a),o=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},42:function(e,t,r){var n=r(91),a=r(92),c=r(54),o=r(93);e.exports=function(e){return n(e)||a(e)||c(e)||o()}},51:function(e,t){function r(e,t,r,n,a,c,o){try{var s=e[c](o),i=s.value}catch(e){return void r(e)}s.done?t(i):Promise.resolve(i).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var o=e.apply(t,n);function s(e){r(o,a,c,s,i,"next",e)}function i(e){r(o,a,c,s,i,"throw",e)}s(void 0)}))}}},58:function(e,t,r){"use strict";r.d(t,"b",(function(){return b})),r.d(t,"a",(function(){return m}));var n=r(6),a=r.n(n),c=r(10),o=r.n(c),s=r(0),i=r(7),u=r(36),l=r.n(u);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=Object(s.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}}),b=function(){return Object(s.useContext)(p)},m=function(e){var t=e.children,r=Object(s.useState)({}),n=o()(r,2),c=n[0],u=n[1],d=Object(s.useCallback)((function(e){return c[e]}),[c]),b=Object(s.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),m=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),v=Object(s.useCallback)((function(){u({})}),[]),h=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:f(f({},t),e)}))}),[]),g=Object(s.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=f(f({},r[e]),t);return l()(r[e],n)?r:f(f({},r),{},a()({},e,n))}))}),[]),O={getValidationError:d,setValidationErrors:h,clearValidationError:m,clearAllValidationErrors:v,hideValidationError:Object(s.useCallback)((function(e){g(e,{hidden:!0})}),[g]),showValidationError:Object(s.useCallback)((function(e){g(e,{hidden:!1})}),[g]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=f(f({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:f(f({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:b};return React.createElement(p.Provider,{value:O},t)}},74:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(14),o=r.n(c),s=r(76),i=(r(4),r(5)),u=r.n(i);r(151);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,c=e.children,i=o()(e,["className","showSpinner","children"]),l=u()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return React.createElement(s.a,a()({className:l},i),n&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},81:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),a=r(13),c=r(117),o=r(17),s=r(7),i={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(c.a)(),r=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},d=e.shouldSelect,f=Object(a.useSelect)((function(e,t){var a=t.dispatch;if(!d)return i;if(r)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 c=e(n.CART_STORE_KEY),u=c.getCartData(),f=c.getCartErrors(),p=c.getCartTotals(),b=!c.hasFinishedResolution("getCartData"),m=c.areShippingRatesLoading(),v=a(n.CART_STORE_KEY).receiveCart,h=Object(s.mapValues)(u.shippingAddress,(function(e){return Object(o.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:p,cartIsLoading:b,cartErrors:f,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!h.country,receiveCart:v}}),[d]);return f}},91:function(e,t,r){var n=r(55);e.exports=function(e){if(Array.isArray(e))return n(e)}},92:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},93:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{112:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(6),a=r.n(n),c=r(7);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,c=t.id,o=t.callback,l=t.priority,d=new Map(e[n]);switch(r){case i:return d.set(c,{priority:l,callback:o}),s(s({},e),{},a()({},n,d));case u:return d.delete(c),s(s({},e),{},a()({},n,d))}return e}},147:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(58),a=(r(4),r(150),function(e){var t=e.errorMessage,r=void 0===t?"":t,a=e.propertyName,c=void 0===a?"":a,o=e.elementId,s=void 0===o?"":o,i=Object(n.b)(),u=i.getValidationError,l=i.getValidationErrorId;if(!r){var d=u(c)||{};if(!d.message||d.hidden)return null;r=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(s)},r))})},150:function(e,t){},151:function(e,t){},180:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},194:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},a={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},o=function(e){return n(e,a.SUCCESS)},s=function(e){return n(e,a.ERROR)},i=function(e){return n(e,a.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:a,noticeContexts:c,shouldRetry:u,isSuccessResponse:o,isErrorResponse:s,isFailResponse:i}}},195:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(112),a=function(e,t){return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=n.a.addEventCallback(e,r,a);return t(c),function(){t(n.a.removeEventCallback(e,c.id))}}}},196:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var n=r(23),a=r.n(n),c=r(24),o=r.n(c),s=r(51),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=[],i=u(c),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:p=e.sent,"object"===o()(p)&&s.push(p),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),p=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=u(c),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===o()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},277:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o}));var n=window.Event||null,a=function(e,t){var r=t.bubbles,a=void 0!==r&&r,c=t.cancelable,o=void 0!==c&&c,s=t.element;if(s||(s=document.body),"function"==typeof n){var i=new n(e,{bubbles:a,cancelable:o});s.dispatchEvent(i)}else{var u=document.createEvent("Event");u.initEvent(e,a,o),s.dispatchEvent(u)}},c=function(){a("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var c=function(){a(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},278:function(e,t,r){"use strict";var n=r(50),a=React.createElement(n.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=a},282:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(180);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},289:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(9),a=r.n(n),c=r(0),o=r(13),s=r(81),i=r(15),u=r(17),l=r(80),d=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},f=function(e){var t=Object(o.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(s.a)(),n=r.cartItems,f=r.cartIsLoading,p=Object(l.a)(),b=p.addErrorNotice,m=p.removeNotice,v=Object(c.useState)(!1),h=a()(v,2),g=h[0],y=h[1],O=Object(c.useRef)(d(n,e));return Object(c.useEffect)((function(){var t=d(n,e);t!==O.current&&(O.current=t)}),[n,e]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:g,cartIsLoading:f,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;y(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){b(Object(u.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){y(!1)}))}}}},295:function(e,t){},296:function(e,t){},305:function(e,t,r){"use strict";r.r(t);var n=r(26),a=r(282),c=(r(4),r(5)),o=r.n(c),s=r(58),i=r(9),u=r.n(i),l=r(0),d=r(1),f=r(37),p=r(80),b=r(194),m=function(e){return e.is_purchasable||!1},v="pristine",h="idle",g="disabled",y="processing",O="before_processing",j="after_processing",E={status:v,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},w="set_pristine",P="set_idle",k="set_disabled",_="set_processing",R="set_before_processing",C="set_after_processing",S="set_processing_response",A="set_has_error",x="set_no_error",T="set_quantity",I="set_request_params",D=w,N=P,q=k,V=_,F=R,Q=C,W=S,B=A,L=x,M=T,H=I,Y=function(){return{type:D}},J=function(){return{type:N}},K=function(){return{type:q}},U=function(){return{type:V}},z=function(){return{type:F}},G=function(){return{type:Q}},X=function(e){return{type:W,data:e}},$=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?B:L;return{type:t}},Z=function(e){return{type:M,quantity:e}},ee=function(e){return{type:H,data:e}},te=r(6),re=r.n(te);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 ae(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){re()(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 ce=w,oe=P,se=k,ie=_,ue=R,le=C,de=S,fe=A,pe=x,be=T,me=I,ve=v,he=h,ge=g,ye=y,Oe=O,je=j,Ee=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,a=r.type,c=r.data;switch(a){case ce:e=E;break;case oe:e=t.status!==he?ae(ae({},t),{},{status:he}):t;break;case se:e=t.status!==ge?ae(ae({},t),{},{status:ge}):t;break;case be:e=n!==t.quantity?ae(ae({},t),{},{quantity:n}):t;break;case me:e=ae(ae({},t),{},{requestParams:ae(ae({},t.requestParams),c)});break;case de:e=ae(ae({},t),{},{processingResponse:c});break;case ie:e=!1===(e=t.status!==ye?ae(ae({},t),{},{status:ye,hasError:!1}):t).hasError?e:ae(ae({},e),{},{hasError:!1});break;case ue:e=t.status!==Oe?ae(ae({},t),{},{status:Oe,hasError:!1}):t;break;case le:e=t.status!==je?ae(ae({},t),{},{status:je}):t;break;case fe:e=t.hasError?t:ae(ae({},t),{},{hasError:!0}),e=t.status===ye||t.status===Oe?ae(ae({},e),{},{status:he}):e;break;case pe:e=t.hasError?ae(ae({},t),{},{hasError:!1}):t}return e!==t&&a!==ce&&e.status===ve&&(e.status=he),e},we=r(112),Pe=r(195),ke="add_to_cart_before_processing",_e="add_to_cart_after_processing_with_success",Re="add_to_cart_after_processing_with_error",Ce=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Pe.a)(_e,e),onAddToCartProcessingWithError:Object(Pe.a)(Re,e),onAddToCartBeforeProcessing:Object(Pe.a)(ke,e)}},Se=r(196),Ae=Object(l.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),xe=function(){return Object(l.useContext)(Ae)},Te=function(e){var t=e.children,r=e.product,n=e.showFormElements,a=Object(l.useReducer)(Ee,E),c=u()(a,2),o=c[0],i=c[1],v=Object(l.useReducer)(we.b,{}),w=u()(v,2),P=w[0],k=w[1],_=Object(f.a)(P),R=Object(p.a)(),C=R.addErrorNotice,S=R.removeNotices,A=Object(s.b)().setValidationErrors,x=Object(b.a)(),T=x.isSuccessResponse,I=x.isErrorResponse,D=x.isFailResponse,N=Object(l.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Ce(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Ce(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Ce(k).onAddToCartBeforeProcessing}}),[k]),q=Object(l.useMemo)((function(){return{resetForm:function(){i(Y())},submitForm:function(){i(z())},setQuantity:function(e){i(Z(e))},setHasError:function(e){i($(e))},setRequestParams:function(e){i(ee(e))},setAfterProcessing:function(e){i(X(e)),i(G())}}}),[]);Object(l.useEffect)((function(){var e=o.status,t=!r.id||!m(r);e!==g||t?e!==g&&t&&i(K()):i(J())}),[o.status,r,i]),Object(l.useEffect)((function(){o.status===O&&(S("error"),Object(Se.a)(_,ke,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&C(t),r&&A(r)})),i(J())):i(U())})))}),[o.status,A,C,S,i,_]),Object(l.useEffect)((function(){if(o.status===j){var e={processingResponse:o.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;C(e.message,t)}};if(o.hasError)return void Object(Se.b)(_,Re,e).then((function(r){if(I(r)||D(r))t(r);else{var n,a=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(d.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");C(a,{id:"add-to-cart"})}i(J())}));Object(Se.b)(_,_e,e).then((function(e){I(e)||D(e)?(t(e),i($(!0))):i(J())}))}}),[o.status,o.hasError,o.processingResponse,q,C,I,D,T,_]);var V=function(e){return["simple","variable"].includes(e.type||"simple")}(r),F={product:r,productType:r.type||"simple",productIsPurchasable:m(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:n&&V,quantity:o.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:o.requestParams,isIdle:o.status===h,isDisabled:o.status===g,isProcessing:o.status===y,isBeforeProcessing:o.status===O,isAfterProcessing:o.status===j,hasError:o.hasError,eventRegistration:N,dispatchActions:q};return React.createElement(Ae.Provider,{value:F},t)},Ie=r(57),De=r.n(Ie),Ne=r(81),qe=r(17),Ve=r(277);function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Qe=function(){var e=xe(),t=e.dispatchActions,r=e.product,n=e.quantity,a=e.eventRegistration,c=e.hasError,o=e.isProcessing,i=e.requestParams,f=Object(s.b)(),b=f.hasValidationErrors,m=f.showAllValidationErrors,v=Object(p.a)(),h=v.addErrorNotice,g=v.removeNotice,y=Object(Ne.a)().receiveCart,O=Object(l.useState)(!1),j=u()(O,2),E=j[0],w=j[1],P=!c&&o,k=Object(l.useCallback)((function(){return!b||(m(),{type:"error"})}),[b,m]);Object(l.useEffect)((function(){var e=a.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[a,k]);var _=Object(l.useCallback)((function(){w(!0),g("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:n},i);De()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){De.a.setNonce(e.headers),e.json().then((function(r){e.ok?y(r):(r.body&&r.body.message?h(Object(qe.decodeEntities)(r.body.message),{id:"add-to-cart"}):h(Object(d.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Ve.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&y(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,h,g,y,t,n,i]);return Object(l.useEffect)((function(){P&&!E&&_()}),[P,_,E]),null},We=function(e){var t=e.children,r=e.product,n=e.showFormElements;return React.createElement(s.a,null,React.createElement(Te,{product:r,showFormElements:n},t,React.createElement(Qe,null)))},Be=r(69),Le=r(7),Me=r(191),He=(r(295),r(74)),Ye=r(126),Je=r(278),Ke=r(289),Ue=function(e){var t=e.className,r=e.href,n=e.text;return React.createElement(He.a,{className:t,href:r,rel:"nofollow"},n)},ze=function(e){var t=e.className,r=e.quantityInCart,n=e.isProcessing,a=e.isDisabled,c=e.isDone,o=e.onClick;return React.createElement(He.a,{className:t,disabled:a,showSpinner:n,onClick:o},c&&r>0?Object(d.sprintf)(Object(d._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(d.__)("Add to cart","woo-gutenberg-products-block"),!!c&&React.createElement(Ye.a,{srcElement:Je.a,alt:Object(d.__)("Done","woo-gutenberg-products-block")}))},Ge=function(){var e=xe(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,a=e.product,c=e.productType,o=e.isDisabled,s=e.isProcessing,i=e.eventRegistration,f=e.hasError,p=e.dispatchActions,b=Object(Ke.a)(a.id||0).cartQuantity,m=Object(l.useState)(!1),v=u()(m,2),h=v[0],g=v[1],y=a.add_to_cart||{url:"",text:""};return Object(l.useEffect)((function(){var e=i.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[i,f]),(t||!n&&"simple"===c)&&r?React.createElement(ze,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:b,isDisabled:o,isProcessing:s,isDone:h,onClick:function(){return p.submitForm()}}):React.createElement(Ue,{className:"wc-block-components-product-add-to-cart-button",href:y.url,text:y.text||Object(d.__)("View Product","woo-gutenberg-products-block")})},Xe=function(e){var t=e.disabled,r=e.min,n=e.max,a=e.value,c=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){c(e.target.value)}})},$e=function(e){var t=e.reason,r=void 0===t?Object(d.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},Ze=function(){var e=xe(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement($e,null):t.id&&!t.is_in_stock?React.createElement($e,{reason:Object(d.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Xe,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(Ge,null))},et=(r(296),r(42)),tt=r.n(et),rt=r(193),nt=r(3),at=r(147),ct={value:"",label:Object(d.__)("Select an option","woo-gutenberg-products-block")},ot=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,a=e.value,c=void 0===a?"":a,i=e.onChange,u=void 0===i?function(){}:i,l=e.errorMessage,f=void 0===l?Object(d.__)("Please select a value.","woo-gutenberg-products-block"):l,p=Object(s.b)(),b=p.getValidationError,m=p.setValidationErrors,v=p.clearValidationError,h=t,g=b(h)||{};return Object(nt.useEffect)((function(){c?v(h):m(re()({},h,{message:f,hidden:!0}))}),[c,h,f,v,m]),Object(nt.useEffect)((function(){return function(){v(h)}}),[h,v]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement(rt.SelectControl,{label:Object(qe.decodeEntities)(t),value:c||"",options:[ct].concat(tt()(n)),onChange:u,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":g.message&&!g.hidden})}),React.createElement(at.a,{propertyName:h,elementId:h}))};function st(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?st(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ut=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var a=Object.keys(e);return n.filter((function(e){return a.every((function(n){var a=r[n]||"",c=t["id:"+e].attributes[n];return""===a||(null===c||c===a)}))}))},lt=function(e,t,r){var n={},a=Object.keys(e),c=Object.values(r).filter(Boolean).length>0;return a.forEach((function(a){var o=e[a],s=it(it({},r),{},re()({},a,null)),i=c?ut(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[a]})):null;n[a]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(qe.decodeEntities)(r)}:null})).filter(Boolean)}(o.terms,u)})),n};function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){re()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pt=function(e){var t=e.attributes,r=e.variationAttributes,n=e.setRequestParams,a=Object(f.a)(t),c=Object(f.a)(r),o=Object(l.useState)(0),s=u()(o,2),i=s[0],d=s[1],p=Object(l.useState)({}),b=u()(p,2),m=b[0],v=b[1],h=Object(l.useMemo)((function(){return lt(a,c,m)}),[m,a,c]);return Object(l.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(a).length?d(function(e,t,r){return ut(e,t,r)[0]||0}(a,c,m)):i>0&&d(0)}),[m,i,a,c]),Object(l.useEffect)((function(){n({id:i,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[n,i,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map((function(e){return React.createElement(ot,{key:e,attributeName:e,options:h[e],value:m[e],onChange:function(t){v(ft(ft({},m),{},re()({},e,t)))}})})))},bt=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(Le.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),a=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(n).length||0===a.length?null:React.createElement(pt,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},mt=function(){var e=xe(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement($e,null):t.id&&!t.is_in_stock?React.createElement($e,{reason:Object(d.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(bt,{product:t,dispatchers:c}),React.createElement(Xe,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(Ge,null))},vt=function(){return React.createElement(Ge,null)},ht=function(){return React.createElement(rt.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},gt=function(){return React.createElement(ht,null)},yt=function(){var e=xe(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(mt,null):"grouped"===r?React.createElement(gt,null):"external"===r?React.createElement(vt,null):"simple"===r||"variation"===r?React.createElement(Ze,null):null:React.createElement(Ge,null)},Ot=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Le.isEmpty)(n)});return React.createElement(We,{product:n,showFormElements:r},React.createElement("div",{className:a},React.createElement(yt,null)))})),jt={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}};t.default=Object(n.compose)(Object(a.a)(jt))(Ot)},37:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),a=r(36),c=r.n(a),o=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},42:function(e,t,r){var n=r(91),a=r(92),c=r(54),o=r(93);e.exports=function(e){return n(e)||a(e)||c(e)||o()}},51:function(e,t){function r(e,t,r,n,a,c,o){try{var s=e[c](o),i=s.value}catch(e){return void r(e)}s.done?t(i):Promise.resolve(i).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var o=e.apply(t,n);function s(e){r(o,a,c,s,i,"next",e)}function i(e){r(o,a,c,s,i,"throw",e)}s(void 0)}))}}},58:function(e,t,r){"use strict";r.d(t,"b",(function(){return b})),r.d(t,"a",(function(){return m}));var n=r(6),a=r.n(n),c=r(9),o=r.n(c),s=r(0),i=r(7),u=r(36),l=r.n(u);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=Object(s.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}}),b=function(){return Object(s.useContext)(p)},m=function(e){var t=e.children,r=Object(s.useState)({}),n=o()(r,2),c=n[0],u=n[1],d=Object(s.useCallback)((function(e){return c[e]}),[c]),b=Object(s.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),m=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),v=Object(s.useCallback)((function(){u({})}),[]),h=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:f(f({},t),e)}))}),[]),g=Object(s.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=f(f({},r[e]),t);return l()(r[e],n)?r:f(f({},r),{},a()({},e,n))}))}),[]),y={getValidationError:d,setValidationErrors:h,clearValidationError:m,clearAllValidationErrors:v,hideValidationError:Object(s.useCallback)((function(e){g(e,{hidden:!0})}),[g]),showValidationError:Object(s.useCallback)((function(e){g(e,{hidden:!1})}),[g]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=f(f({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:f(f({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:b};return React.createElement(p.Provider,{value:y},t)}},74:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(14),o=r.n(c),s=r(76),i=(r(4),r(5)),u=r.n(i);r(151);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,c=e.children,i=o()(e,["className","showSpinner","children"]),l=u()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return React.createElement(s.a,a()({className:l},i),n&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},81:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),a=r(13),c=r(117),o=r(17),s=r(7),i={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(c.a)(),r=t.isEditor,u=t.previewData,l=(null==u?void 0:u.previewCart)||{},d=e.shouldSelect,f=Object(a.useSelect)((function(e,t){var a=t.dispatch;if(!d)return i;if(r)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 c=e(n.CART_STORE_KEY),u=c.getCartData(),f=c.getCartErrors(),p=c.getCartTotals(),b=!c.hasFinishedResolution("getCartData"),m=c.areShippingRatesLoading(),v=a(n.CART_STORE_KEY).receiveCart,h=Object(s.mapValues)(u.shippingAddress,(function(e){return Object(o.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:p,cartIsLoading:b,cartErrors:f,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!h.country,receiveCart:v}}),[d]);return f}},91:function(e,t,r){var n=r(55);e.exports=function(e){if(Array.isArray(e))return n(e)}},92:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},93:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}}}]);
build/atomic-block-components/add-to-cart.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{150:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(8),c=r.n(n),o=r(6);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},n,b));case u:return b.delete(o),s(s({},e),{},c()({},n,b))}return e}},232:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(86),o=(r(2),r(239),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var f=l(a)||{};if(!f.message||f.hidden)return null;r=f.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(i)},r))})},238:function(e,t){},239:function(e,t){},390:function(e,t){},394:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},s=function(e){return n(e,c.ERROR)},i=function(e){return n(e,c.FAIL)},u=function(){return{responseTypes:c,noticeContexts:o,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},395:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(150),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},396:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(15),c=r.n(n),o=r(53),a=r.n(o),s=r(37),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=!0,i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=24;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:if(d=e.sent,"object"!==a()(d)||void 0!==d.type){e.next=13;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 13:if(!0===(s="object"!==a()(d)||d)){e.next=16;break}return e.abrupt("return",s);case 16:e.next=22;break;case 18:return e.prev=18,e.t0=e.catch(7),console.error(e.t0),e.abrupt("return",{type:"error"});case 22:e.next=5;break;case 24:e.next=29;break;case 26:e.prev=26,e.t1=e.catch(3),i.e(e.t1);case 29:return e.prev=29,i.f(),e.finish(29);case 32:return e.abrupt("return",s);case 33:case"end":return e.stop()}}),e,null,[[3,26,29,32],[7,18]])})));return function(t,r,n){return e.apply(this,arguments)}}()},397:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},398:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(86),s=r(11),i=r.n(s),u=r(1),l=r(60),b=r(140),f=r(394),d=r(929),p="pristine",O="idle",m="disabled",j="processing",v="before_processing",h="after_processing",y={status:p,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},g="set_pristine",E="set_idle",w="set_disabled",P="set_processing",k="set_before_processing",_="set_after_processing",C="set_processing_response",A="set_has_error",S="set_no_error",x="set_quantity",D="set_request_params",q=g,N=E,R=w,T=P,V=k,F=_,I=C,B=A,Q=S,M=x,W=D,H=function(){return{type:q}},L=function(){return{type:N}},U=function(){return{type:R}},z=function(){return{type:T}},J=function(){return{type:V}},Y=function(){return{type:F}},G=function(e){return{type:I,data:e}},X=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?B:Q;return{type:t}},$=function(e){return{type:M,quantity:e}},K=function(e){return{type:W,data:e}},Z=r(8),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=g,ce=E,oe=w,ae=P,se=k,ie=_,ue=C,le=A,be=S,fe=x,de=D,pe=p,Oe=O,me=m,je=j,ve=v,he=h,ye=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case ne:e=y;break;case ce:e=t.status!==Oe?re(re({},t),{},{status:Oe}):t;break;case oe:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case fe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case de:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),o)});break;case ue:e=re(re({},t),{},{processingResponse:o});break;case ae:e=!1===(e=t.status!==je?re(re({},t),{},{status:je,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case se:e=t.status!==ve?re(re({},t),{},{status:ve,hasError:!1}):t;break;case ie:e=t.status!==he?re(re({},t),{},{status:he}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===je||t.status===ve?re(re({},e),{},{status:Oe}):e;break;case be:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&c!==ne&&e.status===pe&&(e.status=Oe),e},ge=r(150),Ee=r(395),we="add_to_cart_before_processing",Pe="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",_e=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Ee.a)(Pe,e),onAddToCartProcessingWithError:Object(Ee.a)(ke,e),onAddToCartBeforeProcessing:Object(Ee.a)(we,e)}},Ce=r(396),Ae=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Se=function(){return Object(n.useContext)(Ae)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ye,y),s=i()(o,2),p=s[0],g=s[1],E=Object(n.useReducer)(ge.b,{}),w=i()(E,2),P=w[0],k=w[1],_=Object(l.a)(P),C=Object(b.a)(),A=C.addErrorNotice,S=C.removeNotices,x=Object(a.b)().setValidationErrors,D=Object(f.a)(),q=D.isSuccessResponse,N=D.isErrorResponse,R=D.isFailResponse,T=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:_e(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:_e(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:_e(k).onAddToCartBeforeProcessing}}),[k]),V=Object(n.useMemo)((function(){return{resetForm:function(){g(H())},submitForm:function(){g(J())},setQuantity:function(e){g($(e))},setHasError:function(e){g(X(e))},setRequestParams:function(e){g(K(e))},setAfterProcessing:function(e){g(G(e)),g(Y())}}}),[]);Object(n.useEffect)((function(){var e=p.status,t=!r.id||!Object(d.a)(r);e!==m||t?e!==m&&t&&g(U()):g(L())}),[p.status,r,g]),Object(n.useEffect)((function(){p.status===v&&(S("error"),Object(Ce.a)(_,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&A(t),r&&x(r)})),g(L())):g(z())})))}),[p.status,x,A,S,g,_]),Object(n.useEffect)((function(){if(p.status===h){var e={processingResponse:p.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;A(e.message,t)}};if(p.hasError)return void Object(Ce.b)(_,ke,e).then((function(r){if(N(r)||R(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");A(c,{id:"add-to-cart"})}g(L())}));Object(Ce.b)(_,Pe,e).then((function(e){N(e)||R(e)?(t(e),g(X(!0))):g(L())}))}}),[p.status,p.hasError,p.processingResponse,V,A,N,R,q,_]);var F=Object(d.b)(r),I={product:r,productType:r.type||"simple",productIsPurchasable:Object(d.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:F,showFormElements:c&&F,quantity:p.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:p.requestParams,isIdle:p.status===O,isDisabled:p.status===m,isProcessing:p.status===j,isBeforeProcessing:p.status===v,isAfterProcessing:p.status===h,hasError:p.hasError,eventRegistration:T,dispatchActions:V};return Object(n.createElement)(Ae.Provider,{value:I},t)},De=r(13),qe=r.n(De),Ne=r(134),Re=r(33),Te=r(536);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Fe=function(){var e=Se(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,s=e.hasError,l=e.isProcessing,f=e.requestParams,d=Object(a.b)(),p=d.hasValidationErrors,O=d.showAllValidationErrors,m=Object(b.a)(),j=m.addErrorNotice,v=m.removeNotice,h=Object(Ne.a)().receiveCart,y=Object(n.useState)(!1),g=i()(y,2),E=g[0],w=g[1],P=!s&&l,k=Object(n.useCallback)((function(){return!p||(O(),{type:"error"})}),[p,O]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var _=Object(n.useCallback)((function(){w(!0),v("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},f);qe()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){qe.a.setNonce(e.headers),e.json().then((function(r){e.ok?h(r):(r.body&&r.body.message?j(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):j(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&h(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,j,v,h,t,c,f]);return Object(n.useEffect)((function(){P&&!E&&_()}),[P,_,E]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(a.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Fe,null)))},Be=r(44),Qe=r(6),Me=r(73),We=(r(390),r(99)),He=r(61),Le=r(563),Ue=r(842),ze=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(We.a,{className:t,href:r,rel:"nofollow"},c)},Je=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,s=e.onClick;return Object(n.createElement)(We.a,{className:t,disabled:o,showSpinner:c,onClick:s},a&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(He.a,{srcElement:Le.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},Ye=function(){var e=Se(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,s=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(Ue.a)(o.id||0).cartQuantity,O=Object(n.useState)(!1),m=i()(O,2),j=m[0],v=m[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||v(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Je,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:s,isProcessing:l,isDone:j,onClick:function(){return d.submitForm()}}):Object(n.createElement)(ze,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(u.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},Ke=(r(562),r(51)),Ze=r.n(Ke),et=r(4),tt=r(9),rt=r(232),nt={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,s=e.value,i=void 0===s?"":s,l=e.onChange,b=void 0===l?function(){}:l,f=e.errorMessage,d=void 0===f?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):f,p=Object(a.b)(),O=p.getValidationError,m=p.setValidationErrors,j=p.clearValidationError,v=t,h=O(v)||{};return Object(tt.useEffect)((function(){i?j(v):m(ee()({},v,{message:d,hidden:!0}))}),[i,v,d,j,m]),Object(tt.useEffect)((function(){return function(){j(v)}}),[v,j]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Re.decodeEntities)(t),value:i||"",options:[nt].concat(Ze()(c)),onChange:b,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),Object(n.createElement)(rt.a,{propertyName:v,elementId:v}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},it=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],s=at(at({},r),{},ee()({},c,null)),i=o?st(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Re.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(l.a)(t),a=Object(l.a)(r),s=Object(n.useState)(0),u=i()(s,2),b=u[0],f=u[1],d=Object(n.useState)({}),p=i()(d,2),O=p[0],m=p[1],j=Object(n.useMemo)((function(){return it(o,a,O)}),[O,o,a]);return Object(n.useEffect)((function(){Object.values(O).filter((function(e){return""!==e})).length===Object.keys(o).length?f(function(e,t,r){return st(e,t,r)[0]||0}(o,a,O)):b>0&&f(0)}),[O,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(O).map((function(e){return{attribute:e,value:O[e]}}))})}),[c,b,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:j[e],value:O[e],onChange:function(t){m(lt(lt({},O),{},ee()({},e,t)))}})})))},ft=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Qe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ft,{product:t,dispatchers:a}),Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},pt=function(){return Object(n.createElement)(Ye,null)},Ot=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},mt=function(){return Object(n.createElement)(Ot,null)},jt=function(){var e=Se(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(mt,null):"external"===r?Object(n.createElement)(pt,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Ye,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Qe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(jt,null)))}))},562:function(e,t){},563:function(e,t,r){"use strict";var n=r(0),c=r(58),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},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},86:function(e,t,r){"use strict";r.d(t,"b",(function(){return p})),r.d(t,"a",(function(){return O}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),s=r(0),i=r(6),u=r(46),l=r.n(u);function b(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?b(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=Object(s.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}}),p=function(){return Object(s.useContext)(d)},O=function(e){var t=e.children,r=Object(s.useState)({}),n=a()(r,2),o=n[0],u=n[1],b=Object(s.useCallback)((function(e){return o[e]}),[o]),p=Object(s.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),O=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),m=Object(s.useCallback)((function(){u({})}),[]),j=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:f(f({},t),e)}))}),[]),v=Object(s.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=f(f({},r[e]),t);return l()(r[e],n)?r:f(f({},r),{},c()({},e,n))}))}),[]),h={getValidationError:b,setValidationErrors:j,clearValidationError:O,clearAllValidationErrors:m,hideValidationError:Object(s.useCallback)((function(e){v(e,{hidden:!0})}),[v]),showValidationError:Object(s.useCallback)((function(e){v(e,{hidden:!1})}),[v]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=f(f({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:f(f({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:p};return Object(s.createElement)(d.Provider,{value:h},t)}},929:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},949:function(e,t,r){"use strict";r.r(t);var n=r(25),c=r(946),o=r(398),a=r(397);t.default=Object(n.compose)(Object(c.a)(a.a))(o.a)},99:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),s=r(0),i=r(279),u=(r(2),r(7)),l=r.n(u);r(238);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(s.createElement)(i.a,c()({className:b},u),n&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{150:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(8),c=r.n(n),o=r(6);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},n,b));case u:return b.delete(o),s(s({},e),{},c()({},n,b))}return e}},232:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(86),o=(r(2),r(239),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var f=l(a)||{};if(!f.message||f.hidden)return null;r=f.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(i)},r))})},238:function(e,t){},239:function(e,t){},390:function(e,t){},394:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},s=function(e){return n(e,c.ERROR)},i=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},395:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(150),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},396:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(15),c=r.n(n),o=r(56),a=r.n(o),s=r(37),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=u(o),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===a()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},397:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},398:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r.n(c),a=r(86),s=r(11),i=r.n(s),u=r(1),l=r(60),b=r(140),f=r(394),d=r(929),p="pristine",O="idle",m="disabled",j="processing",v="before_processing",h="after_processing",y={status:p,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},g="set_pristine",E="set_idle",w="set_disabled",P="set_processing",k="set_before_processing",_="set_after_processing",C="set_processing_response",A="set_has_error",S="set_no_error",x="set_quantity",D="set_request_params",q=g,R=E,N=w,T=P,V=k,F=_,I=C,B=A,Q=S,M=x,W=D,H=function(){return{type:q}},L=function(){return{type:R}},U=function(){return{type:N}},z=function(){return{type:T}},J=function(){return{type:V}},Y=function(){return{type:F}},G=function(e){return{type:I,data:e}},X=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?B:Q;return{type:t}},$=function(e){return{type:M,quantity:e}},K=function(e){return{type:W,data:e}},Z=r(8),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=g,ce=E,oe=w,ae=P,se=k,ie=_,ue=C,le=A,be=S,fe=x,de=D,pe=p,Oe=O,me=m,je=j,ve=v,he=h,ye=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case ne:e=y;break;case ce:e=t.status!==Oe?re(re({},t),{},{status:Oe}):t;break;case oe:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case fe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case de:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),o)});break;case ue:e=re(re({},t),{},{processingResponse:o});break;case ae:e=!1===(e=t.status!==je?re(re({},t),{},{status:je,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case se:e=t.status!==ve?re(re({},t),{},{status:ve,hasError:!1}):t;break;case ie:e=t.status!==he?re(re({},t),{},{status:he}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===je||t.status===ve?re(re({},e),{},{status:Oe}):e;break;case be:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&c!==ne&&e.status===pe&&(e.status=Oe),e},ge=r(150),Ee=r(395),we="add_to_cart_before_processing",Pe="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",_e=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Ee.a)(Pe,e),onAddToCartProcessingWithError:Object(Ee.a)(ke,e),onAddToCartBeforeProcessing:Object(Ee.a)(we,e)}},Ce=r(396),Ae=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Se=function(){return Object(n.useContext)(Ae)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ye,y),s=i()(o,2),p=s[0],g=s[1],E=Object(n.useReducer)(ge.b,{}),w=i()(E,2),P=w[0],k=w[1],_=Object(l.a)(P),C=Object(b.a)(),A=C.addErrorNotice,S=C.removeNotices,x=Object(a.b)().setValidationErrors,D=Object(f.a)(),q=D.isSuccessResponse,R=D.isErrorResponse,N=D.isFailResponse,T=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:_e(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:_e(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:_e(k).onAddToCartBeforeProcessing}}),[k]),V=Object(n.useMemo)((function(){return{resetForm:function(){g(H())},submitForm:function(){g(J())},setQuantity:function(e){g($(e))},setHasError:function(e){g(X(e))},setRequestParams:function(e){g(K(e))},setAfterProcessing:function(e){g(G(e)),g(Y())}}}),[]);Object(n.useEffect)((function(){var e=p.status,t=!r.id||!Object(d.a)(r);e!==m||t?e!==m&&t&&g(U()):g(L())}),[p.status,r,g]),Object(n.useEffect)((function(){p.status===v&&(S("error"),Object(Ce.a)(_,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&A(t),r&&x(r)})),g(L())):g(z())})))}),[p.status,x,A,S,g,_]),Object(n.useEffect)((function(){if(p.status===h){var e={processingResponse:p.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;A(e.message,t)}};if(p.hasError)return void Object(Ce.b)(_,ke,e).then((function(r){if(R(r)||N(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");A(c,{id:"add-to-cart"})}g(L())}));Object(Ce.b)(_,Pe,e).then((function(e){R(e)||N(e)?(t(e),g(X(!0))):g(L())}))}}),[p.status,p.hasError,p.processingResponse,V,A,R,N,q,_]);var F=Object(d.b)(r),I={product:r,productType:r.type||"simple",productIsPurchasable:Object(d.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:F,showFormElements:c&&F,quantity:p.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:p.requestParams,isIdle:p.status===O,isDisabled:p.status===m,isProcessing:p.status===j,isBeforeProcessing:p.status===v,isAfterProcessing:p.status===h,hasError:p.hasError,eventRegistration:T,dispatchActions:V};return Object(n.createElement)(Ae.Provider,{value:I},t)},De=r(13),qe=r.n(De),Re=r(134),Ne=r(33),Te=r(536);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Fe=function(){var e=Se(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,s=e.hasError,l=e.isProcessing,f=e.requestParams,d=Object(a.b)(),p=d.hasValidationErrors,O=d.showAllValidationErrors,m=Object(b.a)(),j=m.addErrorNotice,v=m.removeNotice,h=Object(Re.a)().receiveCart,y=Object(n.useState)(!1),g=i()(y,2),E=g[0],w=g[1],P=!s&&l,k=Object(n.useCallback)((function(){return!p||(O(),{type:"error"})}),[p,O]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var _=Object(n.useCallback)((function(){w(!0),v("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},f);qe()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){qe.a.setNonce(e.headers),e.json().then((function(r){e.ok?h(r):(r.body&&r.body.message?j(Object(Ne.decodeEntities)(r.body.message),{id:"add-to-cart"}):j(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;(null===(r=e.data)||void 0===r?void 0:r.cart)&&h(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,j,v,h,t,c,f]);return Object(n.useEffect)((function(){P&&!E&&_()}),[P,_,E]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(a.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Fe,null)))},Be=r(44),Qe=r(6),Me=r(73),We=(r(390),r(99)),He=r(61),Le=r(563),Ue=r(842),ze=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(We.a,{className:t,href:r,rel:"nofollow"},c)},Je=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,s=e.onClick;return Object(n.createElement)(We.a,{className:t,disabled:o,showSpinner:c,onClick:s},a&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(He.a,{srcElement:Le.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},Ye=function(){var e=Se(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,s=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(Ue.a)(o.id||0).cartQuantity,O=Object(n.useState)(!1),m=i()(O,2),j=m[0],v=m[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||v(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Je,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:s,isProcessing:l,isDone:j,onClick:function(){return d.submitForm()}}):Object(n.createElement)(ze,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(u.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},Ke=(r(562),r(51)),Ze=r.n(Ke),et=r(4),tt=r(9),rt=r(232),nt={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,s=e.value,i=void 0===s?"":s,l=e.onChange,b=void 0===l?function(){}:l,f=e.errorMessage,d=void 0===f?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):f,p=Object(a.b)(),O=p.getValidationError,m=p.setValidationErrors,j=p.clearValidationError,v=t,h=O(v)||{};return Object(tt.useEffect)((function(){i?j(v):m(ee()({},v,{message:d,hidden:!0}))}),[i,v,d,j,m]),Object(tt.useEffect)((function(){return function(){j(v)}}),[v,j]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Ne.decodeEntities)(t),value:i||"",options:[nt].concat(Ze()(c)),onChange:b,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),Object(n.createElement)(rt.a,{propertyName:v,elementId:v}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},it=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],s=at(at({},r),{},ee()({},c,null)),i=o?st(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Ne.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(l.a)(t),a=Object(l.a)(r),s=Object(n.useState)(0),u=i()(s,2),b=u[0],f=u[1],d=Object(n.useState)({}),p=i()(d,2),O=p[0],m=p[1],j=Object(n.useMemo)((function(){return it(o,a,O)}),[O,o,a]);return Object(n.useEffect)((function(){Object.values(O).filter((function(e){return""!==e})).length===Object.keys(o).length?f(function(e,t,r){return st(e,t,r)[0]||0}(o,a,O)):b>0&&f(0)}),[O,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(O).map((function(e){return{attribute:e,value:O[e]}}))})}),[c,b,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:j[e],value:O[e],onChange:function(t){m(lt(lt({},O),{},ee()({},e,t)))}})})))},ft=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Qe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ft,{product:t,dispatchers:a}),Object(n.createElement)(Ge,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},pt=function(){return Object(n.createElement)(Ye,null)},Ot=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},mt=function(){return Object(n.createElement)(Ot,null)},jt=function(){var e=Se(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(mt,null):"external"===r?Object(n.createElement)(pt,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Ye,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Qe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(jt,null)))}))},562:function(e,t){},563:function(e,t,r){"use strict";var n=r(0),c=r(58),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},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(46),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},86:function(e,t,r){"use strict";r.d(t,"b",(function(){return p})),r.d(t,"a",(function(){return O}));var n=r(8),c=r.n(n),o=r(11),a=r.n(o),s=r(0),i=r(6),u=r(46),l=r.n(u);function b(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?b(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=Object(s.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}}),p=function(){return Object(s.useContext)(d)},O=function(e){var t=e.children,r=Object(s.useState)({}),n=a()(r,2),o=n[0],u=n[1],b=Object(s.useCallback)((function(e){return o[e]}),[o]),p=Object(s.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),O=Object(s.useCallback)((function(e){u((function(t){return t[e]?Object(i.omit)(t,[e]):t}))}),[]),m=Object(s.useCallback)((function(){u({})}),[]),j=Object(s.useCallback)((function(e){e&&u((function(t){return e=Object(i.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!l()(t[r],e))})),0===Object.values(e).length?t:f(f({},t),e)}))}),[]),v=Object(s.useCallback)((function(e,t){u((function(r){if(!r.hasOwnProperty(e))return r;var n=f(f({},r[e]),t);return l()(r[e],n)?r:f(f({},r),{},c()({},e,n))}))}),[]),h={getValidationError:b,setValidationErrors:j,clearValidationError:O,clearAllValidationErrors:m,hideValidationError:Object(s.useCallback)((function(e){v(e,{hidden:!0})}),[v]),showValidationError:Object(s.useCallback)((function(e){v(e,{hidden:!1})}),[v]),showAllValidationErrors:Object(s.useCallback)((function(){u((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=f(f({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:f(f({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:p};return Object(s.createElement)(d.Provider,{value:h},t)}},929:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},949:function(e,t,r){"use strict";r.r(t);var n=r(25),c=r(946),o=r(398),a=r(397);t.default=Object(n.compose)(Object(c.a)(a.a))(o.a)},99:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(27),a=r.n(o),s=r(0),i=r(279),u=(r(2),r(7)),l=r.n(u);r(238);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(s.createElement)(i.a,c()({className:b},u),n&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}}}]);
build/atomic-block-components/button-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{277:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o}));var r=window.Event||null,c=function(t,e){var n=e.bubbles,c=void 0!==n&&n,a=e.cancelable,o=void 0!==a&&a,i=e.element;if(i||(i=document.body),"function"==typeof r){var s=new r(t,{bubbles:c,cancelable:o});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(t,c,o),i.dispatchEvent(u)}},a=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var a=function(){c(e,{bubbles:n,cancelable:r})};return jQuery(document).on(t,a),function(){return jQuery(document).off(t,a)}}},288:function(t,e){},289:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(10),c=n.n(r),a=n(0),o=n(13),i=n(81),s=n(15),u=n(17),d=n(80),p=function(t,e){var n=t.find((function(t){return t.id===e}));return n?n.quantity:0},l=function(t){var e=Object(o.useDispatch)(s.CART_STORE_KEY).addItemToCart,n=Object(i.a)(),r=n.cartItems,l=n.cartIsLoading,b=Object(d.a)(),f=b.addErrorNotice,m=b.removeNotice,g=Object(a.useState)(!1),h=c()(g,2),_=h[0],v=h[1],E=Object(a.useRef)(p(r,t));return Object(a.useEffect)((function(){var e=p(r,t);e!==E.current&&(E.current=e)}),[r,t]),{cartQuantity:Number.isFinite(E.current)?E.current:0,addingToCart:_,cartIsLoading:l,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),e(t,n).then((function(t){!0===t&&m("add-to-cart")})).catch((function(t){f(Object(u.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},299:function(t,e,n){"use strict";n.r(e);var r=n(11),c=n.n(r),a=n(6),o=n.n(a),i=(n(4),n(5)),s=n.n(i),u=n(1),d=n(0),p=n(289),l=n(17),b=n(277),f=n(69),m=n(191),g=(n(288),function(t){var e=t.product,n=Object(d.useRef)(!0),r=e.id,a=e.permalink,o=e.add_to_cart,i=e.has_options,f=e.is_purchasable,m=e.is_in_stock,g=Object(p.a)(r),h=g.cartQuantity,_=g.addingToCart,v=g.addToCart;Object(d.useEffect)((function(){n.current?n.current=!1:Object(b.c)()}),[h]);var E=Number.isFinite(h)&&h>0,C=!i&&f&&m,j=Object(l.decodeEntities)((null==o?void 0:o.description)||""),O=E?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",h,"woo-gutenberg-products-block"),h):Object(l.decodeEntities)((null==o?void 0:o.text)||Object(u.__)("Add to cart","woo-gutenberg-products-block")),w=C?"button":"a",y={};return C?y.onClick=function(){v()}:(y.href=a,y.rel="nofollow"),React.createElement(w,c()({"aria-label":j,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:_,added:E}),disabled:_},y),O)}),h=function(){return React.createElement("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};e.default=Object(m.withProductDataContext)((function(t){var e=t.className,n=Object(f.useInnerBlockLayoutContext)().parentClassName,r=Object(f.useProductDataContext)().product;return React.createElement("div",{className:s()(e,"wp-block-button","wc-block-components-product-button",o()({},"".concat(n,"__product-add-to-cart"),n))},r.id?React.createElement(g,{product:r}):React.createElement(h,null))}))},81:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(15),c=n(13),a=n(117),o=n(17),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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},e=Object(a.a)(),n=e.isEditor,u=e.previewData,d=(null==u?void 0:u.previewCart)||{},p=t.shouldSelect,l=Object(c.useSelect)((function(t,e){var c=e.dispatch;if(!p)return s;if(n)return{cartCoupons:d.coupons,cartItems:d.items,cartItemsCount:d.items_count,cartItemsWeight:d.items_weight,cartNeedsPayment:d.needs_payment,cartNeedsShipping:d.needs_shipping,cartItemErrors:[],cartTotals:d.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:d.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==d?void 0:d.receiveCart)?d.receiveCart:function(){}};var a=t(r.CART_STORE_KEY),u=a.getCartData(),l=a.getCartErrors(),b=a.getCartTotals(),f=!a.hasFinishedResolution("getCartData"),m=a.areShippingRatesLoading(),g=c(r.CART_STORE_KEY).receiveCart,h=Object(i.mapValues)(u.shippingAddress,(function(t){return Object(o.decodeEntities)(t)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:b,cartIsLoading:f,cartErrors:l,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!h.country,receiveCart:g}}),[p]);return l}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{277:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o}));var r=window.Event||null,c=function(t,e){var n=e.bubbles,c=void 0!==n&&n,a=e.cancelable,o=void 0!==a&&a,i=e.element;if(i||(i=document.body),"function"==typeof r){var s=new r(t,{bubbles:c,cancelable:o});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(t,c,o),i.dispatchEvent(u)}},a=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var a=function(){c(e,{bubbles:n,cancelable:r})};return jQuery(document).on(t,a),function(){return jQuery(document).off(t,a)}}},288:function(t,e){},289:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(9),c=n.n(r),a=n(0),o=n(13),i=n(81),s=n(15),u=n(17),d=n(80),p=function(t,e){var n=t.find((function(t){return t.id===e}));return n?n.quantity:0},l=function(t){var e=Object(o.useDispatch)(s.CART_STORE_KEY).addItemToCart,n=Object(i.a)(),r=n.cartItems,l=n.cartIsLoading,b=Object(d.a)(),f=b.addErrorNotice,m=b.removeNotice,g=Object(a.useState)(!1),h=c()(g,2),_=h[0],v=h[1],E=Object(a.useRef)(p(r,t));return Object(a.useEffect)((function(){var e=p(r,t);e!==E.current&&(E.current=e)}),[r,t]),{cartQuantity:Number.isFinite(E.current)?E.current:0,addingToCart:_,cartIsLoading:l,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),e(t,n).then((function(t){!0===t&&m("add-to-cart")})).catch((function(t){f(Object(u.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},299:function(t,e,n){"use strict";n.r(e);var r=n(11),c=n.n(r),a=n(6),o=n.n(a),i=(n(4),n(5)),s=n.n(i),u=n(1),d=n(0),p=n(289),l=n(17),b=n(277),f=n(69),m=n(191),g=(n(288),function(t){var e=t.product,n=Object(d.useRef)(!0),r=e.id,a=e.permalink,o=e.add_to_cart,i=e.has_options,f=e.is_purchasable,m=e.is_in_stock,g=Object(p.a)(r),h=g.cartQuantity,_=g.addingToCart,v=g.addToCart;Object(d.useEffect)((function(){n.current?n.current=!1:Object(b.c)()}),[h]);var E=Number.isFinite(h)&&h>0,C=!i&&f&&m,j=Object(l.decodeEntities)((null==o?void 0:o.description)||""),O=E?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",h,"woo-gutenberg-products-block"),h):Object(l.decodeEntities)((null==o?void 0:o.text)||Object(u.__)("Add to cart","woo-gutenberg-products-block")),w=C?"button":"a",y={};return C?y.onClick=function(){v()}:(y.href=a,y.rel="nofollow"),React.createElement(w,c()({"aria-label":j,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:_,added:E}),disabled:_},y),O)}),h=function(){return React.createElement("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};e.default=Object(m.withProductDataContext)((function(t){var e=t.className,n=Object(f.useInnerBlockLayoutContext)().parentClassName,r=Object(f.useProductDataContext)().product;return React.createElement("div",{className:s()(e,"wp-block-button","wc-block-components-product-button",o()({},"".concat(n,"__product-add-to-cart"),n))},r.id?React.createElement(g,{product:r}):React.createElement(h,null))}))},81:function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var r=n(15),c=n(13),a=n(117),o=n(17),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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},e=Object(a.a)(),n=e.isEditor,u=e.previewData,d=(null==u?void 0:u.previewCart)||{},p=t.shouldSelect,l=Object(c.useSelect)((function(t,e){var c=e.dispatch;if(!p)return s;if(n)return{cartCoupons:d.coupons,cartItems:d.items,cartItemsCount:d.items_count,cartItemsWeight:d.items_weight,cartNeedsPayment:d.needs_payment,cartNeedsShipping:d.needs_shipping,cartItemErrors:[],cartTotals:d.totals,cartIsLoading:!1,cartErrors:[],shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},shippingRates:d.shipping_rates,shippingRatesLoading:!1,hasShippingAddress:!1,receiveCart:"function"==typeof(null==d?void 0:d.receiveCart)?d.receiveCart:function(){}};var a=t(r.CART_STORE_KEY),u=a.getCartData(),l=a.getCartErrors(),b=a.getCartTotals(),f=!a.hasFinishedResolution("getCartData"),m=a.areShippingRatesLoading(),g=c(r.CART_STORE_KEY).receiveCart,h=Object(i.mapValues)(u.shippingAddress,(function(t){return Object(o.decodeEntities)(t)}));return{cartCoupons:u.coupons,cartItems:u.items||[],cartItemsCount:u.itemsCount,cartItemsWeight:u.itemsWeight,cartNeedsPayment:u.needsPayment,cartNeedsShipping:u.needsShipping,cartItemErrors:u.errors||[],cartTotals:b,cartIsLoading:f,cartErrors:l,shippingAddress:h,shippingRates:u.shippingRates||[],shippingRatesLoading:m,hasShippingAddress:!!h.country,receiveCart:g}}),[p]);return l}}}]);
build/atomic-block-components/image-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5,8],{180:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var a=function(e,t){var r=[];return Object.keys(e).forEach((function(a){if(void 0!==t[a])switch(e[a].type){case"boolean":r[a]="false"!==t[a]&&!1!==t[a];break;case"number":r[a]=parseInt(t[a],10);break;case"array":case"object":r[a]=JSON.parse(t[a]);break;default:r[a]=t[a]}else r[a]=e[a].default})),r}},282:function(e,t,r){"use strict";var a=r(11),n=r.n(a),c=r(180);t.a=function(e){return function(t){return function(r){var a=Object(c.a)(e,r);return React.createElement(t,n()({},r,a))}}}},283:function(e,t){},284:function(e,t,r){"use strict";r.r(t);var a=r(6),n=r.n(a),c=(r(4),r(1)),o=r(5),l=r.n(o),s=r(33),u=r(69),i=r(191);r(283);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,r=e.align,a=Object(u.useInnerBlockLayoutContext)().parentClassName,o=Object(u.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var i="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:l()("wc-block-components-product-sale-badge",t,i,n()({},"".concat(a,"__product-onsale"),a))},React.createElement(s.a,{label:Object(c.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Product on sale","woo-gutenberg-products-block")}))}))},285:function(e,t){},307:function(e,t,r){"use strict";r.r(t);var a=r(26),n=r(282),c=r(6),o=r.n(c),l=r(10),s=r.n(l),u=(r(4),r(0)),i=r(5),p=r.n(i),d=r(8),b=r(69),f=r(191),m=r(7),g=r(284);r(285);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function w(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}var j=function(){return React.createElement("img",{src:d.s,alt:"",width:500,height:500})},y=function(e){var t=e.image,r=e.onLoad,a=e.loaded,n=e.showFullSize,c=t||{},o=c.thumbnail,l=c.src,s=c.srcset,u=c.sizes,i={alt:c.alt,onLoad:r,hidden:!a,src:o};return n&&(i=w(w({},i),{},{src:l,srcSet:s,sizes:u})),React.createElement(React.Fragment,null,React.createElement("img",i),!a&&React.createElement(j,null))},v=Object(f.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,a=void 0===r?"full-size":r,n=e.productLink,c=void 0===n||n,l=e.showSaleBadge,i=e.saleBadgeAlign,d=void 0===i?"right":i,f=Object(b.useInnerBlockLayoutContext)().parentClassName,O=Object(b.useProductDataContext)().product,w=Object(u.useState)(!1),v=s()(w,2),h=v[0],E=v[1];if(!O.id)return React.createElement("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",o()({},"".concat(f,"__product-image"),f))},React.createElement(j,null));var R=Object(m.isEmpty)(O.images)?null:O.images[0];return React.createElement("div",{className:p()(t,"wc-block-components-product-image",o()({},"".concat(f,"__product-image"),f))},c?React.createElement("a",{href:O.permalink,rel:"nofollow"},!!l&&React.createElement(g.default,{align:d,product:O}),React.createElement(y,{image:R,onLoad:function(){return E(!0)},loaded:h,showFullSize:"cropped"!==a})):React.createElement(React.Fragment,null,!!l&&React.createElement(g.default,{align:d,product:O}),React.createElement(y,{image:R,onLoad:function(){return E(!0)},loaded:h,showFullSize:"cropped"!==a})))})),h={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}};t.default=Object(a.compose)(Object(n.a)(h))(v)},33:function(e,t,r){"use strict";var a=r(6),n=r.n(a),c=(r(4),r(3)),o=r(5),l=r.n(o);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){n()(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 i=function(e){var t,r=e.label,a=e.screenReaderLabel,n=e.wrapperElement,o=e.wrapperProps,s=null!=r,i=null!=a;return!s&&i?(t=n||"span",o=u(u({},o),{},{className:l()(o.className,"screen-reader-text")}),React.createElement(t,o,a)):(t=n||c.Fragment,s&&i&&r!==a?React.createElement(t,o,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},a)):React.createElement(t,o,r))};i.defaultProps={wrapperProps:{}},t.a=i}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5,8],{180:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},282:function(e,t,r){"use strict";var n=r(11),c=r.n(n),a=r(180);t.a=function(e){return function(t){return function(r){var n=Object(a.a)(e,r);return React.createElement(t,c()({},r,n))}}}},283:function(e,t){},284:function(e,t,r){"use strict";r.r(t);var n=r(6),c=r.n(n),a=(r(4),r(1)),o=r(5),l=r.n(o),u=r(33),s=r(69),i=r(191);r(283);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(s.useInnerBlockLayoutContext)().parentClassName,o=Object(s.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var i="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:l()("wc-block-components-product-sale-badge",t,i,c()({},"".concat(n,"__product-onsale"),n))},React.createElement(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},285:function(e,t){},307:function(e,t,r){"use strict";r.r(t);var n=r(26),c=r(282),a=r(6),o=r.n(a),l=r(9),u=r.n(l),s=(r(4),r(0)),i=r(5),p=r.n(i),d=r(8),b=r(69),m=r(191),f=r(7),g=r(284);r(285);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}var w=function(){return React.createElement("img",{src:d.t,alt:"",width:500,height:500})},y=function(e){var t=e.image,r=e.onLoad,n=e.loaded,c=e.showFullSize,a=t||{},o=a.thumbnail,l=a.src,u=a.srcset,s=a.sizes,i={alt:a.alt,onLoad:r,hidden:!n,src:o};return c&&(i=j(j({},i),{},{src:l,srcSet:u,sizes:s})),React.createElement(React.Fragment,null,React.createElement("img",i),!n&&React.createElement(w,null))},v=Object(m.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,c=e.productLink,a=void 0===c||c,l=e.showSaleBadge,i=e.saleBadgeAlign,d=void 0===i?"right":i,m=Object(b.useInnerBlockLayoutContext)().parentClassName,O=Object(b.useProductDataContext)().product,j=Object(s.useState)(!1),v=u()(j,2),h=v[0],E=v[1];if(!O.id)return React.createElement("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",o()({},"".concat(m,"__product-image"),m))},React.createElement(w,null));var R=Object(f.isEmpty)(O.images)?null:O.images[0];return React.createElement("div",{className:p()(t,"wc-block-components-product-image",o()({},"".concat(m,"__product-image"),m))},a?React.createElement("a",{href:O.permalink,rel:"nofollow"},!!l&&React.createElement(g.default,{align:d,product:O}),React.createElement(y,{image:R,onLoad:function(){return E(!0)},loaded:h,showFullSize:"cropped"!==n})):React.createElement(React.Fragment,null,!!l&&React.createElement(g.default,{align:d,product:O}),React.createElement(y,{image:R,onLoad:function(){return E(!0)},loaded:h,showFullSize:"cropped"!==n})))})),h={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}};t.default=Object(n.compose)(Object(c.a)(h))(v)},33:function(e,t,r){"use strict";var n=r(6),c=r.n(n),a=(r(4),r(3)),o=r(5),l=r.n(o);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,o=e.wrapperProps,u=void 0===o?{}:o,i=null!=r,p=null!=n;return!i&&p?(t=c||"span",u=s(s({},u),{},{className:l()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=c||a.Fragment,i&&p&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}}}]);
build/atomic-block-components/image.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{392:function(e,t,c){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},393:function(e,t,c){"use strict";var n=c(8),r=c.n(n),a=c(11),o=c.n(a),l=c(0),i=(c(2),c(7)),u=c.n(i),s=c(5),d=c(44),p=c(73),m=c(6),b=c(266);c(554);function g(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function O(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?g(Object(c),!0).forEach((function(t){r()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):g(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var f=function(){return Object(l.createElement)("img",{src:s.F,alt:"",width:500,height:500})},j=function(e){var t=e.image,c=e.onLoad,n=e.loaded,r=e.showFullSize,a=t||{},o=a.thumbnail,i=a.src,u=a.srcset,s=a.sizes,d={alt:a.alt,onLoad:c,hidden:!n,src:o};return r&&(d=O(O({},d),{},{src:i,srcSet:u,sizes:s})),Object(l.createElement)(l.Fragment,null,Object(l.createElement)("img",d),!n&&Object(l.createElement)(f,null))};t.a=Object(p.withProductDataContext)((function(e){var t=e.className,c=e.imageSizing,n=void 0===c?"full-size":c,a=e.productLink,i=void 0===a||a,s=e.showSaleBadge,p=e.saleBadgeAlign,g=void 0===p?"right":p,O=Object(d.useInnerBlockLayoutContext)().parentClassName,w=Object(d.useProductDataContext)().product,h=Object(l.useState)(!1),y=o()(h,2),E=y[0],v=y[1];if(!w.id)return Object(l.createElement)("div",{className:u()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",r()({},"".concat(O,"__product-image"),O))},Object(l.createElement)(f,null));var k=Object(m.isEmpty)(w.images)?null:w.images[0];return Object(l.createElement)("div",{className:u()(t,"wc-block-components-product-image",r()({},"".concat(O,"__product-image"),O))},i?Object(l.createElement)("a",{href:w.permalink,rel:"nofollow"},!!s&&Object(l.createElement)(b.default,{align:g,product:w}),Object(l.createElement)(j,{image:k,onLoad:function(){return v(!0)},loaded:E,showFullSize:"cropped"!==n})):Object(l.createElement)(l.Fragment,null,!!s&&Object(l.createElement)(b.default,{align:g,product:w}),Object(l.createElement)(j,{image:k,onLoad:function(){return v(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},554:function(e,t){},947:function(e,t,c){"use strict";c.r(t);var n=c(25),r=c(946),a=c(393),o=c(392);t.default=Object(n.compose)(Object(r.a)(o.a))(a.a)}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{392:function(e,t,c){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},393:function(e,t,c){"use strict";var n=c(8),r=c.n(n),a=c(11),o=c.n(a),l=c(0),i=(c(2),c(7)),u=c.n(i),s=c(5),d=c(44),p=c(73),m=c(6),b=c(266);c(554);function g(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function O(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?g(Object(c),!0).forEach((function(t){r()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):g(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var f=function(){return Object(l.createElement)("img",{src:s.G,alt:"",width:500,height:500})},j=function(e){var t=e.image,c=e.onLoad,n=e.loaded,r=e.showFullSize,a=t||{},o=a.thumbnail,i=a.src,u=a.srcset,s=a.sizes,d={alt:a.alt,onLoad:c,hidden:!n,src:o};return r&&(d=O(O({},d),{},{src:i,srcSet:u,sizes:s})),Object(l.createElement)(l.Fragment,null,Object(l.createElement)("img",d),!n&&Object(l.createElement)(f,null))};t.a=Object(p.withProductDataContext)((function(e){var t=e.className,c=e.imageSizing,n=void 0===c?"full-size":c,a=e.productLink,i=void 0===a||a,s=e.showSaleBadge,p=e.saleBadgeAlign,g=void 0===p?"right":p,O=Object(d.useInnerBlockLayoutContext)().parentClassName,w=Object(d.useProductDataContext)().product,h=Object(l.useState)(!1),y=o()(h,2),E=y[0],v=y[1];if(!w.id)return Object(l.createElement)("div",{className:u()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",r()({},"".concat(O,"__product-image"),O))},Object(l.createElement)(f,null));var k=Object(m.isEmpty)(w.images)?null:w.images[0];return Object(l.createElement)("div",{className:u()(t,"wc-block-components-product-image",r()({},"".concat(O,"__product-image"),O))},i?Object(l.createElement)("a",{href:w.permalink,rel:"nofollow"},!!s&&Object(l.createElement)(b.default,{align:g,product:w}),Object(l.createElement)(j,{image:k,onLoad:function(){return v(!0)},loaded:E,showFullSize:"cropped"!==n})):Object(l.createElement)(l.Fragment,null,!!s&&Object(l.createElement)(b.default,{align:g,product:w}),Object(l.createElement)(j,{image:k,onLoad:function(){return v(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},554:function(e,t){},947:function(e,t,c){"use strict";c.r(t);var n=c(25),r=c(946),a=c(393),o=c(392);t.default=Object(n.compose)(Object(r.a)(o.a))(a.a)}}]);
build/atomic-block-components/price-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{122:function(e,r){},130:function(e,r,t){"use strict";var c=t(6),a=t.n(c),n=t(1),o=t(38),i=t(5),l=t.n(i),s=(t(4),t(149),function(e){var r=e.className,t=e.currency,c=e.maxPrice,a=e.minPrice,n=e.priceClassName,i=e.priceStyle;return React.createElement("span",{className:r},React.createElement(o.a,{className:l()("wc-block-components-product-price__value",n),currency:t,value:a,style:i})," — ",React.createElement(o.a,{className:l()("wc-block-components-product-price__value",n),currency:t,value:c,style:i}))}),u=function(e){var r=e.className,t=e.currency,c=e.regularPriceClassName,a=e.regularPriceStyle,i=e.regularPrice,s=e.priceClassName,u=e.priceStyle,p=e.price;return React.createElement("span",{className:r},React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("del",{className:l()("wc-block-components-product-price__regular",c),style:a},e)},value:i}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:l()("wc-block-components-product-price__value","is-discounted",s),style:u},e)},value:p}))};r.a=function(e){var r=e.align,t=e.className,c=e.currency,n=e.maxPrice,i=void 0===n?null:n,p=e.minPrice,m=void 0===p?null:p,f=e.price,y=void 0===f?null:f,b=e.priceClassName,d=e.priceStyle,g=e.regularPrice,v=e.regularPriceClassName,_=e.regularPriceStyle,N=l()(t,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));return g&&y!==g?React.createElement(u,{className:N,currency:c,price:y,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:v,regularPriceStyle:_}):null!==m&&null!==i?React.createElement(s,{className:N,currency:c,maxPrice:i,minPrice:m,priceClassName:b,priceStyle:d}):null!==y?React.createElement("span",{className:N},React.createElement(o.a,{className:l()("wc-block-components-product-price__value",b),currency:c,value:y,style:d})):React.createElement("span",{className:N},React.createElement("span",{className:l()("wc-block-components-product-price__value",b)}))}},149:function(e,r){},152:function(e,r,t){"use strict";t.d(r,"c",(function(){return f})),t.d(r,"b",(function(){return y})),t.d(r,"a",(function(){return b}));var c=t(6),a=t.n(c),n=t(23),o=t.n(n),i=t(2);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){a()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u,p,m={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(u=i.CURRENCY.symbol,p=i.CURRENCY.symbolPosition,{left:u,left_space:" "+u,right:"",right_space:""}[p]||""),suffix:function(e,r){return{left:"",left_space:"",right:e,right_space:" "+e}[r]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},f=function(e){if(!e||"object"!==o()(e))return m;var r=e.currency_code,t=e.currency_symbol,c=e.currency_thousand_separator,a=e.currency_decimal_separator,n=e.currency_minor_unit,i=e.currency_prefix,l=e.currency_suffix;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof c?c:",",decimalSeparator:"string"==typeof a?a:".",minorUnit:Number.isFinite(n)?n:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof l?l:""}},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},m),e)},b=function(e,r){if(""===e||void 0===e)return"";var t=parseInt(e,10);if(!Number.isFinite(t))return"";var c=y(r),a=t/Math.pow(10,c.minorUnit),n=c.prefix+a+c.suffix,o=document.createElement("textarea");return o.innerHTML=n,o.value}},297:function(e,r,t){"use strict";t.r(r);var c=t(6),a=t.n(c),n=(t(4),t(5)),o=t.n(n),i=t(130),l=t(152),s=t(69),u=t(192),p=t(8),m=t(191);r.default=Object(m.withProductDataContext)((function(e){var r,t,c,n,m,f,y,b=e.className,d=e.align,g=e.fontSize,v=e.customFontSize,_=e.saleFontSize,N=e.customSaleFontSize,O=e.color,C=e.customColor,P=e.saleColor,j=e.customSaleColor,S=Object(s.useInnerBlockLayoutContext)().parentClassName,R=Object(s.useProductDataContext)().product,w=o()(b,a()({},"".concat(S,"__product-price"),S));if(!R.id)return React.createElement(i.a,{align:d,className:w});var E=Object(u.getColorClassName)("color",O),h=Object(u.getFontSizeClass)(g),x=Object(u.getColorClassName)("color",P),k=Object(u.getFontSizeClass)(_),U=o()((r={"has-text-color":O||C,"has-font-size":g||v},a()(r,E,E),a()(r,h,h),r)),D=o()((t={"has-text-color":P||j,"has-font-size":_||N},a()(t,x,x),a()(t,k,k),t)),F={color:C,fontSize:v},z={color:j,fontSize:N},Y=R.prices,M=Object(l.c)(Y),T=Y.price!==Y.regular_price,V=T?o()((c={},a()(c,"".concat(S,"__product-price__value"),S),a()(c,D,Object(p.F)()),c)):o()((n={},a()(n,"".concat(S,"__product-price__value"),S),a()(n,U,Object(p.F)()),n)),B=T?z:F;return React.createElement(i.a,{align:d,className:w,currency:M,price:Y.price,priceClassName:V,priceStyle:Object(p.F)()?B:{},minPrice:null==Y||null===(m=Y.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==Y||null===(f=Y.price_range)||void 0===f?void 0:f.max_amount,regularPrice:Y.regular_price,regularPriceClassName:o()((y={},a()(y,"".concat(S,"__product-price__regular"),S),a()(y,U,Object(p.F)()),y)),regularPriceStyle:Object(p.F)()?F:{}})}))},38:function(e,r,t){"use strict";var c=t(11),a=t.n(c),n=t(6),o=t.n(n),i=t(14),l=t.n(i),s=t(100),u=t(5),p=t.n(u);t(122);function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?m(Object(t),!0).forEach((function(r){o()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.className,t=e.value,c=e.currency,n=e.onValueChange,o=l()(e,["className","value","currency","onValueChange"]);if("-"===t)return null;var i=t/Math.pow(10,c.minorUnit);if(!Number.isFinite(i))return null;var u=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),m=f(f(f({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(c)),{},{value:void 0,currency:void 0,onValueChange:void 0}),y=n?function(e){var r=e.value*Math.pow(10,c.minorUnit);n(r)}:function(){};return React.createElement(s.a,a()({className:u},m,{value:i,onValueChange:y}))}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{122:function(e,r){},130:function(e,r,t){"use strict";var c=t(6),a=t.n(c),n=t(1),o=t(38),i=t(5),l=t.n(i),s=(t(4),t(149),function(e){var r=e.className,t=e.currency,c=e.maxPrice,a=e.minPrice,n=e.priceClassName,i=e.priceStyle;return React.createElement("span",{className:r},React.createElement(o.a,{className:l()("wc-block-components-product-price__value",n),currency:t,value:a,style:i})," — ",React.createElement(o.a,{className:l()("wc-block-components-product-price__value",n),currency:t,value:c,style:i}))}),u=function(e){var r=e.className,t=e.currency,c=e.regularPriceClassName,a=e.regularPriceStyle,i=e.regularPrice,s=e.priceClassName,u=e.priceStyle,p=e.price;return React.createElement("span",{className:r},React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("del",{className:l()("wc-block-components-product-price__regular",c),style:a},e)},value:i}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:l()("wc-block-components-product-price__value","is-discounted",s),style:u},e)},value:p}))};r.a=function(e){var r=e.align,t=e.className,c=e.currency,n=e.maxPrice,i=void 0===n?null:n,p=e.minPrice,m=void 0===p?null:p,f=e.price,y=void 0===f?null:f,b=e.priceClassName,d=e.priceStyle,g=e.regularPrice,v=e.regularPriceClassName,_=e.regularPriceStyle,N=l()(t,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));return g&&y!==g?React.createElement(u,{className:N,currency:c,price:y,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:v,regularPriceStyle:_}):null!==m&&null!==i?React.createElement(s,{className:N,currency:c,maxPrice:i,minPrice:m,priceClassName:b,priceStyle:d}):null!==y?React.createElement("span",{className:N},React.createElement(o.a,{className:l()("wc-block-components-product-price__value",b),currency:c,value:y,style:d})):React.createElement("span",{className:N},React.createElement("span",{className:l()("wc-block-components-product-price__value",b)}))}},149:function(e,r){},152:function(e,r,t){"use strict";t.d(r,"c",(function(){return f})),t.d(r,"b",(function(){return y})),t.d(r,"a",(function(){return b}));var c=t(6),a=t.n(c),n=t(24),o=t.n(n),i=t(2);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){a()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u,p,m={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(u=i.CURRENCY.symbol,p=i.CURRENCY.symbolPosition,{left:u,left_space:" "+u,right:"",right_space:""}[p]||""),suffix:function(e,r){return{left:"",left_space:"",right:e,right_space:" "+e}[r]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},f=function(e){if(!e||"object"!==o()(e))return m;var r=e.currency_code,t=e.currency_symbol,c=e.currency_thousand_separator,a=e.currency_decimal_separator,n=e.currency_minor_unit,i=e.currency_prefix,l=e.currency_suffix;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof c?c:",",decimalSeparator:"string"==typeof a?a:".",minorUnit:Number.isFinite(n)?n:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof l?l:""}},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},m),e)},b=function(e,r){if(""===e||void 0===e)return"";var t=parseInt(e,10);if(!Number.isFinite(t))return"";var c=y(r),a=t/Math.pow(10,c.minorUnit),n=c.prefix+a+c.suffix,o=document.createElement("textarea");return o.innerHTML=n,o.value}},297:function(e,r,t){"use strict";t.r(r);var c=t(6),a=t.n(c),n=(t(4),t(5)),o=t.n(n),i=t(130),l=t(152),s=t(69),u=t(192),p=t(8),m=t(191);r.default=Object(m.withProductDataContext)((function(e){var r,t,c,n,m,f,y,b=e.className,d=e.align,g=e.fontSize,v=e.customFontSize,_=e.saleFontSize,N=e.customSaleFontSize,O=e.color,C=e.customColor,P=e.saleColor,j=e.customSaleColor,S=Object(s.useInnerBlockLayoutContext)().parentClassName,R=Object(s.useProductDataContext)().product,w=o()(b,a()({},"".concat(S,"__product-price"),S));if(!R.id)return React.createElement(i.a,{align:d,className:w});var E=Object(u.getColorClassName)("color",O),h=Object(u.getFontSizeClass)(g),x=Object(u.getColorClassName)("color",P),k=Object(u.getFontSizeClass)(_),U=o()((r={"has-text-color":O||C,"has-font-size":g||v},a()(r,E,E),a()(r,h,h),r)),D=o()((t={"has-text-color":P||j,"has-font-size":_||N},a()(t,x,x),a()(t,k,k),t)),z={color:C,fontSize:v},Y={color:j,fontSize:N},F=R.prices,H=Object(l.c)(F),M=F.price!==F.regular_price,T=M?o()((c={},a()(c,"".concat(S,"__product-price__value"),S),a()(c,D,Object(p.H)()),c)):o()((n={},a()(n,"".concat(S,"__product-price__value"),S),a()(n,U,Object(p.H)()),n)),V=M?Y:z;return React.createElement(i.a,{align:d,className:w,currency:H,price:F.price,priceClassName:T,priceStyle:Object(p.H)()?V:{},minPrice:null==F||null===(m=F.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==F||null===(f=F.price_range)||void 0===f?void 0:f.max_amount,regularPrice:F.regular_price,regularPriceClassName:o()((y={},a()(y,"".concat(S,"__product-price__regular"),S),a()(y,U,Object(p.H)()),y)),regularPriceStyle:Object(p.H)()?z:{}})}))},38:function(e,r,t){"use strict";var c=t(11),a=t.n(c),n=t(6),o=t.n(n),i=t(14),l=t.n(i),s=t(100),u=t(5),p=t.n(u);t(122);function m(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?m(Object(t),!0).forEach((function(r){o()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):m(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.className,t=e.value,c=e.currency,n=e.onValueChange,o=l()(e,["className","value","currency","onValueChange"]);if("-"===t)return null;var i=t/Math.pow(10,c.minorUnit);if(!Number.isFinite(i))return null;var u=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),m=f(f(f({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(c)),{},{value:void 0,currency:void 0,onValueChange:void 0}),y=n?function(e){var r=e.value*Math.pow(10,c.minorUnit);n(r)}:function(){};return React.createElement(s.a,a()({className:u},m,{value:i,onValueChange:y}))}}}]);
build/atomic-block-components/price.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{164:function(e,r,t){"use strict";var c=t(8),n=t.n(c),a=t(0),o=t(1),i=t(56),l=t(7),s=t.n(l),u=(t(2),t(236),function(e){var r=e.className,t=e.currency,c=e.maxPrice,n=e.minPrice,o=e.priceClassName,l=e.priceStyle;return Object(a.createElement)("span",{className:r},Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:n,style:l})," — ",Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:c,style:l}))}),p=function(e){var r=e.className,t=e.currency,c=e.regularPriceClassName,n=e.regularPriceStyle,l=e.regularPrice,u=e.priceClassName,p=e.priceStyle,m=e.price;return Object(a.createElement)("span",{className:r},Object(a.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(a.createElement)(i.a,{currency:t,renderText:function(e){return Object(a.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:n},e)},value:l}),Object(a.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(a.createElement)(i.a,{currency:t,renderText:function(e){return Object(a.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",u),style:p},e)},value:m}))};r.a=function(e){var r=e.align,t=e.className,c=e.currency,o=e.maxPrice,l=void 0===o?null:o,m=e.minPrice,b=void 0===m?null:m,f=e.price,y=void 0===f?null:f,d=e.priceClassName,O=e.priceStyle,g=e.regularPrice,j=e.regularPriceClassName,v=e.regularPriceStyle,_=s()(t,"price","wc-block-components-product-price",n()({},"wc-block-components-product-price--align-".concat(r),r));return g&&y!==g?Object(a.createElement)(p,{className:_,currency:c,price:y,priceClassName:d,priceStyle:O,regularPrice:g,regularPriceClassName:j,regularPriceStyle:v}):null!==b&&null!==l?Object(a.createElement)(u,{className:_,currency:c,maxPrice:l,minPrice:b,priceClassName:d,priceStyle:O}):null!==y?Object(a.createElement)("span",{className:_},Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",d),currency:c,value:y,style:O})):Object(a.createElement)("span",{className:_},Object(a.createElement)("span",{className:s()("wc-block-components-product-price__value",d)}))}},193:function(e,r){},236:function(e,r){},258:function(e,r,t){"use strict";t.d(r,"c",(function(){return b})),t.d(r,"b",(function(){return f})),t.d(r,"a",(function(){return y}));var c=t(8),n=t.n(c),a=t(53),o=t.n(a),i=t(3);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){n()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u,p,m={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(u=i.CURRENCY.symbol,p=i.CURRENCY.symbolPosition,{left:u,left_space:" "+u,right:"",right_space:""}[p]||""),suffix:function(e,r){return{left:"",left_space:"",right:e,right_space:" "+e}[r]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},b=function(e){if(!e||"object"!==o()(e))return m;var r=e.currency_code,t=e.currency_symbol,c=e.currency_thousand_separator,n=e.currency_decimal_separator,a=e.currency_minor_unit,i=e.currency_prefix,l=e.currency_suffix;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof c?c:",",decimalSeparator:"string"==typeof n?n:".",minorUnit:Number.isFinite(a)?a:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof l?l:""}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},m),e)},y=function(e,r){if(""===e||void 0===e)return"";var t=parseInt(e,10);if(!Number.isFinite(t))return"";var c=f(r),n=t/Math.pow(10,c.minorUnit),a=c.prefix+n+c.suffix,o=document.createElement("textarea");return o.innerHTML=a,o.value}},533:function(e,r,t){"use strict";t.r(r);var c=t(8),n=t.n(c),a=t(0),o=(t(2),t(7)),i=t.n(o),l=t(164),s=t(258),u=t(44),p=t(14),m=t(5),b=t(73);r.default=Object(b.withProductDataContext)((function(e){var r,t,c,o,b,f,y,d=e.className,O=e.align,g=e.fontSize,j=e.customFontSize,v=e.saleFontSize,_=e.customSaleFontSize,N=e.color,C=e.customColor,P=e.saleColor,S=e.customSaleColor,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,h=i()(d,n()({},"".concat(w,"__product-price"),w));if(!E.id)return Object(a.createElement)(l.a,{align:O,className:h});var x=Object(p.getColorClassName)("color",N),k=Object(p.getFontSizeClass)(g),R=Object(p.getColorClassName)("color",P),U=Object(p.getFontSizeClass)(v),D=i()((r={"has-text-color":N||C,"has-font-size":g||j},n()(r,x,x),n()(r,k,k),r)),z=i()((t={"has-text-color":P||S,"has-font-size":v||_},n()(t,R,R),n()(t,U,U),t)),Y={color:C,fontSize:j},F={color:S,fontSize:_},W=E.prices,M=Object(s.c)(W),T=W.price!==W.regular_price,V=T?i()((c={},n()(c,"".concat(w,"__product-price__value"),w),n()(c,z,Object(m.W)()),c)):i()((o={},n()(o,"".concat(w,"__product-price__value"),w),n()(o,D,Object(m.W)()),o)),B=T?F:Y;return Object(a.createElement)(l.a,{align:O,className:h,currency:M,price:W.price,priceClassName:V,priceStyle:Object(m.W)()?B:{},minPrice:null==W||null===(b=W.price_range)||void 0===b?void 0:b.min_amount,maxPrice:null==W||null===(f=W.price_range)||void 0===f?void 0:f.max_amount,regularPrice:W.regular_price,regularPriceClassName:i()((y={},n()(y,"".concat(w,"__product-price__regular"),w),n()(y,D,Object(m.W)()),y)),regularPriceStyle:Object(m.W)()?Y:{}})}))},56:function(e,r,t){"use strict";var c=t(10),n=t.n(c),a=t(8),o=t.n(a),i=t(27),l=t.n(i),s=t(0),u=t(183),p=t(7),m=t.n(p);t(193);function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),!0).forEach((function(r){o()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.className,t=e.value,c=e.currency,a=e.onValueChange,o=l()(e,["className","value","currency","onValueChange"]);if("-"===t)return null;var i=t/Math.pow(10,c.minorUnit);if(!Number.isFinite(i))return null;var p=m()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),b=f(f(f({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(c)),{},{value:void 0,currency:void 0,onValueChange:void 0}),y=a?function(e){var r=e.value*Math.pow(10,c.minorUnit);a(r)}:function(){};return Object(s.createElement)(u.a,n()({className:p},b,{value:i,onValueChange:y}))}}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{164:function(e,r,t){"use strict";var c=t(8),n=t.n(c),a=t(0),o=t(1),i=t(55),l=t(7),s=t.n(l),u=(t(2),t(236),function(e){var r=e.className,t=e.currency,c=e.maxPrice,n=e.minPrice,o=e.priceClassName,l=e.priceStyle;return Object(a.createElement)("span",{className:r},Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:n,style:l})," — ",Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",o),currency:t,value:c,style:l}))}),p=function(e){var r=e.className,t=e.currency,c=e.regularPriceClassName,n=e.regularPriceStyle,l=e.regularPrice,u=e.priceClassName,p=e.priceStyle,m=e.price;return Object(a.createElement)("span",{className:r},Object(a.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(a.createElement)(i.a,{currency:t,renderText:function(e){return Object(a.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:n},e)},value:l}),Object(a.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(a.createElement)(i.a,{currency:t,renderText:function(e){return Object(a.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",u),style:p},e)},value:m}))};r.a=function(e){var r=e.align,t=e.className,c=e.currency,o=e.maxPrice,l=void 0===o?null:o,m=e.minPrice,b=void 0===m?null:m,f=e.price,y=void 0===f?null:f,d=e.priceClassName,O=e.priceStyle,g=e.regularPrice,j=e.regularPriceClassName,v=e.regularPriceStyle,_=s()(t,"price","wc-block-components-product-price",n()({},"wc-block-components-product-price--align-".concat(r),r));return g&&y!==g?Object(a.createElement)(p,{className:_,currency:c,price:y,priceClassName:d,priceStyle:O,regularPrice:g,regularPriceClassName:j,regularPriceStyle:v}):null!==b&&null!==l?Object(a.createElement)(u,{className:_,currency:c,maxPrice:l,minPrice:b,priceClassName:d,priceStyle:O}):null!==y?Object(a.createElement)("span",{className:_},Object(a.createElement)(i.a,{className:s()("wc-block-components-product-price__value",d),currency:c,value:y,style:O})):Object(a.createElement)("span",{className:_},Object(a.createElement)("span",{className:s()("wc-block-components-product-price__value",d)}))}},193:function(e,r){},236:function(e,r){},258:function(e,r,t){"use strict";t.d(r,"c",(function(){return b})),t.d(r,"b",(function(){return f})),t.d(r,"a",(function(){return y}));var c=t(8),n=t.n(c),a=t(56),o=t.n(a),i=t(3);function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function s(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?l(Object(t),!0).forEach((function(r){n()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var u,p,m={code:i.CURRENCY.code,symbol:i.CURRENCY.symbol,thousandSeparator:i.CURRENCY.thousandSeparator,decimalSeparator:i.CURRENCY.decimalSeparator,minorUnit:i.CURRENCY.precision,prefix:(u=i.CURRENCY.symbol,p=i.CURRENCY.symbolPosition,{left:u,left_space:" "+u,right:"",right_space:""}[p]||""),suffix:function(e,r){return{left:"",left_space:"",right:e,right_space:" "+e}[r]||""}(i.CURRENCY.symbol,i.CURRENCY.symbolPosition)},b=function(e){if(!e||"object"!==o()(e))return m;var r=e.currency_code,t=e.currency_symbol,c=e.currency_thousand_separator,n=e.currency_decimal_separator,a=e.currency_minor_unit,i=e.currency_prefix,l=e.currency_suffix;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof c?c:",",decimalSeparator:"string"==typeof n?n:".",minorUnit:Number.isFinite(a)?a:2,prefix:"string"==typeof i?i:"$",suffix:"string"==typeof l?l:""}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(s({},m),e)},y=function(e,r){if(""===e||void 0===e)return"";var t=parseInt(e,10);if(!Number.isFinite(t))return"";var c=f(r),n=t/Math.pow(10,c.minorUnit),a=c.prefix+n+c.suffix,o=document.createElement("textarea");return o.innerHTML=a,o.value}},533:function(e,r,t){"use strict";t.r(r);var c=t(8),n=t.n(c),a=t(0),o=(t(2),t(7)),i=t.n(o),l=t(164),s=t(258),u=t(44),p=t(14),m=t(5),b=t(73);r.default=Object(b.withProductDataContext)((function(e){var r,t,c,o,b,f,y,d=e.className,O=e.align,g=e.fontSize,j=e.customFontSize,v=e.saleFontSize,_=e.customSaleFontSize,N=e.color,C=e.customColor,P=e.saleColor,S=e.customSaleColor,w=Object(u.useInnerBlockLayoutContext)().parentClassName,E=Object(u.useProductDataContext)().product,h=i()(d,n()({},"".concat(w,"__product-price"),w));if(!E.id)return Object(a.createElement)(l.a,{align:O,className:h});var x=Object(p.getColorClassName)("color",N),k=Object(p.getFontSizeClass)(g),R=Object(p.getColorClassName)("color",P),U=Object(p.getFontSizeClass)(v),D=i()((r={"has-text-color":N||C,"has-font-size":g||j},n()(r,x,x),n()(r,k,k),r)),z=i()((t={"has-text-color":P||S,"has-font-size":v||_},n()(t,R,R),n()(t,U,U),t)),Y={color:C,fontSize:j},F={color:S,fontSize:_},X=E.prices,M=Object(s.c)(X),T=X.price!==X.regular_price,V=T?i()((c={},n()(c,"".concat(w,"__product-price__value"),w),n()(c,z,Object(m.X)()),c)):i()((o={},n()(o,"".concat(w,"__product-price__value"),w),n()(o,D,Object(m.X)()),o)),B=T?F:Y;return Object(a.createElement)(l.a,{align:O,className:h,currency:M,price:X.price,priceClassName:V,priceStyle:Object(m.X)()?B:{},minPrice:null==X||null===(b=X.price_range)||void 0===b?void 0:b.min_amount,maxPrice:null==X||null===(f=X.price_range)||void 0===f?void 0:f.max_amount,regularPrice:X.regular_price,regularPriceClassName:i()((y={},n()(y,"".concat(w,"__product-price__regular"),w),n()(y,D,Object(m.X)()),y)),regularPriceStyle:Object(m.X)()?Y:{}})}))},55:function(e,r,t){"use strict";var c=t(10),n=t.n(c),a=t(8),o=t.n(a),i=t(27),l=t.n(i),s=t(0),u=t(183),p=t(7),m=t.n(p);t(193);function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function f(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),!0).forEach((function(r){o()(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}r.a=function(e){var r=e.className,t=e.value,c=e.currency,a=e.onValueChange,o=l()(e,["className","value","currency","onValueChange"]);if("-"===t)return null;var i=t/Math.pow(10,c.minorUnit);if(!Number.isFinite(i))return null;var p=m()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),b=f(f(f({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(c)),{},{value:void 0,currency:void 0,onValueChange:void 0}),y=a?function(e){var r=e.value*Math.pow(10,c.minorUnit);a(r)}:function(){};return Object(s.createElement)(u.a,n()({className:p},b,{value:i,onValueChange:y}))}}}]);
build/atomic-block-components/sale-badge-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{283:function(e,t){},284:function(e,t,r){"use strict";r.r(t);var c=r(6),n=r.n(c),a=(r(4),r(1)),o=r(5),s=r.n(o),l=r(33),p=r(69),u=r(191);r(283);t.default=Object(u.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(p.useInnerBlockLayoutContext)().parentClassName,o=Object(p.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var u="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:s()("wc-block-components-product-sale-badge",t,u,n()({},"".concat(c,"__product-onsale"),c))},React.createElement(l.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},33:function(e,t,r){"use strict";var c=r(6),n=r.n(c),a=(r(4),r(3)),o=r(5),s=r.n(o);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,o=e.wrapperProps,l=null!=r,u=null!=c;return!l&&u?(t=n||"span",o=p(p({},o),{},{className:s()(o.className,"screen-reader-text")}),React.createElement(t,o,c)):(t=n||a.Fragment,l&&u&&r!==c?React.createElement(t,o,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},c)):React.createElement(t,o,r))};u.defaultProps={wrapperProps:{}},t.a=u}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{283:function(e,t){},284:function(e,t,r){"use strict";r.r(t);var c=r(6),n=r.n(c),a=(r(4),r(1)),o=r(5),s=r.n(o),l=r(33),u=r(69),p=r(191);r(283);t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(u.useInnerBlockLayoutContext)().parentClassName,o=Object(u.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:s()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},React.createElement(l.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},33:function(e,t,r){"use strict";var c=r(6),n=r.n(c),a=(r(4),r(3)),o=r(5),s=r.n(o);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,o=e.wrapperProps,l=void 0===o?{}:o,p=null!=r,b=null!=c;return!p&&b?(t=n||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),React.createElement(t,l,c)):(t=n||a.Fragment,p&&b&&r!==c?React.createElement(t,l,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},c)):React.createElement(t,l,r))}}}]);
build/atomic-block-components/sale-badge.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{266:function(e,t,r){"use strict";r.r(t);var c=r(8),n=r.n(c),a=r(0),o=(r(2),r(1)),s=r(7),l=r.n(s),p=r(48),u=r(44),b=r(73);r(553);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(u.useInnerBlockLayoutContext)().parentClassName,s=Object(u.useProductDataContext)().product;if(!s.id||!s.on_sale)return null;var b="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,b,n()({},"".concat(c,"__product-onsale"),c))},Object(a.createElement)(p.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))}))},48:function(e,t,r){"use strict";var c=r(8),n=r.n(c),a=r(0),o=(r(2),r(9)),s=r(7),l=r.n(s);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,s=e.wrapperProps,p=null!=r,b=null!=c;return!p&&b?(t=n||"span",s=u(u({},s),{},{className:l()(s.className,"screen-reader-text")}),Object(a.createElement)(t,s,c)):(t=n||o.Fragment,p&&b&&r!==c?Object(a.createElement)(t,s,Object(a.createElement)("span",{"aria-hidden":"true"},r),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,s,r))};b.defaultProps={wrapperProps:{}},t.a=b},553:function(e,t){}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{266:function(e,t,r){"use strict";r.r(t);var c=r(8),n=r.n(c),a=r(0),o=(r(2),r(1)),s=r(7),l=r.n(s),u=r(48),b=r(44),p=r(73);r(553);t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(b.useInnerBlockLayoutContext)().parentClassName,s=Object(b.useProductDataContext)().product;if(!s.id||!s.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},Object(a.createElement)(u.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))}))},48:function(e,t,r){"use strict";var c=r(8),n=r.n(c),a=r(0),o=(r(2),r(9)),s=r(7),l=r.n(s);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,s=e.wrapperProps,u=void 0===s?{}:s,p=null!=r,i=null!=c;return!p&&i?(t=n||"span",u=b(b({},u),{},{className:l()(u.className,"screen-reader-text")}),Object(a.createElement)(t,u,c)):(t=n||o.Fragment,p&&i&&r!==c?Object(a.createElement)(t,u,Object(a.createElement)("span",{"aria-hidden":"true"},r),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,u,r))}},553:function(e,t){}}]);
build/atomic-block-components/title-frontend.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{180:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var o=function(e,t){var c=[];return Object.keys(e).forEach((function(o){if(void 0!==t[o])switch(e[o].type){case"boolean":c[o]="false"!==t[o]&&!1!==t[o];break;case"number":c[o]=parseInt(t[o],10);break;case"array":case"object":c[o]=JSON.parse(t[o]);break;default:c[o]=t[o]}else c[o]=e[o].default})),c}},282:function(e,t,c){"use strict";var o=c(11),n=c.n(o),r=c(180);t.a=function(e){return function(t){return function(c){var o=Object(r.a)(e,c);return React.createElement(t,n()({},c,o))}}}},286:function(e,t){},306:function(e,t,c){"use strict";c.r(t);var o=c(26),n=c(282),r=c(6),a=c.n(r),i=(c(4),c(5)),s=c.n(i),l=c(17),u=c(69),p=c(192),b=c(8),f=function(e){var t=e.color,c=e.fontSize;return Object(b.F)()?{color:t,fontSize:c}:{}},O=c(191),d=(c(286),Object(O.withProductDataContext)((function(e){var t,c,o,n=e.className,r=e.headingLevel,i=void 0===r?2:r,O=e.productLink,d=void 0===O||O,m=e.align,j=e.color,y=e.customColor,g=e.fontSize,v=e.customFontSize,w=Object(u.useInnerBlockLayoutContext)().parentClassName,k=Object(u.useProductDataContext)().product,h="h".concat(i),S=Object(p.getColorClassName)("color",j),z=Object(p.getFontSizeClass)(g),F=s()((t={"has-text-color":j||y,"has-font-size":g||v},a()(t,S,S),a()(t,z,z),t));if(!k.id)return React.createElement(h,{className:s()(n,"wc-block-components-product-title",(o={},a()(o,"".concat(w,"__product-title"),w),a()(o,"wc-block-components-product-title--align-".concat(m),m&&Object(b.F)()),a()(o,F,Object(b.F)()),o)),style:f({color:y,fontSize:v})});var P=Object(l.decodeEntities)(k.name);return React.createElement(h,{className:s()(n,"wc-block-components-product-title",(c={},a()(c,"".concat(w,"__product-title"),w),a()(c,"wc-block-components-product-title--align-".concat(m),m&&Object(b.F)()),c))},d?React.createElement("a",{href:k.permalink,rel:"nofollow",className:s()(a()({},F,Object(b.F)())),style:f({color:y,fontSize:v})},P):React.createElement("span",{className:s()(a()({},F,Object(b.F)())),style:f({color:y,fontSize:v})},P))})));function m(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,o)}return c}function j(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?m(Object(c),!0).forEach((function(t){a()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):m(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var y={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(b.F)()&&(y=j(j({},y),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}));var g=y;t.default=Object(o.compose)(Object(n.a)(g))(d)}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{180:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var o=function(e,t){var c=[];return Object.keys(e).forEach((function(o){if(void 0!==t[o])switch(e[o].type){case"boolean":c[o]="false"!==t[o]&&!1!==t[o];break;case"number":c[o]=parseInt(t[o],10);break;case"array":case"object":c[o]=JSON.parse(t[o]);break;default:c[o]=t[o]}else c[o]=e[o].default})),c}},282:function(e,t,c){"use strict";var o=c(11),n=c.n(o),r=c(180);t.a=function(e){return function(t){return function(c){var o=Object(r.a)(e,c);return React.createElement(t,n()({},c,o))}}}},286:function(e,t){},306:function(e,t,c){"use strict";c.r(t);var o=c(26),n=c(282),r=c(6),a=c.n(r),i=(c(4),c(5)),s=c.n(i),l=c(17),u=c(69),p=c(192),b=c(8),f=function(e){var t=e.color,c=e.fontSize;return Object(b.H)()?{color:t,fontSize:c}:{}},O=c(191),d=(c(286),Object(O.withProductDataContext)((function(e){var t,c,o,n=e.className,r=e.headingLevel,i=void 0===r?2:r,O=e.productLink,d=void 0===O||O,m=e.align,j=e.color,y=e.customColor,g=e.fontSize,v=e.customFontSize,w=Object(u.useInnerBlockLayoutContext)().parentClassName,k=Object(u.useProductDataContext)().product,h="h".concat(i),S=Object(p.getColorClassName)("color",j),z=Object(p.getFontSizeClass)(g),P=s()((t={"has-text-color":j||y,"has-font-size":g||v},a()(t,S,S),a()(t,z,z),t));if(!k.id)return React.createElement(h,{className:s()(n,"wc-block-components-product-title",(o={},a()(o,"".concat(w,"__product-title"),w),a()(o,"wc-block-components-product-title--align-".concat(m),m&&Object(b.H)()),a()(o,P,Object(b.H)()),o)),style:f({color:y,fontSize:v})});var C=Object(l.decodeEntities)(k.name);return React.createElement(h,{className:s()(n,"wc-block-components-product-title",(c={},a()(c,"".concat(w,"__product-title"),w),a()(c,"wc-block-components-product-title--align-".concat(m),m&&Object(b.H)()),c))},d?React.createElement("a",{href:k.permalink,rel:"nofollow",className:s()(a()({},P,Object(b.H)())),style:f({color:y,fontSize:v})},C):React.createElement("span",{className:s()(a()({},P,Object(b.H)())),style:f({color:y,fontSize:v})},C))})));function m(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,o)}return c}function j(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?m(Object(c),!0).forEach((function(t){a()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):m(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var y={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(b.H)()&&(y=j(j({},y),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}));var g=y;t.default=Object(o.compose)(Object(n.a)(g))(d)}}]);
build/atomic-block-components/title.js CHANGED
@@ -1 +1 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{391:function(t,e,o){"use strict";var c=o(8),n=o.n(c),r=o(5);function a(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,c)}return o}function l(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?a(Object(o),!0).forEach((function(e){n()(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var i={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(r.W)()&&(i=l(l({},i),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),e.a=i},399:function(t,e,o){"use strict";var c=o(8),n=o.n(c),r=o(0),a=(o(2),o(7)),l=o.n(a),i=o(33),s=o(44),u=o(14),p=o(5),b=function(t){var e=t.color,o=t.fontSize;return Object(p.W)()?{color:e,fontSize:o}:{}},O=o(73);o(552),e.a=Object(O.withProductDataContext)((function(t){var e,o,c,a=t.className,O=t.headingLevel,f=void 0===O?2:O,j=t.productLink,d=void 0===j||j,m=t.align,y=t.color,g=t.customColor,w=t.fontSize,v=t.customFontSize,k=Object(s.useInnerBlockLayoutContext)().parentClassName,h=Object(s.useProductDataContext)().product,S="h".concat(f),z=Object(u.getColorClassName)("color",y),P=Object(u.getFontSizeClass)(w),C=l()((e={"has-text-color":y||g,"has-font-size":w||v},n()(e,z,z),n()(e,P,P),e));if(!h.id)return Object(r.createElement)(S,{className:l()(a,"wc-block-components-product-title",(c={},n()(c,"".concat(k,"__product-title"),k),n()(c,"wc-block-components-product-title--align-".concat(m),m&&Object(p.W)()),n()(c,C,Object(p.W)()),c)),style:b({color:g,fontSize:v})});var W=Object(i.decodeEntities)(h.name);return Object(r.createElement)(S,{className:l()(a,"wc-block-components-product-title",(o={},n()(o,"".concat(k,"__product-title"),k),n()(o,"wc-block-components-product-title--align-".concat(m),m&&Object(p.W)()),o))},d?Object(r.createElement)("a",{href:h.permalink,rel:"nofollow",className:l()(n()({},C,Object(p.W)())),style:b({color:g,fontSize:v})},W):Object(r.createElement)("span",{className:l()(n()({},C,Object(p.W)())),style:b({color:g,fontSize:v})},W))}))},552:function(t,e){},948:function(t,e,o){"use strict";o.r(e);var c=o(25),n=o(946),r=o(399),a=o(391);e.default=Object(c.compose)(Object(n.a)(a.a))(r.a)}}]);
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{391:function(t,e,o){"use strict";var c=o(8),n=o.n(c),r=o(5);function a(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);e&&(c=c.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,c)}return o}function l(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?a(Object(o),!0).forEach((function(e){n()(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var i={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(r.X)()&&(i=l(l({},i),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),e.a=i},399:function(t,e,o){"use strict";var c=o(8),n=o.n(c),r=o(0),a=(o(2),o(7)),l=o.n(a),i=o(33),s=o(44),u=o(14),p=o(5),b=function(t){var e=t.color,o=t.fontSize;return Object(p.X)()?{color:e,fontSize:o}:{}},O=o(73);o(552),e.a=Object(O.withProductDataContext)((function(t){var e,o,c,a=t.className,O=t.headingLevel,f=void 0===O?2:O,j=t.productLink,d=void 0===j||j,m=t.align,y=t.color,g=t.customColor,w=t.fontSize,v=t.customFontSize,k=Object(s.useInnerBlockLayoutContext)().parentClassName,h=Object(s.useProductDataContext)().product,S="h".concat(f),z=Object(u.getColorClassName)("color",y),P=Object(u.getFontSizeClass)(w),C=l()((e={"has-text-color":y||g,"has-font-size":w||v},n()(e,z,z),n()(e,P,P),e));if(!h.id)return Object(r.createElement)(S,{className:l()(a,"wc-block-components-product-title",(c={},n()(c,"".concat(k,"__product-title"),k),n()(c,"wc-block-components-product-title--align-".concat(m),m&&Object(p.X)()),n()(c,C,Object(p.X)()),c)),style:b({color:g,fontSize:v})});var E=Object(i.decodeEntities)(h.name);return Object(r.createElement)(S,{className:l()(a,"wc-block-components-product-title",(o={},n()(o,"".concat(k,"__product-title"),k),n()(o,"wc-block-components-product-title--align-".concat(m),m&&Object(p.X)()),o))},d?Object(r.createElement)("a",{href:h.permalink,rel:"nofollow",className:l()(n()({},C,Object(p.X)())),style:b({color:g,fontSize:v})},E):Object(r.createElement)("span",{className:l()(n()({},C,Object(p.X)())),style:b({color:g,fontSize:v})},E))}))},552:function(t,e){},948:function(t,e,o){"use strict";o.r(e);var c=o(25),n=o(946),r=o(399),a=o(391);e.default=Object(c.compose)(Object(n.a)(a.a))(r.a)}}]);
build/attribute-filter-frontend.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '99568fa957e671f627815b5391d7cd9c');
1
+ <?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '450453bfd0a23c664247d001234f0950');
build/attribute-filter-frontend.js CHANGED
@@ -3,7 +3,7 @@
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
- */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"i",(function(){return o})),n.d(t,"v",(function(){return i})),n.d(t,"z",(function(){return c})),n.d(t,"s",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"p",(function(){return s})),n.d(t,"h",(function(){return l})),n.d(t,"A",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"l",(function(){return f})),n.d(t,"j",(function(){return b})),n.d(t,"c",(function(){return g})),n.d(t,"n",(function(){return m})),n.d(t,"o",(function(){return h})),n.d(t,"D",(function(){return y})),n.d(t,"E",(function(){return O})),n.d(t,"w",(function(){return w})),n.d(t,"a",(function(){return j})),n.d(t,"x",(function(){return S})),n.d(t,"b",(function(){return I})),n.d(t,"r",(function(){return E})),n.d(t,"f",(function(){return x})),n.d(t,"y",(function(){return R})),n.d(t,"g",(function(){return P})),n.d(t,"u",(function(){return C})),n.d(t,"t",(function(){return D})),n.d(t,"C",(function(){return T})),n.d(t,"B",(function(){return M})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return H})),n.d(t,"q",(function(){return N})),n.d(t,"F",(function(){return L}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),p=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),d=Object(r.getSetting)("displayItemizedTaxes",!1),f=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),b=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),g=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),m=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=Object(r.getSetting)("isShippingCostHidden",!1),v=Object(r.getSetting)("woocommerceBlocksPhase",1),y=Object(r.getSetting)("wcBlocksAssetUrl",""),O=Object(r.getSetting)("wcBlocksBuildUrl",""),w=Object(r.getSetting)("shippingCountries",{}),j=Object(r.getSetting)("allowedCountries",{}),S=Object(r.getSetting)("shippingStates",{}),I=Object(r.getSetting)("allowedStates",{}),E=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),x=Object(r.getSetting)("checkoutShowLoginReminder",!0),k={id:0,title:"",permalink:""},_=Object(r.getSetting)("storePages",{shop:k,cart:k,checkout:k,privacy:k,terms:k}),R=_.shop.permalink,P=(_.checkout.id,_.checkout.permalink),C=_.privacy.permalink,D=_.privacy.title,T=_.terms.permalink,M=_.terms.title,A=(_.cart.id,_.cart.permalink),H=Object(r.getSetting)("checkoutAllowsGuest",!1),N=(Object(r.getSetting)("checkoutAllowsSignup",!1),Object(r.getSetting)("loginUrl","/wp-login.php")),L=(n(39),function(){return v>1})},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,n){var r=n(71),o=n(72),i=n(54),c=n(73);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,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.data}()},function(e,t,n){var r=n(56);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},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 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";n.d(t,"a",(function(){return o}));var r=n(40);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){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},,,,,function(e,t,n){"use strict";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(23),o=n(18);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),i=(n(4),n(3)),c=n(5),a=n.n(c);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}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:a()(c.className,"screen-reader-text")}),React.createElement(t,c,r)):(t=o||i.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){!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(36),i=n.n(o),c=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},,function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";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){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){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(29),o=n.n(r),i=n(30),c=n.n(i),a=n(18),u=n.n(a),s=n(31),l=n.n(s),p=n(32),d=n.n(p),f=n(19),b=n.n(f),g=n(6),m=n.n(g),h=(n(4),n(3)),v=n(1),y=n(8),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.D,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,i=e.text,c=void 0===i?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):i,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),c&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},c),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(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()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,i=e.errorMessagePrefix,c=this.state,a=c.errorMessage;return c.hasError?React.createElement(O,{errorMessage:r?a: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,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(22),o=n(7),i=n(0),c=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(i.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},,,,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){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return 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 a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,,,,,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),a=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),p=Object(r.useRef)(!1),d=Object(r.useRef)(e);d.current=e;var f=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,c.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var b=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!a||s.current||(d.current.apply(d,e),s.current=!0),l.current=setTimeout((function(){var t=!0;a&&s.current&&(t=!1),f(),!p.current&&u&&t&&d.current.apply(d,e)}),t),o&&!i.current&&u&&(i.current=setTimeout((function(){var e=c.current;f(),p.current||d.current.apply(null,e)}),o))}),[o,t,f,a,u]),g=Object(r.useCallback)((function(){l.current&&(d.current.apply(null,c.current),f())}),[f]);return[b,f,g]}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(10),o=n.n(r),i=n(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return function(e){return t((function(){throw e}))}}},function(e,t,n){"use strict";e.exports=n(129)},,,,,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(10),o=n.n(r),i=n(15),c=n(13),a=n(0),u=n(59),s=n(7),l=n(37),p=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e])]},d=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(c.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e])]},f=function(e,t){var n=Object(u.a)(),r=p(t=t||n),i=o()(r,2),c=i[0],d=i[1],f=Object(l.a)(e),b=Object(a.useRef)(!1);return Object(a.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,a){return i<e&&c>t||i>e&&c<t?0:i<=e&&a<=n||c>=t&&a>=n?i-e-r:c>t&&a<n||i<e&&a>n?c-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,a=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,p="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],b=e;r(b)&&p(b);){if((b=b.parentNode)===d){f.push(b);break}b===document.body&&i(b)&&!i(document.documentElement)||i(b,l)&&f.push(b)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,w=y.width,j=y.top,S=y.right,I=y.bottom,E=y.left,x="start"===a||"nearest"===a?j:"end"===a?I:j+O/2,k="center"===u?E+w/2:"end"===u?S:E,_=[],R=0;R<f.length;R++){var P=f[R],C=P.getBoundingClientRect(),D=C.height,T=C.width,M=C.top,A=C.right,H=C.bottom,N=C.left;if("if-needed"===o&&j>=0&&E>=0&&I<=m&&S<=g&&j>=M&&I<=H&&E>=N&&S<=A)return _;var L=getComputedStyle(P),B=parseInt(L.borderLeftWidth,10),V=parseInt(L.borderTopWidth,10),K=parseInt(L.borderRightWidth,10),F=parseInt(L.borderBottomWidth,10),U=0,q=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-B-K:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-F:0;if(d===P)U="start"===a?x:"end"===a?x-m:"nearest"===a?c(v,v+m,m,V,F,v+x,v+x+O,O):x-m/2,q="start"===u?k:"center"===u?k-g/2:"end"===u?k-g:c(h,h+g,g,B,K,h+k,h+k+w,w),U=Math.max(0,U+v),q=Math.max(0,q+h);else{U="start"===a?x-M-V:"end"===a?x-H+F+W:"nearest"===a?c(M,H,D,V,F+W,x,x+O,O):x-(M+D/2)+W/2,q="start"===u?k-N-B:"center"===u?k-(N+T/2)+$/2:"end"===u?k-A+K+$:c(N,A,T,B,K+$,k,k+w,w);var Y=P.scrollLeft,z=P.scrollTop;x+=z-(U=Math.max(0,Math.min(z+U,P.scrollHeight-D+W))),k+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollWidth-T+$)))}_.push({el:P,top:U,left:q})}return _}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),i=n(6),c=n.n(i),a=n(0),u=n(45);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=[".wp-block-woocommerce-cart"],d=function(e){var t=e.Block,n=e.containers,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=i(e,n),c=s(e,n),p=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,c,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:p})))),e)}))},f=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,i=e.wrappers,c=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),d({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(p.join(","));f(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,i,c,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,i=n.getErrorBoundaryProps,c=n.selector,a=n.wrapper.querySelectorAll(c),d({Block:r,containers:a,getProps:o,getErrorBoundaryProps:i})}))}))}},,,function(e,t){},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(13),i=n(0),c=n(85),a=n(37),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,d=e.shouldSelect,f=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(i.useRef)({results:[],isLoading:!0}),g=Object(a.a)(p),m=Object(a.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(11),o=n.n(r),i=n(14),c=n.n(i),a=n(50),u=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(6),o=n.n(r),i=n(14),c=n.n(i),a=n(3);n(4);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=c()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},,function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(15),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,a=t.dispatch(i.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||c("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},function(e,t,n){"use strict";
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,a=r?Symbol.for("react.strict_mode"):60108,u=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 u:case a: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=u,t.StrictMode=a,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)===u},t.isStrictMode=function(e){return j(e)===a},t.isSuspense=function(e){return j(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===d||e===u||e===a||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(77);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,a=Object(r.useState)(e),u=a[0],s=a[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),p=l[0],d=l[1],f=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){c(b.current,e)||(p(e),b.current=e)}),[e,p,c]),[u,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(4),n(5)),i=n.n(o),c=n(33),a=(n(156),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(r.__)("Apply filter","woo-gutenberg-products-block"):s;return React.createElement("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:u},React.createElement(c.a,{label:a,screenReaderLabel:l}))});a.defaultProps={disabled:!1},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(8),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 a=c.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(c.slug=a.sort(),u.push(c)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",c=e.filter((function(e){return e.attribute!==n.taxonomy}));0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(o,"slug").sort()}),t(Object(r.sortBy)(c,"attribute")))}},,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=(n(4),n(5)),u=n.n(a),s=n(1),l=n(126),p=n(125),d=(n(110),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,a=void 0===i?"li":i,s=e.className,l=void 0===s?"":s,p=e.radius,d=void 0===p?"small":p,f=e.children,b=void 0===f?null:f,g=c()(e,["text","screenReaderText","element","className","radius","children"]),m=a,h=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+d),v=Boolean(r&&r!==t);return React.createElement(m,o()({className:h},g),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,b=e.onRemove,g=void 0===b?function(){}:b,m=e.removeOnAnyClick,h=void 0!==m&&m,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,w=c()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),j=h?"span":"button";if(!n){var S=O&&"string"==typeof O?O:v;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var I={"aria-label":n,disabled:f,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},E=h?I:{},x=h?{"aria-hidden":!0}:I;return React.createElement(d,o()({},w,E,{className:u()(i,"is-removable"),element:h?"button":w.element,screenReaderText:O,text:v}),React.createElement(j,o()({className:"wc-block-components-chip__remove"},x),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(6),o=n.n(r),i=n(42),c=n.n(i),a=n(23),u=n.n(a),s=n(10),l=n.n(s),p=n(0),d=n(98),f=n(113),b=n(59),g=n(139),m=n(7),h=n(37);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),a=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],x=Object(h.a)(t||{}),k=Object(h.a)(n);Object(p.useEffect)((function(){"object"===u()(x)&&Object.keys(x).length&&(O.find((function(e){return e.taxonomy===x.taxonomy}))||w([].concat(c()(O),[x])))}),[x,O,w]),Object(p.useEffect)((function(){I!==k&&void 0!==k&&E(k)}),[k,E,I]);var _=Object(p.useState)(!1),R=l()(_,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}(a)}),[a]);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,n){e.exports=n(267)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(128),o=n(107),i=n(6),c=n.n(i),a=n(10),u=n.n(a),s=n(1),l=n(44),p=n(98),d=n(113),f=n(211),b=n(37),g=n(0),m=n(42),h=n.n(m),v=n(4),y=n.n(v),O=n(5),w=n.n(O),j=(n(216),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,o=e.options,i=void 0===o?[]:o,c=e.checked,a=void 0===c?[]:c,l=e.isLoading,p=void 0!==l&&l,d=e.isDisabled,f=void 0!==d&&d,b=e.limit,m=void 0===b?10:b,v=Object(g.useState)(!1),y=u()(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]),x=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:a.includes(t.value),disabled:f}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===m-1&&I)})),e&&E)}),[i,a,O,m,E,I,f]),k=w()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":p},t);return React.createElement("ul",{className:k},p?S:x)}),S=n(28),I=n(9),E=n(12),x=n(102),k=n(3),_=(n(86),n(103)),R=0;function P(e){return"function"==typeof e?e:C}function C(){}function D(e,t){null!==e&&Object(_.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 B(e){return"string"==typeof e.type}function V(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 a=Y(e,c,n,r,o);return-1===a?t:a}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 a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return o?e>0?Y(1,0,n,r,!1):Y(-1,n-1,n,r,!1):-1}function z(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 Q=M((function(){X().textContent=""}),500);function G(e,t){var n=X(t);e&&(n.textContent=e,Q())}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 a=c?e(t):e;a=n.props.stateReducer(t,a),r=a.hasOwnProperty("selectedItem");var u={},s={};return r&&a.selectedItem!==t.selectedItem&&(o=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((function(e){t[e]!==a[e]&&(i[e]=a[e]),"type"!==e&&(s[e]=a[e],q(n.props,e)||(u[e]=a[e]))})),c&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,Object(I.a)({},n.getStateAndHelpers(),{},a)),u}),(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,a=o.ref,u=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(a,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),u)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=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,a=Object(S.a)(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),u=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=a.disabled?{}:s;return Object(I.a)({type:"button",role:"button","aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,{},a)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=$(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,a=(t.onChangeText,Object(S.a)(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),u={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;a.disabled||((s={}).onChange=A(i,c,n.inputHandleChange),s.onKeyDown=A(r,n.inputHandleKeyDown),s.onBlur=A(o,n.inputHandleBlur),u=s);return Object(I.a)({"aria-autocomplete":"list","aria-activedescendant":d&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":d?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},u,{},a)},n.inputHandleKeyDown=function(e){var t=$(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,a=o.ref,u=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(a,n.menuRef),r.role="listbox",r["aria-labelledby"]=u&&u["aria-label"]?null:n.labelId,r.id=n.menuId,r),u)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick,a=(r.onPress,r.index),u=r.item,s=void 0===u?void 0:u,l=Object(S.a)(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===a?(n.items.push(s),a=n.items.indexOf(s)):n.items[a]=s;var p=c,d=((t={onMouseMove:A(o,(function(){a!==n.getState().highlightedIndex&&(n.setHighlightedIndex(a,{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(a,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return Object(I.a)({id:n.getItemId(a),role:"option","aria-selected":n.getState().highlightedIndex===a},f,{},l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=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,a=r.defaultIsOpen,u=r.initialIsOpen,s=void 0===u?a:u,l=r.initialInputValue,p=void 0===l?"":l,d=r.initialSelectedItem,f=void 0===d?null:d,b=n.getState({highlightedIndex:c,isOpen:s,inputValue:p,selectedItem:f});return null!=b.selectedItem&&void 0===n.props.initialInputValue&&(b.inputValue=n.props.itemToString(b.selectedItem)),n.state=b,n}Object(x.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,a=this.getRootProps,u=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:a,getToggleButtonProps:u,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,!z(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=z(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:B(t)?Object(k.cloneElement)(t,this.getRootProps(V(t))):void 0:null},t}(k.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,a=e.placeholder,u=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:a,tabIndex:u}))},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=n(146),ce=function(e){var t=e.onRemoveItem,n=e.option;return React.createElement(ie.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},ae=n(126),ue=n(125),se=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)},React.createElement(ae.a,{srcElement:ue.a,size:16})))};n(215);function le(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 pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var de=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,a=void 0===c?"":c,u=e.isDisabled,l=void 0!==u&&u,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 pe(pe({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:b,inputValue:""});case te.stateChangeTypes.blurInput:case te.stateChangeTypes.mouseUp:return pe(pe({},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,u=e.highlightedIndex,p=e.inputValue,d=e.isOpen,f=e.openMenu;return React.createElement("div",{className:w()(j,{"is-multiple":b,"is-single":!b,"has-checked":i.length>0,"is-open":d})},React.createElement("label",o({className:"screen-reader-text"}),a),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(ce,{key:e,onRemoveItem:n,option:t}):React.createElement(se,{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:u,options:y.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},fe=n(140),be=n(36),ge=n.n(be),me=n(17),he=n(141),ve=n(142),ye=n(33),Oe=function(e){var t=e.name,n=e.count;return React.createElement(g.Fragment,null,t,Number.isFinite(n)&&React.createElement(ye.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"}}))},we=[{value:"preview-1",name:"Blue",label:React.createElement(Oe,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:React.createElement(Oe,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:React.createElement(Oe,{name:"Red",count:2})}],je={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(214);function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ee=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,o=t.isPreview&&!t.attributeId?je:Object(he.a)(t.attributeId),i=Object(g.useState)([]),c=u()(i,2),a=c[0],m=c[1],h=Object(g.useState)(t.isPreview&&!t.attributeId?we:[]),v=u()(h,2),y=v[0],O=v[1],w=Object(p.a)(),S=u()(w,1)[0],I=Object(p.b)("attributes",[]),E=u()(I,2),x=E[0],k=E[1],_=Object(d.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[o.id],shouldSelect:t.attributeId>0}),R=_.results,P=_.isLoading,C="dropdown"!==t.displayStyle&&"and"===t.queryType,D=Object(f.a)({queryAttribute:{taxonomy:o.taxonomy,queryType:t.queryType},queryState:Ie(Ie({},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||a.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(me.decodeEntities)(e.name),label:React.createElement(Oe,{name:Object(me.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);O(e)}}),[o.taxonomy,R,P,t.showCounts,M,A,a,S.attributes]),Object(g.useEffect)((function(){t.showFilterButton||B()}),[a,B]);var H=Object(g.useMemo)((function(){return x.filter((function(e){return e.attribute===o.taxonomy})).flatMap((function(e){return e.slug}))}),[x,o.taxonomy]),N=Object(b.a)(H);Object(g.useEffect)((function(){ge()(a,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]),B=function(){r||Object(ve.b)(x,k,o,L(a),"or"===t.queryType?"in":"and")},V="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.__)("%1$s filter replaced with %2$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=a.includes(e);V?(t=a.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===a.length?a[0]:null}));m(t)}),[a,y,V]);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(de,{attributeLabel:o.label,checked:a,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:U,multiple:V,onChange:K,options:y}):React.createElement(j,{className:"wc-block-attribute-filter-list",options:y,checked:a,onChange:K,isLoading:U,isDisabled:q}),t.showFilterButton&&React.createElement(fe.a,{className:"wc-block-attribute-filter__button",disabled:U||q,onClick:B})))};Object(o.a)({selector:".wp-block-woocommerce-attribute-filter",Block:Object(r.a)(Ee),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}}}})}]);
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
5
  http://jedwatson.github.io/classnames
6
+ */!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"w",(function(){return i})),n.d(t,"A",(function(){return c})),n.d(t,"t",(function(){return a})),n.d(t,"n",(function(){return u})),n.d(t,"q",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"B",(function(){return p})),n.d(t,"l",(function(){return d})),n.d(t,"m",(function(){return f})),n.d(t,"k",(function(){return b})),n.d(t,"c",(function(){return g})),n.d(t,"o",(function(){return m})),n.d(t,"p",(function(){return h})),n.d(t,"E",(function(){return y})),n.d(t,"F",(function(){return O})),n.d(t,"x",(function(){return w})),n.d(t,"a",(function(){return j})),n.d(t,"y",(function(){return S})),n.d(t,"b",(function(){return I})),n.d(t,"s",(function(){return E})),n.d(t,"g",(function(){return x})),n.d(t,"z",(function(){return R})),n.d(t,"h",(function(){return P})),n.d(t,"v",(function(){return C})),n.d(t,"u",(function(){return D})),n.d(t,"D",(function(){return T})),n.d(t,"C",(function(){return M})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return H})),n.d(t,"f",(function(){return N})),n.d(t,"r",(function(){return L})),n.d(t,"G",(function(){return B})),n.d(t,"H",(function(){return V}));var r=n(2),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),p=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),d=Object(r.getSetting)("displayItemizedTaxes",!1),f=Object(r.getSetting)("hasDarkEditorStyleSupport",!1),b=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),g=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),m=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=Object(r.getSetting)("isShippingCostHidden",!1),v=Object(r.getSetting)("woocommerceBlocksPhase",1),y=Object(r.getSetting)("wcBlocksAssetUrl",""),O=Object(r.getSetting)("wcBlocksBuildUrl",""),w=Object(r.getSetting)("shippingCountries",{}),j=Object(r.getSetting)("allowedCountries",{}),S=Object(r.getSetting)("shippingStates",{}),I=Object(r.getSetting)("allowedStates",{}),E=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),x=Object(r.getSetting)("checkoutShowLoginReminder",!0),k={id:0,title:"",permalink:""},_=Object(r.getSetting)("storePages",{shop:k,cart:k,checkout:k,privacy:k,terms:k}),R=_.shop.permalink,P=(_.checkout.id,_.checkout.permalink),C=_.privacy.permalink,D=_.privacy.title,T=_.terms.permalink,M=_.terms.title,A=(_.cart.id,_.cart.permalink),H=Object(r.getSetting)("checkoutAllowsGuest",!1),N=Object(r.getSetting)("checkoutAllowsSignup",!1),L=Object(r.getSetting)("loginUrl","/wp-login.php"),B=(n(39),function(){return v>2}),V=function(){return v>1}},function(e,t,n){var r=n(71),o=n(72),i=n(54),c=n(73);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},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){"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.data}()},function(e,t,n){var r=n(56);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,function(e,t){!function(){e.exports=this.wp.htmlEntities}()},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 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";n.d(t,"a",(function(){return o}));var r=n(40);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){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},,,,function(e,t,n){"use strict";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(24),o=n(18);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t,n){"use strict";var r=n(6),o=n.n(r),i=(n(4),n(3)),c=n(5),a=n.n(c);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,u=void 0===c?{}:c,l=null!=n,p=null!=r;return!l&&p?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||i.Fragment,l&&p&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},,,function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(36),i=n.n(o),c=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},,function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t,n){"use strict";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){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){!function(){e.exports=this.wp.a11y}()},function(e,t,n){"use strict";var r=n(29),o=n.n(r),i=n(30),c=n.n(i),a=n(18),u=n.n(a),s=n(31),l=n.n(s),p=n(32),d=n.n(p),f=n(19),b=n.n(f),g=n(6),m=n.n(g),h=(n(4),n(3)),v=n(1),y=n(8),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.E,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,i=e.text,c=void 0===i?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):i,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),c&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},c),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(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()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,i=e.errorMessagePrefix,c=this.state,a=c.errorMessage;return c.hasError?React.createElement(O,{errorMessage:r?a: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,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(22),o=n(7),i=n(0),c=function(e){var t=Object(r.a)({},e,{role:"img","aria-hidden":"true",focusable:"false"});return Object(i.createElement)("svg",Object(o.omit)(t,"__unstableActive"))}},,,,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){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return 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 a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,,,,,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),a=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),p=Object(r.useRef)(!1),d=Object(r.useRef)(e);d.current=e;var f=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,c.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var b=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!a||s.current||(d.current.apply(d,e),s.current=!0),l.current=setTimeout((function(){var t=!0;a&&s.current&&(t=!1),f(),!p.current&&u&&t&&d.current.apply(d,e)}),t),o&&!i.current&&u&&(i.current=setTimeout((function(){var e=c.current;f(),p.current||d.current.apply(null,e)}),o))}),[o,t,f,a,u]),g=Object(r.useCallback)((function(){l.current&&(d.current.apply(null,c.current),f())}),[f]);return[b,f,g]}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(9),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(129)},,,,,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(9),o=n.n(r),i=n(15),c=n(13),a=n(0),u=n(59),s=n(7),l=n(37),p=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e])]},d=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(c.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e])]},f=function(e,t){var n=Object(u.a)(),r=p(t=t||n),i=o()(r,2),c=i[0],d=i[1],f=Object(l.a)(e),b=Object(a.useRef)(!1);return Object(a.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,a){return i<e&&c>t||i>e&&c<t?0:i<=e&&a<=n||c>=t&&a>=n?i-e-r:c>t&&a<n||i<e&&a>n?c-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,a=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,p="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],b=e;r(b)&&p(b);){if((b=b.parentNode)===d){f.push(b);break}b===document.body&&i(b)&&!i(document.documentElement)||i(b,l)&&f.push(b)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,w=y.width,j=y.top,S=y.right,I=y.bottom,E=y.left,x="start"===a||"nearest"===a?j:"end"===a?I:j+O/2,k="center"===u?E+w/2:"end"===u?S:E,_=[],R=0;R<f.length;R++){var P=f[R],C=P.getBoundingClientRect(),D=C.height,T=C.width,M=C.top,A=C.right,H=C.bottom,N=C.left;if("if-needed"===o&&j>=0&&E>=0&&I<=m&&S<=g&&j>=M&&I<=H&&E>=N&&S<=A)return _;var L=getComputedStyle(P),B=parseInt(L.borderLeftWidth,10),V=parseInt(L.borderTopWidth,10),K=parseInt(L.borderRightWidth,10),F=parseInt(L.borderBottomWidth,10),U=0,q=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-B-K:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-F:0;if(d===P)U="start"===a?x:"end"===a?x-m:"nearest"===a?c(v,v+m,m,V,F,v+x,v+x+O,O):x-m/2,q="start"===u?k:"center"===u?k-g/2:"end"===u?k-g:c(h,h+g,g,B,K,h+k,h+k+w,w),U=Math.max(0,U+v),q=Math.max(0,q+h);else{U="start"===a?x-M-V:"end"===a?x-H+F+W:"nearest"===a?c(M,H,D,V,F+W,x,x+O,O):x-(M+D/2)+W/2,q="start"===u?k-N-B:"center"===u?k-(N+T/2)+$/2:"end"===u?k-A+K+$:c(N,A,T,B,K+$,k,k+w,w);var Y=P.scrollLeft,z=P.scrollTop;x+=z-(U=Math.max(0,Math.min(z+U,P.scrollHeight-D+W))),k+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollWidth-T+$)))}_.push({el:P,top:U,left:q})}return _}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),i=n(6),c=n.n(i),a=n(0),u=n(45);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=[".wp-block-woocommerce-cart"],d=function(e){var t=e.Block,n=e.containers,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=i(e,n),c=s(e,n),p=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,c,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:p})))),e)}))},f=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,i=e.wrappers,c=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),d({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(p.join(","));f(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,i,c,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,i=n.getErrorBoundaryProps,c=n.selector,a=n.wrapper.querySelectorAll(c),d({Block:r,containers:a,getProps:o,getErrorBoundaryProps:i})}))}))}},,,function(e,t){},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(13),i=n(0),c=n(85),a=n(37),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,d=e.shouldSelect,f=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(i.useRef)({results:[],isLoading:!0}),g=Object(a.a)(p),m=Object(a.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(11),o=n.n(r),i=n(14),c=n.n(i),a=n(50),u=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]);return React.createElement(a.a,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(6),o=n.n(r),i=n(14),c=n.n(i),a=n(3);n(4);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=c()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},,function(e,t,n){"use strict";var r=n(0),o=n(2),i=n(15),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,a=t.dispatch(i.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||c("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},function(e,t,n){"use strict";
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,a=r?Symbol.for("react.strict_mode"):60108,u=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 u:case a: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=u,t.StrictMode=a,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)===u},t.isStrictMode=function(e){return j(e)===a},t.isSuspense=function(e){return j(e)===b},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===c||e===d||e===u||e===a||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(77);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,a=Object(r.useState)(e),u=a[0],s=a[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),p=l[0],d=l[1],f=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){c(b.current,e)||(p(e),b.current=e)}),[e,p,c]),[u,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(4),n(5)),i=n.n(o),c=n(33),a=(n(156),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(r.__)("Apply filter","woo-gutenberg-products-block"):s;return React.createElement("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:u},React.createElement(c.a,{label:a,screenReaderLabel:l}))});a.defaultProps={disabled:!1},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(8),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 a=c.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(c.slug=a.sort(),u.push(c)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",c=e.filter((function(e){return e.attribute!==n.taxonomy}));0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(o,"slug").sort()}),t(Object(r.sortBy)(c,"attribute")))}},,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=(n(4),n(5)),u=n.n(a),s=n(1),l=n(126),p=n(125),d=(n(110),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,a=void 0===i?"li":i,s=e.className,l=void 0===s?"":s,p=e.radius,d=void 0===p?"small":p,f=e.children,b=void 0===f?null:f,g=c()(e,["text","screenReaderText","element","className","radius","children"]),m=a,h=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+d),v=Boolean(r&&r!==t);return React.createElement(m,o()({className:h},g),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,b=e.onRemove,g=void 0===b?function(){}:b,m=e.removeOnAnyClick,h=void 0!==m&&m,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,w=c()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),j=h?"span":"button";if(!n){var S=O&&"string"==typeof O?O:v;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var I={"aria-label":n,disabled:f,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},E=h?I:{},x=h?{"aria-hidden":!0}:I;return React.createElement(d,o()({},w,E,{className:u()(i,"is-removable"),element:h?"button":w.element,screenReaderText:O,text:v}),React.createElement(j,o()({className:"wc-block-components-chip__remove"},x),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(6),o=n.n(r),i=n(42),c=n.n(i),a=n(24),u=n.n(a),s=n(9),l=n.n(s),p=n(0),d=n(98),f=n(113),b=n(59),g=n(139),m=n(7),h=n(37);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),a=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],x=Object(h.a)(t||{}),k=Object(h.a)(n);Object(p.useEffect)((function(){"object"===u()(x)&&Object.keys(x).length&&(O.find((function(e){return e.taxonomy===x.taxonomy}))||w([].concat(c()(O),[x])))}),[x,O,w]),Object(p.useEffect)((function(){I!==k&&void 0!==k&&E(k)}),[k,E,I]);var _=Object(p.useState)(!1),R=l()(_,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}(a)}),[a]);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,n){e.exports=n(267)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(128),o=n(107),i=n(6),c=n.n(i),a=n(9),u=n.n(a),s=n(1),l=n(44),p=n(98),d=n(113),f=n(211),b=n(37),g=n(0),m=n(42),h=n.n(m),v=n(4),y=n.n(v),O=n(5),w=n.n(O),j=(n(216),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,o=e.options,i=void 0===o?[]:o,c=e.checked,a=void 0===c?[]:c,l=e.isLoading,p=void 0!==l&&l,d=e.isDisabled,f=void 0!==d&&d,b=e.limit,m=void 0===b?10:b,v=Object(g.useState)(!1),y=u()(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]),x=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:a.includes(t.value),disabled:f}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===m-1&&I)})),e&&E)}),[i,a,O,m,E,I,f]),k=w()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":p},t);return React.createElement("ul",{className:k},p?S:x)}),S=n(28),I=n(10),E=n(12),x=n(102),k=n(3),_=(n(86),n(103)),R=0;function P(e){return"function"==typeof e?e:C}function C(){}function D(e,t){null!==e&&Object(_.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 B(e){return"string"==typeof e.type}function V(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 a=Y(e,c,n,r,o);return-1===a?t:a}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 a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return o?e>0?Y(1,0,n,r,!1):Y(-1,n-1,n,r,!1):-1}function z(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 Q=M((function(){X().textContent=""}),500);function G(e,t){var n=X(t);e&&(n.textContent=e,Q())}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 a=c?e(t):e;a=n.props.stateReducer(t,a),r=a.hasOwnProperty("selectedItem");var u={},s={};return r&&a.selectedItem!==t.selectedItem&&(o=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((function(e){t[e]!==a[e]&&(i[e]=a[e]),"type"!==e&&(s[e]=a[e],q(n.props,e)||(u[e]=a[e]))})),c&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,Object(I.a)({},n.getStateAndHelpers(),{},a)),u}),(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,a=o.ref,u=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(a,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),u)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=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,a=Object(S.a)(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),u=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=a.disabled?{}:s;return Object(I.a)({type:"button",role:"button","aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,{},a)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=$(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,a=(t.onChangeText,Object(S.a)(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),u={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;a.disabled||((s={}).onChange=A(i,c,n.inputHandleChange),s.onKeyDown=A(r,n.inputHandleKeyDown),s.onBlur=A(o,n.inputHandleBlur),u=s);return Object(I.a)({"aria-autocomplete":"list","aria-activedescendant":d&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":d?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},u,{},a)},n.inputHandleKeyDown=function(e){var t=$(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,a=o.ref,u=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(a,n.menuRef),r.role="listbox",r["aria-labelledby"]=u&&u["aria-label"]?null:n.labelId,r.id=n.menuId,r),u)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick,a=(r.onPress,r.index),u=r.item,s=void 0===u?void 0:u,l=Object(S.a)(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===a?(n.items.push(s),a=n.items.indexOf(s)):n.items[a]=s;var p=c,d=((t={onMouseMove:A(o,(function(){a!==n.getState().highlightedIndex&&(n.setHighlightedIndex(a,{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(a,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return Object(I.a)({id:n.getItemId(a),role:"option","aria-selected":n.getState().highlightedIndex===a},f,{},l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=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,a=r.defaultIsOpen,u=r.initialIsOpen,s=void 0===u?a:u,l=r.initialInputValue,p=void 0===l?"":l,d=r.initialSelectedItem,f=void 0===d?null:d,b=n.getState({highlightedIndex:c,isOpen:s,inputValue:p,selectedItem:f});return null!=b.selectedItem&&void 0===n.props.initialInputValue&&(b.inputValue=n.props.itemToString(b.selectedItem)),n.state=b,n}Object(x.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,a=this.getRootProps,u=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:a,getToggleButtonProps:u,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,!z(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=z(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:B(t)?Object(k.cloneElement)(t,this.getRootProps(V(t))):void 0:null},t}(k.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,a=e.placeholder,u=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:a,tabIndex:u}))},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=n(146),ce=function(e){var t=e.onRemoveItem,n=e.option;return React.createElement(ie.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},ae=n(126),ue=n(125),se=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)},React.createElement(ae.a,{srcElement:ue.a,size:16})))};n(215);function le(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 pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var de=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,a=void 0===c?"":c,u=e.isDisabled,l=void 0!==u&&u,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 pe(pe({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:b,inputValue:""});case te.stateChangeTypes.blurInput:case te.stateChangeTypes.mouseUp:return pe(pe({},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,u=e.highlightedIndex,p=e.inputValue,d=e.isOpen,f=e.openMenu;return React.createElement("div",{className:w()(j,{"is-multiple":b,"is-single":!b,"has-checked":i.length>0,"is-open":d})},React.createElement("label",o({className:"screen-reader-text"}),a),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(ce,{key:e,onRemoveItem:n,option:t}):React.createElement(se,{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:u,options:y.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},fe=n(140),be=n(36),ge=n.n(be),me=n(17),he=n(141),ve=n(142),ye=n(33),Oe=function(e){var t=e.name,n=e.count;return React.createElement(g.Fragment,null,t,Number.isFinite(n)&&React.createElement(ye.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"}}))},we=[{value:"preview-1",name:"Blue",label:React.createElement(Oe,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:React.createElement(Oe,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:React.createElement(Oe,{name:"Red",count:2})}],je={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(214);function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ee=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,o=t.isPreview&&!t.attributeId?je:Object(he.a)(t.attributeId),i=Object(g.useState)([]),c=u()(i,2),a=c[0],m=c[1],h=Object(g.useState)(t.isPreview&&!t.attributeId?we:[]),v=u()(h,2),y=v[0],O=v[1],w=Object(p.a)(),S=u()(w,1)[0],I=Object(p.b)("attributes",[]),E=u()(I,2),x=E[0],k=E[1],_=Object(d.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[o.id],shouldSelect:t.attributeId>0}),R=_.results,P=_.isLoading,C="dropdown"!==t.displayStyle&&"and"===t.queryType,D=Object(f.a)({queryAttribute:{taxonomy:o.taxonomy,queryType:t.queryType},queryState:Ie(Ie({},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||a.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(me.decodeEntities)(e.name),label:React.createElement(Oe,{name:Object(me.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);O(e)}}),[o.taxonomy,R,P,t.showCounts,M,A,a,S.attributes]),Object(g.useEffect)((function(){t.showFilterButton||B()}),[a,B]);var H=Object(g.useMemo)((function(){return x.filter((function(e){return e.attribute===o.taxonomy})).flatMap((function(e){return e.slug}))}),[x,o.taxonomy]),N=Object(b.a)(H);Object(g.useEffect)((function(){ge()(a,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]),B=function(){r||Object(ve.b)(x,k,o,L(a),"or"===t.queryType?"in":"and")},V="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.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,i)):o?Obj