WooCommerce Gutenberg Products Block - Version 2.3.0

Version Description

  • 2019-08-12 =

  • Feature: Added a new Featured Category Block; feature a category and show a link to it's archive.

  • Feature: Added a new Products by Tag(s) block.

  • Feature: Allow individual variations to be selected in the Featured Product block.

  • Feature: Added a button alignment option to product grid blocks to align buttons horizontally across the row.

  • Feature: Added a cancel button to the product category block editor to discard unsaved changes.

  • Enhancement: Change the toggle for list type in Product Category List block to a button toggle component for clarity.

  • Build: Updated build process and plugin structure to follow modern best practices. Minimum PHP version bumped to 5.6.

  • Fix - Correctly hide products from grids when visibility is hidden.

  • Fix - Fix Featured Category block using radio buttons instead of checkboxes.

  • Fix - Use externals for frontend dependencies so they are shared between extensions and blocks. That saves 2.57MB on page weight.

  • Fix - Load frontend scripts dynamically only when the page contains a block that requires them.

  • Fix - Reduce dependencies of JavaScript powered frontend blocks.

  • Fix - Disable HTML editing on dynamic blocks which have no content.

  • Fix - Hide background opacity control in Featured Product settings if there is no background image.

  • Fix - Reduce CSS specificity to make styling easier.

  • Fix - Fix author access to API for handpicked products block.

Download this release

Release Info

Developer aljullu
Plugin Icon 128x128 WooCommerce Gutenberg Products Block
Version 2.3.0
Comparing to
See all releases

Code changes from version 2.2.1 to 2.3.0

Files changed (83) hide show
  1. assets/css/style.scss +148 -159
  2. assets/js/blocks/featured-category/block.js +404 -0
  3. assets/js/blocks/featured-category/editor.scss +18 -0
  4. assets/js/blocks/featured-category/index.js +142 -0
  5. assets/js/blocks/featured-category/style.scss +130 -0
  6. assets/js/blocks/featured-product/block.js +36 -21
  7. assets/js/blocks/featured-product/editor.scss +5 -1
  8. assets/js/blocks/featured-product/index.js +2 -1
  9. assets/js/blocks/featured-product/style.scss +15 -3
  10. assets/js/blocks/handpicked-products/block.js +18 -1
  11. assets/js/blocks/handpicked-products/index.js +9 -0
  12. assets/js/blocks/product-best-sellers/block.js +2 -0
  13. assets/js/blocks/product-best-sellers/index.js +1 -0
  14. assets/js/blocks/product-categories/block.js +39 -58
  15. assets/js/blocks/product-categories/edit.js +30 -12
  16. assets/js/blocks/product-categories/editor.scss +6 -0
  17. assets/js/blocks/product-categories/frontend.js +6 -4
  18. assets/js/blocks/product-categories/get-categories.js +16 -0
  19. assets/js/blocks/product-categories/hierarchy.js +3 -8
  20. assets/js/blocks/product-categories/style.scss +54 -0
  21. assets/js/blocks/product-category/block.js +111 -20
  22. assets/js/blocks/product-category/editor.scss +6 -0
  23. assets/js/blocks/product-category/index.js +1 -0
  24. assets/js/blocks/product-new/block.js +2 -0
  25. assets/js/blocks/product-on-sale/block.js +2 -0
  26. assets/js/blocks/product-tag/block.js +289 -0
  27. assets/js/blocks/product-tag/editor.scss +9 -0
  28. assets/js/blocks/product-tag/index.js +105 -0
  29. assets/js/blocks/product-top-rated/block.js +2 -0
  30. assets/js/blocks/product-top-rated/index.js +1 -0
  31. assets/js/blocks/products-by-attribute/block.js +4 -2
  32. assets/js/blocks/products-by-attribute/editor.scss +1 -1
  33. assets/js/blocks/products-by-attribute/index.js +9 -0
  34. assets/js/components/grid-content-control/index.js +1 -0
  35. assets/js/components/grid-layout-control/index.js +22 -2
  36. assets/js/components/icons/folder-star.js +20 -0
  37. assets/js/components/icons/index.js +1 -0
  38. assets/js/components/product-attribute-control/index.js +2 -2
  39. assets/js/components/product-attribute-control/style.scss +4 -4
  40. assets/js/components/product-category-control/index.js +8 -2
  41. assets/js/components/product-control/index.js +207 -14
  42. assets/js/components/product-control/style.scss +43 -0
  43. assets/js/components/product-preview/index.js +1 -0
  44. assets/js/components/product-tag-control/index.js +184 -0
  45. assets/js/components/product-tag-control/style.scss +16 -0
  46. assets/js/components/toggle-button-control/index.js +88 -0
  47. assets/js/components/toggle-button-control/screenshot.png +0 -0
  48. assets/js/components/toggle-button-control/style.scss +13 -0
  49. assets/js/components/utils/index.js +39 -2
  50. assets/js/utils/get-query.js +9 -0
  51. assets/js/utils/shared-attributes.js +8 -0
  52. assets/js/utils/with-component-id.js +35 -0
  53. assets/php/class-wgpb-block-handpicked-products.php +0 -35
  54. assets/php/class-wgpb-block-library.php +0 -600
  55. assets/php/class-wgpb-block-product-best-sellers.php +0 -45
  56. assets/php/class-wgpb-block-product-category.php +0 -30
  57. assets/php/class-wgpb-block-product-new.php +0 -45
  58. assets/php/class-wgpb-block-product-on-sale.php +0 -32
  59. assets/php/class-wgpb-block-product-top-rated.php +0 -45
  60. assets/php/class-wgpb-block-products-by-attribute.php +0 -42
  61. build/blocks.js +1 -1
  62. build/editor.css +11 -6
  63. build/{products-attribute.deps.json → featured-category.deps.json} +0 -0
  64. build/featured-category.js +1 -0
  65. build/featured-product.js +1 -1
  66. build/frontend.deps.json +1 -1
  67. build/frontend.js +12 -1
  68. build/handpicked-products.js +1 -1
  69. build/packages.js +0 -1
  70. build/product-best-sellers.js +1 -1
  71. build/product-categories.deps.json +1 -1
  72. build/product-categories.js +1 -1
  73. build/product-category.js +1 -1
  74. build/product-new.js +1 -1
  75. build/product-on-sale.js +1 -1
  76. build/product-tag.deps.json +1 -0
  77. build/product-tag.js +1 -0
  78. build/product-top-rated.js +1 -1
  79. build/products-attribute.js +0 -1
  80. build/products-by-attribute.deps.json +1 -0
  81. build/products-by-attribute.js +1 -0
  82. build/style.css +4 -3
  83. build/vendors.js +2 -2
assets/css/style.scss CHANGED
@@ -1,154 +1,158 @@
1
- .wc-block-grid {
 
 
 
 
 
 
2
 
3
- .wc-block-grid__products {
4
- display: flex;
5
- flex-wrap: wrap;
6
- list-style: none;
7
- padding: 0;
8
- margin: 0 0 $gap-large;
 
 
9
 
10
- .wc-block-grid__product {
11
- padding: 0 $gap 0 0;
12
- margin: 0 0 $gap-large 0;
13
- float: none;
14
- width: auto;
15
- position: relative;
16
- text-align: center;
17
-
18
- .wc-block-grid__product-link {
19
- text-decoration: none;
20
- }
21
 
22
- .wc-block-grid__product-image {
23
- text-decoration: none;
24
- margin-bottom: $gap;
25
- display: block;
26
 
27
- img {
28
- vertical-align: middle;
29
- margin-left: auto;
30
- margin-right: auto;
31
- }
32
- }
33
 
34
- .wc-block-grid__product-title {
35
- line-height: 1.2;
36
- font-weight: 700;
37
- }
38
 
39
- .wc-block-grid__product-title,
40
- .wc-block-grid__product-price,
41
- .wc-block-grid__product-rating {
42
- margin-bottom: $gap-small;
43
- display: block;
44
- }
45
 
46
- .wp-block-button {
47
- margin: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  }
 
49
 
50
- .wc-block-grid__product-add-to-cart {
51
- margin: 0;
52
- word-break: break-word;
53
- white-space: normal;
54
-
55
- a {
56
- word-break: break-word;
57
- white-space: normal;
58
- margin: 0;
59
-
60
- &.loading {
61
- opacity: 0.25;
62
- padding-right: 2.618em;
63
-
64
- &::after {
65
- font-family: WooCommerce; /* stylelint-disable-line */
66
- content: "\e01c";
67
- vertical-align: top;
68
- font-weight: 400;
69
- position: absolute;
70
- top: 0.618em;
71
- right: 1em;
72
- animation: spin 2s linear infinite;
73
- }
74
- }
75
-
76
- &.added::after {
77
- font-family: WooCommerce; /* stylelint-disable-line */
78
- content: "\e017";
79
- margin-left: 0.53em;
80
- vertical-align: bottom;
81
- }
82
- }
83
-
84
- .added_to_cart {
85
- text-align: center;
86
- }
87
- }
88
 
89
- .wc-block-grid__product-onsale {
90
- font-weight: 700;
91
- position: absolute;
92
- text-align: center;
93
- top: 0;
94
- left: 0;
95
- margin: 0;
96
- background-color: #000;
97
- color: #fff;
98
- display: inline-block;
99
- font-size: 0.75em;
100
- line-height: 1;
101
- padding: 0.5em;
102
- z-index: 9;
103
- text-transform: uppercase;
104
- }
105
 
106
- .wc-block-grid__product-rating {
107
-
108
- .star-rating {
109
- overflow: hidden;
110
- position: relative;
111
- width: 5.3em;
112
- height: 1.618em;
113
- line-height: 1.618;
114
- font-size: 1em;
115
- font-family: star; /* stylelint-disable-line */
116
- font-weight: 400;
117
- display: inline-block;
118
- margin: 0 auto;
119
-
120
- &::before {
121
- content: "\53\53\53\53\53";
122
- top: 0;
123
- left: 0;
124
- right: 0;
125
- position: absolute;
126
- opacity: 0.5;
127
- color: #aaa;
128
- }
129
-
130
- span {
131
- overflow: hidden;
132
- top: 0;
133
- left: 0;
134
- right: 0;
135
- position: absolute;
136
- padding-top: 1.5em;
137
- }
138
-
139
- span::before {
140
- content: "\53\53\53\53\53";
141
- top: 0;
142
- left: 0;
143
- right: 0;
144
- position: absolute;
145
- color: #000;
146
- }
147
- }
148
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
149
  }
150
  }
 
151
 
 
 
 
 
 
 
 
 
 
 
152
  &.has-1-columns {
153
 
154
  .wc-block-grid__products {
@@ -160,39 +164,18 @@
160
  margin-right: auto;
161
  }
162
  }
163
-
164
  @for $i from 2 to 9 {
165
  &.has-#{$i}-columns .wc-block-grid__product {
166
  flex: 1 0 calc(#{ 100% / $i });
167
  max-width: 100% / $i;
168
  }
169
  }
170
-
171
- .wc-block-grid__products {
172
- font-size: 1em;
173
-
174
- .wc-block-grid__product-title {
175
- font-size: 1em;
176
- }
177
-
178
- .wc-block-grid__product-price {
179
- font-size: 0.8em;
180
- }
181
-
182
- .wp-block-button span.wc-block-grid__product-add-to-cart,
183
- .wc-block-grid__product-add-to-cart a {
184
- font-size: 0.8em;
185
- line-height: 1.4;
186
- }
187
- }
188
-
189
  &.has-4-columns:not(.alignwide):not(.alignfull),
190
  &.has-5-columns:not(.alignfull),
191
  &.has-6-columns:not(.alignfull),
192
  &.has-7-columns,
193
  &.has-8-columns {
194
-
195
- .wc-block-grid__products {
196
  font-size: 0.8em;
197
  }
198
  }
@@ -207,9 +190,15 @@
207
  }
208
  }
209
  .theme-twentynineteen {
 
 
 
210
  // Change the title font to match headings.
211
  .wc-block-grid__product-title,
212
  .wc-block-grid__product-onsale {
213
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
214
  }
 
 
 
215
  }
1
+ .wc-block-grid__products {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ list-style: none;
5
+ padding: 0;
6
+ margin: 0 0 $gap-large;
7
+ }
8
 
9
+ .wc-block-grid__product {
10
+ padding: 0 $gap 0 0;
11
+ margin: 0 0 $gap-large 0;
12
+ float: none;
13
+ width: auto;
14
+ position: relative;
15
+ text-align: center;
16
+ }
17
 
18
+ .wc-block-grid__product-link {
19
+ text-decoration: none;
20
+ border: 0;
21
+ }
 
 
 
 
 
 
 
22
 
23
+ .wc-block-grid__product-image {
24
+ text-decoration: none;
25
+ margin-bottom: $gap;
26
+ display: block;
27
 
28
+ img {
29
+ vertical-align: middle;
30
+ margin-left: auto;
31
+ margin-right: auto;
32
+ }
33
+ }
34
 
35
+ .wc-block-grid__product-title {
36
+ line-height: 1.2;
37
+ font-weight: 700;
38
+ }
39
 
40
+ .wc-block-grid__product-title,
41
+ .wc-block-grid__product-price,
42
+ .wc-block-grid__product-rating {
43
+ margin-bottom: $gap-small;
44
+ display: block;
45
+ }
46
 
47
+ .wc-block-grid__product-add-to-cart {
48
+ margin: 0;
49
+ word-break: break-word;
50
+ white-space: normal;
51
+
52
+ a {
53
+ word-break: break-word;
54
+ white-space: normal;
55
+ margin: 0;
56
+
57
+ &.loading {
58
+ opacity: 0.25;
59
+ padding-right: 2.618em;
60
+
61
+ &::after {
62
+ font-family: WooCommerce; /* stylelint-disable-line */
63
+ content: "\e01c";
64
+ vertical-align: top;
65
+ font-weight: 400;
66
+ position: absolute;
67
+ top: 0.618em;
68
+ right: 1em;
69
+ animation: spin 2s linear infinite;
70
  }
71
+ }
72
 
73
+ &.added::after {
74
+ font-family: WooCommerce; /* stylelint-disable-line */
75
+ content: "\e017";
76
+ margin-left: 0.53em;
77
+ vertical-align: bottom;
78
+ }
79
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
 
81
+ .added_to_cart {
82
+ text-align: center;
83
+ }
84
+ }
 
 
 
 
 
 
 
 
 
 
 
 
85
 
86
+ .wc-block-grid__product-onsale {
87
+ font-weight: 700;
88
+ position: absolute;
89
+ text-align: center;
90
+ top: 0;
91
+ left: 0;
92
+ margin: 0;
93
+ background-color: #000;
94
+ color: #fff;
95
+ display: inline-block;
96
+ font-size: 0.75em;
97
+ padding: 0.5em;
98
+ z-index: 9;
99
+ text-transform: uppercase;
100
+ }
101
+
102
+ .wc-block-grid__product-rating {
103
+
104
+ .star-rating {
105
+ overflow: hidden;
106
+ position: relative;
107
+ width: 5.3em;
108
+ height: 1.618em;
109
+ line-height: 1.618;
110
+ font-size: 1em;
111
+ font-family: star; /* stylelint-disable-line */
112
+ font-weight: 400;
113
+ display: inline-block;
114
+ margin: 0 auto;
115
+
116
+ &::before {
117
+ content: "\53\53\53\53\53";
118
+ top: 0;
119
+ left: 0;
120
+ right: 0;
121
+ position: absolute;
122
+ opacity: 0.5;
123
+ color: #aaa;
124
+ }
125
+
126
+ span {
127
+ overflow: hidden;
128
+ top: 0;
129
+ left: 0;
130
+ right: 0;
131
+ position: absolute;
132
+ padding-top: 1.5em;
133
+ }
134
+
135
+ span::before {
136
+ content: "\53\53\53\53\53";
137
+ top: 0;
138
+ left: 0;
139
+ right: 0;
140
+ position: absolute;
141
+ color: #000;
142
  }
143
  }
144
+ }
145
 
146
+ .wc-block-grid {
147
+ &.has-aligned-buttons {
148
+ .wc-block-grid__product {
149
+ display: flex;
150
+ flex-direction: column;
151
+ }
152
+ .wc-block-grid__product-add-to-cart {
153
+ margin-top: auto !important;
154
+ }
155
+ }
156
  &.has-1-columns {
157
 
158
  .wc-block-grid__products {
164
  margin-right: auto;
165
  }
166
  }
 
167
  @for $i from 2 to 9 {
168
  &.has-#{$i}-columns .wc-block-grid__product {
169
  flex: 1 0 calc(#{ 100% / $i });
170
  max-width: 100% / $i;
171
  }
172
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  &.has-4-columns:not(.alignwide):not(.alignfull),
174
  &.has-5-columns:not(.alignfull),
175
  &.has-6-columns:not(.alignfull),
176
  &.has-7-columns,
177
  &.has-8-columns {
178
+ .wc-block-grid__product {
 
179
  font-size: 0.8em;
180
  }
181
  }
190
  }
191
  }
192
  .theme-twentynineteen {
193
+ .wc-block-grid__product {
194
+ font-size: 0.88889em;
195
+ }
196
  // Change the title font to match headings.
197
  .wc-block-grid__product-title,
198
  .wc-block-grid__product-onsale {
199
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
200
  }
201
+ .wc-block-grid__product-onsale {
202
+ line-height: 1;
203
+ }
204
  }
assets/js/blocks/featured-category/block.js ADDED
@@ -0,0 +1,404 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import apiFetch from '@wordpress/api-fetch';
6
+ import {
7
+ AlignmentToolbar,
8
+ BlockControls,
9
+ InnerBlocks,
10
+ InspectorControls,
11
+ MediaUpload,
12
+ MediaUploadCheck,
13
+ PanelColorSettings,
14
+ withColors,
15
+ } from '@wordpress/editor';
16
+ import {
17
+ Button,
18
+ FocalPointPicker,
19
+ IconButton,
20
+ PanelBody,
21
+ Placeholder,
22
+ RangeControl,
23
+ ResizableBox,
24
+ Spinner,
25
+ ToggleControl,
26
+ Toolbar,
27
+ withSpokenMessages,
28
+ } from '@wordpress/components';
29
+ import classnames from 'classnames';
30
+ import { Component, Fragment } from '@wordpress/element';
31
+ import { compose } from '@wordpress/compose';
32
+ import { debounce, isObject } from 'lodash';
33
+ import PropTypes from 'prop-types';
34
+ import { IconFolderStar } from '../../components/icons';
35
+
36
+ /**
37
+ * Internal dependencies
38
+ */
39
+ import ProductCategoryControl from '../../components/product-category-control';
40
+
41
+ /**
42
+ * The min-height for the block content.
43
+ */
44
+ const MIN_HEIGHT = wc_product_block_data.min_height;
45
+
46
+ /**
47
+ * Get the src from a category object, unless null (no image).
48
+ *
49
+ * @param {object|null} category A product category object from the API.
50
+ * @return {string}
51
+ */
52
+ function getCategoryImageSrc( category ) {
53
+ if ( isObject( category.image ) ) {
54
+ return category.image.src;
55
+ }
56
+ return '';
57
+ }
58
+
59
+ /**
60
+ * Get the attachment ID from a category object, unless null (no image).
61
+ *
62
+ * @param {object|null} category A product category object from the API.
63
+ * @return {int}
64
+ */
65
+ function getCategoryImageID( category ) {
66
+ if ( isObject( category.image ) ) {
67
+ return category.image.id;
68
+ }
69
+ return 0;
70
+ }
71
+
72
+ /**
73
+ * Generate a style object given either a product category image from the API or URL to an image.
74
+ *
75
+ * @param {string} url An image URL.
76
+ * @return {object} A style object with a backgroundImage set (if a valid image is provided).
77
+ */
78
+ function backgroundImageStyles( url ) {
79
+ if ( url ) {
80
+ return { backgroundImage: `url(${ url })` };
81
+ }
82
+ return {};
83
+ }
84
+
85
+ /**
86
+ * Convert the selected ratio to the correct background class.
87
+ *
88
+ * @param {number} ratio Selected opacity from 0 to 100.
89
+ * @return {string} The class name, if applicable (not used for ratio 0 or 50).
90
+ */
91
+ function dimRatioToClass( ratio ) {
92
+ return ratio === 0 || ratio === 50 ?
93
+ null :
94
+ `has-background-dim-${ 10 * Math.round( ratio / 10 ) }`;
95
+ }
96
+
97
+ /**
98
+ * Component to handle edit mode of "Featured Category".
99
+ */
100
+ class FeaturedCategory extends Component {
101
+ constructor() {
102
+ super( ...arguments );
103
+ this.state = {
104
+ category: false,
105
+ loaded: false,
106
+ };
107
+
108
+ this.debouncedGetCategory = debounce( this.getCategory.bind( this ), 200 );
109
+ }
110
+
111
+ componentDidMount() {
112
+ this.getCategory();
113
+ }
114
+
115
+ componentDidUpdate( prevProps ) {
116
+ if ( prevProps.attributes.categoryId !== this.props.attributes.categoryId ) {
117
+ this.debouncedGetCategory();
118
+ }
119
+ }
120
+
121
+ getCategory() {
122
+ const { categoryId } = this.props.attributes;
123
+ if ( ! categoryId ) {
124
+ // We've removed the selected product, or no product is selected yet.
125
+ this.setState( { category: false, loaded: true } );
126
+ return;
127
+ }
128
+ apiFetch( {
129
+ path: `/wc/blocks/products/categories/${ categoryId }`,
130
+ } )
131
+ .then( ( category ) => {
132
+ this.setState( { category, loaded: true } );
133
+ } )
134
+ .catch( () => {
135
+ this.setState( { category: false, loaded: true } );
136
+ } );
137
+ }
138
+
139
+ getInspectorControls() {
140
+ const {
141
+ attributes,
142
+ setAttributes,
143
+ overlayColor,
144
+ setOverlayColor,
145
+ } = this.props;
146
+
147
+ const url =
148
+ attributes.mediaSrc || getCategoryImageSrc( this.state.category );
149
+ const { focalPoint = { x: 0.5, y: 0.5 } } = attributes;
150
+ // FocalPointPicker was introduced in Gutenberg 5.0 (WordPress 5.2),
151
+ // so we need to check if it exists before using it.
152
+ const focalPointPickerExists = typeof FocalPointPicker === 'function';
153
+
154
+ return (
155
+ <InspectorControls key="inspector">
156
+ <PanelBody title={ __( 'Content', 'woo-gutenberg-products-block' ) }>
157
+ <ToggleControl
158
+ label={ __( 'Show description', 'woo-gutenberg-products-block' ) }
159
+ checked={ attributes.showDesc }
160
+ onChange={ () => setAttributes( { showDesc: ! attributes.showDesc } ) }
161
+ />
162
+ </PanelBody>
163
+ <PanelColorSettings
164
+ title={ __( 'Overlay', 'woo-gutenberg-products-block' ) }
165
+ colorSettings={ [
166
+ {
167
+ value: overlayColor.color,
168
+ onChange: setOverlayColor,
169
+ label: __( 'Overlay Color', 'woo-gutenberg-products-block' ),
170
+ },
171
+ ] }
172
+ >
173
+ { !! url && (
174
+ <Fragment>
175
+ <RangeControl
176
+ label={ __( 'Background Opacity', 'woo-gutenberg-products-block' ) }
177
+ value={ attributes.dimRatio }
178
+ onChange={ ( ratio ) => setAttributes( { dimRatio: ratio } ) }
179
+ min={ 0 }
180
+ max={ 100 }
181
+ step={ 10 }
182
+ />
183
+ { focalPointPickerExists &&
184
+ <FocalPointPicker
185
+ label={ __( 'Focal Point Picker' ) }
186
+ url={ url }
187
+ value={ focalPoint }
188
+ onChange={ ( value ) => setAttributes( { focalPoint: value } ) }
189
+ />
190
+ }
191
+ </Fragment>
192
+ ) }
193
+ </PanelColorSettings>
194
+ </InspectorControls>
195
+ );
196
+ }
197
+
198
+ renderEditMode() {
199
+ const { attributes, debouncedSpeak, setAttributes } = this.props;
200
+ const onDone = () => {
201
+ setAttributes( { editMode: false } );
202
+ debouncedSpeak(
203
+ __(
204
+ 'Showing Featured Product block preview.',
205
+ 'woo-gutenberg-products-block'
206
+ )
207
+ );
208
+ };
209
+
210
+ return (
211
+ <Placeholder
212
+ icon={ <IconFolderStar /> }
213
+ label={ __( 'Featured Category', 'woo-gutenberg-products-block' ) }
214
+ className="wc-block-featured-category"
215
+ >
216
+ { __(
217
+ 'Visually highlight a product category and encourage prompt action',
218
+ 'woo-gutenberg-products-block'
219
+ ) }
220
+ <div className="wc-block-featured-category__selection">
221
+ <ProductCategoryControl
222
+ selected={ [ attributes.categoryId ] }
223
+ onChange={ ( value = [] ) => {
224
+ const id = value[ 0 ] ? value[ 0 ].id : 0;
225
+ setAttributes( { categoryId: id, mediaId: 0, mediaSrc: '' } );
226
+ } }
227
+ isSingle
228
+ />
229
+ <Button isDefault onClick={ onDone }>
230
+ { __( 'Done', 'woo-gutenberg-products-block' ) }
231
+ </Button>
232
+ </div>
233
+ </Placeholder>
234
+ );
235
+ }
236
+
237
+ render() {
238
+ const { attributes, isSelected, overlayColor, setAttributes } = this.props;
239
+ const {
240
+ className,
241
+ contentAlign,
242
+ dimRatio,
243
+ editMode,
244
+ focalPoint,
245
+ height,
246
+ showDesc,
247
+ } = attributes;
248
+ const { loaded, category } = this.state;
249
+ const classes = classnames(
250
+ 'wc-block-featured-category',
251
+ {
252
+ 'is-selected': isSelected,
253
+ 'is-loading': ! category && ! loaded,
254
+ 'is-not-found': ! category && loaded,
255
+ 'has-background-dim': dimRatio !== 0,
256
+ },
257
+ dimRatioToClass( dimRatio ),
258
+ contentAlign !== 'center' && `has-${ contentAlign }-content`,
259
+ className,
260
+ );
261
+ const mediaId = attributes.mediaId || getCategoryImageID( category );
262
+ const mediaSrc = attributes.mediaSrc || getCategoryImageSrc( this.state.category );
263
+ const style = !! category ?
264
+ backgroundImageStyles( mediaSrc ) :
265
+ {};
266
+ if ( overlayColor.color ) {
267
+ style.backgroundColor = overlayColor.color;
268
+ }
269
+ if ( focalPoint ) {
270
+ style.backgroundPosition = `${ focalPoint.x * 100 }% ${ focalPoint.y *
271
+ 100 }%`;
272
+ }
273
+
274
+ const onResizeStop = ( event, direction, elt ) => {
275
+ setAttributes( { height: parseInt( elt.style.height ) } );
276
+ };
277
+
278
+ return (
279
+ <Fragment>
280
+ <BlockControls>
281
+ <AlignmentToolbar
282
+ value={ contentAlign }
283
+ onChange={ ( nextAlign ) => {
284
+ setAttributes( { contentAlign: nextAlign } );
285
+ } }
286
+ />
287
+ <MediaUploadCheck>
288
+ <Toolbar>
289
+ <MediaUpload
290
+ onSelect={ ( media ) => {
291
+ setAttributes( { mediaId: media.id, mediaSrc: media.url } );
292
+ } }
293
+ allowedTypes={ [ 'image' ] }
294
+ value={ mediaId }
295
+ render={ ( { open } ) => (
296
+ <IconButton
297
+ className="components-toolbar__control"
298
+ label={ __( 'Edit media' ) }
299
+ icon="format-image"
300
+ onClick={ open }
301
+ disabled={ ! this.state.category }
302
+ />
303
+ ) }
304
+ />
305
+ </Toolbar>
306
+ </MediaUploadCheck>
307
+ </BlockControls>
308
+ { ! attributes.editMode && this.getInspectorControls() }
309
+ { editMode ? (
310
+ this.renderEditMode()
311
+ ) : (
312
+ <Fragment>
313
+ { !! category ? (
314
+ <ResizableBox
315
+ className={ classes }
316
+ size={ { height } }
317
+ minHeight={ MIN_HEIGHT }
318
+ enable={ { bottom: true } }
319
+ onResizeStop={ onResizeStop }
320
+ style={ style }
321
+ >
322
+ <div className="wc-block-featured-category__wrapper">
323
+ <h2
324
+ className="wc-block-featured-category__title"
325
+ dangerouslySetInnerHTML={ {
326
+ __html: category.name,
327
+ } }
328
+ />
329
+ { showDesc && (
330
+ <div
331
+ className="wc-block-featured-category__description"
332
+ dangerouslySetInnerHTML={ {
333
+ __html: category.description,
334
+ } }
335
+ />
336
+ ) }
337
+ <div className="wc-block-featured-category__link">
338
+ <InnerBlocks
339
+ template={ [
340
+ [
341
+ 'core/button',
342
+ {
343
+ text: __(
344
+ 'Shop now',
345
+ 'woo-gutenberg-products-block'
346
+ ),
347
+ url: category.permalink,
348
+ align: 'center',
349
+ },
350
+ ],
351
+ ] }
352
+ templateLock="all"
353
+ />
354
+ </div>
355
+ </div>
356
+ </ResizableBox>
357
+ ) : (
358
+ <Placeholder
359
+ className="wc-block-featured-category"
360
+ icon={ <IconFolderStar /> }
361
+ label={ __( 'Featured Category', 'woo-gutenberg-products-block' ) }
362
+ >
363
+ { ! loaded ? (
364
+ <Spinner />
365
+ ) : (
366
+ __( 'No product category is selected.', 'woo-gutenberg-products-block' )
367
+ ) }
368
+ </Placeholder>
369
+ ) }
370
+ </Fragment>
371
+ ) }
372
+ </Fragment>
373
+ );
374
+ }
375
+ }
376
+
377
+ FeaturedCategory.propTypes = {
378
+ /**
379
+ * The attributes for this block.
380
+ */
381
+ attributes: PropTypes.object.isRequired,
382
+ /**
383
+ * Whether this block is currently active.
384
+ */
385
+ isSelected: PropTypes.bool.isRequired,
386
+ /**
387
+ * The register block name.
388
+ */
389
+ name: PropTypes.string.isRequired,
390
+ /**
391
+ * A callback to update attributes.
392
+ */
393
+ setAttributes: PropTypes.func.isRequired,
394
+ // from withColors
395
+ overlayColor: PropTypes.object,
396
+ setOverlayColor: PropTypes.func.isRequired,
397
+ // from withSpokenMessages
398
+ debouncedSpeak: PropTypes.func.isRequired,
399
+ };
400
+
401
+ export default compose( [
402
+ withColors( { overlayColor: 'background-color' } ),
403
+ withSpokenMessages,
404
+ ] )( FeaturedCategory );
assets/js/blocks/featured-category/editor.scss ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wc-block-featured-category {
2
+ &.components-placeholder {
3
+ // Reset the background for the placeholders.
4
+ background-color: rgba(139, 139, 150, 0.1);
5
+ }
6
+
7
+ .components-resizable-box__handle {
8
+ z-index: 10;
9
+ }
10
+
11
+ .components-placeholder__label svg {
12
+ fill: currentColor;
13
+ margin-right: 1ch;
14
+ }
15
+ }
16
+ .wc-block-featured-category__selection {
17
+ width: 100%;
18
+ }
assets/js/blocks/featured-category/index.js ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import { InnerBlocks } from '@wordpress/editor';
6
+ import { registerBlockType } from '@wordpress/blocks';
7
+
8
+ /**
9
+ * Internal dependencies
10
+ */
11
+ import './style.scss';
12
+ import './editor.scss';
13
+ import Block from './block';
14
+ import { IconFolderStar } from '../../components/icons';
15
+
16
+ /**
17
+ * Register and run the "Featured Category" block.
18
+ */
19
+ registerBlockType( 'woocommerce/featured-category', {
20
+ title: __( 'Featured Category', 'woo-gutenberg-products-block' ),
21
+ icon: {
22
+ src: <IconFolderStar />,
23
+ foreground: '#96588a',
24
+ },
25
+ category: 'woocommerce',
26
+ keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ],
27
+ description: __(
28
+ 'Visually highlight a product category and encourage prompt action.',
29
+ 'woo-gutenberg-products-block'
30
+ ),
31
+ supports: {
32
+ align: [ 'wide', 'full' ],
33
+ html: false,
34
+ },
35
+ attributes: {
36
+ /**
37
+ * Alignment of content inside block.
38
+ */
39
+ contentAlign: {
40
+ type: 'string',
41
+ default: 'center',
42
+ },
43
+
44
+ /**
45
+ * Percentage opacity of overlay.
46
+ */
47
+ dimRatio: {
48
+ type: 'number',
49
+ default: 50,
50
+ },
51
+
52
+ /**
53
+ * Toggle for edit mode in the block preview.
54
+ */
55
+ editMode: {
56
+ type: 'boolean',
57
+ default: true,
58
+ },
59
+
60
+ /**
61
+ * Focus point for the background image
62
+ */
63
+ focalPoint: {
64
+ type: 'object',
65
+ },
66
+
67
+ /**
68
+ * A fixed height for the block.
69
+ */
70
+ height: {
71
+ type: 'number',
72
+ default: wc_product_block_data.default_height,
73
+ },
74
+
75
+ /**
76
+ * ID for a custom image, overriding the product's featured image.
77
+ */
78
+ mediaId: {
79
+ type: 'number',
80
+ default: 0,
81
+ },
82
+
83
+ /**
84
+ * URL for a custom image, overriding the product's featured image.
85
+ */
86
+ mediaSrc: {
87
+ type: 'string',
88
+ default: '',
89
+ },
90
+
91
+ /**
92
+ * The overlay color, from the color list.
93
+ */
94
+ overlayColor: {
95
+ type: 'string',
96
+ },
97
+
98
+ /**
99
+ * The overlay color, if a custom color value.
100
+ */
101
+ customOverlayColor: {
102
+ type: 'string',
103
+ },
104
+
105
+ /**
106
+ * Text for the category link.
107
+ */
108
+ linkText: {
109
+ type: 'string',
110
+ default: __( 'Shop now', 'woo-gutenberg-products-block' ),
111
+ },
112
+
113
+ /**
114
+ * The category ID to display.
115
+ */
116
+ categoryId: {
117
+ type: 'number',
118
+ },
119
+
120
+ /**
121
+ * Show the category description.
122
+ */
123
+ showDesc: {
124
+ type: 'boolean',
125
+ default: true,
126
+ },
127
+ },
128
+
129
+ /**
130
+ * Renders and manages the block.
131
+ */
132
+ edit( props ) {
133
+ return <Block { ...props } />;
134
+ },
135
+
136
+ /**
137
+ * Block content is rendered in PHP, not via save function.
138
+ */
139
+ save() {
140
+ return <InnerBlocks.Content />;
141
+ },
142
+ } );
assets/js/blocks/featured-category/style.scss ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wc-block-featured-category {
2
+ position: relative;
3
+ background-color: $black;
4
+ background-size: cover;
5
+ background-position: center center;
6
+ width: 100%;
7
+ margin: 0 0 1.5em 0;
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ flex-wrap: wrap;
12
+ align-content: center;
13
+
14
+ .wc-block-featured-category__wrapper {
15
+ overflow: hidden;
16
+ height: 100%;
17
+ display: flex;
18
+ justify-content: center;
19
+ align-items: center;
20
+ flex-wrap: wrap;
21
+ align-content: center;
22
+ }
23
+
24
+ &.has-left-content {
25
+ justify-content: flex-start;
26
+
27
+ .wc-block-featured-category__title,
28
+ .wc-block-featured-category__description,
29
+ .wc-block-featured-category__price {
30
+ margin-left: 0;
31
+ text-align: left;
32
+ }
33
+ }
34
+
35
+ &.has-right-content {
36
+ justify-content: flex-end;
37
+
38
+ .wc-block-featured-category__title,
39
+ .wc-block-featured-category__description,
40
+ .wc-block-featured-category__price {
41
+ margin-right: 0;
42
+ text-align: right;
43
+ }
44
+ }
45
+
46
+ .wc-block-featured-category__title,
47
+ .wc-block-featured-category__description,
48
+ .wc-block-featured-category__price {
49
+ color: $white;
50
+ line-height: 1.25;
51
+ margin-bottom: 0;
52
+ text-align: center;
53
+
54
+ a,
55
+ a:hover,
56
+ a:focus,
57
+ a:active {
58
+ color: $white;
59
+ }
60
+ }
61
+
62
+ .wc-block-featured-category__title,
63
+ .wc-block-featured-category__description,
64
+ .wc-block-featured-category__price,
65
+ .wc-block-featured-category__link {
66
+ width: 100%;
67
+ padding: 0 48px 16px 48px;
68
+ z-index: 1;
69
+ }
70
+
71
+ .wc-block-featured-category__title {
72
+ margin-top: 0;
73
+
74
+ &::before {
75
+ display: none;
76
+ }
77
+ }
78
+
79
+ .wc-block-featured-category__description {
80
+ p {
81
+ margin: 0;
82
+ }
83
+ }
84
+
85
+ &.has-background-dim::before {
86
+ content: "";
87
+ position: absolute;
88
+ top: 0;
89
+ left: 0;
90
+ bottom: 0;
91
+ right: 0;
92
+ background-color: inherit;
93
+ opacity: 0.5;
94
+ z-index: 1;
95
+ }
96
+
97
+ @for $i from 1 through 10 {
98
+ &.has-background-dim.has-background-dim-#{ $i * 10 }::before {
99
+ opacity: $i * 0.1;
100
+ }
101
+ }
102
+
103
+ // Apply max-width to floated items that have no intrinsic width
104
+ &.alignleft,
105
+ &.alignright {
106
+ max-width: $content-width / 2;
107
+ width: 100%;
108
+ }
109
+
110
+ // Using flexbox without an assigned height property breaks vertical center alignment in IE11.
111
+ // Appending an empty ::after element tricks IE11 into giving the cover image an implicit height, which sidesteps this issue.
112
+ &::after {
113
+ display: block;
114
+ content: "";
115
+ font-size: 0;
116
+ min-height: inherit;
117
+
118
+ // IE doesn't support flex so omit that.
119
+ @supports (position: sticky) {
120
+ content: none;
121
+ }
122
+ }
123
+
124
+ // Aligned cover blocks should not use our global alignment rules
125
+ &.aligncenter,
126
+ &.alignleft,
127
+ &.alignright {
128
+ display: flex;
129
+ }
130
+ }
assets/js/blocks/featured-product/block.js CHANGED
@@ -29,7 +29,7 @@ import {
29
  import classnames from 'classnames';
30
  import { Component, Fragment } from '@wordpress/element';
31
  import { compose } from '@wordpress/compose';
32
- import { debounce, isObject } from 'lodash';
33
  import PropTypes from 'prop-types';
34
 
35
  /**
@@ -107,7 +107,7 @@ class FeaturedProduct extends Component {
107
  return;
108
  }
109
  apiFetch( {
110
- path: `/wc-blocks/v1/products/${ productId }`,
111
  } )
112
  .then( ( product ) => {
113
  this.setState( { product, loaded: true } );
@@ -128,6 +128,9 @@ class FeaturedProduct extends Component {
128
  const url =
129
  attributes.mediaSrc || getImageSrcFromProduct( this.state.product );
130
  const { focalPoint = { x: 0.5, y: 0.5 } } = attributes;
 
 
 
131
 
132
  return (
133
  <InspectorControls key="inspector">
@@ -153,22 +156,26 @@ class FeaturedProduct extends Component {
153
  },
154
  ] }
155
  >
156
- <RangeControl
157
- label={ __( 'Background Opacity', 'woo-gutenberg-products-block' ) }
158
- value={ attributes.dimRatio }
159
- onChange={ ( ratio ) => setAttributes( { dimRatio: ratio } ) }
160
- min={ 0 }
161
- max={ 100 }
162
- step={ 10 }
163
- />
164
- { !! FocalPointPicker && !! url &&
165
- <FocalPointPicker
166
- label={ __( 'Focal Point Picker' ) }
167
- url={ url }
168
- value={ focalPoint }
169
- onChange={ ( value ) => setAttributes( { focalPoint: value } ) }
170
- />
171
- }
 
 
 
 
172
  </PanelColorSettings>
173
  </InspectorControls>
174
  );
@@ -193,10 +200,10 @@ class FeaturedProduct extends Component {
193
  className="wc-block-featured-product"
194
  >
195
  { __(
196
- 'Visually highlight a product and encourage prompt action',
197
  'woo-gutenberg-products-block'
198
  ) }
199
- <div className="wc-block-handpicked-products__selection">
200
  <ProductControl
201
  selected={ attributes.productId || 0 }
202
  onChange={ ( value = [] ) => {
@@ -305,11 +312,19 @@ class FeaturedProduct extends Component {
305
  __html: product.name,
306
  } }
307
  />
 
 
 
 
 
 
 
 
308
  { showDesc && (
309
  <div
310
  className="wc-block-featured-product__description"
311
  dangerouslySetInnerHTML={ {
312
- __html: product.short_description,
313
  } }
314
  />
315
  ) }
29
  import classnames from 'classnames';
30
  import { Component, Fragment } from '@wordpress/element';
31
  import { compose } from '@wordpress/compose';
32
+ import { debounce, isObject, isEmpty } from 'lodash';
33
  import PropTypes from 'prop-types';
34
 
35
  /**
107
  return;
108
  }
109
  apiFetch( {
110
+ path: `/wc/blocks/products/${ productId }`,
111
  } )
112
  .then( ( product ) => {
113
  this.setState( { product, loaded: true } );
128
  const url =
129
  attributes.mediaSrc || getImageSrcFromProduct( this.state.product );
130
  const { focalPoint = { x: 0.5, y: 0.5 } } = attributes;
131
+ // FocalPointPicker was introduced in Gutenberg 5.0 (WordPress 5.2),
132
+ // so we need to check if it exists before using it.
133
+ const focalPointPickerExists = typeof FocalPointPicker === 'function';
134
 
135
  return (
136
  <InspectorControls key="inspector">
156
  },
157
  ] }
158
  >
159
+ { !! url && (
160
+ <Fragment>
161
+ <RangeControl
162
+ label={ __( 'Background Opacity', 'woo-gutenberg-products-block' ) }
163
+ value={ attributes.dimRatio }
164
+ onChange={ ( ratio ) => setAttributes( { dimRatio: ratio } ) }
165
+ min={ 0 }
166
+ max={ 100 }
167
+ step={ 10 }
168
+ />
169
+ { focalPointPickerExists &&
170
+ <FocalPointPicker
171
+ label={ __( 'Focal Point Picker' ) }
172
+ url={ url }
173
+ value={ focalPoint }
174
+ onChange={ ( value ) => setAttributes( { focalPoint: value } ) }
175
+ />
176
+ }
177
+ </Fragment>
178
+ ) }
179
  </PanelColorSettings>
180
  </InspectorControls>
181
  );
200
  className="wc-block-featured-product"
201
  >
202
  { __(
203
+ 'Visually highlight a product or variation and encourage prompt action',
204
  'woo-gutenberg-products-block'
205
  ) }
206
+ <div className="wc-block-featured-product__selection">
207
  <ProductControl
208
  selected={ attributes.productId || 0 }
209
  onChange={ ( value = [] ) => {
312
  __html: product.name,
313
  } }
314
  />
315
+ { ! isEmpty( product.variation ) && (
316
+ <h3
317
+ className="wc-block-featured-product__variation"
318
+ dangerouslySetInnerHTML={ {
319
+ __html: product.variation,
320
+ } }
321
+ />
322
+ ) }
323
  { showDesc && (
324
  <div
325
  className="wc-block-featured-product__description"
326
  dangerouslySetInnerHTML={ {
327
+ __html: product.description,
328
  } }
329
  />
330
  ) }
assets/js/blocks/featured-product/editor.scss CHANGED
@@ -1,10 +1,14 @@
1
  .wc-block-featured-product {
2
  &.components-placeholder {
3
  // Reset the background for the placeholders.
4
- background-color: rgba( 139, 139, 150, .1 );
5
  }
6
 
7
  .components-resizable-box__handle {
8
  z-index: 10;
9
  }
10
  }
 
 
 
 
1
  .wc-block-featured-product {
2
  &.components-placeholder {
3
  // Reset the background for the placeholders.
4
+ background-color: rgba(139, 139, 150, 0.1);
5
  }
6
 
7
  .components-resizable-box__handle {
8
  z-index: 10;
9
  }
10
  }
11
+
12
+ .wc-block-featured-product__selection {
13
+ width: 100%;
14
+ }
assets/js/blocks/featured-product/index.js CHANGED
@@ -24,11 +24,12 @@ registerBlockType( 'woocommerce/featured-product', {
24
  category: 'woocommerce',
25
  keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ],
26
  description: __(
27
- 'Visually highlight a product and encourage prompt action.',
28
  'woo-gutenberg-products-block'
29
  ),
30
  supports: {
31
  align: [ 'wide', 'full' ],
 
32
  },
33
  attributes: {
34
  /**
24
  category: 'woocommerce',
25
  keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ],
26
  description: __(
27
+ 'Visually highlight a product or variation and encourage prompt action.',
28
  'woo-gutenberg-products-block'
29
  ),
30
  supports: {
31
  align: [ 'wide', 'full' ],
32
+ html: false,
33
  },
34
  attributes: {
35
  /**
assets/js/blocks/featured-product/style.scss CHANGED
@@ -25,6 +25,7 @@
25
  justify-content: flex-start;
26
 
27
  .wc-block-featured-product__title,
 
28
  .wc-block-featured-product__description,
29
  .wc-block-featured-product__price {
30
  margin-left: 0;
@@ -36,6 +37,7 @@
36
  justify-content: flex-end;
37
 
38
  .wc-block-featured-product__title,
 
39
  .wc-block-featured-product__description,
40
  .wc-block-featured-product__price {
41
  margin-right: 0;
@@ -44,6 +46,7 @@
44
  }
45
 
46
  .wc-block-featured-product__title,
 
47
  .wc-block-featured-product__description,
48
  .wc-block-featured-product__price {
49
  color: $white;
@@ -60,25 +63,34 @@
60
  }
61
 
62
  .wc-block-featured-product__title,
 
63
  .wc-block-featured-product__description,
64
  .wc-block-featured-product__price,
65
  .wc-block-featured-product__link {
66
  width: 100%;
67
- padding: 0 48px 16px 48px;
68
  z-index: 1;
69
  }
70
 
71
- .wc-block-featured-product__title {
 
72
  margin-top: 0;
 
73
 
74
- &:before {
75
  display: none;
76
  }
77
  }
78
 
 
 
 
 
 
79
  .wc-block-featured-product__description {
80
  p {
81
  margin: 0;
 
82
  }
83
  }
84
 
25
  justify-content: flex-start;
26
 
27
  .wc-block-featured-product__title,
28
+ .wc-block-featured-product__variation,
29
  .wc-block-featured-product__description,
30
  .wc-block-featured-product__price {
31
  margin-left: 0;
37
  justify-content: flex-end;
38
 
39
  .wc-block-featured-product__title,
40
+ .wc-block-featured-product__variation,
41
  .wc-block-featured-product__description,
42
  .wc-block-featured-product__price {
43
  margin-right: 0;
46
  }
47
 
48
  .wc-block-featured-product__title,
49
+ .wc-block-featured-product__variation,
50
  .wc-block-featured-product__description,
51
  .wc-block-featured-product__price {
52
  color: $white;
63
  }
64
 
65
  .wc-block-featured-product__title,
66
+ .wc-block-featured-product__variation,
67
  .wc-block-featured-product__description,
68
  .wc-block-featured-product__price,
69
  .wc-block-featured-product__link {
70
  width: 100%;
71
+ padding: 16px 48px 0 48px;
72
  z-index: 1;
73
  }
74
 
75
+ .wc-block-featured-product__title,
76
+ .wc-block-featured-product__variation {
77
  margin-top: 0;
78
+ border: 0;
79
 
80
+ &::before {
81
  display: none;
82
  }
83
  }
84
 
85
+ .wc-block-featured-product__variation {
86
+ font-style: italic;
87
+ padding-top: 0;
88
+ }
89
+
90
  .wc-block-featured-product__description {
91
  p {
92
  margin: 0;
93
+ line-height: 1.5em;
94
  }
95
  }
96
 
assets/js/blocks/handpicked-products/block.js CHANGED
@@ -15,6 +15,7 @@ import {
15
  RangeControl,
16
  Toolbar,
17
  withSpokenMessages,
 
18
  } from '@wordpress/components';
19
  import { Component, Fragment } from '@wordpress/element';
20
  import PropTypes from 'prop-types';
@@ -33,7 +34,7 @@ import ProductOrderbyControl from '../../components/product-orderby-control';
33
  class ProductsBlock extends Component {
34
  getInspectorControls() {
35
  const { attributes, setAttributes } = this.props;
36
- const { columns, contentVisibility, orderby } = attributes;
37
 
38
  return (
39
  <InspectorControls key="inspector">
@@ -48,6 +49,22 @@ class ProductsBlock extends Component {
48
  min={ wc_product_block_data.min_columns }
49
  max={ wc_product_block_data.max_columns }
50
  />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  </PanelBody>
52
  <PanelBody
53
  title={ __( 'Content', 'woo-gutenberg-products-block' ) }
15
  RangeControl,
16
  Toolbar,
17
  withSpokenMessages,
18
+ ToggleControl,
19
  } from '@wordpress/components';
20
  import { Component, Fragment } from '@wordpress/element';
21
  import PropTypes from 'prop-types';
34
  class ProductsBlock extends Component {
35
  getInspectorControls() {
36
  const { attributes, setAttributes } = this.props;
37
+ const { columns, contentVisibility, orderby, alignButtons } = attributes;
38
 
39
  return (
40
  <InspectorControls key="inspector">
49
  min={ wc_product_block_data.min_columns }
50
  max={ wc_product_block_data.max_columns }
51
  />
52
+ <ToggleControl
53
+ label={ __( 'Align Add to Cart buttons', 'woo-gutenberg-products-block' ) }
54
+ help={
55
+ alignButtons ?
56
+ __(
57
+ 'Buttons are aligned vertically.',
58
+ 'woo-gutenberg-products-block'
59
+ ) :
60
+ __(
61
+ 'Buttons follow content.',
62
+ 'woo-gutenberg-products-block'
63
+ )
64
+ }
65
+ checked={ alignButtons }
66
+ onChange={ () => setAttributes( { alignButtons: ! alignButtons } ) }
67
+ />
68
  </PanelBody>
69
  <PanelBody
70
  title={ __( 'Content', 'woo-gutenberg-products-block' ) }
assets/js/blocks/handpicked-products/index.js CHANGED
@@ -26,6 +26,7 @@ registerBlockType( 'woocommerce/handpicked-products', {
26
  ),
27
  supports: {
28
  align: [ 'wide', 'full' ],
 
29
  },
30
  attributes: {
31
  /**
@@ -79,6 +80,14 @@ registerBlockType( 'woocommerce/handpicked-products', {
79
  type: 'array',
80
  default: [],
81
  },
 
 
 
 
 
 
 
 
82
  },
83
 
84
  deprecated: [
26
  ),
27
  supports: {
28
  align: [ 'wide', 'full' ],
29
+ html: false,
30
  },
31
  attributes: {
32
  /**
80
  type: 'array',
81
  default: [],
82
  },
83
+
84
+ /**
85
+ * How to align cart buttons.
86
+ */
87
+ alignButtons: {
88
+ type: 'boolean',
89
+ default: false,
90
+ },
91
  },
92
 
93
  deprecated: [
assets/js/blocks/product-best-sellers/block.js CHANGED
@@ -26,6 +26,7 @@ class ProductBestSellersBlock extends Component {
26
  columns,
27
  contentVisibility,
28
  rows,
 
29
  } = attributes;
30
 
31
  return (
@@ -37,6 +38,7 @@ class ProductBestSellersBlock extends Component {
37
  <GridLayoutControl
38
  columns={ columns }
39
  rows={ rows }
 
40
  setAttributes={ setAttributes }
41
  />
42
  </PanelBody>
26
  columns,
27
  contentVisibility,
28
  rows,
29
+ alignButtons,
30
  } = attributes;
31
 
32
  return (
38
  <GridLayoutControl
39
  columns={ columns }
40
  rows={ rows }
41
+ alignButtons={ alignButtons }
42
  setAttributes={ setAttributes }
43
  />
44
  </PanelBody>
assets/js/blocks/product-best-sellers/index.js CHANGED
@@ -27,6 +27,7 @@ registerBlockType( 'woocommerce/product-best-sellers', {
27
  ),
28
  supports: {
29
  align: [ 'wide', 'full' ],
 
30
  },
31
  attributes: {
32
  ...sharedAttributes,
27
  ),
28
  supports: {
29
  align: [ 'wide', 'full' ],
30
+ html: false,
31
  },
32
  attributes: {
33
  ...sharedAttributes,
assets/js/blocks/product-categories/block.js CHANGED
@@ -2,26 +2,13 @@
2
  * External dependencies
3
  */
4
  import { __ } from '@wordpress/i18n';
 
5
  import classnames from 'classnames';
6
- import { Component, createRef, Fragment } from '@wordpress/element';
7
- import { IconButton } from '@wordpress/components';
8
- import { repeat } from 'lodash';
9
- import PropTypes from 'prop-types';
10
- import { withInstanceId } from '@wordpress/compose';
11
 
12
  /**
13
  * Internal dependencies
14
  */
15
- import { buildTermsTree } from './hierarchy';
16
-
17
- function getCategories( { hasEmpty, isHierarchical } ) {
18
- const categories = wc_product_block_data.productCategories.filter(
19
- ( cat ) => hasEmpty || !! cat.count
20
- );
21
- return isHierarchical ?
22
- buildTermsTree( categories ) :
23
- categories;
24
- }
25
 
26
  /**
27
  * Component displaying the categories as dropdown or list.
@@ -75,7 +62,7 @@ class ProductCategoriesBlock extends Component {
75
  const count = hasCount ? `(${ cat.count })` : null;
76
  return [
77
  <option key={ cat.term_id } value={ cat.link }>
78
- { repeat( '–', depth ) } { cat.name } { count }
79
  </option>,
80
  !! cat.children && !! cat.children.length && this.renderOptions( cat.children, depth + 1 ),
81
  ];
@@ -83,9 +70,8 @@ class ProductCategoriesBlock extends Component {
83
  }
84
 
85
  render() {
86
- const { attributes, instanceId } = this.props;
87
  const { className, isDropdown } = attributes;
88
- const categories = getCategories( attributes );
89
  const classes = classnames(
90
  'wc-block-product-categories',
91
  className,
@@ -95,50 +81,45 @@ class ProductCategoriesBlock extends Component {
95
  }
96
  );
97
 
98
- const selectId = `prod-categories-${ instanceId }`;
99
 
100
  return (
101
- <div className={ classes }>
102
- { isDropdown ? (
103
- <Fragment>
104
- <div className="wc-block-product-categories__dropdown">
105
- <label className="screen-reader-text" htmlFor={ selectId }>
106
- { __( 'Select a category', 'woo-gutenberg-products-block' ) }
107
- </label>
108
- <select id={ selectId } ref={ this.select }>
109
- <option value="false" hidden>
110
- { __( 'Select a category', 'woo-gutenberg-products-block' ) }
111
- </option>
112
- { this.renderOptions( categories ) }
113
- </select>
114
- </div>
115
- <IconButton
116
- icon="arrow-right-alt2"
117
- label={ __( 'Go to category', 'woo-gutenberg-products-block' ) }
118
- onClick={ this.onNavigate }
119
- />
120
- </Fragment>
121
- ) : (
122
- this.renderList( categories )
 
 
 
 
 
 
 
 
 
 
123
  ) }
124
- </div>
125
  );
126
  }
127
  }
128
 
129
- ProductCategoriesBlock.propTypes = {
130
- /**
131
- * The attributes for this block.
132
- */
133
- attributes: PropTypes.object.isRequired,
134
- /**
135
- * A unique ID for identifying the label for the select dropdown.
136
- */
137
- instanceId: PropTypes.number,
138
- /**
139
- * Whether this is the block preview or frontend display.
140
- */
141
- isPreview: PropTypes.bool,
142
- };
143
-
144
- export default withInstanceId( ProductCategoriesBlock );
2
  * External dependencies
3
  */
4
  import { __ } from '@wordpress/i18n';
5
+ import { Component, createRef, Fragment } from 'react';
6
  import classnames from 'classnames';
 
 
 
 
 
7
 
8
  /**
9
  * Internal dependencies
10
  */
11
+ import withComponentId from '../../utils/with-component-id';
 
 
 
 
 
 
 
 
 
12
 
13
  /**
14
  * Component displaying the categories as dropdown or list.
62
  const count = hasCount ? `(${ cat.count })` : null;
63
  return [
64
  <option key={ cat.term_id } value={ cat.link }>
65
+ { '–'.repeat( depth ) } { cat.name } { count }
66
  </option>,
67
  !! cat.children && !! cat.children.length && this.renderOptions( cat.children, depth + 1 ),
68
  ];
70
  }
71
 
72
  render() {
73
+ const { attributes, categories, componentId } = this.props;
74
  const { className, isDropdown } = attributes;
 
75
  const classes = classnames(
76
  'wc-block-product-categories',
77
  className,
81
  }
82
  );
83
 
84
+ const selectId = `prod-categories-${ componentId }`;
85
 
86
  return (
87
+ <Fragment>
88
+ { categories.length > 0 && (
89
+ <div className={ classes }>
90
+ { isDropdown ? (
91
+ <Fragment>
92
+ <div className="wc-block-product-categories__dropdown">
93
+ <label className="screen-reader-text" htmlFor={ selectId }>
94
+ { __( 'Select a category', 'woo-gutenberg-products-block' ) }
95
+ </label>
96
+ <select id={ selectId } ref={ this.select }>
97
+ <option value="false" hidden>
98
+ { __( 'Select a category', 'woo-gutenberg-products-block' ) }
99
+ </option>
100
+ { this.renderOptions( categories ) }
101
+ </select>
102
+ </div>
103
+ <button
104
+ type="button"
105
+ className="wc-block-product-categories__button"
106
+ aria-label={ __( 'Go to category', 'woo-gutenberg-products-block' ) }
107
+ icon="arrow-right-alt2"
108
+ onClick={ this.onNavigate }
109
+ >
110
+ <svg aria-hidden="true" role="img" focusable="false" className="dashicon dashicons-arrow-right-alt2" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
111
+ <path d="M6 15l5-5-5-5 1-2 7 7-7 7z"></path>
112
+ </svg>
113
+ </button>
114
+ </Fragment>
115
+ ) : (
116
+ this.renderList( categories )
117
+ ) }
118
+ </div>
119
  ) }
120
+ </Fragment>
121
  );
122
  }
123
  }
124
 
125
+ export default withComponentId( ProductCategoriesBlock );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/blocks/product-categories/edit.js CHANGED
@@ -4,16 +4,20 @@
4
  import { __ } from '@wordpress/i18n';
5
  import { Fragment } from '@wordpress/element';
6
  import { InspectorControls } from '@wordpress/editor';
7
- import { PanelBody, ToggleControl } from '@wordpress/components';
8
 
9
  /**
10
  * Internal dependencies
11
  */
12
  import './editor.scss';
13
  import Block from './block.js';
 
 
 
14
 
15
  export default function( { attributes, setAttributes } ) {
16
  const { hasCount, hasEmpty, isDropdown, isHierarchical } = attributes;
 
17
 
18
  return (
19
  <Fragment>
@@ -22,16 +26,6 @@ export default function( { attributes, setAttributes } ) {
22
  title={ __( 'Content', 'woo-gutenberg-products-block' ) }
23
  initialOpen
24
  >
25
- <ToggleControl
26
- label={ __( 'Show as dropdown', 'woo-gutenberg-products-block' ) }
27
- help={
28
- isDropdown ?
29
- __( 'Categories are shown in a dropdown.', 'woo-gutenberg-products-block' ) :
30
- __( 'Categories are shown in a list.', 'woo-gutenberg-products-block' )
31
- }
32
- checked={ isDropdown }
33
- onChange={ () => setAttributes( { isDropdown: ! isDropdown } ) }
34
- />
35
  <ToggleControl
36
  label={ __( 'Show product count', 'woo-gutenberg-products-block' ) }
37
  help={
@@ -63,8 +57,32 @@ export default function( { attributes, setAttributes } ) {
63
  onChange={ () => setAttributes( { hasEmpty: ! hasEmpty } ) }
64
  />
65
  </PanelBody>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  </InspectorControls>
67
- <Block attributes={ attributes } isPreview />
 
 
 
 
 
 
 
 
 
 
68
  </Fragment>
69
  );
70
  }
4
  import { __ } from '@wordpress/i18n';
5
  import { Fragment } from '@wordpress/element';
6
  import { InspectorControls } from '@wordpress/editor';
7
+ import { PanelBody, ToggleControl, Placeholder } from '@wordpress/components';
8
 
9
  /**
10
  * Internal dependencies
11
  */
12
  import './editor.scss';
13
  import Block from './block.js';
14
+ import ToggleButtonControl from '../../components/toggle-button-control';
15
+ import getCategories from './get-categories';
16
+ import { IconFolder } from '../../components/icons';
17
 
18
  export default function( { attributes, setAttributes } ) {
19
  const { hasCount, hasEmpty, isDropdown, isHierarchical } = attributes;
20
+ const categories = getCategories( attributes );
21
 
22
  return (
23
  <Fragment>
26
  title={ __( 'Content', 'woo-gutenberg-products-block' ) }
27
  initialOpen
28
  >
 
 
 
 
 
 
 
 
 
 
29
  <ToggleControl
30
  label={ __( 'Show product count', 'woo-gutenberg-products-block' ) }
31
  help={
57
  onChange={ () => setAttributes( { hasEmpty: ! hasEmpty } ) }
58
  />
59
  </PanelBody>
60
+ <PanelBody
61
+ title={ __( 'List Settings', 'woo-gutenberg-products-block' ) }
62
+ initialOpen
63
+ >
64
+ <ToggleButtonControl
65
+ label={ __( 'Display style', 'woo-gutenberg-products-block' ) }
66
+ value={ isDropdown ? 'dropdown' : 'list' }
67
+ options={ [
68
+ { label: __( 'List', 'woo-gutenberg-products-block' ), value: 'list' },
69
+ { label: __( 'Dropdown', 'woo-gutenberg-products-block' ), value: 'dropdown' },
70
+ ] }
71
+ onChange={ ( value ) => setAttributes( { isDropdown: 'dropdown' === value } ) }
72
+ />
73
+ </PanelBody>
74
  </InspectorControls>
75
+ { categories.length > 0 ? (
76
+ <Block attributes={ attributes } categories={ categories } isPreview />
77
+ ) : (
78
+ <Placeholder
79
+ className="wc-block-product-categories"
80
+ icon={ <IconFolder /> }
81
+ label={ __( 'Product Categories List', 'woo-gutenberg-products-block' ) }
82
+ >
83
+ { __( "This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.", 'woo-gutenberg-products-block' ) }
84
+ </Placeholder>
85
+ ) }
86
  </Fragment>
87
  );
88
  }
assets/js/blocks/product-categories/editor.scss CHANGED
@@ -1,3 +1,9 @@
1
  .wc-block-product-categories.wc-block-product-categories ul {
2
  margin-left: 20px;
3
  }
 
 
 
 
 
 
1
  .wc-block-product-categories.wc-block-product-categories ul {
2
  margin-left: 20px;
3
  }
4
+ .wc-block-product-categories {
5
+ .components-placeholder__label svg {
6
+ margin-right: 1ch;
7
+ fill: currentColor;
8
+ }
9
+ }
assets/js/blocks/product-categories/frontend.js CHANGED
@@ -1,20 +1,20 @@
1
  /**
2
  * External dependencies
3
  */
4
- import { forEach } from 'lodash';
5
- import { render } from '@wordpress/element';
6
 
7
  /**
8
  * Internal dependencies
9
  */
10
  import Block from './block.js';
 
11
 
12
  const containers = document.querySelectorAll(
13
  '.wp-block-woocommerce-product-categories'
14
  );
15
 
16
  if ( containers.length ) {
17
- forEach( containers, ( el ) => {
18
  const data = JSON.parse( JSON.stringify( el.dataset ) );
19
  const attributes = {
20
  hasCount: data.hasCount === 'true',
@@ -22,8 +22,10 @@ if ( containers.length ) {
22
  isDropdown: data.isDropdown === 'true',
23
  isHierarchical: data.isHierarchical === 'true',
24
  };
 
 
25
  el.classList.remove( 'is-loading' );
26
 
27
- render( <Block attributes={ attributes } />, el );
28
  } );
29
  }
1
  /**
2
  * External dependencies
3
  */
4
+ import { render } from 'react-dom';
 
5
 
6
  /**
7
  * Internal dependencies
8
  */
9
  import Block from './block.js';
10
+ import getCategories from './get-categories';
11
 
12
  const containers = document.querySelectorAll(
13
  '.wp-block-woocommerce-product-categories'
14
  );
15
 
16
  if ( containers.length ) {
17
+ Array.prototype.forEach.call( containers, ( el ) => {
18
  const data = JSON.parse( JSON.stringify( el.dataset ) );
19
  const attributes = {
20
  hasCount: data.hasCount === 'true',
22
  isDropdown: data.isDropdown === 'true',
23
  isHierarchical: data.isHierarchical === 'true',
24
  };
25
+ const categories = getCategories( attributes );
26
+
27
  el.classList.remove( 'is-loading' );
28
 
29
+ render( <Block attributes={ attributes } categories={ categories } />, el );
30
  } );
31
  }
assets/js/blocks/product-categories/get-categories.js ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Internal dependencies
3
+ */
4
+ import { buildTermsTree } from './hierarchy';
5
+
6
+ /**
7
+ * Returns categories in tree form.
8
+ */
9
+ export default function( { hasEmpty, isHierarchical } ) {
10
+ const categories = wc_product_block_data.productCategories.filter(
11
+ ( cat ) => hasEmpty || !! cat.count
12
+ );
13
+ return isHierarchical ?
14
+ buildTermsTree( categories ) :
15
+ categories;
16
+ }
assets/js/blocks/product-categories/hierarchy.js CHANGED
@@ -1,8 +1,3 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { forEach, groupBy } from 'lodash';
5
-
6
  /**
7
  * Returns terms in a tree form.
8
  *
@@ -11,7 +6,8 @@ import { forEach, groupBy } from 'lodash';
11
  * @return {Array} Array of terms in tree format.
12
  */
13
  export function buildTermsTree( list = [] ) {
14
- const termsByParent = groupBy( list, 'parent' );
 
15
 
16
  const fillWithChildren = ( terms ) => {
17
  return terms.map( ( term ) => {
@@ -27,8 +23,7 @@ export function buildTermsTree( list = [] ) {
27
  const tree = fillWithChildren( termsByParent[ '0' ] || [] );
28
  delete termsByParent[ '0' ];
29
 
30
- // anything left in termsByParent has no visible parent
31
- forEach( termsByParent, ( terms ) => {
32
  tree.push( ...fillWithChildren( terms || [] ) );
33
  } );
34
 
 
 
 
 
 
1
  /**
2
  * Returns terms in a tree form.
3
  *
6
  * @return {Array} Array of terms in tree format.
7
  */
8
  export function buildTermsTree( list = [] ) {
9
+ // Group terms by the parent ID.
10
+ const termsByParent = list.reduce( ( r, v, i, a, k = v.parent ) => ( ( r[ k ] || ( r[ k ] = [] ) ).push( v ), r ), {} );
11
 
12
  const fillWithChildren = ( terms ) => {
13
  return terms.map( ( term ) => {
23
  const tree = fillWithChildren( termsByParent[ '0' ] || [] );
24
  delete termsByParent[ '0' ];
25
 
26
+ Object.keys( termsByParent ).forEach( function( terms ) {
 
27
  tree.push( ...fillWithChildren( terms || [] ) );
28
  } );
29
 
assets/js/blocks/product-categories/style.scss CHANGED
@@ -18,3 +18,57 @@
18
  background: currentColor;
19
  opacity: 0.2;
20
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  background: currentColor;
19
  opacity: 0.2;
20
  }
21
+
22
+ .wc-block-product-categories__button {
23
+ display: flex;
24
+ align-items: center;
25
+ text-decoration: none;
26
+ font-size: 13px;
27
+ margin: 0;
28
+ border: none;
29
+ cursor: pointer;
30
+ -webkit-appearance: none;
31
+ background: none;
32
+ padding: 8px;
33
+ color: #555d66;
34
+ position: relative;
35
+ overflow: hidden;
36
+ border-radius: 4px;
37
+ svg {
38
+ fill: currentColor;
39
+ outline: none;
40
+ }
41
+ .screen-reader-text {
42
+ height: auto;
43
+ }
44
+ &:active {
45
+ color: currentColor;
46
+ }
47
+ &:disabled,
48
+ &[aria-disabled="true"] {
49
+ cursor: default;
50
+ opacity: 0.3;
51
+ }
52
+ &:focus:enabled {
53
+ background-color: #fff;
54
+ color: #191e23;
55
+ box-shadow: inset 0 0 0 1px #6c7781, inset 0 0 0 2px #fff;
56
+ outline: 2px solid transparent;
57
+ outline-offset: -2px;
58
+ }
59
+ &:not(:disabled):not([aria-disabled="true"]):hover {
60
+ background-color: #fff;
61
+ color: #191e23;
62
+ box-shadow: inset 0 0 0 1px #e2e4e7, inset 0 0 0 2px #fff, 0 1px 1px rgba(25, 30, 35, 0.2);
63
+ }
64
+ &:not(:disabled):not([aria-disabled="true"]):active {
65
+ outline: none;
66
+ background-color: #fff;
67
+ color: #191e23;
68
+ box-shadow: inset 0 0 0 1px #ccd0d4, inset 0 0 0 2px #fff;
69
+ }
70
+ &[aria-disabled="true"]:focus,
71
+ &:disabled:focus {
72
+ box-shadow: none;
73
+ }
74
+ }
assets/js/blocks/product-category/block.js CHANGED
@@ -30,33 +30,89 @@ import ProductOrderbyControl from '../../components/product-orderby-control';
30
  * Component to handle edit mode of "Products by Category".
31
  */
32
  class ProductByCategoryBlock extends Component {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  getInspectorControls() {
34
  const { attributes, setAttributes } = this.props;
 
35
  const {
36
  columns,
37
  catOperator,
38
  contentVisibility,
39
- editMode,
40
  orderby,
41
  rows,
 
42
  } = attributes;
43
 
44
  return (
45
  <InspectorControls key="inspector">
46
  <PanelBody
47
  title={ __( 'Product Category', 'woo-gutenberg-products-block' ) }
48
- initialOpen={ ! attributes.categories.length && ! editMode }
49
  >
50
  <ProductCategoryControl
51
  selected={ attributes.categories }
52
  onChange={ ( value = [] ) => {
53
  const ids = value.map( ( { id } ) => id );
54
- setAttributes( { categories: ids } );
 
 
 
 
55
  } }
56
  operator={ catOperator }
57
- onOperatorChange={ ( value = 'any' ) =>
58
- setAttributes( { catOperator: value } )
59
- }
 
 
60
  />
61
  </PanelBody>
62
  <PanelBody
@@ -66,6 +122,7 @@ class ProductByCategoryBlock extends Component {
66
  <GridLayoutControl
67
  columns={ columns }
68
  rows={ rows }
 
69
  setAttributes={ setAttributes }
70
  />
71
  </PanelBody>
@@ -92,9 +149,20 @@ class ProductByCategoryBlock extends Component {
92
  }
93
 
94
  renderEditMode() {
95
- const { attributes, debouncedSpeak, setAttributes } = this.props;
 
 
96
  const onDone = () => {
97
- setAttributes( { editMode: false } );
 
 
 
 
 
 
 
 
 
98
  debouncedSpeak(
99
  __(
100
  'Showing Products by Category block preview.',
@@ -115,27 +183,51 @@ class ProductByCategoryBlock extends Component {
115
  ) }
116
  <div className="wc-block-products-category__selection">
117
  <ProductCategoryControl
118
- selected={ attributes.categories }
119
  onChange={ ( value = [] ) => {
120
  const ids = value.map( ( { id } ) => id );
121
- setAttributes( { categories: ids } );
122
  } }
123
- operator={ attributes.catOperator }
124
  onOperatorChange={ ( value = 'any' ) =>
125
- setAttributes( { catOperator: value } )
126
  }
127
  />
128
  <Button isDefault onClick={ onDone }>
129
  { __( 'Done', 'woo-gutenberg-products-block' ) }
130
  </Button>
 
 
 
 
 
 
 
131
  </div>
132
  </Placeholder>
133
  );
134
  }
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  render() {
137
- const { attributes, name, setAttributes } = this.props;
138
- const { editMode } = attributes;
139
 
140
  return (
141
  <Fragment>
@@ -145,19 +237,17 @@ class ProductByCategoryBlock extends Component {
145
  {
146
  icon: 'edit',
147
  title: __( 'Edit' ),
148
- onClick: () => setAttributes( { editMode: ! editMode } ),
149
- isActive: editMode,
150
  },
151
  ] }
152
  />
153
  </BlockControls>
154
  { this.getInspectorControls() }
155
- { editMode ? (
156
  this.renderEditMode()
157
  ) : (
158
- <Disabled>
159
- <ServerSideRender block={ name } attributes={ attributes } />
160
- </Disabled>
161
  ) }
162
  </Fragment>
163
  );
@@ -177,6 +267,7 @@ ProductByCategoryBlock.propTypes = {
177
  * A callback to update attributes
178
  */
179
  setAttributes: PropTypes.func.isRequired,
 
180
  // from withSpokenMessages
181
  debouncedSpeak: PropTypes.func.isRequired,
182
  };
30
  * Component to handle edit mode of "Products by Category".
31
  */
32
  class ProductByCategoryBlock extends Component {
33
+ constructor() {
34
+ super( ...arguments );
35
+ this.state = {
36
+ changedAttributes: {},
37
+ isEditing: false,
38
+ };
39
+ this.startEditing = this.startEditing.bind( this );
40
+ this.stopEditing = this.stopEditing.bind( this );
41
+ this.setChangedAttributes = this.setChangedAttributes.bind( this );
42
+ this.save = this.save.bind( this );
43
+ }
44
+
45
+ componentDidMount() {
46
+ const { attributes } = this.props;
47
+
48
+ if ( ! attributes.categories.length ) {
49
+ // We've removed all selected categories, or no categories have been selected yet.
50
+ this.setState( { isEditing: true } );
51
+ }
52
+ }
53
+
54
+ startEditing() {
55
+ this.setState( {
56
+ isEditing: true,
57
+ changedAttributes: {},
58
+ } );
59
+ }
60
+
61
+ stopEditing() {
62
+ this.setState( {
63
+ isEditing: false,
64
+ changedAttributes: {},
65
+ } );
66
+ }
67
+
68
+ setChangedAttributes( attributes ) {
69
+ this.setState( ( prevState ) => {
70
+ return { changedAttributes: { ...prevState.changedAttributes, ...attributes } };
71
+ } );
72
+ }
73
+
74
+ save() {
75
+ const { changedAttributes } = this.state;
76
+ const { setAttributes } = this.props;
77
+
78
+ setAttributes( changedAttributes );
79
+ this.stopEditing();
80
+ }
81
+
82
  getInspectorControls() {
83
  const { attributes, setAttributes } = this.props;
84
+ const { isEditing } = this.state;
85
  const {
86
  columns,
87
  catOperator,
88
  contentVisibility,
 
89
  orderby,
90
  rows,
91
+ alignButtons,
92
  } = attributes;
93
 
94
  return (
95
  <InspectorControls key="inspector">
96
  <PanelBody
97
  title={ __( 'Product Category', 'woo-gutenberg-products-block' ) }
98
+ initialOpen={ ! attributes.categories.length && ! isEditing }
99
  >
100
  <ProductCategoryControl
101
  selected={ attributes.categories }
102
  onChange={ ( value = [] ) => {
103
  const ids = value.map( ( { id } ) => id );
104
+ const changes = { categories: ids };
105
+
106
+ // Changes in the sidebar save instantly and overwrite any unsaved changes.
107
+ setAttributes( changes );
108
+ this.setChangedAttributes( changes );
109
  } }
110
  operator={ catOperator }
111
+ onOperatorChange={ ( value = 'any' ) => {
112
+ const changes = { catOperator: value };
113
+ setAttributes( changes );
114
+ this.setChangedAttributes( changes );
115
+ } }
116
  />
117
  </PanelBody>
118
  <PanelBody
122
  <GridLayoutControl
123
  columns={ columns }
124
  rows={ rows }
125
+ alignButtons={ alignButtons }
126
  setAttributes={ setAttributes }
127
  />
128
  </PanelBody>
149
  }
150
 
151
  renderEditMode() {
152
+ const { attributes, debouncedSpeak } = this.props;
153
+ const { changedAttributes } = this.state;
154
+ const currentAttributes = { ...attributes, ...changedAttributes };
155
  const onDone = () => {
156
+ this.save();
157
+ debouncedSpeak(
158
+ __(
159
+ 'Showing Products by Category block preview.',
160
+ 'woo-gutenberg-products-block'
161
+ )
162
+ );
163
+ };
164
+ const onCancel = () => {
165
+ this.stopEditing();
166
  debouncedSpeak(
167
  __(
168
  'Showing Products by Category block preview.',
183
  ) }
184
  <div className="wc-block-products-category__selection">
185
  <ProductCategoryControl
186
+ selected={ currentAttributes.categories }
187
  onChange={ ( value = [] ) => {
188
  const ids = value.map( ( { id } ) => id );
189
+ this.setChangedAttributes( { categories: ids } );
190
  } }
191
+ operator={ currentAttributes.catOperator }
192
  onOperatorChange={ ( value = 'any' ) =>
193
+ this.setChangedAttributes( { catOperator: value } )
194
  }
195
  />
196
  <Button isDefault onClick={ onDone }>
197
  { __( 'Done', 'woo-gutenberg-products-block' ) }
198
  </Button>
199
+ <Button
200
+ className="wc-block-products-category__cancel-button"
201
+ isTertiary
202
+ onClick={ onCancel }
203
+ >
204
+ { __( 'Cancel', 'woo-gutenberg-products-block' ) }
205
+ </Button>
206
  </div>
207
  </Placeholder>
208
  );
209
  }
210
 
211
+ renderViewMode() {
212
+ const { attributes, name } = this.props;
213
+ const hasCategories = attributes.categories.length;
214
+
215
+ return (
216
+ <Disabled>
217
+ { hasCategories ? (
218
+ <ServerSideRender block={ name } attributes={ attributes } />
219
+ ) : (
220
+ __(
221
+ 'Select at least one category to display its products.',
222
+ 'woo-gutenberg-products-block'
223
+ )
224
+ ) }
225
+ </Disabled>
226
+ );
227
+ }
228
+
229
  render() {
230
+ const { isEditing } = this.state;
 
231
 
232
  return (
233
  <Fragment>
237
  {
238
  icon: 'edit',
239
  title: __( 'Edit' ),
240
+ onClick: () => isEditing ? this.stopEditing() : this.startEditing(),
241
+ isActive: isEditing,
242
  },
243
  ] }
244
  />
245
  </BlockControls>
246
  { this.getInspectorControls() }
247
+ { isEditing ? (
248
  this.renderEditMode()
249
  ) : (
250
+ this.renderViewMode()
 
 
251
  ) }
252
  </Fragment>
253
  );
267
  * A callback to update attributes
268
  */
269
  setAttributes: PropTypes.func.isRequired,
270
+
271
  // from withSpokenMessages
272
  debouncedSpeak: PropTypes.func.isRequired,
273
  };
assets/js/blocks/product-category/editor.scss CHANGED
@@ -1,3 +1,9 @@
1
  .wc-block-products-category__selection {
2
  width: 100%;
3
  }
 
 
 
 
 
 
1
  .wc-block-products-category__selection {
2
  width: 100%;
3
  }
4
+ .wc-block-products-category__cancel-button.is-tertiary {
5
+ margin: 1em auto 0;
6
+ display: block;
7
+ text-align: center;
8
+ font-size: 1em;
9
+ }
assets/js/blocks/product-category/index.js CHANGED
@@ -30,6 +30,7 @@ registerBlockType( 'woocommerce/product-category', {
30
  ),
31
  supports: {
32
  align: [ 'wide', 'full' ],
 
33
  },
34
  attributes: {
35
  ...sharedAttributes,
30
  ),
31
  supports: {
32
  align: [ 'wide', 'full' ],
33
+ html: false,
34
  },
35
  attributes: {
36
  ...sharedAttributes,
assets/js/blocks/product-new/block.js CHANGED
@@ -26,6 +26,7 @@ class ProductNewestBlock extends Component {
26
  columns,
27
  contentVisibility,
28
  rows,
 
29
  } = attributes;
30
 
31
  return (
@@ -37,6 +38,7 @@ class ProductNewestBlock extends Component {
37
  <GridLayoutControl
38
  columns={ columns }
39
  rows={ rows }
 
40
  setAttributes={ setAttributes }
41
  />
42
  </PanelBody>
26
  columns,
27
  contentVisibility,
28
  rows,
29
+ alignButtons,
30
  } = attributes;
31
 
32
  return (
38
  <GridLayoutControl
39
  columns={ columns }
40
  rows={ rows }
41
+ alignButtons={ alignButtons }
42
  setAttributes={ setAttributes }
43
  />
44
  </PanelBody>
assets/js/blocks/product-on-sale/block.js CHANGED
@@ -28,6 +28,7 @@ class ProductOnSaleBlock extends Component {
28
  contentVisibility,
29
  rows,
30
  orderby,
 
31
  } = attributes;
32
 
33
  return (
@@ -39,6 +40,7 @@ class ProductOnSaleBlock extends Component {
39
  <GridLayoutControl
40
  columns={ columns }
41
  rows={ rows }
 
42
  setAttributes={ setAttributes }
43
  />
44
  </PanelBody>
28
  contentVisibility,
29
  rows,
30
  orderby,
31
+ alignButtons,
32
  } = attributes;
33
 
34
  return (
40
  <GridLayoutControl
41
  columns={ columns }
42
  rows={ rows }
43
+ alignButtons={ alignButtons }
44
  setAttributes={ setAttributes }
45
  />
46
  </PanelBody>
assets/js/blocks/product-tag/block.js ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import {
6
+ BlockControls,
7
+ InspectorControls,
8
+ ServerSideRender,
9
+ } from '@wordpress/editor';
10
+ import {
11
+ Button,
12
+ Disabled,
13
+ PanelBody,
14
+ Placeholder,
15
+ Toolbar,
16
+ withSpokenMessages,
17
+ } from '@wordpress/components';
18
+ import { Component, Fragment } from '@wordpress/element';
19
+ import PropTypes from 'prop-types';
20
+
21
+ /**
22
+ * Internal dependencies
23
+ */
24
+ import GridContentControl from '../../components/grid-content-control';
25
+ import GridLayoutControl from '../../components/grid-layout-control';
26
+ import ProductTagControl from '../../components/product-tag-control';
27
+ import ProductOrderbyControl from '../../components/product-orderby-control';
28
+ import { hasTags } from '../../components/utils';
29
+
30
+ /**
31
+ * Component to handle edit mode of "Products by Tag".
32
+ */
33
+ class ProductsByTagBlock extends Component {
34
+ constructor() {
35
+ super( ...arguments );
36
+ this.state = {
37
+ changedAttributes: {},
38
+ isEditing: false,
39
+ };
40
+
41
+ this.startEditing = this.startEditing.bind( this );
42
+ this.stopEditing = this.stopEditing.bind( this );
43
+ this.setChangedAttributes = this.setChangedAttributes.bind( this );
44
+ this.save = this.save.bind( this );
45
+ }
46
+
47
+ componentDidMount() {
48
+ const { attributes } = this.props;
49
+
50
+ if ( ! attributes.tags.length ) {
51
+ // We've removed all selected categories, or no categories have been selected yet.
52
+ this.setState( { isEditing: true } );
53
+ }
54
+ }
55
+
56
+ startEditing() {
57
+ this.setState( {
58
+ isEditing: true,
59
+ changedAttributes: {},
60
+ } );
61
+ }
62
+
63
+ stopEditing() {
64
+ this.setState( {
65
+ isEditing: false,
66
+ changedAttributes: {},
67
+ } );
68
+ }
69
+
70
+ setChangedAttributes( attributes ) {
71
+ this.setState( ( prevState ) => {
72
+ return { changedAttributes: { ...prevState.changedAttributes, ...attributes } };
73
+ } );
74
+ }
75
+
76
+ save() {
77
+ const { changedAttributes } = this.state;
78
+ const { setAttributes } = this.props;
79
+
80
+ setAttributes( changedAttributes );
81
+ this.stopEditing();
82
+ }
83
+
84
+ getInspectorControls() {
85
+ const { attributes, setAttributes } = this.props;
86
+ const { isEditing } = this.state;
87
+ const {
88
+ columns,
89
+ tagOperator,
90
+ contentVisibility,
91
+ orderby,
92
+ rows,
93
+ alignButtons,
94
+ } = attributes;
95
+
96
+ return (
97
+ <InspectorControls key="inspector">
98
+ <PanelBody
99
+ title={ __( 'Product Tag', 'woo-gutenberg-products-block' ) }
100
+ initialOpen={ ! attributes.tags.length && ! isEditing }
101
+ >
102
+ <ProductTagControl
103
+ selected={ attributes.tags }
104
+ onChange={ ( value = [] ) => {
105
+ const ids = value.map( ( { id } ) => id );
106
+ setAttributes( { tags: ids } );
107
+ } }
108
+ operator={ tagOperator }
109
+ onOperatorChange={ ( value = 'any' ) =>
110
+ setAttributes( { tagOperator: value } )
111
+ }
112
+ />
113
+ </PanelBody>
114
+ <PanelBody
115
+ title={ __( 'Layout', 'woo-gutenberg-products-block' ) }
116
+ initialOpen
117
+ >
118
+ <GridLayoutControl
119
+ columns={ columns }
120
+ rows={ rows }
121
+ alignButtons={ alignButtons }
122
+ setAttributes={ setAttributes }
123
+ />
124
+ </PanelBody>
125
+ <PanelBody
126
+ title={ __( 'Content', 'woo-gutenberg-products-block' ) }
127
+ initialOpen
128
+ >
129
+ <GridContentControl
130
+ settings={ contentVisibility }
131
+ onChange={ ( value ) => setAttributes( { contentVisibility: value } ) }
132
+ />
133
+ </PanelBody>
134
+ <PanelBody
135
+ title={ __( 'Order By', 'woo-gutenberg-products-block' ) }
136
+ initialOpen={ false }
137
+ >
138
+ <ProductOrderbyControl
139
+ setAttributes={ setAttributes }
140
+ value={ orderby }
141
+ />
142
+ </PanelBody>
143
+ </InspectorControls>
144
+ );
145
+ }
146
+
147
+ renderEditMode() {
148
+ const { attributes, debouncedSpeak } = this.props;
149
+ const { changedAttributes } = this.state;
150
+ const currentAttributes = { ...attributes, ...changedAttributes };
151
+ const onDone = () => {
152
+ this.save();
153
+ debouncedSpeak(
154
+ __(
155
+ 'Showing Products by Tag block preview.',
156
+ 'woo-gutenberg-products-block'
157
+ )
158
+ );
159
+ };
160
+ const onCancel = () => {
161
+ this.stopEditing();
162
+ debouncedSpeak(
163
+ __(
164
+ 'Showing Products by Tag block preview.',
165
+ 'woo-gutenberg-products-block'
166
+ )
167
+ );
168
+ };
169
+
170
+ return (
171
+ <Placeholder
172
+ icon="tag"
173
+ label={ __( 'Products by Tag', 'woo-gutenberg-products-block' ) }
174
+ className="wc-block-products-grid wc-block-product-tag"
175
+ >
176
+ { __(
177
+ 'Display a grid of products from your selected tags',
178
+ 'woo-gutenberg-products-block'
179
+ ) }
180
+ <div className="wc-block-product-tag__selection">
181
+ <ProductTagControl
182
+ selected={ currentAttributes.tags }
183
+ onChange={ ( value = [] ) => {
184
+ const ids = value.map( ( { id } ) => id );
185
+ this.setChangedAttributes( { tags: ids } );
186
+ } }
187
+ operator={ currentAttributes.tagOperator }
188
+ onOperatorChange={ ( value = 'any' ) =>
189
+ this.setChangedAttributes( { tagOperator: value } )
190
+ }
191
+ />
192
+ <Button isDefault onClick={ onDone }>
193
+ { __( 'Done', 'woo-gutenberg-products-block' ) }
194
+ </Button>
195
+ <Button
196
+ className="wc-block-product-tag__cancel-button"
197
+ isTertiary
198
+ onClick={ onCancel }
199
+ >
200
+ { __( 'Cancel', 'woo-gutenberg-products-block' ) }
201
+ </Button>
202
+ </div>
203
+ </Placeholder>
204
+ );
205
+ }
206
+
207
+ renderViewMode() {
208
+ const { attributes, name } = this.props;
209
+ const selectedTags = attributes.tags.length;
210
+
211
+ return (
212
+ <Disabled>
213
+ { selectedTags ? (
214
+ <ServerSideRender block={ name } attributes={ attributes } />
215
+ ) : (
216
+ <Placeholder
217
+ icon="tag"
218
+ label={ __( 'Products by Tag', 'woo-gutenberg-products-block' ) }
219
+ className="wc-block-products-grid wc-block-product-tag"
220
+ >
221
+ { __( 'This block displays products from selected tags. Select at least one tag to display its products.', 'woo-gutenberg-products-block' ) }
222
+
223
+ </Placeholder>
224
+ ) }
225
+ </Disabled>
226
+ );
227
+ }
228
+
229
+ render() {
230
+ const { isEditing } = this.state;
231
+
232
+ return (
233
+ <Fragment>
234
+ { hasTags ? (
235
+ <Fragment>
236
+ <BlockControls>
237
+ <Toolbar
238
+ controls={ [
239
+ {
240
+ icon: 'edit',
241
+ title: __( 'Edit' ),
242
+ onClick: () => isEditing ? this.stopEditing() : this.startEditing(),
243
+ isActive: isEditing,
244
+ },
245
+ ] }
246
+ />
247
+ </BlockControls>
248
+ { this.getInspectorControls() }
249
+ { isEditing ? (
250
+ this.renderEditMode()
251
+ ) : (
252
+ this.renderViewMode()
253
+ ) }
254
+ </Fragment>
255
+ ) : (
256
+ <Placeholder
257
+ icon="tag"
258
+ label={ __( 'Products by Tag', 'woo-gutenberg-products-block' ) }
259
+ className="wc-block-products-grid wc-block-product-tag"
260
+ >
261
+ { __( "This block displays products from selected tags. In order to preview this you'll first need to create a product and assign it some tags.", 'woo-gutenberg-products-block' ) }
262
+
263
+ </Placeholder>
264
+ ) }
265
+ </Fragment>
266
+ );
267
+ }
268
+ }
269
+
270
+ ProductsByTagBlock.propTypes = {
271
+ /**
272
+ * The attributes for this block
273
+ */
274
+ attributes: PropTypes.object.isRequired,
275
+ /**
276
+ * The register block name.
277
+ */
278
+ name: PropTypes.string.isRequired,
279
+ /**
280
+ * A callback to update attributes
281
+ */
282
+ setAttributes: PropTypes.func.isRequired,
283
+ /**
284
+ * From withSpokenMessages
285
+ */
286
+ debouncedSpeak: PropTypes.func.isRequired,
287
+ };
288
+
289
+ export default withSpokenMessages( ProductsByTagBlock );
assets/js/blocks/product-tag/editor.scss ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ .wc-block-product-tag__selection {
2
+ width: 100%;
3
+ }
4
+ .wc-block-product-tag__cancel-button.is-tertiary {
5
+ margin: 1em auto 0;
6
+ display: block;
7
+ text-align: center;
8
+ font-size: 1em;
9
+ }
assets/js/blocks/product-tag/index.js ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { __ } from '@wordpress/i18n';
5
+ import { registerBlockType } from '@wordpress/blocks';
6
+
7
+ /**
8
+ * Internal dependencies
9
+ */
10
+ import './editor.scss';
11
+ import Block from './block';
12
+
13
+ /**
14
+ * Register and run the "Products by Tag" block.
15
+ */
16
+ registerBlockType( 'woocommerce/product-tag', {
17
+ title: __( 'Products by Tag', 'woo-gutenberg-products-block' ),
18
+ icon: {
19
+ src: 'tag',
20
+ foreground: '#96588a',
21
+ },
22
+ category: 'woocommerce',
23
+ keywords: [ __( 'WooCommerce', 'woo-gutenberg-products-block' ) ],
24
+ description: __(
25
+ 'Display a grid of products from selected tags.',
26
+ 'woo-gutenberg-products-block'
27
+ ),
28
+ supports: {
29
+ align: [ 'wide', 'full' ],
30
+ html: false,
31
+ },
32
+ attributes: {
33
+ /**
34
+ * Number of columns.
35
+ */
36
+ columns: {
37
+ type: 'number',
38
+ default: wc_product_block_data.default_columns,
39
+ },
40
+
41
+ /**
42
+ * Number of rows.
43
+ */
44
+ rows: {
45
+ type: 'number',
46
+ default: wc_product_block_data.default_rows,
47
+ },
48
+
49
+ /**
50
+ * How to align cart buttons.
51
+ */
52
+ alignButtons: {
53
+ type: 'boolean',
54
+ default: false,
55
+ },
56
+
57
+ /**
58
+ * Content visibility setting
59
+ */
60
+ contentVisibility: {
61
+ type: 'object',
62
+ default: {
63
+ title: true,
64
+ price: true,
65
+ rating: true,
66
+ button: true,
67
+ },
68
+ },
69
+
70
+ /**
71
+ * Product tags, used to display only products with the given tags.
72
+ */
73
+ tags: {
74
+ type: 'array',
75
+ default: [],
76
+ },
77
+
78
+ /**
79
+ * Product tags operator, used to restrict to products in all or any selected tags.
80
+ */
81
+ tagOperator: {
82
+ type: 'string',
83
+ default: 'any',
84
+ },
85
+
86
+ /**
87
+ * How to order the products: 'date', 'popularity', 'price_asc', 'price_desc' 'rating', 'title'.
88
+ */
89
+ orderby: {
90
+ type: 'string',
91
+ default: 'date',
92
+ },
93
+ },
94
+
95
+ /**
96
+ * Renders and manages the block.
97
+ */
98
+ edit( props ) {
99
+ return <Block { ...props } />;
100
+ },
101
+
102
+ save() {
103
+ return null;
104
+ },
105
+ } );
assets/js/blocks/product-top-rated/block.js CHANGED
@@ -27,6 +27,7 @@ class ProductTopRatedBlock extends Component {
27
  columns,
28
  contentVisibility,
29
  rows,
 
30
  } = attributes;
31
 
32
  return (
@@ -38,6 +39,7 @@ class ProductTopRatedBlock extends Component {
38
  <GridLayoutControl
39
  columns={ columns }
40
  rows={ rows }
 
41
  setAttributes={ setAttributes }
42
  />
43
  </PanelBody>
27
  columns,
28
  contentVisibility,
29
  rows,
30
+ alignButtons,
31
  } = attributes;
32
 
33
  return (
39
  <GridLayoutControl
40
  columns={ columns }
41
  rows={ rows }
42
+ alignButtons={ alignButtons }
43
  setAttributes={ setAttributes }
44
  />
45
  </PanelBody>
assets/js/blocks/product-top-rated/index.js CHANGED
@@ -29,6 +29,7 @@ registerBlockType( blockTypeName, {
29
  ),
30
  supports: {
31
  align: [ 'wide', 'full' ],
 
32
  },
33
  attributes: {
34
  ...sharedAttributes,
29
  ),
30
  supports: {
31
  align: [ 'wide', 'full' ],
32
+ html: false,
33
  },
34
  attributes: {
35
  ...sharedAttributes,
assets/js/blocks/products-by-attribute/block.js CHANGED
@@ -40,6 +40,7 @@ class ProductsByAttributeBlock extends Component {
40
  contentVisibility,
41
  orderby,
42
  rows,
 
43
  } = this.props.attributes;
44
 
45
  return (
@@ -51,6 +52,7 @@ class ProductsByAttributeBlock extends Component {
51
  <GridLayoutControl
52
  columns={ columns }
53
  rows={ rows }
 
54
  setAttributes={ setAttributes }
55
  />
56
  </PanelBody>
@@ -115,13 +117,13 @@ class ProductsByAttributeBlock extends Component {
115
  <Placeholder
116
  icon={ <Gridicon icon="custom-post-type" /> }
117
  label={ __( 'Products by Attribute', 'woo-gutenberg-products-block' ) }
118
- className="wc-block-products-grid wc-block-products-attribute"
119
  >
120
  { __(
121
  'Display a grid of products from your selected attributes.',
122
  'woo-gutenberg-products-block'
123
  ) }
124
- <div className="wc-block-products-attribute__selection">
125
  <ProductAttributeControl
126
  selected={ blockAttributes.attributes }
127
  onChange={ ( value = [] ) => {
40
  contentVisibility,
41
  orderby,
42
  rows,
43
+ alignButtons,
44
  } = this.props.attributes;
45
 
46
  return (
52
  <GridLayoutControl
53
  columns={ columns }
54
  rows={ rows }
55
+ alignButtons={ alignButtons }
56
  setAttributes={ setAttributes }
57
  />
58
  </PanelBody>
117
  <Placeholder
118
  icon={ <Gridicon icon="custom-post-type" /> }
119
  label={ __( 'Products by Attribute', 'woo-gutenberg-products-block' ) }
120
+ className="wc-block-products-grid wc-block-products-by-attribute"
121
  >
122
  { __(
123
  'Display a grid of products from your selected attributes.',
124
  'woo-gutenberg-products-block'
125
  ) }
126
+ <div className="wc-block-products-by-attribute__selection">
127
  <ProductAttributeControl
128
  selected={ blockAttributes.attributes }
129
  onChange={ ( value = [] ) => {
assets/js/blocks/products-by-attribute/editor.scss CHANGED
@@ -1,3 +1,3 @@
1
- .wc-block-products-attribute__selection {
2
  width: 100%;
3
  }
1
+ .wc-block-products-by-attribute__selection {
2
  width: 100%;
3
  }
assets/js/blocks/products-by-attribute/index.js CHANGED
@@ -28,6 +28,7 @@ registerBlockType( blockTypeName, {
28
  ),
29
  supports: {
30
  align: [ 'wide', 'full' ],
 
31
  },
32
  attributes: {
33
  /**
@@ -90,6 +91,14 @@ registerBlockType( blockTypeName, {
90
  type: 'number',
91
  default: wc_product_block_data.default_rows,
92
  },
 
 
 
 
 
 
 
 
93
  },
94
 
95
  deprecated: [
28
  ),
29
  supports: {
30
  align: [ 'wide', 'full' ],
31
+ html: false,
32
  },
33
  attributes: {
34
  /**
91
  type: 'number',
92
  default: wc_product_block_data.default_rows,
93
  },
94
+
95
+ /**
96
+ * How to align cart buttons.
97
+ */
98
+ alignButtons: {
99
+ type: 'boolean',
100
+ default: false,
101
+ },
102
  },
103
 
104
  deprecated: [
assets/js/components/grid-content-control/index.js CHANGED
@@ -70,6 +70,7 @@ GridContentControl.propTypes = {
70
  settings: PropTypes.shape( {
71
  button: PropTypes.bool.isRequired,
72
  price: PropTypes.bool.isRequired,
 
73
  title: PropTypes.bool.isRequired,
74
  } ).isRequired,
75
  /**
70
  settings: PropTypes.shape( {
71
  button: PropTypes.bool.isRequired,
72
  price: PropTypes.bool.isRequired,
73
+ rating: PropTypes.bool.isRequired,
74
  title: PropTypes.bool.isRequired,
75
  } ).isRequired,
76
  /**
assets/js/components/grid-layout-control/index.js CHANGED
@@ -5,12 +5,12 @@ import { __ } from '@wordpress/i18n';
5
  import { clamp, isNaN } from 'lodash';
6
  import { Fragment } from '@wordpress/element';
7
  import PropTypes from 'prop-types';
8
- import { RangeControl } from '@wordpress/components';
9
 
10
  /**
11
  * A combination of range controls for product grid layout settings.
12
  */
13
- const GridLayoutControl = ( { columns, rows, setAttributes } ) => {
14
  return (
15
  <Fragment>
16
  <RangeControl
@@ -41,6 +41,22 @@ const GridLayoutControl = ( { columns, rows, setAttributes } ) => {
41
  min={ wc_product_block_data.min_rows }
42
  max={ wc_product_block_data.max_rows }
43
  />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  </Fragment>
45
  );
46
  };
@@ -54,6 +70,10 @@ GridLayoutControl.propTypes = {
54
  * The current rows count.
55
  */
56
  rows: PropTypes.oneOfType( [ PropTypes.number, PropTypes.string ] ).isRequired,
 
 
 
 
57
  /**
58
  * Callback to update the layout settings.
59
  */
5
  import { clamp, isNaN } from 'lodash';
6
  import { Fragment } from '@wordpress/element';
7
  import PropTypes from 'prop-types';
8
+ import { RangeControl, ToggleControl } from '@wordpress/components';
9
 
10
  /**
11
  * A combination of range controls for product grid layout settings.
12
  */
13
+ const GridLayoutControl = ( { columns, rows, setAttributes, alignButtons } ) => {
14
  return (
15
  <Fragment>
16
  <RangeControl
41
  min={ wc_product_block_data.min_rows }
42
  max={ wc_product_block_data.max_rows }
43
  />
44
+ <ToggleControl
45
+ label={ __( 'Align Add to Cart buttons', 'woo-gutenberg-products-block' ) }
46
+ help={
47
+ alignButtons ?
48
+ __(
49
+ 'Buttons are aligned vertically.',
50
+ 'woo-gutenberg-products-block'
51
+ ) :
52
+ __(
53
+ 'Buttons follow content.',
54
+ 'woo-gutenberg-products-block'
55
+ )
56
+ }
57
+ checked={ alignButtons }
58
+ onChange={ () => setAttributes( { alignButtons: ! alignButtons } ) }
59
+ />
60
  </Fragment>
61
  );
62
  };
70
  * The current rows count.
71
  */
72
  rows: PropTypes.oneOfType( [ PropTypes.number, PropTypes.string ] ).isRequired,
73
+ /**
74
+ * Whether or not buttons are aligned horizontally across items.
75
+ */
76
+ alignButtons: PropTypes.bool.isRequired,
77
  /**
78
  * Callback to update the layout settings.
79
  */
assets/js/components/icons/folder-star.js ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { Icon } from '@wordpress/components';
5
+
6
+ export default () => (
7
+ <Icon
8
+ icon={
9
+ <svg
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ width="24"
12
+ height="24"
13
+ viewBox="0 0 24 24"
14
+ >
15
+ <path d="M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z" />
16
+ <path fill="#fff" d="M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z" />
17
+ </svg>
18
+ }
19
+ />
20
+ );
assets/js/components/icons/index.js CHANGED
@@ -2,6 +2,7 @@
2
  export { default as IconCheckChecked } from './checkbox-checked';
3
  export { default as IconCheckUnchecked } from './checkbox-unchecked';
4
  export { default as IconFolder } from './folder';
 
5
  export { default as IconNewReleases } from './new-releases';
6
  export { default as IconRadioSelected } from './radio-selected';
7
  export { default as IconRadioUnselected } from './radio-unselected';
2
  export { default as IconCheckChecked } from './checkbox-checked';
3
  export { default as IconCheckUnchecked } from './checkbox-unchecked';
4
  export { default as IconFolder } from './folder';
5
+ export { default as IconFolderStar } from './folder-star';
6
  export { default as IconNewReleases } from './new-releases';
7
  export { default as IconRadioSelected } from './radio-selected';
8
  export { default as IconRadioUnselected } from './radio-unselected';
assets/js/components/product-attribute-control/index.js CHANGED
@@ -34,7 +34,7 @@ class ProductAttributeControl extends Component {
34
  componentDidMount() {
35
  const { selected } = this.props;
36
  apiFetch( {
37
- path: addQueryArgs( '/wc-blocks/v1/products/attributes', { per_page: -1 } ),
38
  } )
39
  .then( ( list ) => {
40
  list = list.map( ( item ) => ( { ...item, parent: 0 } ) );
@@ -67,7 +67,7 @@ class ProductAttributeControl extends Component {
67
  }
68
 
69
  apiFetch( {
70
- path: addQueryArgs( `/wc-blocks/v1/products/attributes/${ attribute }/terms`, {
71
  per_page: -1,
72
  } ),
73
  } )
34
  componentDidMount() {
35
  const { selected } = this.props;
36
  apiFetch( {
37
+ path: addQueryArgs( '/wc/blocks/products/attributes', { per_page: -1 } ),
38
  } )
39
  .then( ( list ) => {
40
  list = list.map( ( item ) => ( { ...item, parent: 0 } ) );
67
  }
68
 
69
  apiFetch( {
70
+ path: addQueryArgs( `/wc/blocks/products/attributes/${ attribute }/terms`, {
71
  per_page: -1,
72
  } ),
73
  } )
assets/js/components/product-attribute-control/style.scss CHANGED
@@ -18,7 +18,7 @@
18
  .woocommerce-search-list__item.woocommerce-product-attributes__item {
19
  &.is-searching,
20
  &.is-skip-level {
21
- .woocommerce-search-list__item-prefix:after {
22
  content: ":";
23
  }
24
  }
@@ -39,17 +39,17 @@
39
 
40
  &.depth-0::after {
41
  margin-left: $gap-smaller;
42
- content: '';
43
  height: $gap-large;
44
  width: $gap-large;
45
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="#{$core-grey-dark-300}" /></svg>');
46
  background-repeat: no-repeat;
47
  background-position: center right;
48
  background-size: contain;
49
  }
50
 
51
  &.depth-0[aria-expanded="true"]::after {
52
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="#{$core-grey-dark-300}" /></svg>');
53
  }
54
 
55
  &[disabled].depth-0::after {
18
  .woocommerce-search-list__item.woocommerce-product-attributes__item {
19
  &.is-searching,
20
  &.is-skip-level {
21
+ .woocommerce-search-list__item-prefix::after {
22
  content: ":";
23
  }
24
  }
39
 
40
  &.depth-0::after {
41
  margin-left: $gap-smaller;
42
+ content: "";
43
  height: $gap-large;
44
  width: $gap-large;
45
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="{$core-grey-dark-300}" /></svg>');
46
  background-repeat: no-repeat;
47
  background-position: center right;
48
  background-size: contain;
49
  }
50
 
51
  &.depth-0[aria-expanded="true"]::after {
52
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="{$core-grey-dark-300}" /></svg>');
53
  }
54
 
55
  &[disabled].depth-0::after {
assets/js/components/product-category-control/index.js CHANGED
@@ -27,7 +27,7 @@ class ProductCategoryControl extends Component {
27
 
28
  componentDidMount() {
29
  apiFetch( {
30
- path: addQueryArgs( '/wc-blocks/v1/products/categories', { per_page: -1 } ),
31
  } )
32
  .then( ( list ) => {
33
  this.setState( { list, loading: false } );
@@ -74,7 +74,7 @@ class ProductCategoryControl extends Component {
74
 
75
  render() {
76
  const { list, loading } = this.state;
77
- const { onChange, onOperatorChange, operator, selected } = this.props;
78
 
79
  const messages = {
80
  clear: __( 'Clear all product categories', 'woo-gutenberg-products-block' ),
@@ -114,6 +114,7 @@ class ProductCategoryControl extends Component {
114
  renderItem={ this.renderItem }
115
  messages={ messages }
116
  isHierarchical
 
117
  />
118
  { ( !! onOperatorChange ) && (
119
  <div className={ selected.length < 2 ? 'screen-reader-text' : '' }>
@@ -158,10 +159,15 @@ ProductCategoryControl.propTypes = {
158
  * The list of currently selected category IDs.
159
  */
160
  selected: PropTypes.array.isRequired,
 
 
 
 
161
  };
162
 
163
  ProductCategoryControl.defaultProps = {
164
  operator: 'any',
 
165
  };
166
 
167
  export default ProductCategoryControl;
27
 
28
  componentDidMount() {
29
  apiFetch( {
30
+ path: addQueryArgs( '/wc/blocks/products/categories', { per_page: -1 } ),
31
  } )
32
  .then( ( list ) => {
33
  this.setState( { list, loading: false } );
74
 
75
  render() {
76
  const { list, loading } = this.state;
77
+ const { onChange, onOperatorChange, operator, selected, isSingle } = this.props;
78
 
79
  const messages = {
80
  clear: __( 'Clear all product categories', 'woo-gutenberg-products-block' ),
114
  renderItem={ this.renderItem }
115
  messages={ messages }
116
  isHierarchical
117
+ isSingle={ isSingle }
118
  />
119
  { ( !! onOperatorChange ) && (
120
  <div className={ selected.length < 2 ? 'screen-reader-text' : '' }>
159
  * The list of currently selected category IDs.
160
  */
161
  selected: PropTypes.array.isRequired,
162
+ /**
163
+ * Allow only a single selection. Defaults to false.
164
+ */
165
+ isSingle: PropTypes.bool,
166
  };
167
 
168
  ProductCategoryControl.defaultProps = {
169
  operator: 'any',
170
+ isSingle: false,
171
  };
172
 
173
  export default ProductCategoryControl;
assets/js/components/product-control/index.js CHANGED
@@ -1,54 +1,245 @@
1
  /**
2
  * External dependencies
3
  */
4
- import { __ } from '@wordpress/i18n';
5
  import { Component, Fragment } from '@wordpress/element';
6
- import { debounce, find } from 'lodash';
 
 
7
  import PropTypes from 'prop-types';
8
- import { SearchListControl } from '@woocommerce/components';
 
 
 
 
 
9
 
10
  /**
11
  * Internal dependencies
12
  */
13
  import { isLargeCatalog, getProducts } from '../utils';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  class ProductControl extends Component {
16
  constructor() {
17
  super( ...arguments );
18
  this.state = {
19
- list: [],
 
 
 
20
  loading: true,
21
  };
22
 
23
  this.debouncedOnSearch = debounce( this.onSearch.bind( this ), 400 );
 
 
 
24
  }
25
 
26
  componentDidMount() {
27
  const { selected } = this.props;
28
 
29
  getProducts( { selected } )
30
- .then( ( list ) => {
31
- this.setState( { list, loading: false } );
 
 
 
 
 
 
 
 
32
  } )
33
  .catch( () => {
34
- this.setState( { list: [], loading: false } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  } );
36
  }
37
 
38
  onSearch( search ) {
39
  const { selected } = this.props;
40
  getProducts( { selected, search } )
41
- .then( ( list ) => {
42
- this.setState( { list, loading: false } );
43
  } )
44
  .catch( () => {
45
- this.setState( { list: [], loading: false } );
46
  } );
47
  }
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  render() {
50
- const { list, loading } = this.state;
51
  const { onChange, selected } = this.props;
 
 
52
  const messages = {
53
  list: __( 'Products', 'woo-gutenberg-products-block' ),
54
  noItems: __(
@@ -64,19 +255,21 @@ class ProductControl extends Component {
64
  'woo-gutenberg-products-block'
65
  ),
66
  };
 
67
 
68
- // Note: selected prop still needs to be array for SearchListControl.
69
  return (
70
  <Fragment>
71
  <SearchListControl
72
  className="woocommerce-products"
73
- list={ list }
74
  isLoading={ loading }
75
  isSingle
76
- selected={ [ find( list, { id: selected } ) ] }
77
  onChange={ onChange }
78
  onSearch={ isLargeCatalog ? this.debouncedOnSearch : null }
79
  messages={ messages }
 
 
80
  />
81
  </Fragment>
82
  );
1
  /**
2
  * External dependencies
3
  */
4
+ import { __, _n, sprintf } from '@wordpress/i18n';
5
  import { Component, Fragment } from '@wordpress/element';
6
+ import { addQueryArgs } from '@wordpress/url';
7
+ import apiFetch from '@wordpress/api-fetch';
8
+ import { debounce, find, escapeRegExp, isEmpty } from 'lodash';
9
  import PropTypes from 'prop-types';
10
+ import {
11
+ SearchListControl,
12
+ SearchListItem,
13
+ } from '@woocommerce/components';
14
+ import { Spinner, MenuItem } from '@wordpress/components';
15
+ import classnames from 'classnames';
16
 
17
  /**
18
  * Internal dependencies
19
  */
20
  import { isLargeCatalog, getProducts } from '../utils';
21
+ import {
22
+ IconRadioSelected,
23
+ IconRadioUnselected,
24
+ } from '../icons';
25
+ import './style.scss';
26
+
27
+ function getHighlightedName( name, search ) {
28
+ if ( ! search ) {
29
+ return name;
30
+ }
31
+ const re = new RegExp( escapeRegExp( search ), 'ig' );
32
+ return name.replace( re, '<strong>$&</strong>' );
33
+ }
34
+
35
+ const getInteractionIcon = ( isSelected = false ) => {
36
+ return isSelected ? <IconRadioSelected /> : <IconRadioUnselected />;
37
+ };
38
 
39
  class ProductControl extends Component {
40
  constructor() {
41
  super( ...arguments );
42
  this.state = {
43
+ products: [],
44
+ product: 0,
45
+ variationsList: {},
46
+ variationsLoading: false,
47
  loading: true,
48
  };
49
 
50
  this.debouncedOnSearch = debounce( this.onSearch.bind( this ), 400 );
51
+ this.debouncedGetVariations = debounce( this.getVariations.bind( this ), 200 );
52
+ this.renderItem = this.renderItem.bind( this );
53
+ this.onProductSelect = this.onProductSelect.bind( this );
54
  }
55
 
56
  componentDidMount() {
57
  const { selected } = this.props;
58
 
59
  getProducts( { selected } )
60
+ .then( ( products ) => {
61
+ products = products.map( ( product ) => {
62
+ const count = product.variations ? product.variations.length : 0;
63
+ return {
64
+ ...product,
65
+ parent: 0,
66
+ count: count,
67
+ };
68
+ } );
69
+ this.setState( { products, loading: false } );
70
  } )
71
  .catch( () => {
72
+ this.setState( { products: [], loading: false } );
73
+ } );
74
+ }
75
+
76
+ componentDidUpdate( prevProps, prevState ) {
77
+ if ( prevState.product !== this.state.product ) {
78
+ this.debouncedGetVariations();
79
+ }
80
+ }
81
+
82
+ getVariations() {
83
+ const { product, variationsList } = this.state;
84
+
85
+ if ( ! product ) {
86
+ this.setState( {
87
+ variationsList: {},
88
+ variationsLoading: false,
89
+ } );
90
+ return;
91
+ }
92
+
93
+ const productDetails = this.state.products.find( ( findProduct ) => findProduct.id === product );
94
+
95
+ if ( ! productDetails.variations || productDetails.variations.length === 0 ) {
96
+ return;
97
+ }
98
+
99
+ if ( ! variationsList[ product ] ) {
100
+ this.setState( { variationsLoading: true } );
101
+ }
102
+
103
+ apiFetch( {
104
+ path: addQueryArgs( `/wc/blocks/products/${ product }/variations`, {
105
+ per_page: -1,
106
+ } ),
107
+ } )
108
+ .then( ( variations ) => {
109
+ variations = variations.map( ( variation ) => ( { ...variation, parent: product } ) );
110
+ this.setState( ( prevState ) => ( {
111
+ variationsList: { ...prevState.variationsList, [ product ]: variations },
112
+ variationsLoading: false,
113
+ } ) );
114
+ } )
115
+ .catch( () => {
116
+ this.setState( { termsLoading: false } );
117
  } );
118
  }
119
 
120
  onSearch( search ) {
121
  const { selected } = this.props;
122
  getProducts( { selected, search } )
123
+ .then( ( products ) => {
124
+ this.setState( { products, loading: false } );
125
  } )
126
  .catch( () => {
127
+ this.setState( { products: [], loading: false } );
128
  } );
129
  }
130
 
131
+ onProductSelect( item, isSelected ) {
132
+ return () => {
133
+ this.setState( {
134
+ product: isSelected ? 0 : item.id,
135
+ } );
136
+ };
137
+ }
138
+
139
+ renderItem( args ) {
140
+ const { item, search, depth = 0, isSelected, onSelect } = args;
141
+ const { product, variationsLoading } = this.state;
142
+ const classes = classnames(
143
+ 'woocommerce-search-product__item',
144
+ 'woocommerce-search-list__item',
145
+ `depth-${ depth }`,
146
+ {
147
+ 'is-searching': search.length > 0,
148
+ 'is-skip-level': depth === 0 && item.parent !== 0,
149
+ 'is-variable': item.count > 0,
150
+ }
151
+ );
152
+
153
+ const itemArgs = Object.assign( {}, args );
154
+ delete itemArgs.isSingle;
155
+
156
+ const a11yProps = {
157
+ role: 'menuitemradio',
158
+ };
159
+
160
+ if ( item.breadcrumbs.length ) {
161
+ a11yProps[ 'aria-label' ] = `${ item.breadcrumbs[ 0 ] }: ${ item.name }`;
162
+ }
163
+
164
+ if ( item.count ) {
165
+ a11yProps[ 'aria-expanded' ] = item.id === product;
166
+ }
167
+
168
+ // Top level items custom rendering based on SearchListItem.
169
+ if ( ! item.breadcrumbs.length ) {
170
+ return [
171
+ <MenuItem
172
+ key={ `product-${ item.id }` }
173
+ isSelected={ isSelected }
174
+ { ...itemArgs }
175
+ { ...a11yProps }
176
+ className={ classes }
177
+ onClick={ () => {
178
+ onSelect( item )();
179
+ this.onProductSelect( item, isSelected )();
180
+ } }
181
+ >
182
+ <span className="woocommerce-search-list__item-state">
183
+ { getInteractionIcon( isSelected ) }
184
+ </span>
185
+
186
+ <span className="woocommerce-search-list__item-label">
187
+ <span
188
+ className="woocommerce-search-list__item-name"
189
+ dangerouslySetInnerHTML={ {
190
+ __html: getHighlightedName( item.name, search ),
191
+ } }
192
+ />
193
+ </span>
194
+
195
+ { item.count ? (
196
+ <span
197
+ className="woocommerce-search-list__item-variation-count"
198
+ >
199
+ { sprintf(
200
+ _n(
201
+ '%d variation',
202
+ '%d variations',
203
+ item.count,
204
+ 'woo-gutenberg-products-block'
205
+ ),
206
+ item.count
207
+ ) }
208
+ </span>
209
+ ) : null }
210
+ </MenuItem>,
211
+ product === item.id && item.count > 0 && variationsLoading && (
212
+ <div
213
+ key="loading"
214
+ className={
215
+ 'woocommerce-search-list__item woocommerce-search-product__item' +
216
+ 'depth-1 is-loading is-not-active'
217
+ }
218
+ >
219
+ <Spinner />
220
+ </div>
221
+ ),
222
+ ];
223
+ }
224
+
225
+ if ( ! isEmpty( item.variation ) ) {
226
+ item.name = item.variation;
227
+ }
228
+
229
+ return (
230
+ <SearchListItem
231
+ className={ classes }
232
+ { ...args }
233
+ { ...a11yProps }
234
+ />
235
+ );
236
+ }
237
+
238
  render() {
239
+ const { products, loading, product, variationsList } = this.state;
240
  const { onChange, selected } = this.props;
241
+ const currentVariations = variationsList[ product ] || [];
242
+ const currentList = [ ...products, ...currentVariations ];
243
  const messages = {
244
  list: __( 'Products', 'woo-gutenberg-products-block' ),
245
  noItems: __(
255
  'woo-gutenberg-products-block'
256
  ),
257
  };
258
+ const selectedListItems = selected ? [ find( currentList, { id: selected } ) ] : [];
259
 
 
260
  return (
261
  <Fragment>
262
  <SearchListControl
263
  className="woocommerce-products"
264
+ list={ currentList }
265
  isLoading={ loading }
266
  isSingle
267
+ selected={ selectedListItems }
268
  onChange={ onChange }
269
  onSearch={ isLargeCatalog ? this.debouncedOnSearch : null }
270
  messages={ messages }
271
+ renderItem={ this.renderItem }
272
+ isHierarchical
273
  />
274
  </Fragment>
275
  );
assets/js/components/product-control/style.scss ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .woocommerce-search-product__item {
2
+ .woocommerce-search-list__item-name {
3
+ .description {
4
+ display: block;
5
+ }
6
+ }
7
+
8
+ &.is-searching,
9
+ &.is-skip-level {
10
+ .woocommerce-search-list__item-prefix::after {
11
+ content: ":";
12
+ }
13
+ }
14
+
15
+ &.is-not-active {
16
+ @include hover-state {
17
+ background: $white;
18
+ }
19
+ }
20
+
21
+ &.is-loading {
22
+ justify-content: center;
23
+
24
+ .components-spinner {
25
+ margin-bottom: $gap-small;
26
+ }
27
+ }
28
+
29
+ &.depth-0.is-variable::after {
30
+ margin-left: $gap-smaller;
31
+ content: "";
32
+ height: $gap-large;
33
+ width: $gap-large;
34
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="{$core-grey-dark-300}" /></svg>');
35
+ background-repeat: no-repeat;
36
+ background-position: center right;
37
+ background-size: contain;
38
+ }
39
+
40
+ &.depth-0.is-variable[aria-expanded="true"]::after {
41
+ background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="{$core-grey-dark-300}" /></svg>');
42
+ }
43
+ }
assets/js/components/product-preview/index.js CHANGED
@@ -81,6 +81,7 @@ ProductPreview.propTypes = {
81
  */
82
  product: PropTypes.shape( {
83
  id: PropTypes.number,
 
84
  images: PropTypes.array,
85
  name: PropTypes.string,
86
  price_html: PropTypes.string,
81
  */
82
  product: PropTypes.shape( {
83
  id: PropTypes.number,
84
+ average_rating: PropTypes.oneOf( [ 'PropTypes.number', 'PropTypes.string' ] ),
85
  images: PropTypes.array,
86
  name: PropTypes.string,
87
  price_html: PropTypes.string,
assets/js/components/product-tag-control/index.js ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { __, _n, sprintf } from '@wordpress/i18n';
5
+ import { Component, Fragment } from '@wordpress/element';
6
+ import { debounce, find } from 'lodash';
7
+ import PropTypes from 'prop-types';
8
+ import { SearchListControl, SearchListItem } from '@woocommerce/components';
9
+ import { SelectControl } from '@wordpress/components';
10
+
11
+ /**
12
+ * Internal dependencies
13
+ */
14
+ import './style.scss';
15
+ import { limitTags, getProductTags } from '../utils';
16
+
17
+ /**
18
+ * Component to handle searching and selecting product tags.
19
+ */
20
+ class ProductTagControl extends Component {
21
+ constructor() {
22
+ super( ...arguments );
23
+ this.state = {
24
+ list: [],
25
+ loading: true,
26
+ };
27
+ this.renderItem = this.renderItem.bind( this );
28
+ this.debouncedOnSearch = debounce( this.onSearch.bind( this ), 400 );
29
+ }
30
+
31
+ componentDidMount() {
32
+ const { selected } = this.props;
33
+
34
+ getProductTags( { selected } )
35
+ .then( ( list ) => {
36
+ this.setState( { list, loading: false } );
37
+ } )
38
+ .catch( () => {
39
+ this.setState( { list: [], loading: false } );
40
+ } );
41
+ }
42
+
43
+ onSearch( search ) {
44
+ const { selected } = this.props;
45
+ this.setState( { loading: true } );
46
+
47
+ getProductTags( { selected, search } )
48
+ .then( ( list ) => {
49
+ this.setState( { list, loading: false } );
50
+ } )
51
+ .catch( () => {
52
+ this.setState( { list: [], loading: false } );
53
+ } );
54
+ }
55
+
56
+ renderItem( args ) {
57
+ const { item, search, depth = 0 } = args;
58
+ const classes = [
59
+ 'woocommerce-product-tags__item',
60
+ ];
61
+ if ( search.length ) {
62
+ classes.push( 'is-searching' );
63
+ }
64
+ if ( depth === 0 && item.parent !== 0 ) {
65
+ classes.push( 'is-skip-level' );
66
+ }
67
+
68
+ const accessibleName = ! item.breadcrumbs.length ?
69
+ item.name :
70
+ `${ item.breadcrumbs.join( ', ' ) }, ${ item.name }`;
71
+
72
+ return (
73
+ <SearchListItem
74
+ className={ classes.join( ' ' ) }
75
+ { ...args }
76
+ showCount
77
+ aria-label={ sprintf(
78
+ _n(
79
+ '%d product tagged as %s',
80
+ '%d products tagged as %s',
81
+ item.count,
82
+ 'woo-gutenberg-products-block'
83
+ ),
84
+ item.count,
85
+ accessibleName,
86
+ ) }
87
+ />
88
+ );
89
+ }
90
+
91
+ render() {
92
+ const { list, loading } = this.state;
93
+ const { onChange, onOperatorChange, operator, selected } = this.props;
94
+
95
+ const messages = {
96
+ clear: __( 'Clear all product tags', 'woo-gutenberg-products-block' ),
97
+ list: __( 'Product Tags', 'woo-gutenberg-products-block' ),
98
+ noItems: __(
99
+ "Your store doesn't have any product tags.",
100
+ 'woo-gutenberg-products-block'
101
+ ),
102
+ search: __(
103
+ 'Search for product tags',
104
+ 'woo-gutenberg-products-block'
105
+ ),
106
+ selected: ( n ) =>
107
+ sprintf(
108
+ _n(
109
+ '%d tag selected',
110
+ '%d tags selected',
111
+ n,
112
+ 'woo-gutenberg-products-block'
113
+ ),
114
+ n
115
+ ),
116
+ updated: __(
117
+ 'Tag search results updated.',
118
+ 'woo-gutenberg-products-block'
119
+ ),
120
+ };
121
+
122
+ return (
123
+ <Fragment>
124
+ <SearchListControl
125
+ className="woocommerce-product-tags"
126
+ list={ list }
127
+ isLoading={ loading }
128
+ selected={ selected.map( ( id ) => find( list, { id } ) ).filter( Boolean ) }
129
+ onChange={ onChange }
130
+ onSearch={ limitTags ? this.debouncedOnSearch : null }
131
+ renderItem={ this.renderItem }
132
+ messages={ messages }
133
+ isHierarchical
134
+ />
135
+ { ( !! onOperatorChange ) && (
136
+ <div className={ selected.length < 2 ? 'screen-reader-text' : '' }>
137
+ <SelectControl
138
+ className="woocommerce-product-tags__operator"
139
+ label={ __( 'Display products matching', 'woo-gutenberg-products-block' ) }
140
+ help={ __( 'Pick at least two tags to use this setting.', 'woo-gutenberg-products-block' ) }
141
+ value={ operator }
142
+ onChange={ onOperatorChange }
143
+ options={ [
144
+ {
145
+ label: __( 'Any selected tags', 'woo-gutenberg-products-block' ),
146
+ value: 'any',
147
+ },
148
+ {
149
+ label: __( 'All selected tags', 'woo-gutenberg-products-block' ),
150
+ value: 'all',
151
+ },
152
+ ] }
153
+ />
154
+ </div>
155
+ ) }
156
+ </Fragment>
157
+ );
158
+ }
159
+ }
160
+
161
+ ProductTagControl.propTypes = {
162
+ /**
163
+ * Callback to update the selected product categories.
164
+ */
165
+ onChange: PropTypes.func.isRequired,
166
+ /**
167
+ * Callback to update the category operator. If not passed in, setting is not used.
168
+ */
169
+ onOperatorChange: PropTypes.func,
170
+ /**
171
+ * Setting for whether products should match all or any selected categories.
172
+ */
173
+ operator: PropTypes.oneOf( [ 'all', 'any' ] ),
174
+ /**
175
+ * The list of currently selected tags.
176
+ */
177
+ selected: PropTypes.array.isRequired,
178
+ };
179
+
180
+ ProductTagControl.defaultProps = {
181
+ operator: 'any',
182
+ };
183
+
184
+ export default ProductTagControl;
assets/js/components/product-tag-control/style.scss ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .woocommerce-product-tags__operator {
2
+ .components-base-control__help {
3
+ @include visually-hidden;
4
+ }
5
+ }
6
+
7
+ .components-panel {
8
+ .woocommerce-product-tags__operator.components-base-control {
9
+ margin-top: $gap;
10
+
11
+ .components-select-control__input {
12
+ margin-left: 0;
13
+ min-width: 100%;
14
+ }
15
+ }
16
+ }
assets/js/components/toggle-button-control/index.js ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import { isFunction } from 'lodash';
5
+ import classnames from 'classnames';
6
+ import { BaseControl, ButtonGroup, Button } from '@wordpress/components';
7
+
8
+ /**
9
+ * WordPress dependencies
10
+ */
11
+ import { Component } from '@wordpress/element';
12
+ import { withInstanceId } from '@wordpress/compose';
13
+
14
+ /**
15
+ * Internal dependencies
16
+ */
17
+ import './style.scss';
18
+
19
+ class ToggleButtonControl extends Component {
20
+ constructor() {
21
+ super( ...arguments );
22
+
23
+ this.onClick = this.onClick.bind( this );
24
+ }
25
+
26
+ onClick( event ) {
27
+ if ( this.props.onChange ) {
28
+ this.props.onChange( event.target.value );
29
+ }
30
+ }
31
+
32
+ render() {
33
+ const { label, checked, instanceId, className, help, options, value } = this.props;
34
+ const id = `inspector-toggle-button-control-${ instanceId }`;
35
+
36
+ let helpLabel;
37
+
38
+ if ( help ) {
39
+ helpLabel = isFunction( help ) ? help( checked ) : help;
40
+ }
41
+
42
+ return (
43
+ <BaseControl
44
+ id={ id }
45
+ help={ helpLabel }
46
+ className={ classnames( 'components-toggle-button-control', className ) }
47
+ >
48
+ <label
49
+ id={ id + '__label' }
50
+ htmlFor={ id }
51
+ className="components-toggle-button-control__label"
52
+ >
53
+ { label }
54
+ </label>
55
+ <ButtonGroup
56
+ aria-labelledby={ id + '__label' }
57
+ >
58
+ { options.map( ( option, index ) => {
59
+ const buttonArgs = {};
60
+
61
+ // Change button depending on pressed state.
62
+ if ( value === option.value ) {
63
+ buttonArgs.isPrimary = true;
64
+ buttonArgs[ 'aria-pressed' ] = true;
65
+ } else {
66
+ buttonArgs.isDefault = true;
67
+ buttonArgs[ 'aria-pressed' ] = false;
68
+ }
69
+
70
+ return (
71
+ <Button
72
+ key={ `${ option.label }-${ option.value }-${ index }` }
73
+ value={ option.value }
74
+ onClick={ this.onClick }
75
+ aria-label={ label + ': ' + option.label }
76
+ { ...buttonArgs }
77
+ >
78
+ { option.label }
79
+ </Button>
80
+ );
81
+ } ) }
82
+ </ButtonGroup>
83
+ </BaseControl>
84
+ );
85
+ }
86
+ }
87
+
88
+ export default withInstanceId( ToggleButtonControl );
assets/js/components/toggle-button-control/screenshot.png ADDED
Binary file
assets/js/components/toggle-button-control/style.scss ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .components-toggle-button-control {
2
+ .components-base-control__field {
3
+ flex-wrap: wrap;
4
+ }
5
+ .components-toggle-button-control__label {
6
+ width: 100%;
7
+ margin-bottom: 8px;
8
+ display: block;
9
+ }
10
+ .components-base-control__help {
11
+ margin-top: 0;
12
+ }
13
+ }
assets/js/components/utils/index.js CHANGED
@@ -6,10 +6,12 @@ import apiFetch from '@wordpress/api-fetch';
6
  import { flatten, uniqBy } from 'lodash';
7
 
8
  export const isLargeCatalog = wc_product_block_data.isLargeCatalog || false;
 
 
9
 
10
  const getProductsRequests = ( { selected = [], search } ) => {
11
  const requests = [
12
- addQueryArgs( '/wc-blocks/v1/products', {
13
  per_page: isLargeCatalog ? 100 : -1,
14
  catalog_visibility: 'visible',
15
  status: 'publish',
@@ -20,7 +22,7 @@ const getProductsRequests = ( { selected = [], search } ) => {
20
  // If we have a large catalog, we might not get all selected products in the first page.
21
  if ( isLargeCatalog && selected.length ) {
22
  requests.push(
23
- addQueryArgs( '/wc-blocks/v1/products', {
24
  catalog_visibility: 'visible',
25
  status: 'publish',
26
  include: selected,
@@ -43,3 +45,38 @@ export const getProducts = ( { selected = [], search } ) => {
43
  return uniqBy( flatten( data ), 'id' );
44
  } );
45
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  import { flatten, uniqBy } from 'lodash';
7
 
8
  export const isLargeCatalog = wc_product_block_data.isLargeCatalog || false;
9
+ export const limitTags = wc_product_block_data.limitTags || false;
10
+ export const hasTags = wc_product_block_data.hasTags || false;
11
 
12
  const getProductsRequests = ( { selected = [], search } ) => {
13
  const requests = [
14
+ addQueryArgs( '/wc/blocks/products', {
15
  per_page: isLargeCatalog ? 100 : -1,
16
  catalog_visibility: 'visible',
17
  status: 'publish',
22
  // If we have a large catalog, we might not get all selected products in the first page.
23
  if ( isLargeCatalog && selected.length ) {
24
  requests.push(
25
+ addQueryArgs( '/wc/blocks/products', {
26
  catalog_visibility: 'visible',
27
  status: 'publish',
28
  include: selected,
45
  return uniqBy( flatten( data ), 'id' );
46
  } );
47
  };
48
+
49
+ const getProductTagsRequests = ( { selected = [], search } ) => {
50
+ const requests = [
51
+ addQueryArgs( '/wc/blocks/products/tags', {
52
+ per_page: limitTags ? 100 : -1,
53
+ orderby: limitTags ? 'count' : 'name',
54
+ order: limitTags ? 'desc' : 'asc',
55
+ search,
56
+ } ),
57
+ ];
58
+
59
+ // If we have a large catalog, we might not get all selected products in the first page.
60
+ if ( limitTags && selected.length ) {
61
+ requests.push(
62
+ addQueryArgs( '/wc/blocks/products/tags', {
63
+ include: selected,
64
+ } )
65
+ );
66
+ }
67
+
68
+ return requests;
69
+ };
70
+
71
+ /**
72
+ * Get a promise that resolves to a list of tags from the API.
73
+ *
74
+ * @param {object} - A query object with the list of selected products and search term.
75
+ */
76
+ export const getProductTags = ( { selected = [], search } ) => {
77
+ const requests = getProductTagsRequests( { selected, search } );
78
+
79
+ return Promise.all( requests.map( ( path ) => apiFetch( { path } ) ) ).then( ( data ) => {
80
+ return uniqBy( flatten( data ), 'id' );
81
+ } );
82
+ };
assets/js/utils/get-query.js CHANGED
@@ -9,6 +9,8 @@ export default function getQuery( blockAttributes, name ) {
9
  attrOperator,
10
  categories,
11
  catOperator,
 
 
12
  orderby,
13
  products,
14
  } = blockAttributes;
@@ -29,6 +31,13 @@ export default function getQuery( blockAttributes, name ) {
29
  }
30
  }
31
 
 
 
 
 
 
 
 
32
  if ( orderby ) {
33
  if ( 'price_desc' === orderby ) {
34
  query.orderby = 'price';
9
  attrOperator,
10
  categories,
11
  catOperator,
12
+ tags,
13
+ tagOperator,
14
  orderby,
15
  products,
16
  } = blockAttributes;
31
  }
32
  }
33
 
34
+ if ( tags && tags.length > 0 ) {
35
+ query.tag = tags.join( ',' );
36
+ if ( tagOperator && 'all' === tagOperator ) {
37
+ query.tag_operator = 'and';
38
+ }
39
+ }
40
+
41
  if ( orderby ) {
42
  if ( 'price_desc' === orderby ) {
43
  query.orderby = 'price';
assets/js/utils/shared-attributes.js CHANGED
@@ -24,6 +24,14 @@ export default {
24
  default: wc_product_block_data.default_rows,
25
  },
26
 
 
 
 
 
 
 
 
 
27
  /**
28
  * Product category, used to display only products in the given categories.
29
  */
24
  default: wc_product_block_data.default_rows,
25
  },
26
 
27
+ /**
28
+ * How to align cart buttons.
29
+ */
30
+ alignButtons: {
31
+ type: 'boolean',
32
+ default: false,
33
+ },
34
+
35
  /**
36
  * Product category, used to display only products in the given categories.
37
  */
assets/js/utils/with-component-id.js ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Component } from 'react';
2
+
3
+ const ids = [];
4
+
5
+ /**
6
+ * HOC that gives a component a unique ID.
7
+ *
8
+ * This is an alternative for withInstanceId from @wordpress/compose to avoid using that dependency on the frontend.
9
+ */
10
+ const withComponentId = ( OriginalComponent ) => {
11
+ return class WrappedComponent extends Component {
12
+ generateUniqueID() {
13
+ const group = WrappedComponent.name;
14
+
15
+ if ( ! ids[ group ] ) {
16
+ ids[ group ] = 0;
17
+ }
18
+
19
+ ids[ group ]++;
20
+
21
+ return ids[ group ];
22
+ }
23
+
24
+ render() {
25
+ const componentId = this.generateUniqueID();
26
+
27
+ return <OriginalComponent
28
+ { ...this.props }
29
+ componentId={ componentId }
30
+ />;
31
+ }
32
+ };
33
+ };
34
+
35
+ export default withComponentId;
assets/php/class-wgpb-block-handpicked-products.php DELETED
@@ -1,35 +0,0 @@
1
- <?php
2
- /**
3
- * Display the Hand-picked Products block in the post content.
4
- * NOTE: DO NOT edit this file in WooCommerce core, this is generated from woocommerce-gutenberg-products-block.
5
- *
6
- * @package WooCommerce\Blocks
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Handler for getting Hand-picked Products for display.
15
- */
16
- class WGPB_Block_Handpicked_Products extends WGPB_Block_Grid_Base {
17
- /**
18
- * Block name.
19
- *
20
- * @var string
21
- */
22
- protected $block_name = 'handpicked-products';
23
-
24
- /**
25
- * Set args specific to this block
26
- *
27
- * @param array $query_args Query args.
28
- */
29
- protected function set_block_query_args( &$query_args ) {
30
- $ids = array_map( 'absint', $this->attributes['products'] );
31
-
32
- $query_args['post__in'] = $ids;
33
- $query_args['posts_per_page'] = count( $ids );
34
- }
35
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/php/class-wgpb-block-library.php DELETED
@@ -1,600 +0,0 @@
1
- <?php
2
- /**
3
- * Register the scripts, styles, and blocks needed for the block editor.
4
- * NOTE: DO NOT edit this file in WooCommerce core, this is generated from woocommerce-gutenberg-products-block.
5
- *
6
- * @package WooCommerce\Blocks
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * WGPB_Block_Library Class.
15
- */
16
- class WGPB_Block_Library {
17
-
18
- /**
19
- * Class instance.
20
- *
21
- * @var WGPB_Block_Library instance
22
- */
23
- protected static $instance = null;
24
-
25
- /**
26
- * Get class instance
27
- */
28
- public static function get_instance() {
29
- if ( ! self::$instance ) {
30
- self::$instance = new self();
31
- }
32
- return self::$instance;
33
- }
34
-
35
- /**
36
- * Constructor.
37
- */
38
- public function __construct() {
39
- if ( function_exists( 'register_block_type' ) ) {
40
- add_action( 'init', array( 'WGPB_Block_Library', 'init' ) );
41
- }
42
- }
43
-
44
- /**
45
- * Initialize block library features.
46
- */
47
- public static function init() {
48
- // Shortcut out if we see the feature plugin, v1.4 or below.
49
- // note: `FP_VERSION` is transformed to `WGPB_VERSION` in the grunt copy task.
50
- if ( defined( 'FP_VERSION' ) && version_compare( FP_VERSION, '1.4.0', '<=' ) ) {
51
- return;
52
- }
53
- self::register_blocks();
54
- self::register_assets();
55
- add_action( 'admin_print_footer_scripts', array( 'WGPB_Block_Library', 'print_script_wc_settings' ), 1 );
56
- add_action( 'admin_print_footer_scripts', array( 'WGPB_Block_Library', 'print_script_block_data' ), 1 );
57
- add_action( 'wp_print_footer_scripts', array( 'WGPB_Block_Library', 'print_script_block_data' ), 1 );
58
- add_action( 'body_class', array( 'WGPB_Block_Library', 'add_theme_body_class' ), 1 );
59
- }
60
-
61
- /**
62
- * Get the file modified time as a cache buster if we're in dev mode.
63
- *
64
- * @param string $file Local path to the file.
65
- * @return string The cache buster value to use for the given file.
66
- */
67
- protected static function get_file_version( $file ) {
68
- if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) {
69
- $file = trim( $file, '/' );
70
- return filemtime( WGPB_ABSPATH . $file );
71
- }
72
- return WGPB_VERSION;
73
- }
74
-
75
- /**
76
- * Registers a script according to `wp_register_script`, additionally loading the translations for the file.
77
- *
78
- * @since 2.0.0
79
- *
80
- * @param string $handle Name of the script. Should be unique.
81
- * @param string $src Full URL of the script, or path of the script relative to the WordPress root directory.
82
- * @param array $deps Optional. An array of extra registered script handles this script depends on. Default empty array.
83
- * @param bool $has_i18n Optional. Whether to add a script translation call to this file. Default 'true'.
84
- */
85
- protected static function register_script( $handle, $src, $deps = array(), $has_i18n = true ) {
86
- $filename = str_replace( plugins_url( '/', WGPB_PLUGIN_FILE ), '', $src );
87
- $ver = self::get_file_version( $filename );
88
- $deps_path = WGPB_ABSPATH . str_replace( '.js', '.deps.json', $filename );
89
- $dependencies = file_exists( $deps_path ) ? json_decode( file_get_contents( $deps_path ) ) : array(); // phpcs:ignore WordPress.WP.AlternativeFunctions
90
- $dependencies = array_merge( $dependencies, $deps );
91
-
92
- wp_register_script( $handle, $src, $dependencies, $ver, true );
93
- if ( $has_i18n && function_exists( 'wp_set_script_translations' ) ) {
94
- wp_set_script_translations( $handle, 'woo-gutenberg-products-block', WGPB_ABSPATH . 'languages' );
95
- }
96
- }
97
-
98
- /**
99
- * Registers a style according to `wp_register_style`.
100
- *
101
- * @since 2.0.0
102
- *
103
- * @param string $handle Name of the stylesheet. Should be unique.
104
- * @param string $src Full URL of the stylesheet, or path of the stylesheet relative to the WordPress root directory.
105
- * @param array $deps Optional. An array of registered stylesheet handles this stylesheet depends on. Default empty array.
106
- * @param string $media Optional. The media for which this stylesheet has been defined. Default 'all'. Accepts media types like
107
- * 'all', 'print' and 'screen', or media queries like '(orientation: portrait)' and '(max-width: 640px)'.
108
- */
109
- protected static function register_style( $handle, $src, $deps = array(), $media = 'all' ) {
110
- $filename = str_replace( plugins_url( '/', WGPB_PLUGIN_FILE ), '', $src );
111
- $ver = self::get_file_version( $filename );
112
- wp_register_style( $handle, $src, $deps, $ver, $media );
113
- }
114
-
115
- /**
116
- * Register block scripts & styles.
117
- *
118
- * @since 2.0.0
119
- */
120
- public static function register_assets() {
121
- self::register_style( 'wc-block-editor', plugins_url( 'build/editor.css', WGPB_PLUGIN_FILE ), array( 'wp-edit-blocks' ) );
122
- self::register_style( 'wc-block-style', plugins_url( 'build/style.css', WGPB_PLUGIN_FILE ), array( 'wp-components' ) );
123
-
124
- // Shared libraries and components across all blocks.
125
- self::register_script( 'wc-blocks', plugins_url( 'build/blocks.js', WGPB_PLUGIN_FILE ), array(), false );
126
- self::register_script( 'wc-vendors', plugins_url( 'build/vendors.js', WGPB_PLUGIN_FILE ), array(), false );
127
- self::register_script( 'wc-packages', plugins_url( 'build/packages.js', WGPB_PLUGIN_FILE ), array(), false );
128
- self::register_script( 'wc-frontend', plugins_url( 'build/frontend.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors' ) );
129
-
130
- // Individual blocks.
131
- self::register_script( 'wc-handpicked-products', plugins_url( 'build/handpicked-products.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
132
- self::register_script( 'wc-product-best-sellers', plugins_url( 'build/product-best-sellers.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
133
- self::register_script( 'wc-product-category', plugins_url( 'build/product-category.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
134
- self::register_script( 'wc-product-new', plugins_url( 'build/product-new.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
135
- self::register_script( 'wc-product-on-sale', plugins_url( 'build/product-on-sale.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
136
- self::register_script( 'wc-product-top-rated', plugins_url( 'build/product-top-rated.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
137
- self::register_script( 'wc-products-attribute', plugins_url( 'build/products-attribute.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
138
- self::register_script( 'wc-featured-product', plugins_url( 'build/featured-product.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
139
- self::register_script( 'wc-product-categories', plugins_url( 'build/product-categories.js', WGPB_PLUGIN_FILE ), array( 'wc-vendors', 'wc-packages', 'wc-blocks' ) );
140
- }
141
-
142
- /**
143
- * These are used by @woocommerce/components & the block library to set up defaults
144
- * based on user-controlled settings from WordPress. Only use this in wp-admin.
145
- */
146
- public static function print_script_wc_settings() {
147
- global $wp_locale;
148
- $code = get_woocommerce_currency();
149
-
150
- // NOTE: wcSettings is not used directly, it's only for @woocommerce/components
151
- //
152
- // Settings and variables can be passed here for access in the app.
153
- // Will need `wcAdminAssetUrl` if the ImageAsset component is used.
154
- // Will need `dataEndpoints.countries` if Search component is used with 'country' type.
155
- // Will need `orderStatuses` if the OrderStatus component is used.
156
- // Deliberately excluding: `embedBreadcrumbs`, `trackingEnabled`.
157
- $settings = array(
158
- 'adminUrl' => admin_url(),
159
- 'wcAssetUrl' => plugins_url( 'assets/', WC_PLUGIN_FILE ),
160
- 'siteLocale' => esc_attr( get_bloginfo( 'language' ) ),
161
- 'currency' => array(
162
- 'code' => $code,
163
- 'precision' => wc_get_price_decimals(),
164
- 'symbol' => get_woocommerce_currency_symbol( $code ),
165
- 'position' => get_option( 'woocommerce_currency_pos' ),
166
- ),
167
- 'stockStatuses' => wc_get_product_stock_status_options(),
168
- 'siteTitle' => get_bloginfo( 'name' ),
169
- 'dataEndpoints' => array(),
170
- 'l10n' => array(
171
- 'userLocale' => get_user_locale(),
172
- 'weekdaysShort' => array_values( $wp_locale->weekday_abbrev ),
173
- ),
174
- );
175
- // NOTE: wcSettings is not used directly, it's only for @woocommerce/components.
176
- $settings = apply_filters( 'woocommerce_components_settings', $settings );
177
- ?>
178
- <script type="text/javascript">
179
- var wcSettings = wcSettings || JSON.parse( decodeURIComponent( '<?php echo rawurlencode( wp_json_encode( $settings ) ); ?>' ) );
180
- </script>
181
- <?php
182
- }
183
-
184
- /**
185
- * Output block-related data on a global object.
186
- *
187
- * This is used to map site settings & data into JS-accessible variables.
188
- *
189
- * @since 2.0.0
190
- */
191
- public static function print_script_block_data() {
192
- $product_counts = wp_count_posts( 'product' );
193
- $product_categories = get_terms(
194
- 'product_cat',
195
- array(
196
- 'hide_empty' => false,
197
- 'pad_counts' => true,
198
- )
199
- );
200
- foreach ( $product_categories as &$category ) {
201
- $category->link = get_term_link( $category->term_id, 'product_cat' );
202
- }
203
-
204
- // Global settings used in each block.
205
- $block_settings = array(
206
- 'min_columns' => wc_get_theme_support( 'product_blocks::min_columns', 1 ),
207
- 'max_columns' => wc_get_theme_support( 'product_blocks::max_columns', 6 ),
208
- 'default_columns' => wc_get_theme_support( 'product_blocks::default_columns', 3 ),
209
- 'min_rows' => wc_get_theme_support( 'product_blocks::min_rows', 1 ),
210
- 'max_rows' => wc_get_theme_support( 'product_blocks::max_rows', 6 ),
211
- 'default_rows' => wc_get_theme_support( 'product_blocks::default_rows', 1 ),
212
- 'thumbnail_size' => wc_get_theme_support( 'thumbnail_image_width', 300 ),
213
- 'placeholderImgSrc' => wc_placeholder_img_src(),
214
- 'min_height' => wc_get_theme_support( 'featured_block::min_height', 500 ),
215
- 'default_height' => wc_get_theme_support( 'featured_block::default_height', 500 ),
216
- 'isLargeCatalog' => $product_counts->publish > 200,
217
- 'productCategories' => $product_categories,
218
- 'homeUrl' => esc_js( home_url( '/' ) ),
219
- );
220
- ?>
221
- <script type="text/javascript">
222
- var wc_product_block_data = JSON.parse( decodeURIComponent( '<?php echo rawurlencode( wp_json_encode( $block_settings ) ); ?>' ) );
223
- </script>
224
- <?php
225
- }
226
-
227
- /**
228
- * Register blocks, hooking up assets and render functions as needed.
229
- *
230
- * @since 2.0.0
231
- */
232
- public static function register_blocks() {
233
- require_once dirname( __FILE__ ) . '/class-wgpb-block-grid-base.php';
234
- require_once dirname( __FILE__ ) . '/class-wgpb-block-featured-product.php';
235
-
236
- register_block_type(
237
- 'woocommerce/handpicked-products',
238
- array(
239
- 'render_callback' => array( __CLASS__, 'render_handpicked_products' ),
240
- 'editor_script' => 'wc-handpicked-products',
241
- 'editor_style' => 'wc-block-editor',
242
- 'style' => 'wc-block-style',
243
- 'attributes' => array(
244
- 'align' => self::get_schema_align(),
245
- 'className' => self::get_schema_string(),
246
- 'columns' => self::get_schema_number( wc_get_theme_support( 'product_blocks::default_columns', 3 ) ),
247
- 'editMode' => self::get_schema_boolean( true ),
248
- 'orderby' => self::get_schema_orderby(),
249
- 'products' => self::get_schema_list_ids(),
250
- 'contentVisibility' => self::get_schema_content_visibility(),
251
- ),
252
- )
253
- );
254
- register_block_type(
255
- 'woocommerce/product-best-sellers',
256
- array(
257
- 'render_callback' => array( __CLASS__, 'render_product_best_sellers' ),
258
- 'editor_script' => 'wc-product-best-sellers',
259
- 'editor_style' => 'wc-block-editor',
260
- 'style' => 'wc-block-style',
261
- 'attributes' => self::get_shared_attributes(),
262
- )
263
- );
264
- register_block_type(
265
- 'woocommerce/product-category',
266
- array(
267
- 'render_callback' => array( __CLASS__, 'render_product_category' ),
268
- 'editor_script' => 'wc-product-category',
269
- 'editor_style' => 'wc-block-editor',
270
- 'style' => 'wc-block-style',
271
- 'attributes' => array_merge(
272
- self::get_shared_attributes(),
273
- array(
274
- 'className' => self::get_schema_string(),
275
- 'orderby' => self::get_schema_orderby(),
276
- 'editMode' => self::get_schema_boolean( true ),
277
- )
278
- ),
279
- )
280
- );
281
- register_block_type(
282
- 'woocommerce/product-new',
283
- array(
284
- 'render_callback' => array( __CLASS__, 'render_product_new' ),
285
- 'editor_script' => 'wc-product-new',
286
- 'editor_style' => 'wc-block-editor',
287
- 'style' => 'wc-block-style',
288
- 'attributes' => self::get_shared_attributes(),
289
- )
290
- );
291
- register_block_type(
292
- 'woocommerce/product-on-sale',
293
- array(
294
- 'render_callback' => array( __CLASS__, 'render_product_on_sale' ),
295
- 'editor_script' => 'wc-product-on-sale',
296
- 'editor_style' => 'wc-block-editor',
297
- 'style' => 'wc-block-style',
298
- 'attributes' => array_merge(
299
- self::get_shared_attributes(),
300
- array(
301
- 'className' => self::get_schema_string(),
302
- 'orderby' => self::get_schema_orderby(),
303
- )
304
- ),
305
- )
306
- );
307
- register_block_type(
308
- 'woocommerce/product-top-rated',
309
- array(
310
- 'render_callback' => array( __CLASS__, 'render_product_top_rated' ),
311
- 'editor_script' => 'wc-product-top-rated',
312
- 'editor_style' => 'wc-block-editor',
313
- 'style' => 'wc-block-style',
314
- 'attributes' => self::get_shared_attributes(),
315
- )
316
- );
317
- register_block_type(
318
- 'woocommerce/products-by-attribute',
319
- array(
320
- 'render_callback' => array( __CLASS__, 'render_products_by_attribute' ),
321
- 'editor_script' => 'wc-products-attribute',
322
- 'editor_style' => 'wc-block-editor',
323
- 'style' => 'wc-block-style',
324
- 'attributes' => array(
325
- 'align' => self::get_schema_align(),
326
- 'attributes' => array(
327
- 'type' => 'array',
328
- 'items' => array(
329
- 'type' => 'object',
330
- 'properties' => array(
331
- 'id' => array(
332
- 'type' => 'number',
333
- ),
334
- 'attr_slug' => array(
335
- 'type' => 'string',
336
- ),
337
- ),
338
- ),
339
- 'default' => array(),
340
- ),
341
- 'attrOperator' => array(
342
- 'type' => 'string',
343
- 'default' => 'any',
344
- ),
345
- 'className' => self::get_schema_string(),
346
- 'columns' => self::get_schema_number( wc_get_theme_support( 'product_blocks::default_columns', 3 ) ),
347
- 'contentVisibility' => self::get_schema_content_visibility(),
348
- 'editMode' => self::get_schema_boolean( true ),
349
- 'orderby' => self::get_schema_orderby(),
350
- 'rows' => self::get_schema_number( wc_get_theme_support( 'product_blocks::default_rows', 1 ) ),
351
- ),
352
- )
353
- );
354
- register_block_type(
355
- 'woocommerce/featured-product',
356
- array(
357
- 'render_callback' => array( 'WGPB_Block_Featured_Product', 'render' ),
358
- 'editor_script' => 'wc-featured-product',
359
- 'editor_style' => 'wc-block-editor',
360
- 'style' => 'wc-block-style',
361
- )
362
- );
363
- register_block_type(
364
- 'woocommerce/product-categories',
365
- array(
366
- 'editor_script' => 'wc-product-categories',
367
- 'editor_style' => 'wc-block-editor',
368
- 'style' => 'wc-block-style',
369
- 'script' => 'wc-frontend',
370
- )
371
- );
372
- }
373
-
374
- /**
375
- * Get the schema for the contentVisibility attribute
376
- *
377
- * @return array List of block attributes with type and defaults.
378
- */
379
- protected static function get_schema_content_visibility() {
380
- return array(
381
- 'type' => 'object',
382
- 'properties' => array(
383
- 'title' => self::get_schema_boolean( true ),
384
- 'price' => self::get_schema_boolean( true ),
385
- 'rating' => self::get_schema_boolean( true ),
386
- 'button' => self::get_schema_boolean( true ),
387
- ),
388
- );
389
- }
390
-
391
- /**
392
- * Get the schema for the orderby attribute.
393
- *
394
- * @return array Property definition of `orderby` attribute.
395
- */
396
- protected static function get_schema_orderby() {
397
- return array(
398
- 'type' => 'string',
399
- 'enum' => array( 'date', 'popularity', 'price_asc', 'price_desc', 'rating', 'title', 'menu_order' ),
400
- 'default' => 'date',
401
- );
402
- }
403
-
404
- /**
405
- * Get the schema for the alignment property.
406
- *
407
- * @return array Property definition for align.
408
- */
409
- protected static function get_schema_align() {
410
- return array(
411
- 'type' => 'string',
412
- 'enum' => array( 'left', 'center', 'right', 'wide', 'full' ),
413
- );
414
- }
415
-
416
- /**
417
- * Get the schema for a list of IDs.
418
- *
419
- * @return array Property definition for a list of numeric ids.
420
- */
421
- protected static function get_schema_list_ids() {
422
- return array(
423
- 'type' => 'array',
424
- 'items' => array(
425
- 'type' => 'number',
426
- ),
427
- 'default' => array(),
428
- );
429
- }
430
-
431
- /**
432
- * Get the schema for a boolean value.
433
- *
434
- * @param string $default The default value.
435
- * @return array Property definition.
436
- */
437
- protected static function get_schema_boolean( $default = true ) {
438
- return array(
439
- 'type' => 'boolean',
440
- 'default' => $default,
441
- );
442
- }
443
-
444
- /**
445
- * Get the schema for a numeric value.
446
- *
447
- * @param string $default The default value.
448
- * @return array Property definition.
449
- */
450
- protected static function get_schema_number( $default ) {
451
- return array(
452
- 'type' => 'number',
453
- 'default' => $default,
454
- );
455
- }
456
-
457
- /**
458
- * Get the schema for a string value.
459
- *
460
- * @param string $default The default value.
461
- * @return array Property definition.
462
- */
463
- protected static function get_schema_string( $default = '' ) {
464
- return array(
465
- 'type' => 'string',
466
- 'default' => $default,
467
- );
468
- }
469
-
470
- /**
471
- * Get a set of attributes shared across most of the grid blocks.
472
- *
473
- * @return array List of block attributes with type and defaults.
474
- */
475
- protected static function get_shared_attributes() {
476
- return array(
477
- 'className' => self::get_schema_string(),
478
- 'columns' => self::get_schema_number( wc_get_theme_support( 'product_blocks::default_columns', 3 ) ),
479
- 'rows' => self::get_schema_number( wc_get_theme_support( 'product_blocks::default_rows', 1 ) ),
480
- 'categories' => self::get_schema_list_ids(),
481
- 'catOperator' => array(
482
- 'type' => 'string',
483
- 'default' => 'any',
484
- ),
485
- 'contentVisibility' => self::get_schema_content_visibility(),
486
- 'align' => self::get_schema_align(),
487
- );
488
- }
489
-
490
- /**
491
- * New products: Include and render the dynamic block.
492
- *
493
- * @param array $attributes Block attributes. Default empty array.
494
- * @param string $content Block content. Default empty string.
495
- * @return string Rendered block type output.
496
- */
497
- public static function render_product_new( $attributes, $content ) {
498
- require_once dirname( __FILE__ ) . '/class-wgpb-block-product-new.php';
499
-
500
- $block = new WGPB_Block_Product_New( $attributes, $content );
501
- return $block->render();
502
- }
503
-
504
- /**
505
- * Sale products: Include and render the dynamic block.
506
- *
507
- * @param array $attributes Block attributes. Default empty array.
508
- * @param string $content Block content. Default empty string.
509
- * @return string Rendered block type output.
510
- */
511
- public static function render_product_on_sale( $attributes, $content ) {
512
- require_once dirname( __FILE__ ) . '/class-wgpb-block-product-on-sale.php';
513
-
514
- $block = new WGPB_Block_Product_On_Sale( $attributes, $content );
515
- return $block->render();
516
- }
517
-
518
- /**
519
- * Products by category: Include and render the dynamic block.
520
- *
521
- * @param array $attributes Block attributes. Default empty array.
522
- * @param string $content Block content. Default empty string.
523
- * @return string Rendered block type output.
524
- */
525
- public static function render_product_category( $attributes, $content ) {
526
- require_once dirname( __FILE__ ) . '/class-wgpb-block-product-category.php';
527
-
528
- $block = new WGPB_Block_Product_Category( $attributes, $content );
529
- return $block->render();
530
- }
531
-
532
- /**
533
- * Products by attribute: Include and render the dynamic block.
534
- *
535
- * @param array $attributes Block attributes. Default empty array.
536
- * @param string $content Block content. Default empty string.
537
- * @return string Rendered block type output.
538
- */
539
- public static function render_products_by_attribute( $attributes, $content ) {
540
- require_once dirname( __FILE__ ) . '/class-wgpb-block-products-by-attribute.php';
541
-
542
- $block = new WGPB_Block_Products_By_Attribute( $attributes, $content );
543
- return $block->render();
544
- }
545
-
546
- /**
547
- * Top rated products: Include and render the dynamic block.
548
- *
549
- * @param array $attributes Block attributes. Default empty array.
550
- * @param string $content Block content. Default empty string.
551
- * @return string Rendered block type output.
552
- */
553
- public static function render_product_top_rated( $attributes, $content ) {
554
- require_once dirname( __FILE__ ) . '/class-wgpb-block-product-top-rated.php';
555
-
556
- $block = new WGPB_Block_Product_Top_Rated( $attributes, $content );
557
- return $block->render();
558
- }
559
-
560
- /**
561
- * Best Selling Products: Include and render the dynamic block.
562
- *
563
- * @param array $attributes Block attributes. Default empty array.
564
- * @param string $content Block content. Default empty string.
565
- * @return string Rendered block type output.
566
- */
567
- public static function render_product_best_sellers( $attributes, $content ) {
568
- require_once dirname( __FILE__ ) . '/class-wgpb-block-product-best-sellers.php';
569
-
570
- $block = new WGPB_Block_Product_Best_Sellers( $attributes, $content );
571
- return $block->render();
572
- }
573
-
574
- /**
575
- * Hand-picked Products: Include and render the dynamic block.
576
- *
577
- * @param array $attributes Block attributes. Default empty array.
578
- * @param string $content Block content. Default empty string.
579
- * @return string Rendered block type output.
580
- */
581
- public static function render_handpicked_products( $attributes, $content ) {
582
- require_once dirname( __FILE__ ) . '/class-wgpb-block-handpicked-products.php';
583
-
584
- $block = new WGPB_Block_Handpicked_Products( $attributes, $content );
585
- return $block->render();
586
- }
587
-
588
- /**
589
- * Add body classes.
590
- *
591
- * @param array $classes Array of CSS classnames.
592
- * @return array Modified array of CSS classnames.
593
- */
594
- public static function add_theme_body_class( $classes = array() ) {
595
- $classes[] = 'theme-' . get_template();
596
- return $classes;
597
- }
598
- }
599
-
600
- WGPB_Block_Library::get_instance();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/php/class-wgpb-block-product-best-sellers.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- /**
3
- * Display the Best Selling Products block in the post content.
4
- * NOTE: DO NOT edit this file in WooCommerce core, this is generated from woocommerce-gutenberg-products-block.
5
- *
6
- * @package WooCommerce\Blocks
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Handler for getting best selling products for display.
15
- */
16
- class WGPB_Block_Product_Best_Sellers extends WGPB_Block_Grid_Base {
17
- /**
18
- * Block name.
19
- *
20
- * @var string
21
- */
22
- protected $block_name = 'product-best-sellers';
23
-
24
- /**
25
- * Get the block's attributes.
26
- *
27
- * @param array $attributes Block attributes. Default empty array.
28
- * @return array Block attributes merged with defaults.
29
- */
30
- protected function parse_attributes( $attributes ) {
31
- $attributes = parent::parse_attributes( $attributes );
32
-
33
- // Force orderby to popularity.
34
- $attributes['orderby'] = 'popularity';
35
-
36
- return $attributes;
37
- }
38
-
39
- /**
40
- * Set args specific to this block
41
- *
42
- * @param array $query_args Query args.
43
- */
44
- protected function set_block_query_args( &$query_args ) {}
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/php/class-wgpb-block-product-category.php DELETED
@@ -1,30 +0,0 @@
1
- <?php
2
- /**
3
- * Display the Products by Category block in the post content.
4
- * NOTE: DO NOT edit this file in WooCommerce core, this is generated from woocommerce-gutenberg-products-block.
5
- *
6
- * @package WooCommerce\Blocks
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Handler for getting Products by Category for display.
15
- */
16
- class WGPB_Block_Product_Category extends WGPB_Block_Grid_Base {
17
- /**
18
- * Block name.
19
- *
20
- * @var string
21
- */
22
- protected $block_name = 'product-category';
23
-
24
- /**
25
- * This function is not necessary in this block.
26
- *
27
- * @param array $query_args Query args.
28
- */
29
- protected function set_block_query_args( &$query_args ) {}
30
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/php/class-wgpb-block-product-new.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- /**
3
- * Display the Newest Products block in the post content.
4
- * NOTE: DO NOT edit this file in WooCommerce core, this is generated from woocommerce-gutenberg-products-block.
5
- *
6
- * @package WooCommerce\Blocks
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Handler for getting newest products for display.
15
- */
16
- class WGPB_Block_Product_New extends WGPB_Block_Grid_Base {
17
- /**
18
- * Block name.
19
- *
20
- * @var string
21
- */
22
- protected $block_name = 'product-new';
23
-
24
- /**
25
- * Get the block's attributes.
26
- *
27
- * @param array $attributes Block attributes. Default empty array.
28
- * @return array Block attributes merged with defaults.
29
- */
30
- protected function parse_attributes( $attributes ) {
31
- $attributes = parent::parse_attributes( $attributes );
32
-
33
- // Force orderby to date.
34
- $attributes['orderby'] = 'date';
35
-
36
- return $attributes;
37
- }
38
-
39
- /**
40
- * Set args specific to this block
41
- *
42
- * @param array $query_args Query args.
43
- */
44
- protected function set_block_query_args( &$query_args ) {}
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/php/class-wgpb-block-product-on-sale.php DELETED
@@ -1,32 +0,0 @@
1
- <?php
2
- /**
3
- * Display the On Sale Products block in the post content.
4
- * NOTE: DO NOT edit this file in WooCommerce core, this is generated from woocommerce-gutenberg-products-block.
5
- *
6
- * @package WooCommerce\Blocks
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Handler for getting on sale products for display.
15
- */
16
- class WGPB_Block_Product_On_Sale extends WGPB_Block_Grid_Base {
17
- /**
18
- * Block name.
19
- *
20
- * @var string
21
- */
22
- protected $block_name = 'product-on-sale';
23
-
24
- /**
25
- * Set args specific to this block
26
- *
27
- * @param array $query_args Query args.
28
- */
29
- protected function set_block_query_args( &$query_args ) {
30
- $query_args['post__in'] = array_merge( array( 0 ), wc_get_product_ids_on_sale() );
31
- }
32
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/php/class-wgpb-block-product-top-rated.php DELETED
@@ -1,45 +0,0 @@
1
- <?php
2
- /**
3
- * Display the Top Rated Products block in the post content.
4
- * NOTE: DO NOT edit this file in WooCommerce core, this is generated from woocommerce-gutenberg-products-block.
5
- *
6
- * @package WooCommerce\Blocks
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Handler for getting top-rated products for display.
15
- */
16
- class WGPB_Block_Product_Top_Rated extends WGPB_Block_Grid_Base {
17
- /**
18
- * Block name.
19
- *
20
- * @var string
21
- */
22
- protected $block_name = 'product-top-rated';
23
-
24
- /**
25
- * Get the block's attributes.
26
- *
27
- * @param array $attributes Block attributes. Default empty array.
28
- * @return array Block attributes merged with defaults.
29
- */
30
- protected function parse_attributes( $attributes ) {
31
- $attributes = parent::parse_attributes( $attributes );
32
-
33
- // Force orderby to rating.
34
- $attributes['orderby'] = 'rating';
35
-
36
- return $attributes;
37
- }
38
-
39
- /**
40
- * Set args specific to this block
41
- *
42
- * @param array $query_args Query args.
43
- */
44
- protected function set_block_query_args( &$query_args ) {}
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/php/class-wgpb-block-products-by-attribute.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
- /**
3
- * Display the Products by Attribute block in the post content.
4
- * NOTE: DO NOT edit this file in WooCommerce core, this is generated from woocommerce-gutenberg-products-block.
5
- *
6
- * @package WooCommerce\Blocks
7
- */
8
-
9
- if ( ! defined( 'ABSPATH' ) ) {
10
- exit;
11
- }
12
-
13
- /**
14
- * Handler for getting products by attribute for display.
15
- */
16
- class WGPB_Block_Products_By_Attribute extends WGPB_Block_Grid_Base {
17
- /**
18
- * Block name.
19
- *
20
- * @var string
21
- */
22
- protected $block_name = 'products-by-attribute';
23
-
24
- /**
25
- * Set args specific to this block
26
- *
27
- * @param array $query_args Query args.
28
- */
29
- protected function set_block_query_args( &$query_args ) {
30
- if ( ! empty( $this->attributes['attributes'] ) ) {
31
- $taxonomy = sanitize_title( $this->attributes['attributes'][0]['attr_slug'] );
32
- $terms = wp_list_pluck( $this->attributes['attributes'], 'id' );
33
-
34
- $query_args['tax_query'][] = array(
35
- 'taxonomy' => $taxonomy,
36
- 'terms' => array_map( 'absint', $terms ),
37
- 'field' => 'term_id',
38
- 'operator' => 'all' === $this->attributes['attrOperator'] ? 'AND' : 'IN',
39
- );
40
- }
41
- }
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
build/blocks.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(e){function t(t){for(var c,i,l=t[0],a=t[1],s=t[2],f=0,h=[];f<l.length;f++)i=l[f],r[i]&&h.push(r[i][0]),r[i]=0;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);for(u&&u(t);h.length;)h.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var a=n[l];0!==r[a]&&(c=!1)}c&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var c={},r={4:0},o=[];function i(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=c,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)i.d(n,c,function(t){return e[t]}.bind(null,c));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=a;return o.push([295,1,2,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},295:function(e,t,n){"use strict";n.r(t);var c=n(77),r=n.n(c),o=n(0),i=n(27),l=n(1),a=(n(299),n(302),n(61));Object(i.setCategories)([].concat(r()(Object(i.getCategories)().filter(function(e){return"woocommerce"!==e.slug})),[{slug:"woocommerce",title:Object(l.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(o.createElement)(a.d,null)}]))},299:function(e,t,n){var c=n(300);"string"==typeof c&&(c=[[e.i,c,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(66)(c,r);c.locals&&(e.exports=c.locals)},3:function(e,t){!function(){e.exports=this.wp.components}()},300:function(e,t,n){},61:function(e,t,n){"use strict";var c=n(0),r=n(3),o=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},l=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},a=n(6),s=n.n(a),u=n(5),f=n.n(u),h=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:s()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};h.propTypes={size:f.a.number,className:f.a.string};var p=h;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return p})}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(e){function t(t){for(var c,i,l=t[0],a=t[1],s=t[2],h=0,f=[];h<l.length;h++)i=l[h],r[i]&&f.push(r[i][0]),r[i]=0;for(c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c]);for(u&&u(t);f.length;)f.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var a=n[l];0!==r[a]&&(c=!1)}c&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var c={},r={3:0},o=[];function i(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=c,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)i.d(n,c,function(t){return e[t]}.bind(null,c));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=a;return o.push([259,0,2,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},259:function(e,t,n){"use strict";n.r(t);var c=n(60),r=n.n(c),o=n(0),i=n(18),l=n(1),a=(n(263),n(266),n(28));Object(i.setCategories)([].concat(r()(Object(i.getCategories)().filter(function(e){return"woocommerce"!==e.slug})),[{slug:"woocommerce",title:Object(l.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(o.createElement)(a.g,null)}]))},263:function(e,t,n){var c=n(264);"string"==typeof c&&(c=[[e.i,c,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(38)(c,r);c.locals&&(e.exports=c.locals)},264:function(e,t,n){},28:function(e,t,n){"use strict";var c=n(0),r=n(3),o=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.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"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.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"}))})},u=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},h=n(6),f=n.n(h),m=n(4),p=n.n(m),v=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:f()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};v.propTypes={size:p.a.number,className:p.a.string};var w=v;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return w})},3:function(e,t){!function(){e.exports=this.wp.components}()}});
build/editor.css CHANGED
@@ -1,9 +1,14 @@
1
- @charset "UTF-8";@-webkit-keyframes slide-in-left{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-in-left{0%{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slide-out-left{0%{transform:translateX(-100%)}to{transform:translateX(-200%)}}@keyframes slide-out-left{0%{transform:translateX(-100%)}to{transform:translateX(-200%)}}@-webkit-keyframes slide-in-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@-webkit-keyframes slide-out-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-out-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}.woocommerce-slide-animation>div{width:100%;white-space:nowrap;overflow:hidden;display:flex}.woocommerce-slide-animation.animate-left .slide-enter-active{-webkit-animation:slide-in-left;animation:slide-in-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-left .slide-exit-active{-webkit-animation:slide-out-left;animation:slide-out-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-enter-active{-webkit-animation:slide-in-right;animation:slide-in-right;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-exit-active{-webkit-animation:slide-out-right;animation:slide-out-right;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (prefers-reduced-motion:reduce){.woocommerce-slide-animation .slide-enter-active,.woocommerce-slide-animation .slide-exit-active{-webkit-animation:none!important;animation:none!important}}.woocommerce-calendar{width:100%;background-color:#f8f9f9;border-top:1px solid #ccd0d4;height:396px}.woocommerce-calendar.is-mobile{height:100%}.woocommerce-calendar__react-dates{width:100%;overflow-x:hidden}.woocommerce-calendar__react-dates .DayPicker{margin:0 auto}.woocommerce-calendar__react-dates .CalendarMonth_table{margin-top:10px}.woocommerce-calendar__react-dates .CalendarDay__selected_span{background:#95588a;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__selected{background:#622557;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__hovered_span{background:#95588a;border:1px solid #e2e4e7;color:#fff}.woocommerce-calendar__react-dates .CalendarDay__blocked_out_of_range{color:#a2aab2}.woocommerce-calendar__react-dates .CalendarMonth,.woocommerce-calendar__react-dates .CalendarMonthGrid,.woocommerce-calendar__react-dates .DayPicker,.woocommerce-calendar__react-dates .DayPicker_transitionContainer{background-color:#f8f9f9}.woocommerce-calendar__react-dates .DayPicker_weekHeader_li{color:#606a73}.woocommerce-calendar__react-dates .DayPickerNavigation_button:focus{outline:2px solid #bfe7f3}.woocommerce-calendar__react-dates.is-core-datepicker .components-datetime__date{padding-left:0}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__default{background-color:transparent}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__selected{background:#622557;border:none}.woocommerce-calendar__inputs{padding:1em;width:100%;max-width:500px;display:-ms-grid;display:grid;-ms-grid-columns:43% 14% 43%;grid-template-columns:43% 14% 43%;margin:0 auto}.woocommerce-calendar__inputs .components-base-control{margin:0}.woocommerce-calendar__inputs-to{display:flex;align-items:center;justify-content:center;-ms-grid-column:2;grid-column-start:2}.woocommerce-calendar__input{position:relative}.woocommerce-calendar__input .dashicons-calendar{position:absolute;top:50%;transform:translateY(-50%);left:10px}.woocommerce-calendar__input .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input:first-child{-ms-grid-column:1;grid-column-start:1}.woocommerce-calendar__input:last-child{-ms-grid-column:3;grid-column-start:3}.woocommerce-calendar__input.is-empty .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input.is-error .dashicons-calendar path{fill:#d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text{border:1px solid #d94f4f;box-shadow:inset 0 0 8px #d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text:focus{box-shadow:inset 0 0 8px #d94f4f,0 0 6px rgba(30,140,190,.8)}.woocommerce-calendar__input .woocommerce-calendar__input-text{color:#555d66;border-radius:3px;padding:10px 10px 10px 30px;width:100%;font-size:13px;font-size:.8125rem}.woocommerce-calendar__input .woocommerce-calendar__input-text:-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-webkit-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-moz-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::placeholder{color:#6c7781}.woocommerce-filters-date__content.is-mobile .woocommerce-calendar__input-error .components-popover__content{height:auto}.woocommerce-calendar__input-error{display:none}.is-error .woocommerce-calendar__input-text:focus+span .woocommerce-calendar__input-error{display:block;left:50%!important;position:absolute;top:auto!important}.woocommerce-calendar__input-error .components-popover__content{background-color:#606a73;color:#fff;padding:.5em;border:none}.woocommerce-calendar__input-error.components-popover .components-popover__content{min-width:100px;width:100px;text-align:center}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-bottom:before{border-bottom-color:#606a73;z-index:1;top:-6px}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-top:after{border-top-color:#606a73;z-index:1;top:0}.woocommerce-calendar__date-picker-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-card{margin-bottom:24px;background:#fff;border:1px solid #ccd0d4}@media (max-width:782px){.woocommerce-card{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-card__header{padding:13px 16px;border-bottom:1px solid #ccd0d4;display:-ms-grid;display:grid;align-items:center}.has-action .woocommerce-card__header{-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr}.has-menu .woocommerce-card__header{-ms-grid-columns:auto 24px;grid-template-columns:auto 24px}.has-menu.has-action .woocommerce-card__header{grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-card__header-item{-ms-grid-row-align:center}.woocommerce-card__header-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__action,.woocommerce-card__menu{text-align:right}.woocommerce-card__body{padding:16px}.woocommerce-card__title{margin:0;padding:3px 0;font-size:15px;font-size:.9375rem;line-height:1.2;font-weight:600}.woocommerce-chart{margin-top:-16px;margin-bottom:24px;background:#fff;border:1px solid #ccd0d4;border-top:0}@media (max-width:782px){.woocommerce-chart{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-chart .woocommerce-chart__header{min-height:50px;border-bottom:1px solid #ccd0d4;display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;width:100%}.woocommerce-chart .woocommerce-chart__header .woocommerce-chart__title{height:18px;color:#24292d;font-size:15px;font-weight:600;line-height:18px;margin-left:16px;margin-right:16px}.woocommerce-chart .woocommerce-chart__body{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;width:100%}.woocommerce-chart .woocommerce-chart__body.woocommerce-chart__body-column{flex-direction:column}.woocommerce-chart .woocommerce-chart__footer{width:100%}.woocommerce-chart-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;padding:0;width:100%;display:flex;align-items:center;justify-content:center}.woocommerce-chart-placeholder:after{content:"\00a0"}.woocommerce-chart-placeholder .components-spinner{margin:0}.woocommerce-chart__interval-select{align-items:start;border-right:1px solid #ccd0d4;display:flex;flex-direction:column;justify-content:center;margin:0 0 0 auto;min-height:50px;padding:8px 16px 0}@media (max-width:960px){.woocommerce-chart__interval-select{width:100%;order:1;margin-top:-8px;margin-left:0;padding-left:8px;border-right:0;min-height:0}}#wpbody .woocommerce-chart__interval-select .components-select-control__input{font-size:13px;font-size:.8125rem;border:0;box-shadow:none}#wpbody .woocommerce-chart__interval-select .components-select-control__input:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-chart__types{padding:0 8px}.woocommerce-chart__type-button{background:transparent!important}.woocommerce-chart__type-button.components-icon-button{color:#ccd0d4}.woocommerce-chart__type-button.components-icon-button.woocommerce-chart__type-button-selected{color:#555d66}.woocommerce-chart__type-button.components-icon-button:hover{box-shadow:none!important}@media (max-width:960px){.woocommerce-summary+.woocommerce-chart .woocommerce-chart__title{display:none}.woocommerce-summary+.woocommerce-chart .woocommerce-chart__interval-select{width:auto;order:0;margin-top:0}}.woocommerce-legend.has-total{padding-bottom:50px;position:relative}.woocommerce-legend.woocommerce-legend__direction-column{border-right:1px solid #ccd0d4;min-width:320px}.woocommerce-chart__footer .woocommerce-legend.woocommerce-legend__direction-column{border-right:none}.woocommerce-legend__list{color:#24292d;display:flex;height:100%;margin:0}.woocommerce-legend__direction-column .woocommerce-legend__list{flex-direction:column;height:300px;overflow:auto}.woocommerce-chart__footer .woocommerce-legend__direction-column .woocommerce-legend__list{border-top:1px solid #ccd0d4;height:100%;max-height:none;min-height:none}.has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:250px}.woocommerce-chart__footer .has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:auto;max-height:220px;min-height:none}.woocommerce-legend__direction-row .woocommerce-legend__list{flex-direction:row}.woocommerce-legend__item>button{display:flex;justify-content:center;align-items:center;background-color:#fff;color:#555d66;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;border:none;padding:0}.woocommerce-legend__item>button .woocommerce-legend__item-container{display:flex;flex-direction:row;flex-wrap:nowrap;position:relative;padding:3px 0 3px 24px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.woocommerce-legend__item>button .woocommerce-legend__item-container:hover input~.woocommerce-legend__item-checkmark{background-color:#f3f4f5}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{border:1px solid #a2aab2;position:absolute;top:4px;left:0;height:16px;width:16px;background-color:#fff}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark:after{content:"";position:absolute;display:none}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked{background-color:currentColor;border-color:currentColor}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{display:block;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-total{margin-left:auto;font-weight:700}.woocommerce-legend__item>button:focus{outline:none}.woocommerce-legend__item>button:focus .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{outline:2px solid #a2aab2}.woocommerce-legend__item>button:hover{background-color:#f8f9f9}.woocommerce-legend__direction-column .woocommerce-legend__item{margin:0;padding:0}.woocommerce-legend__direction-column .woocommerce-legend__item>button{min-height:36px;padding:0 17px;text-align:left}.woocommerce-legend__direction-column .woocommerce-legend__item:first-child{margin-top:12px}.woocommerce-legend__direction-column .woocommerce-legend__item:last-child:after{content:"";display:block;height:12px;width:100%}.woocommerce-legend__direction-row .woocommerce-legend__item{padding:0;margin:0}.woocommerce-legend__direction-row .woocommerce-legend__item>button{padding:0 17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container{height:50px;align-items:center}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{top:17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-title{margin-right:17px}.woocommerce-legend__total{align-items:center;background:#fff;border-top:1px solid #ccd0d4;bottom:0;color:#555d66;display:flex;height:50px;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase}.woocommerce-legend__total:before{background:linear-gradient(180deg,transparent,rgba(0,0,0,.2));bottom:100%;content:"";height:20px;left:0;opacity:0;pointer-events:none;position:absolute;right:0;transition:opacity .3s}.is-scrollable .woocommerce-legend__total:before{opacity:1}.woocommerce-chart__body-row .d3-chart__container{width:calc(100% - 320px)}.d3-chart__container{position:relative;width:100%}.d3-chart__container svg{overflow:visible}.d3-chart__container .d3-chart__empty-message{align-items:center;bottom:0;color:#6c7781;display:flex;font-size:18px;font-size:1.125rem;font-weight:700;justify-content:center;left:0;line-height:1.5;margin:0 auto;max-width:50%;padding-bottom:48px;pointer-events:none;position:absolute;right:0;top:0;text-align:center;z-index:1}@media (max-width:782px){.d3-chart__container .d3-chart__empty-message{font-size:13px;font-size:.8125rem}}.d3-chart__container .d3-chart__tooltip{border:1px solid #ccd0d4;position:absolute;display:flex;min-width:324px;height:auto;background-color:#fff;text-align:left;padding:17px;box-shadow:0 3px 20px 0 rgba(18,24,30,.1),0 1px 3px 0 rgba(18,24,30,.1);flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;pointer-events:none;visibility:hidden;z-index:1}@media (max-width:600px){.d3-chart__container .d3-chart__tooltip{min-width:auto;width:calc(100% - 48px)}}.d3-chart__container .d3-chart__tooltip h4{text-align:left;line-height:18px;width:100%;text-transform:uppercase;font-size:11px;color:#6c7781;margin-top:0}.d3-chart__container .d3-chart__tooltip ul{list-style:none;margin-bottom:2px;margin-top:2px;font-size:14px}.d3-chart__container .d3-chart__tooltip ul li{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center}.d3-chart__container .d3-chart__tooltip ul li.key-row{display:flex;flex-direction:row;justify-content:space-between;width:100%}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container{width:100%;min-width:100px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-color{display:inline-block;width:16px;height:16px;margin-right:8px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-key{margin-right:6px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-value{font-weight:600}.d3-chart__container .bargrouprect{shape-rendering:crispEdges}.d3-chart__container .grid .tick line{stroke:#e2e4e7;stroke-width:1;shape-rendering:crispEdges}.d3-chart__container .grid .tick:first-child line{stroke:#555d66}.d3-chart__container .grid.with-positive-ticks .tick:last-child line{opacity:0}.d3-chart__container .tick{padding-top:10px;stroke-width:1}.d3-chart__container .y-axis{text-anchor:start}.d3-chart__container .y-axis.ticktext{fill:#555d66}.d3-chart__container .axis-month .tick text,.d3-chart__container .y-axis .tick text{font-size:10px}.d3-chart__container .focus-grid line{stroke:rgba(0,0,0,.1);stroke-width:1px}.d3-chart__container .barfocus{fill:rgba(0,0,0,.1)}.d3-base{background:transparent;overflow-x:auto;overflow-y:hidden;position:relative;width:100%;height:100%}.woocommerce-count{border:1px solid;border-radius:10px;padding:0 8px;font-weight:700}.woocommerce-page .woocommerce-dropdown-button{background-color:#fff;position:relative;border:1px solid #e2e4e7;color:#555d66;border-radius:4px;padding:0 40px 0 0;width:100%}.woocommerce-page .woocommerce-dropdown-button:after{content:"";position:absolute;right:14px;top:50%;transform:translateY(-50%);width:0;height:0;border-color:#555d66 transparent transparent;border-style:solid;border-width:6px 6px 0;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-page .woocommerce-dropdown-button:after{transition:none}}.woocommerce-page .woocommerce-dropdown-button.is-open:after{transform:translateY(-50%) rotate(180deg)}.woocommerce-page .woocommerce-dropdown-button.is-open,.woocommerce-page .woocommerce-dropdown-button:active,.woocommerce-page .woocommerce-dropdown-button:hover{background-color:#f8f9f9}.woocommerce-page .woocommerce-dropdown-button.is-multi-line .woocommerce-dropdown-button__labels{flex-direction:column}.woocommerce-dropdown-button__labels{text-align:left;padding:8px 12px;min-height:48px;display:flex;align-items:center;width:100%;justify-content:space-around}@media (max-width:400px){.woocommerce-dropdown-button__labels{min-height:46px}}.woocommerce-dropdown-button__labels span{width:100%;text-align:left}.woocommerce-dropdown-button__labels span:last-child{font-size:12px;font-size:.75rem;margin:0}.woocommerce-dropdown-button__labels span:first-child{font-size:13px;font-size:.8125rem;font-weight:600}@media (max-width:400px){.woocommerce-dropdown-button__labels span:last-child{font-size:10px;font-size:.625rem}.woocommerce-dropdown-button__labels span:first-child{font-size:12px;font-size:.75rem}}.woocommerce-ellipsis-menu__toggle{height:24px;justify-content:center;vertical-align:middle;width:24px}.woocommerce-ellipsis-menu__toggle .dashicon{transform:rotate(90deg)}.woocommerce-ellipsis-menu__popover{text-align:left}.woocommerce-ellipsis-menu__popover:not(.is-mobile):after,.woocommerce-ellipsis-menu__popover:not(.is-mobile):before{margin-left:-16px}.woocommerce-ellipsis-menu__popover .components-popover__content{width:182px;padding:2px}.woocommerce-ellipsis-menu__popover .components-form-toggle.is-checked .components-form-toggle__track{background-color:#95588a}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__content{width:100%}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{padding:10px 12px 4px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item{cursor:pointer}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item:focus{box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{color:#6c7781;padding-bottom:8px}.woocommerce-ellipsis-menu__popover .components-base-control{margin:0}.woocommerce-empty-content{margin-bottom:16px;text-align:center}.woocommerce-empty-content .woocommerce-empty-content__illustration{max-width:100%}.woocommerce-empty-content .woocommerce-empty-content__actions .components-button+.components-button{margin-left:16px}.woocommerce-filters-advanced{margin:24px 0}.woocommerce-filters-advanced .woocommerce-card__header{padding:8px 16px}.woocommerce-filters-advanced .woocommerce-card__body{padding:0}.woocommerce-filters-advanced .components-select-control__input{height:38px;padding:0;margin:0}.woocommerce-filters-advanced .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced{margin:16px 0;border:1px solid #ccd0d4}}@media (max-width:400px){.woocommerce-filters-advanced{margin:12px 0}}.woocommerce-filters-advanced__title-select{width:70px;display:inline-block;margin:0 8px}.woocommerce-filters-advanced__list{margin:0}.woocommerce-filters-advanced__list-item{padding:0 16px 0 0;margin:0;display:-ms-grid;display:grid;-ms-grid-columns:1fr 40px;grid-template-columns:1fr 40px;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__list-item:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item fieldset{padding:8px 8px 8px 16px}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{width:40px;height:38px;-ms-grid-row-align:center;align-self:center}@media (max-width:400px){.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{position:absolute;top:0;right:4px}}.woocommerce-filters-advanced__list-item .components-form-token-field{border-radius:4px}@media (max-width:400px){.woocommerce-filters-advanced__list-item{display:block;position:relative;padding:8px 8px 0 0}}.woocommerce-filters-advanced__add-filter{padding:12px;margin:0;color:#95588a;display:block;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__add-filter:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-filter div div{display:inline-block}.woocommerce-filters-advanced__add-filter .components-popover:not(.is-mobile) .components-popover__content{min-width:180px}.woocommerce-filters-advanced__fieldset{display:flex;align-items:center}.woocommerce-filters-advanced__fieldset>div{padding:0 4px}@media (max-width:782px){.woocommerce-filters-advanced__fieldset>div{width:100%;padding:4px 0}}@media (max-width:782px){.woocommerce-filters-advanced__fieldset{display:block}}.woocommerce-filters-advanced__fieldset.is-english{display:-ms-grid;display:grid;-ms-grid-columns:100px 150px 1fr;grid-template-columns:100px 150px 1fr}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{display:flex;align-items:center}@media (max-width:782px){.woocommerce-filters-advanced__fieldset.is-english{display:block}}.woocommerce-filters-advanced__rule{width:150px}.woocommerce-filters-advanced__input{width:100%}.woocommerce-filters-advanced__add-filter-dropdown{display:inline-block}.woocommerce-filters-advanced__add-button{color:inherit;padding:8px}.woocommerce-filters-advanced__add-button svg{fill:currentColor;margin:0 6px 0 0}.woocommerce-filters-advanced__add-button.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#c88bbd}.woocommerce-filters-advanced__add-button:not(:disabled):not([aria-disabled=true]):focus{color:#95588a;background-color:transparent}.woocommerce-filters-advanced__controls{padding:8px 16px;display:flex;align-items:center}.woocommerce-filters-advanced__controls .components-button{margin-right:16px}.woocommerce-filters-advanced__add-dropdown{padding:8px 0}.woocommerce-filters-advanced__add-dropdown li{margin:0}.woocommerce-filters-advanced__add-dropdown .components-button{width:100%;padding:8px}.woocommerce-filters-advanced__add-dropdown .components-button:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-dropdown .components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#edeff0;box-shadow:none}.woocommerce-filters-advanced__input-range{align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-filters-advanced__input-range.is-between{-ms-grid-columns:1fr 36px 1fr;grid-template-columns:1fr 36px 1fr}.woocommerce-filters-advanced__input-range input{height:38px;margin:0}.woocommerce-filters-advanced__input-range .separator{text-align:center}.woocommerce-filters-date__content.is-mobile .components-popover__header{border:none;height:0}.woocommerce-filters-date__content.is-mobile .components-popover__close{transform:translateY(22px)}.woocommerce-filters-date__content.is-mobile .components-tab-panel__tab-content{height:calc(100% - 46px);overflow:auto}.woocommerce-filters-date__tabs{height:calc(100% - 42px)}.woocommerce-filters-date__tabs .components-tab-panel__tabs{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;border-radius:5px;margin:0 1em 1em}.woocommerce-filters-date__tabs .components-tab-panel__tab-content{display:flex;flex-direction:column;align-items:center}.woocommerce-filters-date__tab:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__tab:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}button.woocommerce-filters-date__tab{outline:none;border:1px solid #95588a;padding:8px;margin:0;border-radius:4px 0 0 4px;color:#95588a;background-color:transparent;justify-content:center}button.woocommerce-filters-date__tab:hover{background-color:#f8f4f7;cursor:pointer}button.woocommerce-filters-date__tab:last-child{border-radius:0 4px 4px 0}button.woocommerce-filters-date__tab.is-active,button.woocommerce-filters-date__tab.is-active:focus{background-color:#95588a;color:#fff}button.woocommerce-filters-date__tab:focus{box-shadow:inset 0 -1px 0 #00435d,0 0 0 2px #bfe7f3}.woocommerce-filters-date__text{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-filters-date__content-controls{display:flex;flex-direction:column;width:100%;align-items:center;padding-bottom:1em;background-color:#fff}.woocommerce-filters-date__content-controls.is-custom{border-top:1px solid #ccd0d4}.woocommerce-filters-date__button-group{padding-top:1em;display:flex;justify-content:center;width:100%}.woocommerce-filters-date__button-group .woocommerce-filters-date__button.is-button{justify-content:center;width:40%;height:34px;margin:0 12px}.woocommerce-filters-filter__content.is-mobile .components-popover__header-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#555d66}.woocommerce-filters-filter__content.is-mobile .woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid #ccd0d4}.woocommerce-filters-filter__content-list{margin:0;width:100%;min-width:100%}.woocommerce-filters-filter__content-list-item{border-bottom:1px solid #ccd0d4;margin:0}.woocommerce-filters-filter__content-list-item:last-child{border-bottom:none}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button,.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;left:1em;transform:translate(50%,-50%)}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button{position:relative;display:block;width:100%;padding:1em 1em 1em 3em;background-color:#f8f9f9;text-align:left}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button{color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button:hover{background-color:#f3f4f5;color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f8f9f9}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button .dashicon{position:absolute;left:1em;top:50%;transform:translateY(-50%)}.woocommerce-filters .components-base-control__field{margin-bottom:0}@media (max-width:400px){.woocommerce-filters{margin-left:-8px;margin-right:-8px}}.woocommerce-filters__basic-filters{display:flex;margin-bottom:24px}@media (max-width:1280px){.woocommerce-filters__basic-filters{flex-direction:column}}@media (max-width:782px){.woocommerce-filters__basic-filters{margin-bottom:16px}}.woocommerce-filters-filter{width:25%;padding:0 12px;min-height:82px;display:flex;flex-direction:column;justify-content:flex-end}.woocommerce-filters-filter:first-child{padding-left:0}.woocommerce-filters-filter:last-child{padding-right:0}@media (max-width:1440px){.woocommerce-filters-filter{width:33.3%}}@media (max-width:1280px){.woocommerce-filters-filter{width:50%;padding:0;min-height:78px}}@media (max-width:782px){.woocommerce-filters-filter{width:100%}}.woocommerce-filters-label{margin:7px 0;display:block}@media (max-width:1280px){.woocommerce-filters-label{margin:5px 0}}.woocommerce-filters-date__content .components-popover__content,.woocommerce-filters-filter__content .components-popover__content{width:320px;border:1px solid #ccd0d4;background-color:#fff}.woocommerce-filters-date__content .woocommerce-calendar__input-error .components-popover__content,.woocommerce-filters-filter__content .woocommerce-calendar__input-error .components-popover__content{background-color:#606a73}.woocommerce-filters-date__content.is-mobile .components-popover__content,.woocommerce-filters-filter__content.is-mobile .components-popover__content{width:100%;height:100%;border:none}.woocommerce-filters__compare .woocommerce-card__body{padding:0}.woocommerce-filters__compare-body{padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-filters__compare-footer{padding:16px;display:flex;align-items:center}.woocommerce-filters__compare-footer .components-button{margin-right:16px}.woocommerce-filters-filter__search .woocommerce-search__autocomplete-results{position:static}.woocommerce-filters-filter__search .woocommerce-search__inline-container{overflow:hidden}.woocommerce-filters-filter__search .woocommerce-search__inline-container:not(.is-active){border:none}.woocommerce-filters-advanced__list-item .components-base-control+.components-base-control{margin-bottom:0}.woocommerce-flag span{vertical-align:middle}.woocommerce-flag .woocommerce-flag__fallback{background:#e2e4e7;color:transparent;width:24px;height:18px;display:block;overflow:hidden}.woocommerce-gravatar{border-radius:50%}.woocommerce-order-status{display:flex;align-items:center}.woocommerce-order-status__indicator{min-width:16px;width:16px;height:16px;display:block;background:#ccd0d4;margin-right:8px;border-radius:50%;border:3px solid #e2e4e7}.woocommerce-order-status__indicator.is-processing{background:#4ab866;border-color:#93d5a4}.woocommerce-order-status__indicator.is-on-hold{background:#ffb900;border-color:#ffd566}.woocommerce-pagination{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center}@media (max-width:782px){.woocommerce-pagination{flex-direction:column}}.woocommerce-pagination input{border-radius:4px}.woocommerce-pagination__page-arrows{display:flex;flex-direction:row}.woocommerce-pagination__page-arrows-buttons{display:inline-flex;align-items:baseline;border:solid #b5bfc9;border-width:1px 1px 2px;border-radius:4px;background:#f0f2f4}.woocommerce-pagination__page-arrows-buttons .components-button:not(:disabled):not([aria-disabled=true]){color:#24292d;height:30px;width:32px;justify-content:center}.woocommerce-pagination__page-arrows-buttons .components-icon-button:not(:disabled):not([aria-disabled=true]):hover{color:#666}.woocommerce-pagination__page-arrows-buttons button:first-child{border-right:2px solid #d3d9de}.woocommerce-pagination__page-arrows-buttons .woocommerce-pagination__link{padding:4px}.woocommerce-pagination__page-arrows-label{margin-top:8px;margin-right:8px}.woocommerce-pagination__page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__page-picker .woocommerce-pagination__page-picker-input{margin-left:8px;width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__per-page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__per-page-picker .components-base-control{margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control__field{display:flex;flex-direction:row;align-items:baseline;margin-bottom:0}.woocommerce-pagination__per-page-picker .components-select-control__input{width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker .components-base-control__label{margin-right:8px}.woocommerce-pagination__page-picker-input.has-error,.woocommerce-pagination__page-picker-input.has-error:focus{border-color:#d94f4f;box-shadow:0 0 2px #d94f4f}.woocommerce-product-image{border-radius:50%}.woocommerce-rating{position:relative;vertical-align:middle;display:inline-block;overflow:hidden}.woocommerce-rating .gridicon{fill:#d7dade}.woocommerce-rating .woocommerce-rating__star-outline{position:absolute;left:0;top:0;white-space:nowrap;overflow:hidden}.woocommerce-rating .woocommerce-rating__star-outline .gridicon{fill:#555d66}.woocommerce-search{position:relative;min-width:0}.woocommerce-search>div{min-width:0}.woocommerce-search .woocommerce-search__icon{position:absolute;top:10px;left:10px;fill:#a2aab2}.woocommerce-search .woocommerce-tag{max-width:100%}.woocommerce-search .woocommerce-tag .woocommerce-tag__text{max-width:calc(100% - 24px)}.woocommerce-search:not(.has-inline-tags) .woocommerce-tag{margin:8px 6px 0 0}.woocommerce-search.has-inline-tags .woocommerce-search__icon{top:50%;transform:translateY(-50%)}.woocommerce-search .woocommerce-search__inline-container{width:100%;padding:4px 2px 4px 36px;border:1px solid #ccd0d4;background-color:#fff;display:flex;align-items:center;position:relative}.woocommerce-search .woocommerce-search__inline-container.is-active{border-color:#00a0d2;box-shadow:inset 0 0 0 #00435d,0 0 1px 2px #bfe7f3}.woocommerce-search .woocommerce-search__inline-container.has-tags{padding-right:36px}.woocommerce-search .woocommerce-search__inline-container .woocommerce-search__token-list{max-width:100%;display:inline-block;padding:1px 0}.woocommerce-search .woocommerce-search__inline-input,.woocommerce-search .woocommerce-search__inline-input:focus{border:none;outline:none;box-shadow:none;padding:2px 0;line-height:20px;max-width:100%;min-width:70px;font-size:inherit;vertical-align:middle}.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-outer-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.woocommerce-search .woocommerce-search__input{width:100%;padding:8px 12px 8px 36px;border:1px solid #ccd0d4}.woocommerce-search .woocommerce-search__autocomplete-results{display:flex;flex-direction:column;align-items:stretch;border:1px solid #ccd0d4;position:absolute;left:0;right:0;z-index:10}.woocommerce-search .woocommerce-search__autocomplete-results:empty{display:none}.woocommerce-search .woocommerce-search__autocomplete-results.is-static-results{position:static}.woocommerce-search .woocommerce-search__autocomplete-result{margin-bottom:0;display:flex;flex-direction:row;flex-grow:1;flex-shrink:0;align-items:center;padding:12px;color:#95588a;text-align:left;background:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-search .woocommerce-search__autocomplete-result:last-of-type{border-bottom:none}.woocommerce-search .woocommerce-search__autocomplete-result:hover{box-shadow:none;color:#95588a;background:#f3f4f5}.woocommerce-search .woocommerce-search__autocomplete-result.is-selected,.woocommerce-search .woocommerce-search__autocomplete-result:active,.woocommerce-search .woocommerce-search__autocomplete-result:focus{color:#95588a;background:#fff;box-shadow:inset 0 0 0 1px #f3f4f5,inset 0 0 0 2px #24292d}.woocommerce-search .woocommerce-search__autocomplete-result .woocommerce-search__result-thumbnail{margin-right:12px}.woocommerce-search__result-name{text-decoration:underline}.woocommerce-search__clear{position:absolute;right:10px;top:calc(50% - 10px)}.woocommerce-search__clear>.dashicon{color:#c9c9c9}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:left}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #e2e4e7}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-left:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #e2e4e7}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-right:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.woocommerce-search-list__list>[role=menu]{border:1px solid #e2e4e7;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:flex;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #e2e4e7!important;color:#555d66}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f8f9f9}.woocommerce-search-list__list .woocommerce-search-list__item:last-child{border-bottom:none!important}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-state{flex:0 0 16px;margin-right:8px;height:24px}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:flex;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #e2e4e7}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-right:4px;content:"— — — — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-right:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:"— "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:"— — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:"— — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:"— — — — "}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#6c7781}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-right:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#191e23}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{flex:0;padding:2px 8px;border:1px solid #e2e4e7;border-radius:12px;font-size:.8em;line-height:1.4;color:#6c7781;background:#fff}.components-panel .woocommerce-search-list{padding:0}.components-panel .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.components-panel .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-section-header{padding:13px;border-bottom:none;display:flex;justify-content:space-between}@media (max-width:782px){.woocommerce-section-header{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-section-header hr{-ms-grid-row-align:center;align-self:center;flex-grow:1;height:1px;margin:0 10px}@media (max-width:782px){.woocommerce-section-header.has-interval-select{position:relative;padding-bottom:30px}.woocommerce-section-header.has-interval-select .woocommerce-chart__interval-select{position:absolute;left:0;bottom:0;padding-left:6px}}.woocommerce-section-header__actions,.woocommerce-section-header__menu{text-align:right}.woocommerce-section-header__actions{display:flex;flex-grow:1;justify-content:flex-end;align-items:center}.woocommerce-section-header__actions .components-base-control{padding-top:0;min-height:34px}.woocommerce-section-header__actions .components-base-control__field{margin-bottom:0}.woocommerce-section-header__actions .components-base-control__field select{background:transparent}.woocommerce-ellipsis-menu__toggle{padding:0}.woocommerce-section-header__menu{display:flex;flex-direction:column;justify-content:center}.woocommerce-section-header__title{margin:0 16px 0 0;padding:3px 0;font-size:18px;font-size:1.125rem;line-height:2.2;font-weight:600}.woocommerce-segmented-selection{width:100%;color:#555d66}.woocommerce-segmented-selection__container{width:100%;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;display:-ms-grid;display:grid;border-top:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4;background-color:#ccd0d4}.woocommerce-segmented-selection__item:nth-child(2n){border-left:1px solid #ccd0d4;border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(odd){border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(-n+2){border-top:0}.woocommerce-segmented-selection__label{background-color:#f8f9f9;padding:12px 12px 12px 36px;position:relative;display:block;height:100%}.woocommerce-segmented-selection__label:active,.woocommerce-segmented-selection__label:hover{background-color:#f3f4f5}.woocommerce-segmented-selection__input{opacity:0;position:absolute;left:-9999px}.woocommerce-segmented-selection__input:active+label .woocommerce-segmented-selection__label{background-color:#f3f4f5}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label{background-color:#fff;font-weight:600}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;transform:translate(-20px,-50%)}.woocommerce-segmented-selection__input:focus+label .woocommerce-segmented-selection__label{box-shadow:inset 0 0 0 1px #24292d}.woocommerce-split-button{display:flex;align-items:center;padding:4px 0}.woocommerce-split-button .woocommerce-split-button__menu{padding:0}.woocommerce-split-button .woocommerce-split-button__main-action,.woocommerce-split-button .woocommerce-split-button__menu-toggle{line-height:26px;height:42px;border-radius:3px;white-space:nowrap;color:#555d66;border:1px solid #b5bcc2;background:#f3f4f5;box-shadow:inset 0 -1px 0 #b5bcc2;vertical-align:top}.woocommerce-split-button .woocommerce-split-button__main-action{padding:0 12px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;height:32px}.woocommerce-split-button .woocommerce-split-button__menu-toggle{border-top-left-radius:0;border-bottom-left-radius:0;padding:4px;height:32px;width:32px}.woocommerce-split-button .woocommerce-split-button__menu-popover.is-mobile{top:46px}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fafafa;border-color:#78848f;box-shadow:inset 0 -1px 0 #b5bcc2}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{background-color:#fafafa;border:1px solid #555d66;box-shadow:inset 0 -1px 0 #6c7781,0 0 0 2px #bfe7f3}.woocommerce-split-button .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button .woocommerce-split-button__main-action.components-button .gridicon{width:18px;height:18px}.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .gridicon{margin-right:8px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper{width:100%;padding:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button,.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-icon-button{color:#555d66;margin-top:4px;margin-bottom:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fff;color:#24292d;box-shadow:inset 0 0 0 1px #e2e4e7,inset 0 0 0 2px #fff,0 1px 1px rgba(25,30,35,.2)}.woocommerce-split-button .woocommerce-split-button__menu-item{width:100%;padding:4px;border-radius:0;outline:none;cursor:pointer}.woocommerce-split-button .woocommerce-split-button__menu-item .dashicon{margin-right:8px}.woocommerce-split-button .dashicons-arrow-down{fill:#555d66;height:20px;width:20px}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover>svg,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active>svg{background:initial}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover{border-color:#b5bcc2}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle{background:#95588a;color:#fff;border-color:#7c3f71;box-shadow:inset 0 -1px 0 #7c3f71}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#fff;background-color:#7c3f71;border-color:#622557;box-shadow:inset 0 -1px 0 #622557}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{color:#fff;background-color:#7c3f71;box-shadow:inset 0 -1px 0 #622557,0 0 0 2px #ffd7ff;border:1px solid #622557}.woocommerce-split-button.is-primary .dashicons-arrow-down{fill:#fff}.woocommerce-summary{margin:16px 0;display:-ms-grid;display:grid;border-color:#ccd0d4;border-style:solid;border-width:1px 0 0 1px;background-color:#edeff0;box-shadow:inset -1px -1px 0 #ccd0d4}@media (max-width:782px){.woocommerce-summary{border-width:0}.woocommerce-summary.is-placeholder{border-top:0}.woocommerce-summary .woocommerce-summary__item-container.is-placeholder{border-top:1px solid #ccd0d4}}.woocommerce-summary .components-popover.components-popover{position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:0!important;margin-left:0}.woocommerce-summary .components-popover.components-popover .components-popover__header{display:none}.woocommerce-summary .components-popover.components-popover .components-popover__content{position:static;left:auto;right:auto;margin:0;width:100%;max-width:100%!important;max-height:100%!important;box-shadow:none;border:none;transform:none}.woocommerce-summary .components-popover.components-popover .components-popover__content .woocommerce-summary__item.is-selected{display:none}.components-popover__content .woocommerce-summary{max-height:100%;margin-top:0;margin-bottom:0;overflow-y:scroll;border:none}.woocommerce-summary .woocommerce-summary__item-data{display:flex;flex-wrap:wrap}.woocommerce-summary .woocommerce-summary__item-delta,.woocommerce-summary .woocommerce-summary__item-value{flex:1 0 auto}.woocommerce-summary .woocommerce-summary__item-delta{flex:0 1 auto;display:flex;flex-wrap:none}.woocommerce-summary,.woocommerce-summary.has-1-items,.woocommerce-summary.has-one-item{-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-summary.has-2-items{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(2n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-3-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-4-items,.woocommerce-summary.has-7-items,.woocommerce-summary.has-8-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-5-items,.woocommerce-summary.has-9-items,.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-delta,.woocommerce-summary.has-5-items .woocommerce-summary__item-value,.woocommerce-summary.has-9-items .woocommerce-summary__item-delta,.woocommerce-summary.has-9-items .woocommerce-summary__item-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-6-items{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-delta,.woocommerce-summary.has-6-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-value{display:block}@media (max-width:1440px){.woocommerce-summary.has-4-items .woocommerce-summary__item-delta,.woocommerce-summary.has-4-items .woocommerce-summary__item-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-delta,.woocommerce-summary.has-7-items .woocommerce-summary__item-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-delta,.woocommerce-summary.has-8-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-6-items,.woocommerce-summary.has-9-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-delta,.woocommerce-summary.has-6-items .woocommerce-summary__item-value,.woocommerce-summary.has-9-items .woocommerce-summary__item-delta,.woocommerce-summary.has-9-items .woocommerce-summary__item-value{min-width:auto}.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-value{display:inline}.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#e2e4e7}}@media (max-width:960px){.woocommerce-summary .woocommerce-summary__item{border-right-color:#ccd0d4}}@media (max-width:782px){.woocommerce-summary .woocommerce-summary__item-container{margin-left:-16px;margin-right:-16px;width:auto}.woocommerce-summary .woocommerce-summary__item-container .woocommerce-summary__item{border-right:none}.woocommerce-summary .components-popover.components-popover{margin-left:-16px;margin-right:-16px}.woocommerce-summary .components-popover.components-popover .woocommerce-summary__item-container{margin-left:0;margin-right:0}}.woocommerce-summary__item-container{margin-bottom:0}.woocommerce-summary__item-container:last-of-type .woocommerce-summary__item{border-right-color:#ccd0d4!important}.woocommerce-summary__item-container.is-dropdown-button{padding:0;list-style:none;border-bottom:1px solid #ccd0d4;border-right:1px solid #ccd0d4}.woocommerce-summary__item-container.is-dropdown-button .components-button{text-align:left;display:block}@media (max-width:782px){.woocommerce-summary__item-container.is-dropdown-button{border-right:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;max-width:110px;width:70%}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label:after{content:"\00a0"}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-data{justify-content:space-between}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;max-width:140px;width:80%}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value:after{content:"\00a0"}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;width:20px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value:after{content:"\00a0"}.woocommerce-summary__item{display:block;padding:16px;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4;border-right:1px solid #e2e4e7;text-decoration:none}.woocommerce-summary__item:hover{background-color:#f3f4f5}.woocommerce-summary__item:active{background-color:#edeff0}.woocommerce-summary__item:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 1px 0 #6c7781!important}.woocommerce-summary__item.is-selected:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 0 0 #6c7781,inset 0 4px 0 #95588a!important}.is-dropdown-button .woocommerce-summary__item{position:relative;width:100%;padding-right:56px}@media (max-width:782px){.is-dropdown-button .woocommerce-summary__item{border-right:none}}.woocommerce-summary__item .woocommerce-summary__item-label{display:block;margin-bottom:16px;font-size:11px;font-size:.6875rem;text-transform:uppercase;color:#6c7781}.woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:4px;font-size:18px;font-size:1.125rem;font-weight:500;color:#191e23}.woocommerce-summary__item .woocommerce-summary__item-delta{margin-bottom:12px;font-size:18px;font-size:1.125rem;font-weight:300;color:#555d66}.woocommerce-summary__item.is-selected{background:#fff;box-shadow:inset 0 4px 0 #95588a}.woocommerce-summary__item.is-selected .woocommerce-summary__item-value{font-weight:600}.woocommerce-summary__item.is-selected .woocommerce-summary__item-delta{font-weight:400}.woocommerce-summary__item.is-good-trend .woocommerce-summary__item-delta{color:#4ab866}.woocommerce-summary__item.is-bad-trend .woocommerce-summary__item-delta{color:#d94f4f}.woocommerce-summary__item .woocommerce-summary__item-delta-icon{vertical-align:middle;margin-right:3px;fill:currentColor}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-up{transform:rotate(45deg)}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-down{transform:rotate(-45deg)}.woocommerce-summary__item .woocommerce-summary__item-prev-label,.woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:13px;font-size:.8125rem;color:#555d66}.woocommerce-summary__item .woocommerce-summary__toggle{position:absolute;top:44px;right:16px;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item .woocommerce-summary__toggle{transition:none}}.is-dropdown-expanded .woocommerce-summary__item .woocommerce-summary__toggle{transform:rotate(-180deg)}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-label{margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-delta,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-value{font-size:13px;font-size:.8125rem;margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-label,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:11px;font-size:.6875rem}.woocommerce-table .woocommerce-card__body{padding:0;position:relative}.woocommerce-table .woocommerce-search{flex-grow:1}.woocommerce-table .woocommerce-card__action{justify-self:flex-end;margin:-13px 0}.woocommerce-table .woocommerce-card__menu{justify-self:flex-end}.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{align-items:center;text-align:left;display:-ms-grid;display:grid;width:100%;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}@media (max-width:960px){.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px;margin:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__compare,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__compare{display:flex;-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:1;grid-area:2/1/3/2}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:2/2/3/4;margin-right:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3;-ms-grid-column-align:end;justify-self:end;margin:-6px 0}}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-columns:1fr auto;grid-template-columns:1fr auto}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row-align:center;align-self:center;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row-align:center;align-self:center;-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3}@media (max-width:960px){.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:2/1/3/4;margin-left:0}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3}}.woocommerce-table.has-compare .woocommerce-search,.woocommerce-table.has-search .woocommerce-search{margin:0 16px}.woocommerce-table.has-compare .woocommerce-compare-button,.woocommerce-table.has-search .woocommerce-compare-button{padding:3px 12px;height:auto}.woocommerce-table.is-empty{align-items:center;background:#f8f9f9;color:#555d66;display:flex;height:calc(17px + 1.1375rem + 165px + 5.6875rem);height:calc(17px + 1.1375rem + (33px + 1.1375rem)*var(--number-of-rows));justify-content:center;padding:16px;text-align:center}.woocommerce-table button.woocommerce-table__download-button.is-link{padding:6px 12px;color:#000;text-decoration:none}.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:8px;height:24px;width:24px}@media (max-width:782px){.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:0}.woocommerce-table button.woocommerce-table__download-button.is-link .woocommerce-table__download-button__label{display:none}}.woocommerce-table .woocommerce-pagination{padding-top:16px;padding-bottom:16px;z-index:1;background:#fff;position:relative}.woocommerce-table__caption{font-size:24px;font-size:1.5rem;text-align:left}.woocommerce-table__table{overflow-x:auto}.woocommerce-table__table:after{content:"";position:absolute;right:0;top:0;width:41px;height:100%;background:linear-gradient(90deg,transparent,rgba(0,0,0,.2));opacity:0;pointer-events:none;transition:opacity .3s}.woocommerce-table__table.is-scrollable:after{opacity:1}.woocommerce-table__table table{border-collapse:collapse;width:100%}.woocommerce-table__table tr:focus-within,.woocommerce-table__table tr:hover{background-color:#f3f4f5}.woocommerce-table__table tr:focus-within td,.woocommerce-table__table tr:focus-within th,.woocommerce-table__table tr:hover td,.woocommerce-table__table tr:hover th{background:transparent}.woocommerce-table__header,.woocommerce-table__item{font-size:13px;font-size:.8125rem;padding:16px 24px;border-bottom:1px solid #e2e4e7;text-align:left}.woocommerce-table__header>a:only-child,.woocommerce-table__item>a:only-child{display:block}.woocommerce-table__header a:focus,.woocommerce-table__header a:hover,.woocommerce-table__item a:focus,.woocommerce-table__item a:hover{color:#622557}.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;max-width:120px;width:80%}.woocommerce-table__header .is-placeholder:after,.woocommerce-table__item .is-placeholder:after{content:"\00a0"}.woocommerce-table__header:not(.is-left-aligned),.woocommerce-table__item:not(.is-left-aligned){text-align:right}.woocommerce-table__header:not(.is-left-aligned) button,.woocommerce-table__item:not(.is-left-aligned) button{justify-content:flex-end}.woocommerce-table__header.is-numeric .is-placeholder,.woocommerce-table__item.is-numeric .is-placeholder{max-width:40px}.woocommerce-table__header.is-sorted,.woocommerce-table__item.is-sorted{background-color:#f8f9f9}.woocommerce-table__header.is-checkbox-column,.woocommerce-table__item.is-checkbox-column{width:33px;max-width:33px;padding-right:0;padding-left:16px}.woocommerce-table__header.is-checkbox-column+th,.woocommerce-table__item.is-checkbox-column+th{border-left:0}th.woocommerce-table__item{font-weight:400}.woocommerce-table__header{padding:8px 24px;background-color:#f8f9fa;border-bottom:1px solid #ccd0d4;font-weight:700;white-space:nowrap}.woocommerce-table__header+.woocommerce-table__header{border-left:1px solid #ccd0d4}.woocommerce-table__header.is-left-aligned.is-sortable{padding-left:16px}.woocommerce-table__header.is-left-aligned.is-sortable svg{display:inline-flex;order:1;margin-left:0}.woocommerce-table__header .components-button.is-button{height:auto;width:100%;padding:8px 24px 8px 0;vertical-align:middle;line-height:1;border:none;background:transparent;box-shadow:none!important}.woocommerce-table__header .components-button.is-button:active,.woocommerce-table__header .components-button.is-button:hover{box-shadow:none!important}.woocommerce-table__header.is-sortable{padding:0}.woocommerce-table__header.is-sortable .gridicon{visibility:hidden;margin-left:4px}.woocommerce-table__header.is-sortable .components-button:focus .gridicon,.woocommerce-table__header.is-sortable .components-button:hover .gridicon,.woocommerce-table__header.is-sortable.is-sorted .components-button .gridicon{visibility:visible}.woocommerce-table__summary{margin:0;padding:16px 0;text-align:center;z-index:1;background:#fff;position:relative}.woocommerce-table__summary-item{display:inline-block;margin-bottom:0;margin-left:8px;margin-right:8px}.woocommerce-table__summary-item .woocommerce-table__summary-label,.woocommerce-table__summary-item .woocommerce-table__summary-value{display:inline-block}.woocommerce-table__summary-item .woocommerce-table__summary-label{margin-left:4px}.woocommerce-table__summary-item .woocommerce-table__summary-value{font-weight:600}.woocommerce-tag{display:inline-flex;margin:1px 4px 1px 0;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove.components-icon-button,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#e2e4e7;transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#555d66;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 4px 0 8px;border-radius:12px 0 0 12px}.woocommerce-tag .woocommerce-tag__remove.components-icon-button{cursor:pointer;padding:0 2px;border-radius:0 12px 12px 0;color:#555d66;line-height:10px;text-indent:0}.woocommerce-tag .woocommerce-tag__remove.components-icon-button:hover{color:#32373c}.text-control-with-affixes{display:inline-flex;flex-direction:row;width:100%}.text-control-with-affixes input[type=email],.text-control-with-affixes input[type=number],.text-control-with-affixes input[type=password],.text-control-with-affixes input[type=text],.text-control-with-affixes input[type=url]{flex-grow:1;margin:0}.text-control-with-affixes input[type=email]:disabled,.text-control-with-affixes input[type=number]:disabled,.text-control-with-affixes input[type=password]:disabled,.text-control-with-affixes input[type=text]:disabled,.text-control-with-affixes input[type=url]:disabled{border-right-width:0}.text-control-with-affixes input[type=email]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=number]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=password]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=text]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=url]:disabled+.text-control-with-affixes__suffix{border-left:1px solid #e2e4e7}.text-control-with-affixes__prefix,.text-control-with-affixes__suffix{position:relative;background:#fff;border:1px solid #e2e4e7;color:#555d66;padding:7px 14px;white-space:nowrap;flex:1 0 auto;font-size:14px;line-height:1.5}.text-control-with-affixes__prefix{border-right:none}.text-control-with-affixes__prefix+input[type=email]:disabled,.text-control-with-affixes__prefix+input[type=number]:disabled,.text-control-with-affixes__prefix+input[type=password]:disabled,.text-control-with-affixes__prefix+input[type=text]:disabled,.text-control-with-affixes__prefix+input[type=url]:disabled{border-left-color:#e2e4e7;border-right-width:1px}.text-control-with-affixes__suffix{border-left:none}.woocommerce-view-more-list{padding-left:4px;margin:0 0 0 4px;vertical-align:middle}.woocommerce-view-more-list__popover{margin:0;padding:16px;text-align:left}.woocommerce-view-more-list__popover__item{display:block;margin:16px 0}.woocommerce-view-more-list__popover__item:first-child{margin-top:0}.woocommerce-view-more-list__popover__item:last-child{margin-bottom:0}
2
  .editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-right:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wp-block-button__link{color:inherit}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block}
3
  .wc-block-handpicked-products__selection{width:100%}
4
- .wc-block-products-category__selection{width:100%}
 
5
  .woocommerce-product-categories__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-categories__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-categories__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}
6
- .wc-block-product-categories.wc-block-product-categories ul{margin-left:20px}
7
- .wc-block-products-attribute__selection{width:100%}
8
- .woocommerce-product-attributes__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-attributes__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-attributes__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{justify-content:center}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="#6c7781" /></svg>');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0[aria-expanded=true]:after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="#6c7781" /></svg>')}.woocommerce-search-list__item.woocommerce-product-attributes__item[disabled].depth-0:after{margin-left:0;width:auto;background:none}
9
- .wc-block-featured-product.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-product .components-resizable-box__handle{z-index:10}
 
 
 
 
1
+ @charset "UTF-8";@-webkit-keyframes slide-in-left{0%{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slide-in-left{0%{transform:translateX(100%)}to{transform:translateX(0)}}@-webkit-keyframes slide-out-left{0%{transform:translateX(-100%)}to{transform:translateX(-200%)}}@keyframes slide-out-left{0%{transform:translateX(-100%)}to{transform:translateX(-200%)}}@-webkit-keyframes slide-in-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-in-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@-webkit-keyframes slide-out-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}@keyframes slide-out-right{0%{transform:translateX(-100%)}to{transform:translateX(0)}}.woocommerce-slide-animation>div{width:100%;white-space:nowrap;overflow:hidden;display:flex}.woocommerce-slide-animation.animate-left .slide-enter-active{-webkit-animation:slide-in-left;animation:slide-in-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-left .slide-exit-active{-webkit-animation:slide-out-left;animation:slide-out-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-enter-active{-webkit-animation:slide-in-right;animation:slide-in-right;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-exit-active{-webkit-animation:slide-out-right;animation:slide-out-right;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (prefers-reduced-motion:reduce){.woocommerce-slide-animation .slide-enter-active,.woocommerce-slide-animation .slide-exit-active{-webkit-animation:none!important;animation:none!important}}.woocommerce-calendar{width:100%;background-color:#f8f9f9;border-top:1px solid #ccd0d4;height:396px}.woocommerce-calendar.is-mobile{height:100%}.woocommerce-calendar__react-dates{width:100%;overflow-x:hidden}.woocommerce-calendar__react-dates .DayPicker{margin:0 auto}.woocommerce-calendar__react-dates .CalendarMonth_table{margin-top:10px}.woocommerce-calendar__react-dates .CalendarDay__selected_span{background:#95588a;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__selected{background:#622557;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__hovered_span{background:#95588a;border:1px solid #e2e4e7;color:#fff}.woocommerce-calendar__react-dates .CalendarDay__blocked_out_of_range{color:#a2aab2}.woocommerce-calendar__react-dates .CalendarMonth,.woocommerce-calendar__react-dates .CalendarMonthGrid,.woocommerce-calendar__react-dates .DayPicker,.woocommerce-calendar__react-dates .DayPicker_transitionContainer{background-color:#f8f9f9}.woocommerce-calendar__react-dates .DayPicker_weekHeader_li{color:#606a73}.woocommerce-calendar__react-dates .DayPickerNavigation_button:focus{outline:2px solid #bfe7f3}.woocommerce-calendar__react-dates.is-core-datepicker .components-datetime__date{padding-left:0}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__default{background-color:transparent}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__selected{background:#622557;border:none}.woocommerce-calendar__inputs{padding:1em;width:100%;max-width:500px;display:-ms-grid;display:grid;-ms-grid-columns:43% 14% 43%;grid-template-columns:43% 14% 43%;margin:0 auto}.woocommerce-calendar__inputs .components-base-control{margin:0}.woocommerce-calendar__inputs-to{display:flex;align-items:center;justify-content:center;-ms-grid-column:2;grid-column-start:2}.woocommerce-calendar__input{position:relative}.woocommerce-calendar__input .dashicons-calendar{position:absolute;top:50%;transform:translateY(-50%);left:10px}.woocommerce-calendar__input .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input:first-child{-ms-grid-column:1;grid-column-start:1}.woocommerce-calendar__input:last-child{-ms-grid-column:3;grid-column-start:3}.woocommerce-calendar__input.is-empty .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input.is-error .dashicons-calendar path{fill:#d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text{border:1px solid #d94f4f;box-shadow:inset 0 0 8px #d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text:focus{box-shadow:inset 0 0 8px #d94f4f,0 0 6px rgba(30,140,190,.8)}.woocommerce-calendar__input .woocommerce-calendar__input-text{color:#555d66;border-radius:3px;padding:10px 10px 10px 30px;width:100%;font-size:13px;font-size:.8125rem}.woocommerce-calendar__input .woocommerce-calendar__input-text:-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-webkit-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-moz-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::placeholder{color:#6c7781}.woocommerce-filters-date__content.is-mobile .woocommerce-calendar__input-error .components-popover__content{height:auto}.woocommerce-calendar__input-error{display:none}.is-error .woocommerce-calendar__input-text:focus+span .woocommerce-calendar__input-error{display:block;left:50%!important;position:absolute;top:auto!important}.woocommerce-calendar__input-error .components-popover__content{background-color:#606a73;color:#fff;padding:.5em;border:none}.woocommerce-calendar__input-error.components-popover .components-popover__content{min-width:100px;width:100px;text-align:center}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-bottom:before{border-bottom-color:#606a73;z-index:1;top:-6px}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-top:after{border-top-color:#606a73;z-index:1;top:0}.woocommerce-calendar__date-picker-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-card{margin-bottom:24px;background:#fff;border-radius:3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .2s cubic-bezier(.4,1,.4,1)}@media (max-width:782px){.woocommerce-card{margin-bottom:12px;width:auto}}.woocommerce-card.is-inactive{background-color:#f6f6f6;box-shadow:none}.woocommerce-card__header{padding:16px;display:-ms-grid;display:grid;align-items:center;border-top-left-radius:3px;border-top-left-radius:4px}.has-action .woocommerce-card__header{-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr}.has-menu .woocommerce-card__header{-ms-grid-columns:auto 24px;grid-template-columns:auto 24px}.has-menu.has-action .woocommerce-card__header{grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-card__header-item{-ms-grid-row-align:center}.woocommerce-card__header-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__action,.woocommerce-card__menu{text-align:right}.woocommerce-card__body{padding:16px}.woocommerce-card__title{margin:0;font-size:24px;font-size:1.5rem;line-height:1.2;font-weight:400}.woocommerce-card__description{font-size:16px;font-size:1rem;line-height:1.5;color:#636d75;margin-top:12px;margin-bottom:0;font-weight:400}.woocommerce-chart{margin-top:-16px;margin-bottom:24px;background:#fff;border:1px solid #ccd0d4;border-top:0}@media (max-width:782px){.woocommerce-chart{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-chart .woocommerce-chart__header{min-height:50px;border-bottom:1px solid #ccd0d4;display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;width:100%}.woocommerce-chart .woocommerce-chart__header .woocommerce-chart__title{height:18px;color:#24292d;font-size:15px;font-weight:600;line-height:18px;margin-left:16px;margin-right:16px}.woocommerce-chart .woocommerce-chart__body{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;width:100%}.woocommerce-chart .woocommerce-chart__body.woocommerce-chart__body-column{flex-direction:column}.woocommerce-chart .woocommerce-chart__footer{width:100%}.woocommerce-chart-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;padding:0;width:100%;display:flex;align-items:center;justify-content:center}.woocommerce-chart-placeholder:after{content:"\00a0"}.woocommerce-chart-placeholder .components-spinner{margin:0}.woocommerce-chart__interval-select{align-items:start;border-right:1px solid #ccd0d4;display:flex;flex-direction:column;justify-content:center;margin:0 0 0 auto;min-height:50px;padding:8px 16px 0}@media (max-width:960px){.woocommerce-chart__interval-select{width:100%;order:1;margin-top:-8px;margin-left:0;padding-left:8px;border-right:0;min-height:0}}#wpbody .woocommerce-chart__interval-select .components-select-control__input{font-size:13px;font-size:.8125rem;border:0;box-shadow:none}#wpbody .woocommerce-chart__interval-select .components-select-control__input:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-chart__types{padding:0 8px;white-space:nowrap}.woocommerce-chart__type-button{background:transparent!important}.woocommerce-chart__type-button.components-icon-button{color:#ccd0d4}.woocommerce-chart__type-button.components-icon-button.woocommerce-chart__type-button-selected{color:#555d66}.woocommerce-chart__type-button.components-icon-button:hover{box-shadow:none!important}@media (max-width:960px){.woocommerce-summary+.woocommerce-chart .woocommerce-chart__title{display:none}.woocommerce-summary+.woocommerce-chart .woocommerce-chart__interval-select{width:auto;order:0;margin-top:0}}.woocommerce-legend.has-total{padding-bottom:50px;position:relative}.woocommerce-legend.woocommerce-legend__direction-column{border-right:1px solid #ccd0d4;min-width:320px}.woocommerce-chart__footer .woocommerce-legend.woocommerce-legend__direction-column{border-right:none}.woocommerce-legend__list{color:#24292d;display:flex;height:100%;margin:0}.woocommerce-legend__direction-column .woocommerce-legend__list{flex-direction:column;height:300px;overflow:auto}.woocommerce-chart__footer .woocommerce-legend__direction-column .woocommerce-legend__list{border-top:1px solid #ccd0d4;height:100%;max-height:none;min-height:none}.has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:250px}.woocommerce-chart__footer .has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:auto;max-height:220px;min-height:none}.woocommerce-legend__direction-row .woocommerce-legend__list{flex-direction:row}.woocommerce-legend__item>button{display:flex;justify-content:center;align-items:center;background-color:#fff;color:#555d66;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;border:none;padding:0}.woocommerce-legend__item>button .woocommerce-legend__item-container{display:flex;flex-direction:row;flex-wrap:nowrap;position:relative;padding:3px 0 3px 24px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.woocommerce-legend__item>button .woocommerce-legend__item-container:hover input~.woocommerce-legend__item-checkmark{background-color:#f3f4f5}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{border:1px solid #a2aab2;position:absolute;top:4px;left:0;height:16px;width:16px;background-color:#fff}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark:after{content:"";position:absolute;display:none}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked{background-color:currentColor;border-color:currentColor}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{display:block;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-total{margin-left:auto;font-weight:700}.woocommerce-legend__item>button:focus{outline:none}.woocommerce-legend__item>button:focus .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{outline:2px solid #a2aab2}.woocommerce-legend__item>button:hover{background-color:#f8f9f9}.woocommerce-legend__direction-column .woocommerce-legend__item{margin:0;padding:0}.woocommerce-legend__direction-column .woocommerce-legend__item>button{min-height:36px;padding:0 17px;text-align:left}.woocommerce-legend__direction-column .woocommerce-legend__item:first-child{margin-top:12px}.woocommerce-legend__direction-column .woocommerce-legend__item:last-child:after{content:"";display:block;height:12px;width:100%}.woocommerce-legend__direction-row .woocommerce-legend__item{padding:0;margin:0}.woocommerce-legend__direction-row .woocommerce-legend__item>button{padding:0 17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container{height:50px;align-items:center}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{top:17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-title{margin-right:17px}.woocommerce-legend__total{align-items:center;background:#fff;border-top:1px solid #ccd0d4;bottom:0;color:#555d66;display:flex;height:50px;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase}.woocommerce-legend__total:before{background:linear-gradient(180deg,transparent,rgba(0,0,0,.2));bottom:100%;content:"";height:20px;left:0;opacity:0;pointer-events:none;position:absolute;right:0;transition:opacity .3s}.is-scrollable .woocommerce-legend__total:before{opacity:1}.woocommerce-chart__body-row .d3-chart__container{width:calc(100% - 320px)}.d3-chart__container{position:relative;width:100%}.d3-chart__container svg{overflow:visible}.d3-chart__container .d3-chart__empty-message{align-items:center;bottom:0;color:#6c7781;display:flex;font-size:18px;font-size:1.125rem;font-weight:700;justify-content:center;left:0;line-height:1.5;margin:0 auto;max-width:50%;padding-bottom:48px;pointer-events:none;position:absolute;right:0;top:0;text-align:center;z-index:1}@media (max-width:782px){.d3-chart__container .d3-chart__empty-message{font-size:13px;font-size:.8125rem}}.d3-chart__container .d3-chart__tooltip{border:1px solid #ccd0d4;position:absolute;display:flex;min-width:324px;height:auto;background-color:#fff;text-align:left;padding:17px;box-shadow:0 3px 20px 0 rgba(18,24,30,.1),0 1px 3px 0 rgba(18,24,30,.1);flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;pointer-events:none;visibility:hidden;z-index:1}@media (max-width:600px){.d3-chart__container .d3-chart__tooltip{min-width:auto;width:calc(100% - 48px)}}.d3-chart__container .d3-chart__tooltip h4{text-align:left;line-height:18px;width:100%;text-transform:uppercase;font-size:11px;color:#6c7781;margin-top:0}.d3-chart__container .d3-chart__tooltip ul{list-style:none;margin-bottom:2px;margin-top:2px;font-size:14px}.d3-chart__container .d3-chart__tooltip ul li{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center}.d3-chart__container .d3-chart__tooltip ul li.key-row{display:flex;flex-direction:row;justify-content:space-between;width:100%}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container{width:100%;min-width:100px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-color{display:inline-block;width:16px;height:16px;margin-right:8px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-key{margin-right:6px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-value{font-weight:600}.d3-chart__container .bargrouprect{shape-rendering:crispEdges}.d3-chart__container .grid .tick line{stroke:#e2e4e7;stroke-width:1;shape-rendering:crispEdges}.d3-chart__container .grid .tick:first-child line{stroke:#555d66}.d3-chart__container .grid.with-positive-ticks .tick:last-child line{opacity:0}.d3-chart__container .tick{padding-top:10px;stroke-width:1}.d3-chart__container .y-axis{text-anchor:start}.d3-chart__container .y-axis.ticktext{fill:#555d66}.d3-chart__container .axis-month .tick text,.d3-chart__container .y-axis .tick text{font-size:10px}.d3-chart__container .focus-grid line{stroke:rgba(0,0,0,.1);stroke-width:1px}.d3-chart__container .barfocus{fill:rgba(0,0,0,.1)}.d3-base{background:transparent;overflow-x:auto;overflow-y:hidden;position:relative;width:100%;height:100%}.woocommerce-count{border:1px solid;border-radius:10px;padding:0 8px;font-weight:700}.woocommerce-page .woocommerce-dropdown-button{background-color:#fff;position:relative;border:1px solid #e2e4e7;color:#555d66;border-radius:4px;padding:0 40px 0 0;width:100%}.woocommerce-page .woocommerce-dropdown-button:after{content:"";position:absolute;right:14px;top:50%;transform:translateY(-50%);width:0;height:0;border-color:#555d66 transparent transparent;border-style:solid;border-width:6px 6px 0;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-page .woocommerce-dropdown-button:after{transition:none}}.woocommerce-page .woocommerce-dropdown-button.is-open:after{transform:translateY(-50%) rotate(180deg)}.woocommerce-page .woocommerce-dropdown-button.is-open,.woocommerce-page .woocommerce-dropdown-button:active,.woocommerce-page .woocommerce-dropdown-button:hover{background-color:#f8f9f9}.woocommerce-page .woocommerce-dropdown-button.is-multi-line .woocommerce-dropdown-button__labels{flex-direction:column}.woocommerce-dropdown-button__labels{text-align:left;padding:8px 12px;min-height:48px;display:flex;align-items:center;width:100%;justify-content:space-around}@media (max-width:400px){.woocommerce-dropdown-button__labels{min-height:46px}}.woocommerce-dropdown-button__labels span{width:100%;text-align:left}.woocommerce-dropdown-button__labels span:last-child{font-size:12px;font-size:.75rem;margin:0}.woocommerce-dropdown-button__labels span:first-child{font-size:13px;font-size:.8125rem;font-weight:600}@media (max-width:400px){.woocommerce-dropdown-button__labels span:last-child{font-size:10px;font-size:.625rem}.woocommerce-dropdown-button__labels span:first-child{font-size:12px;font-size:.75rem}}.woocommerce-ellipsis-menu{text-align:center}.woocommerce-ellipsis-menu__toggle{height:24px;justify-content:center;vertical-align:middle;width:24px}.woocommerce-ellipsis-menu__toggle .dashicon{transform:rotate(90deg)}.woocommerce-ellipsis-menu__popover{text-align:left}.woocommerce-ellipsis-menu__popover:not(.is-mobile):after,.woocommerce-ellipsis-menu__popover:not(.is-mobile):before{margin-left:-16px}.woocommerce-ellipsis-menu__popover .components-popover__content{width:182px;padding:2px}.woocommerce-ellipsis-menu__popover .components-form-toggle.is-checked .components-form-toggle__track{background-color:#95588a}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__content{width:100%}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{padding:4px 12px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item{cursor:pointer;color:#6c7781}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item:focus{box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-ellipsis-menu__popover .components-base-control__label,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{color:#23282d;padding-top:8px;padding-bottom:8px;font-size:15px;font-size:.9375rem;margin-bottom:4px}.woocommerce-ellipsis-menu__popover .components-toggle-control .components-base-control__field{margin:4px 0}.woocommerce-ellipsis-menu__popover .components-base-control{margin:0}.woocommerce-empty-content{margin-bottom:16px;text-align:center}.woocommerce-empty-content .woocommerce-empty-content__illustration{max-width:100%}.woocommerce-empty-content .woocommerce-empty-content__actions .components-button+.components-button{margin-left:16px}.woocommerce-filters-advanced{margin:24px 0}.woocommerce-filters-advanced .woocommerce-card__header{padding:8px 16px}.woocommerce-filters-advanced .woocommerce-card__body{padding:0}.woocommerce-filters-advanced .components-select-control__input{height:38px;padding:0;margin:0}.woocommerce-filters-advanced .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced{margin:16px 0;border:1px solid #ccd0d4}}@media (max-width:400px){.woocommerce-filters-advanced{margin:12px 0}}.woocommerce-filters-advanced__title-select{width:70px;display:inline-block;margin:0 8px}.woocommerce-filters-advanced__list{margin:0}.woocommerce-filters-advanced__list-item{padding:0 16px 0 0;margin:0;display:-ms-grid;display:grid;-ms-grid-columns:1fr 40px;grid-template-columns:1fr 40px;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__list-item:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item fieldset{padding:8px 8px 8px 16px}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{width:40px;height:38px;-ms-grid-row-align:center;align-self:center}@media (max-width:400px){.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{position:absolute;top:0;right:4px}}.woocommerce-filters-advanced__list-item .components-form-token-field{border-radius:4px}@media (max-width:400px){.woocommerce-filters-advanced__list-item{display:block;position:relative;padding:8px 8px 0 0}}.woocommerce-filters-advanced__add-filter{padding:12px;margin:0;color:#95588a;display:block;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__add-filter:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-filter div div{display:inline-block}.woocommerce-filters-advanced__add-filter .components-popover:not(.is-mobile) .components-popover__content{min-width:180px}.woocommerce-filters-advanced__fieldset{display:flex;align-items:center}.woocommerce-filters-advanced__fieldset>div{padding:0 4px}@media (max-width:782px){.woocommerce-filters-advanced__fieldset>div{width:100%;padding:4px 0}}@media (max-width:782px){.woocommerce-filters-advanced__fieldset{display:block}}.woocommerce-filters-advanced__fieldset.is-english{display:-ms-grid;display:grid;-ms-grid-columns:100px 150px 1fr;grid-template-columns:100px 150px 1fr}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{display:flex;align-items:center}@media (max-width:782px){.woocommerce-filters-advanced__fieldset.is-english{display:block}}.woocommerce-filters-advanced__rule{width:150px}.woocommerce-filters-advanced__input{width:100%}.woocommerce-filters-advanced__add-filter-dropdown{display:inline-block}.woocommerce-filters-advanced__add-button{color:inherit;padding:8px}.woocommerce-filters-advanced__add-button svg{fill:currentColor;margin:0 6px 0 0}.woocommerce-filters-advanced__add-button.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#c88bbd}.woocommerce-filters-advanced__add-button:not(:disabled):not([aria-disabled=true]):focus{color:#95588a;background-color:transparent}.woocommerce-filters-advanced__controls{padding:8px 16px;display:flex;align-items:center}.woocommerce-filters-advanced__controls .components-button{margin-right:16px}.woocommerce-filters-advanced__add-dropdown{padding:8px 0}.woocommerce-filters-advanced__add-dropdown li{margin:0}.woocommerce-filters-advanced__add-dropdown .components-button{width:100%;padding:8px}.woocommerce-filters-advanced__add-dropdown .components-button:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-dropdown .components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#edeff0;box-shadow:none}.woocommerce-filters-advanced__input-range{align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-filters-advanced__input-range.is-between{-ms-grid-columns:1fr 36px 1fr;grid-template-columns:1fr 36px 1fr}.woocommerce-filters-advanced__input-range input{height:38px;margin:0}.woocommerce-filters-advanced__input-range .separator{text-align:center}.woocommerce-filters-date__content.is-mobile .components-popover__header{border:none;height:0}.woocommerce-filters-date__content.is-mobile .components-popover__close{transform:translateY(22px)}.woocommerce-filters-date__content.is-mobile .components-tab-panel__tab-content{height:calc(100% - 46px);overflow:auto}.woocommerce-filters-date__tabs{height:calc(100% - 42px)}.woocommerce-filters-date__tabs .components-tab-panel__tabs{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;border-radius:5px;margin:0 1em 1em}.woocommerce-filters-date__tabs .components-tab-panel__tab-content{display:flex;flex-direction:column;align-items:center}.woocommerce-filters-date__tab:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__tab:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}button.woocommerce-filters-date__tab{outline:none;border:1px solid #95588a;padding:8px;margin:0;border-radius:4px 0 0 4px;color:#95588a;background-color:transparent;justify-content:center}button.woocommerce-filters-date__tab:hover{background-color:#f8f4f7;cursor:pointer}button.woocommerce-filters-date__tab:last-child{border-radius:0 4px 4px 0}button.woocommerce-filters-date__tab.is-active,button.woocommerce-filters-date__tab.is-active:focus{background-color:#95588a;color:#fff}button.woocommerce-filters-date__tab:focus{box-shadow:inset 0 -1px 0 #00435d,0 0 0 2px #bfe7f3}.woocommerce-filters-date__text{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-filters-date__content-controls{display:flex;flex-direction:column;width:100%;align-items:center;padding-bottom:1em;background-color:#fff}.woocommerce-filters-date__content-controls.is-custom{border-top:1px solid #ccd0d4}.woocommerce-filters-date__button-group{padding-top:1em;display:flex;justify-content:center;width:100%}.woocommerce-filters-date__button-group .woocommerce-filters-date__button.is-button{justify-content:center;width:40%;height:34px;margin:0 12px}.woocommerce-filters-filter__content.is-mobile .components-popover__header-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#555d66}.woocommerce-filters-filter__content.is-mobile .woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid #ccd0d4}.woocommerce-filters-filter__content-list{margin:0;width:100%;min-width:100%}.woocommerce-filters-filter__content-list-item{border-bottom:1px solid #ccd0d4;margin:0}.woocommerce-filters-filter__content-list-item:last-child{border-bottom:none}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;left:1em;transform:translate(50%,-50%)}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button{position:relative;display:block;width:100%;padding:1em 1em 1em 3em;background-color:#f8f9f9;text-align:left}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button{color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button:hover{background-color:#f3f4f5;color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f8f9f9}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button .dashicon{position:absolute;left:1em;top:50%;transform:translateY(-50%)}.woocommerce-filters .components-base-control__field{margin-bottom:0}@media (max-width:400px){.woocommerce-filters{margin-left:-8px;margin-right:-8px}}.woocommerce-filters__basic-filters{display:flex;margin-bottom:24px}@media (max-width:1280px){.woocommerce-filters__basic-filters{flex-direction:column}}@media (max-width:782px){.woocommerce-filters__basic-filters{margin-bottom:16px}}.woocommerce-filters-filter{width:25%;padding:0 12px;min-height:82px;display:flex;flex-direction:column;justify-content:flex-end}.woocommerce-filters-filter:first-child{padding-left:0}.woocommerce-filters-filter:last-child{padding-right:0}@media (max-width:1440px){.woocommerce-filters-filter{width:33.3%}}@media (max-width:1280px){.woocommerce-filters-filter{width:50%;padding:0;min-height:78px}}@media (max-width:782px){.woocommerce-filters-filter{width:100%}}.woocommerce-filters-label{margin:7px 0;display:block}@media (max-width:1280px){.woocommerce-filters-label{margin:5px 0}}.woocommerce-filters-date__content .components-popover__content,.woocommerce-filters-filter__content .components-popover__content{width:320px;border:1px solid #ccd0d4;background-color:#fff}.woocommerce-filters-date__content .woocommerce-calendar__input-error .components-popover__content,.woocommerce-filters-filter__content .woocommerce-calendar__input-error .components-popover__content{background-color:#606a73}.woocommerce-filters-date__content.is-mobile .components-popover__content,.woocommerce-filters-filter__content.is-mobile .components-popover__content{width:100%;height:100%;border:none}.woocommerce-filters__compare .woocommerce-card__body{padding:0}.woocommerce-filters__compare-body{padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-filters__compare-footer{padding:16px;display:flex;align-items:center}.woocommerce-filters__compare-footer .components-button{margin-right:16px}.woocommerce-filters-filter__search .woocommerce-search__autocomplete-results{position:static}.woocommerce-filters-filter__search .woocommerce-search__inline-container{overflow:hidden}.woocommerce-filters-filter__search .woocommerce-search__inline-container:not(.is-active){border:none}.woocommerce-filters-advanced__list-item .components-base-control+.components-base-control{margin-bottom:0}.woocommerce-flag span{vertical-align:middle}.woocommerce-flag .woocommerce-flag__fallback{background:#e2e4e7;color:transparent;width:24px;height:18px;display:block;overflow:hidden}.woocommerce-gravatar{border-radius:50%}.woocommerce-order-status{display:flex;align-items:center}.woocommerce-order-status__indicator{min-width:16px;width:16px;height:16px;display:block;background:#ccd0d4;margin-right:8px;border-radius:50%;border:3px solid #e2e4e7}.woocommerce-order-status__indicator.is-processing{background:#4ab866;border-color:#93d5a4}.woocommerce-order-status__indicator.is-on-hold{background:#ffb900;border-color:#ffd566}.woocommerce-pagination{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center}@media (max-width:782px){.woocommerce-pagination{flex-direction:column}}.woocommerce-pagination input{border-radius:4px}.woocommerce-pagination__page-arrows{display:flex;flex-direction:row}.woocommerce-pagination__page-arrows-buttons{display:inline-flex;align-items:baseline;border:solid #b5bfc9;border-width:1px 1px 2px;border-radius:4px;background:#f0f2f4}.woocommerce-pagination__page-arrows-buttons .components-button:not(:disabled):not([aria-disabled=true]){color:#24292d;height:30px;width:32px;justify-content:center}.woocommerce-pagination__page-arrows-buttons .components-icon-button:not(:disabled):not([aria-disabled=true]):hover{color:#6c7781}.woocommerce-pagination__page-arrows-buttons button:first-child{border-right:2px solid #d3d9de}.woocommerce-pagination__page-arrows-buttons .woocommerce-pagination__link{padding:4px}.woocommerce-pagination__page-arrows-label{margin-top:8px;margin-right:8px}.woocommerce-pagination__page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__page-picker .woocommerce-pagination__page-picker-input{margin-left:8px;width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__per-page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__per-page-picker .components-base-control{margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control__field{display:flex;flex-direction:row;align-items:baseline;margin-bottom:0}.woocommerce-pagination__per-page-picker .components-select-control__input{width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker .components-base-control__label{margin-right:8px}.woocommerce-pagination__page-picker-input.has-error,.woocommerce-pagination__page-picker-input.has-error:focus{border-color:#d94f4f;box-shadow:0 0 2px #d94f4f}.woocommerce-product-image{border-radius:50%}.woocommerce-rating{position:relative;vertical-align:middle;display:inline-block;overflow:hidden;white-space:nowrap}.woocommerce-rating .gridicon{fill:#d7dade}.woocommerce-rating .woocommerce-rating__star-outline{position:absolute;left:0;top:0;white-space:nowrap;overflow:hidden}.woocommerce-rating .woocommerce-rating__star-outline .gridicon{fill:#555d66}.woocommerce-search{position:relative;min-width:0}.woocommerce-search>div{min-width:0}.woocommerce-search .woocommerce-search__icon{position:absolute;top:10px;left:10px;fill:#a2aab2}.woocommerce-search .woocommerce-tag{max-width:100%}.woocommerce-search .woocommerce-tag .woocommerce-tag__text{max-width:calc(100% - 24px)}.woocommerce-search:not(.has-inline-tags) .woocommerce-tag{margin:8px 6px 0 0}.woocommerce-search.has-inline-tags .woocommerce-search__icon{top:50%;transform:translateY(-50%)}.woocommerce-search .woocommerce-search__inline-container{width:100%;padding:4px 2px 4px 36px;border:1px solid #ccd0d4;background-color:#fff;display:flex;align-items:center;position:relative}.woocommerce-search .woocommerce-search__inline-container.is-active{border-color:#00a0d2;box-shadow:inset 0 0 0 #00435d,0 0 1px 2px #bfe7f3}.woocommerce-search .woocommerce-search__inline-container.has-tags{padding-right:36px}.woocommerce-search .woocommerce-search__inline-container .woocommerce-search__token-list{max-width:100%;display:inline-block;padding:1px 0}.woocommerce-search .woocommerce-search__inline-input,.woocommerce-search .woocommerce-search__inline-input:focus{border:none;outline:none;box-shadow:none;padding:2px 0;line-height:20px;max-width:100%;min-width:70px;font-size:inherit;vertical-align:middle}.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-outer-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.woocommerce-search .woocommerce-search__input{width:100%;padding:8px 12px 8px 36px;border:1px solid #ccd0d4}.woocommerce-search .woocommerce-search__autocomplete-results{display:flex;flex-direction:column;align-items:stretch;border:1px solid #ccd0d4;position:absolute;left:0;right:0;z-index:10}.woocommerce-search .woocommerce-search__autocomplete-results:empty{display:none}.woocommerce-search .woocommerce-search__autocomplete-results.is-static-results{position:static}.woocommerce-search .woocommerce-search__autocomplete-result{margin-bottom:0;display:flex;flex-direction:row;flex-grow:1;flex-shrink:0;align-items:center;padding:12px;color:#95588a;text-align:left;background:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-search .woocommerce-search__autocomplete-result:last-of-type{border-bottom:none}.woocommerce-search .woocommerce-search__autocomplete-result:hover{box-shadow:none;color:#95588a;background:#f3f4f5}.woocommerce-search .woocommerce-search__autocomplete-result.is-selected,.woocommerce-search .woocommerce-search__autocomplete-result:active,.woocommerce-search .woocommerce-search__autocomplete-result:focus{color:#95588a;background:#fff;box-shadow:inset 0 0 0 1px #f3f4f5,inset 0 0 0 2px #24292d}.woocommerce-search .woocommerce-search__autocomplete-result .woocommerce-search__result-thumbnail{margin-right:12px}.woocommerce-search__result-name{text-decoration:underline}.woocommerce-search__clear{position:absolute;right:10px;top:calc(50% - 10px)}.woocommerce-search__clear>.dashicon{color:#c9c9c9}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:left}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #e2e4e7}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-left:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #e2e4e7}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-right:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.woocommerce-search-list__list>[role=menu]{border:1px solid #e2e4e7;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:flex;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #e2e4e7!important;color:#555d66}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f8f9f9}.woocommerce-search-list__list .woocommerce-search-list__item:last-child{border-bottom:none!important}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-state{flex:0 0 16px;margin-right:8px;height:24px}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:flex;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #e2e4e7}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-right:4px;content:"— — — — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-right:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:"— "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:"— — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:"— — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:"— — — — "}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#6c7781}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-right:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#191e23}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{flex:0;padding:2px 8px;border:1px solid #e2e4e7;border-radius:12px;font-size:.8em;line-height:1.4;color:#6c7781;background:#fff;white-space:nowrap}.components-panel .woocommerce-search-list{padding:0}.components-panel .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.components-panel .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-section-header{padding:13px;border-bottom:none;display:flex;justify-content:space-between}@media (max-width:782px){.woocommerce-section-header{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-section-header hr{-ms-grid-row-align:center;align-self:center;flex-grow:1;height:1px;margin:0 10px}@media (max-width:782px){.woocommerce-section-header.has-interval-select{position:relative;padding-bottom:30px}.woocommerce-section-header.has-interval-select .woocommerce-chart__interval-select{position:absolute;left:0;bottom:0;padding-left:6px}}.woocommerce-section-header__actions,.woocommerce-section-header__menu{text-align:right}.woocommerce-section-header__actions{display:flex;flex-grow:1;justify-content:flex-end;align-items:center}.woocommerce-section-header__actions .components-base-control{padding-top:0;min-height:34px}.woocommerce-section-header__actions .components-base-control__field{margin-bottom:0}.woocommerce-section-header__actions .components-base-control__field select{background:transparent}.woocommerce-ellipsis-menu__toggle{padding:0}.woocommerce-section-header__menu{display:flex;flex-direction:column;justify-content:center}.woocommerce-section-header__title{margin:0 16px 0 0;padding:3px 0;font-size:18px;font-size:1.125rem;line-height:2.2;font-weight:600}.woocommerce-segmented-selection{width:100%;color:#555d66}.woocommerce-segmented-selection__container{width:100%;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;display:-ms-grid;display:grid;border-top:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4;background-color:#ccd0d4}.woocommerce-segmented-selection__item:nth-child(2n){border-left:1px solid #ccd0d4;border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(odd){border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(-n+2){border-top:0}.woocommerce-segmented-selection__label{background-color:#f8f9f9;padding:12px 12px 12px 36px;position:relative;display:block;height:100%}.woocommerce-segmented-selection__label:active{background-color:#f3f4f5}.woocommerce-segmented-selection__label:hover{background-color:#f3f4f5}.woocommerce-segmented-selection__input{opacity:0;position:absolute;left:-9999px}.woocommerce-segmented-selection__input:active+label .woocommerce-segmented-selection__label{background-color:#f3f4f5}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label{background-color:#fff;font-weight:600}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;transform:translate(-20px,-50%)}.woocommerce-segmented-selection__input:focus+label .woocommerce-segmented-selection__label{box-shadow:inset 0 0 0 1px #24292d}.woocommerce-split-button{display:flex;align-items:center;padding:4px 0}.woocommerce-split-button .woocommerce-split-button__menu{padding:0}.woocommerce-split-button .woocommerce-split-button__main-action,.woocommerce-split-button .woocommerce-split-button__menu-toggle{line-height:26px;height:42px;border-radius:3px;white-space:nowrap;color:#555d66;border:1px solid #b5bcc2;background:#f3f4f5;box-shadow:inset 0 -1px 0 #b5bcc2;vertical-align:top}.woocommerce-split-button .woocommerce-split-button__main-action{padding:0 12px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;height:32px}.woocommerce-split-button .woocommerce-split-button__menu-toggle{border-top-left-radius:0;border-bottom-left-radius:0;padding:4px;height:32px;width:32px}.woocommerce-split-button .woocommerce-split-button__menu-popover.is-mobile{top:46px}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fafafa;border-color:#78848f;box-shadow:inset 0 -1px 0 #b5bcc2}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{background-color:#fafafa;border:1px solid #555d66;box-shadow:inset 0 -1px 0 #6c7781,0 0 0 2px #bfe7f3}.woocommerce-split-button .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button .woocommerce-split-button__main-action.components-button .gridicon{width:18px;height:18px}.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .gridicon{margin-right:8px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper{width:100%;padding:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button,.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-icon-button{color:#555d66;margin-top:4px;margin-bottom:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fff;color:#24292d;box-shadow:inset 0 0 0 1px #e2e4e7,inset 0 0 0 2px #fff,0 1px 1px rgba(25,30,35,.2)}.woocommerce-split-button .woocommerce-split-button__menu-item{width:100%;padding:4px;border-radius:0;outline:none;cursor:pointer}.woocommerce-split-button .woocommerce-split-button__menu-item .dashicon{margin-right:8px}.woocommerce-split-button .dashicons-arrow-down{fill:#555d66;height:20px;width:20px}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover>svg,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active>svg{background:initial}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover{border-color:#b5bcc2}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle{background:#95588a;color:#fff;border-color:#7c3f71;box-shadow:inset 0 -1px 0 #7c3f71}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#fff;background-color:#7c3f71;border-color:#622557;box-shadow:inset 0 -1px 0 #622557}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{color:#fff;background-color:#7c3f71;box-shadow:inset 0 -1px 0 #622557,0 0 0 2px #ffd7ff;border:1px solid #622557}.woocommerce-split-button.is-primary .dashicons-arrow-down{fill:#fff}.woocommerce-stepper{background:#fff;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);display:flex;justify-content:space-around;align-items:center;margin-bottom:24px;padding-left:16px;padding-right:16px;font-size:16px}.woocommerce-stepper .woocommerce-stepper__step{display:inline-flex;align-items:center;padding:12px;font-weight:400;color:#1a1a1a;height:48px}.woocommerce-stepper .woocommerce-stepper__step svg{display:none}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner{display:block;margin-left:-8px;margin-right:4px}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner__circle{stroke:#005fb7}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon,.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-icon{background:#005fb7;color:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active{font-weight:600}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-label{margin:0}.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-number{display:none}.woocommerce-stepper .woocommerce-stepper__step.is-complete svg{display:inline}.woocommerce-stepper .woocommerce-stepper__step-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:24px;margin-right:12px;background:#e1e2e2;color:#50575d;border-radius:50%}.woocommerce-stepper .woocommerce-stepper__step-divider{flex-grow:1;border-bottom:1px solid #e1e2e2}.woocommerce-stepper .woocommerce-stepper__step-divider:last-child{display:none}@media (max-width:782px){.woocommerce-stepper .woocommerce-stepper__step-label{display:none;padding-top:24px}.woocommerce-stepper .woocommerce-stepper__step-icon{margin-right:0}}.woocommerce-stepper.is-vertical{align-items:normal;flex-direction:column}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-divider{border-bottom:0;border-left:1px solid #e1e2e2;height:50px;margin-left:24px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-label{display:initial}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-icon{margin-right:12px}@-webkit-keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(270deg)}}@keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(270deg)}}@-webkit-keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(135deg)}to{transform:rotate(450deg)}}@keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(135deg)}to{transform:rotate(450deg)}}.woocommerce-spinner{-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;width:40px;min-width:40px;height:40px;max-height:40px}.woocommerce-spinner__circle{stroke-dasharray:200;stroke-dashoffset:0;transform-origin:center;-webkit-animation:growAndShrink 2s ease-in-out infinite;animation:growAndShrink 2s ease-in-out infinite;stroke:#1a1a1a}.woocommerce-summary{margin:16px 0;display:-ms-grid;display:grid;border-color:#ccd0d4;border-style:solid;border-width:1px 0 0 1px;background-color:#edeff0;box-shadow:inset -1px -1px 0 #ccd0d4}@media (max-width:782px){.woocommerce-summary{border-width:0}.woocommerce-summary.is-placeholder{border-top:0}.woocommerce-summary .woocommerce-summary__item-container.is-placeholder{border-top:1px solid #ccd0d4}}.woocommerce-summary .components-popover.components-popover{position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:0!important;margin-left:0}.woocommerce-summary .components-popover.components-popover .components-popover__header{display:none}.woocommerce-summary .components-popover.components-popover .components-popover__content{position:static;left:auto;right:auto;margin:0;width:100%;max-width:100%!important;max-height:100%!important;box-shadow:none;border:none;transform:none}.woocommerce-summary .components-popover.components-popover .components-popover__content .woocommerce-summary__item.is-selected{display:none}.components-popover__content .woocommerce-summary{max-height:100%;margin-top:0;margin-bottom:0;overflow-y:auto;border:none}.woocommerce-summary .woocommerce-summary__item-data{display:flex;flex-wrap:wrap}.woocommerce-summary .woocommerce-summary__item-delta,.woocommerce-summary .woocommerce-summary__item-value{flex:1 0 auto}.woocommerce-summary .woocommerce-summary__item-delta{flex:0 1 auto;display:flex;flex-wrap:none}.woocommerce-summary,.woocommerce-summary.has-1-items,.woocommerce-summary.has-one-item{-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-summary.has-2-items{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(2n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2) .woocommerce-summary__item,.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-3-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-4-items,.woocommerce-summary.has-7-items,.woocommerce-summary.has-8-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-5-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-delta,.woocommerce-summary.has-5-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-5-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}@media (min-width:1441px){.woocommerce-summary.has-6-items{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-delta,.woocommerce-summary.has-6-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-6-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items,.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-delta,.woocommerce-summary.has-9-items .woocommerce-summary__item-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-9-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}}@media (max-width:1440px){.woocommerce-summary.has-4-items .woocommerce-summary__item-delta,.woocommerce-summary.has-4-items .woocommerce-summary__item-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-delta,.woocommerce-summary.has-7-items .woocommerce-summary__item-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-delta,.woocommerce-summary.has-8-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-4-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-6-items,.woocommerce-summary.has-9-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#e2e4e7}}@media (max-width:960px){.woocommerce-summary .woocommerce-summary__item{border-right-color:#ccd0d4}}@media (max-width:782px){.woocommerce-summary .woocommerce-summary__item-container{margin-left:-16px;margin-right:-16px;width:auto}.woocommerce-summary .woocommerce-summary__item-container .woocommerce-summary__item{border-right:none}.woocommerce-summary .components-popover.components-popover{margin-left:-16px;margin-right:-16px}.woocommerce-summary .components-popover.components-popover .woocommerce-summary__item-container{margin-left:0;margin-right:0}}.woocommerce-summary__item-container{margin-bottom:0}.woocommerce-summary__item-container:last-of-type .woocommerce-summary__item{border-bottom-color:#ccd0d4!important}.woocommerce-summary__item-container.is-dropdown-button{padding:0;list-style:none;border-right:1px solid #ccd0d4}.woocommerce-summary__item-container.is-dropdown-button .components-button{border-bottom:1px solid #ccd0d4;text-align:left;display:block}@media (max-width:782px){.woocommerce-summary__item-container.is-dropdown-button{border-right:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;margin-top:2.2px;max-width:110px;width:70%}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label:after{content:"\00a0"}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-data{justify-content:space-between}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;min-width:auto}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value:after{content:"\00a0"}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{margin-top:2.2px;max-width:60px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value{margin-top:2.2px;width:50px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label{width:80px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value{width:40px}.woocommerce-summary__item{display:flex;flex-direction:column;height:100%;padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7;border-right:1px solid #e2e4e7;line-height:1.4em;text-decoration:none}.woocommerce-summary__item:hover{background-color:#f3f4f5}.woocommerce-summary__item:active{background-color:#edeff0}.woocommerce-summary__item:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 1px 0 #6c7781!important}.woocommerce-summary__item.is-selected:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 0 0 #6c7781,inset 0 4px 0 #95588a!important}.is-dropdown-button .woocommerce-summary__item{position:relative;width:100%;padding-right:56px}@media (max-width:782px){.is-dropdown-button .woocommerce-summary__item{border-right:none}}.woocommerce-summary__item .woocommerce-summary__item-data{margin-top:auto}.woocommerce-summary__item .woocommerce-summary__item-label{display:block;margin-bottom:16px;font-size:11px;font-size:.6875rem;text-transform:uppercase;color:#6c7781}.woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:4px;font-size:18px;font-size:1.125rem;font-weight:500;color:#191e23}.woocommerce-summary__item .woocommerce-summary__item-delta{margin-bottom:12px;font-size:18px;font-size:1.125rem;font-weight:300;color:#555d66}.woocommerce-summary__item.is-selected{background:#fff;box-shadow:inset 0 4px 0 #95588a}.woocommerce-summary__item.is-selected .woocommerce-summary__item-value{font-weight:600}.woocommerce-summary__item.is-selected .woocommerce-summary__item-delta{font-weight:400}.woocommerce-summary__item.is-good-trend .woocommerce-summary__item-delta{color:#4ab866}.woocommerce-summary__item.is-bad-trend .woocommerce-summary__item-delta{color:#d94f4f}.woocommerce-summary__item .woocommerce-summary__item-delta-icon{vertical-align:middle;margin-right:3px;fill:currentColor}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-up{transform:rotate(45deg)}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-down{transform:rotate(-45deg)}.woocommerce-summary__item .woocommerce-summary__item-prev-label,.woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:13px;font-size:.8125rem;color:#555d66;display:inline-block}.woocommerce-summary__item .woocommerce-summary__toggle{position:absolute;top:44px;right:16px;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item .woocommerce-summary__toggle{transition:none}}.is-dropdown-expanded .woocommerce-summary__item .woocommerce-summary__toggle{transform:rotate(-180deg)}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-label{margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-delta,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-value{font-size:13px;font-size:.8125rem;margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-label,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:11px;font-size:.6875rem}.woocommerce-table .woocommerce-card__body{padding:0;position:relative}.woocommerce-table .woocommerce-search{flex-grow:1}.woocommerce-table .woocommerce-card__action{justify-self:flex-end;margin:-13px 0}.woocommerce-table .woocommerce-card__menu{justify-self:flex-end}.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{align-items:center;text-align:left;display:-ms-grid;display:grid;width:100%;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}@media (max-width:960px){.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px;margin:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__compare,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__compare{display:flex;-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:1;grid-area:2/1/3/2}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:2/2/3/4;margin-right:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3;-ms-grid-column-align:end;justify-self:end;margin:-6px 0}}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-columns:1fr auto;grid-template-columns:1fr auto}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row-align:center;align-self:center;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row-align:center;align-self:center;-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3}@media (max-width:960px){.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:2/1/3/4;margin-left:0}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3}}.woocommerce-table.has-compare .woocommerce-search,.woocommerce-table.has-search .woocommerce-search{margin:0 16px}.woocommerce-table.has-compare .woocommerce-compare-button,.woocommerce-table.has-search .woocommerce-compare-button{padding:3px 12px;height:auto}.woocommerce-table.is-empty{align-items:center;background:#f8f9f9;color:#555d66;display:flex;height:calc(17px + 1.1375rem + 165px + 5.6875rem);height:calc(17px + 1.1375rem + (33px + 1.1375rem)*var(--number-of-rows));justify-content:center;padding:16px;text-align:center}.woocommerce-table button.woocommerce-table__download-button.is-link{padding:6px 12px;color:#000;text-decoration:none}.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:8px;height:24px;width:24px}@media (max-width:782px){.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:0}.woocommerce-table button.woocommerce-table__download-button.is-link .woocommerce-table__download-button__label{display:none}}.woocommerce-table .woocommerce-pagination{padding-top:16px;padding-bottom:16px;z-index:1;background:#fff;position:relative}.woocommerce-table__caption{font-size:24px;font-size:1.5rem;text-align:left}.woocommerce-table__table{overflow-x:auto}.woocommerce-table__table:after{content:"";position:absolute;right:0;top:0;width:41px;height:100%;background:linear-gradient(90deg,transparent,rgba(0,0,0,.2));opacity:0;pointer-events:none;transition:opacity .3s}.woocommerce-table__table.is-scrollable:after{opacity:1}.woocommerce-table__table table{border-collapse:collapse;width:100%}.woocommerce-table__table tr:focus-within,.woocommerce-table__table tr:hover{background-color:#f3f4f5}.woocommerce-table__table tr:focus-within td,.woocommerce-table__table tr:focus-within th,.woocommerce-table__table tr:hover td,.woocommerce-table__table tr:hover th{background:transparent}.woocommerce-table__header,.woocommerce-table__item{font-size:13px;font-size:.8125rem;padding:16px 24px;border-bottom:1px solid #e2e4e7;text-align:left}.woocommerce-table__header>a:only-child,.woocommerce-table__item>a:only-child{display:block}.woocommerce-table__header a:focus,.woocommerce-table__header a:hover,.woocommerce-table__item a:focus,.woocommerce-table__item a:hover{color:#622557}.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;max-width:120px;width:80%}.woocommerce-table__header .is-placeholder:after,.woocommerce-table__item .is-placeholder:after{content:"\00a0"}.woocommerce-table__header:not(.is-left-aligned),.woocommerce-table__item:not(.is-left-aligned){text-align:right}.woocommerce-table__header:not(.is-left-aligned) button,.woocommerce-table__item:not(.is-left-aligned) button{justify-content:flex-end}.woocommerce-table__header.is-numeric .is-placeholder,.woocommerce-table__item.is-numeric .is-placeholder{max-width:40px}.woocommerce-table__header .is-negative,.woocommerce-table__item .is-negative{color:#d94f4f;font-weight:700}.woocommerce-table__header.is-sorted,.woocommerce-table__item.is-sorted{background-color:#f8f9f9}.woocommerce-table__header.is-checkbox-column,.woocommerce-table__item.is-checkbox-column{width:33px;max-width:33px;padding-right:0;padding-left:16px}.woocommerce-table__header.is-checkbox-column+th,.woocommerce-table__item.is-checkbox-column+th{border-left:0}th.woocommerce-table__item{font-weight:400}.woocommerce-table__header{padding:8px 24px;background-color:#f8f9fa;border-bottom:1px solid #ccd0d4;font-weight:700;white-space:nowrap}.woocommerce-table__header+.woocommerce-table__header{border-left:1px solid #ccd0d4}.woocommerce-table__header.is-left-aligned.is-sortable{padding-left:16px}.woocommerce-table__header.is-left-aligned.is-sortable svg{display:inline-flex;order:1;margin-left:0}.woocommerce-table__header .components-button.is-button{height:auto;width:100%;padding:8px 24px 8px 0;vertical-align:middle;line-height:1;border:none;background:transparent;box-shadow:none!important}.woocommerce-table__header .components-button.is-button:hover{box-shadow:none!important}.woocommerce-table__header .components-button.is-button:active{box-shadow:none!important}.woocommerce-table__header.is-sortable{padding:0}.woocommerce-table__header.is-sortable .gridicon{visibility:hidden;margin-left:4px}.woocommerce-table__header.is-sortable .components-button:focus .gridicon,.woocommerce-table__header.is-sortable .components-button:hover .gridicon,.woocommerce-table__header.is-sortable.is-sorted .components-button .gridicon{visibility:visible}.woocommerce-table__summary{margin:0;padding:16px 0;text-align:center;z-index:1;background:#fff;position:relative}.woocommerce-table__summary-item{display:inline-block;margin-bottom:0;margin-left:8px;margin-right:8px}.woocommerce-table__summary-item .woocommerce-table__summary-label,.woocommerce-table__summary-item .woocommerce-table__summary-value{display:inline-block}.woocommerce-table__summary-item .woocommerce-table__summary-label{margin-left:4px}.woocommerce-table__summary-item .woocommerce-table__summary-value{font-weight:600}.woocommerce-tag{display:inline-flex;margin:1px 4px 1px 0;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove.components-icon-button,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#e2e4e7;transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#555d66;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 4px 0 8px;border-radius:12px 0 0 12px}.woocommerce-tag .woocommerce-tag__remove.components-icon-button{cursor:pointer;padding:0 2px;border-radius:0 12px 12px 0;color:#555d66;line-height:10px;text-indent:0}.woocommerce-tag .woocommerce-tag__remove.components-icon-button:hover{color:#32373c}.text-control-with-affixes{display:inline-flex;flex-direction:row;width:100%}.text-control-with-affixes input[type=email],.text-control-with-affixes input[type=number],.text-control-with-affixes input[type=password],.text-control-with-affixes input[type=text],.text-control-with-affixes input[type=url]{flex-grow:1;margin:0}.text-control-with-affixes input[type=email]:disabled,.text-control-with-affixes input[type=number]:disabled,.text-control-with-affixes input[type=password]:disabled,.text-control-with-affixes input[type=text]:disabled,.text-control-with-affixes input[type=url]:disabled{border-right-width:0}.text-control-with-affixes input[type=email]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=number]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=password]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=text]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=url]:disabled+.text-control-with-affixes__suffix{border-left:1px solid #e2e4e7}.text-control-with-affixes__prefix,.text-control-with-affixes__suffix{position:relative;background:#fff;border:1px solid #e2e4e7;color:#555d66;padding:7px 14px;white-space:nowrap;flex:1 0 auto;font-size:14px;line-height:1.5}.text-control-with-affixes__prefix{border-right:none}.text-control-with-affixes__prefix+input[type=email]:disabled,.text-control-with-affixes__prefix+input[type=number]:disabled,.text-control-with-affixes__prefix+input[type=password]:disabled,.text-control-with-affixes__prefix+input[type=text]:disabled,.text-control-with-affixes__prefix+input[type=url]:disabled{border-left-color:#e2e4e7;border-right-width:1px}.text-control-with-affixes__suffix{border-left:none}.woocommerce-view-more-list{padding-left:4px;margin:0 0 0 4px;vertical-align:middle}.woocommerce-view-more-list__popover{margin:0;padding:16px;text-align:left}.woocommerce-view-more-list__popover__item{display:block;margin:16px 0}.woocommerce-view-more-list__popover__item:first-child{margin-top:0}.woocommerce-view-more-list__popover__item:last-child{margin-bottom:0}
2
  .editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-right:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wp-block-button__link{color:inherit}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block}
3
  .wc-block-handpicked-products__selection{width:100%}
4
+ .wc-block-products-category__selection{width:100%}.wc-block-products-category__cancel-button.is-tertiary{margin:1em auto 0;display:block;text-align:center;font-size:1em}
5
+ .wc-block-featured-category.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-category .components-resizable-box__handle{z-index:10}.wc-block-featured-category .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-featured-category__selection{width:100%}
6
  .woocommerce-product-categories__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-categories__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-categories__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}
7
+ .wc-block-product-categories.wc-block-product-categories ul{margin-left:20px}.wc-block-product-categories .components-placeholder__label svg{margin-right:1ch;fill:currentColor}
8
+ .components-toggle-button-control .components-base-control__field{flex-wrap:wrap}.components-toggle-button-control .components-toggle-button-control__label{width:100%;margin-bottom:8px;display:block}.components-toggle-button-control .components-base-control__help{margin-top:0}
9
+ .wc-block-products-by-attribute__selection{width:100%}
10
+ .woocommerce-product-attributes__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-attributes__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-attributes__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{justify-content:center}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="{$core-grey-dark-300}" /></svg>');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0[aria-expanded=true]:after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="{$core-grey-dark-300}" /></svg>')}.woocommerce-search-list__item.woocommerce-product-attributes__item[disabled].depth-0:after{margin-left:0;width:auto;background:none}
11
+ .wc-block-featured-product.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-product .components-resizable-box__handle{z-index:10}.wc-block-featured-product__selection{width:100%}
12
+ .woocommerce-search-product__item .woocommerce-search-list__item-name .description{display:block}.woocommerce-search-product__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-product__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-product__item.is-not-active:active,.woocommerce-search-product__item.is-not-active:focus,.woocommerce-search-product__item.is-not-active:hover{background:#fff}.woocommerce-search-product__item.is-loading{justify-content:center}.woocommerce-search-product__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-product__item.depth-0.is-variable:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="{$core-grey-dark-300}" /></svg>');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-product__item.depth-0.is-variable[aria-expanded=true]:after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="{$core-grey-dark-300}" /></svg>')}
13
+ .wc-block-product-tag__selection{width:100%}.wc-block-product-tag__cancel-button.is-tertiary{margin:1em auto 0;display:block;text-align:center;font-size:1em}
14
+ .woocommerce-product-tags__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-tags__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-tags__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}
build/{products-attribute.deps.json → featured-category.deps.json} RENAMED
File without changes
build/featured-category.js ADDED
@@ -0,0 +1 @@
 
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],d=0,b=[];d<i.length;d++)a=i[d],c[a]&&b.push(c[a][0]),c[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(u&&u(t);b.length;)b.shift()();return r.push.apply(r,s||[]),o()}function o(){for(var e,t=0;t<r.length;t++){for(var o=r[t],n=!0,i=1;i<o.length;i++){var l=o[i];0!==c[l]&&(n=!1)}n&&(r.splice(t--,1),e=a(a.s=o[0]))}return e}var n={},c={4:0},r=[];function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=n,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(o,n,function(t){return e[t]}.bind(null,n));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return r.push([520,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},28:function(e,t,o){"use strict";var n=o(0),c=o(3),r=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},l=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.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"}))})},s=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.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"}))})},u=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=o(6),b=o.n(d),g=o(4),p=o.n(g),h=function(e){var t=e.size,o=void 0===t?20:t,r=e.className;return Object(n.createElement)(c.Icon,{className:b()("woo-icon",r),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:o,width:Math.floor(1.67*o),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};h.propTypes={size:p.a.number,className:p.a.string};var m=h;o.d(t,"a",function(){return r}),o.d(t,"b",function(){return a}),o.d(t,"c",function(){return i}),o.d(t,"d",function(){return l}),o.d(t,"e",function(){return s}),o.d(t,"f",function(){return u}),o.d(t,"g",function(){return m})},29:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var n=o(27),c=o.n(n),r=o(13),a=o.n(r),i=o(14),l=o.n(i),s=o(15),u=o.n(s),d=o(16),b=o.n(d),g=o(12),p=o.n(g),h=o(17),m=o.n(h),f=o(0),w=o(1),O=o(19),v=o(10),j=o.n(v),y=o(5),_=o(4),k=o.n(_),E=o(24),C=o(3),x=(o(79),function(e){function t(){var e;return a()(this,t),(e=u()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(p()(e)),e}return m()(t,e),l()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(O.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,n=e.depth,r=void 0===n?0:n,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===r&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(f.createElement)(E.b,c()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,n=this.props,c=n.onChange,r=n.onOperatorChange,a=n.operator,i=n.selected,l=n.isSingle,s={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(f.createElement)(f.Fragment,null,Object(f.createElement)(E.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:c,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:l}),!!r&&Object(f.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(f.createElement)(C.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:r,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(f.Component));x.propTypes={onChange:k.a.func.isRequired,onOperatorChange:k.a.func,operator:k.a.oneOf(["all","any"]),selected:k.a.array.isRequired,isSingle:k.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},510:function(e,t,o){var n=o(511);"string"==typeof n&&(n=[[e.i,n,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};o(38)(n,c);n.locals&&(e.exports=n.locals)},511:function(e,t,o){},52:function(e,t){!function(){e.exports=this.wp.date}()},520:function(e,t,o){"use strict";o.r(t);var n=o(0),c=o(1),r=o(9),a=o(18),i=(o(508),o(510),o(13)),l=o.n(i),s=o(14),u=o.n(s),d=o(15),b=o.n(d),g=o(16),p=o.n(g),h=o(12),m=o.n(h),f=o(17),w=o.n(f),O=o(10),v=o.n(O),j=o(3),y=o(6),_=o.n(y),k=o(22),E=o(5),C=o(4),x=o.n(C),S=o(28),M=o(37),I=wc_product_block_data.min_height;function z(e){return Object(E.isObject)(e.image)?e.image.src:""}var P=function(e){function t(){var e;return l()(this,t),(e=b()(this,p()(t).apply(this,arguments))).state={category:!1,loaded:!1},e.debouncedGetCategory=Object(E.debounce)(e.getCategory.bind(m()(e)),200),e}return w()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.getCategory()}},{key:"componentDidUpdate",value:function(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.debouncedGetCategory()}},{key:"getCategory",value:function(){var e=this,t=this.props.attributes.categoryId;t?v()({path:"/wc/blocks/products/categories/".concat(t)}).then(function(t){e.setState({category:t,loaded:!0})}).catch(function(){e.setState({category:!1,loaded:!0})}):this.setState({category:!1,loaded:!0})}},{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,a=e.overlayColor,i=e.setOverlayColor,l=t.mediaSrc||z(this.state.category),s=t.focalPoint,u=void 0===s?{x:.5,y:.5}:s,d="function"==typeof j.FocalPointPicker;return Object(n.createElement)(r.InspectorControls,{key:"inspector"},Object(n.createElement)(j.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(j.ToggleControl,{label:Object(c.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:function(){return o({showDesc:!t.showDesc})}})),Object(n.createElement)(r.PanelColorSettings,{title:Object(c.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:a.color,onChange:i,label:Object(c.__)("Overlay Color","woo-gutenberg-products-block")}]},!!l&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(j.RangeControl,{label:Object(c.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:function(e){return o({dimRatio:e})},min:0,max:100,step:10}),d&&Object(n.createElement)(j.FocalPointPicker,{label:Object(c.__)("Focal Point Picker"),url:l,value:u,onChange:function(e){return o({focalPoint:e})}}))))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,o=e.debouncedSpeak,r=e.setAttributes;return Object(n.createElement)(j.Placeholder,{icon:Object(n.createElement)(S.b,null),label:Object(c.__)("Featured Category","woo-gutenberg-products-block"),className:"wc-block-featured-category"},Object(c.__)("Visually highlight a product category and encourage prompt action","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-featured-category__selection"},Object(n.createElement)(M.a,{selected:[t.categoryId],onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({categoryId:t,mediaId:0,mediaSrc:""})},isSingle:!0}),Object(n.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),o(Object(c.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,o=this,a=this.props,i=a.attributes,l=a.isSelected,s=a.overlayColor,u=a.setAttributes,d=i.className,b=i.contentAlign,g=i.dimRatio,p=i.editMode,h=i.focalPoint,m=i.height,f=i.showDesc,w=this.state,O=w.loaded,v=w.category,y=_()("wc-block-featured-category",{"is-selected":l,"is-loading":!v&&!O,"is-not-found":!v&&O,"has-background-dim":0!==g},0===(e=g)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==b&&"has-".concat(b,"-content"),d),k=i.mediaId||function(e){return Object(E.isObject)(e.image)?e.image.id:0}(v),C=i.mediaSrc||z(this.state.category),x=v?(t=C)?{backgroundImage:"url(".concat(t,")")}:{}:{};s.color&&(x.backgroundColor=s.color),h&&(x.backgroundPosition="".concat(100*h.x,"% ").concat(100*h.y,"%"));return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(r.BlockControls,null,Object(n.createElement)(r.AlignmentToolbar,{value:b,onChange:function(e){u({contentAlign:e})}}),Object(n.createElement)(r.MediaUploadCheck,null,Object(n.createElement)(j.Toolbar,null,Object(n.createElement)(r.MediaUpload,{onSelect:function(e){u({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:k,render:function(e){var t=e.open;return Object(n.createElement)(j.IconButton,{className:"components-toolbar__control",label:Object(c.__)("Edit media"),icon:"format-image",onClick:t,disabled:!o.state.category})}})))),!i.editMode&&this.getInspectorControls(),p?this.renderEditMode():Object(n.createElement)(n.Fragment,null,v?Object(n.createElement)(j.ResizableBox,{className:y,size:{height:m},minHeight:I,enable:{bottom:!0},onResizeStop:function(e,t,o){u({height:parseInt(o.style.height)})},style:x},Object(n.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(n.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:v.name}}),f&&Object(n.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:v.description}}),Object(n.createElement)("div",{className:"wc-block-featured-category__link"},Object(n.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(c.__)("Shop now","woo-gutenberg-products-block"),url:v.permalink,align:"center"}]],templateLock:"all"})))):Object(n.createElement)(j.Placeholder,{className:"wc-block-featured-category",icon:Object(n.createElement)(S.b,null),label:Object(c.__)("Featured Category","woo-gutenberg-products-block")},O?Object(c.__)("No product category is selected.","woo-gutenberg-products-block"):Object(n.createElement)(j.Spinner,null))))}}]),t}(n.Component);P.propTypes={attributes:x.a.object.isRequired,isSelected:x.a.bool.isRequired,name:x.a.string.isRequired,setAttributes:x.a.func.isRequired,overlayColor:x.a.object,setOverlayColor:x.a.func.isRequired,debouncedSpeak:x.a.func.isRequired};var B=Object(k.compose)([Object(r.withColors)({overlayColor:"background-color"}),j.withSpokenMessages])(P);Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(c.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(S.b,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(c.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0}},edit:function(e){return Object(n.createElement)(B,e)},save:function(){return Object(n.createElement)(r.InnerBlocks.Content,null)}})},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/featured-product.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var n,i,a=t[0],u=t[1],l=t[2],d=0,p=[];d<a.length;d++)i=a[d],c[i]&&p.push(c[i][0]),c[i]=0;for(n in u)Object.prototype.hasOwnProperty.call(u,n)&&(e[n]=u[n]);for(s&&s(t);p.length;)p.shift()();return r.push.apply(r,l||[]),o()}function o(){for(var e,t=0;t<r.length;t++){for(var o=r[t],n=!0,a=1;a<o.length;a++){var u=o[a];0!==c[u]&&(n=!1)}n&&(r.splice(t--,1),e=i(i.s=o[0]))}return e}var n={},c={5:0},r=[];function i(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=n,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},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||[],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 r.push([541,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},35:function(e,t){!function(){e.exports=this.wp.url}()},38:function(e,t){!function(){e.exports=this.wp.keycodes}()},4:function(e,t){!function(){e.exports=this.lodash}()},50:function(e,t){!function(){e.exports=this.ReactDOM}()},51:function(e,t){!function(){e.exports=this.wp.viewport}()},539:function(e,t,o){var n=o(540);"string"==typeof n&&(n=[[e.i,n,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};o(66)(n,c);n.locals&&(e.exports=n.locals)},540:function(e,t,o){},541:function(e,t,o){"use strict";o.r(t);var n=o(0),c=o(1),r=o(18),i=o(27),a=(o(537),o(539),o(22)),u=o.n(a),l=o(23),s=o.n(l),d=o(24),p=o.n(d),b=o(25),h=o.n(b),f=o(33),g=o.n(f),m=o(26),w=o.n(m),_=o(17),O=o.n(_),k=o(3),v=o(6),j=o.n(v),y=o(30),S=o(4),C=o(5),P=o.n(C),E=o(37),x=o(78),I=function(e){function t(){var e;return u()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(S.debounce)(e.onSearch.bind(g()(e)),400),e}return w()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(x.a)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(e){var t=this,o=this.props.selected;Object(x.a)({selected:o,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,i=r.onChange,a=r.selected,u={list:Object(c.__)("Products","woo-gutenberg-products-block"),noItems:Object(c.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(c.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(c.__)("Product search results updated.","woo-gutenberg-products-block")};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(E.a,{className:"woocommerce-products",list:t,isLoading:o,isSingle:!0,selected:[Object(S.find)(t,{id:a})],onChange:i,onSearch:x.b?this.debouncedOnSearch:null,messages:u}))}}]),t}(n.Component);I.propTypes={onChange:P.a.func.isRequired,selected:P.a.number.isRequired};var M=I;function R(e){var t=e.images,o=void 0===t?[]:t;return o.length&&o[0].src||""}var T=wc_product_block_data.min_height;var N=function(e){function t(){var e;return u()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={product:!1,loaded:!1},e.debouncedGetProduct=Object(S.debounce)(e.getProduct.bind(g()(e)),200),e}return w()(t,e),s()(t,[{key:"componentDidMount",value:function(){this.getProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.debouncedGetProduct()}},{key:"getProduct",value:function(){var e=this,t=this.props.attributes.productId;t?O()({path:"/wc-blocks/v1/products/".concat(t)}).then(function(t){e.setState({product:t,loaded:!0})}).catch(function(){e.setState({product:!1,loaded:!0})}):this.setState({product:!1,loaded:!0})}},{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,i=e.overlayColor,a=e.setOverlayColor,u=t.mediaSrc||R(this.state.product),l=t.focalPoint,s=void 0===l?{x:.5,y:.5}:l;return Object(n.createElement)(r.InspectorControls,{key:"inspector"},Object(n.createElement)(k.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(k.ToggleControl,{label:Object(c.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:function(){return o({showDesc:!t.showDesc})}}),Object(n.createElement)(k.ToggleControl,{label:Object(c.__)("Show price","woo-gutenberg-products-block"),checked:t.showPrice,onChange:function(){return o({showPrice:!t.showPrice})}})),Object(n.createElement)(r.PanelColorSettings,{title:Object(c.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:i.color,onChange:a,label:Object(c.__)("Overlay Color","woo-gutenberg-products-block")}]},Object(n.createElement)(k.RangeControl,{label:Object(c.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:function(e){return o({dimRatio:e})},min:0,max:100,step:10}),!!k.FocalPointPicker&&!!u&&Object(n.createElement)(k.FocalPointPicker,{label:Object(c.__)("Focal Point Picker"),url:u,value:s,onChange:function(e){return o({focalPoint:e})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,o=e.debouncedSpeak,r=e.setAttributes;return Object(n.createElement)(k.Placeholder,{icon:"star-filled",label:Object(c.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(c.__)("Visually highlight a product and encourage prompt action","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(n.createElement)(M,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({productId:t,mediaId:0,mediaSrc:""})}}),Object(n.createElement)(k.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),o(Object(c.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,o,i,a=this,u=this.props,l=u.attributes,s=u.isSelected,d=u.overlayColor,p=u.setAttributes,b=l.className,h=l.contentAlign,f=l.dimRatio,g=l.editMode,m=l.focalPoint,w=l.height,_=l.showDesc,O=l.showPrice,v=this.state,y=v.loaded,C=v.product,P=j()("wc-block-featured-product",{"is-selected":s,"is-loading":!C&&!y,"is-not-found":!C&&y,"has-background-dim":0!==f},0===(e=f)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==h&&"has-".concat(h,"-content"),b),E=l.mediaId||(t=C.images,(o=void 0===t?[]:t).length&&o[0].id||0),x=C?(i=l.mediaSrc||C,Object(S.isObject)(i)&&(i=R(i)),i?{backgroundImage:"url(".concat(i,")")}:{}):{};d.color&&(x.backgroundColor=d.color),m&&(x.backgroundPosition="".concat(100*m.x,"% ").concat(100*m.y,"%"));return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(r.BlockControls,null,Object(n.createElement)(r.AlignmentToolbar,{value:h,onChange:function(e){p({contentAlign:e})}}),Object(n.createElement)(r.MediaUploadCheck,null,Object(n.createElement)(k.Toolbar,null,Object(n.createElement)(r.MediaUpload,{onSelect:function(e){p({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:E,render:function(e){var t=e.open;return Object(n.createElement)(k.IconButton,{className:"components-toolbar__control",label:Object(c.__)("Edit media"),icon:"format-image",onClick:t,disabled:!a.state.product})}})))),!l.editMode&&this.getInspectorControls(),g?this.renderEditMode():Object(n.createElement)(n.Fragment,null,C?Object(n.createElement)(k.ResizableBox,{className:P,size:{height:w},minHeight:T,enable:{bottom:!0},onResizeStop:function(e,t,o){p({height:parseInt(o.style.height)})},style:x},Object(n.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(n.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:C.name}}),_&&Object(n.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:C.short_description}}),O&&Object(n.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:C.price_html}}),Object(n.createElement)("div",{className:"wc-block-featured-product__link"},Object(n.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(c.__)("Shop now","woo-gutenberg-products-block"),url:C.permalink,align:"center"}]],templateLock:"all"})))):Object(n.createElement)(k.Placeholder,{className:"wc-block-featured-product",icon:"star-filled",label:Object(c.__)("Featured Product","woo-gutenberg-products-block")},y?Object(c.__)("No product is selected.","woo-gutenberg-products-block"):Object(n.createElement)(k.Spinner,null))))}}]),t}(n.Component);N.propTypes={attributes:P.a.object.isRequired,isSelected:P.a.bool.isRequired,name:P.a.string.isRequired,setAttributes:P.a.func.isRequired,overlayColor:P.a.object,setOverlayColor:P.a.func.isRequired,debouncedSpeak:P.a.func.isRequired};var B=Object(y.compose)([Object(r.withColors)({overlayColor:"background-color"}),k.withSpokenMessages])(N);Object(i.registerBlockType)("woocommerce/featured-product",{title:Object(c.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:"star-filled",foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Visually highlight a product and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(c.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0}},edit:function(e){return Object(n.createElement)(B,e)},save:function(){return Object(n.createElement)(r.InnerBlocks.Content,null)}})},65:function(e,t){!function(){e.exports=this.wp.hooks}()},67:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},68:function(e,t){!function(){e.exports=this.wp.date}()},76:function(e,t){!function(){e.exports=this.wp.dom}()},78:function(e,t,o){"use strict";o.d(t,"b",function(){return a}),o.d(t,"a",function(){return u});var n=o(35),c=o(17),r=o.n(c),i=o(4),a=wc_product_block_data.isLargeCatalog||!1,u=function(e){var t=e.selected,o=function(e){var t=e.selected,o=void 0===t?[]:t,c=e.search,r=[Object(n.addQueryArgs)("/wc-blocks/v1/products",{per_page:a?100:-1,catalog_visibility:"visible",status:"publish",search:c})];return a&&o.length&&r.push(Object(n.addQueryArgs)("/wc-blocks/v1/products",{catalog_visibility:"visible",status:"publish",include:o})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(o.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})}},8:function(e,t){!function(){e.exports=this.moment}()},80:function(e,t){},81:function(e,t){},83:function(e,t){},84:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var c,a,i=t[0],s=t[1],l=t[2],d=0,p=[];d<i.length;d++)a=i[d],o[a]&&p.push(o[a][0]),o[a]=0;for(c in s)Object.prototype.hasOwnProperty.call(s,c)&&(e[c]=s[c]);for(u&&u(t);p.length;)p.shift()();return r.push.apply(r,l||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],c=!0,i=1;i<n.length;i++){var s=n[i];0!==o[s]&&(c=!1)}c&&(r.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},o={5:0},r=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var u=s;return r.push([513,0,2,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},28:function(e,t,n){"use strict";var c=n(0),o=n(3),r=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.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"}))})},l=function(){return Object(c.createElement)(o.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.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"}))})},u=function(){return Object(c.createElement)(o.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),p=n.n(d),b=n(4),h=n.n(b),m=function(e){var t=e.size,n=void 0===t?20:t,r=e.className;return Object(c.createElement)(o.Icon,{className:p()("woo-icon",r),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};m.propTypes={size:h.a.number,className:h.a.string};var f=m;n.d(t,"a",function(){return r}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return i}),n.d(t,"d",function(){return s}),n.d(t,"e",function(){return l}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return f})},29:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t){!function(){e.exports=this.ReactDOM}()},39:function(e,t){!function(){e.exports=this.wp.viewport}()},43:function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"a",function(){return d});var c=n(19),o=n(10),r=n.n(o),a=n(5),i=wc_product_block_data.isLargeCatalog||!1,s=wc_product_block_data.limitTags||!1,l=wc_product_block_data.hasTags||!1,u=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,o=e.search,r=[Object(c.addQueryArgs)("/wc/blocks/products",{per_page:i?100:-1,catalog_visibility:"visible",status:"publish",search:o})];return i&&n.length&&r.push(Object(c.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")})},d=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,o=e.search,r=[Object(c.addQueryArgs)("/wc/blocks/products/tags",{per_page:s?100:-1,orderby:s?"count":"name",order:s?"desc":"asc",search:o})];return s&&n.length&&r.push(Object(c.addQueryArgs)("/wc/blocks/products/tags",{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")})}},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},500:function(e,t,n){var c=n(501);"string"==typeof c&&(c=[[e.i,c,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(38)(c,o);c.locals&&(e.exports=c.locals)},501:function(e,t,n){},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},513:function(e,t,n){"use strict";n.r(t);var c=n(0),o=n(1),r=n(9),a=n(18),i=(n(498),n(500),n(13)),s=n.n(i),l=n(14),u=n.n(l),d=n(15),p=n.n(d),b=n(16),h=n.n(b),m=n(12),f=n.n(m),g=n(17),v=n.n(g),w=n(10),O=n.n(w),j=n(3),_=n(6),k=n.n(_),y=n(22),E=n(5),S=n(4),x=n.n(S),C=n(60),P=n.n(C),M=n(27),I=n.n(M),z=n(92),L=n.n(z),N=n(8),B=n.n(N),R=n(19),T=n(24),H=n(43),A=n(28);n(502);function F(e,t){if(!t)return e;var n=new RegExp(Object(E.escapeRegExp)(t),"ig");return e.replace(n,"<strong>$&</strong>")}var D=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(c.createElement)(A.d,null):Object(c.createElement)(A.e,null)},q=function(e){function t(){var e;return s()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={products:[],product:0,variationsList:{},variationsLoading:!1,loading:!0},e.debouncedOnSearch=Object(E.debounce)(e.onSearch.bind(f()(e)),400),e.debouncedGetVariations=Object(E.debounce)(e.getVariations.bind(f()(e)),200),e.renderItem=e.renderItem.bind(f()(e)),e.onProductSelect=e.onProductSelect.bind(f()(e)),e}return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(H.b)({selected:t}).then(function(t){t=t.map(function(e){var t=e.variations?e.variations.length:0;return B()({},e,{parent:0,count:t})}),e.setState({products:t,loading:!1})}).catch(function(){e.setState({products:[],loading:!1})})}},{key:"componentDidUpdate",value:function(e,t){t.product!==this.state.product&&this.debouncedGetVariations()}},{key:"getVariations",value:function(){var e=this,t=this.state,n=t.product,c=t.variationsList;if(n){var o=this.state.products.find(function(e){return e.id===n});o.variations&&0!==o.variations.length&&(c[n]||this.setState({variationsLoading:!0}),O()({path:Object(R.addQueryArgs)("/wc/blocks/products/".concat(n,"/variations"),{per_page:-1})}).then(function(t){t=t.map(function(e){return B()({},e,{parent:n})}),e.setState(function(e){return{variationsList:B()({},e.variationsList,L()({},n,t)),variationsLoading:!1}})}).catch(function(){e.setState({termsLoading:!1})}))}else this.setState({variationsList:{},variationsLoading:!1})}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(H.b)({selected:n,search:e}).then(function(e){t.setState({products:e,loading:!1})}).catch(function(){t.setState({products:[],loading:!1})})}},{key:"onProductSelect",value:function(e,t){var n=this;return function(){n.setState({product:t?0:e.id})}}},{key:"renderItem",value:function(e){var t=this,n=e.item,r=e.search,a=e.depth,i=void 0===a?0:a,s=e.isSelected,l=e.onSelect,u=this.state,d=u.product,p=u.variationsLoading,b=k()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(i),{"is-searching":r.length>0,"is-skip-level":0===i&&0!==n.parent,"is-variable":n.count>0}),h=Object.assign({},e);delete h.isSingle;var m={role:"menuitemradio"};return n.breadcrumbs.length&&(m["aria-label"]="".concat(n.breadcrumbs[0],": ").concat(n.name)),n.count&&(m["aria-expanded"]=n.id===d),n.breadcrumbs.length?(Object(E.isEmpty)(n.variation)||(n.name=n.variation),Object(c.createElement)(T.b,I()({className:b},e,m))):[Object(c.createElement)(j.MenuItem,I()({key:"product-".concat(n.id),isSelected:s},h,m,{className:b,onClick:function(){l(n)(),t.onProductSelect(n,s)()}}),Object(c.createElement)("span",{className:"woocommerce-search-list__item-state"},D(s)),Object(c.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(c.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:F(n.name,r)}})),n.count?Object(c.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(o.sprintf)(Object(o._n)("%d variation","%d variations",n.count,"woo-gutenberg-products-block"),n.count)):null),d===n.id&&n.count>0&&p&&Object(c.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(c.createElement)(j.Spinner,null))]}},{key:"render",value:function(){var e=this.state,t=e.products,n=e.loading,r=e.product,a=e.variationsList,i=this.props,s=i.onChange,l=i.selected,u=a[r]||[],d=[].concat(P()(t),P()(u)),p={list:Object(o.__)("Products","woo-gutenberg-products-block"),noItems:Object(o.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(o.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(o.__)("Product search results updated.","woo-gutenberg-products-block")},b=l?[Object(E.find)(d,{id:l})]:[];return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(T.a,{className:"woocommerce-products",list:d,isLoading:n,isSingle:!0,selected:b,onChange:s,onSearch:H.d?this.debouncedOnSearch:null,messages:p,renderItem:this.renderItem,isHierarchical:!0}))}}]),t}(c.Component);q.propTypes={onChange:x.a.func.isRequired,selected:x.a.number.isRequired};var V=q;function Q(e){var t=e.images,n=void 0===t?[]:t;return n.length&&n[0].src||""}var G=wc_product_block_data.min_height;var U=function(e){function t(){var e;return s()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={product:!1,loaded:!1},e.debouncedGetProduct=Object(E.debounce)(e.getProduct.bind(f()(e)),200),e}return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.getProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.debouncedGetProduct()}},{key:"getProduct",value:function(){var e=this,t=this.props.attributes.productId;t?O()({path:"/wc/blocks/products/".concat(t)}).then(function(t){e.setState({product:t,loaded:!0})}).catch(function(){e.setState({product:!1,loaded:!0})}):this.setState({product:!1,loaded:!0})}},{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,a=e.overlayColor,i=e.setOverlayColor,s=t.mediaSrc||Q(this.state.product),l=t.focalPoint,u=void 0===l?{x:.5,y:.5}:l,d="function"==typeof j.FocalPointPicker;return Object(c.createElement)(r.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(j.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:function(){return n({showDesc:!t.showDesc})}}),Object(c.createElement)(j.ToggleControl,{label:Object(o.__)("Show price","woo-gutenberg-products-block"),checked:t.showPrice,onChange:function(){return n({showPrice:!t.showPrice})}})),Object(c.createElement)(r.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:a.color,onChange:i,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},!!s&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(j.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10}),d&&Object(c.createElement)(j.FocalPointPicker,{label:Object(o.__)("Focal Point Picker"),url:s,value:u,onChange:function(e){return n({focalPoint:e})}}))))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,r=e.setAttributes;return Object(c.createElement)(j.Placeholder,{icon:"star-filled",label:Object(o.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(o.__)("Visually highlight a product or variation and encourage prompt action","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-product__selection"},Object(c.createElement)(V,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({productId:t,mediaId:0,mediaSrc:""})}}),Object(c.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),n(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,n,a,i=this,s=this.props,l=s.attributes,u=s.isSelected,d=s.overlayColor,p=s.setAttributes,b=l.className,h=l.contentAlign,m=l.dimRatio,f=l.editMode,g=l.focalPoint,v=l.height,w=l.showDesc,O=l.showPrice,_=this.state,y=_.loaded,S=_.product,x=k()("wc-block-featured-product",{"is-selected":u,"is-loading":!S&&!y,"is-not-found":!S&&y,"has-background-dim":0!==m},0===(e=m)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==h&&"has-".concat(h,"-content"),b),C=l.mediaId||(t=S.images,(n=void 0===t?[]:t).length&&n[0].id||0),P=S?(a=l.mediaSrc||S,Object(E.isObject)(a)&&(a=Q(a)),a?{backgroundImage:"url(".concat(a,")")}:{}):{};d.color&&(P.backgroundColor=d.color),g&&(P.backgroundPosition="".concat(100*g.x,"% ").concat(100*g.y,"%"));return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(r.BlockControls,null,Object(c.createElement)(r.AlignmentToolbar,{value:h,onChange:function(e){p({contentAlign:e})}}),Object(c.createElement)(r.MediaUploadCheck,null,Object(c.createElement)(j.Toolbar,null,Object(c.createElement)(r.MediaUpload,{onSelect:function(e){p({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:C,render:function(e){var t=e.open;return Object(c.createElement)(j.IconButton,{className:"components-toolbar__control",label:Object(o.__)("Edit media"),icon:"format-image",onClick:t,disabled:!i.state.product})}})))),!l.editMode&&this.getInspectorControls(),f?this.renderEditMode():Object(c.createElement)(c.Fragment,null,S?Object(c.createElement)(j.ResizableBox,{className:x,size:{height:v},minHeight:G,enable:{bottom:!0},onResizeStop:function(e,t,n){p({height:parseInt(n.style.height)})},style:P},Object(c.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:S.name}}),!Object(E.isEmpty)(S.variation)&&Object(c.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:S.variation}}),w&&Object(c.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:S.description}}),O&&Object(c.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:S.price_html}}),Object(c.createElement)("div",{className:"wc-block-featured-product__link"},Object(c.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:S.permalink,align:"center"}]],templateLock:"all"})))):Object(c.createElement)(j.Placeholder,{className:"wc-block-featured-product",icon:"star-filled",label:Object(o.__)("Featured Product","woo-gutenberg-products-block")},y?Object(o.__)("No product is selected.","woo-gutenberg-products-block"):Object(c.createElement)(j.Spinner,null))))}}]),t}(c.Component);U.propTypes={attributes:x.a.object.isRequired,isSelected:x.a.bool.isRequired,name:x.a.string.isRequired,setAttributes:x.a.func.isRequired,overlayColor:x.a.object,setOverlayColor:x.a.func.isRequired,debouncedSpeak:x.a.func.isRequired};var W=Object(y.compose)([Object(r.withColors)({overlayColor:"background-color"}),j.withSpokenMessages])(U);Object(a.registerBlockType)("woocommerce/featured-product",{title:Object(o.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:"star-filled",foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Visually highlight a product or variation and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(o.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0}},edit:function(e){return Object(c.createElement)(W,e)},save:function(){return Object(c.createElement)(r.InnerBlocks.Content,null)}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/frontend.deps.json CHANGED
@@ -1 +1 @@
1
- ["lodash","wp-components","wp-compose","wp-element","wp-i18n","wp-polyfill"]
1
+ ["react","react-dom","wp-i18n","wp-polyfill"]
build/frontend.js CHANGED
@@ -1 +1,12 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.frontend=function(e){function t(t){for(var r,i,a=t[0],s=t[1],u=t[2],p=0,d=[];p<a.length;p++)i=a[p],o[i]&&d.push(o[i][0]),o[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,a=1;a<n.length;a++){var s=n[a];0!==o[s]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},o={6:0},c=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var l=s;return c.push([306,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},114:function(e,t,n){"use strict";var r=n(22),o=n.n(r),c=n(23),i=n.n(c),a=n(24),s=n.n(a),u=n(25),l=n.n(u),p=n(33),d=n.n(p),f=n(26),h=n.n(f),b=n(0),v=n(1),m=n(6),g=n.n(m),O=n(3),w=n(4),y=n(5),j=n.n(y),k=n(30),_=n(77),E=n.n(_),x=n(15),N=n.n(x);function S(e){var t=e.hasEmpty,n=e.isHierarchical,r=wc_product_block_data.productCategories.filter(function(e){return t||!!e.count});return n?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(w.groupBy)(e,"parent"),n=function e(n){return n.map(function(n){var r=t[n.term_id];return delete t[n.term_id],N()({},n,{children:r&&r.length?e(r):[]})})},r=n(t[0]||[]);return delete t[0],Object(w.forEach)(t,function(e){r.push.apply(r,E()(n(e||[])))}),r}(r):r}var P=function(e){function t(){var e;return o()(this,t),(e=s()(this,l()(t).apply(this,arguments))).select=Object(b.createRef)(),e.onNavigate=e.onNavigate.bind(d()(e)),e.renderList=e.renderList.bind(d()(e)),e.renderOptions=e.renderOptions.bind(d()(e)),e}return h()(t,e),i()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var r=wc_product_block_data.homeUrl;t||0!==n.indexOf(r)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props.isPreview,o=void 0!==r&&r,c=this.props.attributes.hasCount,i="parent-"+e[0].term_id;return Object(b.createElement)("ul",{key:i},e.map(function(e){var r=c?Object(b.createElement)("span",null,"(",e.count,")"):null;return[Object(b.createElement)("li",{key:e.term_id},Object(b.createElement)("a",{href:o?null:e.link},e.name)," ",r," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]}))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props.attributes.hasCount;return e.map(function(e){var o=r?"(".concat(e.count,")"):null;return[Object(b.createElement)("option",{key:e.term_id,value:e.link},Object(w.repeat)("–",n)," ",e.name," ",o),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.instanceId,r=t.className,o=t.isDropdown,c=S(t),i=g()("wc-block-product-categories",r,{"is-dropdown":o,"is-list":!o}),a="prod-categories-".concat(n);return Object(b.createElement)("div",{className:i},o?Object(b.createElement)(b.Fragment,null,Object(b.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(b.createElement)("label",{className:"screen-reader-text",htmlFor:a},Object(v.__)("Select a category","woo-gutenberg-products-block")),Object(b.createElement)("select",{id:a,ref:this.select},Object(b.createElement)("option",{value:"false",hidden:!0},Object(v.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(c))),Object(b.createElement)(O.IconButton,{icon:"arrow-right-alt2",label:Object(v.__)("Go to category","woo-gutenberg-products-block"),onClick:this.onNavigate})):this.renderList(c))}}]),t}(b.Component);P.propTypes={attributes:j.a.object.isRequired,instanceId:j.a.number,isPreview:j.a.bool};t.a=Object(k.withInstanceId)(P)},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},306:function(e,t,n){e.exports=n(307)},307:function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(4),c=n(114),i=document.querySelectorAll(".wp-block-woocommerce-product-categories");i.length&&Object(o.forEach)(i,function(e){var t=JSON.parse(JSON.stringify(e.dataset)),n={hasCount:"true"===t.hasCount,hasEmpty:"true"===t.hasEmpty,isDropdown:"true"===t.isDropdown,isHierarchical:"true"===t.isHierarchical};e.classList.remove("is-loading"),Object(r.render)(Object(r.createElement)(c.a,{attributes:n}),e)})},4:function(e,t){!function(){e.exports=this.lodash}()}});
 
 
 
 
 
 
 
 
 
 
 
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=19)}([function(e,t){!function(){e.exports=this.React}()},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){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},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}},function(e,t,r){var n=r(13),o=r(1);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},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},function(e,t,r){var n=r(14);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)}},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.ReactDOM}()},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
+ */
7
+ /*!
8
+ Copyright (c) 2017 Jed Watson.
9
+ Licensed under the MIT License (MIT), see
10
+ http://jedwatson.github.io/classnames
11
+ */
12
+ !function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)&&n.length){var c=o.apply(null,n);c&&e.push(c)}else if("object"===i)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)}()},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},function(e,t,r){var n=r(15),o=r(16),i=r(17);e.exports=function(e){return n(e)||o(e)||i()}},function(e,t,r){var n=r(18);e.exports=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?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){n(e,t,r[t])})}return e}},function(e,t){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)}function n(t){return"function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?e.exports=n=function(e){return r(e)}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(t)}e.exports=n},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},function(e,t){e.exports=function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}},function(e,t){e.exports=function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},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}},function(e,t,r){"use strict";r.r(t);var n=r(8),o=r(2),i=r.n(o),c=r(3),a=r.n(c),u=r(4),l=r.n(u),s=r(5),f=r.n(s),p=r(1),d=r.n(p),y=r(6),b=r.n(y),h=r(7),m=r(0),v=r(9),g=r.n(v),O=r(10),w=r.n(O),x=[],_=function(e){return function(t){function r(){return i()(this,r),l()(this,f()(r).apply(this,arguments))}return b()(r,t),a()(r,[{key:"generateUniqueID",value:function(){var e=r.name;return x[e]||(x[e]=0),x[e]++,x[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return React.createElement(e,w()({},this.props,{componentId:t}))}}]),r}(m.Component)}(function(e){function t(){var e;return i()(this,t),(e=l()(this,f()(t).apply(this,arguments))).select=Object(m.createRef)(),e.onNavigate=e.onNavigate.bind(d()(e)),e.renderList=e.renderList.bind(d()(e)),e.renderOptions=e.renderOptions.bind(d()(e)),e}return b()(t,e),a()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,r=this.select.current.value;if("false"!==r){var n=wc_product_block_data.homeUrl;t||0!==r.indexOf(n)||(document.location.href=r)}}},{key:"renderList",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.isPreview,o=void 0!==n&&n,i=this.props.attributes.hasCount,c="parent-"+e[0].term_id;return React.createElement("ul",{key:c},e.map(function(e){var n=i?React.createElement("span",null,"(",e.count,")"):null;return[React.createElement("li",{key:e.term_id},React.createElement("a",{href:o?null:e.link},e.name)," ",n," "),!!e.children&&!!e.children.length&&t.renderList(e.children,r+1)]}))}},{key:"renderOptions",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.attributes.hasCount;return e.map(function(e){var o=n?"(".concat(e.count,")"):null;return[React.createElement("option",{key:e.term_id,value:e.link},"–".repeat(r)," ",e.name," ",o),!!e.children&&!!e.children.length&&t.renderOptions(e.children,r+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.categories,n=e.componentId,o=t.className,i=t.isDropdown,c=g()("wc-block-product-categories",o,{"is-dropdown":i,"is-list":!i}),a="prod-categories-".concat(n);return React.createElement(m.Fragment,null,r.length>0&&React.createElement("div",{className:c},i?React.createElement(m.Fragment,null,React.createElement("div",{className:"wc-block-product-categories__dropdown"},React.createElement("label",{className:"screen-reader-text",htmlFor:a},Object(h.__)("Select a category","woo-gutenberg-products-block")),React.createElement("select",{id:a,ref:this.select},React.createElement("option",{value:"false",hidden:!0},Object(h.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(r))),React.createElement("button",{type:"button",className:"wc-block-product-categories__button","aria-label":Object(h.__)("Go to category","woo-gutenberg-products-block"),icon:"arrow-right-alt2",onClick:this.onNavigate},React.createElement("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},React.createElement("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"})))):this.renderList(r)))}}]),t}(m.Component)),j=r(11),E=r.n(j),S=r(12),k=r.n(S);var R=function(e){var t=e.hasEmpty,r=e.isHierarchical,n=wc_product_block_data.productCategories.filter(function(e){return t||!!e.count});return r?function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.parent;return(e[o]||(e[o]=[])).push(t),e},{}),t=function t(r){return r.map(function(r){var n=e[r.term_id];return delete e[r.term_id],k()({},r,{children:n&&n.length?t(n):[]})})},r=t(e[0]||[]);return delete e[0],Object.keys(e).forEach(function(e){r.push.apply(r,E()(t(e||[])))}),r}(n):n},P=document.querySelectorAll(".wp-block-woocommerce-product-categories");P.length&&Array.prototype.forEach.call(P,function(e){var t=JSON.parse(JSON.stringify(e.dataset)),r={hasCount:"true"===t.hasCount,hasEmpty:"true"===t.hasEmpty,isDropdown:"true"===t.isDropdown,isHierarchical:"true"===t.isHierarchical},o=R(r);e.classList.remove("is-loading"),Object(n.render)(React.createElement(_,{attributes:r,categories:o}),e)})}]);
build/handpicked-products.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var n,i,u=t[0],a=t[1],s=t[2],d=0,b=[];d<u.length;d++)i=u[d],c[i]&&b.push(c[i][0]),c[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(l&&l(t);b.length;)b.shift()();return r.push.apply(r,s||[]),o()}function o(){for(var e,t=0;t<r.length;t++){for(var o=r[t],n=!0,u=1;u<o.length;u++){var a=o[u];0!==c[a]&&(n=!1)}n&&(r.splice(t--,1),e=i(i.s=o[0]))}return e}var n={},c={7:0},r=[];function i(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=n,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(o,n,function(t){return e[t]}.bind(null,n));return o},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var s=0;s<u.length;s++)t(u[s]);var l=a;return r.push([543,1,3,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},310:function(e,t,o){var n=o(311);"string"==typeof n&&(n=[[e.i,n,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};o(66)(n,c);n.locals&&(e.exports=n.locals)},311:function(e,t,o){},35:function(e,t){!function(){e.exports=this.wp.url}()},38:function(e,t){!function(){e.exports=this.wp.keycodes}()},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var n=o(15),c=o.n(n),r=o(0),i=o(1),u=o(5),a=o.n(u),s=o(3),l=function(e){var t=e.onChange,o=e.settings,n=o.button,u=o.price,a=o.rating,l=o.title;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(c()({},o,{title:!l}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:u?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(c()({},o,{price:!u}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(c()({},o,{rating:!a}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(c()({},o,{button:!n}))}}))};l.propTypes={settings:a.a.shape({button:a.a.bool.isRequired,price:a.a.bool.isRequired,title:a.a.bool.isRequired}).isRequired,onChange:a.a.func.isRequired},t.a=l},42:function(e,t,o){"use strict";var n=o(0),c=o(6),r=o.n(c),i=o(59),u=o.n(i);o.d(t,"a",function(){return a});var a=function(e){return function(t){var o=t.attributes,c=o.align,i=o.contentVisibility,a=r()(c?"align".concat(c):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(n.createElement)(n.RawHTML,{className:a},function(e,t){var o=e.attributes,n=o.attributes,c=o.attrOperator,r=o.categories,i=o.catOperator,a=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),r&&r.length&&(b.set("category",r.join(",")),i&&"all"===i&&b.set("cat_operator","AND")),n&&n.length&&(b.set("terms",n.map(function(e){return e.id}).join(",")),b.set("attribute",n[0].attr_slug),c&&"all"===c&&b.set("terms_operator","AND")),a&&("price_desc"===a?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===a?(b.set("orderby","price"),b.set("order","ASC")):"date"===a?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",a)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";b.set("ids",s.join(",")),b.set("limit",s.length);break;case"woocommerce/product-category":if(!r||!r.length)return"";break;case"woocommerce/products-by-attribute":if(!n||!n.length)return""}var p="[products",g=!0,h=!1,f=void 0;try{for(var m,w=b[Symbol.iterator]();!(g=(m=w.next()).done);g=!0){var _=u()(m.value,2);p+=" "+_[0]+'="'+_[1]+'"'}}catch(e){h=!0,f=e}finally{try{g||null==w.return||w.return()}finally{if(h)throw f}}return p+="]"}(t,e))}}},50:function(e,t){!function(){e.exports=this.ReactDOM}()},51:function(e,t){!function(){e.exports=this.wp.viewport}()},543:function(e,t,o){"use strict";o.r(t);var n=o(0),c=o(1),r=o(27),i=(o(310),o(22)),u=o.n(i),a=o(23),s=o.n(a),l=o(24),d=o.n(l),b=o(25),p=o.n(b),g=o(26),h=o.n(g),f=o(18),m=o(3),w=o(5),_=o.n(w),v=o(41),O=o(61),j=o(33),k=o.n(j),y=o(4),E=o(37),C=o(78),x=function(e){function t(){var e;return u()(this,t),(e=d()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(y.debounce)(e.onSearch.bind(k()(e)),400),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(C.a)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(e){var t=this,o=this.props.selected;Object(C.a)({selected:o,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,i=r.onChange,u=r.selected,a={clear:Object(c.__)("Clear all products","woo-gutenberg-products-block"),list:Object(c.__)("Products","woo-gutenberg-products-block"),noItems:Object(c.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(c.__)("Search for products to display","woo-gutenberg-products-block"),selected:function(e){return Object(c.sprintf)(Object(c._n)("%d product selected","%d products selected",e,"woo-gutenberg-products-block"),e)},updated:Object(c.__)("Product search results updated.","woo-gutenberg-products-block")};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(E.a,{className:"woocommerce-products",list:t,isLoading:o,selected:u.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onSearch:C.b?this.debouncedOnSearch:null,onChange:i,messages:a}))}}]),t}(n.Component);x.propTypes={onChange:_.a.func.isRequired,selected:_.a.array.isRequired};var M=x,P=o(69),S=function(e){function t(){return u()(this,t),d()(this,p()(t).apply(this,arguments))}return h()(t,e),s()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.columns,i=t.contentVisibility,u=t.orderby;return Object(n.createElement)(f.InspectorControls,{key:"inspector"},Object(n.createElement)(m.PanelBody,{title:Object(c.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(m.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:r,onChange:function(e){return o({columns:e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns})),Object(n.createElement)(m.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(v.a,{settings:i,onChange:function(e){return o({contentVisibility:e})}})),Object(n.createElement)(m.PanelBody,{title:Object(c.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(P.a,{setAttributes:o,value:u})),Object(n.createElement)(m.PanelBody,{title:Object(c.__)("Products","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(M,{selected:t.products,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id});o({products:e})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,o=e.debouncedSpeak,r=e.setAttributes;return Object(n.createElement)(m.Placeholder,{icon:Object(n.createElement)(O.c,null),label:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(c.__)("Display a selection of hand-picked products in a grid","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(n.createElement)(M,{selected:t.products,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id});r({products:e})}}),Object(n.createElement)(m.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),o(Object(c.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name,r=e.setAttributes,i=t.editMode;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(f.BlockControls,null,Object(n.createElement)(m.Toolbar,{controls:[{icon:"edit",title:Object(c.__)("Edit"),onClick:function(){return r({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(n.createElement)(m.Disabled,null,Object(n.createElement)(f.ServerSideRender,{block:o,attributes:t})))}}]),t}(n.Component);S.propTypes={attributes:_.a.object.isRequired,name:_.a.string.isRequired,setAttributes:_.a.func.isRequired,debouncedSpeak:_.a.func.isRequired};var z=Object(m.withSpokenMessages)(S),R=o(42);Object(r.registerBlockType)("woocommerce/handpicked-products",{title:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(O.c,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]}},deprecated:[{attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]}},save:Object(R.a)("woocommerce/handpicked-products")}],edit:function(e){return Object(n.createElement)(z,e)},save:function(){return null}})},61:function(e,t,o){"use strict";var n=o(0),c=o(3),r=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},u=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},a=o(6),s=o.n(a),l=o(5),d=o.n(l),b=function(e){var t=e.size,o=void 0===t?20:t,r=e.className;return Object(n.createElement)(c.Icon,{className:s()("woo-icon",r),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:o,width:Math.floor(1.67*o),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};b.propTypes={size:d.a.number,className:d.a.string};var p=b;o.d(t,"a",function(){return r}),o.d(t,"b",function(){return i}),o.d(t,"c",function(){return u}),o.d(t,"d",function(){return p})},65:function(e,t){!function(){e.exports=this.wp.hooks}()},67:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},68:function(e,t){!function(){e.exports=this.wp.date}()},69:function(e,t,o){"use strict";var n=o(0),c=o(1),r=o(3),i=o(5),u=o.n(i),a=function(e){var t=e.value,o=e.setAttributes;return Object(n.createElement)(r.SelectControl,{label:Object(c.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(c.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(c.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(c.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(c.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(c.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(c.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(c.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};a.propTypes={setAttributes:u.a.func.isRequired,value:u.a.string.isRequired},t.a=a},76:function(e,t){!function(){e.exports=this.wp.dom}()},78:function(e,t,o){"use strict";o.d(t,"b",function(){return u}),o.d(t,"a",function(){return a});var n=o(35),c=o(17),r=o.n(c),i=o(4),u=wc_product_block_data.isLargeCatalog||!1,a=function(e){var t=e.selected,o=function(e){var t=e.selected,o=void 0===t?[]:t,c=e.search,r=[Object(n.addQueryArgs)("/wc-blocks/v1/products",{per_page:u?100:-1,catalog_visibility:"visible",status:"publish",search:c})];return u&&o.length&&r.push(Object(n.addQueryArgs)("/wc-blocks/v1/products",{catalog_visibility:"visible",status:"publish",include:o})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(o.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})}},8:function(e,t){!function(){e.exports=this.moment}()},80:function(e,t){},81:function(e,t){},83:function(e,t){},84:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var o,i,u=t[0],a=t[1],s=t[2],d=0,b=[];d<u.length;d++)i=u[d],c[i]&&b.push(c[i][0]),c[i]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(l&&l(t);b.length;)b.shift()();return r.push.apply(r,s||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],o=!0,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(o=!1)}o&&(r.splice(t--,1),e=i(i.s=n[0]))}return e}var o={},c={6:0},r=[];function i(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var s=0;s<u.length;s++)t(u[s]);var l=a;return r.push([515,0,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},270:function(e,t,n){var o=n(271);"string"==typeof o&&(o=[[e.i,o,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};n(38)(o,c);o.locals&&(e.exports=o.locals)},271:function(e,t,n){},28:function(e,t,n){"use strict";var o=n(0),c=n(3),r=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(o.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},u=function(){return Object(o.createElement)(c.Icon,{className:"material-icon",icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(o.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},a=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.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"}))})},s=function(){return Object(o.createElement)(c.Icon,{icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.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"}))})},l=function(){return Object(o.createElement)(c.Icon,{className:"material-icon",icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(o.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),b=n.n(d),p=n(4),g=n.n(p),h=function(e){var t=e.size,n=void 0===t?20:t,r=e.className;return Object(o.createElement)(c.Icon,{className:b()("woo-icon",r),icon:Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(o.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(o.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};h.propTypes={size:g.a.number,className:g.a.string};var f=h;n.d(t,"a",function(){return r}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return u}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return l}),n.d(t,"g",function(){return f})},29:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},31:function(e,t,n){"use strict";var o=n(8),c=n.n(o),r=n(0),i=n(1),u=n(4),a=n.n(u),s=n(3),l=function(e){var t=e.onChange,n=e.settings,o=n.button,u=n.price,a=n.rating,l=n.title;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(c()({},n,{title:!l}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:u?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(c()({},n,{price:!u}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(c()({},n,{rating:!a}))}}),Object(r.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:o?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return t(c()({},n,{button:!o}))}}))};l.propTypes={settings:a.a.shape({button:a.a.bool.isRequired,price:a.a.bool.isRequired,rating:a.a.bool.isRequired,title:a.a.bool.isRequired}).isRequired,onChange:a.a.func.isRequired},t.a=l},35:function(e,t,n){"use strict";var o=n(0),c=n(6),r=n.n(c),i=n(48),u=n.n(i);n.d(t,"a",function(){return a});var a=function(e){return function(t){var n=t.attributes,c=n.align,i=n.contentVisibility,a=r()(c?"align".concat(c):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(o.createElement)(o.RawHTML,{className:a},function(e,t){var n=e.attributes,o=n.attributes,c=n.attrOperator,r=n.categories,i=n.catOperator,a=n.orderby,s=n.products,l=n.columns||wc_product_block_data.default_columns,d=n.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),r&&r.length&&(b.set("category",r.join(",")),i&&"all"===i&&b.set("cat_operator","AND")),o&&o.length&&(b.set("terms",o.map(function(e){return e.id}).join(",")),b.set("attribute",o[0].attr_slug),c&&"all"===c&&b.set("terms_operator","AND")),a&&("price_desc"===a?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===a?(b.set("orderby","price"),b.set("order","ASC")):"date"===a?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",a)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";b.set("ids",s.join(",")),b.set("limit",s.length);break;case"woocommerce/product-category":if(!r||!r.length)return"";break;case"woocommerce/products-by-attribute":if(!o||!o.length)return""}var p="[products",g=!0,h=!1,f=void 0;try{for(var m,w=b[Symbol.iterator]();!(g=(m=w.next()).done);g=!0){var _=u()(m.value,2);p+=" "+_[0]+'="'+_[1]+'"'}}catch(e){h=!0,f=e}finally{try{g||null==w.return||w.return()}finally{if(h)throw f}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},39:function(e,t){!function(){e.exports=this.wp.viewport}()},43:function(e,t,n){"use strict";n.d(t,"d",function(){return u}),n.d(t,"e",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"a",function(){return d});var o=n(19),c=n(10),r=n.n(c),i=n(5),u=wc_product_block_data.isLargeCatalog||!1,a=wc_product_block_data.limitTags||!1,s=wc_product_block_data.hasTags||!1,l=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("/wc/blocks/products",{per_page:u?100:-1,catalog_visibility:"visible",status:"publish",search:c})];return u&&n.length&&r.push(Object(o.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})},d=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("/wc/blocks/products/tags",{per_page:a?100:-1,orderby:a?"count":"name",order:a?"desc":"asc",search:c})];return a&&n.length&&r.push(Object(o.addQueryArgs)("/wc/blocks/products/tags",{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})}},46:function(e,t){!function(){e.exports=this.wp.hooks}()},47:function(e,t,n){"use strict";var o=n(0),c=n(1),r=n(3),i=n(4),u=n.n(i),a=function(e){var t=e.value,n=e.setAttributes;return Object(o.createElement)(r.SelectControl,{label:Object(c.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(c.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(c.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(c.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(c.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(c.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(c.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(c.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return n({orderby:e})}})};a.propTypes={setAttributes:u.a.func.isRequired,value:u.a.string.isRequired},t.a=a},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},515:function(e,t,n){"use strict";n.r(t);var o=n(0),c=n(1),r=n(18),i=(n(270),n(13)),u=n.n(i),a=n(14),s=n.n(a),l=n(15),d=n.n(l),b=n(16),p=n.n(b),g=n(17),h=n.n(g),f=n(9),m=n(3),w=n(4),_=n.n(w),O=n(31),v=n(28),j=n(12),k=n.n(j),y=n(5),E=n(24),C=n(43),x=function(e){function t(){var e;return u()(this,t),(e=d()(this,p()(t).apply(this,arguments))).state={list:[],loading:!0},e.debouncedOnSearch=Object(y.debounce)(e.onSearch.bind(k()(e)),400),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(C.b)({selected:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(C.b)({selected:n,search:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"render",value:function(){var e=this.state,t=e.list,n=e.loading,r=this.props,i=r.onChange,u=r.selected,a={clear:Object(c.__)("Clear all products","woo-gutenberg-products-block"),list:Object(c.__)("Products","woo-gutenberg-products-block"),noItems:Object(c.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(c.__)("Search for products to display","woo-gutenberg-products-block"),selected:function(e){return Object(c.sprintf)(Object(c._n)("%d product selected","%d products selected",e,"woo-gutenberg-products-block"),e)},updated:Object(c.__)("Product search results updated.","woo-gutenberg-products-block")};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(E.a,{className:"woocommerce-products",list:t,isLoading:n,selected:u.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onSearch:C.d?this.debouncedOnSearch:null,onChange:i,messages:a}))}}]),t}(o.Component);x.propTypes={onChange:_.a.func.isRequired,selected:_.a.array.isRequired};var M=x,z=n(47),P=function(e){function t(){return u()(this,t),d()(this,p()(t).apply(this,arguments))}return h()(t,e),s()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,r=t.columns,i=t.contentVisibility,u=t.orderby,a=t.alignButtons;return Object(o.createElement)(f.InspectorControls,{key:"inspector"},Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(m.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:r,onChange:function(e){return n({columns:e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(o.createElement)(m.ToggleControl,{label:Object(c.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(c.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return n({alignButtons:!a})}})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(O.a,{settings:i,onChange:function(e){return n({contentVisibility:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(z.a,{setAttributes:n,value:u})),Object(o.createElement)(m.PanelBody,{title:Object(c.__)("Products","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(M,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});n({products:t})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,r=e.setAttributes;return Object(o.createElement)(m.Placeholder,{icon:Object(o.createElement)(v.f,null),label:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(c.__)("Display a selection of hand-picked products in a grid","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(o.createElement)(M,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});r({products:t})}}),Object(o.createElement)(m.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),n(Object(c.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.name,r=e.setAttributes,i=t.editMode;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(f.BlockControls,null,Object(o.createElement)(m.Toolbar,{controls:[{icon:"edit",title:Object(c.__)("Edit"),onClick:function(){return r({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(o.createElement)(m.Disabled,null,Object(o.createElement)(f.ServerSideRender,{block:n,attributes:t})))}}]),t}(o.Component);P.propTypes={attributes:_.a.object.isRequired,name:_.a.string.isRequired,setAttributes:_.a.func.isRequired,debouncedSpeak:_.a.func.isRequired};var S=Object(m.withSpokenMessages)(P),B=n(35);Object(r.registerBlockType)("woocommerce/handpicked-products",{title:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(v.f,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]}},save:Object(B.a)("woocommerce/handpicked-products")}],edit:function(e){return Object(o.createElement)(S,e)},save:function(){return null}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/packages.js DELETED
@@ -1 +0,0 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{118:function(e,t,a){var r=a(119),n=a(141);e.exports=a(121)?function(e,t,a){return r.f(e,t,n(1,a))}:function(e,t,a){return e[t]=a,e}},119:function(e,t,a){var r=a(120),n=a(361),c=a(362),o=Object.defineProperty;t.f=a(121)?Object.defineProperty:function(e,t,a){if(r(e),t=c(t,!0),r(a),n)try{return o(e,t,a)}catch(e){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(e[t]=a.value),e}},120:function(e,t,a){var r=a(139);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},121:function(e,t,a){e.exports=!a(140)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},122:function(e,t){var a={}.hasOwnProperty;e.exports=function(e,t){return a.call(e,t)}},138:function(e,t,a){var r=a(92),n=a(93),c=a(118),o=a(200),i=a(202),l=function(e,t,a){var s,u,m,d,h=e&l.F,p=e&l.G,f=e&l.S,g=e&l.P,v=e&l.B,b=p?r:f?r[t]||(r[t]={}):(r[t]||{}).prototype,w=p?n:n[t]||(n[t]={}),O=w.prototype||(w.prototype={});for(s in p&&(a=t),a)m=((u=!h&&b&&void 0!==b[s])?b:a)[s],d=v&&u?i(m,r):g&&"function"==typeof m?i(Function.call,m):m,b&&o(b,s,m,e&l.U),w[s]!=m&&c(w,s,d),g&&O[s]!=m&&(O[s]=m)};r.core=n,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},139:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},140:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},141:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},142:function(e,t){var a=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++a+r).toString(36))}},143:function(e,t,a){var r=a(93),n=a(92),c=n["__core-js_shared__"]||(n["__core-js_shared__"]={});(e.exports=function(e,t){return c[e]||(c[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:a(201)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},144:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},145:function(e,t){var a=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:a)(e)}},146:function(e,t,a){var r=a(143)("keys"),n=a(142);e.exports=function(e){return r[e]||(r[e]=n(e))}},147:function(e,t,a){var r=a(144);e.exports=function(e){return Object(r(e))}},148:function(e,t){e.exports={}},171:function(e,t,a){"use strict";var r=a(341),n=a(342),c=a(196);e.exports={formats:c,parse:n,stringify:r}},175:function(e,t,a){"use strict";var r=a(434),n=a(435),c=a(248);e.exports={formats:c,parse:n,stringify:r}},195:function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,n=Array.isArray,c=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var a=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(a[r]=e[r]);return a};e.exports={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce(function(e,a){return e[a]=t[a],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],a=[],r=0;r<t.length;++r)for(var c=t[r],o=c.obj[c.prop],i=Object.keys(o),l=0;l<i.length;++l){var s=i[l],u=o[s];"object"==typeof u&&null!==u&&-1===a.indexOf(u)&&(t.push({obj:o,prop:s}),a.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],c=0;c<a.length;++c)void 0!==a[c]&&r.push(a[c]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,a){var r=e.replace(/\+/g," ");if("iso-8859-1"===a)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,a){if(0===e.length)return e;var r="string"==typeof e?e:String(e);if("iso-8859-1"===a)return escape(r).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var n="",o=0;o<r.length;++o){var i=r.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n+=r.charAt(o):i<128?n+=c[i]:i<2048?n+=c[192|i>>6]+c[128|63&i]:i<55296||i>=57344?n+=c[224|i>>12]+c[128|i>>6&63]+c[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(o)),n+=c[240|i>>18]+c[128|i>>12&63]+c[128|i>>6&63]+c[128|63&i])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,a,c){if(!a)return t;if("object"!=typeof a){if(n(t))t.push(a);else{if(!t||"object"!=typeof t)return[t,a];(c&&(c.plainObjects||c.allowPrototypes)||!r.call(Object.prototype,a))&&(t[a]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(a);var i=t;return n(t)&&!n(a)&&(i=o(t,c)),n(t)&&n(a)?(a.forEach(function(a,n){if(r.call(t,n)){var o=t[n];o&&"object"==typeof o&&a&&"object"==typeof a?t[n]=e(o,a,c):t.push(a)}else t[n]=a}),t):Object.keys(a).reduce(function(t,n){var o=a[n];return r.call(t,n)?t[n]=e(t[n],o,c):t[n]=o,t},i)}}},196:function(e,t,a){"use strict";var r=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},198:function(e,t,a){a(360),e.exports=a(93).Object.assign},199:function(e,t,a){var r=a(139),n=a(92).document,c=r(n)&&r(n.createElement);e.exports=function(e){return c?n.createElement(e):{}}},2:function(e,t,a){e.exports=a(336)()},200:function(e,t,a){var r=a(92),n=a(118),c=a(122),o=a(142)("src"),i=a(363),l=(""+i).split("toString");a(93).inspectSource=function(e){return i.call(e)},(e.exports=function(e,t,a,i){var s="function"==typeof a;s&&(c(a,"name")||n(a,"name",t)),e[t]!==a&&(s&&(c(a,o)||n(a,o,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=a:i?e[t]?e[t]=a:n(e,t,a):(delete e[t],n(e,t,a)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||i.call(this)})},201:function(e,t){e.exports=!1},202:function(e,t,a){var r=a(364);e.exports=function(e,t,a){if(r(e),void 0===t)return e;switch(a){case 1:return function(a){return e.call(t,a)};case 2:return function(a,r){return e.call(t,a,r)};case 3:return function(a,r,n){return e.call(t,a,r,n)}}return function(){return e.apply(t,arguments)}}},203:function(e,t,a){var r=a(366),n=a(208);e.exports=Object.keys||function(e){return r(e,n)}},204:function(e,t,a){var r=a(205),n=a(144);e.exports=function(e){return r(n(e))}},205:function(e,t,a){var r=a(206);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},206:function(e,t){var a={}.toString;e.exports=function(e){return a.call(e).slice(8,-1)}},207:function(e,t,a){var r=a(145),n=Math.min;e.exports=function(e){return e>0?n(r(e),9007199254740991):0}},208:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},209:function(e,t,a){a(371),a(379),e.exports=a(93).Array.from},210:function(e,t,a){var r=a(119).f,n=a(122),c=a(87)("toStringTag");e.exports=function(e,t,a){e&&!n(e=a?e:e.prototype,c)&&r(e,c,{configurable:!0,value:t})}},247:function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,n=Array.isArray,c=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e,t){for(var a=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(a[r]=e[r]);return a};e.exports={arrayToObject:o,assign:function(e,t){return Object.keys(t).reduce(function(e,a){return e[a]=t[a],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],a=[],r=0;r<t.length;++r)for(var c=t[r],o=c.obj[c.prop],i=Object.keys(o),l=0;l<i.length;++l){var s=i[l],u=o[s];"object"==typeof u&&null!==u&&-1===a.indexOf(u)&&(t.push({obj:o,prop:s}),a.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],c=0;c<a.length;++c)void 0!==a[c]&&r.push(a[c]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,a){var r=e.replace(/\+/g," ");if("iso-8859-1"===a)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,a){if(0===e.length)return e;var r="string"==typeof e?e:String(e);if("iso-8859-1"===a)return escape(r).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var n="",o=0;o<r.length;++o){var i=r.charCodeAt(o);45===i||46===i||95===i||126===i||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n+=r.charAt(o):i<128?n+=c[i]:i<2048?n+=c[192|i>>6]+c[128|63&i]:i<55296||i>=57344?n+=c[224|i>>12]+c[128|i>>6&63]+c[128|63&i]:(o+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(o)),n+=c[240|i>>18]+c[128|i>>12&63]+c[128|i>>6&63]+c[128|63&i])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,a,c){if(!a)return t;if("object"!=typeof a){if(n(t))t.push(a);else{if(!t||"object"!=typeof t)return[t,a];(c&&(c.plainObjects||c.allowPrototypes)||!r.call(Object.prototype,a))&&(t[a]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(a);var i=t;return n(t)&&!n(a)&&(i=o(t,c)),n(t)&&n(a)?(a.forEach(function(a,n){if(r.call(t,n)){var o=t[n];o&&"object"==typeof o&&a&&"object"==typeof a?t[n]=e(o,a,c):t.push(a)}else t[n]=a}),t):Object.keys(a).reduce(function(t,n){var o=a[n];return r.call(t,n)?t[n]=e(t[n],o,c):t[n]=o,t},i)}}},248:function(e,t,a){"use strict";var r=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},336:function(e,t,a){"use strict";var r=a(337);function n(){}function c(){}c.resetWarningCache=n,e.exports=function(){function e(e,t,a,n,c,o){if(o!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var a={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:n};return a.PropTypes=a,a}},337:function(e,t,a){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},341:function(e,t,a){"use strict";var r=a(195),n=a(196),c=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Array.isArray,l=Array.prototype.push,s=function(e,t){l.apply(e,i(t)?t:[t])},u=Date.prototype.toISOString,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:n.formatters[n.default],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,a,n,c,o,l,u,d,h,p,f,g,v){var b=t;if("function"==typeof u?b=u(a,b):b instanceof Date?b=p(b):"comma"===n&&i(b)&&(b=b.join(",")),null===b){if(c)return l&&!g?l(a,m.encoder,v):a;b=""}if("string"==typeof b||"number"==typeof b||"boolean"==typeof b||r.isBuffer(b))return l?[f(g?a:l(a,m.encoder,v))+"="+f(l(b,m.encoder,v))]:[f(a)+"="+f(String(b))];var w,O=[];if(void 0===b)return O;if(i(u))w=u;else{var y=Object.keys(b);w=d?y.sort(d):y}for(var j=0;j<w.length;++j){var E=w[j];o&&null===b[E]||(i(b)?s(O,e(b[E],"function"==typeof n?n(a,E):a,n,c,o,l,u,d,h,p,f,g,v)):s(O,e(b[E],a+(h?"."+E:"["+E+"]"),n,c,o,l,u,d,h,p,f,g,v)))}return O};e.exports=function(e,t){var a,r=e,l=function(e){if(!e)return m;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=n.default;if(void 0!==e.format){if(!c.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");a=e.format}var r=n.formatters[a],o=m.filter;return("function"==typeof e.filter||i(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===e.allowDots?m.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:o,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof l.filter?r=(0,l.filter)("",r):i(l.filter)&&(a=l.filter);var u,h=[];if("object"!=typeof r||null===r)return"";u=t&&t.arrayFormat in o?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var p=o[u];a||(a=Object.keys(r)),l.sort&&a.sort(l.sort);for(var f=0;f<a.length;++f){var g=a[f];l.skipNulls&&null===r[g]||s(h,d(r[g],g,p,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.formatter,l.encodeValuesOnly,l.charset))}var v=h.join(l.delimiter),b=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),v.length>0?b+v:""}},342:function(e,t,a){"use strict";var r=a(195),n=Object.prototype.hasOwnProperty,c={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},i=function(e,t,a){if(e){var r=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,c=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(r),i=o?r.slice(0,o.index):r,l=[];if(i){if(!a.plainObjects&&n.call(Object.prototype,i)&&!a.allowPrototypes)return;l.push(i)}for(var s=0;null!==(o=c.exec(r))&&s<a.depth;){if(s+=1,!a.plainObjects&&n.call(Object.prototype,o[1].slice(1,-1))&&!a.allowPrototypes)return;l.push(o[1])}return o&&l.push("["+r.slice(o.index)+"]"),function(e,t,a){for(var r=t,n=e.length-1;n>=0;--n){var c,o=e[n];if("[]"===o&&a.parseArrays)c=[].concat(r);else{c=a.plainObjects?Object.create(null):{};var i="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,l=parseInt(i,10);a.parseArrays||""!==i?!isNaN(l)&&o!==i&&String(l)===i&&l>=0&&a.parseArrays&&l<=a.arrayLimit?(c=[])[l]=r:c[i]=r:c={0:r}}r=c}return r}(l,t,a)}};e.exports=function(e,t){var a=function(e){if(!e)return c;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?c.charset:e.charset;return{allowDots:void 0===e.allowDots?c.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:c.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:c.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:c.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:c.comma,decoder:"function"==typeof e.decoder?e.decoder:c.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:c.delimiter,depth:"number"==typeof e.depth?e.depth:c.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:c.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:c.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:c.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:c.strictNullHandling}}(t);if(""===e||null==e)return a.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var a,i={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=t.parameterLimit===1/0?void 0:t.parameterLimit,u=l.split(t.delimiter,s),m=-1,d=t.charset;if(t.charsetSentinel)for(a=0;a<u.length;++a)0===u[a].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[a]?d="utf-8":"utf8=%26%2310003%3B"===u[a]&&(d="iso-8859-1"),m=a,a=u.length);for(a=0;a<u.length;++a)if(a!==m){var h,p,f=u[a],g=f.indexOf("]="),v=-1===g?f.indexOf("="):g+1;-1===v?(h=t.decoder(f,c.decoder,d),p=t.strictNullHandling?null:""):(h=t.decoder(f.slice(0,v),c.decoder,d),p=t.decoder(f.slice(v+1),c.decoder,d)),p&&t.interpretNumericEntities&&"iso-8859-1"===d&&(p=o(p)),p&&t.comma&&p.indexOf(",")>-1&&(p=p.split(",")),n.call(i,h)?i[h]=r.combine(i[h],p):i[h]=p}return i}(e,a):e,s=a.plainObjects?Object.create(null):{},u=Object.keys(l),m=0;m<u.length;++m){var d=u[m],h=i(d,l[d],a);s=r.merge(s,h,a)}return r.compact(s)}},360:function(e,t,a){var r=a(138);r(r.S+r.F,"Object",{assign:a(365)})},361:function(e,t,a){e.exports=!a(121)&&!a(140)(function(){return 7!=Object.defineProperty(a(199)("div"),"a",{get:function(){return 7}}).a})},362:function(e,t,a){var r=a(139);e.exports=function(e,t){if(!r(e))return e;var a,n;if(t&&"function"==typeof(a=e.toString)&&!r(n=a.call(e)))return n;if("function"==typeof(a=e.valueOf)&&!r(n=a.call(e)))return n;if(!t&&"function"==typeof(a=e.toString)&&!r(n=a.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},363:function(e,t,a){e.exports=a(143)("native-function-to-string",Function.toString)},364:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},365:function(e,t,a){"use strict";var r=a(203),n=a(369),c=a(370),o=a(147),i=a(205),l=Object.assign;e.exports=!l||a(140)(function(){var e={},t={},a=Symbol(),r="abcdefghijklmnopqrst";return e[a]=7,r.split("").forEach(function(e){t[e]=e}),7!=l({},e)[a]||Object.keys(l({},t)).join("")!=r})?function(e,t){for(var a=o(e),l=arguments.length,s=1,u=n.f,m=c.f;l>s;)for(var d,h=i(arguments[s++]),p=u?r(h).concat(u(h)):r(h),f=p.length,g=0;f>g;)m.call(h,d=p[g++])&&(a[d]=h[d]);return a}:l},366:function(e,t,a){var r=a(122),n=a(204),c=a(367)(!1),o=a(146)("IE_PROTO");e.exports=function(e,t){var a,i=n(e),l=0,s=[];for(a in i)a!=o&&r(i,a)&&s.push(a);for(;t.length>l;)r(i,a=t[l++])&&(~c(s,a)||s.push(a));return s}},367:function(e,t,a){var r=a(204),n=a(207),c=a(368);e.exports=function(e){return function(t,a,o){var i,l=r(t),s=n(l.length),u=c(o,s);if(e&&a!=a){for(;s>u;)if((i=l[u++])!=i)return!0}else for(;s>u;u++)if((e||u in l)&&l[u]===a)return e||u||0;return!e&&-1}}},368:function(e,t,a){var r=a(145),n=Math.max,c=Math.min;e.exports=function(e,t){return(e=r(e))<0?n(e+t,0):c(e,t)}},369:function(e,t){t.f=Object.getOwnPropertySymbols},37:function(e,t,a){"use strict";a(312);var r,n=a(44),c=a(29),o=a(28),i=a(11),l=a(10),s=a(12),u=a(13),m=a(7),d=a(14),h=a(0),p=a(1),f=a(3),g=a(4),v=a(2),b=a.n(v),w=a(45),O=a.n(w),y=a(34),j=a.n(y),E=a(6),k=a.n(E),_=a(134),x=a(171),C=a(63);function N(){return r||(r=Object(C.b)()),r}function z(e,t){return Object(g.compact)(Object.keys(t).map(function(a){var r=t[a];if(r.rules){var n=Object(g.find)(r.rules,function(t){return e.hasOwnProperty(S(a,t.value))});if(n){var c=e[S(a,n.value)];return{key:a,rule:n.value,value:c}}return null}return e[a]?{key:a,value:e[a]}:null}))}function M(e,t){var a=e.input.defaultOption;if(e.input.defaultOption){var r=Object(g.find)(t,{value:a});return r?r.value:void console.warn("invalid defaultOption ".concat(a," supplied to ").concat(e.labels.add))}return Object(g.get)(t,[0,"value"])}function S(e,t){return t&&t.length?"".concat(e,"_").concat(t):e}var H=function(e){return wcSettings.adminUrl+e},V=function(){return N().location.pathname},L=function(e){return Object(g.isEmpty)(e)?"":"?"+Object(x.stringify)(e)};function B(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(g.uniq)(e.split(",").map(function(e){return parseInt(e,10)}).filter(Boolean))}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:V(),a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:F(),r=L(Object(n.a)({},a,e));return"".concat(t).concat(r)}function F(){var e=N().location.search;return e.length&&Object(x.parse)(e.substring(1))||{}}function R(e){var t=T(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:V(),arguments.length>2&&void 0!==arguments[2]?arguments[2]:F());N().push(t)}var D=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props,t=e.children,a=e.label;if(!t)return null;return Object(h.createElement)("div",{className:"woocommerce-ellipsis-menu"},Object(h.createElement)(f.Dropdown,{contentClassName:"woocommerce-ellipsis-menu__popover",position:"bottom left",renderToggle:function(e){var t=e.onToggle,r=e.isOpen,n=k()("woocommerce-ellipsis-menu__toggle",{"is-opened":r});return Object(h.createElement)(f.IconButton,{className:n,onClick:t,icon:"ellipsis",title:a,"aria-expanded":r})},renderContent:function(){return Object(h.createElement)(f.NavigableMenu,{className:"woocommerce-ellipsis-menu__content"},t)}}))}}]),t}(h.Component);D.propTypes={label:b.a.string.isRequired,children:b.a.node};var P=D,q=a(43),I=Object(h.createContext)(2);function A(e){return Object(h.createElement)(I.Consumer,null,function(t){var a="h"+Math.min(t,6);return Object(h.createElement)(a,e)})}function K(e){var t=e.component,a=e.children,r=Object(q.a)(e,["component","children"]),n=t||"div";return Object(h.createElement)(I.Consumer,null,function(e){return Object(h.createElement)(I.Provider,{value:e+1},!1===t?a:Object(h.createElement)(n,r,a))})}function Y(e){return function(t,a,r){if(t[a])return t[a].type&&t[a].type===e?void 0:new Error("Invalid ".concat(a," passed to ").concat(r,". Must be ")+"`"+e.name+"`")}}K.propTypes={component:b.a.oneOfType([b.a.func,b.a.string,b.a.bool]),children:b.a.node};var U=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props,t=e.action,a=e.children,r=e.menu,n=e.title,c=k()("woocommerce-card",this.props.className,{"has-menu":!!r,"has-action":!!t});return Object(h.createElement)("div",{className:c},n&&Object(h.createElement)("div",{className:"woocommerce-card__header"},Object(h.createElement)(A,{className:"woocommerce-card__title woocommerce-card__header-item"},n),t&&Object(h.createElement)("div",{className:"woocommerce-card__action woocommerce-card__header-item"},t),r&&Object(h.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},r)),Object(h.createElement)(K,{className:"woocommerce-card__body"},a))}}]),t}(h.Component);U.propTypes={action:b.a.node,className:b.a.string,menu:Y(P),title:b.a.oneOfType([b.a.string,b.a.node])};var Q=U,W=a(19),G=a(294),$=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e,t=this.props,a=t.children,r=t.href,n=t.type,c=Object(q.a)(t,["children","href","type"]);return this.context.router&&"wc-admin"===n?Object(h.createElement)(G.a,Object(W.a)({to:r},c),a):(e="wp-admin"===n?H(r):"external"===n?r:H("admin.php?page=wc-admin#"+r),Object(h.createElement)("a",Object(W.a)({href:e},c),a))}}]),t}(h.Component);$.propTypes={href:b.a.string.isRequired,type:b.a.oneOf(["wp-admin","wc-admin","external"]).isRequired},$.defaultProps={type:"wc-admin"},$.contextTypes={router:b.a.object};var J=$;function X(e){var t="";return function e(a){if(Object(g.isString)(a)||Object(g.isNumber)(a))t+=a;else if(Object(g.isArray)(a))a.forEach(e);else if(a&&a.props){var r=a.props.children;Object(g.isArray)(r)?r.forEach(e):e(r)}}(e),t}var Z=function(e){function t(e){var a,r=e.filter,n=e.config,c=e.onFilterChange;Object(i.a)(this,t),a=Object(s.a)(this,Object(u.a)(t).apply(this,arguments));var o=n.input.options;return a.state={options:o},a.updateOptions=a.updateOptions.bind(Object(m.a)(a)),!o&&n.input.getOptions&&n.input.getOptions().then(a.updateOptions).then(function(e){if(!r.value){var t=M(n,e);c(r.key,"value",t)}}),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"updateOptions",value:function(e){return this.setState({options:e}),e}},{key:"getScreenReaderText",value:function(e,t){if(""===e.value)return"";var a=Object(g.find)(t.rules,{value:e.rule})||{},r=Object(g.find)(t.input.options,{value:e.value})||{};return X(j()({mixedString:t.labels.title,components:{filter:Object(h.createElement)(h.Fragment,null,r.label),rule:Object(h.createElement)(h.Fragment,null,a.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,c=e.isEnglish,o=this.state.options,i=r.key,l=r.rule,s=r.value,u=a.labels,m=a.rules,d=j()({mixedString:u.title,components:{title:Object(h.createElement)("span",{className:t}),rule:Object(h.createElement)(f.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:m,value:l,onChange:Object(g.partial)(n,i,"rule"),"aria-label":u.rule}),filter:o?Object(h.createElement)(f.SelectControl,{className:k()(t,"woocommerce-filters-advanced__input"),options:o,value:s,onChange:Object(g.partial)(n,r.key,"value"),"aria-label":u.filter}):Object(h.createElement)(f.Spinner,null)}}),p=this.getScreenReaderText(r,a);return Object(h.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(h.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(h.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":c})},d),p&&Object(h.createElement)("span",{className:"screen-reader-text"},p))}}]),t}(h.Component);Z.propTypes={config:b.a.shape({labels:b.a.shape({rule:b.a.string,title:b.a.string,filter:b.a.string}),rules:b.a.arrayOf(b.a.object),input:b.a.object}).isRequired,filter:b.a.shape({key:b.a.string,rule:b.a.string,value:b.a.string}).isRequired,onFilterChange:b.a.func.isRequired};var ee=Z,te=a(30),ae=a(38);function re(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,n=[],o=0;o<t.length;o++){var i=t[o];if(!a.includes(i.value.id)){var l=i.keywords,s=void 0===l?[]:l;if("string"==typeof i.label&&(s=[].concat(Object(c.a)(s),[i.label])),s.some(function(t){return e.test(t)})&&(n.push(i),n.length===r))break}}return n}var ne=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(s.a)(this,Object(u.a)(t).apply(this,arguments))).bindNode=e.bindNode.bind(Object(m.a)(e)),e.select=e.select.bind(Object(m.a)(e)),e.reset=e.reset.bind(Object(m.a)(e)),e.search=e.search.bind(Object(m.a)(e)),e.handleKeyDown=e.handleKeyDown.bind(Object(m.a)(e)),e.debouncedLoadOptions=Object(g.debounce)(e.loadOptions,400),e.state=e.constructor.getInitialState(),e}return Object(d.a)(t,e),Object(l.a)(t,null,[{key:"getInitialState",value:function(){return{search:/./,selectedIndex:0,query:void 0,filteredOptions:[]}}}]),Object(l.a)(t,[{key:"bindNode",value:function(e){this.node=e}},{key:"select",value:function(e){var t=this.props,a=t.onSelect,r=t.completer.getOptionCompletion,n=this.state.query;if(!e.isDisabled){if(r)a(r(e.value,n));this.reset()}}},{key:"reset",value:function(){!!this.node&&this.setState(this.constructor.getInitialState())}},{key:"handleFocusOutside",value:function(){this.reset()}},{key:"announce",value:function(e){var t=this.props.debouncedSpeak;t&&(e.length?t(Object(p.sprintf)(Object(p._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"woocommerce-admin"),e.length),"assertive"):t(Object(p.__)("No results.","woocommerce-admin"),"assertive"))}},{key:"loadOptions",value:function(e,t){var a=this,r=e.options;if(t)var n=this.activePromise=Promise.resolve("function"==typeof r?r(t):r).then(function(r){if(r&&a.state.query){var c=a.props.selected;if(n===a.activePromise){var o=r.map(function(a,r){return{key:r,value:a,label:e.getOptionLabel(a,t),keywords:e.getOptionKeywords?e.getOptionKeywords(a):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(a)}}),i=re(a.state.search,o,c),l=i.length===a.state.filteredOptions.length?a.state.selectedIndex:0;a.setState({options:o,filteredOptions:i,selectedIndex:l}),a.announce(i)}}});else this.setState({options:[],filteredOptions:[],selectedIndex:0})}},{key:"search",value:function(e){var t=this.state.query,a=this.props,r=a.completer,n=void 0===r?{}:r,c=a.selected,o=e.target.value.trim();n&&o!==t&&(n.isDebounced?this.debouncedLoadOptions(n,o):this.loadOptions(n,o));var i=void 0!==n.getSearchExpression?n.getSearchExpression(Object(g.escapeRegExp)(o)):Object(g.escapeRegExp)(o),l=i?new RegExp(i,"i"):/^$/,s=re(l,this.state.options,c);this.setState({selectedIndex:0,filteredOptions:s,search:l,query:o}),this.state.options&&this.announce(s)}},{key:"getOptions",value:function(){var e=this.props,t=e.allowFreeText,a=e.completer.getFreeTextOptions,r=this.state,n=r.filteredOptions,c=r.query;return(t&&a?a(c):[]).concat(n)}},{key:"handleKeyDown",value:function(e){var t=this.getOptions(),a=this.state.selectedIndex;if(0!==t.length){var r;switch(e.keyCode){case ae.UP:r=(0===a?t.length:a)-1,this.setState({selectedIndex:r});break;case ae.TAB:case ae.DOWN:r=(a+1)%t.length,this.setState({selectedIndex:r});break;case ae.ENTER:this.select(t[a]);break;case ae.LEFT:case ae.RIGHT:case ae.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()}}},{key:"toggleKeyEvents",value:function(e){var t=e?"addEventListener":"removeEventListener";this.node[t]("keydown",this.handleKeyDown,!0)}},{key:"isExpanded",value:function(e,t){var a=t.filteredOptions,r=t.query;return a.length>0||e.completer.getFreeTextOptions&&r}},{key:"componentDidUpdate",value:function(e,t){var a=this.isExpanded(this.props,this.state),r=this.isExpanded(e,t);a&&!r?this.toggleKeyEvents(!0):!a&&r&&this.toggleKeyEvents(!1)}},{key:"componentWillUnmount",value:function(){this.toggleKeyEvents(!1),this.debouncedLoadOptions.cancel()}},{key:"render",value:function(){var e=this,t=this.props,a=t.children,r=t.instanceId,n=t.completer.className,c=void 0===n?"":n,o=t.staticResults,i=this.state.selectedIndex,l=this.isExpanded(this.props,this.state),s=l?this.getOptions():[],u=(s[i]||{}).key,m=void 0===u?"":u,d=l?"woocommerce-search__autocomplete-".concat(r):null,p=l?"woocommerce-search__autocomplete-".concat(r,"-").concat(m):null,g=k()("woocommerce-search__autocomplete-results",{"is-static-results":o});return Object(h.createElement)("div",{ref:this.bindNode,className:"woocommerce-search__autocomplete"},a({isExpanded:l,listBoxId:d,activeId:p,onChange:this.search}),l&&Object(h.createElement)("div",{id:d,role:"listbox",className:g},s.map(function(t,a){return Object(h.createElement)(f.Button,{key:t.key,id:"woocommerce-search__autocomplete-".concat(r,"-").concat(t.key),role:"option","aria-selected":a===i,disabled:t.isDisabled,className:k()("woocommerce-search__autocomplete-result",c,{"is-selected":a===i}),onClick:function(){return e.select(t)}},t.label)})))}}]),t}(h.Component),ce=Object(te.compose)([f.withSpokenMessages,te.withInstanceId,f.withFocusOutside])(ne),oe=a(17),ie=a.n(oe);function le(e,t){if(!t)return null;var a=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());return{suggestionBeforeMatch:e.substring(0,a),suggestionMatch:e.substring(a,a+t.length),suggestionAfterMatch:e.substring(a+t.length)}}function se(e){return[e.country,e.state,e.name||Object(p.__)("TAX","woocommerce-admin"),e.priority].filter(Boolean).map(function(e){return e.toString().toUpperCase().trim()}).join("-")}var ue={name:"categories",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=L({search:e,per_page:10,orderby:"count"}));return ie()({path:"/wc/v4/products/categories".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"title",label:Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},j()({mixedString:Object(p.__)("All categories with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=le(e.name,t)||{};return[Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},me=a(67),de=a(289),he=a.n(de),pe=function(e){var t=e.code,a=e.order,r=e.className,n=e.size,c=e.hideFromScreenReader,o=k()("woocommerce-flag",r),i=t||"unknown";a&&a.shipping&&a.shipping.country?i=a.shipping.country:a&&a.billing&&a.billing.country&&(i=a.billing.country);var l={fontSize:n},s=Object(g.get)(he.a.countryCode(i),"emoji");return Object(h.createElement)("div",{className:o,style:l,"aria-hidden":c},s&&Object(h.createElement)("span",null,s),!s&&Object(h.createElement)("span",{className:"woocommerce-flag__fallback"},"Invalid country flag"))};pe.propTypes={code:b.a.string,order:b.a.object,className:b.a.string,size:b.a.number};var fe=pe,ge={name:"countries",className:"woocommerce-search__country-result",isDebounced:!0,options:function(){return wcSettings.dataEndpoints.countries||[]},getSearchExpression:function(e){return"^"+e},getOptionKeywords:function(e){return[e.code,Object(me.decodeEntities)(e.name)]},getOptionLabel:function(e,t){var a=Object(me.decodeEntities)(e.name),r=le(a,t)||{};return[Object(h.createElement)(fe,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",code:e.code,size:18,hideFromScreenReader:!0}),Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":a},r.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.code,label:Object(me.decodeEntities)(e.name)}}},ve={name:"coupons",className:"woocommerce-search__coupon-result",options:function(e){var t="";e&&(t=L({search:e,per_page:10}));return ie()({path:"/wc/v4/coupons".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.code]},getFreeTextOptions:function(e){return[{key:"code",label:Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},j()({mixedString:Object(p.__)("All coupons with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,code:e}}]},getOptionLabel:function(e,t){var a=le(e.code,t)||{};return[Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.code}}},be={name:"customers",className:"woocommerce-search__customers-result",options:function(e){var t="";e&&(t=L({search:e,searchby:"name",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"name",label:Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},j()({mixedString:Object(p.__)("All customers with names that include {{query /}}","woocommerce-admin"),components:{query:Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=le(e.name,t)||{};return[Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},we={name:"download-ips",className:"woocommerce-search__download-ip-result",options:function(e){var t="";if(e)return t=L({match:e}),ie()({path:"/wc/v4/data/download-ips".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.user_ip_address]},getOptionLabel:function(e,t){var a=le(e.user_ip_address,t)||{};return[Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.user_ip_address},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.user_ip_address,label:e.user_ip_address}}},Oe={name:"emails",className:"woocommerce-search__emails-result",options:function(e){var t="";e&&(t=L({search:e,searchby:"email",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.email]},getOptionLabel:function(e,t){var a=le(e.email,t)||{};return[Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.email},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.email}}},ye={name:"orders",className:"woocommerce-search__order-result",inputType:"number",options:function(e){var t="";if(e){var a=parseInt(e);if(Object(g.isNaN)(a))return;return t=L({number:a,per_page:10}),ie()({path:"/wc/v4/orders".concat(t)})}},isDebounced:!0,getOptionKeywords:function(e){return["#"+e.number]},getOptionLabel:function(e,t){var a=le("#"+e.number,t)||{};return[Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":"#"+e.number},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:"#"+e.number}}},je=function(e){var t=e.product,a=e.alt,r=e.width,n=e.height,c=e.className,o=Object(q.a)(e,["product","alt","width","height","className"]),i=Object(g.get)(t,["images",0])||Object(g.get)(t,["image"]),l=i&&i.src||!1,s=a||i&&i.alt||"",u=k()("woocommerce-product-image",c,{"is-placeholder":!l});return Object(h.createElement)("img",Object(W.a)({className:u,src:l||wcSettings.wcAssetUrl+"images/placeholder.png",width:r,height:n,alt:s},o))};je.propTypes={width:b.a.number,height:b.a.number,className:b.a.string,product:b.a.object,alt:b.a.string},je.defaultProps={width:60,height:60,className:""};var Ee=je,ke={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=L({search:e,per_page:10,orderby:"popularity"}));return ie()({path:"/wc/v4/products".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name,e.sku]},getFreeTextOptions:function(e){return[{key:"title",label:Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},j()({mixedString:Object(p.__)("All products with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=le(e.name,t)||{};return[Object(h.createElement)(Ee,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},_e={name:"taxes",className:"woocommerce-search__tax-result",options:function(e){var t="";e&&(t=L({code:e,per_page:10}));return ie()({path:"/wc/v4/taxes".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.id,se(e)]},getFreeTextOptions:function(e){return[{key:"code",label:Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},j()({mixedString:Object(p.__)("All taxes with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=le(se(e),t)||{};return[Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:se(e)}}},xe={name:"usernames",className:"woocommerce-search__usernames-result",options:function(e){var t="";e&&(t=L({search:e,searchby:"username",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.username]},getOptionLabel:function(e,t){var a=le(e.username,t)||{};return[Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.username},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.username}}};function Ce(e){return e.attributes.reduce(function(e,t,a,r){return e+"".concat(t.option).concat(r.length===a+1?"":", ")},"")}var Ne={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=L({search:e,per_page:10}));var a=F().products;return a&&!a.includes(",")||console.warn("Invalid product id supplied to Variations autocompleter"),ie()({path:"/wc/v4/products/".concat(a,"/variations").concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[Ce(e),e.sku]},getOptionLabel:function(e,t){var a=le(Ce(e),t)||{};return[Object(h.createElement)(Ee,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(h.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.description},a.suggestionBeforeMatch,Object(h.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:Ce(e)}}},ze=function(e){var t=e.id,a=e.instanceId,r=e.isVisible,n=e.label,c=e.popoverContents,o=e.remove,i=e.screenReaderLabel,l=e.setState,s=e.className;if(i=i||n,!n)return null;var u=k()("woocommerce-tag",s,{"has-remove":!!o}),m="woocommerce-tag__label-".concat(a),d=Object(h.createElement)(h.Fragment,null,Object(h.createElement)("span",{className:"screen-reader-text"},i),Object(h.createElement)("span",{"aria-hidden":"true"},n));return Object(h.createElement)("span",{className:u},c?Object(h.createElement)(f.Button,{className:"woocommerce-tag__text",id:m,onClick:function(){return l(function(){return{isVisible:!0}})},isToggled:r},d):Object(h.createElement)("span",{className:"woocommerce-tag__text",id:m},d),c&&r&&Object(h.createElement)(f.Popover,{onClose:function(){return l(function(){return{isVisible:!1}})}},c),o&&Object(h.createElement)(f.IconButton,{className:"woocommerce-tag__remove",icon:Object(h.createElement)(f.Dashicon,{icon:"dismiss",size:20}),onClick:o(t),label:Object(p.sprintf)(Object(p.__)("Remove %s","woocommerce-admin"),n),"aria-describedby":m}))};ze.propTypes={id:b.a.oneOfType([b.a.number,b.a.string]),label:b.a.string.isRequired,popoverContents:b.a.node,remove:b.a.func,screenReaderLabel:b.a.string};var Me=Object(te.withState)({isVisible:!1})(Object(te.withInstanceId)(ze)),Se=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).state={value:"",isActive:!1},a.input=Object(h.createRef)(),a.selectResult=a.selectResult.bind(Object(m.a)(a)),a.removeAll=a.removeAll.bind(Object(m.a)(a)),a.removeResult=a.removeResult.bind(Object(m.a)(a)),a.updateSearch=a.updateSearch.bind(Object(m.a)(a)),a.onFocus=a.onFocus.bind(Object(m.a)(a)),a.onBlur=a.onBlur.bind(Object(m.a)(a)),a.onKeyDown=a.onKeyDown.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"selectResult",value:function(e){var t=this.props,a=t.selected,r=t.onChange;-1===Object(g.findIndex)(a,{id:e.id})&&(this.setState({value:""}),r([].concat(Object(c.a)(a),[e])))}},{key:"removeAll",value:function(){(0,this.props.onChange)([])}},{key:"removeResult",value:function(e){var t=this;return function(){var a=t.props,r=a.selected,n=a.onChange,o=Object(g.findIndex)(r,{id:e});n([].concat(Object(c.a)(r.slice(0,o)),Object(c.a)(r.slice(o+1))))}}},{key:"updateSearch",value:function(e){var t=this;return function(a){var r=a.target.value||"";t.setState({value:r}),e(a)}}},{key:"getAutocompleter",value:function(){switch(this.props.type){case"categories":return ue;case"countries":return ge;case"coupons":return ve;case"customers":return be;case"downloadIps":return we;case"emails":return Oe;case"orders":return ye;case"products":return ke;case"taxes":return _e;case"usernames":return xe;case"variations":return Ne;default:return{}}}},{key:"shouldRenderTags",value:function(){return this.props.selected.some(function(e){return Boolean(e.label)})}},{key:"renderTags",value:function(){var e=this,t=this.props.selected;return this.shouldRenderTags()?Object(h.createElement)(h.Fragment,null,t.map(function(a,r){if(!a.label)return null;var n=Object(p.sprintf)(Object(p.__)("%1$s (%2$s of %3$s)","woocommerce-admin"),a.label,r+1,t.length);return Object(h.createElement)(Me,{key:a.id,id:a.id,label:a.label,remove:e.removeResult,screenReaderLabel:n})})):null}},{key:"onFocus",value:function(e){var t=this;return function(a){t.setState({isActive:!0}),e(a)}}},{key:"onBlur",value:function(){this.setState({isActive:!1})}},{key:"onKeyDown",value:function(e){var t=this.state.value,a=this.props,r=a.selected,n=a.onChange;8===e.keyCode&&!t&&r.length&&n(Object(c.a)(r.slice(0,-1)))}},{key:"render",value:function(){var e=this,t=this.getAutocompleter(),a=this.props,r=a.allowFreeTextSearch,n=a.className,c=a.inlineTags,o=a.instanceId,i=a.placeholder,l=a.selected,s=a.showClearButton,u=a.staticResults,m=this.state,d=m.value,g=void 0===d?"":d,v=m.isActive,b={"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"]},w=this.shouldRenderTags(),y=t.inputType?t.inputType:"text",j=Object(h.createElement)(O.a,{className:"woocommerce-search__icon",icon:"search",size:18});return Object(h.createElement)("div",{className:k()("woocommerce-search",n,{"has-inline-tags":c})},Object(h.createElement)(ce,{allowFreeText:r,completer:t,onSelect:this.selectResult,selected:l.map(function(e){return e.id}),staticResults:u},function(t){var a=t.listBoxId,r=t.activeId,n=t.onChange;return c?Object(h.createElement)("div",{className:k()("woocommerce-search__inline-container",{"is-active":v,"has-tags":c&&w}),onClick:function(){e.input.current.focus()}},j,Object(h.createElement)("div",{className:"woocommerce-search__token-list"},e.renderTags(),Object(h.createElement)("input",Object(W.a)({ref:e.input,type:y,size:(0===g.length&&i&&i.length||g.length)+1,value:g,placeholder:!w&&i||"",className:"woocommerce-search__inline-input",onChange:e.updateSearch(n),"aria-owns":a,"aria-activedescendant":r,onFocus:e.onFocus(n),onBlur:e.onBlur,onKeyDown:e.onKeyDown,"aria-describedby":w?"search-inline-input-".concat(o):null},b)),Object(h.createElement)("span",{id:"search-inline-input-".concat(o),className:"screen-reader-text"},Object(p.__)("Move backward for selected items","woocommerce-admin")))):Object(h.createElement)(h.Fragment,null,j,Object(h.createElement)("input",Object(W.a)({type:"search",value:g,placeholder:i,className:"woocommerce-search__input",onChange:e.updateSearch(n),"aria-owns":a,"aria-activedescendant":r},b)))}),!c&&this.renderTags(),s&&w?Object(h.createElement)(f.Button,{className:"woocommerce-search__clear",isLink:!0,onClick:this.removeAll},Object(h.createElement)(f.Icon,{icon:"dismiss"}),Object(h.createElement)("span",{className:"screen-reader-text"},Object(p.__)("Clear all","woocommerce-admin"))):null)}}]),t}(h.Component);Se.propTypes={allowFreeTextSearch:b.a.bool,className:b.a.string,onChange:b.a.func,type:b.a.oneOf(["categories","countries","coupons","customers","downloadIps","emails","orders","products","taxes","usernames","variations"]).isRequired,placeholder:b.a.string,selected:b.a.arrayOf(b.a.shape({id:b.a.oneOfType([b.a.number,b.a.string]).isRequired,label:b.a.string})),inlineTags:b.a.bool,showClearButton:b.a.bool,staticResults:b.a.bool},Se.defaultProps={allowFreeTextSearch:!1,onChange:g.noop,selected:[],inlineTags:!1,showClearButton:!1,staticResults:!1};var He=Object(te.withInstanceId)(Se),Ve=function(e){function t(e){var a,r=e.filter,n=e.config,c=e.query;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).apply(this,arguments))).onSearchChange=a.onSearchChange.bind(Object(m.a)(a)),a.state={selected:[]},a.updateLabels=a.updateLabels.bind(Object(m.a)(a)),r.value.length&&n.input.getLabels(r.value,c).then(a.updateLabels),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.config,r=t.filter,n=t.query,c=e.filter;if(r.value.length&&!Object(g.isEqual)(c,r)){var o=this.state.selected.map(function(e){return e.id});B(r.value).every(function(e){return!o.includes(e)})&&a.input.getLabels(r.value,n).then(this.updateLabels)}}},{key:"updateLabels",value:function(e){var t=this.state.selected.map(function(e){return e.id}),a=e.map(function(e){return e.id});Object(g.isEqual)(a.sort(),t.sort())||this.setState({selected:e})}},{key:"onSearchChange",value:function(e){this.setState({selected:e});var t=this.props,a=t.filter,r=t.onFilterChange,n=e.map(function(e){return e.id}).join(",");r(a.key,"value",n)}},{key:"getScreenReaderText",value:function(e,t){var a=this.state.selected;if(0===a.length)return"";var r=Object(g.find)(t.rules,{value:e.rule})||{},n=a.map(function(e){return e.label}).join(", ");return X(j()({mixedString:t.labels.title,components:{filter:Object(h.createElement)(h.Fragment,null,n),rule:Object(h.createElement)(h.Fragment,null,r.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,c=e.isEnglish,o=this.state.selected,i=r.key,l=r.rule,s=a.input,u=a.labels,m=a.rules,d=j()({mixedString:u.title,components:{title:Object(h.createElement)("span",{className:t}),rule:Object(h.createElement)(f.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:m,value:l,onChange:Object(g.partial)(n,i,"rule"),"aria-label":u.rule}),filter:Object(h.createElement)(He,{className:k()(t,"woocommerce-filters-advanced__input"),onChange:this.onSearchChange,type:s.type,placeholder:u.placeholder,selected:o,inlineTags:!0,"aria-label":u.filter})}}),p=this.getScreenReaderText(r,a);return Object(h.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(h.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(h.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":c})},d),p&&Object(h.createElement)("span",{className:"screen-reader-text"},p))}}]),t}(h.Component);Ve.propTypes={config:b.a.shape({labels:b.a.shape({placeholder:b.a.string,rule:b.a.string,title:b.a.string}),rules:b.a.arrayOf(b.a.object),input:b.a.object}).isRequired,filter:b.a.shape({key:b.a.string,rule:b.a.string,value:b.a.string}).isRequired,onFilterChange:b.a.func.isRequired,query:b.a.object};var Le=Ve,Be=a(54),Te=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props,t=e.label,a=e.value,r=e.help,n=e.className,c=e.instanceId,o=e.onChange,i=e.prefix,l=e.suffix,s=e.type,u=Object(q.a)(e,["label","value","help","className","instanceId","onChange","prefix","suffix","type"]),m="inspector-text-control-with-affixes-".concat(c),d=[];return r&&d.push("".concat(m,"__help")),i&&d.push("".concat(m,"__prefix")),l&&d.push("".concat(m,"__suffix")),Object(h.createElement)(f.BaseControl,{label:t,id:m,help:r,className:n},Object(h.createElement)("div",{className:"text-control-with-affixes"},i&&Object(h.createElement)("span",{id:"".concat(m,"__prefix"),className:"text-control-with-affixes__prefix"},i),Object(h.createElement)("input",Object(W.a)({className:"components-text-control__input",type:s,id:m,value:a,onChange:function(e){return o(e.target.value)},"aria-describedby":d.join(" ")},u)),l&&Object(h.createElement)("span",{id:"".concat(m,"__suffix"),className:"text-control-with-affixes__suffix"},l)))}}]),t}(h.Component);Te.defaultProps={type:"text"},Te.propTypes={label:b.a.string,help:b.a.string,type:b.a.string,value:b.a.string.isRequired,className:b.a.string,onChange:b.a.func.isRequired,prefix:b.a.node,suffix:b.a.node};var Fe=Object(te.withInstanceId)(Te),Re=a(359);function De(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("number"!=typeof e&&(e=parseFloat(e)),isNaN(e))return"";var a=Object(g.get)(wcSettings,["currency","decimal_separator"],"."),r=Object(g.get)(wcSettings,["currency","thousand_separator"],",");if(t=parseInt(t),isNaN(t)){var n=e.toString().split("."),c=Object(Be.a)(n,2)[1];t=c?c.length:0}return Re(e,t,a,r)}function Pe(e,t){t||(t=Object(g.get)(wcSettings,["currency","symbol"],"$"));var a=De(e,Object(g.get)(wcSettings,["currency","precision"],2)),r=Object(g.get)(wcSettings,["currency","price_format"],"%1$s%2$s");return""===a?a:Object(p.sprintf)(r,t,a)}var qe=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"getBetweenString",value:function(){return Object(p._x)("{{rangeStart /}}{{span}} and {{/span}}{{rangeEnd /}}","Numerical range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var a=Object(g.get)(t,["input","type"],"number"),r=Object(g.find)(t.rules,{value:e.rule})||{},n=Object(g.isArray)(e.value)?e.value:[e.value],c=Object(Be.a)(n,2),o=c[0],i=c[1];if(!o||"between"===r.value&&!i)return"";"currency"===a&&(o=Pe(o),i=Pe(i));var l=o;return"between"===r.value&&(l=j()({mixedString:this.getBetweenString(),components:{rangeStart:Object(h.createElement)(h.Fragment,null,o),rangeEnd:Object(h.createElement)(h.Fragment,null,i),span:Object(h.createElement)(h.Fragment,null)}})),X(j()({mixedString:t.labels.title,components:{filter:Object(h.createElement)(h.Fragment,null,l),rule:Object(h.createElement)(h.Fragment,null,r.label)}}))}},{key:"getFormControl",value:function(e){var t=e.type,a=e.value,r=e.label,n=e.onChange;if("currency"===t){var c=Object(g.get)(wcSettings,["currency","symbol"]);return 0===Object(g.get)(wcSettings,["currency","position"]).indexOf("right")?Object(h.createElement)(Fe,{suffix:Object(h.createElement)("span",{dangerouslySetInnerHTML:{__html:c}}),className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n}):Object(h.createElement)(Fe,{prefix:Object(h.createElement)("span",{dangerouslySetInnerHTML:{__html:c}}),className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n})}return Object(h.createElement)(f.TextControl,{className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n})}},{key:"getFilterInputs",value:function(){var e=this.props,t=e.config,a=e.filter,r=e.onFilterChange,n=Object(g.get)(t,["input","type"],"number");if("between"===a.rule)return this.getRangeInput();var c=Object(g.isArray)(a.value)?a.value:[a.value],o=Object(Be.a)(c,2),i=o[0],l=o[1];Boolean(l)&&r(a.key,"value",i||l);var s="";return s="lessthan"===a.rule?Object(p._x)("%(field)s maximum amount","maximum value input","woocommerce-admin"):Object(p._x)("%(field)s minimum amount","minimum value input","woocommerce-admin"),this.getFormControl({type:n,value:i||l,label:Object(p.sprintf)(s,{field:Object(g.get)(t,["labels","add"])}),onChange:Object(g.partial)(r,a.key,"value")})}},{key:"getRangeInput",value:function(){var e=this.props,t=e.config,a=e.filter,r=e.onFilterChange,n=Object(g.get)(t,["input","type"],"number"),c=Object(g.isArray)(a.value)?a.value:[a.value],o=Object(Be.a)(c,2),i=o[0],l=o[1];return j()({mixedString:this.getBetweenString(),components:{rangeStart:this.getFormControl({type:n,value:i||"",label:Object(p.sprintf)(Object(p.__)("%(field)s range start","woocommerce-admin"),{field:Object(g.get)(t,["labels","add"])}),onChange:function(e){r(a.key,"value",[e,l])}}),rangeEnd:this.getFormControl({type:n,value:l||"",label:Object(p.sprintf)(Object(p.__)("%(field)s range end","woocommerce-admin"),{field:Object(g.get)(t,["labels","add"])}),onChange:function(e){r(a.key,"value",[i,e])}}),span:Object(h.createElement)("span",{className:"separator"})}})}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,c=e.isEnglish,o=r.key,i=r.rule,l=a.labels,s=a.rules,u=j()({mixedString:l.title,components:{title:Object(h.createElement)("span",{className:t}),rule:Object(h.createElement)(f.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:s,value:i,onChange:Object(g.partial)(n,o,"rule"),"aria-label":l.rule}),filter:Object(h.createElement)("div",{className:k()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===i})},this.getFilterInputs())}}),m=this.getScreenReaderText(r,a);return Object(h.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(h.createElement)("legend",{className:"screen-reader-text"},l.add||""),Object(h.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":c})},u),m&&Object(h.createElement)("span",{className:"screen-reader-text"},m))}}]),t}(h.Component),Ie=a(8),Ae=a.n(Ie),Ke="month",Ye="previous_year",Ue="YYYY-MM-DD",Qe=[{value:"today",label:Object(p.__)("Today","woocommerce-admin")},{value:"yesterday",label:Object(p.__)("Yesterday","woocommerce-admin")},{value:"week",label:Object(p.__)("Week to Date","woocommerce-admin")},{value:"last_week",label:Object(p.__)("Last Week","woocommerce-admin")},{value:"month",label:Object(p.__)("Month to Date","woocommerce-admin")},{value:"last_month",label:Object(p.__)("Last Month","woocommerce-admin")},{value:"quarter",label:Object(p.__)("Quarter to Date","woocommerce-admin")},{value:"last_quarter",label:Object(p.__)("Last Quarter","woocommerce-admin")},{value:"year",label:Object(p.__)("Year to Date","woocommerce-admin")},{value:"last_year",label:Object(p.__)("Last Year","woocommerce-admin")},{value:"custom",label:Object(p.__)("Custom","woocommerce-admin")}],We=[{value:"previous_period",label:Object(p.__)("Previous Period","woocommerce-admin")},{value:"previous_year",label:Object(p.__)("Previous Year","woocommerce-admin")}];function Ge(e,t){if(Ae.a.isMoment(t))return t.isValid()?t:null;if("string"==typeof t){var a=Ae()(t,[Ue,e],!0);return a.isValid()?a:null}throw new Error("toMoment requires a string to be passed as an argument")}function $e(e,t){var a=e.year()===t.year(),r=a&&e.month()===t.month(),n=a&&r&&e.isSame(t,"day"),c=Object(p.__)("MMM D, YYYY","woocommerce-admin"),o=Object(p.__)("MMM D","woocommerce-admin");if(n)return e.format(c);if(r){var i=e.date();return e.format(c).replace(i,"".concat(i," - ").concat(t.date()))}return a?"".concat(e.format(o)," - ").concat(t.format(c)):"".concat(e.format(c)," - ").concat(t.format(c))}function Je(e,t){var a,r,n=Ae()().startOf(e).subtract(1,e),c=n.clone().endOf(e);if("previous_period"===t)if("year"===e)r=(a=Ae()().startOf(e).subtract(2,e)).clone().endOf(e);else{var o=c.diff(n,"days");a=(r=n.clone().subtract(1,"days")).clone().subtract(o,"days")}else r=(a="week"===e?n.clone().subtract(1,"years").week(n.week()).startOf("week"):n.clone().subtract(1,"years")).clone().endOf(e);return{primaryStart:n,primaryEnd:c,secondaryStart:a,secondaryEnd:r}}function Xe(e,t){var a,r,n=Ae()().startOf(e),c=Ae()(),o=c.diff(n,"days");return"previous_period"===t?(a=n.clone().subtract(1,e),r=c.clone().subtract(1,e)):r=(a="week"===e?n.clone().subtract(1,"years").week(n.week()).startOf("week"):n.clone().subtract(1,"years")).clone().add(o,"days"),{primaryStart:n,primaryEnd:c,secondaryStart:a,secondaryEnd:r}}var Ze=function(e){var t=e.period,a=e.compare,r=e.after,n=e.before;return{period:t||Ke,compare:a||Ye,after:r?Ae()(r):null,before:n?Ae()(n):null}},et=function(e){var t=Ze(e),a=t.period,r=t.compare,n=t.after,c=t.before,o=function(e,t,a,r){switch(e){case"today":return Xe("day",t);case"yesterday":return Je("day",t);case"week":return Xe("week",t);case"last_week":return Je("week",t);case"month":return Xe("month",t);case"last_month":return Je("month",t);case"quarter":return Xe("quarter",t);case"last_quarter":return Je("quarter",t);case"year":return Xe("year",t);case"last_year":return Je("year",t);case"custom":var n=r.diff(a,"days");if("previous_period"===t){var c=a.clone().subtract(1,"days");return{primaryStart:a,primaryEnd:r,secondaryStart:c.clone().subtract(n,"days"),secondaryEnd:c}}return{primaryStart:a,primaryEnd:r,secondaryStart:a.clone().subtract(1,"years"),secondaryEnd:r.clone().subtract(1,"years")}}}(a,r,n,c),i=o.primaryStart,l=o.primaryEnd,s=o.secondaryStart,u=o.secondaryEnd;return{primary:{label:Object(g.find)(Qe,function(e){return e.value===a}).label,range:$e(i,l),after:i,before:l},secondary:{label:Object(g.find)(We,function(e){return e.value===r}).label,range:$e(s,u),after:s,before:u}}};var tt,at,rt;tt=wcSettings.l10n,at=tt.userLocale,rt=tt.weekdaysShort,"en"!==Ae.a.locale()&&Ae.a.updateLocale(at,{longDateFormat:{L:Object(p.__)("MM/DD/YYYY","woocommerce-admin"),LL:Object(p.__)("MMMM D, YYYY","woocommerce-admin"),LLL:Object(p.__)("D MMMM YYYY LT","woocommerce-admin"),LLLL:Object(p.__)("dddd, D MMMM YYYY LT","woocommerce-admin"),LT:Object(p.__)("HH:mm","woocommerce-admin")},weekdaysMin:rt});var nt={invalid:Object(p.__)("Invalid date","woocommerce-admin"),future:Object(p.__)("Select a date in the past","woocommerce-admin"),startAfterEnd:Object(p.__)("Start date must be before end date","woocommerce-admin"),endBeforeStart:Object(p.__)("Start date must be before end date","woocommerce-admin")};a(198),a(209);var ct=function(e){var t=e.value,a=e.onChange,r=e.dateFormat,n=e.label,c=e.describedBy,o=e.error,i=e.onFocus,l=e.onKeyDown,s=e.errorPosition,u=k()("woocommerce-calendar__input",{"is-empty":0===t.length,"is-error":o}),m=Object(g.uniqueId)("_woo-dates-input");return Object(h.createElement)("div",{className:u},Object(h.createElement)("input",{type:"text",className:"woocommerce-calendar__input-text",value:t,onChange:a,"aria-label":n,id:m,"aria-describedby":"".concat(m,"-message"),placeholder:r.toLowerCase(),onFocus:i,onKeyDown:l}),o&&Object(h.createElement)(f.Popover,{className:"woocommerce-calendar__input-error",focusOnMount:!1,position:s},o),Object(h.createElement)(f.Dashicon,{icon:"calendar"}),Object(h.createElement)("p",{className:"screen-reader-text",id:"".concat(m,"-message")},o||c))};ct.propTypes={value:b.a.string,onChange:b.a.func.isRequired,dateFormat:b.a.string.isRequired,label:b.a.string.isRequired,describedBy:b.a.string.isRequired,error:b.a.string,errorPosition:b.a.string,onFocus:b.a.func,onKeyDown:b.a.func},ct.defaultProps={onFocus:function(){},errorPosition:"bottom center",onKeyDown:g.noop};var ot=ct,it=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).onDateChange=a.onDateChange.bind(Object(m.a)(a)),a.onInputChange=a.onInputChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"handleKeyDown",value:function(e,t,a){var r=a.keyCode;ae.TAB===r&&e&&t()}},{key:"handleFocus",value:function(e,t){e||t()}},{key:"onDateChange",value:function(e,t){var a=this.props,r=a.onUpdate,n=a.dateFormat,c=Ae()(t);r({date:c,text:t?c.format(n):"",error:null}),e()}},{key:"onInputChange",value:function(e){var t=e.target.value,a=Ge(this.props.dateFormat,t),r=a?null:Object(p.__)("Invalid date","woocommerce-admin");this.props.onUpdate({date:a,text:t,error:t.length>0?r:null})}},{key:"render",value:function(){var e=this,t=this.props,a=t.date,r=t.text,n=t.dateFormat,c=t.error,o=t.isInvalidDate;return Object(h.createElement)(f.Dropdown,{position:"bottom center",focusOnMount:!1,renderToggle:function(t){var a=t.isOpen,o=t.onToggle;return Object(h.createElement)(ot,{value:r,onChange:e.onInputChange,dateFormat:n,label:Object(p.__)("Choose a date","woocommerce-admin"),error:c,describedBy:Object(p.sprintf)(Object(p.__)("Date input describing a selected date in format %s","woocommerce-admin"),n),onFocus:Object(g.partial)(e.handleFocus,a,o),"aria-expanded":a,focusOnMount:!1,onKeyDown:Object(g.partial)(e.handleKeyDown,a,o),errorPosition:"top center"})},renderContent:function(t){var r=t.onToggle;return Object(h.createElement)(K,{component:!1},Object(h.createElement)(A,{className:"woocommerce-calendar__date-picker-title"},Object(p.__)("select a date","woocommerce-admin")),Object(h.createElement)("div",{className:"woocommerce-calendar__react-dates is-core-datepicker"},Object(h.createElement)(f.DatePicker,{currentDate:a,onChange:Object(g.partial)(e.onDateChange,r),isInvalidDate:o})))}})}}]),t}(h.Component);it.propTypes={date:b.a.object,text:b.a.string,error:b.a.string,onUpdate:b.a.func.isRequired,dateFormat:b.a.string.isRequired,isInvalidDate:b.a.func};var lt=it,st=Object(p.__)("MMM D, YYYY","woocommerce-admin"),ut=Object(p.__)("MM/DD/YYYY","woocommerce-admin"),mt=function(e){function t(e){var a,r=e.filter;Object(i.a)(this,t),a=Object(s.a)(this,Object(u.a)(t).apply(this,arguments));var n=Array.isArray(r.value)?r.value:[null,r.value],c=Object(Be.a)(n,2),o=c[0],l=c[1],d=o?Ge(Ue,o):null,h=l?Ge(Ue,l):null;return a.state={before:h,beforeText:h?h.format(ut):"",beforeError:null,after:d,afterText:d?d.format(ut):"",afterError:null},a.onSingleDateChange=a.onSingleDateChange.bind(Object(m.a)(a)),a.onRangeDateChange=a.onRangeDateChange.bind(Object(m.a)(a)),a.onRuleChange=a.onRuleChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"getBetweenString",value:function(){return Object(p._x)("{{after /}}{{span}} and {{/span}}{{before /}}","Date range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var a=Object(g.find)(t.rules,{value:e.rule})||{},r=this.state,n=r.before,c=r.after;if(!n||"between"===a.value&&!c)return"";var o=n.format(st);return"between"===a.value&&(o=j()({mixedString:this.getBetweenString(),components:{after:Object(h.createElement)(h.Fragment,null,c.format(st)),before:Object(h.createElement)(h.Fragment,null,n.format(st)),span:Object(h.createElement)(h.Fragment,null)}})),X(j()({mixedString:t.labels.title,components:{filter:Object(h.createElement)(h.Fragment,null,o),rule:Object(h.createElement)(h.Fragment,null,a.label)}}))}},{key:"onSingleDateChange",value:function(e){var t=e.date,a=e.text,r=e.error,n=this.props,c=n.filter,o=n.onFilterChange;this.setState({before:t,beforeText:a,beforeError:r}),t&&o(c.key,"value",t.format(Ue))}},{key:"onRangeDateChange",value:function(e,t){var a,r=t.date,n=t.text,c=t.error,i=this.props,l=i.filter,s=i.onFilterChange;if(this.setState((a={},Object(o.a)(a,e,r),Object(o.a)(a,e+"Text",n),Object(o.a)(a,e+"Error",c),a)),r){var u=this.state,m=u.before,d=u.after,h=null,p=null;"after"===e&&(h=r.format(Ue),p=m?m.format(Ue):null),"before"===e&&(h=d?d.format(Ue):null,p=r.format(Ue)),h&&p&&s(l.key,"value",[h,p])}}},{key:"isFutureDate",value:function(e){return Ae()().isBefore(Ae()(e),"day")}},{key:"getFilterInputs",value:function(){var e=this.props.filter,t=this.state,a=t.before,r=t.beforeText,n=t.beforeError,c=t.after,o=t.afterText,i=t.afterError;return"between"===e.rule?j()({mixedString:this.getBetweenString(),components:{after:Object(h.createElement)(lt,{date:c,text:o,error:i,onUpdate:Object(g.partial)(this.onRangeDateChange,"after"),dateFormat:ut,isInvalidDate:this.isFutureDate}),before:Object(h.createElement)(lt,{date:a,text:r,error:n,onUpdate:Object(g.partial)(this.onRangeDateChange,"before"),dateFormat:ut,isInvalidDate:this.isFutureDate}),span:Object(h.createElement)("span",{className:"separator"})}}):Object(h.createElement)(lt,{date:a,text:r,error:n,onUpdate:this.onSingleDateChange,dateFormat:ut,isInvalidDate:this.isFutureDate})}},{key:"onRuleChange",value:function(e){var t=this.props,a=t.onFilterChange,r=t.filter,n=t.updateFilter,c=this.state.before;"between"===r.rule&&"between"!==e?n({key:r.key,rule:e,value:c?c.format(Ue):void 0}):a(r.key,"rule",e)}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.isEnglish,c=r.rule,o=a.labels,i=a.rules,l=this.getScreenReaderText(r,a),s=j()({mixedString:o.title,components:{title:Object(h.createElement)("span",{className:t}),rule:Object(h.createElement)(f.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:i,value:c,onChange:this.onRuleChange,"aria-label":o.rule}),filter:Object(h.createElement)("div",{className:k()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===c})},this.getFilterInputs())}});return Object(h.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(h.createElement)("legend",{className:"screen-reader-text"},o.add||""),Object(h.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":n})},s),l&&Object(h.createElement)("span",{className:"screen-reader-text"},l))}}]),t}(h.Component),dt=[{value:"all",label:Object(p.__)("All","woocommerce-admin")},{value:"any",label:Object(p.__)("Any","woocommerce-admin")}],ht=function(e){function t(e){var a,r=e.query,n=e.config;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).apply(this,arguments))).state={match:r.match||"all",activeFilters:z(r,n.filters)},a.filterListRef=Object(h.createRef)(),a.onMatchChange=a.onMatchChange.bind(Object(m.a)(a)),a.onFilterChange=a.onFilterChange.bind(Object(m.a)(a)),a.getAvailableFilterKeys=a.getAvailableFilterKeys.bind(Object(m.a)(a)),a.addFilter=a.addFilter.bind(Object(m.a)(a)),a.removeFilter=a.removeFilter.bind(Object(m.a)(a)),a.clearFilters=a.clearFilters.bind(Object(m.a)(a)),a.getUpdateHref=a.getUpdateHref.bind(Object(m.a)(a)),a.updateFilter=a.updateFilter.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.config,r=t.query,n=e.query;Object(g.isEqual)(n,r)||this.setState({activeFilters:z(r,a.filters)})}},{key:"onMatchChange",value:function(e){this.setState({match:e})}},{key:"onFilterChange",value:function(e,t,a){var r=this.state.activeFilters.map(function(r){return e===r.key?Object.assign({},r,Object(o.a)({},t,a)):r});this.setState({activeFilters:r})}},{key:"updateFilter",value:function(e){var t=this.state.activeFilters.map(function(t){return e.key===t.key?e:t});this.setState({activeFilters:t})}},{key:"removeFilter",value:function(e){var t=Object(c.a)(this.state.activeFilters),a=Object(g.findIndex)(t,function(t){return t.key===e});(t.splice(a,1),this.setState({activeFilters:t}),0===t.length)&&N().push(this.getUpdateHref([]))}},{key:"getTitle",value:function(){var e=this.state.match,t=this.props.config;return j()({mixedString:t.title,components:{select:Object(h.createElement)(f.SelectControl,{className:"woocommerce-filters-advanced__title-select",options:dt,value:e,onChange:this.onMatchChange,"aria-label":Object(p.__)("Choose to apply any or all filters","woocommerce-admin")})}})}},{key:"getAvailableFilterKeys",value:function(){var e=this.props.config,t=this.state.activeFilters.map(function(e){return e.key});return Object(g.difference)(Object.keys(e.filters),t)}},{key:"addFilter",value:function(e,t){var a=this,r=this.props.config.filters[e],n={key:e};Array.isArray(r.rules)&&r.rules.length&&(n.rule=r.rules[0].value),r.input&&r.input.options&&(n.value=M(r,r.input.options)),r.input&&"Search"===r.input.component&&(n.value=""),this.setState(function(e){return{activeFilters:[].concat(Object(c.a)(e.activeFilters),[n])}}),t(),setTimeout(function(){a.filterListRef.current.querySelector("li:last-of-type fieldset").focus()})}},{key:"clearFilters",value:function(){this.setState({activeFilters:[],match:"all"})}},{key:"getUpdateHref",value:function(e,t){var a=this.props,r=a.path,c=a.query,o=function(e,t,a){var r=z(t,a).reduce(function(e,t){return e[S(t.key,t.rule)]=void 0,e},{}),c=e.reduce(function(e,t){return"between"!==t.rule||Array.isArray(t.value)&&!t.value.some(function(e){return!e})?(t.value&&(e[S(t.key,t.rule)]=t.value),e):e},{});return Object(n.a)({},r,c)}(e,c,a.config.filters),i="all"===t?void 0:t;return T(Object(n.a)({},o,{match:i}),r,c)}},{key:"isEnglish",value:function(){var e=wcSettings.siteLocale;return/en-/.test(e)}},{key:"render",value:function(){var e=this,t=this.props,a=t.config,r=t.query,c=this.state,o=c.activeFilters,i=c.match,l=this.getAvailableFilterKeys(),s=this.getUpdateHref(o,i),u=window.location.hash&&(window.location.hash.substr(1)===s||0===o.length),m=this.isEnglish();return Object(h.createElement)(Q,{className:"woocommerce-filters-advanced",title:this.getTitle()},Object(h.createElement)("ul",{className:"woocommerce-filters-advanced__list",ref:this.filterListRef},o.map(function(t){var c=t.key,o=a.filters[c],i=o.input,l=o.labels;return Object(h.createElement)("li",{className:"woocommerce-filters-advanced__list-item",key:c},"SelectControl"===i.component&&Object(h.createElement)(ee,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[c],onFilterChange:e.onFilterChange,isEnglish:m}),"Search"===i.component&&Object(h.createElement)(Le,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[c],onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Number"===i.component&&Object(h.createElement)(qe,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[c],onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Currency"===i.component&&Object(h.createElement)(qe,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:Object(n.a)({},a.filters[c],{input:{type:"currency",component:"Currency"}}),onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Date"===i.component&&Object(h.createElement)(mt,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[c],onFilterChange:e.onFilterChange,isEnglish:m,query:r,updateFilter:e.updateFilter}),Object(h.createElement)(f.IconButton,{className:k()("woocommerce-filters-advanced__line-item","woocommerce-filters-advanced__remove"),label:l.remove,onClick:Object(g.partial)(e.removeFilter,c),icon:Object(h.createElement)(O.a,{icon:"cross-small"})}))})),l.length>0&&Object(h.createElement)("div",{className:"woocommerce-filters-advanced__add-filter"},Object(h.createElement)(f.Dropdown,{className:"woocommerce-filters-advanced__add-filter-dropdown",position:"bottom center",renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(h.createElement)(f.IconButton,{className:"woocommerce-filters-advanced__add-button",icon:Object(h.createElement)(O.a,{icon:"add-outline"}),onClick:a,"aria-expanded":t},Object(p.__)("Add a Filter","woocommerce-admin"))},renderContent:function(t){var r=t.onClose;return Object(h.createElement)("ul",{className:"woocommerce-filters-advanced__add-dropdown"},l.map(function(t){return Object(h.createElement)("li",{key:t},Object(h.createElement)(f.Button,{onClick:Object(g.partial)(e.addFilter,t,r)},a.filters[t].labels.add))}))}})),Object(h.createElement)("div",{className:"woocommerce-filters-advanced__controls"},u&&Object(h.createElement)(f.Button,{isPrimary:!0,disabled:!0},Object(p.__)("Filter","woocommerce-admin")),!u&&Object(h.createElement)(J,{className:"components-button is-primary is-button",type:"wc-admin",href:s},Object(p.__)("Filter","woocommerce-admin")),o.length>0&&Object(h.createElement)(J,{type:"wc-admin",href:this.getUpdateHref([]),onClick:this.clearFilters},Object(p.__)("Clear all filters","woocommerce-admin"))))}}]),t}(h.Component);ht.propTypes={config:b.a.shape({title:b.a.string,filters:b.a.objectOf(b.a.shape({labels:b.a.shape({add:b.a.string,remove:b.a.string,rule:b.a.string,title:b.a.string,filter:b.a.string}),rules:b.a.arrayOf(b.a.object),input:b.a.object}))}).isRequired,path:b.a.string.isRequired,query:b.a.object},ht.defaultProps={query:{}};var pt=ht,ft=a(173),gt=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(s.a)(this,Object(u.a)(t).call(this))).state={animate:null},e.container=Object(h.createRef)(),e.onExited=e.onExited.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(l.a)(t,[{key:"onExited",value:function(){var e=this.props.onExited;e&&e(this.container.current)}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.animationKey,r=e.animate,n=k()("woocommerce-slide-animation",r&&"animate-".concat(r));return Object(h.createElement)("div",{className:n,ref:this.container},Object(h.createElement)(ft.TransitionGroup,null,Object(h.createElement)(ft.CSSTransition,Object(W.a)({timeout:200,classNames:"slide",key:a},this.props,{onExited:this.onExited}),function(e){return t({status:e})})))}}]),t}(h.Component);gt.propTypes={children:b.a.func.isRequired,animationKey:b.a.any.isRequired,animate:b.a.oneOf([null,"left","right"]),onExited:b.a.func};var vt=gt,bt=a(62),wt=a(177),Ot=a(174),yt=a(51),jt=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props.height;return Object(h.createElement)("div",{"aria-hidden":"true",className:"woocommerce-chart-placeholder",style:{height:e}},Object(h.createElement)(f.Spinner,null))}}]),t}(h.Component);jt.propTypes={height:b.a.number},jt.defaultProps={height:0};var Et=jt,kt=a(71),_t=a(55),xt=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).chartRef=Object(h.createRef)(),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.drawUpdatedChart()}},{key:"shouldComponentUpdate",value:function(e){return this.props.className!==e.className||!Object(g.isEqual)(this.props.data,e.data)||!Object(g.isEqual)(this.props.orderedKeys,e.orderedKeys)||this.props.drawChart!==e.drawChart||this.props.height!==e.height||this.props.chartType!==e.chartType||this.props.width!==e.width}},{key:"componentDidUpdate",value:function(){this.drawUpdatedChart()}},{key:"componentWillUnmount",value:function(){this.deleteChart()}},{key:"delayedScroll",value:function(){var e=this.props.tooltip;return Object(g.throttle)(function(){e&&e.hide()},300)}},{key:"deleteChart",value:function(){Object(_t.b)(this.chartRef.current).selectAll("svg").remove()}},{key:"drawUpdatedChart",value:function(){(0,this.props.drawChart)(this.getContainer())}},{key:"getContainer",value:function(){var e=this.props,t=e.className,a=e.height,r=e.width;this.deleteChart();var n=Object(_t.b)(this.chartRef.current).append("svg").attr("viewBox","0 0 ".concat(r," ").concat(a)).attr("height",a).attr("width",r).attr("preserveAspectRatio","xMidYMid meet");return t&&n.attr("class","".concat(t,"__viewbox")),n.append("g")}},{key:"render",value:function(){var e=this.props.className;return Object(h.createElement)("div",{className:k()("d3-base",e),ref:this.chartRef,onScroll:this.delayedScroll()})}}]),t}(h.Component);xt.propTypes={className:b.a.string,data:b.a.array,orderedKeys:b.a.array,tooltip:b.a.object,chartType:b.a.string};var Ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bt.a;return"function"==typeof e?e:t(e)},Nt=function(e){var t=new Set(e.reduce(function(e,t){return e.concat(Object.keys(t))},[]));return Object(c.a)(t).filter(function(e){return"date"!==e})},zt=a(115),Mt=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(zt.a)().domain(e.filter(function(e){return e.visible}).map(function(e){return e.key})).rangeRound([0,t.bandwidth()]).padding(a?0:.07)},St=function(e,t){return Object(zt.c)().domain([Ae()(e[0],"YYYY-MM-DD HH:mm").toDate(),Ae()(e[e.length-1],"YYYY-MM-DD HH:mm").toDate()]).rangeRound([0,t])},Ht=function(e){var t=function(e){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return e.map(function(e){for(var r=0,n=Object.entries(e);r<n.length;r++){var c=Object(Be.a)(n[r],2),o=c[0],i=c[1];"date"!==o&&Number.isFinite(i.value)&&i.value>t&&(t=i.value),"date"!==o&&Number.isFinite(i.value)&&i.value<a&&(a=i.value)}}),{upper:t,lower:a}}(e),a=t.lower,r=t.upper,n=function(e,t){if(!Number.isFinite(e)||!Number.isFinite(t))return 1;var a=4/3*Math.max(-e,t),r=3*Math.pow(10,(Math.log(a)*Math.LOG10E+1|0)-2);return Math.max(Math.ceil(Math.ceil(a/r)*r/3),1/3)}(a,r),c={lower:0,upper:0,step:n};return(Number.isFinite(a)||a<0)&&(c.lower=Math.floor(a/n)*n,c.lower===a&&0!==a&&(c.lower-=n)),(Number.isFinite(r)||r>0)&&(c.upper=Math.ceil(r/n)*n,c.upper===r&&0!==r&&(c.upper+=n)),c},Vt=a(90),Lt=function(e){for(var t=[],a=1;a<=Math.floor(Math.sqrt(e));a++)e%a==0&&(t.push(a),e/a!==a&&t.push(e/a));return t.sort(function(e,t){return e-t}),t},Bt=function(e,t,a,r){var n,c=function(e,t){if(e<783)return 7;if(e>=783&&e<=1130)return 12;if(e>1130&&e<=1365){if("time-comparison"===t)return 16;if("item-comparison"===t)return 12}else if(e>1365){if("time-comparison"===t)return 31;if("item-comparison"===t)return 16}return 16}(t,a);return(e.length>=63&&"day"===r||e.length>=9&&"week"===r)&&(e=(n=e).filter(function(e,t){return 0===t||Ae()(e).toDate().getMonth()!==Ae()(n[t-1]).toDate().getMonth()})),e.length<=c||"hour"===r&&function(e){var t=Ae()(e[0]).toDate(),a=Ae()(e[e.length-1]).toDate();return t.getDate()===a.getDate()&&t.getMonth()===a.getMonth()&&t.getFullYear()===a.getFullYear()}(e)&&t>783?e:function(e,t){for(var a=[],r=0;r<e.length;r+=t)a.push(e[r]);return a[0]!==e[0]&&a.unshift(e[0]),a}(e,function(e,t){for(var a=[],r=1;a.length<=3;)a=Lt(e.length-r),r+=1;return a.find(function(a){return e.length/a<t})}(e,c))},Tt=function(e,t,a,r){var n=Ae()(e).toDate(),c=0!==t?a[t-1]:a[t];return c=c instanceof Date?c:Ae()(c).toDate(),0===t?r(n):function(e,t){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new RegExp([" |,"],"g"),r=e.split(a),n=t.split(a),c=new Array,o=e.length>t.length?r:n,i=0;i<o.length;i++)r[i]!==n[i]&&c.push(n[i]);return c}(r(c),r(n)).join(" ")},Ft=function(e,t,a){for(var r=[],n=0;n<e;n++){var c=(n+1)/e*t,o=a?Math.round(c):c;r[r.length-1]!==o&&r.push(o)}return r},Rt=function(e,t,a){return[0].concat(Object(c.a)(function(e,t){if(e>=0)return[];var a=Math.ceil(-e/t);return Ft(a,e,e<-1)}(e,a)),Object(c.a)(function(e,t){if(e<=0)return[];var a=Math.ceil(e/t);return Ft(a,e,e>1)}(t,a)))},Dt=function(e,t,a,r,n,c){!function(e,t,a,r){var n=a.yScale.range()[0],c=Bt(t.uniqueDates,a.xScale.range()[1],t.mode,t.interval);"line"===t.chartType&&(c=c.map(function(e){return Ae()(e).toDate()})),e.append("g").attr("class","axis").attr("aria-hidden","true").attr("transform","translate(0, ".concat(n,")")).call(Object(Vt.a)(a.xScale).tickValues(c).tickFormat(function(e,a){return"hour"===t.interval?r.xFormat(e instanceof Date?e:Ae()(e).toDate()):Tt(e,a,c,r.xFormat)})),e.append("g").attr("class","axis axis-month").attr("aria-hidden","true").attr("transform","translate(0, ".concat(n+14,")")).call(Object(Vt.a)(a.xScale).tickValues(c).tickFormat(function(e,t){return Tt(e,t,c,r.x2Format)})),e.append("g").attr("class","pipes").attr("transform","translate(0, ".concat(n,")")).call(Object(Vt.a)(a.xScale).tickValues(c).tickSize(5).tickFormat(""))}(e,t,a,r),function(e,t,a,r,n){var c=Rt(t.yScale.domain()[0],t.yScale.domain()[1],t.step),o=t.xScale.range()[1],i=n?o+r.left+r.right/2-15:-r.left/2-15,l=t.yMin>=0||t.yMax>0?" with-positive-ticks":"";e.append("g").attr("class","grid"+l).attr("transform","translate(-".concat(r.left,", 0)")).call(Object(Vt.b)(t.yScale).tickValues(c).tickSize(-o-r.left-r.right).tickFormat("")),e.append("g").attr("class","axis y-axis").attr("aria-hidden","true").attr("transform","translate("+i+", 12)").attr("text-anchor","start").call(Object(Vt.b)(t.yScale).tickValues(0===t.yMax&&0===t.yMin?[c[0]]:c).tickFormat(function(e){return a.yFormat(0!==e?e:0)}))}(e,a,r,n,c),e.selectAll(".domain").remove(),e.selectAll(".axis .tick line").remove()},Pt=a(293),qt=function(e,t,a,r,c,o){var i,l,s=r.yScale.range()[0],u=r.xScale.range()[1],m=(i=r.xScale,l=r.yScale,Object(Pt.a)().x(function(e){return i(Ae()(e.date).toDate())}).y(function(e){return l(e.value)})),d=function(e,t){return t.map(function(t){return{key:t.key,focus:t.focus,visible:t.visible,label:t.label,values:e.map(function(e){return{date:e.date,focus:t.focus,value:Object(g.get)(e,[t.key,"value"],0),visible:t.visible}})}})}(t,a.visibleKeys),h=e.append("g").attr("class","lines").selectAll(".line-g").data(d.filter(function(e){return e.visible}).reverse()).enter().append("g").attr("class","line-g").attr("role","region").attr("aria-label",function(e){return e.label||e.key}),p=function(e,t,a,r,n){var c=a.slice().reverse();return t.map(function(a,o){var i=Object(g.first)(e.filter(function(e){return e.date===a})),l=n(Ae()(a).toDate()),s=n(o>=1?Ae()(t[o-1]).toDate():Ae()(t[0]).toDate()),u=o<t.length-1?n(Ae()(t[o+1]).toDate()):n(Ae()(t[t.length-1]).toDate()),m=0===o?u-l:l-s,d=0===o?0:l-m/2;return m=0===o||o===t.length-1?m/2:m,{date:a,start:t.length>1?d:0,width:t.length>1?m:r,values:c.map(function(e){var t=e.key,r=i[t];return r?{key:t,value:r.value,date:a}:null}).filter(Boolean)}})}(t,a.uniqueDates,a.visibleKeys,u,r.xScale),f=u<=1365||a.uniqueDates.length>50?2:3;f=u<=783?1.25:f;var v=u<=1365?4:6;a.uniqueDates.length>1&&h.append("path").attr("fill","none").attr("stroke-width",f).attr("stroke-linejoin","round").attr("stroke-linecap","round").attr("stroke",function(e){return a.getColor(e.key)}).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).attr("d",function(e){return m(e.values)});u/a.uniqueDates.length>36&&h.selectAll("circle").data(function(e,t){return e.values.map(function(a){return Object(n.a)({},a,{i:t,visible:e.visible,key:e.key})})}).enter().append("circle").attr("r",v).attr("fill",function(e){return a.getColor(e.key)}).attr("stroke","#fff").attr("stroke-width",f+1).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).attr("cx",function(e){return r.xScale(Ae()(e.date).toDate())}).attr("cy",function(e){return r.yScale(e.value)}).attr("tabindex","0").attr("aria-label",function(e){var t=c.screenReaderFormat(e.date instanceof Date?e.date:Ae()(e.date).toDate());return"".concat(t," ").concat(o.valueFormat(e.value))}).on("focus",function(e,a,r){o.show(t.find(function(t){return t.date===e.date}),r[a].parentNode,_t.a.target)}).on("blur",function(){return o.hide()});var b=e.append("g").attr("class","focusspaces").selectAll(".focus").data(p).enter().append("g").attr("class","focus"),w=b.append("g").attr("class","focus-grid").attr("opacity","0");w.append("line").attr("x1",function(e){return r.xScale(Ae()(e.date).toDate())}).attr("y1",0).attr("x2",function(e){return r.xScale(Ae()(e.date).toDate())}).attr("y2",s),w.selectAll("circle").data(function(e){return e.values}).enter().append("circle").attr("r",v+2).attr("fill",function(e){return a.getColor(e.key)}).attr("stroke","#fff").attr("stroke-width",f+2).attr("cx",function(e){return r.xScale(Ae()(e.date).toDate())}).attr("cy",function(e){return r.yScale(e.value)}),b.append("rect").attr("class","focus-g").attr("x",function(e){return e.start}).attr("y",0).attr("width",function(e){return e.width}).attr("height",s).attr("opacity",0).on("mouseover",function(e,r,n){var c=(0===r||r===p.length-1)&&a.uniqueDates.length>1?0:.5;o.show(t.find(function(t){return t.date===e.date}),_t.a.target,n[r].parentNode,c)}).on("mouseout",function(){return o.hide()})},It=5,At=[[],[.5],[.333,.667],[.2,.5,.8],[.12,.375,.625,.88],[0,.25,.5,.75,1]],Kt=function(e,t){return function(a){var r=e.length>It?It:e.length,n=Object(g.findIndex)(e,function(e){return e.key===a}),c=n<=It-1?At[r][n]:0;return t(c)}},Yt=function(){function e(){Object(i.a)(this,e),this.ref=null,this.chart=null,this.position="",this.title="",this.labelFormat="",this.valueFormat="",this.visibleKeys="",this.getColor=null,this.margin=24}return Object(l.a)(e,[{key:"calculateXPosition",value:function(e,t,a){var r=this.ref.getBoundingClientRect(),n=this.ref.parentNode.querySelector(".d3-base").getBoundingClientRect(),c=Math.max(n.left,t.left);if("below"===this.position)return Math.max(this.margin,Math.min(e.left+.5*e.width-r.width/2-c,n.width-r.width-this.margin));var o=e.left+e.width*a+this.margin-c;return o+r.width+this.margin>n.width?Math.max(this.margin,e.left+e.width*(1-a)-r.width-this.margin-c):o}},{key:"calculateYPosition",value:function(e,t){if("below"===this.position)return t.height;var a=this.ref.getBoundingClientRect(),r=e.top+this.margin-t.top;return r+a.height+this.margin>t.height?Math.max(0,e.top-a.height-this.margin-t.top):r}},{key:"calculatePosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=e.getBoundingClientRect(),r=this.chart.getBoundingClientRect();return"below"===this.position&&(t=0),{x:this.calculateXPosition(a,r,t),y:this.calculateYPosition(a,r)}}},{key:"hide",value:function(){Object(_t.b)(this.chart).selectAll(".barfocus, .focus-grid").attr("opacity","0"),Object(_t.b)(this.ref).style("visibility","hidden")}},{key:"getTooltipRowLabel",value:function(e,t){return e[t.key].labelDate?this.labelFormat(Ae()(e[t.key].labelDate).toDate()):t.label||t.key}},{key:"show",value:function(e,t,a){var r=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.visibleKeys.length){Object(_t.b)(a).select(".focus-grid, .barfocus").attr("opacity","1");var c=this.calculatePosition(t,n),o=this.visibleKeys.map(function(t){return'\n\t\t\t\t\t<li class="key-row">\n\t\t\t\t\t\t<div class="key-container">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclass="key-color"\n\t\t\t\t\t\t\t\tstyle="background-color: '.concat(r.getColor(t.key),'">\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span class="key-key">').concat(r.getTooltipRowLabel(e,t),'</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<span class="key-value">').concat(r.valueFormat(e[t.key].value),"</span>\n\t\t\t\t\t</li>\n\t\t\t\t")}),i=this.title?this.title:this.labelFormat(Ae()(e.date).toDate());Object(_t.b)(this.ref).style("left",c.x+"px").style("top",c.y+"px").style("visibility","visible").html("\n\t\t\t\t<div>\n\t\t\t\t\t<h4>".concat(i,"</h4>\n\t\t\t\t\t<ul>\n\t\t\t\t\t").concat(o.join(""),"\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\t\t\t"))}}}]),e}(),Ut=function(){return"rtl"===document.documentElement.dir},Qt=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).drawChart=a.drawChart.bind(Object(m.a)(a)),a.getParams=a.getParams.bind(Object(m.a)(a)),a.tooltipRef=Object(h.createRef)(),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"getFormatParams",value:function(){var e=this.props,t=e.screenReaderFormat,a=e.xFormat,r=e.x2Format,n=e.yFormat;return{screenReaderFormat:Ct(t,kt.a),xFormat:Ct(a,kt.a),x2Format:Ct(r,kt.a),yFormat:Ct(n)}}},{key:"getScaleParams",value:function(e){var t=this.props,a=t.data,r=t.height,n=t.orderedKeys,c=t.chartType,o=this.getMargin(),i=r-o.top-o.bottom,l=this.getWidth()-o.left-o.right,s=Ht(a),u=s.upper,m=s.lower,d=s.step,h=function(e,t,a){return Object(zt.b)().domain([Math.min(t,0),0===a&&0===t?1:Math.max(a,0)]).rangeRound([e,0])}(i,m,u);if("line"===c)return{step:d,xScale:St(e,l),yMax:u,yMin:m,yScale:h};var p=this.shouldBeCompact(),f=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(zt.a)().domain(e).range([0,t]).paddingInner(a?0:.1)}(e,l,p);return{step:d,xGroupScale:Mt(n,f,p),xScale:f,yMax:u,yMin:m,yScale:h}}},{key:"getParams",value:function(e){var t=this.props,a=t.chartType,r=t.colorScheme,n=t.data,c=t.interval,o=t.mode,i=t.orderedKeys||function(e){return Nt(e).map(function(t){return{key:t,focus:!0,total:e.reduce(function(e,a){return e+a[t].value},0),visible:!0}}).sort(function(e,t){return t.total-e.total})}(n),l=i.filter(function(e){return e.visible}),s=i.length>It?l:i;return{getColor:Kt(s,r),interval:c,mode:o,chartType:a,uniqueDates:e,visibleKeys:l}}},{key:"createTooltip",value:function(e,t,a){var r=this.props,n=r.tooltipLabelFormat,c=r.tooltipPosition,o=r.tooltipTitle,i=r.tooltipValueFormat,l=new Yt;l.ref=this.tooltipRef.current,l.chart=e,l.position=c,l.title=o,l.labelFormat=Ct(n,kt.a),l.valueFormat=Ct(i),l.visibleKeys=a,l.getColor=t,this.tooltip=l}},{key:"drawChart",value:function(e){var t=this.props,a=t.data,r=t.dateParser,n=t.chartType,o=this.getMargin(),i=function(e,t){var a=Object(kt.c)(t),r=new Set(e.map(function(e){return e.date}));return Object(c.a)(r).sort(function(e,t){return a(e)-a(t)})}(a,r),l=this.getFormatParams(),s=this.getParams(i),u=this.getScaleParams(i),m=e.attr("id","chart").append("g").attr("transform","translate(".concat(o.left,", ").concat(o.top,")"));this.createTooltip(m.node(),s.getColor,s.visibleKeys),Dt(m,s,u,l,o,Ut()),"line"===n&&qt(m,a,s,u,l,this.tooltip),"bar"===n&&function(e,t,a,r,n,c){var o=r.yScale.range()[0],i=e.append("g").attr("class","bars").selectAll("g").data(t).enter().append("g").attr("transform",function(e){return"translate(".concat(r.xScale(e.date),", 0)")}).attr("class","bargroup").attr("role","region").attr("aria-label",function(e){return"item-comparison"===a.mode?n.screenReaderFormat(e.date instanceof Date?e.date:Ae()(e.date).toDate()):null});i.append("rect").attr("class","barfocus").attr("x",0).attr("y",0).attr("width",r.xGroupScale.range()[1]).attr("height",o).attr("opacity","0").on("mouseover",function(e,a,r){c.show(t.find(function(t){return t.date===e.date}),_t.a.target,r[a].parentNode)}).on("mouseout",function(){return c.hide()});var l=r.yScale(0);i.selectAll(".bar").data(function(e){return a.visibleKeys.map(function(t){return{key:t.key,focus:t.focus,value:Object(g.get)(e,[t.key,"value"],0),label:t.label,visible:t.visible,date:e.date}})}).enter().append("rect").attr("class","bar").attr("x",function(e){return r.xGroupScale(e.key)}).attr("y",function(e){return Math.min(l,r.yScale(e.value))}).attr("width",r.xGroupScale.bandwidth()).attr("height",function(e){return Math.abs(l-r.yScale(e.value))}).attr("fill",function(e){return a.getColor(e.key)}).attr("pointer-events","none").attr("tabindex","0").attr("aria-label",function(e){var r=e.label||e.key;if("time-comparison"===a.mode){var o=t.find(function(t){return t.date===e.date});r=n.screenReaderFormat(Ae()(o[e.key].labelDate).toDate())}return"".concat(r," ").concat(c.valueFormat(e.value))}).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).on("focus",function(e,a,r){var n=e.value>0?_t.a.target:_t.a.target.parentNode;c.show(t.find(function(t){return t.date===e.date}),n,r[a].parentNode)}).on("blur",function(){return c.hide()})}(m,a,s,u,l,this.tooltip)}},{key:"shouldBeCompact",value:function(){var e=this.props,t=e.data,a=e.chartType,r=e.width,n=this.getMargin();if("bar"!==a)return!1;var c=r-n.left-n.right,o=t&&t.length?Object.keys(t[0]).length-1:0;return c<t.length*(o+1)}},{key:"getMargin",value:function(){var e=this.props.margin;return Ut()?{bottom:e.bottom,left:e.right,right:e.left,top:e.top}:e}},{key:"getWidth",value:function(){var e=this.props,t=e.data,a=e.chartType,r=e.width,n=this.getMargin();if("bar"!==a)return r;var c=t&&t.length?Object.keys(t[0]).length-1:0,o=this.shouldBeCompact()?t.length*c:t.length*(c+1);return Math.max(r,o+n.left+n.right)}},{key:"getEmptyMessage",value:function(){var e=this.props,t=e.baseValue,a=e.data,r=e.emptyMessage;if(r&&function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=0;a<e.length;a++)for(var r=0,n=Object.entries(e[a]);r<n.length;r++){var c=Object(Be.a)(n[r],2),o=c[0],i=c[1];if("date"!==o&&!Object(g.isNil)(i.value)&&i.value!==t)return!1}return!0}(a,t))return Object(h.createElement)("div",{className:"d3-chart__empty-message"},r)}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.data,r=e.height,n=e.orderedKeys,c=e.chartType,o=this.getWidth();return Object(h.createElement)("div",{className:k()("d3-chart__container",t),style:{height:r}},this.getEmptyMessage(),Object(h.createElement)("div",{className:"d3-chart__tooltip",ref:this.tooltipRef}),Object(h.createElement)(xt,{className:k()(t),data:a,drawChart:this.drawChart,height:r,orderedKeys:n,tooltip:this.tooltip,chartType:c,width:o}))}}]),t}(h.Component);Qt.propTypes={baseValue:b.a.number,className:b.a.string,colorScheme:b.a.func,data:b.a.array.isRequired,dateParser:b.a.string.isRequired,emptyMessage:b.a.string,height:b.a.number,interval:b.a.oneOf(["hour","day","week","month","quarter","year"]),margin:b.a.shape({bottom:b.a.number,left:b.a.number,right:b.a.number,top:b.a.number}),mode:b.a.oneOf(["item-comparison","time-comparison"]),screenReaderFormat:b.a.oneOfType([b.a.string,b.a.func]),orderedKeys:b.a.array,tooltipLabelFormat:b.a.oneOfType([b.a.string,b.a.func]),tooltipValueFormat:b.a.oneOfType([b.a.string,b.a.func]),tooltipPosition:b.a.oneOf(["below","over"]),tooltipTitle:b.a.string,chartType:b.a.oneOf(["bar","line"]),width:b.a.number,xFormat:b.a.oneOfType([b.a.string,b.a.func]),x2Format:b.a.oneOfType([b.a.string,b.a.func]),yFormat:b.a.oneOfType([b.a.string,b.a.func])},Qt.defaultProps={baseValue:0,data:[],dateParser:"%Y-%m-%dT%H:%M:%S",height:200,margin:{bottom:30,left:40,right:0,top:20},mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",tooltipPosition:"over",tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",chartType:"line",width:600,xFormat:"%Y-%m-%d",x2Format:"",yFormat:".3s"};var Wt=Qt,Gt=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(s.a)(this,Object(u.a)(t).call(this))).listRef=Object(h.createRef)(),e.state={isScrollable:!1},e}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.updateListScroll(),window.addEventListener("resize",this.updateListScroll)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateListScroll)}},{key:"updateListScroll",value:function(){if(this&&this.listRef){var e=this.listRef.current,t=e.scrollHeight-e.scrollTop<=e.offsetHeight;this.setState({isScrollable:!t})}}},{key:"render",value:function(){var e=this.props,t=e.colorScheme,a=e.data,r=e.handleLegendHover,n=e.handleLegendToggle,c=e.interactive,o=e.legendDirection,i=e.legendValueFormat,l=e.instanceId,s=e.totalLabel,u=this.state.isScrollable,m=a.filter(function(e){return e.visible}),d=m.length,f="column"===o&&a.length>It&&s,g=a.length>It?m:a;return Object(h.createElement)("div",{className:k()("woocommerce-legend","woocommerce-legend__direction-".concat(o),{"has-total":f,"is-scrollable":u},this.props.className)},Object(h.createElement)("ul",{className:"woocommerce-legend__list",ref:this.listRef,onScroll:f?this.updateListScroll:null},a.map(function(e){return Object(h.createElement)("li",{className:k()("woocommerce-legend__item",{"woocommerce-legend__item-checked":e.visible}),key:e.key,id:"woocommerce-legend-".concat(l,"__item__").concat(e.key),onMouseEnter:r,onMouseLeave:r,onBlur:r,onFocus:r},Object(h.createElement)("button",{onClick:n,id:"woocommerce-legend-".concat(l,"__item-button__").concat(e.key),disabled:e.visible&&d<=1||!e.visible&&d>=It||!c,title:d>=It?Object(p.sprintf)(Object(p.__)("You may select up to %d items.","woocommerce-admin"),It):""},Object(h.createElement)("div",{className:"woocommerce-legend__item-container"},Object(h.createElement)("span",{className:k()("woocommerce-legend__item-checkmark",{"woocommerce-legend__item-checkmark-checked":e.visible}),style:e.visible?{color:Kt(g,t)(e.key)}:null}),Object(h.createElement)("span",{className:"woocommerce-legend__item-title"},e.label),Object(h.createElement)("span",{className:"woocommerce-legend__item-total"},Ct(i)(e.total)))))})),f&&Object(h.createElement)("div",{className:"woocommerce-legend__total"},s))}}]),t}(h.Component);Gt.propTypes={className:b.a.string,colorScheme:b.a.func,data:b.a.array.isRequired,handleLegendToggle:b.a.func,handleLegendHover:b.a.func,interactive:b.a.bool,legendDirection:b.a.oneOf(["row","column"]),legendValueFormat:b.a.oneOfType([b.a.string,b.a.func]),totalLabel:b.a.string,instanceId:b.a.number},Gt.defaultProps={interactive:!0,legendDirection:"row",legendValueFormat:","};var $t=Object(te.withInstanceId)(Gt);var Jt=Object(g.get)(wcSettings,["currency","symbol"],""),Xt=Object(g.get)(wcSettings,["currency","position"],"left");Object(bt.b)({decimal:Object(g.get)(wcSettings,["currency","decimal_separator"],"."),thousands:Object(g.get)(wcSettings,["currency","thousand_separator"],","),grouping:[3],currency:function(e,t){switch(t){case"left_space":return[e+" ",""];case"right":return["",e];case"right_space":return[""," "+e];case"left":default:return[e,""]}}(Jt,Xt)});var Zt=function(e){function t(e){var a;Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).chartBodyRef=Object(h.createRef)();var r=a.getDataKeys();return a.state={focusedKeys:[],visibleKeys:r.slice(0,It),width:0},a.prevDataKeys=r.sort(),a.handleTypeToggle=a.handleTypeToggle.bind(Object(m.a)(a)),a.handleLegendToggle=a.handleLegendToggle.bind(Object(m.a)(a)),a.handleLegendHover=a.handleLegendHover.bind(Object(m.a)(a)),a.updateDimensions=a.updateDimensions.bind(Object(m.a)(a)),a.getVisibleData=Object(Ot.a)(a.getVisibleData),a.getOrderedKeys=Object(Ot.a)(a.getOrderedKeys),a.setInterval=a.setInterval.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"getDataKeys",value:function(){var e=this.props,t=e.data,a=e.filterParam,r=e.mode,n=e.query;if("item-comparison"===r){var c=a?B(n[a]):[];return this.getOrderedKeys(t,r,[],[],c).map(function(e){return e.key})}return Nt(t)}},{key:"componentDidUpdate",value:function(){var e=this.props.data;if(e&&e.length){var t=Nt(e).sort();if(!Object(g.isEqual)(t,this.prevDataKeys)){var a=this.getDataKeys();this.prevDataKeys=t,this.setState({visibleKeys:a.slice(0,It)})}}}},{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"getOrderedKeys",value:function(e,t,a,r){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];if(!e||0===e.length)return[];var c=e.reduce(function(e,t){return Object.entries(t).forEach(function(t){var a=Object(Be.a)(t,2),r=a[0],n=a[1];"date"===r||e[r]||(e[r]=n.label)}),e},{}),o=Object.entries(c).map(function(t){var n=Object(Be.a)(t,2),c=n[0],o=n[1];return{focus:0===a.length||a.includes(c),key:c,label:o,total:e.reduce(function(e,t){return e+t[c].value},0),visible:r.includes(c)}});return"item-comparison"===t?o.sort(function(e,t){return t.total-e.total}).filter(function(e){return e.total>0||n.includes(parseInt(e.key,10))}):o}},{key:"handleTypeToggle",value:function(e){if(this.props.chartType!==e){var t=this.props;R({chartType:e},t.path,t.query)}}},{key:"handleLegendToggle",value:function(e){if(this.props.interactiveLegend){var t=e.currentTarget.id.split("_").pop(),a=this.state,r=a.focusedKeys,n=a.visibleKeys;n.includes(t)?this.setState({focusedKeys:Object(g.without)(r,t),visibleKeys:Object(g.without)(n,t)}):this.setState({focusedKeys:r.concat([t]),visibleKeys:n.concat([t])})}}},{key:"handleLegendHover",value:function(e){if("mouseleave"===e.type||"blur"===e.type)this.setState({focusedKeys:[]});else if("mouseenter"===e.type||"focus"===e.type){var t=e.currentTarget.id.split("__").pop();this.setState({focusedKeys:[t]})}}},{key:"updateDimensions",value:function(){this.setState({width:this.chartBodyRef.current.offsetWidth})}},{key:"getVisibleData",value:function(e,t){var a=t.filter(function(e){return e.visible});return e.map(function(e){var t={date:e.date};return a.forEach(function(a){t[a.key]=e[a.key]}),t})}},{key:"setInterval",value:function(e){var t=this.props;R({interval:e},t.path,t.query)}},{key:"renderIntervalSelector",value:function(){var e=this.props,t=e.interval,a=e.allowedIntervals;if(!a||a.length<1)return null;var r={hour:Object(p.__)("By hour","woocommerce-admin"),day:Object(p.__)("By day","woocommerce-admin"),week:Object(p.__)("By week","woocommerce-admin"),month:Object(p.__)("By month","woocommerce-admin"),quarter:Object(p.__)("By quarter","woocommerce-admin"),year:Object(p.__)("By year","woocommerce-admin")};return Object(h.createElement)(f.SelectControl,{className:"woocommerce-chart__interval-select",value:t,options:a.map(function(e){return{value:e,label:r[e]}}),onChange:this.setInterval})}},{key:"getChartHeight",value:function(){var e=this.props,t=e.isViewportLarge;return e.isViewportMobile?180:t?300:220}},{key:"getLegendPosition",value:function(){var e=this.props,t=e.legendPosition,a=e.mode,r=e.isViewportWide;return t||(r&&"time-comparison"===a?"top":r&&"item-comparison"===a?"side":"bottom")}},{key:"render",value:function(){var e=this.state,t=e.focusedKeys,a=e.visibleKeys,r=e.width,n=this.props,c=n.baseValue,o=n.chartType,i=n.data,l=n.dateParser,s=n.emptyMessage,u=n.filterParam,m=n.interactiveLegend,d=n.interval,v=n.isRequesting,b=n.isViewportLarge,w=n.itemsLabel,y=n.mode,j=n.query,E=n.screenReaderFormat,_=n.showHeaderControls,x=n.title,C=n.tooltipLabelFormat,N=n.tooltipValueFormat,z=n.tooltipTitle,M=n.valueType,S=n.xFormat,H=n.x2Format,V=n.yFormat,L=u?B(j[u]):[],T=this.getOrderedKeys(i,y,t,a,L),F=v?null:this.getVisibleData(i,T),R=this.getLegendPosition(),D="top"===R?"row":"column",P="side"===R?"row":"column",q=this.getChartHeight(),I=v?null:Object(h.createElement)($t,{colorScheme:wt.a,data:T,handleLegendHover:this.handleLegendHover,handleLegendToggle:this.handleLegendToggle,interactive:m,legendDirection:D,legendValueFormat:N,totalLabel:Object(p.sprintf)(w,T.length)}),Y=V;if(!V)switch(M){case"average":Y=",.0f";break;case"currency":Y="$.3~s";break;case"number":Y=",.0f"}return Object(h.createElement)("div",{className:"woocommerce-chart"},_&&Object(h.createElement)("div",{className:"woocommerce-chart__header"},Object(h.createElement)(A,{className:"woocommerce-chart__title"},x),"top"===R&&I,this.renderIntervalSelector(),Object(h.createElement)(f.NavigableMenu,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},Object(h.createElement)(f.IconButton,{className:k()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"line"===o}),icon:Object(h.createElement)(O.a,{icon:"line-graph"}),title:Object(p.__)("Line chart","woocommerce-admin"),"aria-checked":"line"===o,role:"menuitemradio",tabIndex:"line"===o?0:-1,onClick:Object(g.partial)(this.handleTypeToggle,"line")}),Object(h.createElement)(f.IconButton,{className:k()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===o}),icon:Object(h.createElement)(O.a,{icon:"stats-alt"}),title:Object(p.__)("Bar chart","woocommerce-admin"),"aria-checked":"bar"===o,role:"menuitemradio",tabIndex:"bar"===o?0:-1,onClick:Object(g.partial)(this.handleTypeToggle,"bar")}))),Object(h.createElement)(K,{component:!1},Object(h.createElement)("div",{className:k()("woocommerce-chart__body","woocommerce-chart__body-".concat(P)),ref:this.chartBodyRef},"side"===R&&I,v&&Object(h.createElement)(h.Fragment,null,Object(h.createElement)("span",{className:"screen-reader-text"},Object(p.__)("Your requested data is loading","woocommerce-admin")),Object(h.createElement)(Et,{height:q})),!v&&r>0&&Object(h.createElement)(Wt,{baseValue:c,chartType:o,colorScheme:wt.a,data:F,dateParser:l,height:q,emptyMessage:s,interval:d,margin:{bottom:50,left:80,right:30,top:0},mode:y,orderedKeys:T,screenReaderFormat:E,tooltipLabelFormat:C,tooltipValueFormat:N,tooltipPosition:b?"over":"below",tooltipTitle:z,valueType:M,width:"row"===P?r-320:r,xFormat:S,x2Format:H,yFormat:Y})),"bottom"===R&&Object(h.createElement)("div",{className:"woocommerce-chart__footer"},I)))}}]),t}(h.Component);Zt.propTypes={allowedIntervals:b.a.array,baseValue:b.a.number,chartType:b.a.oneOf(["bar","line"]),data:b.a.array.isRequired,dateParser:b.a.string.isRequired,emptyMessage:b.a.string,filterParam:b.a.string,itemsLabel:b.a.string,mode:b.a.oneOf(["item-comparison","time-comparison"]),path:b.a.string,query:b.a.object,interactiveLegend:b.a.bool,interval:b.a.oneOf(["hour","day","week","month","quarter","year"]),intervalData:b.a.object,isRequesting:b.a.bool,legendPosition:b.a.oneOf(["bottom","side","top"]),screenReaderFormat:b.a.oneOfType([b.a.string,b.a.func]),showHeaderControls:b.a.bool,title:b.a.string,tooltipLabelFormat:b.a.oneOfType([b.a.string,b.a.func]),tooltipValueFormat:b.a.oneOfType([b.a.string,b.a.func]),tooltipTitle:b.a.string,valueType:b.a.string,xFormat:b.a.string,x2Format:b.a.string,yFormat:b.a.string},Zt.defaultProps={baseValue:0,chartType:"line",data:[],dateParser:"%Y-%m-%dT%H:%M:%S",interactiveLegend:!0,interval:"day",isRequesting:!1,mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",showHeaderControls:!0,tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",xFormat:"%d",x2Format:"%b %Y"};Object(yt.withViewportMatch)({isViewportMobile:"< medium",isViewportLarge:">= large",isViewportWide:">= wide"})(Zt);var ea=function(e){var t=e.count,a=e.label;return a||(a=Object(p.sprintf)(Object(p.__)("Total %d","woocommerce-admin"),t)),Object(h.createElement)("span",{className:"woocommerce-count","aria-label":a},t)};ea.propTypes={count:b.a.number.isRequired,label:b.a.string},ea.defaultProps={label:""};var ta=function(e){var t=e.className,a=e.count,r=e.children,n=e.helpText,c=e.onClick;return a<2?Object(h.createElement)(f.Tooltip,{text:n},Object(h.createElement)("span",{className:t},Object(h.createElement)(f.Button,{className:"woocommerce-compare-button",isDefault:!0,disabled:!0},r))):Object(h.createElement)(f.Button,{className:k()("woocommerce-compare-button",t),isDefault:!0,onClick:c},r)};ta.propTypes={className:b.a.string,count:b.a.number.isRequired,children:b.a.node.isRequired,helpText:b.a.string.isRequired,onClick:b.a.func.isRequired};var aa=ta,ra=function(e){function t(e){var a,r=e.getLabels,n=e.param,c=e.query;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).apply(this,arguments))).state={selected:[]},a.clearQuery=a.clearQuery.bind(Object(m.a)(a)),a.updateQuery=a.updateQuery.bind(Object(m.a)(a)),a.updateLabels=a.updateLabels.bind(Object(m.a)(a)),c[n]&&r(c[n],c).then(a.updateLabels),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidUpdate",value:function(e,t){var a=e.param,r=e.query,n=t.selected,c=this.props,o=c.getLabels,i=c.param,l=c.query,s=this.state.selected;if(a!==i||n.length>0&&0===s.length)this.clearQuery();else{var u=B(r[i]),m=B(l[i]);Object(g.isEqual)(u.sort(),m.sort())||o(l[i],l).then(this.updateLabels)}}},{key:"clearQuery",value:function(){var e=this.props,t=e.param,a=e.path,r=e.query;this.setState({selected:[]}),R(Object(o.a)({},t,void 0),a,r)}},{key:"updateLabels",value:function(e){this.setState({selected:e})}},{key:"updateQuery",value:function(){var e=this.props,t=e.param,a=e.path,r=e.query,n=this.state.selected.map(function(e){return e.id});R(Object(o.a)({},t,n.join(",")),a,r)}},{key:"render",value:function(){var e=this,t=this.props,a=t.labels,r=t.type,n=this.state.selected;return Object(h.createElement)(Q,{title:a.title,className:"woocommerce-filters__compare"},Object(h.createElement)("div",{className:"woocommerce-filters__compare-body"},Object(h.createElement)(He,{type:r,selected:n,placeholder:a.placeholder,onChange:function(t){e.setState({selected:t})}})),Object(h.createElement)("div",{className:"woocommerce-filters__compare-footer"},Object(h.createElement)(aa,{count:n.length,helpText:a.helpText,onClick:this.updateQuery},a.update),n.length>0&&Object(h.createElement)(f.Button,{isLink:!0,onClick:this.clearQuery},Object(p.__)("Clear all","woocommerce-admin"))))}}]),t}(h.Component);ra.propTypes={getLabels:b.a.func.isRequired,labels:b.a.shape({placeholder:b.a.string,title:b.a.string,update:b.a.string}),param:b.a.string.isRequired,path:b.a.string.isRequired,query:b.a.object,type:b.a.string.isRequired},ra.defaultProps={labels:{},query:{}};var na=ra,ca=a(68),oa=function(e){var t=e.date,a=e.machineFormat,r=e.screenReaderFormat,n=e.visibleFormat;return Object(h.createElement)("time",{dateTime:Object(ca.format)(a,t)},Object(h.createElement)("span",{"aria-hidden":"true"},Object(ca.format)(n,t)),Object(h.createElement)("span",{className:"screen-reader-text"},Object(ca.format)(r,t)))};oa.propTypes={date:b.a.oneOfType([b.a.string,b.a.object]).isRequired,machineFormat:b.a.string,screenReaderFormat:b.a.string,visibleFormat:b.a.string},oa.defaultProps={machineFormat:"Y-m-d H:i:s",screenReaderFormat:"F j, Y",visibleFormat:"Y-m-d"};var ia=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.options,r=e.selected,n=e.onSelect,c=e.name,i=e.legend;return Object(h.createElement)("fieldset",{className:"woocommerce-segmented-selection"},Object(h.createElement)("legend",{className:"screen-reader-text"},i),Object(h.createElement)("div",{className:k()(t,"woocommerce-segmented-selection__container")},a.map(function(e){var t=e.value,a=e.label;if(!t||!a)return null;var i=Object(g.uniqueId)("".concat(t,"_"));return Object(h.createElement)("div",{className:"woocommerce-segmented-selection__item",key:t},Object(h.createElement)("input",{className:"woocommerce-segmented-selection__input",type:"radio",name:c,id:i,checked:r===t,onChange:Object(g.partial)(n,Object(o.a)({},c,t))}),Object(h.createElement)("label",{htmlFor:i},Object(h.createElement)("span",{className:"woocommerce-segmented-selection__label"},a)))})))}}]),t}(h.Component);ia.propTypes={className:b.a.string,options:b.a.arrayOf(b.a.shape({value:b.a.string.isRequired,label:b.a.string.isRequired})).isRequired,selected:b.a.string,onSelect:b.a.func.isRequired,name:b.a.string.isRequired,legend:b.a.string.isRequired};var la=ia,sa=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onSelect,a=e.compare;return Object(h.createElement)(la,{options:We,selected:a,onSelect:t,name:"compare",legend:Object(p.__)("compare to","woocommerce-admin")})}}]),t}(h.Component);sa.propTypes={onSelect:b.a.func.isRequired,compare:b.a.string};var ua=sa,ma=a(290),da={calendarLabel:Object(p.__)("Calendar","woocommerce-admin"),closeDatePicker:Object(p.__)("Close","woocommerce-admin"),focusStartDate:Object(p.__)("Interact with the calendar and select start and end dates.","woocommerce-admin"),clearDate:Object(p.__)("Clear Date","woocommerce-admin"),clearDates:Object(p.__)("Clear Dates","woocommerce-admin"),jumpToPrevMonth:Object(p.__)("Move backward to switch to the previous month.","woocommerce-admin"),jumpToNextMonth:Object(p.__)("Move forward to switch to the next month.","woocommerce-admin"),enterKey:Object(p.__)("Enter key","woocommerce-admin"),leftArrowRightArrow:Object(p.__)("Right and left arrow keys","woocommerce-admin"),upArrowDownArrow:Object(p.__)("up and down arrow keys","woocommerce-admin"),pageUpPageDown:Object(p.__)("page up and page down keys","woocommerce-admin"),homeEnd:Object(p.__)("Home and end keys","woocommerce-admin"),escape:Object(p.__)("Escape key","woocommerce-admin"),questionMark:Object(p.__)("Question mark","woocommerce-admin"),selectFocusedDate:Object(p.__)("Select the date in focus.","woocommerce-admin"),moveFocusByOneDay:Object(p.__)("Move backward (left) and forward (right) by one day.","woocommerce-admin"),moveFocusByOneWeek:Object(p.__)("Move backward (up) and forward (down) by one week.","woocommerce-admin"),moveFocusByOneMonth:Object(p.__)("Switch months.","woocommerce-admin"),moveFocustoStartAndEndOfWeek:Object(p.__)("Go to the first or last day of a week.","woocommerce-admin"),returnFocusToInput:Object(p.__)("Return to the date input field.","woocommerce-admin"),keyboardNavigationInstructions:Object(p.__)("Press the down arrow key to interact with the calendar and\n select a date.","woocommerce-admin"),chooseAvailableStartDate:function(e){var t=e.date;return Object(p.sprintf)(Object(p.__)("Select %s as a start date.","woocommerce-admin"),t)},chooseAvailableEndDate:function(e){var t=e.date;return Object(p.sprintf)(Object(p.__)("Select %s as an end date.","woocommerce-admin"),t)},chooseAvailableDate:function(e){return e.date},dateIsUnavailable:function(e){var t=e.date;return Object(p.sprintf)(Object(p.__)("%s is not selectable.","woocommerce-admin"),t)},dateIsSelected:function(e){var t=e.date;return Object(p.sprintf)(Object(p.__)("Selected. %s","woocommerce-admin"),t)}},ha=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).onDatesChange=a.onDatesChange.bind(Object(m.a)(a)),a.onFocusChange=a.onFocusChange.bind(Object(m.a)(a)),a.onInputChange=a.onInputChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"onDatesChange",value:function(e){var t=e.startDate,a=e.endDate,r=this.props,n=r.onUpdate,c=r.shortDateFormat;n({after:t,before:a,afterText:t?t.format(c):"",beforeText:a?a.format(c):"",afterError:null,beforeError:null})}},{key:"onFocusChange",value:function(e){this.props.onUpdate({focusedInput:e||"startDate"})}},{key:"onInputChange",value:function(e,t){var a,r=t.target.value,n=this.props,c=n.after,i=function(e,t,a,r,n){var c=Ge(n,t);return c?Ae()().isBefore(c,"day")?{date:null,error:nt.future}:"after"===e&&a&&c.isAfter(a,"day")?{date:null,error:nt.startAfterEnd}:"before"===e&&r&&c.isBefore(r,"day")?{date:null,error:nt.endBeforeStart}:{date:c}:{date:null,error:nt.invalid}}(e,r,n.before,c,n.shortDateFormat),l=i.date,s=i.error;this.props.onUpdate((a={},Object(o.a)(a,e,l),Object(o.a)(a,e+"Text",r),Object(o.a)(a,e+"Error",r.length>0?s:null),a))}},{key:"setTnitialVisibleMonth",value:function(e,t){return function(){var a=t||Ae()();return e?a.clone().subtract(1,"month"):a}}},{key:"render",value:function(){var e=this,t=this.props,a=t.after,r=t.before,n=t.focusedInput,c=t.afterText,o=t.beforeText,i=t.afterError,l=t.beforeError,s=t.shortDateFormat,u=t.isViewportMobile,m=t.isViewportSmall,d=t.isInvalidDate,f=u&&!m;return Object(h.createElement)("div",{className:k()("woocommerce-calendar",{"is-mobile":u})},Object(h.createElement)("div",{className:"woocommerce-calendar__inputs"},Object(h.createElement)(ot,{value:c,onChange:Object(g.partial)(this.onInputChange,"after"),dateFormat:s,label:Object(p.__)("Start Date","woocommerce-admin"),error:i,describedBy:Object(p.sprintf)(Object(p.__)("Date input describing a selected date range's start date in format %s","woocommerce-admin"),s),onFocus:function(){return e.onFocusChange("startDate")}}),Object(h.createElement)("div",{className:"woocommerce-calendar__inputs-to"},Object(p.__)("to","woocommerce-admin")),Object(h.createElement)(ot,{value:o,onChange:Object(g.partial)(this.onInputChange,"before"),dateFormat:s,label:Object(p.__)("End Date","woocommerce-admin"),error:l,describedBy:Object(p.sprintf)(Object(p.__)("Date input describing a selected date range's end date in format %s","woocommerce-admin"),s),onFocus:function(){return e.onFocusChange("endDate")}})),Object(h.createElement)("div",{className:"woocommerce-calendar__react-dates"},Object(h.createElement)(ma.DayPickerRangeController,{onDatesChange:this.onDatesChange,onFocusChange:this.onFocusChange,focusedInput:n,startDate:a,endDate:r,orientation:"horizontal",numberOfMonths:f?2:1,isOutsideRange:function(e){return d&&d(e.toDate())},minimumNights:0,hideKeyboardShortcutsPanel:!0,noBorder:!0,isRTL:"rtl"===document.documentElement.dir,initialVisibleMonth:this.setTnitialVisibleMonth(f,r),phrases:da})))}}]),t}(h.Component);ha.propTypes={after:b.a.object,afterError:b.a.string,afterText:b.a.string,before:b.a.object,beforeError:b.a.string,beforeText:b.a.string,focusedInput:b.a.string,isInvalidDate:b.a.func,onUpdate:b.a.func.isRequired,shortDateFormat:b.a.string.isRequired};var pa=Object(yt.withViewportMatch)({isViewportMobile:"< medium",isViewportSmall:"< small"})(ha),fa=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onSelect,a=e.period;return Object(h.createElement)(la,{options:Object(g.filter)(Qe,function(e){return"custom"!==e.value}),selected:a,onSelect:t,name:"period",legend:Object(p.__)("select a preset period","woocommerce-admin")})}}]),t}(h.Component);fa.propTypes={onSelect:b.a.func.isRequired,period:b.a.string};var ga=fa,va=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(s.a)(this,Object(u.a)(t).call(this))).onTabSelect=e.onTabSelect.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(l.a)(t,[{key:"onTabSelect",value:function(e){var t=this.props,a=t.onUpdate,r=t.period;"period"===e&&"custom"===r&&a({period:"today"})}},{key:"isFutureDate",value:function(e){return Ae()().isBefore(Ae()(e),"day")}},{key:"render",value:function(){var e=this,t=this.props,a=t.period,r=t.compare,n=t.after,c=t.before,o=t.onUpdate,i=t.onClose,l=t.onSelect,s=t.isValidSelection,u=t.resetCustomValues,m=t.focusedInput,d=t.afterText,g=t.beforeText,v=t.afterError,b=t.beforeError,w=t.shortDateFormat;return Object(h.createElement)("div",null,Object(h.createElement)(A,{className:"screen-reader-text",tabIndex:"0"},Object(p.__)("Select date range and comparison","woocommerce-admin")),Object(h.createElement)(K,{component:!1},Object(h.createElement)(A,{className:"woocommerce-filters-date__text"},Object(p.__)("select a date range","woocommerce-admin")),Object(h.createElement)(f.TabPanel,{tabs:[{name:"period",title:Object(p.__)("Presets","woocommerce-admin"),className:"woocommerce-filters-date__tab"},{name:"custom",title:Object(p.__)("Custom","woocommerce-admin"),className:"woocommerce-filters-date__tab"}],className:"woocommerce-filters-date__tabs",activeClass:"is-active",initialTabName:"custom"===a?"custom":"period",onSelect:this.onTabSelect},function(t){return Object(h.createElement)(h.Fragment,null,"period"===t.name&&Object(h.createElement)(ga,{onSelect:o,period:a}),"custom"===t.name&&Object(h.createElement)(pa,{after:n,before:c,onUpdate:o,isInvalidDate:e.isFutureDate,focusedInput:m,afterText:d,beforeText:g,afterError:v,beforeError:b,shortDateFormat:w}),Object(h.createElement)("div",{className:k()("woocommerce-filters-date__content-controls",{"is-custom":"custom"===t.name})},Object(h.createElement)(A,{className:"woocommerce-filters-date__text"},Object(p.__)("compare to","woocommerce-admin")),Object(h.createElement)(ua,{onSelect:o,compare:r}),Object(h.createElement)("div",{className:"woocommerce-filters-date__button-group"},"custom"===t.name&&Object(h.createElement)(f.Button,{className:"woocommerce-filters-date__button",isDefault:!0,onClick:u,disabled:!(n||c)},Object(p.__)("Reset","woocommerce-admin")),s(t.name)?Object(h.createElement)(f.Button,{className:"woocommerce-filters-date__button",onClick:l(t.name,i),isPrimary:!0},Object(p.__)("Update","woocommerce-admin")):Object(h.createElement)(f.Button,{className:"woocommerce-filters-date__button",isPrimary:!0,disabled:!0},Object(p.__)("Update","woocommerce-admin")))))})))}}]),t}(h.Component);va.propTypes={period:b.a.string.isRequired,compare:b.a.string.isRequired,onUpdate:b.a.func.isRequired,onClose:b.a.func.isRequired,onSelect:b.a.func.isRequired,resetCustomValues:b.a.func.isRequired,focusedInput:b.a.string,afterText:b.a.string,beforeText:b.a.string,afterError:b.a.string,beforeError:b.a.string,shortDateFormat:b.a.string.isRequired};var ba=va,wa=function(e){var t=e.labels,a=e.isOpen,r=Object(q.a)(e,["labels","isOpen"]),n=k()("woocommerce-dropdown-button",{"is-open":a,"is-multi-line":t.length>1});return Object(h.createElement)(f.Button,Object(W.a)({className:n,"aria-expanded":a},r),Object(h.createElement)("div",{className:"woocommerce-dropdown-button__labels"},t.map(function(e,t){return Object(h.createElement)("span",{key:t},e)})))};wa.propTypes={labels:b.a.array.isRequired,isOpen:b.a.bool};var Oa=wa,ya=Object(p.__)("MM/DD/YYYY","woocommerce-admin"),ja=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).state=a.getResetState(),a.dropdownRef=Object(h.createRef)(),a.update=a.update.bind(Object(m.a)(a)),a.onSelect=a.onSelect.bind(Object(m.a)(a)),a.isValidSelection=a.isValidSelection.bind(Object(m.a)(a)),a.resetCustomValues=a.resetCustomValues.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"getResetState",value:function(){var e=Ze(this.props.query),t=e.period,a=e.compare,r=e.before,n=e.after;return{period:t,compare:a,before:r,after:n,focusedInput:"startDate",afterText:n?n.format(ya):"",beforeText:r?r.format(ya):"",afterError:null,beforeError:null}}},{key:"update",value:function(e){this.setState(e)}},{key:"onSelect",value:function(e,t){var a=this,r=this.props,n=r.path,c=r.query;return function(r){var o=a.state,i=o.period,l=o.compare,s=o.after,u=o.before,m={period:"custom"===e?"custom":i,compare:l};"custom"===e?(m.after=s?s.format(Ue):"",m.before=u?u.format(Ue):""):(m.after=void 0,m.before=void 0),R(m,n,c),t(r)}}},{key:"getButtonLabel",value:function(){var e=et(this.props.query),t=e.primary,a=e.secondary;return["".concat(t.label," (").concat(t.range,")"),"".concat(Object(p.__)("vs.","woocommerce-admin")," ").concat(a.label," (").concat(a.range,")")]}},{key:"isValidSelection",value:function(e){var t=this.state,a=t.compare,r=t.after,n=t.before;return"custom"!==e||a&&r&&n}},{key:"resetCustomValues",value:function(){this.setState({after:null,before:null,focusedInput:"startDate",afterText:"",beforeText:"",afterError:null,beforeError:null})}},{key:"render",value:function(){var e=this,t=this.state,a=t.period,r=t.compare,n=t.after,c=t.before,o=t.focusedInput,i=t.afterText,l=t.beforeText,s=t.afterError,u=t.beforeError;return Object(h.createElement)("div",{className:"woocommerce-filters-filter"},Object(h.createElement)("span",{className:"woocommerce-filters-label"},Object(p.__)("Date Range","woocommerce-admin"),":"),Object(h.createElement)(f.Dropdown,{ref:this.dropdownRef,contentClassName:"woocommerce-filters-date__content",position:"bottom",expandOnMobile:!0,renderToggle:function(t){var a=t.isOpen,r=t.onToggle;return Object(h.createElement)(Oa,{onClick:r,isOpen:a,labels:e.getButtonLabel()})},renderContent:function(t){var m=t.onClose;return Object(h.createElement)(ba,{period:a,compare:r,after:n,before:c,onUpdate:e.update,onClose:m,onSelect:e.onSelect,isValidSelection:e.isValidSelection,resetCustomValues:e.resetCustomValues,focusedInput:o,afterText:i,beforeText:l,afterError:s,beforeError:u,shortDateFormat:ya})}}))}}]),t}(h.Component);ja.propTypes={path:b.a.string.isRequired,query:b.a.object},ja.defaultProps={query:{}};var Ea=ja,ka=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props,t=e.src,a=e.alt,r=Object(q.a)(e,["src","alt"]),n=t;return 0===n.indexOf("/")&&(n=n.substring(1),n=wcSettings.wcAdminAssetUrl+n),Object(h.createElement)("img",Object(W.a)({src:n,alt:a||""},r))}}]),t}(h.Component);ka.propTypes={src:b.a.string.isRequired,alt:b.a.string.isRequired};var _a=ka,xa=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"renderIllustration",value:function(){var e=this.props,t=e.illustrationWidth,a=e.illustrationHeight,r=e.illustration;return Object(h.createElement)(_a,{alt:"",src:r,width:t,height:a,className:"woocommerce-empty-content__illustration"})}},{key:"renderActionButtons",value:function(e){var t="secondary"===e?this.props.secondaryActionLabel:this.props.actionLabel,a="secondary"===e?this.props.secondaryActionURL:this.props.actionURL,r="secondary"===e?this.props.secondaryActionCallback:this.props.actionCallback,n="secondary"!==e;return a&&r?Object(h.createElement)(f.Button,{className:"woocommerce-empty-content__action",isPrimary:n,onClick:r,href:a},t):a?Object(h.createElement)(f.Button,{className:"woocommerce-empty-content__action",isPrimary:n,href:a},t):r?Object(h.createElement)(f.Button,{className:"woocommerce-empty-content__action",isPrimary:n,onClick:r},t):null}},{key:"renderActions",value:function(){var e=this.props,t=e.actionLabel,a=e.secondaryActionLabel;return Object(h.createElement)("div",{className:"woocommerce-empty-content__actions"},t&&this.renderActionButtons("primary"),a&&this.renderActionButtons("secondary"))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.title,r=e.message,n=e.illustration;return Object(h.createElement)("div",{className:k()("woocommerce-empty-content",t)},n&&this.renderIllustration(),a?Object(h.createElement)(A,{className:"woocommerce-empty-content__title"},a):null,r?Object(h.createElement)("p",{className:"woocommerce-empty-content__message"},r):null,this.renderActions())}}]),t}(h.Component);xa.propTypes={title:b.a.string.isRequired,message:b.a.string,illustration:b.a.string,illustrationHeight:b.a.number,illustrationWidth:b.a.number,actionLabel:b.a.string.isRequired,actionURL:b.a.string,actionCallback:b.a.func,secondaryActionLabel:b.a.string,secondaryActionURL:b.a.string,secondaryActionCallback:b.a.func,className:b.a.string},xa.defaultProps={illustration:"/empty-content.svg",illustrationWidth:400};var Ca=a(76),Na=function(e){function t(e){var a;Object(i.a)(this,t);var r=(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).getFilter();if(a.state={nav:r.path||[],animate:null,selectedTag:null},a.selectSubFilter=a.selectSubFilter.bind(Object(m.a)(a)),a.getVisibleFilters=a.getVisibleFilters.bind(Object(m.a)(a)),a.updateSelectedTag=a.updateSelectedTag.bind(Object(m.a)(a)),a.onTagChange=a.onTagChange.bind(Object(m.a)(a)),a.onContentMount=a.onContentMount.bind(Object(m.a)(a)),a.goBack=a.goBack.bind(Object(m.a)(a)),r.settings&&r.settings.getLabels){var n=a.props.query,c=r.settings,o=c.param;(0,c.getLabels)(n[o],n).then(a.updateSelectedTag)}return a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidUpdate",value:function(e){var t=e.query,a=this.props,r=a.query,n=a.config;if(t[n.param]!==r[[n.param]]){var c=this.getFilter();if(c&&"Search"===c.component){this.setState({nav:c.path||[]});var o=c.settings,i=o.param;(0,o.getLabels)(r[i],r).then(this.updateSelectedTag)}}}},{key:"updateSelectedTag",value:function(e){this.setState({selectedTag:e[0]})}},{key:"getFilter",value:function(e){var t=this.props,a=t.config,r=t.query,n=function e(t){var a=[];return t.forEach(function(t){if(t.subFilters){a.push(Object(g.omit)(t,"subFilters"));var r=e(t.subFilters);a.push.apply(a,Object(c.a)(r))}else a.push(t)}),a}(a.filters);return e=e||r[a.param]||"all",Object(g.find)(n,{value:e})||{}}},{key:"getButtonLabel",value:function(e){if("Search"===e.component){var t=this.state.selectedTag;return[t&&t.label,Object(g.get)(e,"settings.labels.button")]}return e?[e.label]:[]}},{key:"getVisibleFilters",value:function(e,t){if(0===t.length)return e;var a=t[0],r=Object(g.find)(e,{value:a});return this.getVisibleFilters(r&&r.subFilters,t.slice(1))}},{key:"selectSubFilter",value:function(e){this.setState(function(t){return{nav:[].concat(Object(c.a)(t.nav),[e]),animate:"left"}})}},{key:"goBack",value:function(){this.setState(function(e){return{nav:e.nav.slice(0,-1),animate:"right"}})}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=this.props,r=a.path,c=a.query,i=a.config,l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F();return Object(g.pick)(e,["period","compare","before","after","interval","type"])}(c),s=Object(n.a)(Object(o.a)({},i.param,"all"===e?void 0:e),t);i.staticParams.forEach(function(e){s[e]=c[e]}),R(s,r,l)}},{key:"onTagChange",value:function(e,t,a){var r=Object(g.last)(a),n=e.value,c=e.settings.param;r?(this.update(n,Object(o.a)({},c,r.id)),t()):this.update("all"),this.updateSelectedTag([r])}},{key:"renderButton",value:function(e,t){var a=this;if(e.component){var r=e.settings,n=r.type,c=r.labels,o=this.getFilter().value===e.value?this.state.selectedTag:null;return Object(h.createElement)(He,{className:"woocommerce-filters-filter__search",type:n,placeholder:c.placeholder,selected:o?[o]:[],onChange:Object(g.partial)(this.onTagChange,e,t),inlineTags:!0,staticResults:!0})}var i=Object(g.partial)(this.selectSubFilter,e.value);return Object(h.createElement)(f.Button,{className:"woocommerce-filters-filter__button",onClick:e.subFilters?i:function(r){t(r),a.update(e.value,e.query||{}),a.setState({selectedTag:null})}},e.label)}},{key:"onContentMount",value:function(e){var t=this.state.nav,a=!!t.length&&this.getFilter(t[t.length-1])?1:0,r=Ca.focus.tabbable.find(e)[a];setTimeout(function(){r.focus()},0)}},{key:"render",value:function(){var e=this,t=this.props.config,a=this.state,r=a.nav,n=a.animate,c=this.getVisibleFilters(t.filters,r),o=!!r.length&&this.getFilter(r[r.length-1]),i=this.getFilter();return Object(h.createElement)("div",{className:"woocommerce-filters-filter"},t.label&&Object(h.createElement)("span",{className:"woocommerce-filters-label"},t.label,":"),Object(h.createElement)(f.Dropdown,{contentClassName:"woocommerce-filters-filter__content",position:"bottom",expandOnMobile:!0,headerTitle:Object(p.__)("filter report to show:","woocommerce-admin"),renderToggle:function(t){var a=t.isOpen,r=t.onToggle;return Object(h.createElement)(Oa,{onClick:r,isOpen:a,labels:e.getButtonLabel(i)})},renderContent:function(t){var a=t.onClose;return Object(h.createElement)(vt,{animationKey:r,animate:n,onExited:e.onContentMount},function(){return Object(h.createElement)("ul",{className:"woocommerce-filters-filter__content-list"},o&&Object(h.createElement)("li",{className:"woocommerce-filters-filter__content-list-item"},Object(h.createElement)(f.IconButton,{className:"woocommerce-filters-filter__button",onClick:e.goBack,icon:"arrow-left-alt2"},o.label)),c.map(function(t){return Object(h.createElement)("li",{key:t.value,className:k()("woocommerce-filters-filter__content-list-item",{"is-selected":i.value===t.value||i.path&&Object(g.includes)(i.path,t.value)})},e.renderButton(t,a))}))})}}))}}]),t}(h.Component);Na.propTypes={config:b.a.shape({label:b.a.string,staticParams:b.a.array.isRequired,param:b.a.string.isRequired,showFilters:b.a.func.isRequired,filters:b.a.arrayOf(b.a.shape({chartMode:b.a.oneOf(["item-comparison","time-comparison"]),component:b.a.string,label:b.a.string,path:b.a.string,subFilters:b.a.array,value:b.a.string.isRequired}))}).isRequired,path:b.a.string.isRequired,query:b.a.object},Na.defaultProps={query:{}};var za=Na,Ma=a(175),Sa=a(176),Ha=a.n(Sa),Va=a(291),La=a.n(Va),Ba=function(e){var t,a,r,n,c=e.alt,o=e.title,i=e.size,l=e.user,s=e.className,u=k()("woocommerce-gravatar",s,{"is-placeholder":!l}),m=c||l&&(l.display_name||l.name)||"",d="https://www.gravatar.com/avatar/0?s="+i+"&d=mp";return l&&(t=Object(g.isString)(l)?(n=l,"https://www.gravatar.com/avatar/"+La.a.createHash("md5").update(n).digest("hex")):l.avatar_URLs[96],a=Ha.a.parse(t),(r=Object(Ma.parse)(a.query)).s=i,r.d="mp",a.search=Object(Ma.stringify)(r),d=Ha.a.format(a)),Object(h.createElement)("img",{alt:m,title:o,className:u,src:d,width:i,height:i})};Ba.propTypes={user:b.a.oneOfType([b.a.object,b.a.string]),alt:b.a.string,title:b.a.string,size:b.a.number,className:b.a.string},Ba.defaultProps={size:60};var Ta=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(s.a)(this,Object(u.a)(t).apply(this,arguments))).onClick=e.onClick.bind(Object(m.a)(e)),e.onFocusFormToggle=e.onFocusFormToggle.bind(Object(m.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(m.a)(e)),e.container=Object(h.createRef)(),e}return Object(d.a)(t,e),Object(l.a)(t,[{key:"onClick",value:function(e){var t=this.props,a=t.isClickable,r=t.onInvoke;a&&(e.preventDefault(),r())}},{key:"onKeyDown",value:function(e){e.target.isSameNode(e.currentTarget)&&(e.keyCode!==ae.ENTER&&e.keyCode!==ae.SPACE||(e.preventDefault(),this.props.onInvoke()),e.keyCode===ae.UP&&e.preventDefault(),e.keyCode===ae.DOWN&&(e.preventDefault(),(e.target.nextSibling||e.target.parentNode.querySelector(".woocommerce-ellipsis-menu__item")).focus()))}},{key:"onFocusFormToggle",value:function(){this.container.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.checked,a=e.children;return e.isCheckbox?Object(h.createElement)("div",{"aria-checked":t,ref:this.container,role:"menuitemcheckbox",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},Object(h.createElement)(f.BaseControl,{className:"components-toggle-control"},Object(h.createElement)(f.FormToggle,{"aria-hidden":"true",checked:t,onChange:this.props.onInvoke,onFocus:this.onFocusFormToggle,onClick:function(e){return e.stopPropagation()},tabIndex:"-1"}),a)):Object(h.createElement)("div",{role:"menuitem",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},a)}}]),t}(h.Component);Ta.propTypes={checked:b.a.bool,children:b.a.node,isCheckbox:b.a.bool,isClickable:b.a.bool,onInvoke:b.a.func.isRequired},Ta.defaultProps={isClickable:!1,isCheckbox:!1};var Fa=Ta,Ra=function(e){var t=e.children;return Object(h.createElement)("div",{className:"woocommerce-ellipsis-menu__title"},t)};Ra.propTypes={children:b.a.node};var Da=Ra,Pa=function(e){var t=e.order,a=e.className,r=t.status,n=wcSettings.orderStatuses,c=k()("woocommerce-order-status",a),i=k()("woocommerce-order-status__indicator",Object(o.a)({},"is-"+r,!0)),l=n[r]||r;return Object(h.createElement)("div",{className:c},Object(h.createElement)("span",{className:i}),l)};Pa.propTypes={order:b.a.object.isRequired,className:b.a.string};var qa=[25,50,75,100],Ia=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).previousPage=a.previousPage.bind(Object(m.a)(a)),a.nextPage=a.nextPage.bind(Object(m.a)(a)),a.onPageValueChange=a.onPageValueChange.bind(Object(m.a)(a)),a.perPageChange=a.perPageChange.bind(Object(m.a)(a)),a.selectInputValue=a.selectInputValue.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"previousPage",value:function(e){e.stopPropagation();var t=this.props,a=t.page,r=t.onPageChange;a-1<1||r(a-1)}},{key:"nextPage",value:function(e){e.stopPropagation();var t=this.props,a=t.page,r=t.onPageChange;a+1>this.pageCount||r(a+1)}},{key:"perPageChange",value:function(e){var t=this.props,a=t.onPerPageChange,r=t.onPageChange,n=t.total,c=t.page;a(parseInt(e));var o=Math.ceil(n/parseInt(e));c>o&&r(o)}},{key:"onPageValueChange",value:function(e){var t=this.props.onPageChange,a=parseInt(e.target.value,10);Object(g.isFinite)(a)&&this.pageCount&&this.pageCount>=a&&t(a)}},{key:"selectInputValue",value:function(e){e.target.select()}},{key:"renderPageArrows",value:function(){var e=this.props.page;if(this.pageCount<=1)return null;var t=k()("woocommerce-pagination__link",{"is-active":e>1}),a=k()("woocommerce-pagination__link",{"is-active":e<this.pageCount});return Object(h.createElement)("div",{className:"woocommerce-pagination__page-arrows"},Object(h.createElement)("span",{className:"woocommerce-pagination__page-arrows-label",role:"status","aria-live":"polite"},Object(p.sprintf)(Object(p.__)("Page %d of %d","woocommerce-admin"),e,this.pageCount)),Object(h.createElement)("div",{className:"woocommerce-pagination__page-arrows-buttons"},Object(h.createElement)(f.IconButton,{className:t,disabled:!(e>1),onClick:this.previousPage,icon:"arrow-left-alt2",label:Object(p.__)("Previous Page","woocommerce-admin"),size:18}),Object(h.createElement)(f.IconButton,{className:a,disabled:!(e<this.pageCount),onClick:this.nextPage,icon:"arrow-right-alt2",label:Object(p.__)("Next Page","woocommerce-admin"),size:18})))}},{key:"renderPagePicker",value:function(){var e=this.props.page,t=e<1||e>this.pageCount,a=k()("woocommerce-pagination__page-picker-input",{"has-error":t}),r=Object(g.uniqueId)("woocommerce-pagination-page-picker-");return Object(h.createElement)("div",{className:"woocommerce-pagination__page-picker"},Object(h.createElement)("label",{htmlFor:r,className:"woocommerce-pagination__page-picker-label"},Object(p.__)("Go to page","woocommerce-admin"),Object(h.createElement)("input",{id:r,className:a,"aria-invalid":t,type:"number",onClick:this.selectInputValue,onChange:this.onPageValueChange,value:e,min:1,max:this.pageCount})))}},{key:"renderPerPagePicker",value:function(){var e=qa.map(function(e){return{value:e,label:e}});return Object(h.createElement)("div",{className:"woocommerce-pagination__per-page-picker"},Object(h.createElement)(f.SelectControl,{label:Object(p.__)("Rows per page","woocommerce-admin"),value:this.props.perPage,onChange:this.perPageChange,options:e}))}},{key:"render",value:function(){var e=this.props,t=e.total,a=e.perPage,r=e.className;this.pageCount=Math.ceil(t/a);var n=k()("woocommerce-pagination",r);return this.pageCount<=1?t>qa[0]&&Object(h.createElement)("div",{className:n},this.renderPerPagePicker())||null:Object(h.createElement)("div",{className:n},this.renderPageArrows(),this.renderPagePicker(),this.renderPerPagePicker())}}]),t}(h.Component);Ia.propTypes={page:b.a.number.isRequired,onPageChange:b.a.func,perPage:b.a.number.isRequired,onPerPageChange:b.a.func,total:b.a.number.isRequired,className:b.a.string},Ia.defaultProps={onPageChange:g.noop,onPerPageChange:g.noop};var Aa=Ia,Ka=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"stars",value:function(){for(var e=this.props,t=e.size,a=e.totalStars,r={width:t+"px",height:t+"px"},n=[],c=0;c<a;c++)n.push(Object(h.createElement)(O.a,{key:"star-"+c,icon:"star",style:r}));return n}},{key:"render",value:function(){var e=this.props,t=e.rating,a=e.totalStars,r=e.className,n=k()("woocommerce-rating",r),c=100/a,o={width:Math.round(c*t)+"%"},i=Object(p.sprintf)(Object(p.__)("%1$s out of %2$s stars.","woocommerce-admin"),t,a);return Object(h.createElement)("div",{className:n,"aria-label":i},this.stars(),Object(h.createElement)("div",{className:"woocommerce-rating__star-outline",style:o},this.stars()))}}]),t}(h.Component);Ka.propTypes={rating:b.a.number,totalStars:b.a.number,size:b.a.number,className:b.a.string},Ka.defaultProps={rating:0,totalStars:5,size:18};var Ya=Ka,Ua=function(e){var t=e.product,a=Object(q.a)(e,["product"]),r=t&&t.average_rating||0;return Object(h.createElement)(Ya,Object(W.a)({rating:r},a))};Ua.propTypes={product:b.a.object.isRequired};var Qa=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(s.a)(this,Object(u.a)(t).call(this))).renderCard=e.renderCard.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(l.a)(t,[{key:"renderCard",value:function(e){var t=this.props,a=t.advancedFilters,r=t.query,n=t.path,c=e.filters,o=e.param;if(!r[o])return null;if(0===r[o].indexOf("compare")){var i=Object(g.find)(c,{value:r[o]});if(!i)return null;var l=i.settings,s=void 0===l?{}:l;return Object(h.createElement)("div",{key:o,className:"woocommerce-filters__advanced-filters"},Object(h.createElement)(na,Object(W.a)({path:n,query:r},s)))}return"advanced"===r[o]?Object(h.createElement)("div",{key:o,className:"woocommerce-filters__advanced-filters"},Object(h.createElement)(pt,{config:a,path:n,query:r})):void 0}},{key:"render",value:function(){var e=this.props,t=e.filters,a=e.query,r=e.path,n=e.showDatePicker;return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(A,{className:"screen-reader-text"},Object(p.__)("Filters","woocommerce-admin")),Object(h.createElement)(K,{component:"div",className:"woocommerce-filters"},Object(h.createElement)("div",{className:"woocommerce-filters__basic-filters"},n&&Object(h.createElement)(Ea,{key:JSON.stringify(a),query:a,path:r}),t.map(function(e){if(e.showFilters(a))return Object(h.createElement)(za,{key:e.param,config:e,query:a,path:r})})),t.map(this.renderCard)))}}]),t}(h.Component);Qa.propTypes={advancedFilters:b.a.object,filters:b.a.array,path:b.a.string.isRequired,query:b.a.object,showDatePicker:b.a.bool},Qa.defaultProps={advancedFilters:{},filters:[],query:{},showDatePicker:!0};var Wa=function(e){var t=e.review,a=Object(q.a)(e,["review"]),r=t&&t.rating||0;return Object(h.createElement)(Ya,Object(W.a)({rating:r},a))};Wa.propTypes={review:b.a.object.isRequired};function Ga(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,a=Object(g.groupBy)(e,"parent"),r=Object(g.keyBy)(t,"id"),o=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.parent)return t.name?[t.name]:[];var a=e(r[t.parent]);return[].concat(Object(c.a)(a),[t.name])},i=function e(t){return t.map(function(t){var c=a[t.id];return delete a[t.id],Object(n.a)({},t,{breadcrumbs:o(r[t.parent]),children:c&&c.length?e(c):[]})})},l=i(a[0]||[]);return delete a[0],Object(g.forEach)(a,function(e){l.push.apply(l,Object(c.a)(i(e||[])))}),l}var $a=function(){return Object(h.createElement)(f.Icon,{icon:Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(h.createElement)("path",{fill:"#1E8CBE",d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}))})},Ja=function(){return Object(h.createElement)(f.Icon,{icon:Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(h.createElement)("path",{fill:"#6C7781",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-2z"}))})},Xa=function(){return Object(h.createElement)(f.Icon,{icon:Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(h.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"}))})},Za=function(){return Object(h.createElement)(f.Icon,{icon:Object(h.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(h.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"}))})};function er(e,t){if(!t)return e;var a=new RegExp(Object(g.escapeRegExp)(t),"ig");return e.replace(a,"<strong>$&</strong>")}var tr=function(e){var t=e.className,a=e.depth,r=void 0===a?0:a,n=e.item,c=e.isSelected,o=e.isSingle,i=e.onSelect,l=e.search,s=void 0===l?"":l,u=e.showCount,m=void 0!==u&&u,d=Object(q.a)(e,["className","depth","item","isSelected","isSingle","onSelect","search","showCount"]),p=[t,"woocommerce-search-list__item"];p.push("depth-".concat(r)),o&&p.push("is-radio-button");var v,b=n.breadcrumbs&&n.breadcrumbs.length;return Object(h.createElement)(f.MenuItem,Object(W.a)({role:o?"menuitemradio":"menuitemcheckbox",className:p.join(" "),onClick:i(n),isSelected:c},d),Object(h.createElement)("span",{className:"woocommerce-search-list__item-state"},function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?t?Object(h.createElement)(Xa,null):Object(h.createElement)(Za,null):t?Object(h.createElement)($a,null):Object(h.createElement)(Ja,null)}(o,c)),Object(h.createElement)("span",{className:"woocommerce-search-list__item-label"},b?Object(h.createElement)("span",{className:"woocommerce-search-list__item-prefix"},1===(v=n.breadcrumbs).length?Object(g.first)(v):2===v.length?Object(g.first)(v)+" › "+Object(g.last)(v):Object(g.first)(v)+" … "+Object(g.last)(v)):null,Object(h.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:er(n.name,s)}})),!!m&&Object(h.createElement)("span",{className:"woocommerce-search-list__item-count"},n.count))};tr.propTypes={className:b.a.string,depth:b.a.number,item:b.a.object,isSelected:b.a.bool,isSingle:b.a.bool,onSelect:b.a.func,search:b.a.string,showCount:b.a.bool};var ar=tr,rr={clear:Object(p.__)("Clear all selected items","woocommerce-admin"),list:Object(p.__)("Results","woocommerce-admin"),noItems:Object(p.__)("No items found.","woocommerce-admin"),noResults:Object(p.__)("No results for %s","woocommerce-admin"),search:Object(p.__)("Search for items","woocommerce-admin"),selected:function(e){return Object(p.sprintf)(Object(p._n)("%d item selected","%d items selected",e,"woocommerce-admin"),e)},updated:Object(p.__)("Search results updated.","woocommerce-admin")},nr=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(s.a)(this,Object(u.a)(t).apply(this,arguments))).onSelect=e.onSelect.bind(Object(m.a)(e)),e.onRemove=e.onRemove.bind(Object(m.a)(e)),e.onClear=e.onClear.bind(Object(m.a)(e)),e.isSelected=e.isSelected.bind(Object(m.a)(e)),e.defaultRenderItem=e.defaultRenderItem.bind(Object(m.a)(e)),e.renderList=e.renderList.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.onSearch,r=t.search;r!==e.search&&"function"==typeof a&&a(r)}},{key:"onRemove",value:function(e){var t=this.props,a=t.isSingle,r=t.onChange,n=t.selected;return function(){a&&r([]);var t=Object(g.findIndex)(n,{id:e});r([].concat(Object(c.a)(n.slice(0,t)),Object(c.a)(n.slice(t+1))))}}},{key:"onSelect",value:function(e){var t=this,a=this.props,r=a.isSingle,n=a.onChange,o=a.selected;return function(){t.isSelected(e)?t.onRemove(e.id)():n(r?[e]:[].concat(Object(c.a)(o),[e]))}}},{key:"onClear",value:function(){this.props.onChange([])}},{key:"isSelected",value:function(e){return-1!==Object(g.findIndex)(this.props.selected,{id:e.id})}},{key:"getFilteredList",value:function(e,t){var a=this.props.isHierarchical;if(!t)return a?Ga(e):e;var r=Object(n.a)({},rr,this.props.messages),c=new RegExp(Object(g.escapeRegExp)(t),"i");this.props.debouncedSpeak(r.updated);var o=e.map(function(e){return!!c.test(e.name)&&e}).filter(Boolean);return a?Ga(o,e):o}},{key:"defaultRenderItem",value:function(e){return Object(h.createElement)(ar,e)}},{key:"renderList",value:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props,n=r.isSingle,c=r.search,o=this.props.renderItem||this.defaultRenderItem;return e?e.map(function(e){return Object(h.createElement)(h.Fragment,{key:e.id},o({item:e,isSelected:t.isSelected(e),onSelect:t.onSelect,isSingle:n,search:c,depth:a}),t.renderList(e.children,a+1))}):null}},{key:"renderListSection",value:function(){var e=this.props,t=e.isLoading,a=e.search,r=this.getFilteredList(this.props.list,a),c=Object(n.a)({},rr,this.props.messages);return t?Object(h.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(h.createElement)(f.Spinner,null)):r.length?Object(h.createElement)(f.MenuGroup,{label:c.list,className:"woocommerce-search-list__list"},this.renderList(r)):Object(h.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(h.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(h.createElement)(O.a,{icon:"notice-outline",role:"img","aria-hidden":"true",focusable:"false"})),Object(h.createElement)("span",{className:"woocommerce-search-list__not-found-text"},a?Object(p.sprintf)(c.noResults,a):c.noItems))}},{key:"renderSelectedSection",value:function(){var e=this,t=this.props,a=t.isLoading,r=t.isSingle,c=t.selected,o=Object(n.a)({},rr,this.props.messages);if(a||r||!c)return null;var i=c.length;return Object(h.createElement)("div",{className:"woocommerce-search-list__selected"},Object(h.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(h.createElement)("strong",null,o.selected(i)),i>0?Object(h.createElement)(f.Button,{isLink:!0,isDestructive:!0,onClick:this.onClear,"aria-label":o.clear},Object(p.__)("Clear all","woocommerce-admin")):null),c.map(function(t,a){return Object(h.createElement)(Me,{key:a,label:t.name,id:t.id,remove:e.onRemove})}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=void 0===t?"":t,r=e.search,c=e.setState,o=Object(n.a)({},rr,this.props.messages);return Object(h.createElement)("div",{className:"woocommerce-search-list ".concat(a)},this.renderSelectedSection(),Object(h.createElement)("div",{className:"woocommerce-search-list__search"},Object(h.createElement)(f.TextControl,{label:o.search,type:"search",value:r,onChange:function(e){return c({search:e})}})),this.renderListSection())}}]),t}(h.Component);nr.propTypes={className:b.a.string,isHierarchical:b.a.bool,isLoading:b.a.bool,isSingle:b.a.bool,list:b.a.arrayOf(b.a.shape({id:b.a.number,name:b.a.string})),messages:b.a.shape({clear:b.a.string,list:b.a.string,noItems:b.a.string,noResults:b.a.string,search:b.a.string,selected:b.a.func,updated:b.a.string}),onChange:b.a.func.isRequired,onSearch:b.a.func,renderItem:b.a.func,selected:b.a.array.isRequired,search:b.a.string,setState:b.a.func,debouncedSpeak:b.a.func,instanceId:b.a.number};var cr=Object(te.compose)([Object(te.withState)({search:""}),f.withSpokenMessages,te.withInstanceId])(nr),or=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props,t=e.children,a=e.menu,r=e.title,n=k()("woocommerce-section-header",this.props.className);return Object(h.createElement)("div",{className:n},Object(h.createElement)(A,{className:"woocommerce-section-header__title woocommerce-section-header__header-item"},r),Object(h.createElement)("hr",{role:"presentation"}),t&&Object(h.createElement)("div",{className:"woocommerce-section-header__actions woocommerce-section-header__header-item"},t),a&&Object(h.createElement)("div",{className:"woocommerce-section-header__menu woocommerce-section-header__header-item"},a))}}]),t}(h.Component);or.propTypes={className:b.a.string,menu:Y(P),title:b.a.oneOfType([b.a.string,b.a.node]).isRequired};var ir=function(e){var t=e.isPrimary,a=e.mainIcon,r=e.mainLabel,n=e.onClick,c=e.menuLabel,o=e.controls,i=e.className;if(!o||!o.length)return null;var l=a&&f.IconButton||f.Button,s=k()("woocommerce-split-button",i,{"is-primary":t,"has-label":r});return Object(h.createElement)("div",{className:s},Object(h.createElement)(l,{icon:a,className:"woocommerce-split-button__main-action",onClick:n},r),Object(h.createElement)(f.Dropdown,{className:"woocommerce-split-button__menu",position:"bottom left",contentClassName:"woocommerce-split-button__menu-popover",expandOnMobile:!0,headerTitle:c,renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(h.createElement)(f.IconButton,{icon:t?"arrow-up":"arrow-down",className:k()("woocommerce-split-button__menu-toggle",{"is-active":t}),onClick:a,"aria-haspopup":"true","aria-expanded":t,label:c,tooltip:c})},renderContent:function(e){var t=e.onClose;return Object(h.createElement)(f.NavigableMenu,{className:"woocommerce-split-button__menu-wrapper",role:"menu","aria-label":c},o.map(function(e,a){var r=e.icon&&f.IconButton||f.Button;return Object(h.createElement)(r,{key:a,onClick:function(a){a.stopPropagation(),t(),e.onClick&&e.onClick()},className:"woocommerce-split-button__menu-item",icon:e.icon||"",role:"menuitem"},e.label)}))}}))};ir.propTypes={isPrimary:b.a.bool,mainIcon:b.a.node,mainLabel:b.a.string,onClick:b.a.func,menuLabel:b.a.string,controls:b.a.arrayOf(b.a.shape({icon:b.a.oneOfType([b.a.string,b.a.element]),label:b.a.string.isRequired,onClick:b.a.func})).isRequired,className:b.a.string},ir.defaultProps={isPrimary:!1,onClick:g.noop};function lr(e){return e<10?"has-".concat(e,"-items"):"has-10-items"}var sr=function(e){var t=e.label,a=e.orientation,r=e.itemCount,n=e.items,c=Object(g.uniqueId)("woocommerce-summary-helptext-"),i=lr(r),l=k()("woocommerce-summary",Object(o.a)({},i,"horizontal"===a));return Object(h.createElement)(f.NavigableMenu,{"aria-label":t,"aria-describedby":c,orientation:a,stopNavigationEvents:!0},Object(h.createElement)("p",{id:c,className:"screen-reader-text"},Object(p.__)("List of data points available for filtering. Use arrow keys to cycle through the list. Click a data point for a detailed report.","woocommerce-admin")),Object(h.createElement)("ul",{className:l},n))};sr.propTypes={label:b.a.string,orientation:b.a.oneOf(["vertical","horizontal"]).isRequired,items:b.a.node.isRequired,itemCount:b.a.number.isRequired};var ur=sr,mr=function(e){var t=e.children,a=e.isDropdownBreakpoint,r=e.label,n=t({}),c=h.Children.count(n)||1,o=a?"vertical":"horizontal",i=Object(h.createElement)(ur,{label:r,orientation:o,itemCount:c,items:n});if(!a||c<2)return i;var l=n.find(function(e){return!!e.props.selected});return l?Object(h.createElement)(f.Dropdown,{className:"woocommerce-summary",position:"bottom",headerTitle:r,renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(h.cloneElement)(l,{onToggle:a,isOpen:t})},renderContent:function(e){return Object(h.createElement)(ur,{label:r,orientation:o,itemCount:c,items:t(e)})}}):i};mr.propTypes={children:b.a.func.isRequired,label:b.a.string},mr.defaultProps={label:Object(p.__)("Performance Indicators","woocommerce-admin")};Object(yt.withViewportMatch)({isDropdownBreakpoint:"< large"})(mr);var dr=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e,t=this.props.isDropdownBreakpoint,a=t?1:this.props.numberOfItems,r=lr(a),n=k()("woocommerce-summary",(e={},Object(o.a)(e,r,!t),Object(o.a)(e,"is-placeholder",!0),e)),c=Object(g.range)(a).map(function(e){return Object(h.createElement)("li",{className:"woocommerce-summary__item-container is-placeholder",key:e},Object(h.createElement)("span",{className:"woocommerce-summary__item"},Object(h.createElement)("span",{className:"woocommerce-summary__item-label"}),Object(h.createElement)("span",{className:"woocommerce-summary__item-data"},Object(h.createElement)("span",{className:"woocommerce-summary__item-value"}),Object(h.createElement)("div",{className:"woocommerce-summary__item-delta"},Object(h.createElement)("span",{className:"woocommerce-summary__item-delta-value"}))),Object(h.createElement)("span",{className:"woocommerce-summary__item-prev-label"}),Object(h.createElement)("span",{className:"woocommerce-summary__item-prev-value"})))});return Object(h.createElement)("ul",{className:n,"aria-hidden":"true"},c)}}]),t}(h.Component);dr.propTypes={numberOfItems:b.a.number.isRequired},dr.defaultProps={numberOfRows:5};Object(yt.withViewportMatch)({isDropdownBreakpoint:"< large"})(dr);var hr=function(e){var t,a=e.delta,r=e.href,n=e.isOpen,c=e.label,o=e.onToggle,i=e.prevLabel,l=e.prevValue,s=e.reverseTrend,u=e.selected,m=e.value,d=e.onLinkClickCallback,v=k()("woocommerce-summary__item-container",{"is-dropdown-button":o,"is-dropdown-expanded":n}),b=k()("woocommerce-summary__item",{"is-selected":u,"is-good-trend":s?a<0:a>0,"is-bad-trend":s?a>0:a<0}),w=a>0?"arrow-up":"arrow-down",y=a>0?Object(p.sprintf)(Object(p.__)("Up %d%% from %s","woocommerce-admin"),a,i):Object(p.sprintf)(Object(p.__)("Down %d%% from %s","woocommerce-admin"),Math.abs(a),i);a||(w="arrow-right",y=Object(p.sprintf)(Object(p.__)("No change from %s","woocommerce-admin"),i));var j={className:b,"aria-current":u?"page":null};if(o||r){var E=!!o;t=E?f.Button:J,E?(j.onClick=o,j["aria-expanded"]=n):(j.href=r,j.role="menuitem",j.onClick=d)}else t="div";return Object(h.createElement)("li",{className:v},Object(h.createElement)(t,j,Object(h.createElement)("span",{className:"woocommerce-summary__item-label"},c),Object(h.createElement)("span",{className:"woocommerce-summary__item-data"},Object(h.createElement)("span",{className:"woocommerce-summary__item-value"},Object(g.isNil)(m)?Object(p.__)("N/A","woocommerce-admin"):m),Object(h.createElement)("div",{className:"woocommerce-summary__item-delta",role:"presentation","aria-label":y},Object(h.createElement)(O.a,{className:"woocommerce-summary__item-delta-icon",icon:w,size:18}),Object(h.createElement)("span",{className:"woocommerce-summary__item-delta-value"},Object(g.isNil)(a)?Object(p.__)("N/A","woocommerce-admin"):Object(p.sprintf)(Object(p.__)("%d%%","woocommerce-admin"),a)))),Object(h.createElement)("span",{className:"woocommerce-summary__item-prev-label"},i)," ",Object(h.createElement)("span",{className:"woocommerce-summary__item-prev-value"},Object(g.isNil)(l)?Object(p.__)("N/A","woocommerce-admin"):l),o?Object(h.createElement)(O.a,{className:"woocommerce-summary__toggle",icon:"chevron-down",size:24}):null))};hr.propTypes={delta:b.a.number,href:b.a.string,isOpen:b.a.bool,label:b.a.string.isRequired,onToggle:b.a.func,prevLabel:b.a.string,prevValue:b.a.oneOfType([b.a.number,b.a.string]),reverseTrend:b.a.bool,selected:b.a.bool,value:b.a.oneOfType([b.a.number,b.a.string]),onLinkClickCallback:b.a.func},hr.defaultProps={href:"",isOpen:!1,prevLabel:Object(p.__)("Previous Period:","woocommerce-admin"),reverseTrend:!1,selected:!1,onLinkClickCallback:g.noop};var pr=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).state={tabIndex:null,isScrollable:!1},a.container=Object(h.createRef)(),a.sortBy=a.sortBy.bind(Object(m.a)(a)),a.updateTableShadow=a.updateTableShadow.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){var e=this.container.current,t=e.scrollWidth>e.clientWidth;this.setState({tabIndex:t?"0":null}),this.updateTableShadow(),window.addEventListener("resize",this.updateTableShadow)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateTableShadow)}},{key:"sortBy",value:function(e){var t=this,a=this.props,r=a.headers,n=a.query;return function(){var a=n.orderby||Object(g.get)(Object(g.find)(r,{defaultSort:!0}),"key",!1),c=n.order||"desc",o="desc";e===a&&(o="desc"===c?"asc":"desc"),t.props.onSort(e,o)}}},{key:"updateTableShadow",value:function(){var e=this.container.current,t=e.scrollWidth-e.scrollLeft<=e.offsetWidth;this.setState({isScrollable:!t})}},{key:"render",value:function(){var e=this,t=this.props,a=t.ariaHidden,r=t.caption,n=t.classNames,c=t.headers,o=t.instanceId,i=t.query,l=t.rowHeader,s=t.rows,u=this.state,m=u.isScrollable,d=u.tabIndex,v=k()("woocommerce-table__table",n,{"is-scrollable":m}),b=i.orderby||Object(g.get)(Object(g.find)(c,{defaultSort:!0}),"key",!1),w=i.order||"desc";return Object(h.createElement)("div",{className:v,ref:this.container,tabIndex:d,"aria-hidden":a,"aria-labelledby":"caption-".concat(o),role:"group",onScroll:this.updateTableShadow},Object(h.createElement)("table",null,Object(h.createElement)("caption",{id:"caption-".concat(o),className:"woocommerce-table__caption screen-reader-text"},r,"0"===d&&Object(h.createElement)("small",null,Object(p.__)("(scroll to see more)","woocommerce-admin"))),Object(h.createElement)("tbody",null,Object(h.createElement)("tr",null,c.map(function(t,a){var r=t.cellClassName,n=t.isLeftAligned,c=t.isSortable,i=t.isNumeric,l=t.key,s=t.label,u=t.screenReaderLabel,m="header-".concat(o,"-").concat(a),d={className:k()("woocommerce-table__header",r,{"is-left-aligned":n,"is-sortable":c,"is-sorted":b===l,"is-numeric":i})};c&&(d["aria-sort"]="none",b===l&&(d["aria-sort"]="asc"===w?"ascending":"descending"));var g=b===l&&"asc"!==w?Object(p.sprintf)(Object(p.__)("Sort by %s in ascending order","woocommerce-admin"),u):Object(p.sprintf)(Object(p.__)("Sort by %s in descending order","woocommerce-admin"),u),v=Object(h.createElement)(h.Fragment,null,Object(h.createElement)("span",{"aria-hidden":Boolean(u)},s),u&&Object(h.createElement)("span",{className:"screen-reader-text"},u));return Object(h.createElement)("th",Object(W.a)({role:"columnheader",scope:"col",key:a},d),c?Object(h.createElement)(h.Fragment,null,Object(h.createElement)(f.IconButton,{icon:b===l&&"asc"===w?Object(h.createElement)(O.a,{size:18,icon:"chevron-up"}):Object(h.createElement)(O.a,{size:18,icon:"chevron-down"}),"aria-describedby":m,onClick:e.sortBy(l),isDefault:!0},v),Object(h.createElement)("span",{className:"screen-reader-text",id:m},g)):v)})),s.map(function(e,t){return Object(h.createElement)("tr",{key:t},e.map(function(e,t){var a=c[t],r=a.cellClassName,n=a.isLeftAligned,o=a.isNumeric,i=l===t,s=i?"th":"td",u=k()("woocommerce-table__item",r,{"is-left-aligned":n,"is-numeric":o,"is-sorted":b===c[t].key});return Object(h.createElement)(s,{scope:i?"row":null,key:t,className:u},function(e){return e.display||null}(e))}))}))))}}]),t}(h.Component);pr.propTypes={ariaHidden:b.a.bool,caption:b.a.string.isRequired,className:b.a.string,headers:b.a.arrayOf(b.a.shape({defaultSort:b.a.bool,isLeftAligned:b.a.bool,isNumeric:b.a.bool,isSortable:b.a.bool,key:b.a.string,label:b.a.node,required:b.a.bool,screenReaderLabel:b.a.string})),onSort:b.a.func,query:b.a.object,rows:b.a.arrayOf(b.a.arrayOf(b.a.shape({display:b.a.node,value:b.a.oneOfType([b.a.string,b.a.number,b.a.bool])}))).isRequired,rowHeader:b.a.oneOfType([b.a.number,b.a.bool])},pr.defaultProps={ariaHidden:!1,headers:[],onSort:g.noop,query:{},rowHeader:0};var fr=Object(te.withInstanceId)(pr),gr=a(292);function vr(e){return Array.isArray(e)?e.map(function(e){return e.label}).join(","):[]}function br(e){return Array.isArray(e)?e.map(function(e){return e.map(function(e){return void 0!==e.value&&null!==e.value?e.value.toString().replace(/,/g,""):""}).join(",")}).join("\n"):[]}var wr=function(){return Object(h.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},Object(h.createElement)("path",{d:"M18,9c-0.009,0-0.017,0.002-0.025,0.003C17.72,5.646,14.922,3,11.5,3C7.91,3,5,5.91,5,9.5c0,0.524,0.069,1.031,0.186,1.519 C5.123,11.016,5.064,11,5,11c-2.209,0-4,1.791-4,4c0,1.202,0.541,2.267,1.38,3h18.593C22.196,17.089,23,15.643,23,14 C23,11.239,20.761,9,18,9z M12,16l-4-5h3V8h2v3h3L12,16z"}))},Or=function(e){function t(){return Object(i.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this,t=this.props,a=t.numberOfRows,r=Object(q.a)(t,["numberOfRows"]),n=Object(g.range)(a).map(function(){return e.props.headers.map(function(){return{display:Object(h.createElement)("span",{className:"is-placeholder"})}})});return Object(h.createElement)(fr,Object(W.a)({ariaHidden:!0,classNames:"is-loading",rows:n},r))}}]),t}(h.Component);Or.propTypes={query:b.a.object,caption:b.a.string.isRequired,headers:b.a.arrayOf(b.a.shape({hiddenByDefault:b.a.bool,defaultSort:b.a.bool,isSortable:b.a.bool,key:b.a.string,label:b.a.node,required:b.a.bool})),numberOfRows:b.a.number},Or.defaultProps={numberOfRows:5};var yr=Or,jr=function(e){var t=e.data;return Object(h.createElement)("ul",{className:"woocommerce-table__summary"},t.map(function(e,t){var a=e.label,r=e.value;return Object(h.createElement)("li",{className:"woocommerce-table__summary-item",key:t},Object(h.createElement)("span",{className:"woocommerce-table__summary-value"},r),Object(h.createElement)("span",{className:"woocommerce-table__summary-label"},a))}))};jr.propTypes={data:b.a.array};var Er=jr,kr=function(e){function t(e){var a;Object(i.a)(this,t);var r=(a=Object(s.a)(this,Object(u.a)(t).call(this,e))).props,n=r.query,c=r.compareBy,o=a.getShowCols(e.headers),l=n.filter?B(n[c]):[];return a.state={showCols:o,selectedRows:l},a.onColumnToggle=a.onColumnToggle.bind(Object(m.a)(a)),a.onClickDownload=a.onClickDownload.bind(Object(m.a)(a)),a.onCompare=a.onCompare.bind(Object(m.a)(a)),a.onSearch=a.onSearch.bind(Object(m.a)(a)),a.selectRow=a.selectRow.bind(Object(m.a)(a)),a.selectAllRows=a.selectAllRows.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidUpdate",value:function(e){var t=e.headers,a=e.query,r=this.props,n=r.compareBy,c=r.headers,o=r.onColumnsChange,i=r.query,l=this.state.showCols;if(i.filter||a.filter){var s=a.filter?B(a[n]):[],u=i.filter?B(i[n]):[];Object(g.isEqual)(s.sort(),u.sort())||this.setState({selectedRows:u})}if(Object(g.isEqual)(c,t)||this.setState({showCols:this.getShowCols(c)}),i.orderby!==a.orderby&&!l.includes(i.orderby)){var m=l.concat(i.orderby);this.setState({showCols:m}),o(m)}}},{key:"getShowCols",value:function(e){return e.map(function(e){var t=e.key;return!e.hiddenByDefault&&t}).filter(Boolean)}},{key:"getVisibleHeaders",value:function(){var e=this.props.headers,t=this.state.showCols;return e.filter(function(e){var a=e.key;return t.includes(a)})}},{key:"getVisibleRows",value:function(){var e=this.props,t=e.headers,a=e.rows,r=this.state.showCols;return a.map(function(e){return t.map(function(t,a){var n=t.key;return r.includes(n)&&e[a]}).filter(Boolean)})}},{key:"onColumnToggle",value:function(e){var t=this,a=this.props,r=a.headers,n=a.query,o=a.onQueryChange,i=a.onColumnsChange;return function(){t.setState(function(t){if(t.showCols.includes(e)){if(n.orderby===e){var a=Object(g.find)(r,{defaultSort:!0})||Object(g.first)(r)||{};o("sort")(a.key,"desc")}var l=Object(g.without)(t.showCols,e);return i(l),{showCols:l}}var s=[].concat(Object(c.a)(t.showCols),[e]);return i(s),{showCols:s}})}}},{key:"onClickDownload",value:function(){var e,t,a,r,n,c=this.props,o=c.query,i=c.onClickDownload,l=c.searchBy,s=c.title,u=Object.assign({},o);delete u.extended_info,u.search&&delete u[l],e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[e.toLowerCase().replace(/[^a-z0-9]/g,"-"),Ae()().format("YYYY-MM-DD"),Object.keys(t).map(function(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"-")+"-"+decodeURIComponent(t[e]).toLowerCase().replace(/[^a-z0-9]/g,"-")}).join("_")].filter(function(e){return e.length}).join("_")+".csv"}(s,u),r=this.getVisibleHeaders(),n=this.getVisibleRows(),t=[vr(r),br(n)].filter(function(e){return e.length}).join("\n"),a=new Blob([t],{type:"text/csv;charset=utf-8"}),Object(gr.saveAs)(a,e),i&&i()}},{key:"onCompare",value:function(){var e=this.props,t=e.compareBy,a=e.compareParam,r=e.onQueryChange,n=this.state.selectedRows;t&&r("compare")(t,a,n.join(","))}},{key:"onSearch",value:function(e){var t,a=this.props,r=a.compareParam,c=a.searchBy,i=a.baseSearchQuery,l=e.map(function(e){return e.label.replace(",","%2C")});l.length?R(Object(n.a)((t={filter:void 0},Object(o.a)(t,r,void 0),Object(o.a)(t,c,void 0),t),i,{search:Object(g.uniq)(l).join(",")})):R({search:void 0})}},{key:"selectAllRows",value:function(e){var t=this.props.ids;e.target.checked?this.setState({selectedRows:t}):this.setState({selectedRows:[]})}},{key:"selectRow",value:function(e,t){var a=this.props.ids;t.target.checked?this.setState(function(t){var r=t.selectedRows;return{selectedRows:Object(g.uniq)([a[e]].concat(Object(c.a)(r)))}}):this.setState(function(t){var r=t.selectedRows,n=r.indexOf(a[e]);return{selectedRows:[].concat(Object(c.a)(r.slice(0,n)),Object(c.a)(r.slice(n+1)))}})}},{key:"getCheckbox",value:function(e){var t=this.props.ids,a=void 0===t?[]:t,r=-1!==this.state.selectedRows.indexOf(a[e]);return{display:Object(h.createElement)("input",{type:"checkbox",onChange:Object(g.partial)(this.selectRow,e),checked:r}),value:!1}}},{key:"getAllCheckbox",value:function(){var e=this.props.ids,t=void 0===e?[]:e,a=this.state.selectedRows,r=t.length>0&&t.length===a.length;return{cellClassName:"is-checkbox-column",label:Object(h.createElement)("input",{type:"checkbox",onChange:this.selectAllRows,"aria-label":Object(p.__)("Select All"),checked:r}),required:!0}}},{key:"render",value:function(){var e=this,t=this.props,a=t.compareBy,r=t.downloadable,n=t.labels,o=void 0===n?{}:n,i=t.isLoading,l=t.onClickDownload,s=t.onQueryChange,u=t.query,m=t.rowHeader,d=t.rowsPerPage,g=t.searchBy,v=t.showMenu,b=t.summary,w=t.title,O=t.totalRows,y=this.state,j=y.selectedRows,E=y.showCols,x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:F();if("object"!==Object(_.a)(e))throw new Error("Invalid parameter passed to getSearchWords, it expects an object or no parameters.");var t=e.search;if(!t)return[];if("string"!=typeof t)throw new Error("Invalid 'search' type. getSearchWords expects query's 'search' property to be a string.");return t.split(",").map(function(e){return e.replace("%2C",",")})}(u).map(function(e){return{id:e,label:e}}),C=this.props.headers,N=this.getVisibleHeaders(),z=this.getVisibleRows();a&&(z=z.map(function(t,a){return[e.getCheckbox(a)].concat(Object(c.a)(t))}),N=[this.getAllCheckbox()].concat(Object(c.a)(N)));var M=k()({"woocommerce-table":!0,"has-compare":!!a,"has-search":!!g});return Object(h.createElement)(Q,{className:M,title:w,action:[a&&Object(h.createElement)(aa,{key:"compare",className:"woocommerce-table__compare",count:j.length,helpText:o.helpText||Object(p.__)("Check at least two items below to compare","woocommerce-admin"),onClick:this.onCompare},o.compareButton||Object(p.__)("Compare","woocommerce-admin")),g&&Object(h.createElement)(He,{allowFreeTextSearch:!0,inlineTags:!0,key:"search",onChange:this.onSearch,placeholder:o.placeholder||Object(p.__)("Search by item name","woocommerce-admin"),selected:x,showClearButton:!0,type:g}),(r||l)&&Object(h.createElement)(f.IconButton,{key:"download",className:"woocommerce-table__download-button",disabled:i,onClick:this.onClickDownload,isLink:!0},Object(h.createElement)(wr,null),Object(h.createElement)("span",{className:"woocommerce-table__download-button__label"},o.downloadButton||Object(p.__)("Download","woocommerce-admin")))],menu:v&&Object(h.createElement)(P,{label:Object(p.__)("Choose which values to display","woocommerce-admin")},Object(h.createElement)(Da,null,Object(p.__)("Columns:","woocommerce-admin")),C.map(function(t){var a=t.key,r=t.label;return t.required?null:Object(h.createElement)(Fa,{checked:E.includes(a),isCheckbox:!0,isClickable:!0,key:a,onInvoke:e.onColumnToggle(a)},r)}))},i?Object(h.createElement)(h.Fragment,null,Object(h.createElement)("span",{className:"screen-reader-text"},Object(p.__)("Your requested data is loading","woocommerce-admin")),Object(h.createElement)(yr,{numberOfRows:d,headers:N,rowHeader:m,caption:w,query:u,onSort:s("sort")})):Object(h.createElement)(fr,{rows:z,headers:N,rowHeader:m,caption:w,query:u,onSort:s("sort")}),Object(h.createElement)(Aa,{page:parseInt(u.page)||1,perPage:d,total:O,onPageChange:s("page"),onPerPageChange:s("per_page")}),b&&Object(h.createElement)(Er,{data:b}))}}]),t}(h.Component);kr.propTypes={compareBy:b.a.string,compareParam:b.a.string,headers:b.a.arrayOf(b.a.shape({hiddenByDefault:b.a.bool,defaultSort:b.a.bool,isSortable:b.a.bool,key:b.a.string,label:b.a.string,required:b.a.bool})),labels:b.a.shape({compareButton:b.a.string,downloadButton:b.a.string,helpText:b.a.string,placeholder:b.a.string}),ids:b.a.arrayOf(b.a.number),isLoading:b.a.bool,onQueryChange:b.a.func,onColumnsChange:b.a.func,downloadable:b.a.bool,onClickDownload:b.a.func,query:b.a.object,rowHeader:b.a.oneOfType([b.a.number,b.a.bool]),rows:b.a.arrayOf(b.a.arrayOf(b.a.shape({display:b.a.node,value:b.a.oneOfType([b.a.string,b.a.number,b.a.bool])}))).isRequired,rowsPerPage:b.a.number.isRequired,searchBy:b.a.string,showMenu:b.a.bool,summary:b.a.arrayOf(b.a.shape({label:b.a.node,value:b.a.oneOfType([b.a.string,b.a.number])})),title:b.a.string.isRequired,totalRows:b.a.number.isRequired,baseSearchQuery:b.a.object},kr.defaultProps={compareParam:"filter",downloadable:!1,isLoading:!1,onQueryChange:g.noop,onColumnsChange:g.noop,query:{},rowHeader:0,rows:[],showMenu:!0,baseSearchQuery:{}};var _r=function(e){var t=e.children,a=e.numberOfRows;return Object(h.createElement)("div",{className:"woocommerce-table is-empty",style:{"--number-of-rows":a}},t)};_r.propTypes={numberOfRows:b.a.number},_r.defaultProps={numberOfRows:5};a(65);var xr=function(e){var t=e.items;return Object(h.createElement)(Me,{className:"woocommerce-view-more-list",label:Object(p.sprintf)(Object(p.__)("+%d more","woocommerce-admin"),t.length-1),popoverContents:Object(h.createElement)("ul",{className:"woocommerce-view-more-list__popover"},t.map(function(e,t){return Object(h.createElement)("li",{key:t,className:"woocommerce-view-more-list__popover__item"},e)}))})};xr.propTypes={items:b.a.arrayOf(b.a.node)},xr.defaultProps={items:[]};a.d(t,"a",function(){return cr}),a.d(t,"b",function(){return ar})},370:function(e,t){t.f={}.propertyIsEnumerable},371:function(e,t,a){"use strict";var r=a(372)(!0);a(373)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,a=this._i;return a>=t.length?{value:void 0,done:!0}:(e=r(t,a),this._i+=e.length,{value:e,done:!1})})},372:function(e,t,a){var r=a(145),n=a(144);e.exports=function(e){return function(t,a){var c,o,i=String(n(t)),l=r(a),s=i.length;return l<0||l>=s?e?"":void 0:(c=i.charCodeAt(l))<55296||c>56319||l+1===s||(o=i.charCodeAt(l+1))<56320||o>57343?e?i.charAt(l):c:e?i.slice(l,l+2):o-56320+(c-55296<<10)+65536}}},373:function(e,t,a){"use strict";var r=a(201),n=a(138),c=a(200),o=a(118),i=a(148),l=a(374),s=a(210),u=a(378),m=a(87)("iterator"),d=!([].keys&&"next"in[].keys()),h=function(){return this};e.exports=function(e,t,a,p,f,g,v){l(a,t,p);var b,w,O,y=function(e){if(!d&&e in _)return _[e];switch(e){case"keys":case"values":return function(){return new a(this,e)}}return function(){return new a(this,e)}},j=t+" Iterator",E="values"==f,k=!1,_=e.prototype,x=_[m]||_["@@iterator"]||f&&_[f],C=x||y(f),N=f?E?y("entries"):C:void 0,z="Array"==t&&_.entries||x;if(z&&(O=u(z.call(new e)))!==Object.prototype&&O.next&&(s(O,j,!0),r||"function"==typeof O[m]||o(O,m,h)),E&&x&&"values"!==x.name&&(k=!0,C=function(){return x.call(this)}),r&&!v||!d&&!k&&_[m]||o(_,m,C),i[t]=C,i[j]=h,f)if(b={values:E?C:y("values"),keys:g?C:y("keys"),entries:N},v)for(w in b)w in _||c(_,w,b[w]);else n(n.P+n.F*(d||k),t,b);return b}},374:function(e,t,a){"use strict";var r=a(375),n=a(141),c=a(210),o={};a(118)(o,a(87)("iterator"),function(){return this}),e.exports=function(e,t,a){e.prototype=r(o,{next:n(1,a)}),c(e,t+" Iterator")}},375:function(e,t,a){var r=a(120),n=a(376),c=a(208),o=a(146)("IE_PROTO"),i=function(){},l=function(){var e,t=a(199)("iframe"),r=c.length;for(t.style.display="none",a(377).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[c[r]];return l()};e.exports=Object.create||function(e,t){var a;return null!==e?(i.prototype=r(e),a=new i,i.prototype=null,a[o]=e):a=l(),void 0===t?a:n(a,t)}},376:function(e,t,a){var r=a(119),n=a(120),c=a(203);e.exports=a(121)?Object.defineProperties:function(e,t){n(e);for(var a,o=c(t),i=o.length,l=0;i>l;)r.f(e,a=o[l++],t[a]);return e}},377:function(e,t,a){var r=a(92).document;e.exports=r&&r.documentElement},378:function(e,t,a){var r=a(122),n=a(147),c=a(146)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=n(e),r(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},379:function(e,t,a){"use strict";var r=a(202),n=a(138),c=a(147),o=a(380),i=a(381),l=a(207),s=a(382),u=a(383);n(n.S+n.F*!a(385)(function(e){Array.from(e)}),"Array",{from:function(e){var t,a,n,m,d=c(e),h="function"==typeof this?this:Array,p=arguments.length,f=p>1?arguments[1]:void 0,g=void 0!==f,v=0,b=u(d);if(g&&(f=r(f,p>2?arguments[2]:void 0,2)),null==b||h==Array&&i(b))for(a=new h(t=l(d.length));t>v;v++)s(a,v,g?f(d[v],v):d[v]);else for(m=b.call(d),a=new h;!(n=m.next()).done;v++)s(a,v,g?o(m,f,[n.value,v],!0):n.value);return a.length=v,a}})},380:function(e,t,a){var r=a(120);e.exports=function(e,t,a,n){try{return n?t(r(a)[0],a[1]):t(a)}catch(t){var c=e.return;throw void 0!==c&&r(c.call(e)),t}}},381:function(e,t,a){var r=a(148),n=a(87)("iterator"),c=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||c[n]===e)}},382:function(e,t,a){"use strict";var r=a(119),n=a(141);e.exports=function(e,t,a){t in e?r.f(e,t,n(0,a)):e[t]=a}},383:function(e,t,a){var r=a(384),n=a(87)("iterator"),c=a(148);e.exports=a(93).getIteratorMethod=function(e){if(null!=e)return e[n]||e["@@iterator"]||c[r(e)]}},384:function(e,t,a){var r=a(206),n=a(87)("toStringTag"),c="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,a,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),n))?a:c?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},385:function(e,t,a){var r=a(87)("iterator"),n=!1;try{var c=[7][r]();c.return=function(){n=!0},Array.from(c,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!n)return!1;var a=!1;try{var c=[7],o=c[r]();o.next=function(){return{done:a=!0}},c[r]=function(){return o},e(c)}catch(e){}return a}},434:function(e,t,a){"use strict";var r=a(247),n=a(248),c=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Array.isArray,l=Array.prototype.push,s=function(e,t){l.apply(e,i(t)?t:[t])},u=Date.prototype.toISOString,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:n.formatters[n.default],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,a,n,c,o,l,u,d,h,p,f,g,v){var b=t;if("function"==typeof u?b=u(a,b):b instanceof Date?b=p(b):"comma"===n&&i(b)&&(b=b.join(",")),null===b){if(c)return l&&!g?l(a,m.encoder,v):a;b=""}if("string"==typeof b||"number"==typeof b||"boolean"==typeof b||r.isBuffer(b))return l?[f(g?a:l(a,m.encoder,v))+"="+f(l(b,m.encoder,v))]:[f(a)+"="+f(String(b))];var w,O=[];if(void 0===b)return O;if(i(u))w=u;else{var y=Object.keys(b);w=d?y.sort(d):y}for(var j=0;j<w.length;++j){var E=w[j];o&&null===b[E]||(i(b)?s(O,e(b[E],"function"==typeof n?n(a,E):a,n,c,o,l,u,d,h,p,f,g,v)):s(O,e(b[E],a+(h?"."+E:"["+E+"]"),n,c,o,l,u,d,h,p,f,g,v)))}return O};e.exports=function(e,t){var a,r=e,l=function(e){if(!e)return m;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||m.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var a=n.default;if(void 0!==e.format){if(!c.call(n.formatters,e.format))throw new TypeError("Unknown format option provided.");a=e.format}var r=n.formatters[a],o=m.filter;return("function"==typeof e.filter||i(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:m.addQueryPrefix,allowDots:void 0===e.allowDots?m.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:m.charsetSentinel,delimiter:void 0===e.delimiter?m.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:m.encode,encoder:"function"==typeof e.encoder?e.encoder:m.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:m.encodeValuesOnly,filter:o,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:m.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:m.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:m.strictNullHandling}}(t);"function"==typeof l.filter?r=(0,l.filter)("",r):i(l.filter)&&(a=l.filter);var u,h=[];if("object"!=typeof r||null===r)return"";u=t&&t.arrayFormat in o?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var p=o[u];a||(a=Object.keys(r)),l.sort&&a.sort(l.sort);for(var f=0;f<a.length;++f){var g=a[f];l.skipNulls&&null===r[g]||s(h,d(r[g],g,p,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.formatter,l.encodeValuesOnly,l.charset))}var v=h.join(l.delimiter),b=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?b+="utf8=%26%2310003%3B&":b+="utf8=%E2%9C%93&"),v.length>0?b+v:""}},435:function(e,t,a){"use strict";var r=a(247),n=Object.prototype.hasOwnProperty,c={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},o=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},i=function(e,t,a){if(e){var r=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,c=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(r),i=o?r.slice(0,o.index):r,l=[];if(i){if(!a.plainObjects&&n.call(Object.prototype,i)&&!a.allowPrototypes)return;l.push(i)}for(var s=0;null!==(o=c.exec(r))&&s<a.depth;){if(s+=1,!a.plainObjects&&n.call(Object.prototype,o[1].slice(1,-1))&&!a.allowPrototypes)return;l.push(o[1])}return o&&l.push("["+r.slice(o.index)+"]"),function(e,t,a){for(var r=t,n=e.length-1;n>=0;--n){var c,o=e[n];if("[]"===o&&a.parseArrays)c=[].concat(r);else{c=a.plainObjects?Object.create(null):{};var i="["===o.charAt(0)&&"]"===o.charAt(o.length-1)?o.slice(1,-1):o,l=parseInt(i,10);a.parseArrays||""!==i?!isNaN(l)&&o!==i&&String(l)===i&&l>=0&&a.parseArrays&&l<=a.arrayLimit?(c=[])[l]=r:c[i]=r:c={0:r}}r=c}return r}(l,t,a)}};e.exports=function(e,t){var a=function(e){if(!e)return c;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?c.charset:e.charset;return{allowDots:void 0===e.allowDots?c.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:c.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:c.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:c.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:c.comma,decoder:"function"==typeof e.decoder?e.decoder:c.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:c.delimiter,depth:"number"==typeof e.depth?e.depth:c.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:c.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:c.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:c.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:c.strictNullHandling}}(t);if(""===e||null==e)return a.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var a,i={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=t.parameterLimit===1/0?void 0:t.parameterLimit,u=l.split(t.delimiter,s),m=-1,d=t.charset;if(t.charsetSentinel)for(a=0;a<u.length;++a)0===u[a].indexOf("utf8=")&&("utf8=%E2%9C%93"===u[a]?d="utf-8":"utf8=%26%2310003%3B"===u[a]&&(d="iso-8859-1"),m=a,a=u.length);for(a=0;a<u.length;++a)if(a!==m){var h,p,f=u[a],g=f.indexOf("]="),v=-1===g?f.indexOf("="):g+1;-1===v?(h=t.decoder(f,c.decoder,d),p=t.strictNullHandling?null:""):(h=t.decoder(f.slice(0,v),c.decoder,d),p=t.decoder(f.slice(v+1),c.decoder,d)),p&&t.interpretNumericEntities&&"iso-8859-1"===d&&(p=o(p)),p&&t.comma&&p.indexOf(",")>-1&&(p=p.split(",")),n.call(i,h)?i[h]=r.combine(i[h],p):i[h]=p}return i}(e,a):e,s=a.plainObjects?Object.create(null):{},u=Object.keys(l),m=0;m<u.length;++m){var d=u[m],h=i(d,l[d],a);s=r.merge(s,h,a)}return r.compact(s)}},45:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t,a=1;a<arguments.length;a++)for(var r in t=arguments[a])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n=function(){function e(e,t){for(var a,r=0;r<t.length;r++)(a=t[r]).enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}return function(t,a,r){return a&&e(t.prototype,a),r&&e(t,r),t}}(),c=a(9),o=l(c),i=l(a(2));function l(e){return e&&e.__esModule?e:{default:e}}var s=function(e,t){return 0<=t.indexOf(e)},u=function(e){return 0==e%18},m=["gridicons-add-outline","gridicons-add","gridicons-align-image-center","gridicons-align-image-left","gridicons-align-image-none","gridicons-align-image-right","gridicons-attachment","gridicons-bold","gridicons-bookmark-outline","gridicons-bookmark","gridicons-calendar","gridicons-cart","gridicons-create","gridicons-custom-post-type","gridicons-external","gridicons-folder","gridicons-heading","gridicons-help-outline","gridicons-help","gridicons-history","gridicons-info-outline","gridicons-info","gridicons-italic","gridicons-layout-blocks","gridicons-link-break","gridicons-link","gridicons-list-checkmark","gridicons-list-ordered","gridicons-list-unordered","gridicons-menus","gridicons-minus","gridicons-my-sites","gridicons-notice-outline","gridicons-notice","gridicons-plus-small","gridicons-plus","gridicons-popout","gridicons-posts","gridicons-scheduled","gridicons-share-ios","gridicons-star-outline","gridicons-star","gridicons-stats","gridicons-status","gridicons-thumbs-up","gridicons-textcolor","gridicons-time","gridicons-trophy","gridicons-user-circle","gridicons-reader-follow","gridicons-reader-following"],d=["gridicons-arrow-down","gridicons-arrow-up","gridicons-comment","gridicons-clear-formatting","gridicons-flag","gridicons-menu","gridicons-reader","gridicons-strikethrough"],h=["gridicons-align-center","gridicons-align-justify","gridicons-align-left","gridicons-align-right","gridicons-arrow-left","gridicons-arrow-right","gridicons-house","gridicons-indent-left","gridicons-indent-right","gridicons-minus-small","gridicons-print","gridicons-sign-out","gridicons-stats-alt","gridicons-trash","gridicons-underline","gridicons-video-camera"],p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,c.PureComponent),n(t,[{key:"render",value:function(){var e=this.props,t=e.size,a=e.onClick,n=e.icon,c=e.className,i=function(e,t){var a={};for(var r in e)0<=t.indexOf(r)||Object.prototype.hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}(e,["size","onClick","icon","className"]),l="gridicons-"+n,p=void 0,f=["gridicon",l,c,!!(s(l,m)&&u(t))&&"needs-offset",!!(s(l,d)&&u(t))&&"needs-offset-x",!!(s(l,h)&&u(t))&&"needs-offset-y"].filter(Boolean).join(" ");switch(l){default:p=o.default.createElement("svg",r({height:t,width:t},i));break;case"gridicons-add-image":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 4v2h-3v3h-2V6h-3V4h3V1h2v3h3zm-8.5 7c.828 0 1.5-.672 1.5-1.5S15.328 8 14.5 8 13 8.672 13 9.5s.672 1.5 1.5 1.5zm3.5 3.234l-.513-.57c-.794-.885-2.18-.885-2.976 0l-.655.73L9 9l-3 3.333V6h7V4H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2v-7h-2v3.234z"})));break;case"gridicons-add-outline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 9h-4V7h-2v4H7v2h4v4h2v-4h4v-2z"})));break;case"gridicons-add":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"})));break;case"gridicons-align-center":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm13-6H7v2h10v-2zM4 9v2h16V9H4zm13-4H7v2h10V5z"})));break;case"gridicons-align-image-center":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm5-4h8V9H8v6z"})));break;case"gridicons-align-image-left":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 5h18v2H3V5zm0 14h18v-2H3v2zm0-4h8V9H3v6zm10 0h8v-2h-8v2zm0-4h8V9h-8v2z"})));break;case"gridicons-align-image-none":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zM11 9H3v6h8V9z"})));break;case"gridicons-align-image-right":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7H3V5h18v2zm0 10H3v2h18v-2zm0-8h-8v6h8V9zm-10 4H3v2h8v-2zm0-4H3v2h8V9z"})));break;case"gridicons-align-justify":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm16-6H4v2h16v-2zM4 9v2h16V9H4zm16-4H4v2h16V5z"})));break;case"gridicons-align-left":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19h16v-2H4v2zm10-6H4v2h10v-2zM4 9v2h16V9H4zm10-4H4v2h10V5z"})));break;case"gridicons-align-right":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 17H4v2h16v-2zm-10-2h10v-2H10v2zM4 9v2h16V9H4zm6-2h10V5H10v2z"})));break;case"gridicons-arrow-down":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 4v12.17l-5.59-5.59L4 12l8 8 8-8-1.41-1.41L13 16.17V4h-2z"})));break;case"gridicons-arrow-left":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"})));break;case"gridicons-arrow-right":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"})));break;case"gridicons-arrow-up":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 20V7.83l5.59 5.59L20 12l-8-8-8 8 1.41 1.41L11 7.83V20h2z"})));break;case"gridicons-aside":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l6-6V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h8zM6 6h12v6h-4c-1.105 0-2 .895-2 2v4H6V6zm10 4H8V8h8v2z"})));break;case"gridicons-attachment":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 1c-2.762 0-5 2.238-5 5v10c0 1.657 1.343 3 3 3s2.99-1.343 2.99-3V6H13v10c0 .553-.447 1-1 1-.553 0-1-.447-1-1V6c0-1.657 1.343-3 3-3s3 1.343 3 3v10.125C17 18.887 14.762 21 12 21s-5-2.238-5-5v-5H5v5c0 3.866 3.134 7 7 7s6.99-3.134 6.99-7V6c0-2.762-2.228-5-4.99-5z"})));break;case"gridicons-audio":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4v10.184C7.686 14.072 7.353 14 7 14c-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V7h7v4.184c-.314-.112-.647-.184-1-.184-1.657 0-3 1.343-3 3s1.343 3 3 3 3-1.343 3-3V4H8z"})));break;case"gridicons-bell":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.14 14.97l2.828 2.827c-.362.362-.862.586-1.414.586-1.105 0-2-.895-2-2 0-.552.224-1.052.586-1.414zm8.867 5.324L14.3 21 3 9.7l.706-.707 1.102.157c.754.108 1.69-.122 2.077-.51l3.885-3.884c2.34-2.34 6.135-2.34 8.475 0s2.34 6.135 0 8.475l-3.885 3.886c-.388.388-.618 1.323-.51 2.077l.157 1.1z"})));break;case"gridicons-block":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM4 12c0-4.418 3.582-8 8-8 1.848 0 3.545.633 4.9 1.686L5.686 16.9C4.633 15.545 4 13.848 4 12zm8 8c-1.848 0-3.546-.633-4.9-1.686L18.314 7.1C19.367 8.455 20 10.152 20 12c0 4.418-3.582 8-8 8z"})));break;case"gridicons-bold":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 5.01h4.547c2.126 0 3.67.302 4.632.906.96.605 1.44 1.567 1.44 2.887 0 .896-.21 1.63-.63 2.205-.42.574-.98.92-1.678 1.036v.103c.95.212 1.637.608 2.057 1.19.42.58.63 1.35.63 2.315 0 1.367-.494 2.434-1.482 3.2-.99.765-2.332 1.148-4.027 1.148H7V5.01zm3 5.936h2.027c.862 0 1.486-.133 1.872-.4.386-.267.578-.708.578-1.323 0-.574-.21-.986-.63-1.236-.42-.25-1.087-.374-1.996-.374H10v3.333zm0 2.523v3.905h2.253c.876 0 1.52-.167 1.94-.502.416-.335.625-.848.625-1.54 0-1.243-.89-1.864-2.668-1.864H10z"})));break;case"gridicons-book":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 3h2v18H4zM18 3H7v18h11c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 6h-6V8h6v1zm0-2h-6V6h6v1z"})));break;case"gridicons-bookmark-outline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 5v12.554l-5-2.857-5 2.857V5h10m0-2H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-bookmark":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 3H7c-1.105 0-2 .896-2 2v16l7-4 7 4V5c0-1.104-.896-2-2-2z"})));break;case"gridicons-briefcase":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 15h-4v-2H2v6c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2v-6h-8v2zm6-9h-2V4c0-1.105-.895-2-2-2H8c-1.105 0-2 .895-2 2v2H4c-1.105 0-2 .895-2 2v4h20V8c0-1.105-.895-2-2-2zm-4 0H8V4h8v2z"})));break;case"gridicons-bug":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14h4v-2h-4v-2h1a2 2 0 0 0 2-2V6h-2v2H5V6H3v2a2 2 0 0 0 2 2h1v2H2v2h4v1a6 6 0 0 0 .09 1H5a2 2 0 0 0-2 2v2h2v-2h1.81A6 6 0 0 0 11 20.91V10h2v10.91A6 6 0 0 0 17.19 18H19v2h2v-2a2 2 0 0 0-2-2h-1.09a6 6 0 0 0 .09-1zM12 2a4 4 0 0 0-4 4h8a4 4 0 0 0-4-4z"})));break;case"gridicons-calendar":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.105 0-2 .896-2 2v13c0 1.104.895 2 2 2h14c1.104 0 2-.896 2-2V6c0-1.104-.896-2-2-2zm0 15H5V8h14v11z"})));break;case"gridicons-camera":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 12c0 1.7-1.3 3-3 3s-3-1.3-3-3 1.3-3 3-3 3 1.3 3 3zm5-5v11c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2V4h4v1h2l1-2h6l1 2h2c1.1 0 2 .9 2 2zM7.5 9c0-.8-.7-1.5-1.5-1.5S4.5 8.2 4.5 9s.7 1.5 1.5 1.5S7.5 9.8 7.5 9zM19 12c0-2.8-2.2-5-5-5s-5 2.2-5 5 2.2 5 5 5 5-2.2 5-5z"})));break;case"gridicons-caption":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 15l2-2v5c0 1.105-.895 2-2 2H4c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h13l-2 2H4v12h16v-3zm2.44-8.56l-.88-.88c-.586-.585-1.534-.585-2.12 0L12 13v2H6v2h9v-1l7.44-7.44c.585-.586.585-1.534 0-2.12z"})));break;case"gridicons-cart":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 20c0 1.1-.9 2-2 2s-1.99-.9-1.99-2S5.9 18 7 18s2 .9 2 2zm8-2c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm.396-5c.937 0 1.75-.65 1.952-1.566L21 5H7V4c0-1.105-.895-2-2-2H3v2h2v11c0 1.105.895 2 2 2h12c0-1.105-.895-2-2-2H7v-2h10.396z"})));break;case"gridicons-chat":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 12c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h8c1.1 0 2 .9 2 2v5c0 1.1-.9 2-2 2H9v3l-3-3H3zM21 18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2h-6v1c0 2.2-1.8 4-4 4v2c0 1.1.9 2 2 2h2v3l3-3h3z"})));break;case"gridicons-checkmark-circle":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17.768l-4.884-4.884 1.768-1.768L11 14.232l8.658-8.658C17.823 3.39 15.075 2 12 2 6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10c0-1.528-.353-2.97-.966-4.266L11 17.768z"})));break;case"gridicons-checkmark":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19.414l-6.707-6.707 1.414-1.414L9 16.586 20.293 5.293l1.414 1.414"})));break;case"gridicons-chevron-down":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 9l-8 8-8-8 1.414-1.414L12 14.172l6.586-6.586"})));break;case"gridicons-chevron-left":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 20l-8-8 8-8 1.414 1.414L8.828 12l6.586 6.586"})));break;case"gridicons-chevron-right":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 20l8-8-8-8-1.414 1.414L15.172 12l-6.586 6.586"})));break;case"gridicons-chevron-up":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 15l8-8 8 8-1.414 1.414L12 9.828l-6.586 6.586"})));break;case"gridicons-clear-formatting":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.837 10.163l-4.6 4.6L10 4h4l.777 2.223-2.144 2.144-.627-2.092-1.17 3.888zm5.495.506L19.244 19H15.82l-1.05-3.5H11.5L5 22l-1.5-1.5 17-17L22 5l-5.668 5.67zm-2.31 2.31l-.032.03.032-.01v-.02z"})));break;case"gridicons-clipboard":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 18H8v-2h8v2zm0-6H8v2h8v-2zm2-9h-2v2h2v15H6V5h2V3H6c-1.105 0-2 .895-2 2v15c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm-4 2V4c0-1.105-.895-2-2-2s-2 .895-2 2v1c-1.105 0-2 .895-2 2v1h8V7c0-1.105-.895-2-2-2z"})));break;case"gridicons-cloud-download":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-6 7l-4-5h3V8h2v3h3l-4 5z"})));break;case"gridicons-cloud-outline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.5 5c2.336 0 4.304 1.825 4.48 4.154l.142 1.86 1.867-.012h.092C19.698 11.043 21 12.37 21 14c0 .748-.28 1.452-.783 2H3.28c-.156-.256-.28-.59-.28-1 0-1.074.85-1.953 1.915-1.998.06.007.118.012.178.015l2.66.124-.622-2.587C7.044 10.186 7 9.843 7 9.5 7 7.02 9.02 5 11.5 5m0-2C7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5l-.025.002C17.72 5.646 14.922 3 11.5 3z"})));break;case"gridicons-cloud-upload":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5zm-5 4v3h-2v-3H8l4-5 4 5h-3z"})));break;case"gridicons-cloud":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 9c-.01 0-.017.002-.025.003C17.72 5.646 14.922 3 11.5 3 7.91 3 5 5.91 5 9.5c0 .524.07 1.03.186 1.52C5.123 11.015 5.064 11 5 11c-2.21 0-4 1.79-4 4 0 1.202.54 2.267 1.38 3h18.593C22.196 17.09 23 15.643 23 14c0-2.76-2.24-5-5-5z"})));break;case"gridicons-code":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 12l-5.45 6.5L16 17.21 20.39 12 16 6.79l1.55-1.29zM8 6.79L6.45 5.5 1 12l5.45 6.5L8 17.21 3.61 12zm.45 14.61l1.93.52L15.55 2.6l-1.93-.52z"})));break;case"gridicons-cog":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 12c0-.568-.06-1.122-.174-1.656l1.834-1.612-2-3.464-2.322.786c-.82-.736-1.787-1.308-2.86-1.657L14 2h-4l-.48 2.396c-1.07.35-2.04.92-2.858 1.657L4.34 5.268l-2 3.464 1.834 1.612C4.06 10.878 4 11.432 4 12s.06 1.122.174 1.656L2.34 15.268l2 3.464 2.322-.786c.82.736 1.787 1.308 2.86 1.657L10 22h4l.48-2.396c1.07-.35 2.038-.92 2.858-1.657l2.322.786 2-3.464-1.834-1.613c.113-.535.174-1.09.174-1.657zm-8 4c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"})));break;case"gridicons-comment":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 16l-5 5v-5H5c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v9c0 1.1-.9 2-2 2h-7z"})));break;case"gridicons-computer":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4c-1.104 0-2 .896-2 2v12c0 1.104.896 2 2 2h6v2H7v2h10v-2h-3v-2h6c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm0 14H4V4h16v12z"})));break;case"gridicons-coupon":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 16v2h-2v-2h2zm3-3h2v-2h-2v2zm2 8h-2v2h2v-2zm3-5v2h2v-2h-2zm-1-3c.552 0 1 .448 1 1h2c0-1.657-1.343-3-3-3v2zm1 7c0 .552-.448 1-1 1v2c1.657 0 3-1.343 3-3h-2zm-7 1c-.552 0-1-.448-1-1h-2c0 1.657 1.343 3 3 3v-2zm3.21-5.21c-.78.78-2.047.782-2.828.002l-.002-.002L10 11.41l-1.43 1.44c.28.506.427 1.073.43 1.65C9 16.433 7.433 18 5.5 18S2 16.433 2 14.5 3.567 11 5.5 11c.577.003 1.144.15 1.65.43L8.59 10 7.15 8.57c-.506.28-1.073.427-1.65.43C3.567 9 2 7.433 2 5.5S3.567 2 5.5 2 9 3.567 9 5.5c-.003.577-.15 1.144-.43 1.65L10 8.59l3.88-3.88c.78-.78 2.047-.782 2.828-.002l.002.002-5.3 5.29 5.8 5.79zM5.5 7C6.328 7 7 6.328 7 5.5S6.328 4 5.5 4 4 4.672 4 5.5 4.672 7 5.5 7zM7 14.5c0-.828-.672-1.5-1.5-1.5S4 13.672 4 14.5 4.672 16 5.5 16 7 15.328 7 14.5z"})));break;case"gridicons-create":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 14v5c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h5v2H5v14h14v-5h2z"}),o.default.createElement("path",{d:"M21 7h-4V3h-2v4h-4v2h4v4h2V9h4"})));break;case"gridicons-credit-card":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 2v2H4V6h16zM4 18v-6h16v6H4zm2-4h7v2H6v-2zm9 0h3v2h-3v-2z"})));break;case"gridicons-crop":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 16h-4V8c0-1.105-.895-2-2-2H8V2H6v4H2v2h4v8c0 1.105.895 2 2 2h8v4h2v-4h4v-2zM8 16V8h8v8H8z"})));break;case"gridicons-cross-circle":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.1 4.9C15.2 1 8.8 1 4.9 4.9S1 15.2 4.9 19.1s10.2 3.9 14.1 0 4-10.3.1-14.2zm-4.3 11.3L12 13.4l-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8-1.4 1.4z"})));break;case"gridicons-cross-small":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.705 7.705l-1.41-1.41L12 10.59 7.705 6.295l-1.41 1.41L10.59 12l-4.295 4.295 1.41 1.41L12 13.41l4.295 4.295 1.41-1.41L13.41 12l4.295-4.295z"})));break;case"gridicons-cross":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.36 19.78L12 13.41l-6.36 6.37-1.42-1.42L10.59 12 4.22 5.64l1.42-1.42L12 10.59l6.36-6.36 1.41 1.41L13.41 12l6.36 6.36z"})));break;case"gridicons-custom-post-type":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zM6 6h5v5H6V6zm4.5 13C9.12 19 8 17.88 8 16.5S9.12 14 10.5 14s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zm3-6l3-5 3 5h-6z"})));break;case"gridicons-customize":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 6c0-1.505.78-3.08 2-4 0 .845.69 2 2 2 1.657 0 3 1.343 3 3 0 .386-.08.752-.212 1.09.74.594 1.476 1.19 2.19 1.81L8.9 11.98c-.62-.716-1.214-1.454-1.807-2.192C6.753 9.92 6.387 10 6 10c-2.21 0-4-1.79-4-4zm12.152 6.848l1.34-1.34c.607.304 1.283.492 2.008.492 2.485 0 4.5-2.015 4.5-4.5 0-.725-.188-1.4-.493-2.007L18 9l-2-2 3.507-3.507C18.9 3.188 18.225 3 17.5 3 15.015 3 13 5.015 13 7.5c0 .725.188 1.4.493 2.007L3 20l2 2 6.848-6.848c1.885 1.928 3.874 3.753 5.977 5.45l1.425 1.148 1.5-1.5-1.15-1.425c-1.695-2.103-3.52-4.092-5.448-5.977z"})));break;case"gridicons-domains":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm6.918 6h-3.215c-.188-1.424-.42-2.65-.565-3.357 1.593.682 2.916 1.87 3.78 3.357zm-5.904-3.928c.068.352.387 2.038.645 3.928h-3.32c.26-1.89.578-3.576.646-3.928C11.32 4.03 11.656 4 12 4s.68.03 1.014.072zM14 12c0 .598-.043 1.286-.11 2h-3.78c-.067-.714-.11-1.402-.11-2s.043-1.286.11-2h3.78c.067.714.11 1.402.11 2zM8.862 4.643C8.717 5.35 8.485 6.576 8.297 8H5.082c.864-1.487 2.187-2.675 3.78-3.357zM4.262 10h3.822c-.05.668-.084 1.344-.084 2s.033 1.332.085 2H4.263C4.097 13.36 4 12.692 4 12s.098-1.36.263-2zm.82 6h3.215c.188 1.424.42 2.65.565 3.357-1.593-.682-2.916-1.87-3.78-3.357zm5.904 3.928c-.068-.353-.388-2.038-.645-3.928h3.32c-.26 1.89-.578 3.576-.646 3.928-.333.043-.67.072-1.014.072s-.68-.03-1.014-.072zm4.152-.57c.145-.708.377-1.934.565-3.358h3.215c-.864 1.487-2.187 2.675-3.78 3.357zm4.6-5.358h-3.822c.05-.668.084-1.344.084-2s-.033-1.332-.085-2h3.82c.167.64.265 1.308.265 2s-.097 1.36-.263 2z"})));break;case"gridicons-dropdown":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 10l5 5 5-5"})));break;case"gridicons-ellipsis-circle":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zM7.5 13.5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5S9 11.2 9 12s-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm4.5 0c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5z"})));break;case"gridicons-ellipsis":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M7 12c0 1.104-.896 2-2 2s-2-.896-2-2 .896-2 2-2 2 .896 2 2zm12-2c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2zm-7 0c-1.104 0-2 .896-2 2s.896 2 2 2 2-.896 2-2-.896-2-2-2z"})));break;case"gridicons-external":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 13v6c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V7c0-1.105.895-2 2-2h6v2H5v12h12v-6h2zM13 3v2h4.586l-7.793 7.793 1.414 1.414L19 6.414V11h2V3h-8z"})));break;case"gridicons-filter":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 19h4v-2h-4v2zm-4-6h12v-2H6v2zM3 5v2h18V5H3z"})));break;case"gridicons-flag":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 6c0-1.105-.895-2-2-2H5v17h2v-7h5c0 1.105.895 2 2 2h6V6h-5z"})));break;case"gridicons-flip-horizontal":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 18v-5h3v-2h-3V6c0-1.105-.895-2-2-2H6c-1.105 0-2 .895-2 2v5H1v2h3v5c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2zM6 6h12v5H6V6z"})));break;case"gridicons-flip-vertical":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 4h-5V1h-2v3H6c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h5v3h2v-3h5c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zM6 18V6h5v12H6z"})));break;case"gridicons-folder-multiple":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 8c-1.105 0-2 .895-2 2v10c0 1.1.9 2 2 2h14c1.105 0 2-.895 2-2H4V8zm16 10H8c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2h7c1.105 0 2 .895 2 2v8c0 1.105-.895 2-2 2z"})));break;case"gridicons-folder":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 19H6c-1.1 0-2-.9-2-2V7c0-1.1.9-2 2-2h3c1.1 0 2 .9 2 2h7c1.1 0 2 .9 2 2v8c0 1.1-.9 2-2 2z"})));break;case"gridicons-fullscreen-exit":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14 10V4h2v2.59l3.29-3.29 1.41 1.41L17.41 8H20v2zM4 10V8h2.59l-3.3-3.29 1.42-1.42L8 6.59V4h2v6zm16 4v2h-2.59l3.29 3.29-1.41 1.41L16 17.41V20h-2v-6zm-10 0v6H8v-2.59l-3.29 3.3-1.42-1.42L6.59 16H4v-2z"})));break;case"gridicons-fullscreen":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 3v6h-2V6.41l-3.29 3.3-1.42-1.42L17.59 5H15V3zM3 3v6h2V6.41l3.29 3.3 1.42-1.42L6.41 5H9V3zm18 18v-6h-2v2.59l-3.29-3.29-1.41 1.41L17.59 19H15v2zM9 21v-2H6.41l3.29-3.29-1.41-1.42L5 17.59V15H3v6z"})));break;case"gridicons-gift":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 6h-4.8c.5-.5.8-1.2.8-2 0-1.7-1.3-3-3-3s-3 1.3-3 3c0-1.7-1.3-3-3-3S6 2.3 6 4c0 .8.3 1.5.8 2H2v6h1v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h1V6zm-2 4h-7V8h7v2zm-5-7c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM9 3c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zM4 8h7v2H4V8zm1 4h6v8H5v-8zm14 8h-6v-8h6v8z"})));break;case"gridicons-globe":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18l2-2 1-1v-2h-2v-1l-1-1H9v3l2 2v1.93c-3.94-.494-7-3.858-7-7.93l1 1h2v-2h2l3-3V6h-2L9 5v-.41C9.927 4.21 10.94 4 12 4s2.073.212 3 .59V6l-1 1v2l1 1 3.13-3.13c.752.897 1.304 1.964 1.606 3.13H18l-2 2v2l1 1h2l.286.286C18.03 18.06 15.24 20 12 20z"})));break;case"gridicons-grid":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 8H4V4h4v4zm6-4h-4v4h4V4zm6 0h-4v4h4V4zM8 10H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4zM8 16H4v4h4v-4zm6 0h-4v4h4v-4zm6 0h-4v4h4v-4z"})));break;case"gridicons-heading-h1":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 7h2v10h-2v-4H7v4H5V7h2v4h4V7zm6.57 0c-.594.95-1.504 1.658-2.57 2v1h2v7h2V7h-1.43z"})));break;case"gridicons-heading-h2":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 7h2v10H9v-4H5v4H3V7h2v4h4V7zm8 8c.51-.41.6-.62 1.06-1.05.437-.4.848-.828 1.23-1.28.334-.39.62-.82.85-1.28.2-.39.305-.822.31-1.26.005-.44-.087-.878-.27-1.28-.177-.385-.437-.726-.76-1-.346-.283-.743-.497-1.17-.63-.485-.153-.99-.227-1.5-.22-.36 0-.717.033-1.07.1-.343.06-.678.158-1 .29-.304.13-.593.295-.86.49-.287.21-.56.437-.82.68l1.24 1.22c.308-.268.643-.502 1-.7.35-.2.747-.304 1.15-.3.455-.03.906.106 1.27.38.31.278.477.684.45 1.1-.014.396-.14.78-.36 1.11-.285.453-.62.872-1 1.25-.44.43-.98.92-1.59 1.43-.61.51-1.41 1.06-2.16 1.65V17h8v-2h-4z"})));break;case"gridicons-heading-h3":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.11 14.218c.355.287.75.523 1.17.7.434.18.9.273 1.37.27.484.017.965-.086 1.4-.3.333-.146.55-.476.55-.84.003-.203-.05-.403-.15-.58-.123-.19-.3-.34-.51-.43-.32-.137-.655-.228-1-.27-.503-.073-1.012-.106-1.52-.1v-1.57c.742.052 1.485-.07 2.17-.36.37-.164.615-.525.63-.93.026-.318-.12-.627-.38-.81-.34-.203-.734-.3-1.13-.28-.395.013-.784.108-1.14.28-.375.167-.73.375-1.06.62l-1.22-1.39c.5-.377 1.053-.68 1.64-.9.608-.224 1.252-.336 1.9-.33.525-.007 1.05.05 1.56.17.43.1.84.277 1.21.52.325.21.595.495.79.83.19.342.287.73.28 1.12.01.48-.177.943-.52 1.28-.417.39-.916.685-1.46.86v.06c.61.14 1.175.425 1.65.83.437.382.68.94.66 1.52.005.42-.113.835-.34 1.19-.23.357-.538.657-.9.88-.408.253-.853.44-1.32.55-.514.128-1.04.192-1.57.19-.786.02-1.57-.106-2.31-.37-.59-.214-1.126-.556-1.57-1l1.12-1.41zM9 11H5V7H3v10h2v-4h4v4h2V7H9v4z"})));break;case"gridicons-heading-h4":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm10-2h-1v2h-2v-2h-5v-2l4.05-6H20v6h1v2zm-3-2V9l-2.79 4H18z"})));break;case"gridicons-heading-h5":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.09 14.19c.352.27.73.5 1.13.69.42.196.877.296 1.34.29.51.014 1.01-.125 1.44-.4.378-.253.594-.686.57-1.14.02-.45-.197-.877-.57-1.13-.406-.274-.89-.41-1.38-.39h-.47c-.135.014-.27.04-.4.08l-.41.15-.48.23-1.02-.57.28-5h6.4v1.92h-4.31L16 10.76c.222-.077.45-.138.68-.18.235-.037.472-.054.71-.05.463-.004.924.057 1.37.18.41.115.798.305 1.14.56.33.248.597.57.78.94.212.422.322.888.32 1.36.007.497-.11.99-.34 1.43-.224.417-.534.782-.91 1.07-.393.3-.837.527-1.31.67-.497.164-1.016.252-1.54.26-.788.023-1.573-.11-2.31-.39-.584-.238-1.122-.577-1.59-1l1.09-1.42zM11 17H9v-4H5v4H3V7h2v4h4V7h2v10z"})));break;case"gridicons-heading-h6":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11 17H9v-4H5v4H3V7h2v4h4V7h2v10zm8.58-7.508c-.248-.204-.524-.37-.82-.49-.625-.242-1.317-.242-1.94 0-.3.11-.566.287-.78.52-.245.27-.432.586-.55.93-.16.46-.243.943-.25 1.43.367-.33.79-.59 1.25-.77.405-.17.84-.262 1.28-.27.415-.006.83.048 1.23.16.364.118.704.304 1 .55.295.253.528.57.68.93.193.403.302.843.32 1.29.01.468-.094.93-.3 1.35-.206.387-.49.727-.83 1-.357.287-.764.504-1.2.64-.98.31-2.033.293-3-.05-.507-.182-.968-.472-1.35-.85-.437-.416-.778-.92-1-1.48-.243-.693-.352-1.426-.32-2.16-.02-.797.11-1.59.38-2.34.215-.604.556-1.156 1-1.62.406-.416.897-.74 1.44-.95.54-.21 1.118-.314 1.7-.31.682-.02 1.36.096 2 .34.5.19.962.464 1.37.81l-1.31 1.34zm-2.39 5.84c.202 0 .405-.03.6-.09.183-.046.356-.128.51-.24.15-.136.27-.303.35-.49.092-.225.136-.467.13-.71.037-.405-.123-.804-.43-1.07-.328-.23-.72-.347-1.12-.33-.346-.002-.687.07-1 .21-.383.17-.724.418-1 .73.046.346.143.683.29 1 .108.23.257.44.44.62.152.15.337.26.54.33.225.055.46.068.69.04z"})));break;case"gridicons-heading":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h-3v-6H9v6H6V5.01h3V11h6V5.01h3V20z"})));break;case"gridicons-heart-outline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 4.5c2.206 0 4 1.794 4 4 0 4.67-5.543 8.94-8.5 11.023C9.043 17.44 3.5 13.17 3.5 8.5c0-2.206 1.794-4 4-4 1.298 0 2.522.638 3.273 1.706L12 7.953l1.227-1.746c.75-1.07 1.975-1.707 3.273-1.707m0-1.5c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-heart":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.5 3c-1.862 0-3.505.928-4.5 2.344C11.005 3.928 9.362 3 7.5 3 4.462 3 2 5.462 2 8.5c0 5.72 6.5 10.438 10 12.85 3.5-2.412 10-7.13 10-12.85C22 5.462 19.538 3 16.5 3z"})));break;case"gridicons-help-outline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm4 8c0-2.21-1.79-4-4-4s-4 1.79-4 4h2c0-1.103.897-2 2-2s2 .897 2 2-.897 2-2 2c-.552 0-1 .448-1 1v2h2v-1.14c1.722-.447 3-1.998 3-3.86zm-3 6h-2v2h2v-2z"})));break;case"gridicons-help":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 16h-2v-2h2v2zm0-4.14V15h-2v-2c0-.552.448-1 1-1 1.103 0 2-.897 2-2s-.897-2-2-2-2 .897-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.862-1.278 3.413-3 3.86z"})));break;case"gridicons-history":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2.12 13.526c.742 4.78 4.902 8.47 9.88 8.47 5.5 0 10-4.5 10-9.998S17.5 2 12 2C8.704 2 5.802 3.6 4 6V2H2.003L2 9h7V7H5.8c1.4-1.8 3.702-3 6.202-3C16.4 4 20 7.6 20 11.998s-3.6 8-8 8c-3.877 0-7.13-2.795-7.848-6.472H2.12z"}),o.default.createElement("path",{d:"M11.002 7v5.3l3.2 4.298 1.6-1.197-2.8-3.7V7"})));break;case"gridicons-house":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 9L12 1 2 9v2h2v10h5v-4c0-1.657 1.343-3 3-3s3 1.343 3 3v4h5V11h2V9z"})));break;case"gridicons-image-multiple":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15 7.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5S17.328 9 16.5 9 15 8.328 15 7.5zM4 20h14c0 1.105-.895 2-2 2H4c-1.1 0-2-.9-2-2V8c0-1.105.895-2 2-2v14zM22 4v12c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zM8 4v6.333L11 7l4.855 5.395.656-.73c.796-.886 2.183-.886 2.977 0l.513.57V4H8z"})));break;case"gridicons-image-remove":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20.587 3.423L22 4.837 20 6.84V18c0 1.105-.895 2-2 2H6.84l-2.007 2.006-1.414-1.414 17.167-17.17zM12.42 14.42l1 1 1-1c.63-.504 1.536-.456 2.11.11L18 16V8.84l-5.58 5.58zM15.16 6H6v6.38l2.19-2.19 1.39 1.39L4 17.163V6c0-1.105.895-2 2-2h11.162l-2 2z"})));break;case"gridicons-image":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 6v12c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H6v6.38l2.19-2.19 5.23 5.23 1-1c.63-.504 1.536-.456 2.11.11L18 16V6zm-5 3.5c0-.828.672-1.5 1.5-1.5s1.5.672 1.5 1.5-.672 1.5-1.5 1.5-1.5-.672-1.5-1.5z"})));break;case"gridicons-indent-left":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 20h2V4h-2v16zM2 11h10.172l-2.086-2.086L11.5 7.5 16 12l-4.5 4.5-1.414-1.414L12.172 13H2v-2z"})));break;case"gridicons-indent-right":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 4H4v16h2V4zm16 9H11.828l2.086 2.086L12.5 16.5 8 12l4.5-4.5 1.414 1.414L11.828 11H22v2z"})));break;case"gridicons-info-outline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 9h-2V7h2v2zm0 2h-2v6h2v-6zm-1-7c-4.41 0-8 3.59-8 8s3.59 8 8 8 8-3.59 8-8-3.59-8-8-8m0-2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2z"})));break;case"gridicons-info":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"})));break;case"gridicons-ink":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M5 15c0 3.866 3.134 7 7 7s7-3.134 7-7c0-1.387-.41-2.677-1.105-3.765h.007L12 2l-5.903 9.235h.007C5.41 12.323 5 13.613 5 15z"})));break;case"gridicons-institution":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 19h20v3H2zM12 2L2 6v2h20V6M17 10h3v7h-3zM10.5 10h3v7h-3zM4 10h3v7H4z"})));break;case"gridicons-italic":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.536 5l-.427 2h1.5L9.262 18h-1.5l-.427 2h6.128l.426-2h-1.5l2.347-11h1.5l.427-2"})));break;case"gridicons-layout-blocks":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 7h-2V3c0-1.105-.895-2-2-2H7c-1.105 0-2 .895-2 2v2H3c-1.105 0-2 .895-2 2v4c0 1.105.895 2 2 2h2v8c0 1.105.895 2 2 2h10c1.105 0 2-.895 2-2v-2h2c1.105 0 2-.895 2-2V9c0-1.105-.895-2-2-2zm-4 14H7v-8h2c1.105 0 2-.895 2-2V7c0-1.105-.895-2-2-2H7V3h10v4h-2c-1.105 0-2 .895-2 2v8c0 1.105.895 2 2 2h2v2zm4-4h-6V9h6v8z"})));break;case"gridicons-layout":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 20H5c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2h3c1.105 0 2 .895 2 2v12c0 1.105-.895 2-2 2zm8-10h4c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2h-4c-1.105 0-2 .895-2 2v3c0 1.105.895 2 2 2zm5 10v-6c0-1.105-.895-2-2-2h-5c-1.105 0-2 .895-2 2v6c0 1.105.895 2 2 2h5c1.105 0 2-.895 2-2z"})));break;case"gridicons-line-graph":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v2H3zm3-3c1.1 0 2-.9 2-2 0-.5-.2-1-.5-1.3L8.8 10H9c.5 0 1-.2 1.3-.5l2.7 1.4v.1c0 1.1.9 2 2 2s2-.9 2-2c0-.5-.2-.9-.5-1.3L17.8 7h.2c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2c0 .5.2 1 .5 1.3L15.2 9H15c-.5 0-1 .2-1.3.5L11 8.2V8c0-1.1-.9-2-2-2s-2 .9-2 2c0 .5.2 1 .5 1.3L6.2 12H6c-1.1 0-2 .9-2 2s.9 2 2 2z"})));break;case"gridicons-link-break":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 11l-2 2H7v-2h3zm9.64-3.64L22 5l-1.5-1.5-17 17L5 22l9-9h3v-2h-1l2-2c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-1.623-.97-3.013-2.36-3.64zM4.36 16.64L6 15c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4v2c0 1.623.97 3.013 2.36 3.64z"})));break;case"gridicons-link":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 13H7v-2h10v2zm1-6h-1c-1.63 0-3.065.792-3.977 2H18c1.103 0 2 .897 2 2v2c0 1.103-.897 2-2 2h-4.977c.913 1.208 2.347 2 3.977 2h1c2.21 0 4-1.79 4-4v-2c0-2.21-1.79-4-4-4zM2 11v2c0 2.21 1.79 4 4 4h1c1.63 0 3.065-.792 3.977-2H6c-1.103 0-2-.897-2-2v-2c0-1.103.897-2 2-2h4.977C10.065 7.792 8.63 7 7 7H6c-2.21 0-4 1.79-4 4z"})));break;case"gridicons-list-checkmark":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9.5 15.5L5 20l-2.5-2.5 1.06-1.06L5 17.88l3.44-3.44L9.5 15.5zM10 5v2h11V5H10zm0 14h11v-2H10v2zm0-6h11v-2H10v2zM8.44 8.44L5 11.88l-1.44-1.44L2.5 11.5 5 14l4.5-4.5-1.06-1.06zm0-6L5 5.88 3.56 4.44 2.5 5.5 5 8l4.5-4.5-1.06-1.06z"})));break;case"gridicons-list-ordered-rtl":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h13v-2H3v2zm0-6h13v-2H3v2zm0-8v2h13V5H3zm16.587.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H19.97L18.5 4.915l.6.738.487-.4zm.448 7.826c.475-.426.785-.715.93-.867.146-.15.262-.296.35-.434.088-.138.153-.278.195-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608-.12-.18-.29-.32-.507-.417-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067-.177.045-.34.11-.49.195-.15.084-.337.225-.558.422l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.03.304.096.072.064.108.152.108.264 0 .09-.018.176-.054.258-.035.082-.1.18-.19.294-.093.114-.288.328-.587.64L18.547 13.3v.762h3.108v-.955h-1.62v-.03zm.46 4.747v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.175-.6-.263-1.043-.263-.308 0-.58.033-.817.1s-.47.178-.696.334l.48.774c.293-.184.576-.275.85-.275.147 0 .263.026.35.08.087.056.13.14.13.253 0 .3-.294.45-.882.45h-.27v.87h.264c.216 0 .392.017.526.05.135.03.232.08.293.143.06.064.09.154.09.27 0 .153-.058.265-.174.337-.116.07-.3.106-.555.106-.163 0-.342-.023-.537-.07-.194-.045-.385-.116-.573-.212v.96c.228.09.44.15.637.183.196.034.41.05.64.05.56 0 .998-.113 1.314-.342.316-.228.474-.542.474-.94.003-.585-.355-.923-1.07-1.013z"})));break;case"gridicons-list-ordered":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 19h13v-2H8v2zm0-6h13v-2H8v2zm0-8v2h13V5H8zm-4.425.252c.107-.096.197-.188.27-.275-.013.228-.02.48-.02.756V8h1.176V3.717H3.96L2.487 4.915l.6.738.487-.4zm.334 7.764c.474-.426.784-.715.93-.867.145-.153.26-.298.35-.436.087-.138.152-.278.194-.42.042-.143.063-.298.063-.466 0-.225-.06-.427-.18-.608s-.29-.32-.507-.417c-.218-.1-.465-.148-.742-.148-.22 0-.42.022-.596.067s-.34.11-.49.195c-.15.085-.337.226-.558.423l.636.744c.174-.15.33-.264.467-.34.138-.078.274-.117.41-.117.13 0 .232.032.304.097.073.064.11.152.11.264 0 .09-.02.176-.055.258-.036.082-.1.18-.192.294-.092.114-.287.328-.586.64L2.42 13.238V14h3.11v-.955H3.91v-.03zm.53 4.746v-.018c.306-.086.54-.225.702-.414.162-.19.243-.42.243-.685 0-.31-.126-.55-.378-.727-.252-.176-.6-.264-1.043-.264-.307 0-.58.033-.816.1s-.47.178-.696.334l.48.773c.293-.183.576-.274.85-.274.147 0 .263.027.35.082s.13.14.13.252c0 .3-.294.45-.882.45h-.27v.87h.264c.217 0 .393.017.527.05.136.03.233.08.294.143.06.064.09.154.09.27 0 .153-.057.265-.173.337-.115.07-.3.106-.554.106-.164 0-.343-.022-.538-.07-.194-.044-.385-.115-.573-.21v.96c.228.088.44.148.637.182.196.033.41.05.64.05.56 0 .998-.114 1.314-.343.315-.228.473-.542.473-.94.002-.585-.356-.923-1.07-1.013z"})));break;case"gridicons-list-unordered":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h12v-2H9v2zm0-6h12v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-location":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9c0-3.866-3.134-7-7-7S5 5.134 5 9c0 1.387.41 2.677 1.105 3.765h-.008C8.457 16.46 12 22 12 22l5.903-9.235h-.007C18.59 11.677 19 10.387 19 9zm-7 3c-1.657 0-3-1.343-3-3s1.343-3 3-3 3 1.343 3 3-1.343 3-3 3z"})));break;case"gridicons-lock":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-1V7c0-2.757-2.243-5-5-5S7 4.243 7 7v1H6c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V10c0-1.105-.895-2-2-2zM9 7c0-1.654 1.346-3 3-3s3 1.346 3 3v1H9V7zm4 8.723V18h-2v-2.277c-.595-.346-1-.984-1-1.723 0-1.105.895-2 2-2s2 .895 2 2c0 .738-.405 1.376-1 1.723z"})));break;case"gridicons-mail":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 4H4c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h16c1.105 0 2-.895 2-2V6c0-1.105-.895-2-2-2zm0 4.236l-8 4.882-8-4.882V6h16v2.236z"})));break;case"gridicons-mention":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 0 0 0 20v-2a8 8 0 1 1 8-8v.5a1.5 1.5 0 0 1-3 0V7h-2v1a5 5 0 1 0 1 7 3.5 3.5 0 0 0 6-2.46V12A10 10 0 0 0 12 2zm0 13a3 3 0 1 1 3-3 3 3 0 0 1-3 3z"})));break;case"gridicons-menu":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 6v2H3V6h18zM3 18h18v-2H3v2zm0-5h18v-2H3v2z"})));break;case"gridicons-menus":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 19h10v-2H9v2zm0-6h6v-2H9v2zm0-8v2h12V5H9zm-4-.5c-.828 0-1.5.672-1.5 1.5S4.172 7.5 5 7.5 6.5 6.828 6.5 6 5.828 4.5 5 4.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5zm0 6c-.828 0-1.5.672-1.5 1.5s.672 1.5 1.5 1.5 1.5-.672 1.5-1.5-.672-1.5-1.5-1.5z"})));break;case"gridicons-microphone":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 9v1a7 7 0 0 1-6 6.92V20h3v2H8v-2h3v-3.08A7 7 0 0 1 5 10V9h2v1a5 5 0 0 0 10 0V9zm-7 4a3 3 0 0 0 3-3V5a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3z"})));break;case"gridicons-minus-small":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 11h12v2H6z"})));break;case"gridicons-minus":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 11h18v2H3z"})));break;case"gridicons-money":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M2 5v14h20V5H2zm5 12c0-1.657-1.343-3-3-3v-4c1.657 0 3-1.343 3-3h10c0 1.657 1.343 3 3 3v4c-1.657 0-3 1.343-3 3H7zm5-8c1.1 0 2 1.3 2 3s-.9 3-2 3-2-1.3-2-3 .9-3 2-3z"})));break;case"gridicons-multiple-users":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M24 14.6c0 .6-1.2 1-2.6 1.2-.9-1.7-2.7-3-4.8-3.9.2-.3.4-.5.6-.8h.8c3.1-.1 6 1.8 6 3.5zM6.8 11H6c-3.1 0-6 1.9-6 3.6 0 .6 1.2 1 2.6 1.2.9-1.7 2.7-3 4.8-3.9l-.6-.9zm5.2 1c2.2 0 4-1.8 4-4s-1.8-4-4-4-4 1.8-4 4 1.8 4 4 4zm0 1c-4.1 0-8 2.6-8 5 0 2 8 2 8 2s8 0 8-2c0-2.4-3.9-5-8-5zm5.7-3h.3c1.7 0 3-1.3 3-3s-1.3-3-3-3c-.5 0-.9.1-1.3.3.8 1 1.3 2.3 1.3 3.7 0 .7-.1 1.4-.3 2zM6 10h.3C6.1 9.4 6 8.7 6 8c0-1.4.5-2.7 1.3-3.7C6.9 4.1 6.5 4 6 4 4.3 4 3 5.3 3 7s1.3 3 3 3z"})));break;case"gridicons-my-sites-horizon":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.986 13.928l.762-2.284-1.324-3.63c-.458-.026-.892-.08-.892-.08-.458-.027-.405-.727.054-.7 0 0 1.403.107 2.24.107.888 0 2.265-.107 2.265-.107.46-.027.513.646.055.7 0 0-.46.055-.973.082l2.006 5.966c-.875-.034-1.74-.053-2.6-.06l-.428-1.177-.403 1.17c-.252.002-.508.01-.76.015zm-7.156.393c-.21-.737-.33-1.514-.33-2.32 0-1.232.264-2.402.736-3.46l2.036 5.58c.85-.06 1.69-.104 2.526-.138L6.792 8.015c.512-.027.973-.08.973-.08.458-.055.404-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.036-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .674-.244 1.463-.572 2.51.3.02.604.043.907.066l.798-2.307c.486-1.212.647-2.18.647-3.043 0-.313-.02-.603-.057-.874.662 1.21 1.04 2.6 1.04 4.077 0 .807-.128 1.58-.34 2.32.5.05 1.006.112 1.51.17.205-.798.33-1.628.33-2.49 0-5.523-4.477-10-10-10S2 6.477 2 12c0 .862.125 1.692.33 2.49.5-.057 1.003-.12 1.5-.17zm14.638 3.168C16.676 19.672 14.118 20.5 12 20.5c-1.876 0-4.55-.697-6.463-3.012-.585.048-1.174.1-1.77.16C5.572 20.272 8.578 22 12 22c3.422 0 6.43-1.73 8.232-4.35-.593-.063-1.18-.114-1.764-.162zM12 15.01c-3.715 0-7.368.266-10.958.733.18.41.35.825.506 1.247 3.427-.43 6.91-.68 10.452-.68s7.025.25 10.452.68c.156-.422.327-.836.506-1.246-3.59-.467-7.243-.734-10.958-.734z"})));break;case"gridicons-my-sites":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM3.5 12c0-1.232.264-2.402.736-3.46L8.29 19.65C5.456 18.272 3.5 15.365 3.5 12zm8.5 8.5c-.834 0-1.64-.12-2.4-.345l2.55-7.41 2.613 7.157c.017.042.038.08.06.117-.884.31-1.833.48-2.823.48zm1.172-12.485c.512-.027.973-.08.973-.08.458-.055.404-.728-.054-.702 0 0-1.376.108-2.265.108-.835 0-2.24-.107-2.24-.107-.458-.026-.51.674-.053.7 0 0 .434.055.892.082l1.324 3.63-1.86 5.578-3.096-9.208c.512-.027.973-.08.973-.08.458-.055.403-.728-.055-.702 0 0-1.376.108-2.265.108-.16 0-.347-.003-.547-.01C6.418 5.025 9.03 3.5 12 3.5c2.213 0 4.228.846 5.74 2.232-.037-.002-.072-.007-.11-.007-.835 0-1.427.727-1.427 1.51 0 .7.404 1.292.835 1.993.323.566.7 1.293.7 2.344 0 .727-.28 1.572-.646 2.748l-.848 2.833-3.072-9.138zm3.1 11.332l2.597-7.506c.484-1.212.645-2.18.645-3.044 0-.313-.02-.603-.057-.874.664 1.21 1.042 2.6 1.042 4.078 0 3.136-1.7 5.874-4.227 7.347z"})));break;case"gridicons-nametag":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6a1 1 0 1 1-1 1 1 1 0 0 1 1-1zm-6 8h12v3H6zm14-8h-4V3H8v3H4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2zM10 5h4v5h-4zm10 14H4v-9h4a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2h4z"})));break;case"gridicons-next-page":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-8V6h8v2zm4-4v8l-6 6H8c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 0H8v12h6v-4c0-1.105.895-2 2-2h4V4zM4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6z"})));break;case"gridicons-not-visible":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M1 12s4.188-6 11-6c.947 0 1.84.12 2.678.322L8.36 12.64C8.133 12.14 8 11.586 8 11c0-.937.335-1.787.875-2.47C6.483 9.344 4.66 10.917 3.62 12c.68.707 1.696 1.62 2.98 2.398L5.15 15.85C2.498 14.13 1 12 1 12zm22 0s-4.188 6-11 6c-.946 0-1.836-.124-2.676-.323L5 22l-1.5-1.5 17-17L22 5l-3.147 3.147C21.5 9.87 23 12 23 12zm-2.615.006c-.678-.708-1.697-1.624-2.987-2.403L16 11c0 2.21-1.79 4-4 4l-.947.947c.31.03.624.053.947.053 3.978 0 6.943-2.478 8.385-3.994z"})));break;case"gridicons-notice-outline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 13h-2v2h2v-2zm-2-2h2l.5-6h-3l.5 6z"})));break;case"gridicons-notice":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-offline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10 3h8l-4 6h4L6 21l4-9H6l4-9"})));break;case"gridicons-pages":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8H8V6h8v2zm0 2H8v2h8v-2zm4-6v12l-6 6H6c-1.105 0-2-.895-2-2V4c0-1.105.895-2 2-2h12c1.105 0 2 .895 2 2zm-2 10V4H6v16h6v-4c0-1.105.895-2 2-2h4z"})));break;case"gridicons-pause":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1 14H9V8h2v8zm4 0h-2V8h2v8z"})));break;case"gridicons-pencil":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 6l5 5-9.507 9.507c-.686-.686-.69-1.794-.012-2.485l-.002-.003c-.69.676-1.8.673-2.485-.013-.677-.677-.686-1.762-.036-2.455l-.008-.008c-.694.65-1.78.64-2.456-.036L13 6zm7.586-.414l-2.172-2.172c-.78-.78-2.047-.78-2.828 0L14 5l5 5 1.586-1.586c.78-.78.78-2.047 0-2.828zM3 18v3h3c0-1.657-1.343-3-3-3z"})));break;case"gridicons-phone":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 2H8c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h8c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-3 19h-2v-1h2v1zm3-2H8V5h8v14z"})));break;case"gridicons-pin":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 17c0-2.038-1.188-3.836-3-4.92V5h.5c.828 0 1.5-.672 1.5-1.5S17.328 2 16.5 2h-9C6.672 2 6 2.672 6 3.5S6.672 5 7.5 5H8v7.08C6.188 13.164 5 14.962 5 17h6v4c0 .55.45 1 1 1s1-.45 1-1v-4h6z"})));break;case"gridicons-plans":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm-1 12H6l5-10v10zm2 6V10h5l-5 10z"})));break;case"gridicons-play":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm-2 14.5v-9l6 4.5z"})));break;case"gridicons-plugins":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 8V3c0-.552-.448-1-1-1s-1 .448-1 1v5h-4V3c0-.552-.448-1-1-1s-1 .448-1 1v5H5v4c0 2.79 1.637 5.193 4 6.317V22h6v-3.683c2.363-1.124 4-3.527 4-6.317V8h-3z"})));break;case"gridicons-plus-small":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 11h-5V6h-2v5H6v2h5v5h2v-5h5"})));break;case"gridicons-plus":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 13h-8v8h-2v-8H3v-2h8V3h2v8h8v2z"})));break;case"gridicons-popout":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6 7V5c0-1.105.895-2 2-2h11c1.105 0 2 .895 2 2v14c0 1.105-.895 2-2 2H8c-1.105 0-2-.895-2-2v-2h2v2h11V5H8v2H6zm5.5-.5l-1.414 1.414L13.172 11H3v2h10.172l-3.086 3.086L11.5 17.5 17 12l-5.5-5.5z"})));break;case"gridicons-posts":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 19H3v-2h13v2zm5-10H3v2h18V9zM3 5v2h11V5H3zm14 0v2h4V5h-4zm-6 8v2h10v-2H11zm-8 0v2h5v-2H3z"})));break;case"gridicons-print":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h6v2H9v-2zm13 1h-3v3c0 1.105-.895 2-2 2H7c-1.105 0-2-.895-2-2v-3H2V9c0-1.105.895-2 2-2h1V5c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2v2h1c1.105 0 2 .895 2 2v8zM7 7h10V5H7v2zm10 7H7v6h10v-6zm3-3.5c0-.828-.672-1.5-1.5-1.5s-1.5.672-1.5 1.5.672 1.5 1.5 1.5 1.5-.672 1.5-1.5z"})));break;case"gridicons-product-downloadable":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-6-10v5.17l2.59-2.58L17 14l-5 5-5-5 1.41-1.42L11 15.17V10h2z"})));break;case"gridicons-product-external":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zm-2-9v6h-2v-2.59l-3.29 3.29-1.41-1.41L13.59 13H11v-2h6z"})));break;case"gridicons-product-virtual":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM7 16.45c0-1.005.815-1.82 1.82-1.82h.09c-.335-1.59.68-3.148 2.27-3.483s3.148.68 3.483 2.27c.02.097.036.195.046.293 1.252-.025 2.29.97 2.314 2.224.017.868-.462 1.67-1.235 2.066H7.87c-.54-.33-.87-.917-.87-1.55z"})));break;case"gridicons-product":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 3H2v6h1v11c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V9h1V3zM4 5h16v2H4V5zm15 15H5V9h14v11zM9 11h6c0 1.105-.895 2-2 2h-2c-1.105 0-2-.895-2-2z"})));break;case"gridicons-quote":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M11.192 15.757c0-.88-.23-1.618-.69-2.217-.326-.412-.768-.683-1.327-.812-.55-.128-1.07-.137-1.54-.028-.16-.95.1-1.956.76-3.022.66-1.065 1.515-1.867 2.558-2.403L9.373 5c-.8.396-1.56.898-2.26 1.505-.71.607-1.34 1.305-1.9 2.094s-.98 1.68-1.25 2.69-.346 2.04-.217 3.1c.168 1.4.62 2.52 1.356 3.35.735.84 1.652 1.26 2.748 1.26.965 0 1.766-.29 2.4-.878.628-.576.94-1.365.94-2.368l.002.003zm9.124 0c0-.88-.23-1.618-.69-2.217-.326-.42-.77-.692-1.327-.817-.56-.124-1.074-.13-1.54-.022-.16-.94.09-1.95.75-3.02.66-1.06 1.514-1.86 2.557-2.4L18.49 5c-.8.396-1.555.898-2.26 1.505-.708.607-1.34 1.305-1.894 2.094-.556.79-.97 1.68-1.24 2.69-.273 1-.345 2.04-.217 3.1.165 1.4.615 2.52 1.35 3.35.732.833 1.646 1.25 2.742 1.25.967 0 1.768-.29 2.402-.876.627-.576.942-1.365.942-2.368v.01z"})));break;case"gridicons-read-more":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 12h6v-2H9zm-7 0h5v-2H2zm15 0h5v-2h-5zm3 2v2l-6 6H6a2 2 0 0 1-2-2v-6h2v6h6v-4a2 2 0 0 1 2-2h6zM4 8V4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v4h-2V4H6v4z"})));break;case"gridicons-reader-follow-conversation":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 14v-3h-2v3h-3v2h3v3h2v-3h3v-2"}),o.default.createElement("path",{d:"M13 16h-2l-5 5v-5H4c-1.1 0-2-.9-2-2V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2v4h-4v3h-3v4z"})));break;case"gridicons-reader-follow":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 16v2h-3v3h-2v-3h-3v-2h3v-3h2v3h3zM20 2v9h-4v3h-3v4H4c-1.1 0-2-.9-2-2V2h18zM8 13v-1H4v1h4zm3-3H4v1h7v-1zm0-2H4v1h7V8zm7-4H4v2h14V4z"})));break;case"gridicons-reader-following-conversation":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16.8 14.5l3.2-3.2V5c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h2v5l8.7-8.7 2.1 2.2z"}),o.default.createElement("path",{d:"M22.6 11.1l-6.1 6.1-2.1-2.2-1.4 1.4 3.5 3.6 7.5-7.6"})));break;case"gridicons-reader-following":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23 13.482L15.508 21 12 17.4l1.412-1.388 2.106 2.188 6.094-6.094L23 13.482zm-7.455 1.862L20 10.89V2H2v14c0 1.1.9 2 2 2h4.538l4.913-4.832 2.095 2.176zM8 13H4v-1h4v1zm3-2H4v-1h7v1zm0-2H4V8h7v1zm7-3H4V4h14v2z"})));break;case"gridicons-reader":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 4v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4H3zm7 11H5v-1h5v1zm2-2H5v-1h7v1zm0-2H5v-1h7v1zm7 4h-5v-5h5v5zm0-7H5V6h14v2z"})));break;case"gridicons-reblog":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22.086 9.914L20 7.828V18c0 1.105-.895 2-2 2h-7v-2h7V7.828l-2.086 2.086L14.5 8.5 19 4l4.5 4.5-1.414 1.414zM6 16.172V6h7V4H6c-1.105 0-2 .895-2 2v10.172l-2.086-2.086L.5 15.5 5 20l4.5-4.5-1.414-1.414L6 16.172z"})));break;case"gridicons-redo":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 6v3.586L14.343 5.93C13.17 4.756 11.636 4.17 10.1 4.17s-3.07.585-4.242 1.757c-2.343 2.342-2.343 6.14 0 8.484l5.364 5.364 1.414-1.414L7.272 13c-1.56-1.56-1.56-4.097 0-5.657.755-.755 1.76-1.172 2.828-1.172 1.068 0 2.073.417 2.828 1.173L16.586 11H13v2h7V6h-2z"})));break;case"gridicons-refresh":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17.91 14c-.478 2.833-2.943 5-5.91 5-3.308 0-6-2.692-6-6s2.692-6 6-6h2.172l-2.086 2.086L13.5 10.5 18 6l-4.5-4.5-1.414 1.414L14.172 5H12c-4.418 0-8 3.582-8 8s3.582 8 8 8c4.08 0 7.438-3.055 7.93-7h-2.02z"})));break;case"gridicons-refund":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13.91 2.91L11.83 5H14c4.418 0 8 3.582 8 8h-2c0-3.314-2.686-6-6-6h-2.17l2.09 2.09-1.42 1.41L8 6l1.41-1.41L12.5 1.5l1.41 1.41zM2 12v10h16V12H2zm2 6.56v-3.11c.6-.35 1.1-.85 1.45-1.45h9.1c.35.6.85 1.1 1.45 1.45v3.11c-.593.35-1.085.845-1.43 1.44H5.45c-.35-.597-.85-1.094-1.45-1.44zm6 .44c.828 0 1.5-.895 1.5-2s-.672-2-1.5-2-1.5.895-1.5 2 .672 2 1.5 2z"})));break;case"gridicons-reply":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M9 16h7.2l-2.6 2.6L15 20l5-5-5-5-1.4 1.4 2.6 2.6H9c-2.2 0-4-1.8-4-4s1.8-4 4-4h2V4H9c-3.3 0-6 2.7-6 6s2.7 6 6 6z"})));break;case"gridicons-resize":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M13 4v2h3.59L6 16.59V13H4v7h7v-2H7.41L18 7.41V11h2V4h-7"})));break;case"gridicons-rotate":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 14v6c0 1.105-.895 2-2 2H6c-1.105 0-2-.895-2-2v-6c0-1.105.895-2 2-2h10c1.105 0 2 .895 2 2zM13.914 2.914L11.828 5H14c4.418 0 8 3.582 8 8h-2c0-3.308-2.692-6-6-6h-2.172l2.086 2.086L12.5 10.5 8 6l1.414-1.414L12.5 1.5l1.414 1.414z"})));break;case"gridicons-scheduled":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M10.498 18l-3.705-3.704 1.415-1.415 2.294 2.295 5.293-5.293 1.415 1.415L10.498 18zM21 6v13c0 1.104-.896 2-2 2H5c-1.104 0-2-.896-2-2V6c0-1.104.896-2 2-2h1V2h2v2h8V2h2v2h1c1.104 0 2 .896 2 2zm-2 2H5v11h14V8z"})));break;case"gridicons-search":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"})));break;case"gridicons-share-computer":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6v2H7v2h10v-2h-3v-2h6a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 14H4V4h16zm-3.25-3a1.75 1.75 0 0 1-3.5 0L10 11.36a1.71 1.71 0 1 1 0-2.71L13.25 7a1.77 1.77 0 1 1 .68 1.37L10.71 10l3.22 1.61A1.74 1.74 0 0 1 16.75 13z"})));break;case"gridicons-share-ios":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 8h2c1.105 0 2 .895 2 2v9c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2v-9c0-1.105.895-2 2-2h2v2H5v9h14v-9h-2V8zM6.5 5.5l1.414 1.414L11 3.828V14h2V3.828l3.086 3.086L17.5 5.5 12 0 6.5 5.5z"})));break;case"gridicons-share":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 16c-.788 0-1.5.31-2.034.807L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.048 4.118c-.053.223-.088.453-.088.692 0 1.657 1.343 3 3 3s3-1.343 3-3-1.343-3-3-3z"})));break;case"gridicons-shipping":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 8h-2V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10h2c0 1.657 1.343 3 3 3s3-1.343 3-3h4c0 1.657 1.343 3 3 3s3-1.343 3-3h2v-5l-4-4zM7 18.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5zM4 14V7h10v7H4zm13 4.5c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5z"})));break;case"gridicons-shutter":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.9 4.8s-.7 5.6-3.5 10.2c1.7-.3 3.9-.9 6.6-2 0 0 .7-4.6-3.1-8.2zm-6 2.8c-1.1-1.3-2.7-3-5-4.7C5.1 4.2 3 6.6 2.3 9.6 7 7.7 11 7.5 12.9 7.6zm3.4 2.9c.6-1.6 1.2-3.9 1.6-6.7-4.1-3-8.6-1.5-8.6-1.5s4.4 3.4 7 8.2zm-5.2 6c1.1 1.3 2.7 3 5 4.7 0 0 4.3-1.6 5.6-6.7 0-.1-5.3 2.1-10.6 2zm-3.4-3.1c-.6 1.6-1.2 3.8-1.5 6.7 0 0 3.6 2.9 8.6 1.5 0 0-4.6-3.4-7.1-8.2zM2 11.1s-.7 4.5 3.1 8.2c0 0 .7-5.7 3.5-10.3-1.7.3-4 .9-6.6 2.1z"})));break;case"gridicons-sign-out":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M16 17v2c0 1.105-.895 2-2 2H5c-1.105 0-2-.895-2-2V5c0-1.105.895-2 2-2h9c1.105 0 2 .895 2 2v2h-2V5H5v14h9v-2h2zm2.5-10.5l-1.414 1.414L20.172 11H10v2h10.172l-3.086 3.086L18.5 17.5 24 12l-5.5-5.5z"})));break;case"gridicons-spam":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 2H7L2 7v10l5 5h10l5-5V7l-5-5zm-4 15h-2v-2h2v2zm0-4h-2l-.5-6h3l-.5 6z"})));break;case"gridicons-speaker":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 8v6c1.7 0 3-1.3 3-3s-1.3-3-3-3zM11 7H4c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h1v3c0 1.1.9 2 2 2h2v-5h2l4 4h2V3h-2l-4 4z"})));break;case"gridicons-special-character":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12.005 7.418c-1.237 0-2.19.376-2.86 1.128s-1.005 1.812-1.005 3.18c0 1.387.226 2.513.677 3.377.45.865 1.135 1.543 2.05 2.036V20H5v-2.666h3.12c-1.04-.636-1.842-1.502-2.405-2.6-.564-1.097-.846-2.322-.846-3.676 0-1.258.29-2.363.875-3.317.585-.952 1.417-1.685 2.497-2.198s2.334-.77 3.763-.77c2.18 0 3.915.572 5.204 1.713s1.932 2.673 1.932 4.594c0 1.353-.283 2.57-.852 3.65-.567 1.08-1.38 1.947-2.44 2.603H19V20h-5.908v-2.86c.95-.493 1.65-1.18 2.102-2.062s.677-2.006.677-3.374c0-1.36-.336-2.415-1.01-3.164-.672-.747-1.624-1.122-2.855-1.122z"})));break;case"gridicons-star-outline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6.308l1.176 3.167.347.936.997.042 3.374.14-2.647 2.09-.784.62.27.963.91 3.25-2.813-1.872-.83-.553-.83.552-2.814 1.87.91-3.248.27-.962-.783-.62-2.648-2.092 3.374-.14.996-.04.347-.936L12 6.308M12 2L9.418 8.953 2 9.257l5.822 4.602L5.82 21 12 16.89 18.18 21l-2.002-7.14L22 9.256l-7.418-.305L12 2z"})));break;case"gridicons-star":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2l2.582 6.953L22 9.257l-5.822 4.602L18.18 21 12 16.89 5.82 21l2.002-7.14L2 9.256l7.418-.304"})));break;case"gridicons-stats-alt":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-7h-4v14h4V3zm6 3h-4v11h4V6z"})));break;case"gridicons-stats-down-alt":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 3H4v14h4V3zm6 3h-4v11h4V6zm6 4h-4v7h4v-7z"})));break;case"gridicons-stats-down":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7V7h2v10zm4 0h-2v-7h2v7zm4 0h-2v-5h2v5z"})));break;case"gridicons-stats-up-alt":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M21 21H3v-2h18v2zM8 10H4v7h4v-7zm6-4h-4v11h4V6zm6-3h-4v14h4V3z"})));break;case"gridicons-stats-up":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2v-7h2v7zm4 0h-2V7h2v10z"})));break;case"gridicons-stats":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19 3H5c-1.105 0-2 .895-2 2v14c0 1.105.895 2 2 2h14c1.105 0 2-.895 2-2V5c0-1.105-.895-2-2-2zm0 16H5V5h14v14zM9 17H7v-5h2v5zm4 0h-2V7h2v10zm4 0h-2v-7h2v7z"})));break;case"gridicons-status":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zM7.55 13c-.02.166-.05.33-.05.5 0 2.485 2.015 4.5 4.5 4.5s4.5-2.015 4.5-4.5c0-.17-.032-.334-.05-.5h-8.9zM10 10V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1zm6 0V8c0-.552-.448-1-1-1s-1 .448-1 1v2c0 .552.448 1 1 1s1-.448 1-1z"})));break;case"gridicons-strikethrough":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"})));break;case"gridicons-sync":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M23.5 13.5l-3.086 3.086L19 18l-4.5-4.5 1.414-1.414L18 14.172V12c0-3.308-2.692-6-6-6V4c4.418 0 8 3.582 8 8v2.172l2.086-2.086L23.5 13.5zM6 12V9.828l2.086 2.086L9.5 10.5 5 6 3.586 7.414.5 10.5l1.414 1.414L4 9.828V12c0 4.418 3.582 8 8 8v-2c-3.308 0-6-2.692-6-6z"})));break;case"gridicons-tablet":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 2H6c-1.104 0-2 .896-2 2v16c0 1.104.896 2 2 2h12c1.104 0 2-.896 2-2V4c0-1.104-.896-2-2-2zm-5 19h-2v-1h2v1zm5-2H6V5h12v14z"})));break;case"gridicons-tag":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M20 2.007h-7.087c-.53 0-1.04.21-1.414.586L2.592 11.5c-.78.78-.78 2.046 0 2.827l7.086 7.086c.78.78 2.046.78 2.827 0l8.906-8.906c.376-.374.587-.883.587-1.413V4.007c0-1.105-.895-2-2-2zM17.007 9c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"})));break;case"gridicons-text-color":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 19h18v3H3v-3zM15.82 17h3.424L14 3h-4L4.756 17H8.18l1.067-3.5h5.506L15.82 17zm-1.952-6h-3.73l1.868-5.725L13.868 11z"})));break;case"gridicons-themes":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 6c-1.105 0-2 .895-2 2v12c0 1.1.9 2 2 2h12c1.105 0 2-.895 2-2H4V6zm16-4H8c-1.105 0-2 .895-2 2v12c0 1.105.895 2 2 2h12c1.105 0 2-.895 2-2V4c0-1.105-.895-2-2-2zm-5 14H8V9h7v7zm5 0h-3V9h3v7zm0-9H8V4h12v3z"})));break;case"gridicons-thumbs-up":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.7 22H2v-9h2l2.7 9zM20 9h-6V5c0-1.657-1.343-3-3-3h-1v4L7.1 9.625c-.712.89-1.1 1.996-1.1 3.135V14l2.1 7h8.337c1.836 0 3.435-1.25 3.88-3.03l1.622-6.485C22.254 10.223 21.3 9 20 9z"})));break;case"gridicons-time":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm3.8 13.4L13 11.667V7h-2v5.333l3.2 4.266 1.6-1.2z"})));break;case"gridicons-trash":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M6.187 8h11.625l-.695 11.125C17.05 20.18 16.177 21 15.12 21H8.88c-1.057 0-1.93-.82-1.997-1.875L6.187 8zM19 5v2H5V5h3V4c0-1.105.895-2 2-2h4c1.105 0 2 .895 2 2v1h3zm-9 0h4V4h-4v1z"})));break;case"gridicons-trophy":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18 5.062V3H6v2.062H2V8c0 2.525 1.89 4.598 4.324 4.932.7 2.058 2.485 3.61 4.676 3.978V18c0 1.105-.895 2-2 2H8v2h8v-2h-1c-1.105 0-2-.895-2-2v-1.09c2.19-.368 3.976-1.92 4.676-3.978C20.11 12.598 22 10.525 22 8V5.062h-4zM4 8v-.938h2v3.766C4.836 10.416 4 9.304 4 8zm16 0c0 1.304-.836 2.416-2 2.83V7.06h2V8z"})));break;case"gridicons-types":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M22 17c0 2.76-2.24 5-5 5s-5-2.24-5-5 2.24-5 5-5 5 2.24 5 5zM6.5 6.5h3.8L7 1 1 11h5.5V6.5zm9.5 4.085V8H8v8h2.585c.433-2.783 2.632-4.982 5.415-5.415z"})));break;case"gridicons-underline":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M4 19v2h16v-2H4zM18 3v8c0 3.314-2.686 6-6 6s-6-2.686-6-6V3h3v8c0 1.654 1.346 3 3 3s3-1.346 3-3V3h3z"})));break;case"gridicons-undo":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M18.142 5.93C16.97 4.756 15.435 4.17 13.9 4.17s-3.072.586-4.244 1.757L6 9.585V6H4v7h7v-2H7.414l3.657-3.657c.756-.755 1.76-1.172 2.83-1.172 1.067 0 2.072.417 2.827 1.173 1.56 1.56 1.56 4.097 0 5.657l-5.364 5.364 1.414 1.414 5.364-5.364c2.345-2.343 2.345-6.142.002-8.485z"})));break;case"gridicons-user-add":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("circle",{cx:"15",cy:"8",r:"4"}),o.default.createElement("path",{d:"M15 20s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2zM6 10V7H4v3H1v2h3v3h2v-3h3v-2z"})));break;case"gridicons-user-circle":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm0 18.5c-4.694 0-8.5-3.806-8.5-8.5S7.306 3.5 12 3.5s8.5 3.806 8.5 8.5-3.806 8.5-8.5 8.5zm0-8c-3.038 0-5.5 1.728-5.5 3.5s2.462 3.5 5.5 3.5 5.5-1.728 5.5-3.5-2.462-3.5-5.5-3.5zm0-.5c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z"})));break;case"gridicons-user":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 4c2.21 0 4 1.79 4 4s-1.79 4-4 4-4-1.79-4-4 1.79-4 4-4zm0 16s8 0 8-2c0-2.4-3.9-5-8-5s-8 2.6-8 5c0 2 8 2 8 2z"})));break;case"gridicons-video-camera":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M17 9V7c0-1.105-.895-2-2-2H4c-1.105 0-2 .895-2 2v10c0 1.105.895 2 2 2h11c1.105 0 2-.895 2-2v-2l5 4V5l-5 4z"})));break;case"gridicons-video-remove":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.42 4.59l1.167-1.167L22 4.837 20 6.84V18c0 1.105-.895 2-2 2v-2h-2v2H6.84l-2.007 2.006-1.414-1.414 1.17-1.172-.01-.01L8 16 18 6l1.41-1.42.01.01zM15.84 11H18V8.84L15.84 11zM16 8.01l.01-.01H16v.01zM6 15.17l-2 2V6c0-1.105.895-2 2-2v2h2V4h9.17l-9 9H6v2.17zM6 8v3h2V8H6zm12 8v-3h-2v3h2z"})));break;case"gridicons-video":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M8 4h8v1.997h2V4c1.105 0 2 .896 2 2v12c0 1.104-.895 2-2 2v-2.003h-2V20H8v-2.003H6V20c-1.105 0-2-.895-2-2V6c0-1.105.895-2 2-2v1.997h2V4zm2 11l4.5-3L10 9v6zm8 .997v-3h-2v3h2zm0-5v-3h-2v3h2zm-10 5v-3H6v3h2zm0-5v-3H6v3h2z"})));break;case"gridicons-visible":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M12 6C5.188 6 1 12 1 12s4.188 6 11 6 11-6 11-6-4.188-6-11-6zm0 10c-3.943 0-6.926-2.484-8.38-4 1.04-1.085 2.863-2.657 5.255-3.47C8.335 9.214 8 10.064 8 11c0 2.21 1.79 4 4 4s4-1.79 4-4c0-.937-.335-1.787-.875-2.47 2.393.813 4.216 2.386 5.254 3.47-1.456 1.518-4.438 4-8.38 4z"})));break;case"gridicons-zoom-in":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M15.8 13.8c.7-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7 3.1 7 7 7c1.4 0 2.7-.4 3.8-1.2L19 21l2-2-5.2-5.2zM10 15c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z"}),o.default.createElement("path",{d:"M11 7H9v2H7v2h2v2h2v-2h2V9h-2"})));break;case"gridicons-zoom-out":p=o.default.createElement("svg",r({className:f,height:t,width:t,onClick:a},i,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M3 10c0 3.9 3.1 7 7 7 1.4 0 2.7-.5 3.8-1.2L19 21l2-2-5.2-5.2c.8-1.1 1.2-2.4 1.2-3.8 0-3.9-3.1-7-7-7s-7 3.1-7 7zm2 0c0-2.8 2.2-5 5-5s5 2.2 5 5-2.2 5-5 5-5-2.2-5-5z"}),o.default.createElement("path",{d:"M7 9h6v2H7z"})))}return p}}]),t}();p.defaultProps={size:24},p.propTypes={icon:i.default.string.isRequired,size:i.default.number,onClick:i.default.func,className:i.default.string},t.default=p,e.exports=t.default},87:function(e,t,a){var r=a(143)("wks"),n=a(142),c=a(92).Symbol,o="function"==typeof c;(e.exports=function(e){return r[e]||(r[e]=o&&c[e]||(o?c:n)("Symbol."+e))}).store=r},92:function(e,t){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},93:function(e,t){var a=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=a)}}]);
 
build/product-best-sellers.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-best-sellers"]=function(e){function t(t){for(var r,s,a=t[0],i=t[1],u=t[2],b=0,d=[];b<a.length;b++)s=a[b],n[s]&&d.push(n[s][0]),n[s]=0;for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,a=1;a<o.length;a++){var i=o[a];0!==n[i]&&(r=!1)}r&&(c.splice(t--,1),e=s(s.s=o[0]))}return e}var r={},n={8:0},c=[];function s(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,s),o.l=!0,o.exports}s.m=e,s.c=r,s.d=function(e,t,o){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(s.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)s.d(o,r,function(t){return e[t]}.bind(null,r));return o},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=a.push.bind(a);a.push=t,a=a.slice();for(var u=0;u<a.length;u++)t(a[u]);var l=i;return c.push([544,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},35:function(e,t){!function(){e.exports=this.wp.url}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},38:function(e,t){!function(){e.exports=this.wp.keycodes}()},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(15),n=o.n(r),c=o(0),s=o(1),a=o(5),i=o.n(a),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,a=o.price,i=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product title","woo-gutenberg-products-block"),help:l?Object(s.__)("Product title is visible.","woo-gutenberg-products-block"):Object(s.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product price","woo-gutenberg-products-block"),help:a?Object(s.__)("Product price is visible.","woo-gutenberg-products-block"):Object(s.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(n()({},o,{price:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product rating","woo-gutenberg-products-block"),help:i?Object(s.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(s.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{rating:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(s.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(s.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:i.a.shape({button:i.a.bool.isRequired,price:i.a.bool.isRequired,title:i.a.bool.isRequired}).isRequired,onChange:i.a.func.isRequired},t.a=l},42:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),s=o(59),a=o.n(s);o.d(t,"a",function(){return i});var i=function(e){return function(t){var o=t.attributes,n=o.align,s=o.contentVisibility,i=c()(n?"align".concat(n):"",{"is-hidden-title":!s.title,"is-hidden-price":!s.price,"is-hidden-rating":!s.rating,"is-hidden-button":!s.button});return Object(r.createElement)(r.RawHTML,{className:i},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,s=o.catOperator,i=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),s&&"all"===s&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),i&&("price_desc"===i?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===i?(d.set("orderby","price"),d.set("order","ASC")):"date"===i?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",i)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=a()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){m=!0,f=e}finally{try{g||null==h.return||h.return()}finally{if(m)throw f}}return p+="]"}(t,e))}}},46:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),s=o(5),a=o.n(s),i=o(3),u=function(e){var t=e.columns,o=e.rows,s=e.setAttributes;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);s({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(i.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);s({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}))};u.propTypes={columns:a.a.oneOfType([a.a.number,a.a.string]).isRequired,rows:a.a.oneOfType([a.a.number,a.a.string]).isRequired,setAttributes:a.a.func.isRequired},t.a=u},50:function(e,t){!function(){e.exports=this.ReactDOM}()},51:function(e,t){!function(){e.exports=this.wp.viewport}()},52:function(e,t,o){"use strict";var r=o(53),n=o.n(r),c=o(22),s=o.n(c),a=o(23),i=o.n(a),u=o(24),l=o.n(u),b=o(25),d=o.n(b),p=o(33),g=o.n(p),m=o(26),f=o.n(m),_=o(0),h=o(1),w=o(35),O=o(17),j=o.n(O),y=o(4),k=o(5),v=o.n(k),C=o(37),x=o(3),E=(o(113),function(e){function t(){var e;return s()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return f()(t,e),i()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc-blocks/v1/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,s=["woocommerce-product-categories__item"];o.length&&s.push("is-searching"),0===c&&0!==t.parent&&s.push("is-skip-level");var a=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:s.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),a,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,s=r.operator,a=r.selected,i={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:a.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:i,isHierarchical:!0}),!!c&&Object(_.createElement)("div",{className:a.length<2?"screen-reader-text":""},Object(_.createElement)(x.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:s,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));E.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired},E.defaultProps={operator:"any"},t.a=E},544:function(e,t,o){"use strict";o.r(t);var r=o(15),n=o.n(r),c=o(0),s=o(1),a=o(27),i=o(4),u=o(74),l=o.n(u),b=o(22),d=o.n(b),p=o(23),g=o.n(p),m=o(24),f=o.n(m),_=o(25),h=o.n(_),w=o(26),O=o.n(w),j=o(3),y=o(18),k=o(5),v=o.n(k),C=o(41),x=o(46),E=o(52),P=function(e){function t(){return d()(this,t),f()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,a=t.columns,i=t.contentVisibility,u=t.rows;return Object(c.createElement)(y.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(x.a,{columns:a,rows:u,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:i,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:r,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id});o({categories:e})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(y.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);P.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var R=P,S=o(42),A=o(36);Object(a.registerBlockType)("woocommerce/product-best-sellers",{title:Object(s.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"stats-up-alt"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display a grid of your all-time best selling products.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:n()({},A.a),transforms:{from:[{type:"block",blocks:Object(i.without)(A.b,"woocommerce/product-best-sellers"),transform:function(e){return Object(a.createBlock)("woocommerce/product-best-sellers",e)}}]},deprecated:[{attributes:A.a,save:Object(S.a)("woocommerce/product-best-sellers")}],edit:function(e){return Object(c.createElement)(R,e)},save:function(){return null}})},65:function(e,t){!function(){e.exports=this.wp.hooks}()},67:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},68:function(e,t){!function(){e.exports=this.wp.date}()},76:function(e,t){!function(){e.exports=this.wp.dom}()},8:function(e,t){!function(){e.exports=this.moment}()},80:function(e,t){},81:function(e,t){},83:function(e,t){},84:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-best-sellers"]=function(e){function t(t){for(var r,s,i=t[0],a=t[1],u=t[2],b=0,d=[];b<i.length;b++)s=i[b],n[s]&&d.push(n[s][0]),n[s]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var a=o[i];0!==n[a]&&(r=!1)}r&&(c.splice(t--,1),e=s(s.s=o[0]))}return e}var r={},n={7:0},c=[];function s(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,s),o.l=!0,o.exports}s.m=e,s.c=r,s.d=function(e,t,o){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(s.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)s.d(o,r,function(t){return e[t]}.bind(null,r));return o},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=a;return c.push([519,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},29:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var r=o(8),n=o.n(r),c=o(0),s=o(1),i=o(4),a=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,a=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product title","woo-gutenberg-products-block"),help:l?Object(s.__)("Product title is visible.","woo-gutenberg-products-block"):Object(s.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product price","woo-gutenberg-products-block"),help:i?Object(s.__)("Product price is visible.","woo-gutenberg-products-block"):Object(s.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(s.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(s.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(n()({},o,{rating:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(s.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(s.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(s.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:a.a.shape({button:a.a.bool.isRequired,price:a.a.bool.isRequired,rating:a.a.bool.isRequired,title:a.a.bool.isRequired}).isRequired,onChange:a.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),s=o(4),i=o.n(s),a=o(3),u=function(e){var t=e.columns,o=e.rows,s=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);s({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(a.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);s({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(a.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return s({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},35:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),s=o(48),i=o.n(s);o.d(t,"a",function(){return a});var a=function(e){return function(t){var o=t.attributes,n=o.align,s=o.contentVisibility,a=c()(n?"align".concat(n):"",{"is-hidden-title":!s.title,"is-hidden-price":!s.price,"is-hidden-rating":!s.rating,"is-hidden-button":!s.button});return Object(r.createElement)(r.RawHTML,{className:a},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,s=o.catOperator,a=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),s&&"all"===s&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),a&&("price_desc"===a?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===a?(d.set("orderby","price"),d.set("order","ASC")):"date"===a?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",a)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){m=!0,f=e}finally{try{g||null==h.return||h.return()}finally{if(m)throw f}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var r=o(27),n=o.n(r),c=o(13),s=o.n(c),i=o(14),a=o.n(i),u=o(15),l=o.n(u),b=o(16),d=o.n(b),p=o(12),g=o.n(p),m=o(17),f=o.n(m),_=o(0),h=o(1),w=o(19),O=o(10),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(24),x=o(3),E=(o(79),function(e){function t(){var e;return s()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return f()(t,e),a()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,s=["woocommerce-product-categories__item"];o.length&&s.push("is-searching"),0===c&&0!==t.parent&&s.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:s.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,s=r.operator,i=r.selected,a=r.isSingle,u={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:a}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(x.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:s,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));E.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},E.defaultProps={operator:"any",isSingle:!1},t.a=E},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},519:function(e,t,o){"use strict";o.r(t);var r=o(8),n=o.n(r),c=o(0),s=o(1),i=o(18),a=o(5),u=o(25),l=o.n(u),b=o(13),d=o.n(b),p=o(14),g=o.n(p),m=o(15),f=o.n(m),_=o(16),h=o.n(_),w=o(17),O=o.n(w),j=o(3),k=o(9),y=o(4),v=o.n(y),C=o(31),x=o(34),E=o(37),P=function(e){function t(){return d()(this,t),f()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,a=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(x.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:a,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(s.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);P.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var R=P,S=o(35),B=o(30);Object(i.registerBlockType)("woocommerce/product-best-sellers",{title:Object(s.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"stats-up-alt"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display a grid of your all-time best selling products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:n()({},B.a),transforms:{from:[{type:"block",blocks:Object(a.without)(B.b,"woocommerce/product-best-sellers"),transform:function(e){return Object(i.createBlock)("woocommerce/product-best-sellers",e)}}]},deprecated:[{attributes:B.a,save:Object(S.a)("woocommerce/product-best-sellers")}],edit:function(e){return Object(c.createElement)(R,e)},save:function(){return null}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/product-categories.deps.json CHANGED
@@ -1 +1 @@
1
- ["lodash","wp-blocks","wp-components","wp-compose","wp-editor","wp-element","wp-i18n","wp-polyfill"]
1
+ ["lodash","react","wp-blocks","wp-components","wp-compose","wp-editor","wp-element","wp-i18n","wp-polyfill"]
build/product-categories.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],d=0,b=[];d<i.length;d++)a=i[d],c[a]&&b.push(c[a][0]),c[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(e[n]=l[n]);for(u&&u(t);b.length;)b.shift()();return o.push.apply(o,s||[]),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 l=r[i];0!==c[l]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={9:0},o=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],l=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var u=l;return o.push([546,1,2,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},114:function(e,t,r){"use strict";var n=r(22),c=r.n(n),o=r(23),a=r.n(o),i=r(24),l=r.n(i),s=r(25),u=r.n(s),d=r(33),b=r.n(d),p=r(26),h=r.n(p),g=r(0),m=r(1),f=r(6),w=r.n(f),v=r(3),O=r(4),j=r(5),_=r.n(j),y=r(30),E=r(77),k=r.n(E),C=r(15),x=r.n(C);function z(e){var t=e.hasEmpty,r=e.isHierarchical,n=wc_product_block_data.productCategories.filter(function(e){return t||!!e.count});return r?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=Object(O.groupBy)(e,"parent"),r=function e(r){return r.map(function(r){var n=t[r.term_id];return delete t[r.term_id],x()({},r,{children:n&&n.length?e(n):[]})})},n=r(t[0]||[]);return delete t[0],Object(O.forEach)(t,function(e){n.push.apply(n,k()(r(e||[])))}),n}(n):n}var N=function(e){function t(){var e;return c()(this,t),(e=l()(this,u()(t).apply(this,arguments))).select=Object(g.createRef)(),e.onNavigate=e.onNavigate.bind(b()(e)),e.renderList=e.renderList.bind(b()(e)),e.renderOptions=e.renderOptions.bind(b()(e)),e}return h()(t,e),a()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,r=this.select.current.value;if("false"!==r){var n=wc_product_block_data.homeUrl;t||0!==r.indexOf(n)||(document.location.href=r)}}},{key:"renderList",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.isPreview,c=void 0!==n&&n,o=this.props.attributes.hasCount,a="parent-"+e[0].term_id;return Object(g.createElement)("ul",{key:a},e.map(function(e){var n=o?Object(g.createElement)("span",null,"(",e.count,")"):null;return[Object(g.createElement)("li",{key:e.term_id},Object(g.createElement)("a",{href:c?null:e.link},e.name)," ",n," "),!!e.children&&!!e.children.length&&t.renderList(e.children,r+1)]}))}},{key:"renderOptions",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.props.attributes.hasCount;return e.map(function(e){var c=n?"(".concat(e.count,")"):null;return[Object(g.createElement)("option",{key:e.term_id,value:e.link},Object(O.repeat)("–",r)," ",e.name," ",c),!!e.children&&!!e.children.length&&t.renderOptions(e.children,r+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.instanceId,n=t.className,c=t.isDropdown,o=z(t),a=w()("wc-block-product-categories",n,{"is-dropdown":c,"is-list":!c}),i="prod-categories-".concat(r);return Object(g.createElement)("div",{className:a},c?Object(g.createElement)(g.Fragment,null,Object(g.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(g.createElement)("label",{className:"screen-reader-text",htmlFor:i},Object(m.__)("Select a category","woo-gutenberg-products-block")),Object(g.createElement)("select",{id:i,ref:this.select},Object(g.createElement)("option",{value:"false",hidden:!0},Object(m.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(o))),Object(g.createElement)(v.IconButton,{icon:"arrow-right-alt2",label:Object(m.__)("Go to category","woo-gutenberg-products-block"),onClick:this.onNavigate})):this.renderList(o))}}]),t}(g.Component);N.propTypes={attributes:_.a.object.isRequired,instanceId:_.a.number,isPreview:_.a.bool};t.a=Object(y.withInstanceId)(N)},18:function(e,t){!function(){e.exports=this.wp.editor}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},285:function(e,t,r){var n=r(530);"string"==typeof n&&(n=[[e.i,n,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};r(66)(n,c);n.locals&&(e.exports=n.locals)},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},4:function(e,t){!function(){e.exports=this.lodash}()},530:function(e,t,r){},546:function(e,t,r){"use strict";r.r(t);var n=r(53),c=r.n(n),o=r(0),a=r(1),i=r(27),l=(r(285),r(531),r(18)),s=r(3),u=r(114),d=r(61);Object(i.registerBlockType)("woocommerce/product-categories",{title:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(d.a,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show your product categories as a list or dropdown.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},edit:function(e){var t=e.attributes,r=e.setAttributes,n=t.hasCount,c=t.hasEmpty,i=t.isDropdown,d=t.isHierarchical;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(l.InspectorControls,{key:"inspector"},Object(o.createElement)(s.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show as dropdown","woo-gutenberg-products-block"),help:i?Object(a.__)("Categories are shown in a dropdown.","woo-gutenberg-products-block"):Object(a.__)("Categories are shown in a list.","woo-gutenberg-products-block"),checked:i,onChange:function(){return r({isDropdown:!i})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show product count","woo-gutenberg-products-block"),help:n?Object(a.__)("Product count is visible.","woo-gutenberg-products-block"):Object(a.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return r({hasCount:!n})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show hierarchy","woo-gutenberg-products-block"),help:d?Object(a.__)("Hierarchy is visible.","woo-gutenberg-products-block"):Object(a.__)("Hierarchy is hidden.","woo-gutenberg-products-block"),checked:d,onChange:function(){return r({isHierarchical:!d})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show empty categories","woo-gutenberg-products-block"),help:c?Object(a.__)("Empty categories are visible.","woo-gutenberg-products-block"):Object(a.__)("Empty categories are hidden.","woo-gutenberg-products-block"),checked:c,onChange:function(){return r({hasEmpty:!c})}}))),Object(o.createElement)(u.a,{attributes:t,isPreview:!0}))},save:function(e){var t=e.attributes,r=t.hasCount,n=t.hasEmpty,a=t.isDropdown,i=t.isHierarchical,l={};return r&&(l["data-has-count"]=!0),n&&(l["data-has-empty"]=!0),a&&(l["data-is-dropdown"]=!0),i&&(l["data-is-hierarchical"]=!0),Object(o.createElement)("div",c()({className:"is-loading"},l),a?Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(o.createElement)("ul",{"aria-hidden":!0},Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}})},61:function(e,t,r){"use strict";var n=r(0),c=r(3),o=function(){return Object(n.createElement)(c.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},i=function(){return Object(n.createElement)(c.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},l=r(6),s=r.n(l),u=r(5),d=r.n(u),b=function(e){var t=e.size,r=void 0===t?20:t,o=e.className;return Object(n.createElement)(c.Icon,{className:s()("woo-icon",o),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:r,width:Math.floor(1.67*r),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};b.propTypes={size:d.a.number,className:d.a.string};var p=b;r.d(t,"a",function(){return o}),r.d(t,"b",function(){return a}),r.d(t,"c",function(){return i}),r.d(t,"d",function(){return p})}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var c,a,l=t[0],i=t[1],s=t[2],d=0,b=[];d<l.length;d++)a=l[d],r[a]&&b.push(r[a][0]),r[a]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);for(u&&u(t);b.length;)b.shift()();return o.push.apply(o,s||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],c=!0,l=1;l<n.length;l++){var i=n[l];0!==r[i]&&(c=!1)}c&&(o.splice(t--,1),e=a(a.s=n[0]))}return e}var c={},r={8:0},o=[];function a(t){if(c[t])return c[t].exports;var n=c[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=c,a.d=function(e,t,n){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(n,c,function(t){return e[t]}.bind(null,c));return n},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var l=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=l.push.bind(l);l.push=t,l=l.slice();for(var s=0;s<l.length;s++)t(l[s]);var u=i;return o.push([512,0,2,1]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},253:function(e,t,n){var c=n(489);"string"==typeof c&&(c=[[e.i,c,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(38)(c,r);c.locals&&(e.exports=c.locals)},28:function(e,t,n){"use strict";var c=n(0),r=n(3),o=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(c.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},l=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(c.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},i=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.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"}))})},s=function(){return Object(c.createElement)(r.Icon,{icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.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"}))})},u=function(){return Object(c.createElement)(r.Icon,{className:"material-icon",icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(c.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},d=n(6),b=n.n(d),p=n(4),h=n.n(p),g=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(c.createElement)(r.Icon,{className:b()("woo-icon",o),icon:Object(c.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};g.propTypes={size:h.a.number,className:h.a.string};var m=g;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return a}),n.d(t,"c",function(){return l}),n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return m})},3:function(e,t){!function(){e.exports=this.wp.components}()},489:function(e,t,n){},5:function(e,t){!function(){e.exports=this.lodash}()},512:function(e,t,n){"use strict";n.r(t);var c=n(27),r=n.n(c),o=n(0),a=n(1),l=n(18),i=(n(253),n(490),n(9)),s=n(3),u=n(13),d=n.n(u),b=n(14),p=n.n(b),h=n(15),g=n.n(h),m=n(16),f=n.n(m),v=n(12),w=n.n(v),O=n(17),j=n.n(O),_=n(11),E=n(6),k=n.n(E),y=[],C=function(e){return function(t){function n(){return d()(this,n),g()(this,f()(n).apply(this,arguments))}return j()(n,t),p()(n,[{key:"generateUniqueID",value:function(){var e=n.name;return y[e]||(y[e]=0),y[e]++,y[e]}},{key:"render",value:function(){var t=this.generateUniqueID();return Object(o.createElement)(e,r()({},this.props,{componentId:t}))}}]),n}(_.Component)}(function(e){function t(){var e;return d()(this,t),(e=g()(this,f()(t).apply(this,arguments))).select=Object(_.createRef)(),e.onNavigate=e.onNavigate.bind(w()(e)),e.renderList=e.renderList.bind(w()(e)),e.renderOptions=e.renderOptions.bind(w()(e)),e}return j()(t,e),p()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var c=wc_product_block_data.homeUrl;t||0!==n.indexOf(c)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.isPreview,r=void 0!==c&&c,a=this.props.attributes.hasCount,l="parent-"+e[0].term_id;return Object(o.createElement)("ul",{key:l},e.map(function(e){var c=a?Object(o.createElement)("span",null,"(",e.count,")"):null;return[Object(o.createElement)("li",{key:e.term_id},Object(o.createElement)("a",{href:r?null:e.link},e.name)," ",c," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]}))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,c=this.props.attributes.hasCount;return e.map(function(e){var r=c?"(".concat(e.count,")"):null;return[Object(o.createElement)("option",{key:e.term_id,value:e.link},"–".repeat(n)," ",e.name," ",r),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.categories,c=e.componentId,r=t.className,l=t.isDropdown,i=k()("wc-block-product-categories",r,{"is-dropdown":l,"is-list":!l}),s="prod-categories-".concat(c);return Object(o.createElement)(_.Fragment,null,n.length>0&&Object(o.createElement)("div",{className:i},l?Object(o.createElement)(_.Fragment,null,Object(o.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(o.createElement)("label",{className:"screen-reader-text",htmlFor:s},Object(a.__)("Select a category","woo-gutenberg-products-block")),Object(o.createElement)("select",{id:s,ref:this.select},Object(o.createElement)("option",{value:"false",hidden:!0},Object(a.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(n))),Object(o.createElement)("button",{type:"button",className:"wc-block-product-categories__button","aria-label":Object(a.__)("Go to category","woo-gutenberg-products-block"),icon:"arrow-right-alt2",onClick:this.onNavigate},Object(o.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(o.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"})))):this.renderList(n)))}}]),t}(_.Component)),x=n(5),z=n(22),N=(n(492),function(e){function t(){var e;return d()(this,t),(e=g()(this,f()(t).apply(this,arguments))).onClick=e.onClick.bind(w()(e)),e}return j()(t,e),p()(t,[{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,c=n.label,a=n.checked,l=n.instanceId,i=n.className,u=n.help,d=n.options,b=n.value,p="inspector-toggle-button-control-".concat(l);return u&&(e=Object(x.isFunction)(u)?u(a):u),Object(o.createElement)(s.BaseControl,{id:p,help:e,className:k()("components-toggle-button-control",i)},Object(o.createElement)("label",{id:p+"__label",htmlFor:p,className:"components-toggle-button-control__label"},c),Object(o.createElement)(s.ButtonGroup,{"aria-labelledby":p+"__label"},d.map(function(e,n){var a={};return b===e.value?(a.isPrimary=!0,a["aria-pressed"]=!0):(a.isDefault=!0,a["aria-pressed"]=!1),Object(o.createElement)(s.Button,r()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":c+": "+e.label},a),e.label)})))}}]),t}(o.Component)),M=Object(z.withInstanceId)(N),B=n(60),H=n.n(B),I=n(8),P=n.n(I);var L=function(e){var t=e.hasEmpty,n=e.isHierarchical,c=wc_product_block_data.productCategories.filter(function(e){return t||!!e.count});return n?function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t,n,c){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:t.parent;return(e[r]||(e[r]=[])).push(t),e},{}),t=function t(n){return n.map(function(n){var c=e[n.term_id];return delete e[n.term_id],P()({},n,{children:c&&c.length?t(c):[]})})},n=t(e[0]||[]);return delete e[0],Object.keys(e).forEach(function(e){n.push.apply(n,H()(t(e||[])))}),n}(c):c},S=n(28);Object(l.registerBlockType)("woocommerce/product-categories",{title:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(S.a,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show your product categories as a list or dropdown.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},edit:function(e){var t=e.attributes,n=e.setAttributes,c=t.hasCount,r=t.hasEmpty,l=t.isDropdown,u=t.isHierarchical,d=L(t);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.InspectorControls,{key:"inspector"},Object(o.createElement)(s.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show product count","woo-gutenberg-products-block"),help:c?Object(a.__)("Product count is visible.","woo-gutenberg-products-block"):Object(a.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:c,onChange:function(){return n({hasCount:!c})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show hierarchy","woo-gutenberg-products-block"),help:u?Object(a.__)("Hierarchy is visible.","woo-gutenberg-products-block"):Object(a.__)("Hierarchy is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return n({isHierarchical:!u})}}),Object(o.createElement)(s.ToggleControl,{label:Object(a.__)("Show empty categories","woo-gutenberg-products-block"),help:r?Object(a.__)("Empty categories are visible.","woo-gutenberg-products-block"):Object(a.__)("Empty categories are hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return n({hasEmpty:!r})}})),Object(o.createElement)(s.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(M,{label:Object(a.__)("Display style","woo-gutenberg-products-block"),value:l?"dropdown":"list",options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(a.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({isDropdown:"dropdown"===e})}}))),d.length>0?Object(o.createElement)(C,{attributes:t,categories:d,isPreview:!0}):Object(o.createElement)(s.Placeholder,{className:"wc-block-product-categories",icon:Object(o.createElement)(S.a,null),label:Object(a.__)("Product Categories List","woo-gutenberg-products-block")},Object(a.__)("This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block")))},save:function(e){var t=e.attributes,n=t.hasCount,c=t.hasEmpty,a=t.isDropdown,l=t.isHierarchical,i={};return n&&(i["data-has-count"]=!0),c&&(i["data-has-empty"]=!0),a&&(i["data-is-dropdown"]=!0),l&&(i["data-is-hierarchical"]=!0),Object(o.createElement)("div",r()({className:"is-loading"},i),a?Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(o.createElement)("ul",{"aria-hidden":!0},Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(o.createElement)("li",null,Object(o.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}})},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/product-category.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-category"]=function(e){function t(t){for(var r,a,i=t[0],u=t[1],s=t[2],d=0,b=[];d<i.length;d++)a=i[d],c[a]&&b.push(c[a][0]),c[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);b.length;)b.shift()();return n.push.apply(n,s||[]),o()}function o(){for(var e,t=0;t<n.length;t++){for(var o=n[t],r=!0,i=1;i<o.length;i++){var u=o[i];0!==c[u]&&(r=!1)}r&&(n.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},c={10:0},n=[];function a(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var l=u;return n.push([545,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},35:function(e,t){!function(){e.exports=this.wp.url}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},38:function(e,t){!function(){e.exports=this.wp.keycodes}()},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(15),c=o.n(r),n=o(0),a=o(1),i=o(5),u=o.n(i),s=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,u=o.rating,l=o.title;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(c()({},o,{title:!l}))}}),Object(n.createElement)(s.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(c()({},o,{price:!i}))}}),Object(n.createElement)(s.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(c()({},o,{rating:!u}))}}),Object(n.createElement)(s.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(c()({},o,{button:!r}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},t.a=l},42:function(e,t,o){"use strict";var r=o(0),c=o(6),n=o.n(c),a=o(59),i=o.n(a);o.d(t,"a",function(){return u});var u=function(e){return function(t){var o=t.attributes,c=o.align,a=o.contentVisibility,u=n()(c?"align".concat(c):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var o=e.attributes,r=o.attributes,c=o.attrOperator,n=o.categories,a=o.catOperator,u=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),n&&n.length&&(b.set("category",n.join(",")),a&&"all"===a&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),c&&"all"===c&&b.set("terms_operator","AND")),u&&("price_desc"===u?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===u?(b.set("orderby","price"),b.set("order","ASC")):"date"===u?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",u)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";b.set("ids",s.join(",")),b.set("limit",s.length);break;case"woocommerce/product-category":if(!n||!n.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=b[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},46:function(e,t,o){"use strict";var r=o(0),c=o(1),n=o(4),a=o(5),i=o.n(a),u=o(3),s=function(e){var t=e.columns,o=e.rows,a=e.setAttributes;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(n.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(n.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(u.RangeControl,{label:Object(c.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(n.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(n.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}))};s.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,setAttributes:i.a.func.isRequired},t.a=s},50:function(e,t){!function(){e.exports=this.ReactDOM}()},51:function(e,t){!function(){e.exports=this.wp.viewport}()},52:function(e,t,o){"use strict";var r=o(53),c=o.n(r),n=o(22),a=o.n(n),i=o(23),u=o.n(i),s=o(24),l=o.n(s),d=o(25),b=o.n(d),p=o(33),g=o.n(p),f=o(26),m=o.n(f),_=o(0),h=o(1),w=o(35),O=o(17),y=o.n(O),j=o(4),k=o(5),v=o.n(k),C=o(37),E=o(3),x=(o(113),function(e){function t(){var e;return a()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;y()({path:Object(w.addQueryArgs)("/wc-blocks/v1/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,n=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===n&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,c()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,c=r.onChange,n=r.onOperatorChange,a=r.operator,i=r.selected,u={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(j.find)(t,{id:e})}).filter(Boolean),onChange:c,renderItem:this.renderItem,messages:u,isHierarchical:!0}),!!n&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:n,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));x.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired},x.defaultProps={operator:"any"},t.a=x},528:function(e,t,o){var r=o(529);"string"==typeof r&&(r=[[e.i,r,""]]);var c={hmr:!0,transform:void 0,insertInto:void 0};o(66)(r,c);r.locals&&(e.exports=r.locals)},529:function(e,t,o){},545:function(e,t,o){"use strict";o.r(t);var r=o(15),c=o.n(r),n=o(0),a=o(1),i=o(27),u=o(4),s=(o(528),o(22)),l=o.n(s),d=o(23),b=o.n(d),p=o(24),g=o.n(p),f=o(25),m=o.n(f),_=o(26),h=o.n(_),w=o(18),O=o(3),y=o(5),j=o.n(y),k=o(41),v=o(46),C=o(52),E=o(69),x=function(e){function t(){return l()(this,t),g()(this,m()(t).apply(this,arguments))}return h()(t,e),b()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.columns,c=t.catOperator,i=t.contentVisibility,u=t.editMode,s=t.orderby,l=t.rows;return Object(n.createElement)(w.InspectorControls,{key:"inspector"},Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Product Category","woo-gutenberg-products-block"),initialOpen:!t.categories.length&&!u},Object(n.createElement)(C.a,{selected:t.categories,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id});o({categories:e})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})),Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(v.a,{columns:r,rows:l,setAttributes:o})),Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(k.a,{settings:i,onChange:function(e){return o({contentVisibility:e})}})),Object(n.createElement)(O.PanelBody,{title:Object(a.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(E.a,{setAttributes:o,value:s})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,o=e.debouncedSpeak,r=e.setAttributes;return Object(n.createElement)(O.Placeholder,{icon:"category",label:Object(a.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(a.__)("Display a grid of products from your selected categories","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-products-category__selection"},Object(n.createElement)(C.a,{selected:t.categories,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id});r({categories:e})},operator:t.catOperator,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({catOperator:e})}}),Object(n.createElement)(O.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),o(Object(a.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(a.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name,r=e.setAttributes,c=t.editMode;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(w.BlockControls,null,Object(n.createElement)(O.Toolbar,{controls:[{icon:"edit",title:Object(a.__)("Edit"),onClick:function(){return r({editMode:!c})},isActive:c}]})),this.getInspectorControls(),c?this.renderEditMode():Object(n.createElement)(O.Disabled,null,Object(n.createElement)(w.ServerSideRender,{block:o,attributes:t})))}}]),t}(n.Component);x.propTypes={attributes:j.a.object.isRequired,name:j.a.string.isRequired,setAttributes:j.a.func.isRequired,debouncedSpeak:j.a.func.isRequired};var P=Object(O.withSpokenMessages)(x),R=o(42),S=o(36);Object(i.registerBlockType)("woocommerce/product-category",{title:Object(a.__)("Products by Category","woo-gutenberg-products-block"),icon:{src:"category",foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:c()({},S.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(u.without)(S.b,"woocommerce/product-category"),transform:function(e){return Object(i.createBlock)("woocommerce/product-category",c()({},e,{editMode:!1}))}}]},deprecated:[{attributes:c()({},S.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),save:Object(R.a)("woocommerce/product-category")}],edit:function(e){return Object(n.createElement)(P,e)},save:function(){return null}})},65:function(e,t){!function(){e.exports=this.wp.hooks}()},67:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},68:function(e,t){!function(){e.exports=this.wp.date}()},69:function(e,t,o){"use strict";var r=o(0),c=o(1),n=o(3),a=o(5),i=o.n(a),u=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(n.SelectControl,{label:Object(c.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(c.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(c.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(c.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(c.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(c.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(c.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(c.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};u.propTypes={setAttributes:i.a.func.isRequired,value:i.a.string.isRequired},t.a=u},76:function(e,t){!function(){e.exports=this.wp.dom}()},8:function(e,t){!function(){e.exports=this.moment}()},80:function(e,t){},81:function(e,t){},83:function(e,t){},84:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-category"]=function(e){function t(t){for(var r,i,a=t[0],s=t[1],u=t[2],d=0,b=[];d<a.length;d++)i=a[d],n[i]&&b.push(n[i][0]),n[i]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,a=1;a<o.length;a++){var s=o[a];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=i(i.s=o[0]))}return e}var r={},n={9:0},c=[];function i(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=e,i.c=r,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(o,r,function(t){return e[t]}.bind(null,r));return o},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 u=0;u<a.length;u++)t(a[u]);var l=s;return c.push([518,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},29:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var r=o(8),n=o.n(r),c=o(0),i=o(1),a=o(4),s=o.n(a),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,a=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:a?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return t(n()({},o,{price:!a}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(n()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),i=o(4),a=o.n(i),s=o(3),u=function(e){var t=e.columns,o=e.rows,i=e.setAttributes,a=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);i({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);i({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(s.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return i({alignButtons:!a})}}))};u.propTypes={columns:a.a.oneOfType([a.a.number,a.a.string]).isRequired,rows:a.a.oneOfType([a.a.number,a.a.string]).isRequired,alignButtons:a.a.bool.isRequired,setAttributes:a.a.func.isRequired},t.a=u},35:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(48),a=o.n(i);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,n=o.align,i=o.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),c&&c.length&&(b.set("category",c.join(",")),i&&"all"===i&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),n&&"all"===n&&b.set("terms_operator","AND")),s&&("price_desc"===s?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===s?(b.set("orderby","price"),b.set("order","ASC")):"date"===s?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",s)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";b.set("ids",u.join(",")),b.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,h=void 0;try{for(var m,_=b[Symbol.iterator]();!(g=(m=_.next()).done);g=!0){var w=a()(m.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,h=e}finally{try{g||null==_.return||_.return()}finally{if(f)throw h}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var r=o(27),n=o.n(r),c=o(13),i=o.n(c),a=o(14),s=o.n(a),u=o(15),l=o.n(u),d=o(16),b=o.n(d),p=o(12),g=o.n(p),f=o(17),h=o.n(f),m=o(0),_=o(1),w=o(19),O=o(10),y=o.n(O),k=o(5),j=o(4),v=o.n(j),C=o(24),E=o(3),A=(o(79),function(e){function t(){var e;return i()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;y()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,i=["woocommerce-product-categories__item"];o.length&&i.push("is-searching"),0===c&&0!==t.parent&&i.push("is-skip-level");var a=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(m.createElement)(C.b,n()({className:i.join(" ")},e,{showCount:!0,"aria-label":Object(_.sprintf)(Object(_._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),a,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,i=r.operator,a=r.selected,s=r.isSingle,u={clear:Object(_.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(_.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(_.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(_.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(_.sprintf)(Object(_._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(_.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(m.createElement)(m.Fragment,null,Object(m.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:a.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(m.createElement)("div",{className:a.length<2?"screen-reader-text":""},Object(m.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(_.__)("Display products matching","woo-gutenberg-products-block"),help:Object(_.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:i,onChange:c,options:[{label:Object(_.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(_.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(m.Component));A.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},A.defaultProps={operator:"any",isSingle:!1},t.a=A},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},47:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3),i=o(4),a=o.n(i),s=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};s.propTypes={setAttributes:a.a.func.isRequired,value:a.a.string.isRequired},t.a=s},487:function(e,t,o){var r=o(488);"string"==typeof r&&(r=[[e.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o(38)(r,n);r.locals&&(e.exports=r.locals)},488:function(e,t,o){},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},518:function(e,t,o){"use strict";o.r(t);var r=o(8),n=o.n(r),c=o(0),i=o(1),a=o(18),s=o(5),u=(o(487),o(13)),l=o.n(u),d=o(14),b=o.n(d),p=o(15),g=o.n(p),f=o(16),h=o.n(f),m=o(12),_=o.n(m),w=o(17),O=o.n(w),y=o(9),k=o(3),j=o(4),v=o.n(j),C=o(31),E=o(34),A=o(37),x=o(47),S=function(e){function t(){var e;return l()(this,t),(e=g()(this,h()(t).apply(this,arguments))).state={changedAttributes:{},isEditing:!1},e.startEditing=e.startEditing.bind(_()(e)),e.stopEditing=e.stopEditing.bind(_()(e)),e.setChangedAttributes=e.setChangedAttributes.bind(_()(e)),e.save=e.save.bind(_()(e)),e}return O()(t,e),b()(t,[{key:"componentDidMount",value:function(){this.props.attributes.categories.length||this.setState({isEditing:!0})}},{key:"startEditing",value:function(){this.setState({isEditing:!0,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,changedAttributes:{}})}},{key:"setChangedAttributes",value:function(e){this.setState(function(t){return{changedAttributes:n()({},t.changedAttributes,e)}})}},{key:"save",value:function(){var e=this.state.changedAttributes;(0,this.props.setAttributes)(e),this.stopEditing()}},{key:"getInspectorControls",value:function(){var e=this,t=this.props,o=t.attributes,r=t.setAttributes,n=this.state.isEditing,a=o.columns,s=o.catOperator,u=o.contentVisibility,l=o.orderby,d=o.rows,b=o.alignButtons;return Object(c.createElement)(y.InspectorControls,{key:"inspector"},Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Product Category","woo-gutenberg-products-block"),initialOpen:!o.categories.length&&!n},Object(c.createElement)(A.a,{selected:o.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map(function(e){return e.id}),n={categories:o};r(n),e.setChangedAttributes(n)},operator:s,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any",o={catOperator:t};r(o),e.setChangedAttributes(o)}})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(E.a,{columns:a,rows:d,alignButtons:b,setAttributes:r})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:u,onChange:function(e){return r({contentVisibility:e})}})),Object(c.createElement)(k.PanelBody,{title:Object(i.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(x.a,{setAttributes:r,value:l})))}},{key:"renderEditMode",value:function(){var e=this,t=this.props,o=t.attributes,r=t.debouncedSpeak,a=this.state.changedAttributes,s=n()({},o,a);return Object(c.createElement)(k.Placeholder,{icon:"category",label:Object(i.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(i.__)("Display a grid of products from your selected categories","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-products-category__selection"},Object(c.createElement)(A.a,{selected:s.categories,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=t.map(function(e){return e.id});e.setChangedAttributes({categories:o})},operator:s.catOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({catOperator:t})}}),Object(c.createElement)(k.Button,{isDefault:!0,onClick:function(){e.save(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Done","woo-gutenberg-products-block")),Object(c.createElement)(k.Button,{className:"wc-block-products-category__cancel-button",isTertiary:!0,onClick:function(){e.stopEditing(),r(Object(i.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(i.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var e=this.props,t=e.attributes,o=e.name,r=t.categories.length;return Object(c.createElement)(k.Disabled,null,r?Object(c.createElement)(y.ServerSideRender,{block:o,attributes:t}):Object(i.__)("Select at least one category to display its products.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this,t=this.state.isEditing;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(y.BlockControls,null,Object(c.createElement)(k.Toolbar,{controls:[{icon:"edit",title:Object(i.__)("Edit"),onClick:function(){return t?e.stopEditing():e.startEditing()},isActive:t}]})),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())}}]),t}(c.Component);S.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired,debouncedSpeak:v.a.func.isRequired};var P=Object(k.withSpokenMessages)(S),R=o(35),B=o(30);Object(a.registerBlockType)("woocommerce/product-category",{title:Object(i.__)("Products by Category","woo-gutenberg-products-block"),icon:{src:"category",foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:n()({},B.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(s.without)(B.b,"woocommerce/product-category"),transform:function(e){return Object(a.createBlock)("woocommerce/product-category",n()({},e,{editMode:!1}))}}]},deprecated:[{attributes:n()({},B.a,{editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}}),save:Object(R.a)("woocommerce/product-category")}],edit:function(e){return Object(c.createElement)(P,e)},save:function(){return null}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/product-new.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-new"]=function(e){function t(t){for(var r,a,i=t[0],s=t[1],u=t[2],d=0,b=[];d<i.length;d++)a=i[d],n[a]&&b.push(n[a][0]),n[a]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var s=o[i];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={11:0},c=[];function a(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],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 c.push([547,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},35:function(e,t){!function(){e.exports=this.wp.url}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},38:function(e,t){!function(){e.exports=this.wp.keycodes}()},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(15),n=o.n(r),c=o(0),a=o(1),i=o(5),s=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(n()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},42:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(59),i=o.n(a);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),c&&c.length&&(b.set("category",c.join(",")),a&&"all"===a&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),n&&"all"===n&&b.set("terms_operator","AND")),s&&("price_desc"===s?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===s?(b.set("orderby","price"),b.set("order","ASC")):"date"===s?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",s)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";b.set("ids",u.join(",")),b.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var h,w=b[Symbol.iterator]();!(g=(h=w.next()).done);g=!0){var _=i()(h.value,2);p+=" "+_[0]+'="'+_[1]+'"'}}catch(e){m=!0,f=e}finally{try{g||null==w.return||w.return()}finally{if(m)throw f}}return p+="]"}(t,e))}}},46:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),a=o(5),i=o.n(a),s=o(3),u=function(e){var t=e.columns,o=e.rows,a=e.setAttributes;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,setAttributes:i.a.func.isRequired},t.a=u},50:function(e,t){!function(){e.exports=this.ReactDOM}()},51:function(e,t){!function(){e.exports=this.wp.viewport}()},52:function(e,t,o){"use strict";var r=o(53),n=o.n(r),c=o(22),a=o.n(c),i=o(23),s=o.n(i),u=o(24),l=o.n(u),d=o(25),b=o.n(d),p=o(33),g=o.n(p),m=o(26),f=o.n(m),h=o(0),w=o(1),_=o(35),O=o(17),j=o.n(O),v=o(4),y=o(5),k=o.n(y),C=o(37),E=o(3),x=(o(113),function(e){function t(){var e;return a()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return f()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(_.addQueryArgs)("/wc-blocks/v1/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(h.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,s={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(h.createElement)(h.Fragment,null,Object(h.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(v.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:s,isHierarchical:!0}),!!c&&Object(h.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(h.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(h.Component));x.propTypes={onChange:k.a.func.isRequired,onOperatorChange:k.a.func,operator:k.a.oneOf(["all","any"]),selected:k.a.array.isRequired},x.defaultProps={operator:"any"},t.a=x},547:function(e,t,o){"use strict";o.r(t);var r=o(15),n=o.n(r),c=o(0),a=o(1),i=o(27),s=o(4),u=o(22),l=o.n(u),d=o(23),b=o.n(d),p=o(24),g=o.n(p),m=o(25),f=o.n(m),h=o(26),w=o.n(h),_=o(3),O=o(18),j=o(5),v=o.n(j),y=o(41),k=o(46),C=o(52),E=function(e){function t(){return l()(this,t),g()(this,f()(t).apply(this,arguments))}return w()(t,e),b()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,s=t.contentVisibility,u=t.rows;return Object(c.createElement)(O.InspectorControls,{key:"inspector"},Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{columns:i,rows:u,setAttributes:o})),Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(y.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(C.a,{selected:r,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id});o({categories:e})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(_.Disabled,null,Object(c.createElement)(O.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);E.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var x=E,P=o(42),z=o(61),R=o(36);Object(i.registerBlockType)("woocommerce/product-new",{title:Object(a.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(z.b,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:n()({},R.a),transforms:{from:[{type:"block",blocks:Object(s.without)(R.b,"woocommerce/product-new"),transform:function(e){return Object(i.createBlock)("woocommerce/product-new",e)}}]},deprecated:[{attributes:R.a,save:Object(P.a)("woocommerce/product-new")}],edit:function(e){return Object(c.createElement)(x,e)},save:function(){return null}})},61:function(e,t,o){"use strict";var r=o(0),n=o(3),c=function(){return Object(r.createElement)(n.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(r.createElement)(n.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(r.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},i=function(){return Object(r.createElement)(n.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},s=o(6),u=o.n(s),l=o(5),d=o.n(l),b=function(e){var t=e.size,o=void 0===t?20:t,c=e.className;return Object(r.createElement)(n.Icon,{className:u()("woo-icon",c),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:o,width:Math.floor(1.67*o),viewBox:"0 0 245 145"},Object(r.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};b.propTypes={size:d.a.number,className:d.a.string};var p=b;o.d(t,"a",function(){return c}),o.d(t,"b",function(){return a}),o.d(t,"c",function(){return i}),o.d(t,"d",function(){return p})},65:function(e,t){!function(){e.exports=this.wp.hooks}()},67:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},68:function(e,t){!function(){e.exports=this.wp.date}()},76:function(e,t){!function(){e.exports=this.wp.dom}()},8:function(e,t){!function(){e.exports=this.moment}()},80:function(e,t){},81:function(e,t){},83:function(e,t){},84:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-new"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],b=0,d=[];b<i.length;b++)a=i[b],r[a]&&d.push(r[a][0]),r[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],n=!0,i=1;i<o.length;i++){var s=o[i];0!==r[s]&&(n=!1)}n&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var n={},r={10:0},c=[];function a(t){if(n[t])return n[t].exports;var o=n[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=n,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(o,n,function(t){return e[t]}.bind(null,n));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],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 c.push([522,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},28:function(e,t,o){"use strict";var n=o(0),r=o(3),c=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},a=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(n.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},i=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},s=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(n.createElement)(r.Icon,{icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.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"}))})},l=function(){return Object(n.createElement)(r.Icon,{className:"material-icon",icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},b=o(6),d=o.n(b),p=o(4),g=o.n(p),m=function(e){var t=e.size,o=void 0===t?20:t,c=e.className;return Object(n.createElement)(r.Icon,{className:d()("woo-icon",c),icon:Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:o,width:Math.floor(1.67*o),viewBox:"0 0 245 145"},Object(n.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(n.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};m.propTypes={size:g.a.number,className:g.a.string};var h=m;o.d(t,"a",function(){return c}),o.d(t,"b",function(){return a}),o.d(t,"c",function(){return i}),o.d(t,"d",function(){return s}),o.d(t,"e",function(){return u}),o.d(t,"f",function(){return l}),o.d(t,"g",function(){return h})},29:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return n});var n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var n=o(8),r=o.n(n),c=o(0),a=o(1),i=o(4),s=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,n=o.button,i=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(r()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(r()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(r()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return t(r()({},o,{button:!n}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var n=o(0),r=o(1),c=o(5),a=o(4),i=o.n(a),s=o(3),u=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(n.createElement)(s.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(n.createElement)(s.ToggleControl,{label:Object(r.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(r.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},35:function(e,t,o){"use strict";var n=o(0),r=o(6),c=o.n(r),a=o(48),i=o.n(a);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,r=o.align,a=o.contentVisibility,s=c()(r?"align".concat(r):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(n.createElement)(n.RawHTML,{className:s},function(e,t){var o=e.attributes,n=o.attributes,r=o.attrOperator,c=o.categories,a=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),a&&"all"===a&&d.set("cat_operator","AND")),n&&n.length&&(d.set("terms",n.map(function(e){return e.id}).join(",")),d.set("attribute",n[0].attr_slug),r&&"all"===r&&d.set("terms_operator","AND")),s&&("price_desc"===s?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===s?(d.set("orderby","price"),d.set("order","ASC")):"date"===s?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",s)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";d.set("ids",u.join(",")),d.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!n||!n.length)return""}var p="[products",g=!0,m=!1,h=void 0;try{for(var f,w=d[Symbol.iterator]();!(g=(f=w.next()).done);g=!0){var _=i()(f.value,2);p+=" "+_[0]+'="'+_[1]+'"'}}catch(e){m=!0,h=e}finally{try{g||null==w.return||w.return()}finally{if(m)throw h}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var n=o(27),r=o.n(n),c=o(13),a=o.n(c),i=o(14),s=o.n(i),u=o(15),l=o.n(u),b=o(16),d=o.n(b),p=o(12),g=o.n(p),m=o(17),h=o.n(m),f=o(0),w=o(1),_=o(19),O=o(10),j=o.n(O),v=o(5),k=o(4),y=o.n(k),E=o(24),C=o(3),x=(o(79),function(e){function t(){var e;return a()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(_.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,n=e.depth,c=void 0===n?0:n,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(f.createElement)(E.b,r()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(w.sprintf)(Object(w._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,n=this.props,r=n.onChange,c=n.onOperatorChange,a=n.operator,i=n.selected,s=n.isSingle,u={clear:Object(w.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(w.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(w.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(w.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(w.sprintf)(Object(w._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(w.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(f.createElement)(f.Fragment,null,Object(f.createElement)(E.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(v.find)(t,{id:e})}).filter(Boolean),onChange:r,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(f.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(f.createElement)(C.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(w.__)("Display products matching","woo-gutenberg-products-block"),help:Object(w.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(w.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(w.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(f.Component));x.propTypes={onChange:y.a.func.isRequired,onOperatorChange:y.a.func,operator:y.a.oneOf(["all","any"]),selected:y.a.array.isRequired,isSingle:y.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},52:function(e,t){!function(){e.exports=this.wp.date}()},522:function(e,t,o){"use strict";o.r(t);var n=o(8),r=o.n(n),c=o(0),a=o(1),i=o(18),s=o(5),u=o(13),l=o.n(u),b=o(14),d=o.n(b),p=o(15),g=o.n(p),m=o(16),h=o.n(m),f=o(17),w=o.n(f),_=o(3),O=o(9),j=o(4),v=o.n(j),k=o(31),y=o(34),E=o(37),C=function(e){function t(){return l()(this,t),g()(this,h()(t).apply(this,arguments))}return w()(t,e),d()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,n=t.categories,r=t.catOperator,i=t.columns,s=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(O.InspectorControls,{key:"inspector"},Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(y.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(k.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(_.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:n,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:r,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(_.Disabled,null,Object(c.createElement)(O.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);C.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var x=C,z=o(35),M=o(28),B=o(30);Object(i.registerBlockType)("woocommerce/product-new",{title:Object(a.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(M.c,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:r()({},B.a),transforms:{from:[{type:"block",blocks:Object(s.without)(B.b,"woocommerce/product-new"),transform:function(e){return Object(i.createBlock)("woocommerce/product-new",e)}}]},deprecated:[{attributes:B.a,save:Object(z.a)("woocommerce/product-new")}],edit:function(e){return Object(c.createElement)(x,e)},save:function(){return null}})},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/product-on-sale.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-on-sale"]=function(e){function t(t){for(var r,a,i=t[0],u=t[1],s=t[2],b=0,d=[];b<i.length;b++)a=i[b],n[a]&&d.push(n[a][0]),n[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,s||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var u=o[i];0!==n[u]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={12:0},c=[];function a(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var l=u;return c.push([548,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},35:function(e,t){!function(){e.exports=this.wp.url}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},38:function(e,t){!function(){e.exports=this.wp.keycodes}()},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(15),n=o.n(r),c=o(0),a=o(1),i=o(5),u=o.n(i),s=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(n()({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},t.a=l},42:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(59),i=o.n(a);o.d(t,"a",function(){return u});var u=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,u=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),a&&"all"===a&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),u&&("price_desc"===u?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===u?(d.set("orderby","price"),d.set("order","ASC")):"date"===u?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",u)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";d.set("ids",s.join(",")),d.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},46:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),a=o(5),i=o.n(a),u=o(3),s=function(e){var t=e.columns,o=e.rows,a=e.setAttributes;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}))};s.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,setAttributes:i.a.func.isRequired},t.a=s},50:function(e,t){!function(){e.exports=this.ReactDOM}()},51:function(e,t){!function(){e.exports=this.wp.viewport}()},52:function(e,t,o){"use strict";var r=o(53),n=o.n(r),c=o(22),a=o.n(c),i=o(23),u=o.n(i),s=o(24),l=o.n(s),b=o(25),d=o.n(b),p=o(33),g=o.n(p),f=o(26),m=o.n(f),_=o(0),h=o(1),w=o(35),O=o(17),j=o.n(O),y=o(4),k=o(5),v=o.n(k),C=o(37),E=o(3),x=(o(113),function(e){function t(){var e;return a()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc-blocks/v1/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,u={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));x.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired},x.defaultProps={operator:"any"},t.a=x},548:function(e,t,o){"use strict";o.r(t);var r=o(15),n=o.n(r),c=o(0),a=o(1),i=o(27),u=o(4),s=o(74),l=o.n(s),b=o(22),d=o.n(b),p=o(23),g=o.n(p),f=o(24),m=o.n(f),_=o(25),h=o.n(_),w=o(26),O=o.n(w),j=o(3),y=o(18),k=o(5),v=o.n(k),C=o(41),E=o(46),x=o(52),P=o(69),R=function(e){function t(){return d()(this,t),m()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,u=t.contentVisibility,s=t.rows,l=t.orderby;return Object(c.createElement)(y.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(E.a,{columns:i,rows:s,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:u,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(P.a,{setAttributes:o,value:l})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(x.a,{selected:r,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id});o({categories:e})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(y.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);R.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var S=R,A=o(42),T=o(36);Object(i.registerBlockType)("woocommerce/product-on-sale",{title:Object(a.__)("On Sale Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"tag"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of on sale products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:n()({},T.a,{orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(u.without)(T.b,"woocommerce/product-on-sale"),transform:function(e){return Object(i.createBlock)("woocommerce/product-on-sale",e)}}]},deprecated:[{attributes:n()({},T.a,{orderby:{type:"string",default:"date"}}),save:Object(A.a)("woocommerce/product-on-sale")}],edit:function(e){return Object(c.createElement)(S,e)},save:function(){return null}})},65:function(e,t){!function(){e.exports=this.wp.hooks}()},67:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},68:function(e,t){!function(){e.exports=this.wp.date}()},69:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3),a=o(5),i=o.n(a),u=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};u.propTypes={setAttributes:i.a.func.isRequired,value:i.a.string.isRequired},t.a=u},76:function(e,t){!function(){e.exports=this.wp.dom}()},8:function(e,t){!function(){e.exports=this.moment}()},80:function(e,t){},81:function(e,t){},83:function(e,t){},84:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-on-sale"]=function(e){function t(t){for(var r,a,i=t[0],u=t[1],s=t[2],b=0,d=[];b<i.length;b++)a=i[b],n[a]&&d.push(n[a][0]),n[a]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(l&&l(t);d.length;)d.shift()();return c.push.apply(c,s||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var u=o[i];0!==n[u]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={11:0},c=[];function a(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=i.push.bind(i);i.push=t,i=i.slice();for(var s=0;s<i.length;s++)t(i[s]);var l=u;return c.push([517,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},29:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var r=o(8),n=o.n(r),c=o(0),a=o(1),i=o(4),u=o.n(i),s=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return t(n()({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,rating:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),a=o(4),i=o.n(a),u=o(3),s=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(u.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};s.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=s},35:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(48),i=o.n(a);o.d(t,"a",function(){return u});var u=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:u},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,u=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),a&&"all"===a&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(e){return e.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),u&&("price_desc"===u?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===u?(d.set("orderby","price"),d.set("order","ASC")):"date"===u?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",u)),t){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";d.set("ids",s.join(",")),d.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var r=o(27),n=o.n(r),c=o(13),a=o.n(c),i=o(14),u=o.n(i),s=o(15),l=o.n(s),b=o(16),d=o.n(b),p=o(12),g=o.n(p),f=o(17),m=o.n(f),_=o(0),h=o(1),w=o(19),O=o(10),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(24),E=o(3),x=(o(79),function(e){function t(){var e;return a()(this,t),(e=l()(this,d()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,u=r.isSingle,s={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:s,isHierarchical:!0,isSingle:u}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(E.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));x.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},x.defaultProps={operator:"any",isSingle:!1},t.a=x},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},47:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(3),a=o(4),i=o.n(a),u=function(e){var t=e.value,o=e.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return o({orderby:e})}})};u.propTypes={setAttributes:i.a.func.isRequired,value:i.a.string.isRequired},t.a=u},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},517:function(e,t,o){"use strict";o.r(t);var r=o(8),n=o.n(r),c=o(0),a=o(1),i=o(18),u=o(5),s=o(25),l=o.n(s),b=o(13),d=o.n(b),p=o(14),g=o.n(p),f=o(15),m=o.n(f),_=o(16),h=o.n(_),w=o(17),O=o.n(w),j=o(3),k=o(9),y=o(4),v=o.n(y),C=o(31),E=o(34),x=o(37),P=o(47),R=function(e){function t(){return d()(this,t),m()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,u=t.contentVisibility,s=t.rows,l=t.orderby,b=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(E.a,{columns:i,rows:s,alignButtons:b,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:u,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(P.a,{setAttributes:o,value:l})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(x.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.attributes,o=e.name;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:o,attributes:t})))}}]),t}(c.Component);R.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var S=R,A=o(35),B=o(30);Object(i.registerBlockType)("woocommerce/product-on-sale",{title:Object(a.__)("On Sale Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(l.a,{icon:"tag"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of on sale products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:n()({},B.a,{orderby:{type:"string",default:"date"}}),transforms:{from:[{type:"block",blocks:Object(u.without)(B.b,"woocommerce/product-on-sale"),transform:function(e){return Object(i.createBlock)("woocommerce/product-on-sale",e)}}]},deprecated:[{attributes:n()({},B.a,{orderby:{type:"string",default:"date"}}),save:Object(A.a)("woocommerce/product-on-sale")}],edit:function(e){return Object(c.createElement)(S,e)},save:function(){return null}})},52:function(e,t){!function(){e.exports=this.wp.date}()},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/product-tag.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["lodash","moment","react","react-dom","wp-api-fetch","wp-blocks","wp-components","wp-compose","wp-date","wp-dom","wp-editor","wp-element","wp-hooks","wp-html-entities","wp-i18n","wp-keycodes","wp-polyfill","wp-url","wp-viewport"]
build/product-tag.js ADDED
@@ -0,0 +1 @@
 
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-tag"]=function(t){function e(e){for(var n,a,s=e[0],i=e[1],u=e[2],d=0,b=[];d<s.length;d++)a=s[d],r[a]&&b.push(r[a][0]),r[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n]);for(l&&l(e);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],n=!0,s=1;s<o.length;s++){var i=o[s];0!==r[i]&&(n=!1)}n&&(c.splice(e--,1),t=a(a.s=o[0]))}return t}var n={},r={12:0},c=[];function a(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=t,a.c=n,a.d=function(t,e,o){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(o,n,function(e){return t[e]}.bind(null,n));return o},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=s.push.bind(s);s.push=e,s=s.slice();for(var u=0;u<s.length;u++)e(s[u]);var l=i;return c.push([516,0,2,1]),o()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},10:function(t,e){!function(){t.exports=this.wp.apiFetch}()},11:function(t,e){!function(){t.exports=this.React}()},18:function(t,e){!function(){t.exports=this.wp.blocks}()},19:function(t,e){!function(){t.exports=this.wp.url}()},22:function(t,e){!function(){t.exports=this.wp.compose}()},29:function(t,e){!function(){t.exports=this.wp.keycodes}()},3:function(t,e){!function(){t.exports=this.wp.components}()},31:function(t,e,o){"use strict";var n=o(8),r=o.n(n),c=o(0),a=o(1),s=o(4),i=o.n(s),u=o(3),l=function(t){var e=t.onChange,o=t.settings,n=o.button,s=o.price,i=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(r()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:s?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return e(r()({},o,{price:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:i?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return e(r()({},o,{rating:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:n?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:n,onChange:function(){return e(r()({},o,{button:!n}))}}))};l.propTypes={settings:i.a.shape({button:i.a.bool.isRequired,price:i.a.bool.isRequired,rating:i.a.bool.isRequired,title:i.a.bool.isRequired}).isRequired,onChange:i.a.func.isRequired},e.a=l},34:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(5),a=o(4),s=o.n(a),i=o(3),u=function(t){var e=t.columns,o=t.rows,a=t.setAttributes,s=t.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(n.createElement)(i.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(n.createElement)(i.ToggleControl,{label:Object(r.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:s?Object(r.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:function(){return a({alignButtons:!s})}}))};u.propTypes={columns:s.a.oneOfType([s.a.number,s.a.string]).isRequired,rows:s.a.oneOfType([s.a.number,s.a.string]).isRequired,alignButtons:s.a.bool.isRequired,setAttributes:s.a.func.isRequired},e.a=u},36:function(t,e){!function(){t.exports=this.ReactDOM}()},39:function(t,e){!function(){t.exports=this.wp.viewport}()},43:function(t,e,o){"use strict";o.d(e,"d",function(){return s}),o.d(e,"e",function(){return i}),o.d(e,"c",function(){return u}),o.d(e,"b",function(){return l}),o.d(e,"a",function(){return d});var n=o(19),r=o(10),c=o.n(r),a=o(5),s=wc_product_block_data.isLargeCatalog||!1,i=wc_product_block_data.limitTags||!1,u=wc_product_block_data.hasTags||!1,l=function(t){var e=t.selected,o=function(t){var e=t.selected,o=void 0===e?[]:e,r=t.search,c=[Object(n.addQueryArgs)("/wc/blocks/products",{per_page:s?100:-1,catalog_visibility:"visible",status:"publish",search:r})];return s&&o.length&&c.push(Object(n.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:o})),c}({selected:void 0===e?[]:e,search:t.search});return Promise.all(o.map(function(t){return c()({path:t})})).then(function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")})},d=function(t){var e=t.selected,o=function(t){var e=t.selected,o=void 0===e?[]:e,r=t.search,c=[Object(n.addQueryArgs)("/wc/blocks/products/tags",{per_page:i?100:-1,orderby:i?"count":"name",order:i?"desc":"asc",search:r})];return i&&o.length&&c.push(Object(n.addQueryArgs)("/wc/blocks/products/tags",{include:o})),c}({selected:void 0===e?[]:e,search:t.search});return Promise.all(o.map(function(t){return c()({path:t})})).then(function(t){return Object(a.uniqBy)(Object(a.flatten)(t),"id")})}},46:function(t,e){!function(){t.exports=this.wp.hooks}()},47:function(t,e,o){"use strict";var n=o(0),r=o(1),c=o(3),a=o(4),s=o.n(a),i=function(t){var e=t.value,o=t.setAttributes;return Object(n.createElement)(c.SelectControl,{label:Object(r.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(r.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(r.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(r.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(r.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(r.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(r.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(r.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return o({orderby:t})}})};i.propTypes={setAttributes:s.a.func.isRequired,value:s.a.string.isRequired},e.a=i},5:function(t,e){!function(){t.exports=this.lodash}()},504:function(t,e,o){var n=o(505);"string"==typeof n&&(n=[[t.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(38)(n,r);n.locals&&(t.exports=n.locals)},505:function(t,e,o){},51:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},516:function(t,e,o){"use strict";o.r(e);var n=o(0),r=o(1),c=o(18),a=(o(504),o(8)),s=o.n(a),i=o(13),u=o.n(i),l=o(14),d=o.n(l),b=o(15),g=o.n(b),p=o(16),h=o.n(p),f=o(12),_=o.n(f),m=o(17),O=o.n(m),w=o(9),j=o(3),k=o(4),v=o.n(k),y=o(31),E=o(34),C=o(27),P=o.n(C),A=o(5),x=o(24),S=(o(506),o(43)),T=function(t){function e(){var t;return u()(this,e),(t=g()(this,h()(e).apply(this,arguments))).state={list:[],loading:!0},t.renderItem=t.renderItem.bind(_()(t)),t.debouncedOnSearch=Object(A.debounce)(t.onSearch.bind(_()(t)),400),t}return O()(e,t),d()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;Object(S.a)({selected:e}).then(function(e){t.setState({list:e,loading:!1})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"onSearch",value:function(t){var e=this,o=this.props.selected;this.setState({loading:!0}),Object(S.a)({selected:o,search:t}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(t){var e=t.item,o=t.search,c=t.depth,a=void 0===c?0:c,s=["woocommerce-product-tags__item"];o.length&&s.push("is-searching"),0===a&&0!==e.parent&&s.push("is-skip-level");var i=e.breadcrumbs.length?"".concat(e.breadcrumbs.join(", "),", ").concat(e.name):e.name;return Object(n.createElement)(x.b,P()({className:s.join(" ")},t,{showCount:!0,"aria-label":Object(r.sprintf)(Object(r._n)("%d product tagged as %s","%d products tagged as %s",e.count,"woo-gutenberg-products-block"),e.count,i)}))}},{key:"render",value:function(){var t=this.state,e=t.list,o=t.loading,c=this.props,a=c.onChange,s=c.onOperatorChange,i=c.operator,u=c.selected,l={clear:Object(r.__)("Clear all product tags","woo-gutenberg-products-block"),list:Object(r.__)("Product Tags","woo-gutenberg-products-block"),noItems:Object(r.__)("Your store doesn't have any product tags.","woo-gutenberg-products-block"),search:Object(r.__)("Search for product tags","woo-gutenberg-products-block"),selected:function(t){return Object(r.sprintf)(Object(r._n)("%d tag selected","%d tags selected",t,"woo-gutenberg-products-block"),t)},updated:Object(r.__)("Tag search results updated.","woo-gutenberg-products-block")};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(x.a,{className:"woocommerce-product-tags",list:e,isLoading:o,selected:u.map(function(t){return Object(A.find)(e,{id:t})}).filter(Boolean),onChange:a,onSearch:S.e?this.debouncedOnSearch:null,renderItem:this.renderItem,messages:l,isHierarchical:!0}),!!s&&Object(n.createElement)("div",{className:u.length<2?"screen-reader-text":""},Object(n.createElement)(j.SelectControl,{className:"woocommerce-product-tags__operator",label:Object(r.__)("Display products matching","woo-gutenberg-products-block"),help:Object(r.__)("Pick at least two tags to use this setting.","woo-gutenberg-products-block"),value:i,onChange:s,options:[{label:Object(r.__)("Any selected tags","woo-gutenberg-products-block"),value:"any"},{label:Object(r.__)("All selected tags","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(n.Component);T.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired},T.defaultProps={operator:"any"};var R=T,B=o(47),q=function(t){function e(){var t;return u()(this,e),(t=g()(this,h()(e).apply(this,arguments))).state={changedAttributes:{},isEditing:!1},t.startEditing=t.startEditing.bind(_()(t)),t.stopEditing=t.stopEditing.bind(_()(t)),t.setChangedAttributes=t.setChangedAttributes.bind(_()(t)),t.save=t.save.bind(_()(t)),t}return O()(e,t),d()(e,[{key:"componentDidMount",value:function(){this.props.attributes.tags.length||this.setState({isEditing:!0})}},{key:"startEditing",value:function(){this.setState({isEditing:!0,changedAttributes:{}})}},{key:"stopEditing",value:function(){this.setState({isEditing:!1,changedAttributes:{}})}},{key:"setChangedAttributes",value:function(t){this.setState(function(e){return{changedAttributes:s()({},e.changedAttributes,t)}})}},{key:"save",value:function(){var t=this.state.changedAttributes;(0,this.props.setAttributes)(t),this.stopEditing()}},{key:"getInspectorControls",value:function(){var t=this.props,e=t.attributes,o=t.setAttributes,c=this.state.isEditing,a=e.columns,s=e.tagOperator,i=e.contentVisibility,u=e.orderby,l=e.rows,d=e.alignButtons;return Object(n.createElement)(w.InspectorControls,{key:"inspector"},Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Product Tag","woo-gutenberg-products-block"),initialOpen:!e.tags.length&&!c},Object(n.createElement)(R,{selected:e.tags,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map(function(t){return t.id});o({tags:e})},operator:s,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({tagOperator:t})}})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(E.a,{columns:a,rows:l,alignButtons:d,setAttributes:o})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(y.a,{settings:i,onChange:function(t){return o({contentVisibility:t})}})),Object(n.createElement)(j.PanelBody,{title:Object(r.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(B.a,{setAttributes:o,value:u})))}},{key:"renderEditMode",value:function(){var t=this,e=this.props,o=e.attributes,c=e.debouncedSpeak,a=this.state.changedAttributes,i=s()({},o,a);return Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("Display a grid of products from your selected tags","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-product-tag__selection"},Object(n.createElement)(R,{selected:i.tags,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=e.map(function(t){return t.id});t.setChangedAttributes({tags:o})},operator:i.tagOperator,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t.setChangedAttributes({tagOperator:e})}}),Object(n.createElement)(j.Button,{isDefault:!0,onClick:function(){t.save(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(j.Button,{className:"wc-block-product-tag__cancel-button",isTertiary:!0,onClick:function(){t.stopEditing(),c(Object(r.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(r.__)("Cancel","woo-gutenberg-products-block"))))}},{key:"renderViewMode",value:function(){var t=this.props,e=t.attributes,o=t.name,c=e.tags.length;return Object(n.createElement)(j.Disabled,null,c?Object(n.createElement)(w.ServerSideRender,{block:o,attributes:e}):Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. Select at least one tag to display its products.","woo-gutenberg-products-block")))}},{key:"render",value:function(){var t=this,e=this.state.isEditing;return Object(n.createElement)(n.Fragment,null,S.c?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(w.BlockControls,null,Object(n.createElement)(j.Toolbar,{controls:[{icon:"edit",title:Object(r.__)("Edit"),onClick:function(){return e?t.stopEditing():t.startEditing()},isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode()):Object(n.createElement)(j.Placeholder,{icon:"tag",label:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(r.__)("This block displays products from selected tags. In order to preview this you'll first need to create a product and assign it some tags.","woo-gutenberg-products-block")))}}]),e}(n.Component);q.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired,debouncedSpeak:v.a.func.isRequired};var N=Object(j.withSpokenMessages)(q);Object(c.registerBlockType)("woocommerce/product-tag",{title:Object(r.__)("Products by Tag","woo-gutenberg-products-block"),icon:{src:"tag",foreground:"#96588a"},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Display a grid of products from selected tags.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},tags:{type:"array",default:[]},tagOperator:{type:"string",default:"any"},orderby:{type:"string",default:"date"}},edit:function(t){return Object(n.createElement)(N,t)},save:function(){return null}})},52:function(t,e){!function(){t.exports=this.wp.date}()},54:function(t,e){!function(){t.exports=this.wp.dom}()},55:function(t,e){},56:function(t,e){},57:function(t,e){},58:function(t,e){},7:function(t,e){!function(){t.exports=this.moment}()},9:function(t,e){!function(){t.exports=this.wp.editor}()}});
build/product-top-rated.js CHANGED
@@ -1 +1 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-top-rated"]=function(e){function t(t){for(var r,a,i=t[0],s=t[1],u=t[2],d=0,b=[];d<i.length;d++)a=i[d],n[a]&&b.push(n[a][0]),n[a]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var s=o[i];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={13:0},c=[];function a(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],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 c.push([549,1,3,2,0]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},17:function(e,t){!function(){e.exports=this.wp.apiFetch}()},18:function(e,t){!function(){e.exports=this.wp.editor}()},27:function(e,t){!function(){e.exports=this.wp.blocks}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t){!function(){e.exports=this.wp.compose}()},35:function(e,t){!function(){e.exports=this.wp.url}()},36:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},38:function(e,t){!function(){e.exports=this.wp.keycodes}()},4:function(e,t){!function(){e.exports=this.lodash}()},41:function(e,t,o){"use strict";var r=o(15),n=o.n(r),c=o(0),a=o(1),i=o(5),s=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(n()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},42:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(59),i=o.n(a);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),c&&c.length&&(b.set("category",c.join(",")),a&&"all"===a&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),n&&"all"===n&&b.set("terms_operator","AND")),s&&("price_desc"===s?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===s?(b.set("orderby","price"),b.set("order","ASC")):"date"===s?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",s)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";b.set("ids",u.join(",")),b.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=b[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},46:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(4),a=o(5),i=o.n(a),s=o(3),u=function(e){var t=e.columns,o=e.rows,a=e.setAttributes;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,setAttributes:i.a.func.isRequired},t.a=u},50:function(e,t){!function(){e.exports=this.ReactDOM}()},51:function(e,t){!function(){e.exports=this.wp.viewport}()},52:function(e,t,o){"use strict";var r=o(53),n=o.n(r),c=o(22),a=o.n(c),i=o(23),s=o.n(i),u=o(24),l=o.n(u),d=o(25),b=o.n(d),p=o(33),g=o.n(p),f=o(26),m=o.n(f),_=o(0),h=o(1),w=o(35),O=o(17),j=o.n(O),y=o(4),k=o(5),v=o.n(k),C=o(37),x=o(3),E=(o(113),function(e){function t(){var e;return a()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc-blocks/v1/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,s={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(y.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:s,isHierarchical:!0}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(x.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));E.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired},E.defaultProps={operator:"any"},t.a=E},549:function(e,t,o){"use strict";o.r(t);var r=o(15),n=o.n(r),c=o(0),a=o(1),i=o(27),s=o(74),u=o.n(s),l=o(4),d=o(22),b=o.n(d),p=o(23),g=o.n(p),f=o(24),m=o.n(f),_=o(25),h=o.n(_),w=o(26),O=o.n(w),j=o(3),y=o(18),k=o(5),v=o.n(k),C=o(41),x=o(46),E=o(52),P=function(e){function t(){return b()(this,t),m()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,s=t.contentVisibility,u=t.rows;return Object(c.createElement)(y.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(x.a,{columns:i,rows:u,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:r,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(e){return e.id});o({categories:e})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.name,o=e.attributes;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(y.ServerSideRender,{block:t,attributes:o})))}}]),t}(c.Component);P.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var R=P,S=o(42),T=o(36),A="woocommerce/product-top-rated";Object(i.registerBlockType)(A,{title:Object(a.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(u.a,{icon:"trophy"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:n()({},T.a),transforms:{from:[{type:"block",blocks:Object(l.without)(T.b,A),transform:function(e){return Object(i.createBlock)("woocommerce/product-top-rated",e)}}]},deprecated:[{attributes:T.a,save:Object(S.a)(A)}],edit:function(e){return Object(c.createElement)(R,e)},save:function(){return null}})},65:function(e,t){!function(){e.exports=this.wp.hooks}()},67:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},68:function(e,t){!function(){e.exports=this.wp.date}()},76:function(e,t){!function(){e.exports=this.wp.dom}()},8:function(e,t){!function(){e.exports=this.moment}()},80:function(e,t){},81:function(e,t){},83:function(e,t){},84:function(e,t){},9:function(e,t){!function(){e.exports=this.React}()}});
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-top-rated"]=function(e){function t(t){for(var r,a,i=t[0],s=t[1],u=t[2],d=0,b=[];d<i.length;d++)a=i[d],n[a]&&b.push(n[a][0]),n[a]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(l&&l(t);b.length;)b.shift()();return c.push.apply(c,u||[]),o()}function o(){for(var e,t=0;t<c.length;t++){for(var o=c[t],r=!0,i=1;i<o.length;i++){var s=o[i];0!==n[s]&&(r=!1)}r&&(c.splice(t--,1),e=a(a.s=o[0]))}return e}var r={},n={13:0},c=[];function a(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=e,a.c=r,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(o,r,function(t){return e[t]}.bind(null,r));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],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 c.push([521,0,2,1]),o()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t){!function(){e.exports=this.wp.apiFetch}()},11:function(e,t){!function(){e.exports=this.React}()},18:function(e,t){!function(){e.exports=this.wp.blocks}()},19:function(e,t){!function(){e.exports=this.wp.url}()},22:function(e,t){!function(){e.exports=this.wp.compose}()},29:function(e,t){!function(){e.exports=this.wp.keycodes}()},3:function(e,t){!function(){e.exports=this.wp.components}()},30:function(e,t,o){"use strict";o.d(t,"b",function(){return r});var r=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:wc_product_block_data.default_columns},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}}}},31:function(e,t,o){"use strict";var r=o(8),n=o.n(r),c=o(0),a=o(1),i=o(4),s=o.n(i),u=o(3),l=function(e){var t=e.onChange,o=e.settings,r=o.button,i=o.price,s=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product title","woo-gutenberg-products-block"),help:l?Object(a.__)("Product title is visible.","woo-gutenberg-products-block"):Object(a.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return t(n()({},o,{title:!l}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product price","woo-gutenberg-products-block"),help:i?Object(a.__)("Product price is visible.","woo-gutenberg-products-block"):Object(a.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:function(){return t(n()({},o,{price:!i}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(a.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(a.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:function(){return t(n()({},o,{rating:!s}))}}),Object(c.createElement)(u.ToggleControl,{label:Object(a.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(a.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(a.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return t(n()({},o,{button:!r}))}}))};l.propTypes={settings:s.a.shape({button:s.a.bool.isRequired,price:s.a.bool.isRequired,rating:s.a.bool.isRequired,title:s.a.bool.isRequired}).isRequired,onChange:s.a.func.isRequired},t.a=l},34:function(e,t,o){"use strict";var r=o(0),n=o(1),c=o(5),a=o(4),i=o.n(a),s=o(3),u=function(e){var t=e.columns,o=e.rows,a=e.setAttributes,i=e.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_columns,wc_product_block_data.max_columns);a({columns:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(s.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(e){var t=Object(c.clamp)(e,wc_product_block_data.min_rows,wc_product_block_data.max_rows);a({rows:Object(c.isNaN)(t)?"":t})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(s.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:i?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:i,onChange:function(){return a({alignButtons:!i})}}))};u.propTypes={columns:i.a.oneOfType([i.a.number,i.a.string]).isRequired,rows:i.a.oneOfType([i.a.number,i.a.string]).isRequired,alignButtons:i.a.bool.isRequired,setAttributes:i.a.func.isRequired},t.a=u},35:function(e,t,o){"use strict";var r=o(0),n=o(6),c=o.n(n),a=o(48),i=o.n(a);o.d(t,"a",function(){return s});var s=function(e){return function(t){var o=t.attributes,n=o.align,a=o.contentVisibility,s=c()(n?"align".concat(n):"",{"is-hidden-title":!a.title,"is-hidden-price":!a.price,"is-hidden-rating":!a.rating,"is-hidden-button":!a.button});return Object(r.createElement)(r.RawHTML,{className:s},function(e,t){var o=e.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,a=o.catOperator,s=o.orderby,u=o.products,l=o.columns||wc_product_block_data.default_columns,d=o.rows||wc_product_block_data.default_rows,b=new Map;switch(b.set("limit",d*l),b.set("columns",l),c&&c.length&&(b.set("category",c.join(",")),a&&"all"===a&&b.set("cat_operator","AND")),r&&r.length&&(b.set("terms",r.map(function(e){return e.id}).join(",")),b.set("attribute",r[0].attr_slug),n&&"all"===n&&b.set("terms_operator","AND")),s&&("price_desc"===s?(b.set("orderby","price"),b.set("order","DESC")):"price_asc"===s?(b.set("orderby","price"),b.set("order","ASC")):"date"===s?(b.set("orderby","date"),b.set("order","DESC")):b.set("orderby",s)),t){case"woocommerce/product-best-sellers":b.set("best_selling","1");break;case"woocommerce/product-top-rated":b.set("orderby","rating");break;case"woocommerce/product-on-sale":b.set("on_sale","1");break;case"woocommerce/product-new":b.set("orderby","date"),b.set("order","DESC");break;case"woocommerce/handpicked-products":if(!u.length)return"";b.set("ids",u.join(",")),b.set("limit",u.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,f=!1,m=void 0;try{for(var _,h=b[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=i()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(e){f=!0,m=e}finally{try{g||null==h.return||h.return()}finally{if(f)throw m}}return p+="]"}(t,e))}}},36:function(e,t){!function(){e.exports=this.ReactDOM}()},37:function(e,t,o){"use strict";var r=o(27),n=o.n(r),c=o(13),a=o.n(c),i=o(14),s=o.n(i),u=o(15),l=o.n(u),d=o(16),b=o.n(d),p=o(12),g=o.n(p),f=o(17),m=o.n(f),_=o(0),h=o(1),w=o(19),O=o(10),j=o.n(O),k=o(5),y=o(4),v=o.n(y),C=o(24),x=o(3),E=(o(79),function(e){function t(){var e;return a()(this,t),(e=l()(this,b()(t).apply(this,arguments))).state={list:[],loading:!0},e.renderItem=e.renderItem.bind(g()(e)),e}return m()(t,e),s()(t,[{key:"componentDidMount",value:function(){var e=this;j()({path:Object(w.addQueryArgs)("/wc/blocks/products/categories",{per_page:-1})}).then(function(t){e.setState({list:t,loading:!1})}).catch(function(){e.setState({list:[],loading:!1})})}},{key:"renderItem",value:function(e){var t=e.item,o=e.search,r=e.depth,c=void 0===r?0:r,a=["woocommerce-product-categories__item"];o.length&&a.push("is-searching"),0===c&&0!==t.parent&&a.push("is-skip-level");var i=t.breadcrumbs.length?"".concat(t.breadcrumbs.join(", "),", ").concat(t.name):t.name;return Object(_.createElement)(C.b,n()({className:a.join(" ")},e,{showCount:!0,"aria-label":Object(h.sprintf)(Object(h._n)("%s, has %d product","%s, has %d products",t.count,"woo-gutenberg-products-block"),i,t.count)}))}},{key:"render",value:function(){var e=this.state,t=e.list,o=e.loading,r=this.props,n=r.onChange,c=r.onOperatorChange,a=r.operator,i=r.selected,s=r.isSingle,u={clear:Object(h.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(h.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(h.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(h.__)("Search for product categories","woo-gutenberg-products-block"),selected:function(e){return Object(h.sprintf)(Object(h._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e)},updated:Object(h.__)("Category search results updated.","woo-gutenberg-products-block")};return Object(_.createElement)(_.Fragment,null,Object(_.createElement)(C.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:i.map(function(e){return Object(k.find)(t,{id:e})}).filter(Boolean),onChange:n,renderItem:this.renderItem,messages:u,isHierarchical:!0,isSingle:s}),!!c&&Object(_.createElement)("div",{className:i.length<2?"screen-reader-text":""},Object(_.createElement)(x.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(h.__)("Display products matching","woo-gutenberg-products-block"),help:Object(h.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:a,onChange:c,options:[{label:Object(h.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(h.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))}}]),t}(_.Component));E.propTypes={onChange:v.a.func.isRequired,onOperatorChange:v.a.func,operator:v.a.oneOf(["all","any"]),selected:v.a.array.isRequired,isSingle:v.a.bool},E.defaultProps={operator:"any",isSingle:!1},t.a=E},39:function(e,t){!function(){e.exports=this.wp.viewport}()},46:function(e,t){!function(){e.exports=this.wp.hooks}()},5:function(e,t){!function(){e.exports=this.lodash}()},51:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},52:function(e,t){!function(){e.exports=this.wp.date}()},521:function(e,t,o){"use strict";o.r(t);var r=o(8),n=o.n(r),c=o(0),a=o(1),i=o(18),s=o(25),u=o.n(s),l=o(5),d=o(13),b=o.n(d),p=o(14),g=o.n(p),f=o(15),m=o.n(f),_=o(16),h=o.n(_),w=o(17),O=o.n(w),j=o(3),k=o(9),y=o(4),v=o.n(y),C=o(31),x=o(34),E=o(37),P=function(e){function t(){return b()(this,t),m()(this,h()(t).apply(this,arguments))}return O()(t,e),g()(t,[{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,o=e.setAttributes,r=t.categories,n=t.catOperator,i=t.columns,s=t.contentVisibility,u=t.rows,l=t.alignButtons;return Object(c.createElement)(k.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(x.a,{columns:i,rows:u,alignButtons:l,setAttributes:o})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(C.a,{settings:s,onChange:function(e){return o({contentVisibility:e})}})),Object(c.createElement)(j.PanelBody,{title:Object(a.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(c.createElement)(E.a,{selected:r,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});o({categories:t})},operator:n,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({catOperator:e})}})))}},{key:"render",value:function(){var e=this.props,t=e.name,o=e.attributes;return Object(c.createElement)(c.Fragment,null,this.getInspectorControls(),Object(c.createElement)(j.Disabled,null,Object(c.createElement)(k.ServerSideRender,{block:t,attributes:o})))}}]),t}(c.Component);P.propTypes={attributes:v.a.object.isRequired,name:v.a.string.isRequired,setAttributes:v.a.func.isRequired};var R=P,S=o(35),A=o(30),B="woocommerce/product-top-rated";Object(i.registerBlockType)(B,{title:Object(a.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(u.a,{icon:"trophy"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:n()({},A.a),transforms:{from:[{type:"block",blocks:Object(l.without)(A.b,B),transform:function(e){return Object(i.createBlock)("woocommerce/product-top-rated",e)}}]},deprecated:[{attributes:A.a,save:Object(S.a)(B)}],edit:function(e){return Object(c.createElement)(R,e)},save:function(){return null}})},54:function(e,t){!function(){e.exports=this.wp.dom}()},55:function(e,t){},56:function(e,t){},57:function(e,t){},58:function(e,t){},7:function(e,t){!function(){e.exports=this.moment}()},9:function(e,t){!function(){e.exports=this.wp.editor}()}});
build/products-attribute.js DELETED
@@ -1 +0,0 @@
1
- this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-attribute"]=function(t){function e(e){for(var o,i,a=e[0],u=e[1],s=e[2],b=0,d=[];b<a.length;b++)i=a[b],n[i]&&d.push(n[i][0]),n[i]=0;for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(t[o]=u[o]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,s||[]),r()}function r(){for(var t,e=0;e<c.length;e++){for(var r=c[e],o=!0,a=1;a<r.length;a++){var u=r[a];0!==n[u]&&(o=!1)}o&&(c.splice(e--,1),t=i(i.s=r[0]))}return t}var o={},n={14:0},c=[];function i(e){if(o[e])return o[e].exports;var r=o[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=o,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(r,o,function(e){return t[e]}.bind(null,o));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=e,a=a.slice();for(var s=0;s<a.length;s++)e(a[s]);var l=u;return c.push([542,1,3,2,0]),r()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},17:function(t,e){!function(){t.exports=this.wp.apiFetch}()},18:function(t,e){!function(){t.exports=this.wp.editor}()},27:function(t,e){!function(){t.exports=this.wp.blocks}()},3:function(t,e){!function(){t.exports=this.wp.components}()},30:function(t,e){!function(){t.exports=this.wp.compose}()},35:function(t,e){!function(){t.exports=this.wp.url}()},38:function(t,e){!function(){t.exports=this.wp.keycodes}()},4:function(t,e){!function(){t.exports=this.lodash}()},41:function(t,e,r){"use strict";var o=r(15),n=r.n(o),c=r(0),i=r(1),a=r(5),u=r.n(a),s=r(3),l=function(t){var e=t.onChange,r=t.settings,o=r.button,a=r.price,u=r.rating,l=r.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(n()({},r,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:a?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return e(n()({},r,{price:!a}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return e(n()({},r,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:o?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:o,onChange:function(){return e(n()({},r,{button:!o}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},e.a=l},42:function(t,e,r){"use strict";var o=r(0),n=r(6),c=r.n(n),i=r(59),a=r.n(i);r.d(e,"a",function(){return u});var u=function(t){return function(e){var r=e.attributes,n=r.align,i=r.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(o.createElement)(o.RawHTML,{className:u},function(t,e){var r=t.attributes,o=r.attributes,n=r.attrOperator,c=r.categories,i=r.catOperator,u=r.orderby,s=r.products,l=r.columns||wc_product_block_data.default_columns,b=r.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),o&&o.length&&(d.set("terms",o.map(function(t){return t.id}).join(",")),d.set("attribute",o[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),u&&("price_desc"===u?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===u?(d.set("orderby","price"),d.set("order","ASC")):"date"===u?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",u)),e){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";d.set("ids",s.join(",")),d.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!o||!o.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=a()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(t){m=!0,f=t}finally{try{g||null==h.return||h.return()}finally{if(m)throw f}}return p+="]"}(e,t))}}},46:function(t,e,r){"use strict";var o=r(0),n=r(1),c=r(4),i=r(5),a=r.n(i),u=r(3),s=function(t){var e=t.columns,r=t.rows,i=t.setAttributes;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(u.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_columns,wc_product_block_data.max_columns);i({columns:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(o.createElement)(u.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_rows,wc_product_block_data.max_rows);i({rows:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}))};s.propTypes={columns:a.a.oneOfType([a.a.number,a.a.string]).isRequired,rows:a.a.oneOfType([a.a.number,a.a.string]).isRequired,setAttributes:a.a.func.isRequired},e.a=s},50:function(t,e){!function(){t.exports=this.ReactDOM}()},51:function(t,e){!function(){t.exports=this.wp.viewport}()},533:function(t,e,r){var o=r(534);"string"==typeof o&&(o=[[t.i,o,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};r(66)(o,n);o.locals&&(t.exports=o.locals)},534:function(t,e,r){},542:function(t,e,r){"use strict";r.r(e);var o=r(0),n=r(1),c=r(74),i=r.n(c),a=r(27),u=(r(533),r(22)),s=r.n(u),l=r(23),b=r.n(l),d=r(24),p=r.n(d),g=r(25),m=r.n(g),f=r(26),_=r.n(f),h=r(18),w=r(3),O=r(5),j=r.n(O),y=r(41),k=r(46),v=r(77),C=r.n(v),E=r(53),S=r.n(E),x=r(170),A=r.n(x),P=r(15),R=r.n(P),T=r(33),M=r.n(T),q=r(35),N=r(17),D=r.n(N),L=r(4),B=r(37),I=(r(535),function(t){function e(){var t;return s()(this,e),(t=p()(this,m()(e).apply(this,arguments))).state={list:[],loading:!0,attribute:0,termsList:{},termsLoading:!0},t.debouncedGetTerms=Object(L.debounce)(t.getTerms.bind(M()(t)),200),t.renderItem=t.renderItem.bind(M()(t)),t.onSelectAttribute=t.onSelectAttribute.bind(M()(t)),t}return _()(e,t),b()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;D()({path:Object(q.addQueryArgs)("/wc-blocks/v1/products/attributes",{per_page:-1})}).then(function(r){r=r.map(function(t){return R()({},t,{parent:0})}),t.setState(function(t){var o=t.attribute;if(!o&&e.length>0){var n=Object(L.find)(r,{slug:e[0].attr_slug});o=n?n.id:0}return{list:r,attribute:o,loading:!1}})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"componentDidUpdate",value:function(t,e){e.attribute!==this.state.attribute&&this.debouncedGetTerms()}},{key:"getTerms",value:function(){var t=this,e=this.state,r=e.attribute,o=e.termsList;r&&(o[r]||this.setState({termsLoading:!0}),D()({path:Object(q.addQueryArgs)("/wc-blocks/v1/products/attributes/".concat(r,"/terms"),{per_page:-1})}).then(function(e){e=e.map(function(t){return R()({},t,{parent:r,attr_slug:t.attribute.slug})}),t.setState(function(t){return{termsList:R()({},t.termsList,A()({},r,e)),termsLoading:!1}})}).catch(function(){t.setState({termsLoading:!1})}))}},{key:"onSelectAttribute",value:function(t){var e=this;return function(){e.props.onChange([]),e.setState({attribute:t.id===e.state.attribute?0:t.id})}}},{key:"renderItem",value:function(t){var e=t.item,r=t.search,c=t.depth,i=void 0===c?0:c,a=this.state,u=a.attribute,s=a.termsLoading,l=["woocommerce-product-attributes__item","woocommerce-search-list__item"];return r.length&&l.push("is-searching"),0===i&&0!==e.parent&&l.push("is-skip-level"),e.breadcrumbs.length?Object(o.createElement)(B.b,S()({className:l.join(" ")},t,{showCount:!0,"aria-label":"".concat(e.breadcrumbs[0],": ").concat(e.name)})):[Object(o.createElement)(B.b,S()({key:"attr-".concat(e.id)},t,{className:l.join(" "),isSelected:u===e.id,onSelect:this.onSelectAttribute,isSingle:!0,disabled:"0"===e.count,"aria-expanded":u===e.id,"aria-label":Object(n.sprintf)(Object(n._n)("%s, has %d term","%s, has %d terms",e.count,"woo-gutenberg-products-block"),e.name,e.count)})),u===e.id&&s&&Object(o.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-product-attributes__itemdepth-1 is-loading is-not-active"},Object(o.createElement)(w.Spinner,null))]}},{key:"render",value:function(){var t=this.state,e=t.attribute,r=t.list,c=t.loading,i=t.termsList,a=this.props,u=a.onChange,s=a.onOperatorChange,l=a.operator,b=a.selected,d=i[e]||[],p=[].concat(C()(r),C()(d)),g={clear:Object(n.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(n.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product attributes","woo-gutenberg-products-block"),selected:function(t){return Object(n.sprintf)(Object(n._n)("%d attribute selected","%d attributes selected",t,"woo-gutenberg-products-block"),t)},updated:Object(n.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(B.a,{className:"woocommerce-product-attributes",list:p,isLoading:c,selected:b.map(function(t){var e=t.id;return Object(L.find)(p,{id:e})}).filter(Boolean),onChange:u,renderItem:this.renderItem,messages:g,isHierarchical:!0}),!!s&&Object(o.createElement)("div",{className:b.length<2?"screen-reader-text":""},Object(o.createElement)(w.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:l,onChange:s,options:[{label:Object(n.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(o.Component));I.propTypes={onChange:j.a.func.isRequired,onOperatorChange:j.a.func,operator:j.a.oneOf(["all","any"]),selected:j.a.array.isRequired},I.defaultProps={operator:"any"};var F=I,V=r(69),W=function(t){function e(){return s()(this,e),p()(this,m()(e).apply(this,arguments))}return _()(e,t),b()(e,[{key:"getInspectorControls",value:function(){var t=this.props.setAttributes,e=this.props.attributes,r=e.attributes,c=e.attrOperator,i=e.columns,a=e.contentVisibility,u=e.orderby,s=e.rows;return Object(o.createElement)(h.InspectorControls,{key:"inspector"},Object(o.createElement)(w.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(k.a,{columns:i,rows:s,setAttributes:t})),Object(o.createElement)(w.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(y.a,{settings:a,onChange:function(e){return t({contentVisibility:e})}})),Object(o.createElement)(w.PanelBody,{title:Object(n.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(F,{selected:r,onChange:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(t){return{id:t.id,attr_slug:t.attr_slug}});t({attributes:e})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})}})),Object(o.createElement)(w.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(V.a,{setAttributes:t,value:u})))}},{key:"renderEditMode",value:function(){var t=this.props,e=t.debouncedSpeak,r=t.setAttributes,c=this.props.attributes;return Object(o.createElement)(w.Placeholder,{icon:Object(o.createElement)(i.a,{icon:"custom-post-type"}),label:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-attribute"},Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-products-attribute__selection"},Object(o.createElement)(F,{selected:c.attributes,onChange:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(t){return{id:t.id,attr_slug:t.attr_slug}});r({attributes:t})},operator:c.attrOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return r({attrOperator:t})}}),Object(o.createElement)(w.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),e(Object(n.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var t=this.props,e=t.attributes,r=t.name,c=t.setAttributes,i=e.editMode;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(h.BlockControls,null,Object(o.createElement)(w.Toolbar,{controls:[{icon:"edit",title:Object(n.__)("Edit"),onClick:function(){return c({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(o.createElement)(w.Disabled,null,Object(o.createElement)(h.ServerSideRender,{block:r,attributes:e})))}}]),e}(o.Component);W.propTypes={attributes:j.a.object.isRequired,name:j.a.string.isRequired,setAttributes:j.a.func.isRequired,debouncedSpeak:j.a.func.isRequired};var G=Object(w.withSpokenMessages)(W),H=r(42);Object(a.registerBlockType)("woocommerce/products-by-attribute",{title:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(i.a,{icon:"custom-post-type"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:wc_product_block_data.default_rows}},deprecated:[{attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:wc_product_block_data.default_rows}},save:Object(H.a)("woocommerce/products-by-attribute")}],edit:function(t){return Object(o.createElement)(G,t)},save:function(){return null}})},65:function(t,e){!function(){t.exports=this.wp.hooks}()},67:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},68:function(t,e){!function(){t.exports=this.wp.date}()},69:function(t,e,r){"use strict";var o=r(0),n=r(1),c=r(3),i=r(5),a=r.n(i),u=function(t){var e=t.value,r=t.setAttributes;return Object(o.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return r({orderby:t})}})};u.propTypes={setAttributes:a.a.func.isRequired,value:a.a.string.isRequired},e.a=u},76:function(t,e){!function(){t.exports=this.wp.dom}()},8:function(t,e){!function(){t.exports=this.moment}()},80:function(t,e){},81:function(t,e){},83:function(t,e){},84:function(t,e){},9:function(t,e){!function(){t.exports=this.React}()}});
 
build/products-by-attribute.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["lodash","moment","react","react-dom","wp-api-fetch","wp-blocks","wp-components","wp-compose","wp-date","wp-dom","wp-editor","wp-element","wp-hooks","wp-html-entities","wp-i18n","wp-keycodes","wp-polyfill","wp-url","wp-viewport"]
build/products-by-attribute.js ADDED
@@ -0,0 +1 @@
 
1
+ this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-by-attribute"]=function(t){function e(e){for(var r,i,a=e[0],u=e[1],s=e[2],b=0,d=[];b<a.length;b++)i=a[b],n[i]&&d.push(n[i][0]),n[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);for(l&&l(e);d.length;)d.shift()();return c.push.apply(c,s||[]),o()}function o(){for(var t,e=0;e<c.length;e++){for(var o=c[e],r=!0,a=1;a<o.length;a++){var u=o[a];0!==n[u]&&(r=!1)}r&&(c.splice(e--,1),t=i(i.s=o[0]))}return t}var r={},n={14:0},c=[];function i(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=r,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(o,r,function(e){return t[e]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=e,a=a.slice();for(var s=0;s<a.length;s++)e(a[s]);var l=u;return c.push([514,0,2,1]),o()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},10:function(t,e){!function(){t.exports=this.wp.apiFetch}()},11:function(t,e){!function(){t.exports=this.React}()},18:function(t,e){!function(){t.exports=this.wp.blocks}()},19:function(t,e){!function(){t.exports=this.wp.url}()},22:function(t,e){!function(){t.exports=this.wp.compose}()},29:function(t,e){!function(){t.exports=this.wp.keycodes}()},3:function(t,e){!function(){t.exports=this.wp.components}()},31:function(t,e,o){"use strict";var r=o(8),n=o.n(r),c=o(0),i=o(1),a=o(4),u=o.n(a),s=o(3),l=function(t){var e=t.onChange,o=t.settings,r=o.button,a=o.price,u=o.rating,l=o.title;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product title","woo-gutenberg-products-block"),help:l?Object(i.__)("Product title is visible.","woo-gutenberg-products-block"):Object(i.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:l,onChange:function(){return e(n()({},o,{title:!l}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product price","woo-gutenberg-products-block"),help:a?Object(i.__)("Product price is visible.","woo-gutenberg-products-block"):Object(i.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:function(){return e(n()({},o,{price:!a}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Product rating","woo-gutenberg-products-block"),help:u?Object(i.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(i.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:u,onChange:function(){return e(n()({},o,{rating:!u}))}}),Object(c.createElement)(s.ToggleControl,{label:Object(i.__)("Add to Cart button","woo-gutenberg-products-block"),help:r?Object(i.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(i.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:r,onChange:function(){return e(n()({},o,{button:!r}))}}))};l.propTypes={settings:u.a.shape({button:u.a.bool.isRequired,price:u.a.bool.isRequired,rating:u.a.bool.isRequired,title:u.a.bool.isRequired}).isRequired,onChange:u.a.func.isRequired},e.a=l},34:function(t,e,o){"use strict";var r=o(0),n=o(1),c=o(5),i=o(4),a=o.n(i),u=o(3),s=function(t){var e=t.columns,o=t.rows,i=t.setAttributes,a=t.alignButtons;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:e,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_columns,wc_product_block_data.max_columns);i({columns:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_columns,max:wc_product_block_data.max_columns}),Object(r.createElement)(u.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:o,onChange:function(t){var e=Object(c.clamp)(t,wc_product_block_data.min_rows,wc_product_block_data.max_rows);i({rows:Object(c.isNaN)(e)?"":e})},min:wc_product_block_data.min_rows,max:wc_product_block_data.max_rows}),Object(r.createElement)(u.ToggleControl,{label:Object(n.__)("Align Add to Cart buttons","woo-gutenberg-products-block"),help:a?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:a,onChange:function(){return i({alignButtons:!a})}}))};s.propTypes={columns:a.a.oneOfType([a.a.number,a.a.string]).isRequired,rows:a.a.oneOfType([a.a.number,a.a.string]).isRequired,alignButtons:a.a.bool.isRequired,setAttributes:a.a.func.isRequired},e.a=s},35:function(t,e,o){"use strict";var r=o(0),n=o(6),c=o.n(n),i=o(48),a=o.n(i);o.d(e,"a",function(){return u});var u=function(t){return function(e){var o=e.attributes,n=o.align,i=o.contentVisibility,u=c()(n?"align".concat(n):"",{"is-hidden-title":!i.title,"is-hidden-price":!i.price,"is-hidden-rating":!i.rating,"is-hidden-button":!i.button});return Object(r.createElement)(r.RawHTML,{className:u},function(t,e){var o=t.attributes,r=o.attributes,n=o.attrOperator,c=o.categories,i=o.catOperator,u=o.orderby,s=o.products,l=o.columns||wc_product_block_data.default_columns,b=o.rows||wc_product_block_data.default_rows,d=new Map;switch(d.set("limit",b*l),d.set("columns",l),c&&c.length&&(d.set("category",c.join(",")),i&&"all"===i&&d.set("cat_operator","AND")),r&&r.length&&(d.set("terms",r.map(function(t){return t.id}).join(",")),d.set("attribute",r[0].attr_slug),n&&"all"===n&&d.set("terms_operator","AND")),u&&("price_desc"===u?(d.set("orderby","price"),d.set("order","DESC")):"price_asc"===u?(d.set("orderby","price"),d.set("order","ASC")):"date"===u?(d.set("orderby","date"),d.set("order","DESC")):d.set("orderby",u)),e){case"woocommerce/product-best-sellers":d.set("best_selling","1");break;case"woocommerce/product-top-rated":d.set("orderby","rating");break;case"woocommerce/product-on-sale":d.set("on_sale","1");break;case"woocommerce/product-new":d.set("orderby","date"),d.set("order","DESC");break;case"woocommerce/handpicked-products":if(!s.length)return"";d.set("ids",s.join(",")),d.set("limit",s.length);break;case"woocommerce/product-category":if(!c||!c.length)return"";break;case"woocommerce/products-by-attribute":if(!r||!r.length)return""}var p="[products",g=!0,m=!1,f=void 0;try{for(var _,h=d[Symbol.iterator]();!(g=(_=h.next()).done);g=!0){var w=a()(_.value,2);p+=" "+w[0]+'="'+w[1]+'"'}}catch(t){m=!0,f=t}finally{try{g||null==h.return||h.return()}finally{if(m)throw f}}return p+="]"}(e,t))}}},36:function(t,e){!function(){t.exports=this.ReactDOM}()},39:function(t,e){!function(){t.exports=this.wp.viewport}()},46:function(t,e){!function(){t.exports=this.wp.hooks}()},47:function(t,e,o){"use strict";var r=o(0),n=o(1),c=o(3),i=o(4),a=o.n(i),u=function(t){var e=t.value,o=t.setAttributes;return Object(r.createElement)(c.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:e,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(t){return o({orderby:t})}})};u.propTypes={setAttributes:a.a.func.isRequired,value:a.a.string.isRequired},e.a=u},494:function(t,e,o){var r=o(495);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};o(38)(r,n);r.locals&&(t.exports=r.locals)},495:function(t,e,o){},5:function(t,e){!function(){t.exports=this.lodash}()},51:function(t,e){!function(){t.exports=this.wp.htmlEntities}()},514:function(t,e,o){"use strict";o.r(e);var r=o(0),n=o(1),c=o(25),i=o.n(c),a=o(18),u=(o(494),o(13)),s=o.n(u),l=o(14),b=o.n(l),d=o(15),p=o.n(d),g=o(16),m=o.n(g),f=o(17),_=o.n(f),h=o(9),w=o(3),O=o(4),y=o.n(O),j=o(31),k=o(34),v=o(60),C=o.n(v),E=o(27),S=o.n(E),x=o(92),A=o.n(x),P=o(8),R=o.n(P),T=o(12),B=o.n(T),q=o(19),M=o(10),N=o.n(M),D=o(5),L=o(24),I=(o(496),function(t){function e(){var t;return s()(this,e),(t=p()(this,m()(e).apply(this,arguments))).state={list:[],loading:!0,attribute:0,termsList:{},termsLoading:!0},t.debouncedGetTerms=Object(D.debounce)(t.getTerms.bind(B()(t)),200),t.renderItem=t.renderItem.bind(B()(t)),t.onSelectAttribute=t.onSelectAttribute.bind(B()(t)),t}return _()(e,t),b()(e,[{key:"componentDidMount",value:function(){var t=this,e=this.props.selected;N()({path:Object(q.addQueryArgs)("/wc/blocks/products/attributes",{per_page:-1})}).then(function(o){o=o.map(function(t){return R()({},t,{parent:0})}),t.setState(function(t){var r=t.attribute;if(!r&&e.length>0){var n=Object(D.find)(o,{slug:e[0].attr_slug});r=n?n.id:0}return{list:o,attribute:r,loading:!1}})}).catch(function(){t.setState({list:[],loading:!1})})}},{key:"componentDidUpdate",value:function(t,e){e.attribute!==this.state.attribute&&this.debouncedGetTerms()}},{key:"getTerms",value:function(){var t=this,e=this.state,o=e.attribute,r=e.termsList;o&&(r[o]||this.setState({termsLoading:!0}),N()({path:Object(q.addQueryArgs)("/wc/blocks/products/attributes/".concat(o,"/terms"),{per_page:-1})}).then(function(e){e=e.map(function(t){return R()({},t,{parent:o,attr_slug:t.attribute.slug})}),t.setState(function(t){return{termsList:R()({},t.termsList,A()({},o,e)),termsLoading:!1}})}).catch(function(){t.setState({termsLoading:!1})}))}},{key:"onSelectAttribute",value:function(t){var e=this;return function(){e.props.onChange([]),e.setState({attribute:t.id===e.state.attribute?0:t.id})}}},{key:"renderItem",value:function(t){var e=t.item,o=t.search,c=t.depth,i=void 0===c?0:c,a=this.state,u=a.attribute,s=a.termsLoading,l=["woocommerce-product-attributes__item","woocommerce-search-list__item"];return o.length&&l.push("is-searching"),0===i&&0!==e.parent&&l.push("is-skip-level"),e.breadcrumbs.length?Object(r.createElement)(L.b,S()({className:l.join(" ")},t,{showCount:!0,"aria-label":"".concat(e.breadcrumbs[0],": ").concat(e.name)})):[Object(r.createElement)(L.b,S()({key:"attr-".concat(e.id)},t,{className:l.join(" "),isSelected:u===e.id,onSelect:this.onSelectAttribute,isSingle:!0,disabled:"0"===e.count,"aria-expanded":u===e.id,"aria-label":Object(n.sprintf)(Object(n._n)("%s, has %d term","%s, has %d terms",e.count,"woo-gutenberg-products-block"),e.name,e.count)})),u===e.id&&s&&Object(r.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-product-attributes__itemdepth-1 is-loading is-not-active"},Object(r.createElement)(w.Spinner,null))]}},{key:"render",value:function(){var t=this.state,e=t.attribute,o=t.list,c=t.loading,i=t.termsList,a=this.props,u=a.onChange,s=a.onOperatorChange,l=a.operator,b=a.selected,d=i[e]||[],p=[].concat(C()(o),C()(d)),g={clear:Object(n.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(n.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product attributes","woo-gutenberg-products-block"),selected:function(t){return Object(n.sprintf)(Object(n._n)("%d attribute selected","%d attributes selected",t,"woo-gutenberg-products-block"),t)},updated:Object(n.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(L.a,{className:"woocommerce-product-attributes",list:p,isLoading:c,selected:b.map(function(t){var e=t.id;return Object(D.find)(p,{id:e})}).filter(Boolean),onChange:u,renderItem:this.renderItem,messages:g,isHierarchical:!0}),!!s&&Object(r.createElement)("div",{className:b.length<2?"screen-reader-text":""},Object(r.createElement)(w.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:l,onChange:s,options:[{label:Object(n.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))}}]),e}(r.Component));I.propTypes={onChange:y.a.func.isRequired,onOperatorChange:y.a.func,operator:y.a.oneOf(["all","any"]),selected:y.a.array.isRequired},I.defaultProps={operator:"any"};var F=I,V=o(47),W=function(t){function e(){return s()(this,e),p()(this,m()(e).apply(this,arguments))}return _()(e,t),b()(e,[{key:"getInspectorControls",value:function(){var t=this.props.setAttributes,e=this.props.attributes,o=e.attributes,c=e.attrOperator,i=e.columns,a=e.contentVisibility,u=e.orderby,s=e.rows,l=e.alignButtons;return Object(r.createElement)(h.InspectorControls,{key:"inspector"},Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(k.a,{columns:i,rows:s,alignButtons:l,setAttributes:t})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(j.a,{settings:a,onChange:function(e){return t({contentVisibility:e})}})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(F,{selected:o,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=e.map(function(t){return{id:t.id,attr_slug:t.attr_slug}});t({attributes:o})},operator:c,onOperatorChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})}})),Object(r.createElement)(w.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(V.a,{setAttributes:t,value:u})))}},{key:"renderEditMode",value:function(){var t=this.props,e=t.debouncedSpeak,o=t.setAttributes,c=this.props.attributes;return Object(r.createElement)(w.Placeholder,{icon:Object(r.createElement)(i.a,{icon:"custom-post-type"}),label:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(r.createElement)(F,{selected:c.attributes,onChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t.map(function(t){return{id:t.id,attr_slug:t.attr_slug}});o({attributes:e})},operator:c.attrOperator,onOperatorChange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return o({attrOperator:t})}}),Object(r.createElement)(w.Button,{isDefault:!0,onClick:function(){o({editMode:!1}),e(Object(n.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var t=this.props,e=t.attributes,o=t.name,c=t.setAttributes,i=e.editMode;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(h.BlockControls,null,Object(r.createElement)(w.Toolbar,{controls:[{icon:"edit",title:Object(n.__)("Edit"),onClick:function(){return c({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(r.createElement)(w.Disabled,null,Object(r.createElement)(h.ServerSideRender,{block:o,attributes:e})))}}]),e}(r.Component);W.propTypes={attributes:y.a.object.isRequired,name:y.a.string.isRequired,setAttributes:y.a.func.isRequired,debouncedSpeak:y.a.func.isRequired};var G=Object(w.withSpokenMessages)(W),H=o(35);Object(a.registerBlockType)("woocommerce/products-by-attribute",{title:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{icon:"custom-post-type"}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:wc_product_block_data.default_rows},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:wc_product_block_data.default_rows}},save:Object(H.a)("woocommerce/products-by-attribute")}],edit:function(t){return Object(r.createElement)(G,t)},save:function(){return null}})},52:function(t,e){!function(){t.exports=this.wp.date}()},54:function(t,e){!function(){t.exports=this.wp.dom}()},55:function(t,e){},56:function(t,e){},57:function(t,e){},58:function(t,e){},7:function(t,e){!function(){t.exports=this.moment}()},9:function(t,e){!function(){t.exports=this.wp.editor}()}});
build/style.css CHANGED
@@ -1,3 +1,4 @@
1
- .wc-block-grid .wc-block-grid__products{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0 0 24px}.wc-block-grid .wc-block-grid__products .wc-block-grid__product{padding:0 16px 0 0;margin:0 0 24px;float:none;width:auto;position:relative;text-align:center}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-link{text-decoration:none}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-image{text-decoration:none;margin-bottom:16px;display:block}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-image img{vertical-align:middle;margin-left:auto;margin-right:auto}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-title{line-height:1.2;font-weight:700}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-price,.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-rating,.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-title{margin-bottom:12px;display:block}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wp-block-button{margin:0}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-add-to-cart,.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-add-to-cart a{margin:0;word-break:break-word;white-space:normal}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-add-to-cart a.loading{opacity:.25;padding-right:2.618em}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-add-to-cart a.loading:after{font-family:WooCommerce;content:"\e01c";vertical-align:top;font-weight:400;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-add-to-cart a.added:after{font-family:WooCommerce;content:"\e017";margin-left:.53em;vertical-align:bottom}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-add-to-cart .added_to_cart{text-align:center}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-onsale{font-weight:700;position:absolute;text-align:center;top:0;left:0;margin:0;background-color:#000;color:#fff;display:inline-block;font-size:.75em;line-height:1;padding:.5em;z-index:9;text-transform:uppercase}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-rating .star-rating{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;display:inline-block;margin:0 auto}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-rating .star-rating:before{content:"\53\53\53\53\53";top:0;left:0;right:0;position:absolute;opacity:.5;color:#aaa}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-rating .star-rating span{overflow:hidden;top:0;left:0;right:0;position:absolute;padding-top:1.5em}.wc-block-grid .wc-block-grid__products .wc-block-grid__product .wc-block-grid__product-rating .star-rating span:before{content:"\53\53\53\53\53";top:0;left:0;right:0;position:absolute;color:#000}.wc-block-grid.has-1-columns .wc-block-grid__products{display:block}.wc-block-grid.has-1-columns .wc-block-grid__product{margin-left:auto;margin-right:auto}.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%}.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 33.33333%;max-width:33.33333%}.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 25%;max-width:25%}.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 20%;max-width:20%}.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 16.66667%;max-width:16.66667%}.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 14.28571%;max-width:14.28571%}.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 12.5%;max-width:12.5%}.wc-block-grid .wc-block-grid__products,.wc-block-grid .wc-block-grid__products .wc-block-grid__product-title{font-size:1em}.wc-block-grid .wc-block-grid__products .wc-block-grid__product-price{font-size:.8em}.wc-block-grid .wc-block-grid__products .wc-block-grid__product-add-to-cart a,.wc-block-grid .wc-block-grid__products .wp-block-button span.wc-block-grid__product-add-to-cart{font-size:.8em;line-height:1.4}.wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__products,.wc-block-grid.has-5-columns:not(.alignfull) .wc-block-grid__products,.wc-block-grid.has-6-columns:not(.alignfull) .wc-block-grid__products,.wc-block-grid.has-7-columns .wc-block-grid__products,.wc-block-grid.has-8-columns .wc-block-grid__products{font-size:.8em}.theme-twentysixteen .wc-block-grid .price ins{color:#77a464}.theme-twentynineteen .wc-block-grid__product-onsale,.theme-twentynineteen .wc-block-grid__product-title{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}
2
- .wc-block-product-categories{margin-bottom:1em}.wc-block-product-categories.is-dropdown{display:flex}.wc-block-product-categories select{margin-right:.5em}.wp-block-woocommerce-product-categories.is-loading .wc-block-product-categories__placeholder{display:inline-block;height:1em;width:50%;min-width:200px;background:currentColor;opacity:.2}
3
- .wc-block-featured-product{position:relative;background-color:#24292d;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-product .wc-block-featured-product__wrapper{overflow:hidden;height:100%}.wc-block-featured-product.has-left-content{justify-content:flex-start}.wc-block-featured-product.has-left-content .wc-block-featured-product__description,.wc-block-featured-product.has-left-content .wc-block-featured-product__price,.wc-block-featured-product.has-left-content .wc-block-featured-product__title{margin-left:0;text-align:left}.wc-block-featured-product.has-right-content{justify-content:flex-end}.wc-block-featured-product.has-right-content .wc-block-featured-product__description,.wc-block-featured-product.has-right-content .wc-block-featured-product__price,.wc-block-featured-product.has-right-content .wc-block-featured-product__title{margin-right:0;text-align:right}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-product .wc-block-featured-product__description a,.wc-block-featured-product .wc-block-featured-product__description a:active,.wc-block-featured-product .wc-block-featured-product__description a:focus,.wc-block-featured-product .wc-block-featured-product__description a:hover,.wc-block-featured-product .wc-block-featured-product__price a,.wc-block-featured-product .wc-block-featured-product__price a:active,.wc-block-featured-product .wc-block-featured-product__price a:focus,.wc-block-featured-product .wc-block-featured-product__price a:hover,.wc-block-featured-product .wc-block-featured-product__title a,.wc-block-featured-product .wc-block-featured-product__title a:active,.wc-block-featured-product .wc-block-featured-product__title a:focus,.wc-block-featured-product .wc-block-featured-product__title a:hover{color:#fff}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__link,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title{width:100%;padding:0 48px 16px;z-index:1}.wc-block-featured-product .wc-block-featured-product__title{margin-top:0}.wc-block-featured-product .wc-block-featured-product__title:before{display:none}.wc-block-featured-product .wc-block-featured-product__description p{margin:0}.wc-block-featured-product.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-product.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-product.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-product.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-product.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-product.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-product.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-product.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-product.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-product.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-product.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{max-width:305px;width:100%}.wc-block-featured-product:after{display:block;content:"";font-size:0;min-height:inherit}@supports ((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-product:after{content:none}}.wc-block-featured-product.aligncenter,.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{display:flex}
 
1
+ .wc-block-grid__products{display:flex;flex-wrap:wrap;list-style:none;padding:0;margin:0 0 24px}.wc-block-grid__product{padding:0 16px 0 0;margin:0 0 24px;float:none;width:auto;position:relative;text-align:center}.wc-block-grid__product-link{text-decoration:none;border:0}.wc-block-grid__product-image{text-decoration:none;margin-bottom:16px;display:block}.wc-block-grid__product-image img{vertical-align:middle;margin-left:auto;margin-right:auto}.wc-block-grid__product-title{line-height:1.2;font-weight:700}.wc-block-grid__product-price,.wc-block-grid__product-rating,.wc-block-grid__product-title{margin-bottom:12px;display:block}.wc-block-grid__product-add-to-cart,.wc-block-grid__product-add-to-cart a{margin:0;word-break:break-word;white-space:normal}.wc-block-grid__product-add-to-cart a.loading{opacity:.25;padding-right:2.618em}.wc-block-grid__product-add-to-cart a.loading:after{font-family:WooCommerce;content:"\e01c";vertical-align:top;font-weight:400;position:absolute;top:.618em;right:1em;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}.wc-block-grid__product-add-to-cart a.added:after{font-family:WooCommerce;content:"\e017";margin-left:.53em;vertical-align:bottom}.wc-block-grid__product-add-to-cart .added_to_cart{text-align:center}.wc-block-grid__product-onsale{font-weight:700;position:absolute;text-align:center;top:0;left:0;margin:0;background-color:#000;color:#fff;display:inline-block;font-size:.75em;padding:.5em;z-index:9;text-transform:uppercase}.wc-block-grid__product-rating .star-rating{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;display:inline-block;margin:0 auto}.wc-block-grid__product-rating .star-rating:before{content:"\53\53\53\53\53";top:0;left:0;right:0;position:absolute;opacity:.5;color:#aaa}.wc-block-grid__product-rating .star-rating span{overflow:hidden;top:0;left:0;right:0;position:absolute;padding-top:1.5em}.wc-block-grid__product-rating .star-rating span:before{content:"\53\53\53\53\53";top:0;left:0;right:0;position:absolute;color:#000}.wc-block-grid.has-aligned-buttons .wc-block-grid__product{display:flex;flex-direction:column}.wc-block-grid.has-aligned-buttons .wc-block-grid__product-add-to-cart{margin-top:auto!important}.wc-block-grid.has-1-columns .wc-block-grid__products{display:block}.wc-block-grid.has-1-columns .wc-block-grid__product{margin-left:auto;margin-right:auto}.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%}.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 33.33333%;max-width:33.33333%}.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 25%;max-width:25%}.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 20%;max-width:20%}.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 16.66667%;max-width:16.66667%}.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 14.28571%;max-width:14.28571%}.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 12.5%;max-width:12.5%}.wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-5-columns:not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-6-columns:not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-7-columns .wc-block-grid__product,.wc-block-grid.has-8-columns .wc-block-grid__product{font-size:.8em}.theme-twentysixteen .wc-block-grid .price ins{color:#77a464}.theme-twentynineteen .wc-block-grid__product{font-size:.88889em}.theme-twentynineteen .wc-block-grid__product-onsale,.theme-twentynineteen .wc-block-grid__product-title{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.theme-twentynineteen .wc-block-grid__product-onsale{line-height:1}
2
+ .wc-block-featured-category{position:relative;background-color:#24292d;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category .wc-block-featured-category__wrapper{overflow:hidden;height:100%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category.has-left-content{justify-content:flex-start}.wc-block-featured-category.has-left-content .wc-block-featured-category__description,.wc-block-featured-category.has-left-content .wc-block-featured-category__price,.wc-block-featured-category.has-left-content .wc-block-featured-category__title{margin-left:0;text-align:left}.wc-block-featured-category.has-right-content{justify-content:flex-end}.wc-block-featured-category.has-right-content .wc-block-featured-category__description,.wc-block-featured-category.has-right-content .wc-block-featured-category__price,.wc-block-featured-category.has-right-content .wc-block-featured-category__title{margin-right:0;text-align:right}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-category .wc-block-featured-category__description a,.wc-block-featured-category .wc-block-featured-category__description a:active,.wc-block-featured-category .wc-block-featured-category__description a:focus,.wc-block-featured-category .wc-block-featured-category__description a:hover,.wc-block-featured-category .wc-block-featured-category__price a,.wc-block-featured-category .wc-block-featured-category__price a:active,.wc-block-featured-category .wc-block-featured-category__price a:focus,.wc-block-featured-category .wc-block-featured-category__price a:hover,.wc-block-featured-category .wc-block-featured-category__title a,.wc-block-featured-category .wc-block-featured-category__title a:active,.wc-block-featured-category .wc-block-featured-category__title a:focus,.wc-block-featured-category .wc-block-featured-category__title a:hover{color:#fff}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__link,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{width:100%;padding:0 48px 16px;z-index:1}.wc-block-featured-category .wc-block-featured-category__title{margin-top:0}.wc-block-featured-category .wc-block-featured-category__title:before{display:none}.wc-block-featured-category .wc-block-featured-category__description p{margin:0}.wc-block-featured-category.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-category.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-category.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-category.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-category.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-category.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-category.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-category.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-category.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-category.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-category.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{max-width:305px;width:100%}.wc-block-featured-category:after{display:block;content:"";font-size:0;min-height:inherit}@supports ((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-category:after{content:none}}.wc-block-featured-category.aligncenter,.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{display:flex}
3
+ .wc-block-product-categories{margin-bottom:1em}.wc-block-product-categories.is-dropdown{display:flex}.wc-block-product-categories select{margin-right:.5em}.wp-block-woocommerce-product-categories.is-loading .wc-block-product-categories__placeholder{display:inline-block;height:1em;width:50%;min-width:200px;background:currentColor;opacity:.2}.wc-block-product-categories__button{display:flex;align-items:center;text-decoration:none;font-size:13px;margin:0;border:none;cursor:pointer;-webkit-appearance:none;background:none;padding:8px;color:#555d66;position:relative;overflow:hidden;border-radius:4px}.wc-block-product-categories__button svg{fill:currentColor;outline:none}.wc-block-product-categories__button .screen-reader-text{height:auto}.wc-block-product-categories__button:active{color:currentColor}.wc-block-product-categories__button:disabled,.wc-block-product-categories__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-categories__button:focus:enabled{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.wc-block-product-categories__button:not(:disabled):not([aria-disabled=true]):hover{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #e2e4e7,inset 0 0 0 2px #fff,0 1px 1px rgba(25,30,35,.2)}.wc-block-product-categories__button:not(:disabled):not([aria-disabled=true]):active{outline:none;background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #ccd0d4,inset 0 0 0 2px #fff}.wc-block-product-categories__button:disabled:focus,.wc-block-product-categories__button[aria-disabled=true]:focus{box-shadow:none}
4
+ .wc-block-featured-product{position:relative;background-color:#24292d;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-product .wc-block-featured-product__wrapper{overflow:hidden;height:100%}.wc-block-featured-product.has-left-content{justify-content:flex-start}.wc-block-featured-product.has-left-content .wc-block-featured-product__description,.wc-block-featured-product.has-left-content .wc-block-featured-product__price,.wc-block-featured-product.has-left-content .wc-block-featured-product__title,.wc-block-featured-product.has-left-content .wc-block-featured-product__variation{margin-left:0;text-align:left}.wc-block-featured-product.has-right-content{justify-content:flex-end}.wc-block-featured-product.has-right-content .wc-block-featured-product__description,.wc-block-featured-product.has-right-content .wc-block-featured-product__price,.wc-block-featured-product.has-right-content .wc-block-featured-product__title,.wc-block-featured-product.has-right-content .wc-block-featured-product__variation{margin-right:0;text-align:right}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-product .wc-block-featured-product__description a,.wc-block-featured-product .wc-block-featured-product__description a:active,.wc-block-featured-product .wc-block-featured-product__description a:focus,.wc-block-featured-product .wc-block-featured-product__description a:hover,.wc-block-featured-product .wc-block-featured-product__price a,.wc-block-featured-product .wc-block-featured-product__price a:active,.wc-block-featured-product .wc-block-featured-product__price a:focus,.wc-block-featured-product .wc-block-featured-product__price a:hover,.wc-block-featured-product .wc-block-featured-product__title a,.wc-block-featured-product .wc-block-featured-product__title a:active,.wc-block-featured-product .wc-block-featured-product__title a:focus,.wc-block-featured-product .wc-block-featured-product__title a:hover,.wc-block-featured-product .wc-block-featured-product__variation a,.wc-block-featured-product .wc-block-featured-product__variation a:active,.wc-block-featured-product .wc-block-featured-product__variation a:focus,.wc-block-featured-product .wc-block-featured-product__variation a:hover{color:#fff}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__link,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{width:100%;padding:16px 48px 0;z-index:1}.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{margin-top:0;border:0}.wc-block-featured-product .wc-block-featured-product__title:before,.wc-block-featured-product .wc-block-featured-product__variation:before{display:none}.wc-block-featured-product .wc-block-featured-product__variation{font-style:italic;padding-top:0}.wc-block-featured-product .wc-block-featured-product__description p{margin:0;line-height:1.5em}.wc-block-featured-product.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-product.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-product.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-product.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-product.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-product.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-product.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-product.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-product.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-product.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-product.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{max-width:305px;width:100%}.wc-block-featured-product:after{display:block;content:"";font-size:0;min-height:inherit}@supports ((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-product:after{content:none}}.wc-block-featured-product.aligncenter,.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{display:flex}
build/vendors.js CHANGED
@@ -1,4 +1,4 @@
1
- (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[0],[,,,,,function(e,t,n){e.exports=n(304)()},function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
@@ -9,24 +9,16 @@
9
  Licensed under the MIT License (MIT), see
10
  http://jedwatson.github.io/classnames
11
  */
12
- !function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",function(){return r})},,,function(e,t,n){"use strict";function r(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 i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}n.d(t,"a",function(){return i})},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(134),i=n(7);function o(e,t){return!t||"object"!==Object(r.a)(t)&&"function"!=typeof t?Object(i.a)(e):t}},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(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)}n.d(t,"a",function(){return i})},function(e,t,n){var r=n(170);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){r(e,t,n[t])})}return e}},function(e,t,n){"use strict";var r=new Date,i=new Date;function o(e,t,n,a){function c(t){return e(t=new Date(+t)),t}return c.floor=c,c.ceil=function(n){return e(n=new Date(n-1)),t(n,1),e(n),n},c.round=function(e){var t=c(e),n=c.ceil(e);return e-t<n-e?t:n},c.offset=function(e,n){return t(e=new Date(+e),null==n?1:Math.floor(n)),e},c.range=function(n,r,i){var o,a=[];if(n=c.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;do{a.push(o=new Date(+n)),t(n,i),e(n)}while(o<n&&n<r);return a},c.filter=function(n){return o(function(t){if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})},n&&(c.count=function(t,o){return r.setTime(+t),i.setTime(+o),e(r),e(i),Math.floor(n(r,i))},c.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?c.filter(a?function(t){return a(t)%e==0}:function(t){return c.count(0,t)%e==0}):c:null}),c}var a=o(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):a:null};var c=a,s=(a.range,6e4),u=6048e5,f=o(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),l=f,d=(f.range,o(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getMinutes()})),h=d,p=(d.range,o(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-e.getMinutes()*s)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()})),b=p,v=(p.range,o(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/864e5},function(e){return e.getDate()-1})),g=v;v.range;function y(e){return o(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*s)/u})}var m=y(0),w=y(1),_=y(2),k=y(3),E=y(4),S=y(5),M=y(6),x=(m.range,w.range,_.range,k.range,E.range,S.range,M.range,o(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()})),D=x,C=(x.range,o(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()}));C.every=function(e){return isFinite(e=Math.floor(e))&&e>0?o(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var P=C,O=(C.range,o(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*s)},function(e,t){return(t-e)/s},function(e){return e.getUTCMinutes()})),F=O,T=(O.range,o(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()})),I=T,A=(T.range,o(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1})),j=A;A.range;function N(e){return o(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/u})}var R=N(0),B=N(1),U=N(2),z=N(3),L=N(4),H=N(5),V=N(6),K=(R.range,B.range,U.range,z.range,L.range,H.range,V.range,o(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()})),q=K,W=(K.range,o(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()}));W.every=function(e){return isFinite(e=Math.floor(e))&&e>0?o(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var G=W;W.range;n.d(t,"c",function(){return c}),n.d(t,"n",function(){return c}),n.d(t,"g",function(){return l}),n.d(t,"r",function(){return l}),n.d(t,"d",function(){return h}),n.d(t,"b",function(){return b}),n.d(t,"a",function(){return g}),n.d(t,"j",function(){return m}),n.d(t,"h",function(){return m}),n.d(t,"e",function(){return w}),n.d(t,"i",function(){return E}),n.d(t,"f",function(){return D}),n.d(t,"k",function(){return P}),n.d(t,"o",function(){return F}),n.d(t,"m",function(){return I}),n.d(t,"l",function(){return j}),n.d(t,"u",function(){return R}),n.d(t,"s",function(){return R}),n.d(t,"p",function(){return B}),n.d(t,"t",function(){return L}),n.d(t,"q",function(){return q}),n.d(t,"v",function(){return G})},,,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"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(49),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=i(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},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(308),i=n(33);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?i(e):t}},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){var r=n(309);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){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",function(){return r})},function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}n.d(t,"a",function(){return r})},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DISPLAY_FORMAT="L",t.ISO_FORMAT="YYYY-MM-DD",t.ISO_MONTH_FORMAT="YYYY-MM",t.START_DATE="startDate",t.END_DATE="endDate",t.HORIZONTAL_ORIENTATION="horizontal",t.VERTICAL_ORIENTATION="vertical",t.VERTICAL_SCROLLABLE="verticalScrollable",t.ICON_BEFORE_POSITION="before",t.ICON_AFTER_POSITION="after",t.INFO_POSITION_TOP="top",t.INFO_POSITION_BOTTOM="bottom",t.INFO_POSITION_BEFORE="before",t.INFO_POSITION_AFTER="after",t.ANCHOR_LEFT="left",t.ANCHOR_RIGHT="right",t.OPEN_DOWN="down",t.OPEN_UP="up",t.DAY_SIZE=39,t.BLOCKED_MODIFIER="blocked",t.WEEKDAYS=[0,1,2,3,4,5,6],t.FANG_WIDTH_PX=20,t.FANG_HEIGHT_PX=10,t.DEFAULT_VERTICAL_SPACING=22,t.MODIFIER_KEY_NAMES=new Set(["Shift","Control","Alt","Meta"])},function(e,t,n){"use strict";var r=function(e,t,n){e.prototype=t.prototype=n,n.constructor=e};function i(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function o(){}var a="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3})$/,f=/^#([0-9a-f]{6})$/,l=new RegExp("^rgb\\("+[a,a,a]+"\\)$"),d=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),h=new RegExp("^rgba\\("+[a,a,a,c]+"\\)$"),p=new RegExp("^rgba\\("+[s,s,s,c]+"\\)$"),b=new RegExp("^hsl\\("+[c,s,s]+"\\)$"),v=new RegExp("^hsla\\("+[c,s,s,c]+"\\)$"),g={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function y(e){var t;return e=(e+"").trim().toLowerCase(),(t=u.exec(e))?new E((t=parseInt(t[1],16))>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):(t=f.exec(e))?m(parseInt(t[1],16)):(t=l.exec(e))?new E(t[1],t[2],t[3],1):(t=d.exec(e))?new E(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=h.exec(e))?w(t[1],t[2],t[3],t[4]):(t=p.exec(e))?w(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=b.exec(e))?M(t[1],t[2]/100,t[3]/100,1):(t=v.exec(e))?M(t[1],t[2]/100,t[3]/100,t[4]):g.hasOwnProperty(e)?m(g[e]):"transparent"===e?new E(NaN,NaN,NaN,0):null}function m(e){return new E(e>>16&255,e>>8&255,255&e,1)}function w(e,t,n,r){return r<=0&&(e=t=n=NaN),new E(e,t,n,r)}function _(e){return e instanceof o||(e=y(e)),e?new E((e=e.rgb()).r,e.g,e.b,e.opacity):new E}function k(e,t,n,r){return 1===arguments.length?_(e):new E(e,t,n,null==r?1:r)}function E(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function S(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function M(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new D(e,t,n,r)}function x(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof D)return new D(e.h,e.s,e.l,e.opacity);if(e instanceof o||(e=y(e)),!e)return new D;if(e instanceof D)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),c=NaN,s=a-i,u=(a+i)/2;return s?(c=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=u<.5?a+i:2-a-i,c*=60):s=u>0&&u<1?0:c,new D(c,s,u,e.opacity)}(e):new D(e,t,n,null==r?1:r)}function D(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function C(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}r(o,y,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),r(E,k,i(o,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new E(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new E(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+S(this.r)+S(this.g)+S(this.b)},toString:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}})),r(D,x,i(o,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new D(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new D(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new E(C(e>=240?e-240:e+120,i,r),C(e,i,r),C(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var P=Math.PI/180,O=180/Math.PI,F=.96422,T=1,I=.82521,A=4/29,j=6/29,N=3*j*j,R=j*j*j;function B(e){if(e instanceof z)return new z(e.l,e.a,e.b,e.opacity);if(e instanceof G){if(isNaN(e.h))return new z(e.l,0,0,e.opacity);var t=e.h*P;return new z(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof E||(e=_(e));var n,r,i=K(e.r),o=K(e.g),a=K(e.b),c=L((.2225045*i+.7168786*o+.0606169*a)/T);return i===o&&o===a?n=r=c:(n=L((.4360747*i+.3850649*o+.1430804*a)/F),r=L((.0139322*i+.0971045*o+.7141733*a)/I)),new z(116*c-16,500*(n-c),200*(c-r),e.opacity)}function U(e,t,n,r){return 1===arguments.length?B(e):new z(e,t,n,null==r?1:r)}function z(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function L(e){return e>R?Math.pow(e,1/3):e/N+A}function H(e){return e>j?e*e*e:N*(e-A)}function V(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function K(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function q(e){if(e instanceof G)return new G(e.h,e.c,e.l,e.opacity);if(e instanceof z||(e=B(e)),0===e.a&&0===e.b)return new G(NaN,0,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*O;return new G(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function W(e,t,n,r){return 1===arguments.length?q(e):new G(e,t,n,null==r?1:r)}function G(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}r(z,U,i(o,{brighter:function(e){return new z(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker:function(e){return new z(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new E(V(3.1338561*(t=F*H(t))-1.6168667*(e=T*H(e))-.4906146*(n=I*H(n))),V(-.9787684*t+1.9161415*e+.033454*n),V(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),r(G,W,i(o,{brighter:function(e){return new G(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker:function(e){return new G(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb:function(){return B(this).rgb()}}));var $=-.14861,Y=1.78277,X=-.29227,Z=-.90649,J=1.97294,Q=J*Z,ee=J*Y,te=Y*X-Z*$;function ne(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof re)return new re(e.h,e.s,e.l,e.opacity);e instanceof E||(e=_(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(te*r+Q*t-ee*n)/(te+Q-ee),o=r-i,a=(J*(n-i)-X*o)/Z,c=Math.sqrt(a*a+o*o)/(J*i*(1-i)),s=c?Math.atan2(a,o)*O-120:NaN;return new re(s<0?s+360:s,c,i,e.opacity)}(e):new re(e,t,n,null==r?1:r)}function re(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}r(re,ne,i(o,{brighter:function(e){return e=null==e?1/.7:Math.pow(1/.7,e),new re(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?.7:Math.pow(.7,e),new re(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*P,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new E(255*(t+n*($*r+Y*i)),255*(t+n*(X*r+Z*i)),255*(t+n*(J*r)),this.opacity)}})),n.d(t,"a",function(){return y}),n.d(t,"f",function(){return k}),n.d(t,"d",function(){return x}),n.d(t,"e",function(){return U}),n.d(t,"c",function(){return W}),n.d(t,"b",function(){return ne})},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,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var 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},i=c(n(9)),o=c(n(338)),a=c(n(340));function c(e){return e&&e.__esModule?e:{default:e}}var s=void 0;function u(e,t){var n,a,c,f,l,d,h,p,b=[],v={};for(d=0;d<e.length;d++)if("string"!==(l=e[d]).type){if(!t.hasOwnProperty(l.value)||void 0===t[l.value])throw new Error("Invalid interpolation, missing component node: `"+l.value+"`");if("object"!==r(t[l.value]))throw new Error("Invalid interpolation, component node must be a ReactElement or null: `"+l.value+"`","\n> "+s);if("componentClose"===l.type)throw new Error("Missing opening component token: `"+l.value+"`");if("componentOpen"===l.type){n=t[l.value],c=d;break}b.push(t[l.value])}else b.push(l.value);return n&&(f=function(e,t){var n,r,i=t[e],o=0;for(r=e+1;r<t.length;r++)if((n=t[r]).value===i.value){if("componentOpen"===n.type){o++;continue}if("componentClose"===n.type){if(0===o)return r;o--}}throw new Error("Missing closing component token `"+i.value+"`")}(c,e),h=u(e.slice(c+1,f),t),a=i.default.cloneElement(n,{},h),b.push(a),f<e.length-1&&(p=u(e.slice(f+1),t),b=b.concat(p))),1===b.length?b[0]:(b.forEach(function(e,t){e&&(v["interpolation-child-"+t]=e)}),(0,o.default)(v))}t.default=function(e){var t=e.mixedString,n=e.components,i=e.throwErrors;if(s=t,!n)return t;if("object"!==(void 0===n?"undefined":r(n))){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because components is not an object");return t}var o=(0,a.default)(t);try{return u(o,n)}catch(e){if(i)throw new Error("Interpolation Error: unable to process `"+t+"` because of error `"+e.message+"`");return t}}},,,,,function(e,t,n){e.exports=n(398)},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var a;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{a=n(83).Buffer}catch(e){}function c(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var a=e.charCodeAt(o)-48;r<<=4,r|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function s(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a<o;a++){var c=e.charCodeAt(a)-48;i*=r,i+=c>=49?c-49+10:c>=17?c-17+10:c}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},o.prototype._initArray=function(e,t,n){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,c=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<c&67108863,this.words[o+1]=a>>>26-c&67108863,(c+=24)>=26&&(c-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<c&67108863,this.words[o+1]=a>>>26-c&67108863,(c+=24)>=26&&(c-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=e.length-6,r=0;n>=t;n-=6)i=c(e,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==t&&(i=c(e,t,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=t)r++;r--,i=i/t|0;for(var o=e.length-n,a=o%r,c=Math.min(o,o-a)+n,u=0,f=n;f<c;f+=r)u=s(e,f,f+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var l=1;for(u=s(e,f,e.length,t),f=0;f<a;f++)l*=t;this.imuln(l),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,c=67108863&a,s=a/67108864|0;n.words[0]=c;for(var u=1;u<r;u++){for(var f=s>>>26,l=67108863&s,d=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=d;h++){var p=u-h|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[h])+l)/67108864|0,l=67108863&a}n.words[u]=0|l,s=0|f}return 0!==s?n.words[u]=0|s:n.length--,n.strip()}o.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var c=this.words[a],s=(16777215&(c<<i|o)).toString(16);n=0!==(o=c>>>24-i&16777215)||a!==this.length-1?u[6-s.length]+s+n:s+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],h=l[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var b=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?b+n:u[d-b.length]+b+n}for(this.isZero()&&(n="0"+n);n.length%t!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return r(void 0!==a),this.toArrayLike(a,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,c,s="le"===t,u=new e(o),f=this.clone();if(s){for(c=0;!f.isZero();c++)a=f.andln(255),f.iushrn(8),u[c]=a;for(;c<o;c++)u[c]=0}else{for(c=0;c<o-i;c++)u[c]=0;for(c=0;!f.isZero();c++)a=f.andln(255),f.iushrn(8),u[o-c-1]=a}return u},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,n,r;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(n=this,r=e):(n=e,r=this);for(var i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=e):(n=e,r=this);for(var o=0,a=0;a<r.length;a++)o=(t=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var h=function(e,t,n){var r,i,o,a=e.words,c=t.words,s=n.words,u=0,f=0|a[0],l=8191&f,d=f>>>13,h=0|a[1],p=8191&h,b=h>>>13,v=0|a[2],g=8191&v,y=v>>>13,m=0|a[3],w=8191&m,_=m>>>13,k=0|a[4],E=8191&k,S=k>>>13,M=0|a[5],x=8191&M,D=M>>>13,C=0|a[6],P=8191&C,O=C>>>13,F=0|a[7],T=8191&F,I=F>>>13,A=0|a[8],j=8191&A,N=A>>>13,R=0|a[9],B=8191&R,U=R>>>13,z=0|c[0],L=8191&z,H=z>>>13,V=0|c[1],K=8191&V,q=V>>>13,W=0|c[2],G=8191&W,$=W>>>13,Y=0|c[3],X=8191&Y,Z=Y>>>13,J=0|c[4],Q=8191&J,ee=J>>>13,te=0|c[5],ne=8191&te,re=te>>>13,ie=0|c[6],oe=8191&ie,ae=ie>>>13,ce=0|c[7],se=8191&ce,ue=ce>>>13,fe=0|c[8],le=8191&fe,de=fe>>>13,he=0|c[9],pe=8191&he,be=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ve=(u+(r=Math.imul(l,L))|0)+((8191&(i=(i=Math.imul(l,H))+Math.imul(d,L)|0))<<13)|0;u=((o=Math.imul(d,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(p,L),i=(i=Math.imul(p,H))+Math.imul(b,L)|0,o=Math.imul(b,H);var ge=(u+(r=r+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,q)|0)+Math.imul(d,K)|0))<<13)|0;u=((o=o+Math.imul(d,q)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(g,L),i=(i=Math.imul(g,H))+Math.imul(y,L)|0,o=Math.imul(y,H),r=r+Math.imul(p,K)|0,i=(i=i+Math.imul(p,q)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,q)|0;var ye=(u+(r=r+Math.imul(l,G)|0)|0)+((8191&(i=(i=i+Math.imul(l,$)|0)+Math.imul(d,G)|0))<<13)|0;u=((o=o+Math.imul(d,$)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(w,L),i=(i=Math.imul(w,H))+Math.imul(_,L)|0,o=Math.imul(_,H),r=r+Math.imul(g,K)|0,i=(i=i+Math.imul(g,q)|0)+Math.imul(y,K)|0,o=o+Math.imul(y,q)|0,r=r+Math.imul(p,G)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(b,G)|0,o=o+Math.imul(b,$)|0;var me=(u+(r=r+Math.imul(l,X)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(d,X)|0))<<13)|0;u=((o=o+Math.imul(d,Z)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,r=Math.imul(E,L),i=(i=Math.imul(E,H))+Math.imul(S,L)|0,o=Math.imul(S,H),r=r+Math.imul(w,K)|0,i=(i=i+Math.imul(w,q)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,q)|0,r=r+Math.imul(g,G)|0,i=(i=i+Math.imul(g,$)|0)+Math.imul(y,G)|0,o=o+Math.imul(y,$)|0,r=r+Math.imul(p,X)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Z)|0;var we=(u+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,ee)|0)+Math.imul(d,Q)|0))<<13)|0;u=((o=o+Math.imul(d,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(x,L),i=(i=Math.imul(x,H))+Math.imul(D,L)|0,o=Math.imul(D,H),r=r+Math.imul(E,K)|0,i=(i=i+Math.imul(E,q)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,q)|0,r=r+Math.imul(w,G)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,G)|0,o=o+Math.imul(_,$)|0,r=r+Math.imul(g,X)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(y,X)|0,o=o+Math.imul(y,Z)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,ee)|0;var _e=(u+(r=r+Math.imul(l,ne)|0)|0)+((8191&(i=(i=i+Math.imul(l,re)|0)+Math.imul(d,ne)|0))<<13)|0;u=((o=o+Math.imul(d,re)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(P,L),i=(i=Math.imul(P,H))+Math.imul(O,L)|0,o=Math.imul(O,H),r=r+Math.imul(x,K)|0,i=(i=i+Math.imul(x,q)|0)+Math.imul(D,K)|0,o=o+Math.imul(D,q)|0,r=r+Math.imul(E,G)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,$)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Z)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,ee)|0)+Math.imul(y,Q)|0,o=o+Math.imul(y,ee)|0,r=r+Math.imul(p,ne)|0,i=(i=i+Math.imul(p,re)|0)+Math.imul(b,ne)|0,o=o+Math.imul(b,re)|0;var ke=(u+(r=r+Math.imul(l,oe)|0)|0)+((8191&(i=(i=i+Math.imul(l,ae)|0)+Math.imul(d,oe)|0))<<13)|0;u=((o=o+Math.imul(d,ae)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(T,L),i=(i=Math.imul(T,H))+Math.imul(I,L)|0,o=Math.imul(I,H),r=r+Math.imul(P,K)|0,i=(i=i+Math.imul(P,q)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,q)|0,r=r+Math.imul(x,G)|0,i=(i=i+Math.imul(x,$)|0)+Math.imul(D,G)|0,o=o+Math.imul(D,$)|0,r=r+Math.imul(E,X)|0,i=(i=i+Math.imul(E,Z)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,Z)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,ee)|0,r=r+Math.imul(g,ne)|0,i=(i=i+Math.imul(g,re)|0)+Math.imul(y,ne)|0,o=o+Math.imul(y,re)|0,r=r+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(b,oe)|0,o=o+Math.imul(b,ae)|0;var Ee=(u+(r=r+Math.imul(l,se)|0)|0)+((8191&(i=(i=i+Math.imul(l,ue)|0)+Math.imul(d,se)|0))<<13)|0;u=((o=o+Math.imul(d,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,L),i=(i=Math.imul(j,H))+Math.imul(N,L)|0,o=Math.imul(N,H),r=r+Math.imul(T,K)|0,i=(i=i+Math.imul(T,q)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,q)|0,r=r+Math.imul(P,G)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,$)|0,r=r+Math.imul(x,X)|0,i=(i=i+Math.imul(x,Z)|0)+Math.imul(D,X)|0,o=o+Math.imul(D,Z)|0,r=r+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,ee)|0,r=r+Math.imul(w,ne)|0,i=(i=i+Math.imul(w,re)|0)+Math.imul(_,ne)|0,o=o+Math.imul(_,re)|0,r=r+Math.imul(g,oe)|0,i=(i=i+Math.imul(g,ae)|0)+Math.imul(y,oe)|0,o=o+Math.imul(y,ae)|0,r=r+Math.imul(p,se)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(b,se)|0,o=o+Math.imul(b,ue)|0;var Se=(u+(r=r+Math.imul(l,le)|0)|0)+((8191&(i=(i=i+Math.imul(l,de)|0)+Math.imul(d,le)|0))<<13)|0;u=((o=o+Math.imul(d,de)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(B,L),i=(i=Math.imul(B,H))+Math.imul(U,L)|0,o=Math.imul(U,H),r=r+Math.imul(j,K)|0,i=(i=i+Math.imul(j,q)|0)+Math.imul(N,K)|0,o=o+Math.imul(N,q)|0,r=r+Math.imul(T,G)|0,i=(i=i+Math.imul(T,$)|0)+Math.imul(I,G)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Z)|0,r=r+Math.imul(x,Q)|0,i=(i=i+Math.imul(x,ee)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,ee)|0,r=r+Math.imul(E,ne)|0,i=(i=i+Math.imul(E,re)|0)+Math.imul(S,ne)|0,o=o+Math.imul(S,re)|0,r=r+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,ae)|0)+Math.imul(_,oe)|0,o=o+Math.imul(_,ae)|0,r=r+Math.imul(g,se)|0,i=(i=i+Math.imul(g,ue)|0)+Math.imul(y,se)|0,o=o+Math.imul(y,ue)|0,r=r+Math.imul(p,le)|0,i=(i=i+Math.imul(p,de)|0)+Math.imul(b,le)|0,o=o+Math.imul(b,de)|0;var Me=(u+(r=r+Math.imul(l,pe)|0)|0)+((8191&(i=(i=i+Math.imul(l,be)|0)+Math.imul(d,pe)|0))<<13)|0;u=((o=o+Math.imul(d,be)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(B,K),i=(i=Math.imul(B,q))+Math.imul(U,K)|0,o=Math.imul(U,q),r=r+Math.imul(j,G)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,$)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(I,X)|0,o=o+Math.imul(I,Z)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,ee)|0,r=r+Math.imul(x,ne)|0,i=(i=i+Math.imul(x,re)|0)+Math.imul(D,ne)|0,o=o+Math.imul(D,re)|0,r=r+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,r=r+Math.imul(w,se)|0,i=(i=i+Math.imul(w,ue)|0)+Math.imul(_,se)|0,o=o+Math.imul(_,ue)|0,r=r+Math.imul(g,le)|0,i=(i=i+Math.imul(g,de)|0)+Math.imul(y,le)|0,o=o+Math.imul(y,de)|0;var xe=(u+(r=r+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,be)|0)+Math.imul(b,pe)|0))<<13)|0;u=((o=o+Math.imul(b,be)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(B,G),i=(i=Math.imul(B,$))+Math.imul(U,G)|0,o=Math.imul(U,$),r=r+Math.imul(j,X)|0,i=(i=i+Math.imul(j,Z)|0)+Math.imul(N,X)|0,o=o+Math.imul(N,Z)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,ee)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,ee)|0,r=r+Math.imul(P,ne)|0,i=(i=i+Math.imul(P,re)|0)+Math.imul(O,ne)|0,o=o+Math.imul(O,re)|0,r=r+Math.imul(x,oe)|0,i=(i=i+Math.imul(x,ae)|0)+Math.imul(D,oe)|0,o=o+Math.imul(D,ae)|0,r=r+Math.imul(E,se)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,se)|0,o=o+Math.imul(S,ue)|0,r=r+Math.imul(w,le)|0,i=(i=i+Math.imul(w,de)|0)+Math.imul(_,le)|0,o=o+Math.imul(_,de)|0;var De=(u+(r=r+Math.imul(g,pe)|0)|0)+((8191&(i=(i=i+Math.imul(g,be)|0)+Math.imul(y,pe)|0))<<13)|0;u=((o=o+Math.imul(y,be)|0)+(i>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul(B,X),i=(i=Math.imul(B,Z))+Math.imul(U,X)|0,o=Math.imul(U,Z),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,ee)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,ee)|0,r=r+Math.imul(T,ne)|0,i=(i=i+Math.imul(T,re)|0)+Math.imul(I,ne)|0,o=o+Math.imul(I,re)|0,r=r+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,r=r+Math.imul(x,se)|0,i=(i=i+Math.imul(x,ue)|0)+Math.imul(D,se)|0,o=o+Math.imul(D,ue)|0,r=r+Math.imul(E,le)|0,i=(i=i+Math.imul(E,de)|0)+Math.imul(S,le)|0,o=o+Math.imul(S,de)|0;var Ce=(u+(r=r+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,be)|0)+Math.imul(_,pe)|0))<<13)|0;u=((o=o+Math.imul(_,be)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(B,Q),i=(i=Math.imul(B,ee))+Math.imul(U,Q)|0,o=Math.imul(U,ee),r=r+Math.imul(j,ne)|0,i=(i=i+Math.imul(j,re)|0)+Math.imul(N,ne)|0,o=o+Math.imul(N,re)|0,r=r+Math.imul(T,oe)|0,i=(i=i+Math.imul(T,ae)|0)+Math.imul(I,oe)|0,o=o+Math.imul(I,ae)|0,r=r+Math.imul(P,se)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(O,se)|0,o=o+Math.imul(O,ue)|0,r=r+Math.imul(x,le)|0,i=(i=i+Math.imul(x,de)|0)+Math.imul(D,le)|0,o=o+Math.imul(D,de)|0;var Pe=(u+(r=r+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,be)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,be)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul(B,ne),i=(i=Math.imul(B,re))+Math.imul(U,ne)|0,o=Math.imul(U,re),r=r+Math.imul(j,oe)|0,i=(i=i+Math.imul(j,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,r=r+Math.imul(T,se)|0,i=(i=i+Math.imul(T,ue)|0)+Math.imul(I,se)|0,o=o+Math.imul(I,ue)|0,r=r+Math.imul(P,le)|0,i=(i=i+Math.imul(P,de)|0)+Math.imul(O,le)|0,o=o+Math.imul(O,de)|0;var Oe=(u+(r=r+Math.imul(x,pe)|0)|0)+((8191&(i=(i=i+Math.imul(x,be)|0)+Math.imul(D,pe)|0))<<13)|0;u=((o=o+Math.imul(D,be)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(B,oe),i=(i=Math.imul(B,ae))+Math.imul(U,oe)|0,o=Math.imul(U,ae),r=r+Math.imul(j,se)|0,i=(i=i+Math.imul(j,ue)|0)+Math.imul(N,se)|0,o=o+Math.imul(N,ue)|0,r=r+Math.imul(T,le)|0,i=(i=i+Math.imul(T,de)|0)+Math.imul(I,le)|0,o=o+Math.imul(I,de)|0;var Fe=(u+(r=r+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,be)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,be)|0)+(i>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,r=Math.imul(B,se),i=(i=Math.imul(B,ue))+Math.imul(U,se)|0,o=Math.imul(U,ue),r=r+Math.imul(j,le)|0,i=(i=i+Math.imul(j,de)|0)+Math.imul(N,le)|0,o=o+Math.imul(N,de)|0;var Te=(u+(r=r+Math.imul(T,pe)|0)|0)+((8191&(i=(i=i+Math.imul(T,be)|0)+Math.imul(I,pe)|0))<<13)|0;u=((o=o+Math.imul(I,be)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(B,le),i=(i=Math.imul(B,de))+Math.imul(U,le)|0,o=Math.imul(U,de);var Ie=(u+(r=r+Math.imul(j,pe)|0)|0)+((8191&(i=(i=i+Math.imul(j,be)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,be)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863;var Ae=(u+(r=Math.imul(B,pe))|0)+((8191&(i=(i=Math.imul(B,be))+Math.imul(U,pe)|0))<<13)|0;return u=((o=Math.imul(U,be))+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,s[0]=ve,s[1]=ge,s[2]=ye,s[3]=me,s[4]=we,s[5]=_e,s[6]=ke,s[7]=Ee,s[8]=Se,s[9]=Me,s[10]=xe,s[11]=De,s[12]=Ce,s[13]=Pe,s[14]=Oe,s[15]=Fe,s[16]=Te,s[17]=Ie,s[18]=Ae,0!==u&&(s[19]=u,n.length++),n};function p(e,t,n){return(new b).mulp(e,t,n)}function b(e,t){this.x=e,this.y=t}Math.imul||(h=d),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?h(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var c=67108863&r,s=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=s;u++){var f=o-u,l=(0|e.words[f])*(0|t.words[u]),d=67108863&l;c=67108863&(d=d+c|0),i+=(a=(a=a+(l/67108864|0)|0)+(d>>>26)|0)>>>26,a&=67108863}n.words[o]=c,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,e,t):p(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},b.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},b.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a<o;a++)r[a]=t[e[a]],i[a]=n[e[a]]},b.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var c=a<<1,s=Math.cos(2*Math.PI/c),u=Math.sin(2*Math.PI/c),f=0;f<i;f+=c)for(var l=s,d=u,h=0;h<a;h++){var p=n[f+h],b=r[f+h],v=n[f+h+a],g=r[f+h+a],y=l*v-d*g;g=l*g+d*v,v=y,n[f+h]=p+v,r[f+h]=b+g,n[f+h+a]=p-v,r[f+h+a]=b-g,h!==c&&(y=s*l-u*d,d=s*d+u*l,l=y)}},b.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},b.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,n,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===o),r(0==(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},b.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),c=new Array(r),s=new Array(r),u=new Array(r),f=new Array(r),l=new Array(r),d=n.words;d.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,u,r),this.transform(a,o,c,s,r,i),this.transform(u,o,f,l,r,i);for(var h=0;h<r;h++){var p=c[h]*f[h]-s[h]*l[h];s[h]=c[h]*l[h]+s[h]*f[h],c[h]=p}return this.conjugate(c,s,r),this.transform(c,s,d,o,r,i),this.conjugate(d,o,r),this.normalize13b(d,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),p(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,i=n%26;t[n]=(e.words[r]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var c=this.words[t]&o,s=(0|this.words[t])-c<<n;this.words[t]=s|a,a=c>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,n){var i;r("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),c=67108863^67108863>>>o<<o,s=n;if(i-=a,i=Math.max(0,i),s){for(var u=0;u<a;u++)s.words[u]=this.words[u];s.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&c}return s&&0!==f&&(s.words[s.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var c=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+c;var s=(0|e.words[i])*t;c=((o-=67108863&s)>>26)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)c=(o=(0|this.words[i+n])+c)>>26,this.words[i+n]=67108863&o;if(0===c)return this.strip();for(r(-1===c),c=0,i=0;i<this.length;i++)c=(o=-(0|this.words[i])+c)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var c,s=r.length-i.length;if("mod"!==t){(c=new o(null)).length=s+1,c.words=new Array(c.length);for(var u=0;u<c.length;u++)c.words[u]=0}var f=r.clone()._ishlnsubmul(i,1,s);0===f.negative&&(r=f,c&&(c.words[s]=1));for(var l=s-1;l>=0;l--){var d=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(d=Math.min(d/a|0,67108863),r._ishlnsubmul(i,d,l);0!==r.negative;)d--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);c&&(c.words[l]=d)}return c&&c.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:c||null,mod:r}},o.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(c=this.neg().divmod(e,t),"mod"!==t&&(i=c.div.neg()),"div"!==t&&(a=c.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(c=this.divmod(e.neg(),t),"mod"!==t&&(i=c.div.neg()),{div:i,mod:c.mod}):0!=(this.negative&e.negative)?(c=this.neg().divmod(e.neg(),t),"div"!==t&&(a=c.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:c.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,c},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),i=e.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},o.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),c=new o(0),s=new o(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var f=n.clone(),l=t.clone();!t.isZero();){for(var d=0,h=1;0==(t.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,b=1;0==(n.words[0]&b)&&p<26;++p,b<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(c.isOdd()||s.isOdd())&&(c.iadd(f),s.isub(l)),c.iushrn(1),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),i.isub(c),a.isub(s)):(n.isub(t),c.isub(i),s.isub(a))}return{a:c,b:s,gcd:n.iushln(u)}},o.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),c=new o(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,f=1;0==(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)c.isOdd()&&c.iadd(s),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(c)):(n.isub(t),c.isub(a))}return(i=0===t.cmpn(1)?a:c).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var c=0|this.words[a];o=(c+=o)>>>26,c&=67108863,this.words[a]=c}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|e.words[n];if(r!==i){r<i?t=-1:r>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function g(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){g.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){g.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){g.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){g.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function E(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}g.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},g.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},g.prototype.split=function(e,t){e.iushrn(this.n,0,t)},g.prototype.imulK=function(e){return e.imul(this.k)},i(y,g),y.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,e.words[r-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(m,g),i(w,g),i(_,g),_.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new m;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return v[e]=t,t},k.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){r(0==(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},k.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2==1),3===t){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var c=new o(1).toRed(this),s=c.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(s);)f.redIAdd(s);for(var l=this.pow(f,i),d=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(c);){for(var b=h,v=0;0!==b.cmp(c);v++)b=b.redSqr();r(v<p);var g=this.pow(l,new o(1).iushln(p-v-1));d=d.redMul(g),l=g.redSqr(),h=h.redMul(l),p=v}return d},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,c=0,s=t.bitLength()%26;for(0===s&&(s=26),r=t.length-1;r>=0;r--){for(var u=t.words[r],f=s-1;f>=0;f--){var l=u>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++c||0===r&&0===f)&&(i=this.mul(i,n[a]),c=0,a=0)):c=0}s=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new E(e)},i(E,k),E.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},E.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},E.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},E.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(249)(e))},,,function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(85);function i(e,t){if(null==e)return{};var n,i,o=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(28);function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),i.forEach(function(t){Object(r.a)(e,t,n[t])})}return e}},,,function(e,t,n){"use strict";var r=n(86),i=n(215),o=n(216),a=n(394),c=o();r(c,{getPolyfill:o,implementation:i,shim:a}),e.exports=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="Interact with the calendar and add the check-in date for your trip.",i="Move backward to switch to the previous month.",o="Move forward to switch to the next month.",a="page up and page down keys",c="Home and end keys",s="Escape key",u="Select the date in focus.",f="Move backward (left) and forward (right) by one day.",l="Move backward (up) and forward (down) by one week.",d="Return to the date input field.",h="Press the down arrow key to interact with the calendar and\n select a date. Press the question mark key to get the keyboard shortcuts for changing dates.",p=function(e){var t=e.date;return"Choose "+String(t)+" as your check-in date. It’s available."},b=function(e){var t=e.date;return"Choose "+String(t)+" as your check-out date. It’s available."},v=function(e){return e.date},g=function(e){var t=e.date;return"Not available. "+String(t)},y=function(e){var t=e.date;return"Selected. "+String(t)};t.default={calendarLabel:"Calendar",closeDatePicker:"Close",focusStartDate:r,clearDate:"Clear Date",clearDates:"Clear Dates",jumpToPrevMonth:i,jumpToNextMonth:o,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:a,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:f,moveFocusByOneWeek:l,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d,keyboardNavigationInstructions:h,chooseAvailableStartDate:p,chooseAvailableEndDate:b,dateIsUnavailable:g,dateIsSelected:y};t.DateRangePickerPhrases={calendarLabel:"Calendar",closeDatePicker:"Close",clearDates:"Clear Dates",focusStartDate:r,jumpToPrevMonth:i,jumpToNextMonth:o,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:a,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:f,moveFocusByOneWeek:l,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d,keyboardNavigationInstructions:h,chooseAvailableStartDate:p,chooseAvailableEndDate:b,dateIsUnavailable:g,dateIsSelected:y},t.DateRangePickerInputPhrases={focusStartDate:r,clearDates:"Clear Dates",keyboardNavigationInstructions:h},t.SingleDatePickerPhrases={calendarLabel:"Calendar",closeDatePicker:"Close",clearDate:"Clear Date",jumpToPrevMonth:i,jumpToNextMonth:o,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:a,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:f,moveFocusByOneWeek:l,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d,keyboardNavigationInstructions:h,chooseAvailableDate:v,dateIsUnavailable:g,dateIsSelected:y},t.SingleDatePickerInputPhrases={clearDate:"Clear Date",keyboardNavigationInstructions:h},t.DayPickerPhrases={calendarLabel:"Calendar",jumpToPrevMonth:i,jumpToNextMonth:o,keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:a,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:f,moveFocusByOneWeek:l,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d,chooseAvailableStartDate:p,chooseAvailableEndDate:b,chooseAvailableDate:v,dateIsUnavailable:g,dateIsSelected:y},t.DayPickerKeyboardShortcutsPhrases={keyboardShortcuts:"Keyboard Shortcuts",showKeyboardShortcutsPanel:"Open the keyboard shortcuts panel.",hideKeyboardShortcutsPanel:"Close the shortcuts panel.",openThisPanel:"Open this panel.",enterKey:"Enter key",leftArrowRightArrow:"Right and left arrow keys",upArrowDownArrow:"up and down arrow keys",pageUpPageDown:a,homeEnd:c,escape:s,questionMark:"Question mark",selectFocusedDate:u,moveFocusByOneDay:f,moveFocusByOneWeek:l,moveFocusByOneMonth:"Switch months.",moveFocustoStartAndEndOfWeek:"Go to the first or last day of a week.",returnFocusToInput:d},t.DayPickerNavigationPhrases={jumpToPrevMonth:i,jumpToNextMonth:o},t.CalendarDayPhrases={chooseAvailableDate:v,dateIsUnavailable:g,dateIsSelected:y}},function(e,t,n){"use strict";(function(e){
1
+ (window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],[,,function(e,t,n){e.exports=n(298)()},,function(e,t,n){e.exports=n(268)()},,function(e,t,n){var r;
2
  /*!
3
  Copyright (c) 2017 Jed Watson.
4
  Licensed under the MIT License (MIT), see
9
  Licensed under the MIT License (MIT), see
10
  http://jedwatson.github.io/classnames
11
  */
12
+ !function(){"use strict";var n={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var i=a.apply(null,r);i&&e.push(i)}else if("object"===o)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(r=function(){return a}.apply(t,[]))||(e.exports=r)}()},,function(e,t,n){var r=n(92);e.exports=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),a.forEach(function(t){r(e,t,n[t])})}return e}},,,,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){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(272),a=n(12);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?a(e):t}},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){var r=n(273);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){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){var r=n(42),a=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i),o(a,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=a(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.DISPLAY_FORMAT="L",t.ISO_FORMAT="YYYY-MM-DD",t.ISO_MONTH_FORMAT="YYYY-MM",t.START_DATE="startDate",t.END_DATE="endDate",t.HORIZONTAL_ORIENTATION="horizontal",t.VERTICAL_ORIENTATION="vertical",t.VERTICAL_SCROLLABLE="verticalScrollable",t.ICON_BEFORE_POSITION="before",t.ICON_AFTER_POSITION="after",t.INFO_POSITION_TOP="top",t.INFO_POSITION_BOTTOM="bottom",t.INFO_POSITION_BEFORE="before",t.INFO_POSITION_AFTER="after",t.ANCHOR_LEFT="left",t.ANCHOR_RIGHT="right",t.OPEN_DOWN="down",t.OPEN_UP="up",t.DAY_SIZE=39,t.BLOCKED_MODIFIER="blocked",t.WEEKDAYS=[0,1,2,3,4,5,6],t.FANG_WIDTH_PX=20,t.FANG_HEIGHT_PX=10,t.DEFAULT_VERTICAL_SPACING=22,t.MODIFIER_KEY_NAMES=new Set(["Shift","Control","Alt","Meta"])},function(e,t,n){"use strict";n(274);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}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},a=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),a.forEach(function(t){r(e,t,n[t])})}return e}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(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 s(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function l(e){return(l="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)}function u(e){return(u="function"==typeof Symbol&&"symbol"===l(Symbol.iterator)?function(e){return l(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":l(e)})(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?f(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(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&&p(e,t)}var m=n(0),g=n(1),v=n(3),y=n(5),w=n(2),_=n.n(w),k=n(25),E=n.n(k),S=n(26),O=n.n(S),M=n(6),x=n.n(M),C=n(145);function D(){return(D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function j(e){return"/"===e.charAt(0)}function P(e,t){for(var n=t,r=n+1,a=e.length;r<a;n+=1,r+=1)e[n]=e[r];e.pop()}var F=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e&&e.split("/")||[],r=t&&t.split("/")||[],a=e&&j(e),o=t&&j(t),i=a||o;if(e&&j(e)?r=n:n.length&&(r.pop(),r=r.concat(n)),!r.length)return"/";var c=void 0;if(r.length){var s=r[r.length-1];c="."===s||".."===s||""===s}else c=!1;for(var l=0,u=r.length;u>=0;u--){var f=r[u];"."===f?P(r,u):".."===f?(P(r,u),l++):l&&(P(r,u),l--)}if(!i)for(;l--;l)r.unshift("..");!i||""===r[0]||r[0]&&j(r[0])||r.unshift("");var d=r.join("/");return c&&"/"!==d.substr(-1)&&(d+="/"),d},T="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};var I=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(function(t,r){return e(t,n[r])});var r=void 0===t?"undefined":T(t);if(r!==(void 0===n?"undefined":T(n)))return!1;if("object"===r){var a=t.valueOf(),o=n.valueOf();if(a!==t||o!==n)return e(a,o);var i=Object.keys(t),c=Object.keys(n);return i.length===c.length&&i.every(function(r){return e(t[r],n[r])})}return!1},N=!0,A="Invariant failed";var R=function(e,t){if(!e)throw N?new Error(A):new Error(A+": "+(t||""))};function B(e){return"/"===e.charAt(0)?e:"/"+e}function L(e){return"/"===e.charAt(0)?e.substr(1):e}function U(e,t){return function(e,t){return new RegExp("^"+t+"(\\/|\\?|#|$)","i").test(e)}(e,t)?e.substr(t.length):e}function z(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function H(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function V(e,t,n,r){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(a=D({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(a.key=n),r?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=F(a.pathname,r.pathname)):a.pathname=r.pathname:a.pathname||(a.pathname="/"),a}function q(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach(function(e){return e.apply(void 0,n)})}}}var K=!("undefined"==typeof window||!window.document||!window.document.createElement);function W(e,t){t(window.confirm(e))}var Y,G="hashchange",$={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+L(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:L,decodePath:B},slash:{encodePath:B,decodePath:B}};function X(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function Z(e){var t=window.location.href.indexOf("#");window.location.replace(window.location.href.slice(0,t>=0?t:0)+"#"+e)}function Q(e){void 0===e&&(e={}),K||R(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),r=n.getUserConfirmation,a=void 0===r?W:r,o=n.hashType,i=void 0===o?"slash":o,c=e.basename?z(B(e.basename)):"",s=$[i],l=s.encodePath,u=s.decodePath;function f(){var e=u(X());return c&&(e=U(e,c)),V(e)}var d=q();function h(e){D(O,e),O.length=t.length,d.notifyListeners(O.location,O.action)}var p=!1,b=null;function m(){var e,t,n=X(),r=l(n);if(n!==r)Z(r);else{var o=f(),i=O.location;if(!p&&(t=o,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&I(e.state,t.state)))return;if(b===H(o))return;b=null,function(e){if(p)p=!1,h();else{d.confirmTransitionTo(e,"POP",a,function(t){t?h({action:"POP",location:e}):function(e){var t=O.location,n=w.lastIndexOf(H(t));-1===n&&(n=0);var r=w.lastIndexOf(H(e));-1===r&&(r=0);var a=n-r;a&&(p=!0,_(a))}(e)})}}(o)}}var g=X(),v=l(g);g!==v&&Z(v);var y=f(),w=[H(y)];function _(e){t.go(e)}var k=0;function E(e){1===(k+=e)&&1===e?window.addEventListener(G,m):0===k&&window.removeEventListener(G,m)}var S=!1;var O={length:t.length,action:"POP",location:y,createHref:function(e){return"#"+l(c+H(e))},push:function(e,t){var n=V(e,void 0,void 0,O.location);d.confirmTransitionTo(n,"PUSH",a,function(e){if(e){var t=H(n),r=l(c+t);if(X()!==r){b=t,function(e){window.location.hash=e}(r);var a=w.lastIndexOf(H(O.location)),o=w.slice(0,-1===a?0:a+1);o.push(t),w=o,h({action:"PUSH",location:n})}else h()}})},replace:function(e,t){var n=V(e,void 0,void 0,O.location);d.confirmTransitionTo(n,"REPLACE",a,function(e){if(e){var t=H(n),r=l(c+t);X()!==r&&(b=t,Z(r));var a=w.indexOf(H(O.location));-1!==a&&(w[a]=t),h({action:"REPLACE",location:n})}})},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},block:function(e){void 0===e&&(e=!1);var t=d.setPrompt(e);return S||(E(1),S=!0),function(){return S&&(S=!1,E(-1)),t()}},listen:function(e){var t=d.appendListener(e);return E(1),function(){E(-1),t()}}};return O}function J(){return Y||(Y=Q()),Y}function ee(e,t){return Object(y.compact)(Object.keys(t).map(function(n){var r=t[n];if(r.rules){var a=Object(y.find)(r.rules,function(t){return e.hasOwnProperty(re(n,t.value))});if(a){var o=e[re(n,a.value)];return{key:n,rule:a.value,value:o}}return null}return e[n]?{key:n,value:e[n]}:null}))}function te(e,t){var n=e.input.defaultOption;if(e.input.defaultOption){var r=Object(y.find)(t,{value:n});return r?r.value:void console.warn("invalid defaultOption ".concat(n," supplied to ").concat(e.labels.add))}return Object(y.get)(t,[0,"value"])}function ne(e,t,n){return a({},ee(t,n).reduce(function(e,t){return e[re(t.key,t.rule)]=void 0,e},{}),e.reduce(function(e,t){return"between"!==t.rule||Array.isArray(t.value)&&!t.value.some(function(e){return!e})?(t.value&&(e[re(t.key,t.rule)]=t.value),e):e},{}))}function re(e,t){return t&&t.length?"".concat(e,"_").concat(t):e}var ae=function(){return J().location.pathname},oe=function(e){return Object(y.isEmpty)(e)?"":"?"+Object(C.stringify)(e)},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:le();return Object(y.pick)(e,["period","compare","before","after","interval","type"])};function ce(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(y.uniq)(e.split(",").map(function(e){return parseInt(e,10)}).filter(Boolean))}function se(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:le(),r=oe(a({},n,e));return"".concat(t).concat(r)}function le(){var e=J().location.search;return e.length&&Object(C.parse)(e.substring(1))||{}}function ue(e){var t=se(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae(),arguments.length>2&&void 0!==arguments[2]?arguments[2]:le());J().push(t)}var fe=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.renderContent;if(!n)return null;return Object(m.createElement)("div",{className:"woocommerce-ellipsis-menu"},Object(m.createElement)(v.Dropdown,{contentClassName:"woocommerce-ellipsis-menu__popover",position:"bottom left",renderToggle:function(e){var n=e.onToggle,r=e.isOpen,a=x()("woocommerce-ellipsis-menu__toggle",{"is-opened":r});return Object(m.createElement)(v.IconButton,{className:a,onClick:n,icon:"ellipsis",title:t,"aria-expanded":r})},renderContent:function(e){return Object(m.createElement)(v.NavigableMenu,{className:"woocommerce-ellipsis-menu__content"},n(e))}}))}}]),t}();fe.propTypes={label:_.a.string.isRequired,renderContent:_.a.func};var de=fe;function he(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var pe=Object(m.createContext)(2);function be(e){return Object(m.createElement)(pe.Consumer,null,function(t){var n="h"+Math.min(t,6);return Object(m.createElement)(n,e)})}function me(e){var t=e.component,n=e.children,r=he(e,["component","children"]),a=t||"div";return Object(m.createElement)(pe.Consumer,null,function(e){return Object(m.createElement)(pe.Provider,{value:e+1},!1===t?n:Object(m.createElement)(a,r,n))})}function ge(e){return function(t,n,r){if(t[n])return t[n].type&&t[n].type===e?void 0:new Error("Invalid ".concat(n," passed to ").concat(r,". Must be ")+"`"+e.name+"`")}}me.propTypes={component:_.a.oneOfType([_.a.func,_.a.string,_.a.bool]),children:_.a.node};var ve=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.action,n=e.children,r=e.description,a=e.isInactive,o=e.menu,i=e.title,c=x()("woocommerce-card",this.props.className,{"has-menu":!!o,"has-action":!!t,"is-inactive":!!a});return Object(m.createElement)("div",{className:c},i&&Object(m.createElement)("div",{className:"woocommerce-card__header"},Object(m.createElement)("div",{className:"woocommerce-card__title-wrapper"},Object(m.createElement)(be,{className:"woocommerce-card__title woocommerce-card__header-item"},i),r&&Object(m.createElement)(be,{className:"woocommerce-card__description woocommerce-card__header-item"},r)),t&&Object(m.createElement)("div",{className:"woocommerce-card__action woocommerce-card__header-item"},t),o&&Object(m.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},o)),Object(m.createElement)(me,{className:"woocommerce-card__body"},n))}}]),t}();ve.propTypes={action:_.a.node,className:_.a.string,description:_.a.oneOfType([_.a.string,_.a.node]),isInactive:_.a.bool,menu:ge(de),title:_.a.oneOfType([_.a.string,_.a.node])};var ye=ve,we=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"wcAdminLinkHandler",value:function(e){e.preventDefault(),J().push(e.target.closest("a").getAttribute("href"))}},{key:"render",value:function(){var e,t=this.props,n=t.children,r=t.href,o=t.type,i=he(t,["children","href","type"]);e="wp-admin"===o?function(e){return wcSettings.adminUrl+e}(r):r;var c=a({},i,{"data-link-type":o});return"wc-admin"===o&&(c.onClick=this.wcAdminLinkHandler),Object(m.createElement)("a",D({href:e},c),n)}}]),t}();we.propTypes={href:_.a.string.isRequired,type:_.a.oneOf(["wp-admin","wc-admin","external"]).isRequired},we.defaultProps={type:"wc-admin"},we.contextTypes={router:_.a.object};var _e=we;function ke(e){var t="";return function e(n){if(Object(y.isString)(n)||Object(y.isNumber)(n))t+=n;else if(Object(y.isArray)(n))n.forEach(e);else if(n&&n.props){var r=n.props.children;Object(y.isArray)(r)?r.forEach(e):e(r)}}(e),t}var Ee=function(e){function t(e){var n,r=e.filter,a=e.config,o=e.onFilterChange;i(this,t),n=d(this,h(t).apply(this,arguments));var c=a.input.options;return n.state={options:c},n.updateOptions=n.updateOptions.bind(f(n)),!c&&a.input.getOptions&&a.input.getOptions().then(n.updateOptions).then(function(e){if(!r.value){var t=te(a,e);o(r.key,"value",t)}}),n}return b(t,m["Component"]),s(t,[{key:"updateOptions",value:function(e){return this.setState({options:e}),e}},{key:"getScreenReaderText",value:function(e,t){if(""===e.value)return"";var n=Object(y.find)(t.rules,{value:e.rule})||{},r=Object(y.find)(t.input.options,{value:e.value})||{};return ke(O()({mixedString:t.labels.title,components:{filter:Object(m.createElement)(m.Fragment,null,r.label),rule:Object(m.createElement)(m.Fragment,null,n.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.config,r=e.filter,a=e.onFilterChange,o=e.isEnglish,i=this.state.options,c=r.key,s=r.rule,l=r.value,u=n.labels,f=n.rules,d=O()({mixedString:u.title,components:{title:Object(m.createElement)("span",{className:t}),rule:Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__rule"),options:f,value:s,onChange:Object(y.partial)(a,c,"rule"),"aria-label":u.rule}),filter:i?Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__input"),options:i,value:l,onChange:Object(y.partial)(a,r.key,"value"),"aria-label":u.filter}):Object(m.createElement)(v.Spinner,null)}}),h=this.getScreenReaderText(r,n);return Object(m.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(m.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(m.createElement)("div",{className:x()("woocommerce-filters-advanced__fieldset",{"is-english":o})},d),h&&Object(m.createElement)("span",{className:"screen-reader-text"},h))}}]),t}();Ee.propTypes={config:_.a.shape({labels:_.a.shape({rule:_.a.string,title:_.a.string,filter:_.a.string}),rules:_.a.arrayOf(_.a.object),input:_.a.object}).isRequired,filter:_.a.shape({key:_.a.string,rule:_.a.string,value:_.a.string}).isRequired,onFilterChange:_.a.func.isRequired};var Se=Ee,Oe=n(22),Me=n(29);function xe(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,a=[],i=0;i<t.length;i++){var c=t[i];if(!n.includes(c.value.id)){var s=c.keywords,l=void 0===s?[]:s;if("string"==typeof c.label&&(l=[].concat(o(l),[c.label])),l.some(function(t){return e.test(t)})&&(a.push(c),a.length===r))break}}return a}var Ce=function(e){function t(){var e;return i(this,t),(e=d(this,h(t).apply(this,arguments))).bindNode=e.bindNode.bind(f(e)),e.select=e.select.bind(f(e)),e.reset=e.reset.bind(f(e)),e.search=e.search.bind(f(e)),e.handleKeyDown=e.handleKeyDown.bind(f(e)),e.debouncedLoadOptions=Object(y.debounce)(e.loadOptions,400),e.state=e.constructor.getInitialState(),e}return b(t,m["Component"]),s(t,null,[{key:"getInitialState",value:function(){return{search:/./,selectedIndex:0,query:void 0,filteredOptions:[]}}}]),s(t,[{key:"bindNode",value:function(e){this.node=e}},{key:"select",value:function(e){var t=this.props,n=t.onSelect,r=t.completer.getOptionCompletion,a=this.state.query;if(!e.isDisabled){if(r)n(r(e.value,a));this.reset()}}},{key:"reset",value:function(){!!this.node&&this.setState(this.constructor.getInitialState())}},{key:"handleFocusOutside",value:function(){this.reset()}},{key:"announce",value:function(e){var t=this.props.debouncedSpeak;t&&(e.length?t(Object(g.sprintf)(Object(g._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",e.length,"woocommerce-admin"),e.length),"assertive"):t(Object(g.__)("No results.","woocommerce-admin"),"assertive"))}},{key:"loadOptions",value:function(e,t){var n=this,r=e.options;if(t)var a=this.activePromise=Promise.resolve("function"==typeof r?r(t):r).then(function(r){if(r&&n.state.query){var o=n.props.selected;if(a===n.activePromise){var i=r.map(function(n,r){return{key:r,value:n,label:e.getOptionLabel(n,t),keywords:e.getOptionKeywords?e.getOptionKeywords(n):[],isDisabled:!!e.isOptionDisabled&&e.isOptionDisabled(n)}}),c=xe(n.state.search,i,o),s=c.length===n.state.filteredOptions.length?n.state.selectedIndex:0;n.setState({options:i,filteredOptions:c,selectedIndex:s}),n.announce(c)}}});else this.setState({options:[],filteredOptions:[],selectedIndex:0})}},{key:"search",value:function(e){var t=this.state.query,n=this.props,r=n.completer,a=void 0===r?{}:r,o=n.selected,i=e.target.value.trim();a&&i!==t&&(a.isDebounced?this.debouncedLoadOptions(a,i):this.loadOptions(a,i));var c=void 0!==a.getSearchExpression?a.getSearchExpression(Object(y.escapeRegExp)(i)):Object(y.escapeRegExp)(i),s=c?new RegExp(c,"i"):/^$/,l=xe(s,this.state.options,o);this.setState({selectedIndex:0,filteredOptions:l,search:s,query:i}),this.state.options&&this.announce(l)}},{key:"getOptions",value:function(){var e=this.props,t=e.allowFreeText,n=e.completer.getFreeTextOptions,r=this.state,a=r.filteredOptions,o=r.query;return(t&&n?n(o):[]).concat(a)}},{key:"handleKeyDown",value:function(e){var t=this.getOptions(),n=this.state.selectedIndex;if(0!==t.length){var r;switch(e.keyCode){case Me.UP:r=(0===n?t.length:n)-1,this.setState({selectedIndex:r});break;case Me.TAB:case Me.DOWN:r=(n+1)%t.length,this.setState({selectedIndex:r});break;case Me.ENTER:this.select(t[n]);break;case Me.LEFT:case Me.RIGHT:case Me.ESCAPE:return void this.reset();default:return}e.preventDefault(),e.stopPropagation()}}},{key:"toggleKeyEvents",value:function(e){var t=e?"addEventListener":"removeEventListener";this.node[t]("keydown",this.handleKeyDown,!0)}},{key:"isExpanded",value:function(e,t){var n=t.filteredOptions,r=t.query;return n.length>0||e.completer.getFreeTextOptions&&r}},{key:"componentDidUpdate",value:function(e,t){var n=this.isExpanded(this.props,this.state),r=this.isExpanded(e,t);n&&!r?this.toggleKeyEvents(!0):!n&&r&&this.toggleKeyEvents(!1)}},{key:"componentWillUnmount",value:function(){this.toggleKeyEvents(!1),this.debouncedLoadOptions.cancel()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.instanceId,a=t.completer.className,o=void 0===a?"":a,i=t.staticResults,c=this.state.selectedIndex,s=this.isExpanded(this.props,this.state),l=s?this.getOptions():[],u=(l[c]||{}).key,f=void 0===u?"":u,d=s?"woocommerce-search__autocomplete-".concat(r):null,h=s?"woocommerce-search__autocomplete-".concat(r,"-").concat(f):null,p=x()("woocommerce-search__autocomplete-results",{"is-static-results":i});return Object(m.createElement)("div",{ref:this.bindNode,className:"woocommerce-search__autocomplete"},n({isExpanded:s,listBoxId:d,activeId:h,onChange:this.search}),s&&Object(m.createElement)("div",{id:d,role:"listbox",className:p},l.map(function(t,n){return Object(m.createElement)(v.Button,{key:t.key,id:"woocommerce-search__autocomplete-".concat(r,"-").concat(t.key),role:"option","aria-selected":n===c,disabled:t.isDisabled,className:x()("woocommerce-search__autocomplete-result",o,{"is-selected":n===c}),onClick:function(){return e.select(t)}},t.label)})))}}]),t}(),De=Object(Oe.compose)([v.withSpokenMessages,Oe.withInstanceId,v.withFocusOutside])(Ce),je=n(10),Pe=n.n(je);function Fe(e,t){if(!t)return null;var n=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}}function Te(e){return[e.country,e.state,e.name||Object(g.__)("TAX","woocommerce-admin"),e.priority].filter(Boolean).map(function(e){return e.toString().toUpperCase().trim()}).join("-")}var Ie={name:"categories",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=oe({search:e,per_page:10,orderby:"count"}));return Pe()({path:"/wc/v4/products/categories".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"title",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All categories with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=Fe(e.name,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},Ne=n(51),Ae=n(255),Re=n.n(Ae),Be=function(e){var t=e.code,n=e.order,r=e.className,a=e.size,o=e.hideFromScreenReader,i=x()("woocommerce-flag",r),c=t||"unknown";n&&n.shipping&&n.shipping.country?c=n.shipping.country:n&&n.billing&&n.billing.country&&(c=n.billing.country);var s={fontSize:a},l=Object(y.get)(Re.a.countryCode(c),"emoji");return Object(m.createElement)("div",{className:i,style:s,"aria-hidden":o},l&&Object(m.createElement)("span",null,l),!l&&Object(m.createElement)("span",{className:"woocommerce-flag__fallback"},"Invalid country flag"))};Be.propTypes={code:_.a.string,order:_.a.object,className:_.a.string,size:_.a.number};var Le=Be,Ue={name:"countries",className:"woocommerce-search__country-result",isDebounced:!0,options:function(){return wcSettings.dataEndpoints.countries||[]},getSearchExpression:function(e){return"^"+e},getOptionKeywords:function(e){return[e.code,Object(Ne.decodeEntities)(e.name)]},getOptionLabel:function(e,t){var n=Object(Ne.decodeEntities)(e.name),r=Fe(n,t)||{};return[Object(m.createElement)(Le,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",code:e.code,size:18,hideFromScreenReader:!0}),Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":n},r.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.code,label:Object(Ne.decodeEntities)(e.name)}}},ze={name:"coupons",className:"woocommerce-search__coupon-result",options:function(e){var t="";e&&(t=oe({search:e,per_page:10}));return Pe()({path:"/wc/v4/coupons".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.code]},getFreeTextOptions:function(e){return[{key:"code",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All coupons with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,code:e}}]},getOptionLabel:function(e,t){var n=Fe(e.code,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.code}}},He={name:"customers",className:"woocommerce-search__customers-result",options:function(e){var t="";e&&(t=oe({search:e,searchby:"name",per_page:10}));return Pe()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"name",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All customers with names that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=Fe(e.name,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},Ve={name:"download-ips",className:"woocommerce-search__download-ip-result",options:function(e){var t="";if(e)return t=oe({match:e}),Pe()({path:"/wc/v4/data/download-ips".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.user_ip_address]},getOptionLabel:function(e,t){var n=Fe(e.user_ip_address,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.user_ip_address},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.user_ip_address,label:e.user_ip_address}}},qe={name:"emails",className:"woocommerce-search__emails-result",options:function(e){var t="";e&&(t=oe({search:e,searchby:"email",per_page:10}));return Pe()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.email]},getOptionLabel:function(e,t){var n=Fe(e.email,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.email},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.email}}},Ke={name:"orders",className:"woocommerce-search__order-result",options:function(e){var t="";if(e)return t=oe({number:e,per_page:10}),Pe()({path:"/wc/v4/orders".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return["#"+e.number]},getOptionLabel:function(e,t){var n=Fe("#"+e.number,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":"#"+e.number},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:"#"+e.number}}},We=function(e){var t=e.product,n=e.alt,r=e.width,a=e.height,o=e.className,i=he(e,["product","alt","width","height","className"]),c=Object(y.get)(t,["images",0])||Object(y.get)(t,["image"]),s=c&&c.src||!1,l=n||c&&c.alt||"",u=x()("woocommerce-product-image",o,{"is-placeholder":!s});return Object(m.createElement)("img",D({className:u,src:s||wcSettings.wcAssetUrl+"images/placeholder.png",width:r,height:a,alt:l},i))};We.propTypes={width:_.a.number,height:_.a.number,className:_.a.string,product:_.a.object,alt:_.a.string},We.defaultProps={width:60,height:60,className:""};var Ye=We,Ge={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=oe({search:e,per_page:10,orderby:"popularity"}));return Pe()({path:"/wc/v4/products".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name,e.sku]},getFreeTextOptions:function(e){return[{key:"title",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All products with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=Fe(e.name,t)||{};return[Object(m.createElement)(Ye,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},$e={name:"taxes",className:"woocommerce-search__tax-result",options:function(e){var t="";e&&(t=oe({code:e,per_page:10}));return Pe()({path:"/wc/v4/taxes".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.id,Te(e)]},getFreeTextOptions:function(e){return[{key:"code",label:Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},O()({mixedString:Object(g.__)("All taxes with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var n=Fe(Te(e),t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:Te(e)}}},Xe={name:"usernames",className:"woocommerce-search__usernames-result",options:function(e){var t="";e&&(t=oe({search:e,searchby:"username",per_page:10}));return Pe()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.username]},getOptionLabel:function(e,t){var n=Fe(e.username,t)||{};return[Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.username},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.username}}};function Ze(e){return e.attributes.reduce(function(e,t,n,r){return e+"".concat(t.option).concat(r.length===n+1?"":", ")},"")}var Qe={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=oe({search:e,per_page:10}));var n=le().products;return n&&!n.includes(",")||console.warn("Invalid product id supplied to Variations autocompleter"),Pe()({path:"/wc/v4/products/".concat(n,"/variations").concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[Ze(e),e.sku]},getOptionLabel:function(e,t){var n=Fe(Ze(e),t)||{};return[Object(m.createElement)(Ye,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(m.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.description},n.suggestionBeforeMatch,Object(m.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:Ze(e)}}},Je=function(e){var t=e.id,n=e.instanceId,r=e.isVisible,a=e.label,o=e.popoverContents,i=e.remove,c=e.screenReaderLabel,s=e.setState,l=e.className;if(c=c||a,!a)return null;var u=x()("woocommerce-tag",l,{"has-remove":!!i}),f="woocommerce-tag__label-".concat(n),d=Object(m.createElement)(m.Fragment,null,Object(m.createElement)("span",{className:"screen-reader-text"},c),Object(m.createElement)("span",{"aria-hidden":"true"},a));return Object(m.createElement)("span",{className:u},o?Object(m.createElement)(v.Button,{className:"woocommerce-tag__text",id:f,onClick:function(){return s(function(){return{isVisible:!0}})},isToggled:r},d):Object(m.createElement)("span",{className:"woocommerce-tag__text",id:f},d),o&&r&&Object(m.createElement)(v.Popover,{onClose:function(){return s(function(){return{isVisible:!1}})}},o),i&&Object(m.createElement)(v.IconButton,{className:"woocommerce-tag__remove",icon:Object(m.createElement)(v.Dashicon,{icon:"dismiss",size:20}),onClick:i(t),label:Object(g.sprintf)(Object(g.__)("Remove %s","woocommerce-admin"),a),"aria-describedby":f}))};Je.propTypes={id:_.a.oneOfType([_.a.number,_.a.string]),label:_.a.string.isRequired,popoverContents:_.a.node,remove:_.a.func,screenReaderLabel:_.a.string};var et=Object(Oe.withState)({isVisible:!1})(Object(Oe.withInstanceId)(Je)),tt=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).state={value:"",isActive:!1},n.input=Object(m.createRef)(),n.selectResult=n.selectResult.bind(f(n)),n.removeAll=n.removeAll.bind(f(n)),n.removeResult=n.removeResult.bind(f(n)),n.updateSearch=n.updateSearch.bind(f(n)),n.onFocus=n.onFocus.bind(f(n)),n.onBlur=n.onBlur.bind(f(n)),n.onKeyDown=n.onKeyDown.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"selectResult",value:function(e){var t=this.props,n=t.selected,r=t.onChange;-1===Object(y.findIndex)(n,{id:e.id})&&(this.setState({value:""}),r([].concat(o(n),[e])))}},{key:"removeAll",value:function(){(0,this.props.onChange)([])}},{key:"removeResult",value:function(e){var t=this;return function(){var n=t.props,r=n.selected,a=n.onChange,i=Object(y.findIndex)(r,{id:e});a([].concat(o(r.slice(0,i)),o(r.slice(i+1))))}}},{key:"updateSearch",value:function(e){var t=this;return function(n){var r=n.target.value||"";t.setState({value:r}),e(n)}}},{key:"getAutocompleter",value:function(){switch(this.props.type){case"categories":return Ie;case"countries":return Ue;case"coupons":return ze;case"customers":return He;case"downloadIps":return Ve;case"emails":return qe;case"orders":return Ke;case"products":return Ge;case"taxes":return $e;case"usernames":return Xe;case"variations":return Qe;default:return{}}}},{key:"shouldRenderTags",value:function(){return this.props.selected.some(function(e){return Boolean(e.label)})}},{key:"renderTags",value:function(){var e=this,t=this.props.selected;return this.shouldRenderTags()?Object(m.createElement)(m.Fragment,null,t.map(function(n,r){if(!n.label)return null;var a=Object(g.sprintf)(Object(g.__)("%1$s (%2$s of %3$s)","woocommerce-admin"),n.label,r+1,t.length);return Object(m.createElement)(et,{key:n.id,id:n.id,label:n.label,remove:e.removeResult,screenReaderLabel:a})})):null}},{key:"onFocus",value:function(e){var t=this;return function(n){t.setState({isActive:!0}),e(n)}}},{key:"onBlur",value:function(){this.setState({isActive:!1})}},{key:"onKeyDown",value:function(e){var t=this.state.value,n=this.props,r=n.selected,a=n.onChange;8===e.keyCode&&!t&&r.length&&a(o(r.slice(0,-1)))}},{key:"render",value:function(){var e=this,t=this.getAutocompleter(),n=this.props,r=n.allowFreeTextSearch,a=n.className,o=n.inlineTags,i=n.instanceId,c=n.placeholder,s=n.selected,l=n.showClearButton,u=n.staticResults,f=this.state,d=f.value,h=void 0===d?"":d,p=f.isActive,b={"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"]},y=this.shouldRenderTags(),w=t.inputType?t.inputType:"text",_=Object(m.createElement)(E.a,{className:"woocommerce-search__icon",icon:"search",size:18});return Object(m.createElement)("div",{className:x()("woocommerce-search",a,{"has-inline-tags":o})},Object(m.createElement)(De,{allowFreeText:r,completer:t,onSelect:this.selectResult,selected:s.map(function(e){return e.id}),staticResults:u},function(t){var n=t.listBoxId,r=t.activeId,a=t.onChange;return o?Object(m.createElement)("div",{className:x()("woocommerce-search__inline-container",{"is-active":p,"has-tags":o&&y}),onClick:function(){e.input.current.focus()}},_,Object(m.createElement)("div",{className:"woocommerce-search__token-list"},e.renderTags(),Object(m.createElement)("input",D({ref:e.input,type:w,size:(0===h.length&&c&&c.length||h.length)+1,value:h,placeholder:!y&&c||"",className:"woocommerce-search__inline-input",onChange:e.updateSearch(a),"aria-owns":n,"aria-activedescendant":r,onFocus:e.onFocus(a),onBlur:e.onBlur,onKeyDown:e.onKeyDown,"aria-describedby":y?"search-inline-input-".concat(i):null},b)),Object(m.createElement)("span",{id:"search-inline-input-".concat(i),className:"screen-reader-text"},Object(g.__)("Move backward for selected items","woocommerce-admin")))):Object(m.createElement)(m.Fragment,null,_,Object(m.createElement)("input",D({type:"search",value:h,placeholder:c,className:"woocommerce-search__input",onChange:e.updateSearch(a),"aria-owns":n,"aria-activedescendant":r},b)))}),!o&&this.renderTags(),l&&y?Object(m.createElement)(v.Button,{className:"woocommerce-search__clear",isLink:!0,onClick:this.removeAll},Object(m.createElement)(v.Icon,{icon:"dismiss"}),Object(m.createElement)("span",{className:"screen-reader-text"},Object(g.__)("Clear all","woocommerce-admin"))):null)}}]),t}();tt.propTypes={allowFreeTextSearch:_.a.bool,className:_.a.string,onChange:_.a.func,type:_.a.oneOf(["categories","countries","coupons","customers","downloadIps","emails","orders","products","taxes","usernames","variations"]).isRequired,placeholder:_.a.string,selected:_.a.arrayOf(_.a.shape({id:_.a.oneOfType([_.a.number,_.a.string]).isRequired,label:_.a.string})),inlineTags:_.a.bool,showClearButton:_.a.bool,staticResults:_.a.bool},tt.defaultProps={allowFreeTextSearch:!1,onChange:y.noop,selected:[],inlineTags:!1,showClearButton:!1,staticResults:!1};var nt=Object(Oe.withInstanceId)(tt),rt=function(e){function t(e){var n,r=e.filter,a=e.config,o=e.query;return i(this,t),(n=d(this,h(t).apply(this,arguments))).onSearchChange=n.onSearchChange.bind(f(n)),n.state={selected:[]},n.updateLabels=n.updateLabels.bind(f(n)),r.value.length&&a.input.getLabels(r.value,o).then(n.updateLabels),n}return b(t,m["Component"]),s(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.config,r=t.filter,a=t.query,o=e.filter;if(r.value.length&&!Object(y.isEqual)(o,r)){var i=this.state.selected.map(function(e){return e.id});ce(r.value).every(function(e){return!i.includes(e)})&&n.input.getLabels(r.value,a).then(this.updateLabels)}}},{key:"updateLabels",value:function(e){var t=this.state.selected.map(function(e){return e.id}),n=e.map(function(e){return e.id});Object(y.isEqual)(n.sort(),t.sort())||this.setState({selected:e})}},{key:"onSearchChange",value:function(e){this.setState({selected:e});var t=this.props,n=t.filter,r=t.onFilterChange,a=e.map(function(e){return e.id}).join(",");r(n.key,"value",a)}},{key:"getScreenReaderText",value:function(e,t){var n=this.state.selected;if(0===n.length)return"";var r=Object(y.find)(t.rules,{value:e.rule})||{},a=n.map(function(e){return e.label}).join(", ");return ke(O()({mixedString:t.labels.title,components:{filter:Object(m.createElement)(m.Fragment,null,a),rule:Object(m.createElement)(m.Fragment,null,r.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.config,r=e.filter,a=e.onFilterChange,o=e.isEnglish,i=this.state.selected,c=r.key,s=r.rule,l=n.input,u=n.labels,f=n.rules,d=O()({mixedString:u.title,components:{title:Object(m.createElement)("span",{className:t}),rule:Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__rule"),options:f,value:s,onChange:Object(y.partial)(a,c,"rule"),"aria-label":u.rule}),filter:Object(m.createElement)(nt,{className:x()(t,"woocommerce-filters-advanced__input"),onChange:this.onSearchChange,type:l.type,placeholder:u.placeholder,selected:i,inlineTags:!0,"aria-label":u.filter})}}),h=this.getScreenReaderText(r,n);return Object(m.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(m.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(m.createElement)("div",{className:x()("woocommerce-filters-advanced__fieldset",{"is-english":o})},d),h&&Object(m.createElement)("span",{className:"screen-reader-text"},h))}}]),t}();rt.propTypes={config:_.a.shape({labels:_.a.shape({placeholder:_.a.string,rule:_.a.string,title:_.a.string}),rules:_.a.arrayOf(_.a.object),input:_.a.object}).isRequired,filter:_.a.shape({key:_.a.string,rule:_.a.string,value:_.a.string}).isRequired,onFilterChange:_.a.func.isRequired,query:_.a.object};var at=rt;function ot(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,a=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(r=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(a)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var it=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"render",value:function(){var e=this.props,t=e.label,n=e.value,r=e.help,a=e.className,o=e.instanceId,i=e.onChange,c=e.prefix,s=e.suffix,l=e.type,u=he(e,["label","value","help","className","instanceId","onChange","prefix","suffix","type"]),f="inspector-text-control-with-affixes-".concat(o),d=[];return r&&d.push("".concat(f,"__help")),c&&d.push("".concat(f,"__prefix")),s&&d.push("".concat(f,"__suffix")),Object(m.createElement)(v.BaseControl,{label:t,id:f,help:r,className:a},Object(m.createElement)("div",{className:"text-control-with-affixes"},c&&Object(m.createElement)("span",{id:"".concat(f,"__prefix"),className:"text-control-with-affixes__prefix"},c),Object(m.createElement)("input",D({className:"components-text-control__input",type:l,id:f,value:n,onChange:function(e){return i(e.target.value)},"aria-describedby":d.join(" ")},u)),s&&Object(m.createElement)("span",{id:"".concat(f,"__suffix"),className:"text-control-with-affixes__suffix"},s)))}}]),t}();it.defaultProps={type:"text"},it.propTypes={label:_.a.string,help:_.a.string,type:_.a.string,value:_.a.string.isRequired,className:_.a.string,onChange:_.a.func.isRequired,prefix:_.a.node,suffix:_.a.node};var ct=Object(Oe.withInstanceId)(it),st=n(318);function lt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("number"!=typeof e&&(e=parseFloat(e)),isNaN(e))return"";var n=Object(y.get)(wcSettings,["currency","decimal_separator"],"."),r=Object(y.get)(wcSettings,["currency","thousand_separator"],",");if(t=parseInt(t),isNaN(t)){var a=ot(e.toString().split("."),2)[1];t=a?a.length:0}return st(e,t,n,r)}function ut(e,t){t||(t=Object(y.get)(wcSettings,["currency","symbol"],"$"));var n=lt(e,Object(y.get)(wcSettings,["currency","precision"],2)),r=Object(y.get)(wcSettings,["currency","price_format"],"%1$s%2$s");return""===n?n:Object(g.sprintf)(r,t,n)}var ft=function(e){function t(){return i(this,t),d(this,h(t).apply(this,arguments))}return b(t,m["Component"]),s(t,[{key:"getBetweenString",value:function(){return Object(g._x)("{{rangeStart /}}{{span}} and {{/span}}{{rangeEnd /}}","Numerical range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var n=Object(y.get)(t,["input","type"],"number"),r=Object(y.find)(t.rules,{value:e.rule})||{},a=ot(Object(y.isArray)(e.value)?e.value:[e.value],2),o=a[0],i=a[1];if(!o||"between"===r.value&&!i)return"";"currency"===n&&(o=ut(o),i=ut(i));var c=o;return"between"===r.value&&(c=O()({mixedString:this.getBetweenString(),components:{rangeStart:Object(m.createElement)(m.Fragment,null,o),rangeEnd:Object(m.createElement)(m.Fragment,null,i),span:Object(m.createElement)(m.Fragment,null)}})),ke(O()({mixedString:t.labels.title,components:{filter:Object(m.createElement)(m.Fragment,null,c),rule:Object(m.createElement)(m.Fragment,null,r.label)}}))}},{key:"getFormControl",value:function(e){var t=e.type,n=e.value,r=e.label,a=e.onChange;if("currency"===t){var o=Object(y.get)(wcSettings,["currency","symbol"]);return 0===Object(y.get)(wcSettings,["currency","position"]).indexOf("right")?Object(m.createElement)(ct,{suffix:Object(m.createElement)("span",{dangerouslySetInnerHTML:{__html:o}}),className:"woocommerce-filters-advanced__input",type:"number",value:n||"","aria-label":r,onChange:a}):Object(m.createElement)(ct,{prefix:Object(m.createElement)("span",{dangerouslySetInnerHTML:{__html:o}}),className:"woocommerce-filters-advanced__input",type:"number",value:n||"","aria-label":r,onChange:a})}return Object(m.createElement)(v.TextControl,{className:"woocommerce-filters-advanced__input",type:"number",value:n||"","aria-label":r,onChange:a})}},{key:"getFilterInputs",value:function(){var e=this.props,t=e.config,n=e.filter,r=e.onFilterChange,a=Object(y.get)(t,["input","type"],"number");if("between"===n.rule)return this.getRangeInput();var o=ot(Object(y.isArray)(n.value)?n.value:[n.value],2),i=o[0],c=o[1];Boolean(c)&&r(n.key,"value",i||c);var s="";return s="lessthan"===n.rule?Object(g._x)("%(field)s maximum amount","maximum value input","woocommerce-admin"):Object(g._x)("%(field)s minimum amount","minimum value input","woocommerce-admin"),this.getFormControl({type:a,value:i||c,label:Object(g.sprintf)(s,{field:Object(y.get)(t,["labels","add"])}),onChange:Object(y.partial)(r,n.key,"value")})}},{key:"getRangeInput",value:function(){var e=this.props,t=e.config,n=e.filter,r=e.onFilterChange,a=Object(y.get)(t,["input","type"],"number"),o=ot(Object(y.isArray)(n.value)?n.value:[n.value],2),i=o[0],c=o[1];return O()({mixedString:this.getBetweenString(),components:{rangeStart:this.getFormControl({type:a,value:i||"",label:Object(g.sprintf)(Object(g.__)("%(field)s range start","woocommerce-admin"),{field:Object(y.get)(t,["labels","add"])}),onChange:function(e){r(n.key,"value",[e,c])}}),rangeEnd:this.getFormControl({type:a,value:c||"",label:Object(g.sprintf)(Object(g.__)("%(field)s range end","woocommerce-admin"),{field:Object(y.get)(t,["labels","add"])}),onChange:function(e){r(n.key,"value",[i,e])}}),span:Object(m.createElement)("span",{className:"separator"})}})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.config,r=e.filter,a=e.onFilterChange,o=e.isEnglish,i=r.key,c=r.rule,s=n.labels,l=n.rules,u=O()({mixedString:s.title,components:{title:Object(m.createElement)("span",{className:t}),rule:Object(m.createElement)(v.SelectControl,{className:x()(t,"woocommerce-filters-advanced__rule"),options:l,value:c,onChange:Object(y.partial)(a,i,"rule"),"aria-label":s.rule}),filter:Object(m.createElement)("div",{className:x()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===c})},this.getFilterInputs())}}),f=this.getScreenReaderText(r,n);return Object(m.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(m.createElement)("legend",{className:"screen-reader-text"},s.add||""),Object(m.createElement)("div",{className:x()("woocommerce-filters-advanced__fieldset",{"is-english":o})},u),f&&Object(m.createElement)("span",{className:"screen-reader-text"},f))}}]),t}(),dt=n(7),ht=n.n(dt),pt="month",bt="previous_year",mt="YYYY-MM-DD",gt=[{value:"today",label:Object(g.__)("Today","woocommerce-admin")},{value:"yesterday",label:Object(g.__)("Yesterday","woocommerce-admin")},{value:"week",label:Object(g.__)("Week to Date","woocommerce-admin")},{value:"last_week",label:Object(g.__)("Last Week","woocommerce-admin")},{value:"month",label:Object(g.__)("Month to Date","woocommerce-admin")},{value:"last_month",label:Object(g.__)("Last Month","woocommerce-admin")},{value:"quarter",label:Object(g.__)("Quarter to Date","woocommerce-admin")},{value:"last_quarter",label:Object(g.__)("Last Quarter","woocommerce-admin")},{value:"year",label:Object(g.__)("Year to Date","woocommerce-admin")},{value:"last_year",label:Object(g.__)("Last Year","woocommerce-admin")},{value:"custom",label:Object(g.__)("Custom","woocommerce-admin")}],vt=[{value:"previous_period",label:Object(g.__)("Previous Period","woocommerce-admin")},{value:"previous_year",label:Object(g.__)("Previous Year","woocommerce-admin")}];function yt(e,t){if(ht.a.isMoment(t))return t.isValid()?t:null;if("string"==typeof t){var n=ht()(t,[mt,e],!0);return n.isValid()?n:null}throw new Error("toMoment requires a string to be passed as an argument")}function wt(e,t){var n=e.year()===t.year(),r=n&&e.month()===t.month(),a=n&&r&&e.isSame(t,"day"),o=Object(g.__)("MMM D, YYYY","woocommerce-admin"),i=Object(g.__)("MMM D","woocommerce-admin");if(a)return e.format(o);if(r){var c=e.date();return e.format(o).replace(c,"".concat(c," - ").concat(t.date()))}return n?"".concat(e.format(i)," - ").concat(t.format(o)):"".concat(e.format(o)," - ").concat(t.format(o))}function _t(e,t){var n,r,a=ht()().startOf(e).subtract(1,e),o=a.clone().endOf(e);if("previous_period"===t)if("year"===e)r=(n=ht()().startOf(e).subtract(2,e)).clone().endOf(e);else{var i=o.diff(a,"days");n=(r=a.clone().subtract(1,"days")).clone().subtract(i,"days")}else r=(n="week"===e?a.clone().subtract(1,"years").week(a.week()).startOf("week"):a.clone().subtract(1,"years")).clone().endOf(e);return{primaryStart:a,primaryEnd:o,secondaryStart:n,secondaryEnd:r}}function kt(e,t){var n,r,a=ht()().startOf(e),o=ht()(),i=o.diff(a,"days");return"previous_period"===t?(n=a.clone().subtract(1,e),r=o.clone().subtract(1,e)):r=(n="week"===e?a.clone().subtract(1,"years").week(a.week()).startOf("week"):a.clone().subtract(1,"years")).clone().add(i,"days"),{primaryStart:a,primaryEnd:o,secondaryStart:n,secondaryEnd:r}}var Et=function(e){var t=e.period,n=e.compare,r=e.after,a=e.before;return{period:t||pt,compare:n||bt,after:r?ht()(r):null,before:a?ht()(a):null}},St=function(e){var t=Et(e),n=t.period,r=t.compare,a=t.after,o=t.before,i=function(e,t,n,r){switch(e){case"today":return kt("day",t);case"yesterday":return _t("day",t);case"week":return kt("week",t);case"last_week":return _t("week",t);case"month":return kt("month",t);case"last_month":return _t("month",t);case"quarter":return kt("quarter",t);case"last_quarter":return _t("quarter",t);case"year":return kt("year",t);case"last_year":return _t("year",t);case"custom":var a=r.diff(n,"days");if("previous_period"===t){var o=n.clone().subtract(1,"days");return{primaryStart:n,primaryEnd:r,secondaryStart:o.clone().subtract(a,"days"),secondaryEnd:o}}return{primaryStart:n,primaryEnd:r,secondaryStart:n.clone().subtract(1,"years"),secondaryEnd:r.clone().subtract(1,"years")}}}(n,r,a,o),c=i.primaryStart,s=i.primaryEnd,l=i.secondaryStart,u=i.secondaryEnd;return{primary:{label:Object(y.find)(gt,function(e){return e.value===n}).label,range:wt(c,s),after:c,before:s},secondary:{label:Object(y.find)(vt,function(e){return e.value===r}).label,range:wt(l,u),after:l,before:u}}};var Ot,Mt,xt;Ot=wcSettings.l10n,Mt=Ot.userLocale,xt=Ot.weekdaysShort,"en"!==ht.a.locale()&&ht.a.updateLocale(Mt,{longDateFormat:{L:Object(g.__)("MM/DD/YYYY","woocommerce-admin"),LL:Object(g.__)("MMMM D, YYYY","woocommerce-admin"),LLL:Object(g.__)("D MMMM YYYY LT","woocommerce-admin"),LLLL:Object(g.__)("dddd, D MMMM YYYY LT","woocommerce-admin"),LT:Object(g.__)("HH:mm","woocommerce-admin")},weekdaysMin:xt});var Ct={invalid:Object(g.__)("Invalid date","woocommerce-admin"),future:Object(g.__)("Select a date in the past","woocommerce-admin"),startAfterEnd:Object(g.__)("Start date must be before end date","woocommerce-admin"),endBeforeStart:Object(g.__)("Start date must be before end date","woocommerce-admin")};n(166),n(177);var Dt=function(e){var t=e.disabled,n=e.value,r=e.onChange,a=e.dateFormat,o=e.label,i=e.describedBy,c=e.error,s=e.onFocus,l=e.onKeyDown,u=e.errorPosition,f=x()("woocommerce-calendar__input",{"is-empty":0===n.length,"is-error":c}),d=Object(y.uniqueId)("_woo-dates-input");return Object(m.createElement)("div",{className:f},Object(m.createElement)("input",{type:"text",className:"woocommerce-calendar__input-text",value:n,onChange:r,"aria-label":o,id:d,"aria-describedby":"".concat(d,"-message"),placeholder:a.toLowerCase(),onFocus:s,onKeyDown:l,disabled:t}),c&&Object(m.createElement)(v.Popover,{className:"woocommerce-calendar__input-error",focusOnMount:!1,position:u},c),Object(m.createElement)(v.Dashicon,{icon:"calendar"}),Object(m.createElement)("p",{className:"screen-reader-text",id:"".concat(d,"-message")},c||i))};Dt.propTypes={disabled:_.a.bool,value:_.a.string,onChange:_.a.func.isRequired,dateFormat:_.a.string.isRequired,label:_.a.string.isRequired,describedBy:_.a.string.isRequired,error:_.a.string,errorPosition:_.a.string,onFocus:_.a.func,onKeyDown:_.a.func},Dt.defaultProps={disabled:!1,onFocus:function(){},errorPosition:"bottom center",onKeyDown:y.noop};var jt=Dt,Pt=function(e){function t(e){var n;return i(this,t),(n=d(this,h(t).call(this,e))).onDateChange=n.onDateChange.bind(f(n)),n.onInputChange=n.onInputChange.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"handleKeyDown",value:function(e,t,n){var r=n.keyCode;Me.TAB===r&&e&&t()}},{key:"handleFocus",value:function(e,t){e||t()}},{key:"onDateChange",value:function(e,t){var n=this.props,r=n.onUpdate,a=n.dateFormat,o=ht()(t);r({date:o,text:t?o.format(a):"",error:null}),e()}},{key:"onInputChange",value:function(e){var t=e.target.value,n=yt(this.props.dateFormat,t),r=n?null:Ct.invalid;this.props.onUpdate({date:n,text:t,error:t.length>0?r:null})}},{key:"render",value:function(){var e=this,t=this.props,n=t.date,r=t.disabled,a=t.text,o=t.dateFormat,i=t.error,c=t.isInvalidDate;return Object(m.createElement)(v.Dropdown,{position:"bottom center",focusOnMount:!1,renderToggle:function(t){var n=t.isOpen,c=t.onToggle;return Object(m.createElement)(jt,{disabled:r,value:a,onChange:e.onInputChange,dateFormat:o,label:Object(g.__)("Choose a date","woocommerce-admin"),error:i,describedBy:Object(g.sprintf)(Object(g.__)("Date input describing a selected date in format %s","woocommerce-admin"),o),onFocus:Object(y.partial)(e.handleFocus,n,c),"aria-expanded":n,focusOnMount:!1,onKeyDown:Object(y.partial)(e.handleKeyDown,n,c),errorPosition:"top center"})},renderContent:function(t){var r=t.onToggle;return Object(m.createElement)(me,{component:!1},Object(m.createElement)(be,{className:"woocommerce-calendar__date-picker-title"},Object(g.__)("select a date","woocommerce-admin")),Object(m.createElement)("div",{className:"woocommerce-calendar__react-dates is-core-datepicker"},Object(m.createElement)(v.DatePicker,{currentDate:n,onChange:Object(y.partial)(e.onDateChange,r),isInvalidDate:c})))}})}}]),t}();Pt.propTypes={date:_.a.object,disabled:_.a.bool,text:_.a.string,error:_.a.string,onUpdate:_.a.func.isRequired,dateFormat:_.a.string.isRequired,isInvalidDate:_.a.func};var Ft=Pt,Tt=Object(g.__)("MMM D, YYYY","woocommerce-admin"),It=Object(g.__)("MM/DD/YYYY","woocommerce-admin"),Nt=function(e){function t(e){var n,r=e.filter;i(this,t),n=d(this,h(t).apply(this,arguments));var a=ot(Array.isArray(r.value)?r.value:[null,r.value],2),o=a[0],c=a[1],s=o?yt(mt,o):null,l=c?yt(mt,c):null;return n.state={before:l,beforeText:l?l.format(It):"",beforeError:null,after:s,afterText:s?s.format(It):"",afterError:null},n.onSingleDateChange=n.onSingleDateChange.bind(f(n)),n.onRangeDateChange=n.onRangeDateChange.bind(f(n)),n.onRuleChange=n.onRuleChange.bind(f(n)),n}return b(t,m["Component"]),s(t,[{key:"getBetweenString",value:function(){return Object(g._x)("{{after /}}{{span}} and {{/span}}{{before /}}","Date range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var n=Object(y.find)(t.rules,{value:e.rule})||{},r=this.state,a=r.before,o=r.after;if(!a||"between"===n.value&&!o)return"";var i=a.format(Tt);return"between"===n.value&&(i=O()({mixedString:this.getBetweenString(),components:{after:Object(m.createElement)(m.Fragment,null,o.format(Tt)),before:Object(m.createElement)(m.Fragment,null,a.format(Tt)),span:Object(m.createElement)(m.Fragment,null)}})),ke(O()({mixedString:t.labels.title,components:{filter:Object(m.createElement)(m.Fragment,null,i),rule:Object(m.createElement)(m.Fragment,null,n.label)}}))}},{key:"onSingleDateChange",value:function(e){var t=e.date,n=e.text,r=e.error,a=this.props,o=a.filter,i=a.onFilterChange;this.setState({before:t,beforeText:n,beforeError:r}),t&&i(o.key,"value",t.format(mt))}},{key:"onRangeDateChange",value:function(e,t){var n,a=t.date,o=t.text,i=t.error,c=this.props,s=c.filter,l=c.onFilterChange;if(this.setState((r(n={},e,a),r(n,e+"Text",o),r(n,e+"Error",i),n)),a){var u=this.state,f=u.before,d=u.after,h=null,p=null;"after"===e&&(h=a.format(mt),p=f?f.format(mt):null),"before"===e&&(h=d?d.format(mt):null,p=a.format(mt)),h&&p&&l(s.key,"value",[h,p])}}},{key:"isFutureDate",value:function(e){return ht()().isBefore(ht()(e),"day")}},{key:"getFilterInputs",value:function(){var e=this.props.filter,t=this.state,n=t.before,r=t.beforeText,a=t.beforeError,o=t.after,i=t.afterText,c=t.afterError;return"between"===e.rule?O()({mixedString:this.getBetweenString(),components:{after:Object(m.createElement)(Ft,{date:o,text:i,error:c,onUpdate:Object(y.partial)(this.onRangeDateChange,"after"),dateFormat:It,isInvalidDate:this.isFutureDate}),before:Object(m.createElement)(Ft,{date:n,text:r,error:a,onUpdate:Object(y.partial)(this.onRangeDateChange,"before"),dateFormat:It,isInvalidDate:this.isFutureDate}),span:Object(m.createElement)("span",{className:"separator"})}}):Ob