Version Description
- 2021-02-16 =
Enhancements
- Login links on the checkout should use the account page. (3844)
- Prevent checkout linking to trashed terms and policy pages. (3843)
- Improved nonce logic by moving nonces to cart routes only. (3812)
- If coupons become invalid between applying to a cart and checking out, show the user a notice when the order is placed. (3810)
- Improve design of cart and checkout sidebars. (3797)
- Improve error displayed to customers when an item's stock status changes during checkout. (3703)
- Dev - Block Checkout will now respect custom address locales and custom country states via core filter hooks. (3662)
- Update checkout block payment methods UI. (3439)
Bug Fixes
- Fix JS warning if two cart products share the same name. (3814)
- Align place order button to the right of the block. (3803)
- Ensure special characters are displayed properly in the Cart sidebar. (3721)
- Fix a bug where the total price of items did not include tax in the cart and checkout blocks. (3851)
Download this release
Release Info
Developer | automattic |
Plugin | WooCommerce Gutenberg Products Block |
Version | 4.5.0 |
Comparing to | |
See all releases |
Code changes from version 4.5.0-dev to 4.5.0
- build/active-filters-frontend.asset.php +1 -0
- build/active-filters-frontend.js +6 -0
- build/active-filters.asset.php +1 -0
- build/active-filters.js +1 -0
- build/all-products-frontend.asset.php +1 -0
- build/all-products-frontend.js +6 -0
- build/all-products.asset.php +1 -0
- build/all-products.js +1 -0
- build/all-reviews.asset.php +1 -0
- build/all-reviews.js +1 -0
- build/atomic-block-components/add-to-cart--atomic-block-components/button.js +1 -0
- build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js +1 -0
- build/atomic-block-components/add-to-cart-frontend.js +1 -0
- build/atomic-block-components/add-to-cart.js +1 -0
- build/atomic-block-components/button-frontend.js +1 -0
- build/atomic-block-components/button.js +1 -0
- build/atomic-block-components/category-list-frontend.js +1 -0
- build/atomic-block-components/category-list.js +1 -0
- build/atomic-block-components/image-frontend.js +1 -0
- build/atomic-block-components/image.js +1 -0
- build/atomic-block-components/price-frontend.js +1 -0
- build/atomic-block-components/price.js +1 -0
- build/atomic-block-components/rating-frontend.js +1 -0
- build/atomic-block-components/rating.js +1 -0
- build/atomic-block-components/sale-badge-frontend.js +1 -0
- build/atomic-block-components/sale-badge.js +1 -0
- build/atomic-block-components/sku-frontend.js +1 -0
- build/atomic-block-components/sku.js +1 -0
- build/atomic-block-components/stock-indicator-frontend.js +1 -0
- build/atomic-block-components/stock-indicator.js +1 -0
- build/atomic-block-components/summary-frontend.js +1 -0
- build/atomic-block-components/summary.js +1 -0
- build/atomic-block-components/tag-list-frontend.js +1 -0
- build/atomic-block-components/tag-list.js +1 -0
- build/atomic-block-components/title-frontend.js +1 -0
- build/atomic-block-components/title.js +1 -0
- build/attribute-filter-frontend.asset.php +1 -0
- build/attribute-filter-frontend.js +14 -0
- build/attribute-filter.asset.php +1 -0
- build/attribute-filter.js +1 -0
- build/blocks-checkout.asset.php +1 -0
- build/blocks-checkout.js +6 -0
- build/blocks.asset.php +1 -0
- build/blocks.js +1 -0
- build/cart-frontend.asset.php +1 -0
- build/cart-frontend.js +14 -0
- build/cart.asset.php +1 -0
- build/cart.js +1 -0
build/active-filters-frontend.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'd786dabaaf7dcad40b6daaa115fd85c7');
|
build/active-filters-frontend.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=227)}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},10:function(e,t,r){var n=r(82),o=r(83),c=r(59),i=r(84);e.exports=function(e,t){return n(e)||o(e,t)||c(e,t)||i()}},11:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},r.apply(this,arguments)}e.exports=r},111:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(11),o=r.n(n),c=r(7),i=r.n(c),a=r(0),u=r(43);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,r=e.containers,n=e.getProps,c=void 0===n?function(){}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==r.length&&Array.prototype.forEach.call(r,(function(e,r){var n=c(e,r),i=s(e,r),f=l(l({},e.dataset),n.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},n,{attributes:f})))),e)}))},b=function(e){var t=e.Block,r=e.getProps,n=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})},d=function(e){var t=document.body.querySelectorAll(f.join(","));b(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,c,i,a;r=l(l({},e),{},{wrapper:t}),n=r.Block,o=r.getProps,c=r.getErrorBoundaryProps,i=r.selector,a=r.wrapper.querySelectorAll(i),p({Block:n,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},114:function(e,t){},12:function(e,t){!function(){e.exports=this.wp.data}()},129:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(29),u=function(e){var t=e.className,r=e.size,n=i()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},130:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=r(14),i=r.n(c),a=r(2);r(3);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},132:function(e,t,r){"use strict";var n=r(0),o=r(4),c=r(15),i=r(12);t.a=function(e){return function(t){var r;return r=Object(n.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(r.current){var n=e(c.SCHEMA_STORE_KEY),o=n.isResolving,i=n.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},14:function(e,t,r){var n=r(61);e.exports=function(e,t){if(null==e)return{};var r,o,c=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(c[r]=e[r])}return c}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return i}));var n=r(9),o=n.c.reduce((function(e,t){var r,n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;return n.id&&e.push(n),e}),[]),c=function(e){if(e)return o.find((function(t){return t.id===e}))},i=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},144:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return c}));var n=r(8),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",c=e.filter((function(e){return e.attribute===r.taxonomy})),i=c.length?c[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(o)){var a=i.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==r.taxonomy}));a.length>0&&(i.slug=a.sort(),u.push(i)),t(Object(n.sortBy)(u,"attribute"))}},c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==r.taxonomy}));0===o.length?t(i):(i.push({attribute:r.taxonomy,operator:c,slug:Object(n.map)(o,"slug").sort()}),t(Object(n.sortBy)(i,"attribute")))}},149:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=(r(3),r(5)),u=r.n(a),s=r(1),l=r(130),f=r(129),p=(r(114),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,c=e.element,a=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,b=e.children,d=void 0===b?null:b,g=i()(e,["text","screenReaderText","element","className","radius","children"]),m=a,y=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),O=Boolean(n&&n!==t);return React.createElement(m,o()({className:y},g),React.createElement("span",{"aria-hidden":O,className:"wc-block-components-chip__text"},t),O&&React.createElement("span",{className:"screen-reader-text"},n),d)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,c=void 0===n?"":n,a=e.disabled,b=void 0!==a&&a,d=e.onRemove,g=void 0===d?function(){}:d,m=e.removeOnAnyClick,y=void 0!==m&&m,O=e.text,v=e.screenReaderText,h=void 0===v?"":v,j=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),w=y?"span":"button";if(!r){var _=h&&"string"==typeof h?h:O;r="string"!=typeof _?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),_)}var S={"aria-label":r,disabled:b,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},E=y?S:{},k=y?{"aria-hidden":!0}:S;return React.createElement(p,o()({},j,E,{className:u()(c,"is-removable"),element:y?"button":j.element,screenReaderText:h,text:O}),React.createElement(w,o()({className:"wc-block-components-chip__remove"},k),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},15:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},2:function(e,t){!function(){e.exports=this.React}()},20:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},21:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},22:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},227:function(e,t,r){e.exports=r(276)},228:function(e,t){},24:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},r(t)}e.exports=r},276:function(e,t,r){"use strict";r.r(t);var n=r(132),o=r(111),c=r(10),i=r.n(c),a=r(1),u=r(93),s=r(0),l=r(5),f=r.n(l),p=(r(3),r(38)),b=(r(228),r(143)),d=r(44),g=r(149),m=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(a.sprintf)(Object(a.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(d.formatPrice)(e),Object(d.formatPrice)(t)):Number.isFinite(e)?Object(a.sprintf)(Object(a.__)("From %s","woo-gutenberg-products-block"),Object(d.formatPrice)(e)):Object(a.sprintf)(Object(a.__)("Up to %s","woo-gutenberg-products-block"),Object(d.formatPrice)(t))},y=function(e){var t=e.type,r=e.name,n=e.prefix,o=e.removeCallback,c=void 0===o?function(){}:o,i=e.showLabel,u=void 0===i||i,s=e.displayStyle,l=n?React.createElement(React.Fragment,null,n," ",r):r,f=Object(a.sprintf)(Object(a.__)("Remove %s filter","woo-gutenberg-products-block"),r);return React.createElement("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},u&&React.createElement("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?React.createElement(g.a,{element:"span",text:l,onRemove:c,radius:"large",ariaLabel:f}):React.createElement("span",{className:"wc-block-active-filters__list-item-name"},l,React.createElement("button",{className:"wc-block-active-filters__list-item-remove",onClick:c},f)))},O=r(99),v=r(22),h=r(144),j=function(e){var t=e.attributeObject,r=void 0===t?{}:t,n=e.slugs,o=void 0===n?[]:n,c=e.operator,s=void 0===c?"in":c,l=e.displayStyle,f=Object(O.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[r.id]}),p=f.results,b=f.isLoading,d=Object(u.b)("attributes",[]),g=i()(d,2),m=g[0],j=g[1];if(b)return null;var w=r.label;return React.createElement("li",null,React.createElement("span",{className:"wc-block-active-filters__list-item-type"},w,":"),React.createElement("ul",null,o.map((function(e,t){var n=p.find((function(t){return t.slug===e}));if(!n)return null;var o="";return t>0&&"and"===s&&(o=React.createElement("span",{className:"wc-block-active-filters__list-item-operator"},Object(a.__)("and","woo-gutenberg-products-block"))),y({type:w,name:Object(v.decodeEntities)(n.name||e),prefix:o,removeCallback:function(){Object(h.a)(m,j,r,e)},showLabel:!1,displayStyle:l})}))))},w=function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(u.b)("attributes",[]),c=i()(o,2),l=c[0],d=c[1],g=Object(u.b)("min_price"),O=i()(g,2),v=O[0],h=O[1],w=Object(u.b)("max_price"),_=i()(w,2),S=_[0],E=_[1],k=Object(s.useMemo)((function(){return Number.isFinite(v)||Number.isFinite(S)?y({type:Object(a.__)("Price","woo-gutenberg-products-block"),name:m(v,S),removeCallback:function(){h(void 0),E(void 0)},displayStyle:t.displayStyle}):null}),[v,S,t.displayStyle,h,E]),R=Object(s.useMemo)((function(){return l.map((function(e){var r=Object(b.b)(e.attribute);return React.createElement(j,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[l,t.displayStyle]);if(!(l.length>0||Number.isFinite(v)||Number.isFinite(S)||n))return null;var x="h".concat(t.headingLevel),P=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return React.createElement(React.Fragment,null,!n&&t.heading&&React.createElement(x,null,t.heading),React.createElement("div",{className:"wc-block-active-filters"},React.createElement("ul",{className:P},n?React.createElement(React.Fragment,null,y({type:Object(a.__)("Size","woo-gutenberg-products-block"),name:Object(a.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),y({type:Object(a.__)("Color","woo-gutenberg-products-block"),name:Object(a.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):React.createElement(React.Fragment,null,k,R)),React.createElement("button",{className:"wc-block-active-filters__clear-all",onClick:function(){h(void 0),E(void 0),d([])}},React.createElement(p.a,{label:Object(a.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Clear All Filters","woo-gutenberg-products-block")}))))};Object(o.a)({selector:".wp-block-woocommerce-active-filters",Block:Object(n.a)(w),getProps:function(e){return{attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3}}}})},28:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=r=function(e){return typeof e}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(t)}e.exports=r},29:function(e,t){!function(){e.exports=this.wp.primitives}()},3:function(e,t,r){e.exports=r(71)()},32:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},33:function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}},34:function(e,t,r){var n=r(70);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)}},35:function(e,t,r){var n=r(28),o=r(20);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t}},38:function(e,t,r){"use strict";var n=r(7),o=r.n(n),c=(r(3),r(2)),i=r(5),a=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=r,f=null!=n;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=o||c.Fragment,l&&f&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(21),c=r.n(o),i=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},4:function(e,t){!function(){e.exports=this.wc.wcSettings}()},40:function(e,t){!function(){e.exports=this.wp.blocks}()},43:function(e,t,r){"use strict";var n=r(32),o=r.n(n),c=r(33),i=r.n(c),a=r(20),u=r.n(a),s=r(34),l=r.n(s),f=r(35),p=r.n(f),b=r(24),d=r.n(b),g=r(7),m=r.n(g),y=(r(3),r(2)),O=r(1),v=r(9),h=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.C,"img/block-error.svg"):t,n=e.header,o=void 0===n?Object(O.__)("Oops!","woo-gutenberg-products-block"):n,c=e.text,i=void 0===c?Object(O.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(O.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},r&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};r(73);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p()(this,r)}}var w=function(e){l()(r,e);var t=j(r);function r(){var e;o()(this,r);for(var n=arguments.length,c=new Array(n),i=0;i<n;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof i?i({errorMessage:u}):React.createElement(h,{errorMessage:n?u:null,header:t,imageUrl:r,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(y.Component);w.defaultProps={showErrorMessage:!0};t.a=w},44:function(e,t){!function(){e.exports=this.wc.priceFormat}()},5:function(e,t,r){var n;
|
2 |
+
/*!
|
3 |
+
Copyright (c) 2017 Jed Watson.
|
4 |
+
Licensed under the MIT License (MIT), see
|
5 |
+
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var c=typeof n;if("string"===c||"number"===c)e.push(n);else if(Array.isArray(n)&&n.length){var i=o.apply(null,n);i&&e.push(i)}else if("object"===c)for(var a in n)r.call(n,a)&&n[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},59:function(e,t,r){var n=r(60);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}},60:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}},61:function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}},62:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(10),o=r.n(n),c=r(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},63:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(2),o=function(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}},67:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=Object(n.createContext)("page"),c=function(){return Object(n.useContext)(o)};o.Provider},7:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}},70:function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},r(t,n)}e.exports=r},71:function(e,t,r){"use strict";var n=r(72);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,c,i){if(i!==n){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return r.PropTypes=r,r}},72:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},73:function(e,t){},8:function(e,t){!function(){e.exports=this.lodash}()},82:function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},83:function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){o=!0,c=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw c}}return r}}},84:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},9:function(e,t,r){"use strict";r.d(t,"j",(function(){return o})),r.d(t,"u",(function(){return c})),r.d(t,"y",(function(){return i})),r.d(t,"r",(function(){return a})),r.d(t,"m",(function(){return u})),r.d(t,"o",(function(){return s})),r.d(t,"i",(function(){return l})),r.d(t,"z",(function(){return f})),r.d(t,"l",(function(){return p})),r.d(t,"k",(function(){return b})),r.d(t,"c",(function(){return d})),r.d(t,"n",(function(){return g})),r.d(t,"C",(function(){return y})),r.d(t,"D",(function(){return O})),r.d(t,"v",(function(){return v})),r.d(t,"a",(function(){return h})),r.d(t,"w",(function(){return j})),r.d(t,"b",(function(){return w})),r.d(t,"q",(function(){return _})),r.d(t,"g",(function(){return S})),r.d(t,"x",(function(){return R})),r.d(t,"h",(function(){return x})),r.d(t,"t",(function(){return P})),r.d(t,"s",(function(){return T})),r.d(t,"B",(function(){return N})),r.d(t,"A",(function(){return C})),r.d(t,"d",(function(){return A})),r.d(t,"e",(function(){return B})),r.d(t,"f",(function(){return L})),r.d(t,"p",(function(){return D})),r.d(t,"E",(function(){return F}));var n=r(4),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=(Object(n.getSetting)("max_columns",6),Object(n.getSetting)("min_columns",1),Object(n.getSetting)("default_columns",3),Object(n.getSetting)("max_rows",6),Object(n.getSetting)("min_rows",1),Object(n.getSetting)("default_rows",3),Object(n.getSetting)("min_height",500),Object(n.getSetting)("default_height",500),Object(n.getSetting)("placeholderImgSrc","")),u=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),s=Object(n.getSetting)("limitTags"),l=(Object(n.getSetting)("hasProducts",!0),Object(n.getSetting)("hasTags",!0),Object(n.getSetting)("homeUrl",""),Object(n.getSetting)("couponsEnabled",!0)),f=(Object(n.getSetting)("shippingEnabled",!0),Object(n.getSetting)("taxesEnabled",!0)),p=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),b=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),d=(Object(n.getSetting)("productCount",0),Object(n.getSetting)("attributes",[])),g=Object(n.getSetting)("isShippingCalculatorEnabled",!0),m=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),y=Object(n.getSetting)("wcBlocksAssetUrl",""),O=Object(n.getSetting)("wcBlocksBuildUrl",""),v=Object(n.getSetting)("shippingCountries",{}),h=Object(n.getSetting)("allowedCountries",{}),j=Object(n.getSetting)("shippingStates",{}),w=Object(n.getSetting)("allowedStates",{}),_=(Object(n.getSetting)("shippingMethodsExist",!1),Object(n.getSetting)("paymentGatewaySortOrder",[])),S=Object(n.getSetting)("checkoutShowLoginReminder",!0),E={id:0,title:"",permalink:""},k=Object(n.getSetting)("storePages",{myaccount:E,shop:E,cart:E,checkout:E,privacy:E,terms:E}),R=k.shop.permalink,x=(k.checkout.id,k.checkout.permalink),P=k.privacy.permalink,T=k.privacy.title,N=k.terms.permalink,C=k.terms.title,A=(k.cart.id,k.cart.permalink),B=Object(n.getSetting)("checkoutAllowsGuest",!1),L=Object(n.getSetting)("checkoutAllowsSignup",!1),D=k.myaccount.permalink?k.myaccount.permalink:Object(n.getSetting)("loginUrl","/wp-login.php"),F=(r(40),function(){return m>1})},93:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return g}));var n=r(10),o=r.n(n),c=r(15),i=r(12),a=r(0),u=r(67),s=r(21),l=r.n(s),f=r(39),p=r(63),b=function(e){var t=Object(u.a)();e=e||t;var r=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(a.useCallback)((function(t){n(e,t)}),[e,n])]},d=function(e,t,r){var n=Object(u.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(r,e,t)}),[r,e,s])]},g=function(e,t){var r=Object(u.a)(),n=b(t=t||r),c=o()(n,2),i=c[0],s=c[1],d=Object(f.a)(i),g=Object(f.a)(e),m=Object(p.a)(g),y=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(m,g)||(s(Object.assign({},d,g)),y.current=!0)}),[d,g,m,s]),y.current?[i,s]:[e,s]}},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(15),o=r(12),c=r(0),i=r(39),a=r(62),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,f=void 0===l?{}:l,p=e.shouldSelect,b=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var d=Object(c.useRef)({results:[],isLoading:!0}),g=Object(i.a)(f),m=Object(i.a)(s),y=Object(a.a)(),O=Object(o.useSelect)((function(e){if(!b)return null;var o=e(n.COLLECTIONS_STORE_KEY),c=[t,r,g,m],i=o.getCollectionError.apply(o,c);return i&&y(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,r,m,g,b]);return null!==O&&(d.current=O),d.current}}});
|
build/active-filters.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'c0e285fed883cb5b83872f3250a2633f');
|
build/active-filters.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var r,o,a=t[0],u=t[1],l=t[2],b=0,f=[];b<a.length;b++)o=a[b],Object.prototype.hasOwnProperty.call(c,o)&&c[o]&&f.push(c[o][0]),c[o]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(e[r]=u[r]);for(s&&s(t);f.length;)f.shift()();return i.push.apply(i,l||[]),n()}function n(){for(var e,t=0;t<i.length;t++){for(var n=i[t],r=!0,a=1;a<n.length;a++){var u=n[a];0!==c[u]&&(r=!1)}r&&(i.splice(t--,1),e=o(o.s=n[0]))}return e}var r={},c={4:0},i=[];function o(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=r,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var s=u;return i.push([854,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(c)};c.Provider},119:function(e,t){},144:function(e,t,n){"use strict";var r=n(14),c=n.n(r),i=n(15),o=n.n(i),a=n(16),u=n.n(a),l=n(17),s=n.n(l),b=n(10),f=n.n(b),d=n(0),p=n(7),g=n(1),m=n(4);function v(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(d.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(m.Path,{d:n[t]})):null}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f()(e);if(t){var c=f()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var h=function(e){u()(n,e);var t=O(n);function n(){return c()(this,n),t.apply(this,arguments)}return o()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(d.createElement)(v,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,i=t.maxLevel,o=t.selectedLevel,a=t.onChange;return Object(d.createElement)(m.ToolbarGroup,{isCollapsed:r,icon:Object(d.createElement)(v,{level:o}),controls:Object(p.range)(c,i).map((function(t){return e.createLevelControl(t,o,a)}))})}}]),n}(d.Component);t.a=h},147:function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return g}));var r=n(18),c=n.n(r),i=n(37),o=n(21),a=n(0),u=n(100),l=n(33),s=n.n(l),b=n(53),f=n(96),d=function(e){var t=Object(u.a)();e=e||t;var n=Object(o.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},p=function(e,t,n){var r=Object(u.a)();n=n||r;var c=Object(o.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(o.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(a.useCallback)((function(t){l(n,e,t)}),[n,e,l])]},g=function(e,t){var n=Object(u.a)(),r=d(t=t||n),i=c()(r,2),o=i[0],l=i[1],p=Object(b.a)(o),g=Object(b.a)(e),m=Object(f.a)(g),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){s()(m,g)||(l(Object.assign({},p,g)),v.current=!0)}),[p,g,m,l]),v.current?[o,l]:[e,l]}},157:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(37),c=n(21),i=n(0),o=n(53),a=n(95),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,l=void 0===u?[]:u,s=e.query,b=void 0===s?{}:s,f=e.shouldSelect,d=void 0===f||f;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var p=Object(i.useRef)({results:[],isLoading:!0}),g=Object(o.a)(b),m=Object(o.a)(l),v=Object(a.a)(),O=Object(c.useSelect)((function(e){if(!d)return null;var c=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],o=c.getCollectionError.apply(c,i);return o&&v(o),{results:c.getCollection.apply(c,i),isLoading:!c.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,d]);return null!==O&&(p.current=O),p.current}},174:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),i=n(8),o=n.n(i);n(241);t.a=function(e){var t=e.className,n=e.headingLevel,i=e.onChange,a=e.heading,u="h".concat(n);return Object(r.createElement)(u,null,Object(r.createElement)(c.PlainText,{className:o()("wc-block-editor-components-title",t),value:a,onChange:i}))}},190:function(e,t){},21:function(e,t){!function(){e.exports=this.wp.data}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},241:function(e,t){},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var r=n(6),c=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return c.find((function(t){return t.id===e}))},o=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},249:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return i}));var r=n(7),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),o=i.length?i[0]:null;if(o&&o.slug&&Array.isArray(o.slug)&&o.slug.includes(c)){var a=o.slug.filter((function(e){return e!==c})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(o.slug=a.sort(),u.push(o)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",o=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(o):(o.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(o,"attribute")))}},255:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),u=(n(2),n(8)),l=n.n(u),s=n(1),b=n(55),f=n(261),d=(n(190),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,u=void 0===i?"li":i,s=e.className,b=void 0===s?"":s,f=e.radius,d=void 0===f?"small":f,p=e.children,g=void 0===p?null:p,m=o()(e,["text","screenReaderText","element","className","radius","children"]),v=u,O=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+d),h=Boolean(r&&r!==t);return Object(a.createElement)(v,c()({className:O},m),Object(a.createElement)("span",{"aria-hidden":h,className:"wc-block-components-chip__text"},t),h&&Object(a.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,u=e.disabled,p=void 0!==u&&u,g=e.onRemove,m=void 0===g?function(){}:g,v=e.removeOnAnyClick,O=void 0!==v&&v,h=e.text,j=e.screenReaderText,y=void 0===j?"":j,w=o()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=O?"span":"button";if(!n){var S=y&&"string"==typeof y?y:h;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var k={"aria-label":n,disabled:p,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},E=O?k:{},x=O?{"aria-hidden":!0}:k;return Object(a.createElement)(d,c()({},w,E,{className:l()(i,"is-removable"),element:O?"button":w.element,screenReaderText:y,text:h}),Object(a.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(a.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},261:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),u=n(31),l=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(u.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=l},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},4:function(e,t){!function(){e.exports=this.wp.components}()},44:function(e,t,n){"use strict";var r=n(5),c=n.n(r),i=n(0),o=(n(2),n(9)),a=n(8),u=n.n(a);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=n,f=null!=r;return!b&&f?(t=c||"span",l=s(s({},l),{},{className:u()(l.className,"screen-reader-text")}),Object(i.createElement)(t,l,r)):(t=c||o.Fragment,b&&f&&n!==r?Object(i.createElement)(t,l,Object(i.createElement)("span",{"aria-hidden":"true"},n),Object(i.createElement)("span",{className:"screen-reader-text"},r)):Object(i.createElement)(t,l,n))}},53:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=n(33),i=n.n(c),o=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},55:function(e,t,n){"use strict";var r=n(5),c=n.n(r),i=n(24),o=n.n(i),a=n(9);n(2);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=o()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},6:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"I",(function(){return i})),n.d(t,"O",(function(){return o})),n.d(t,"y",(function(){return a})),n.d(t,"A",(function(){return u})),n.d(t,"m",(function(){return l})),n.d(t,"z",(function(){return s})),n.d(t,"C",(function(){return b})),n.d(t,"o",(function(){return f})),n.d(t,"B",(function(){return d})),n.d(t,"n",(function(){return p})),n.d(t,"E",(function(){return g})),n.d(t,"u",(function(){return m})),n.d(t,"w",(function(){return v})),n.d(t,"r",(function(){return O})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return j})),n.d(t,"k",(function(){return y})),n.d(t,"K",(function(){return w})),n.d(t,"P",(function(){return _})),n.d(t,"q",(function(){return S})),n.d(t,"p",(function(){return k})),n.d(t,"H",(function(){return E})),n.d(t,"c",(function(){return x})),n.d(t,"v",(function(){return C})),n.d(t,"S",(function(){return P})),n.d(t,"T",(function(){return R})),n.d(t,"J",(function(){return L})),n.d(t,"a",(function(){return T})),n.d(t,"M",(function(){return z})),n.d(t,"b",(function(){return H})),n.d(t,"L",(function(){return V})),n.d(t,"D",(function(){return B})),n.d(t,"i",(function(){return F})),n.d(t,"N",(function(){return M})),n.d(t,"h",(function(){return U})),n.d(t,"j",(function(){return I})),n.d(t,"G",(function(){return G})),n.d(t,"F",(function(){return Q})),n.d(t,"R",(function(){return Y})),n.d(t,"Q",(function(){return K})),n.d(t,"d",(function(){return W})),n.d(t,"e",(function(){return q})),n.d(t,"f",(function(){return J})),n.d(t,"g",(function(){return $})),n.d(t,"x",(function(){return X})),n.d(t,"W",(function(){return ee})),n.d(t,"X",(function(){return te})),n.d(t,"U",(function(){return ne})),n.d(t,"V",(function(){return re}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),o=Object(r.getSetting)("showAvatars",!0),a=Object(r.getSetting)("max_columns",6),u=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),f=Object(r.getSetting)("default_rows",3),d=Object(r.getSetting)("min_height",500),p=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),v=Object(r.getSetting)("limitTags"),O=Object(r.getSetting)("hasProducts",!0),h=Object(r.getSetting)("hasTags",!0),j=Object(r.getSetting)("homeUrl",""),y=Object(r.getSetting)("couponsEnabled",!0),w=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),S=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),k=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),E=Object(r.getSetting)("productCount",0),x=Object(r.getSetting)("attributes",[]),C=Object(r.getSetting)("isShippingCalculatorEnabled",!0),N=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),P=Object(r.getSetting)("wcBlocksAssetUrl",""),R=Object(r.getSetting)("wcBlocksBuildUrl",""),L=Object(r.getSetting)("shippingCountries",{}),T=Object(r.getSetting)("allowedCountries",{}),z=Object(r.getSetting)("shippingStates",{}),H=Object(r.getSetting)("allowedStates",{}),V=Object(r.getSetting)("shippingMethodsExist",!1),B=Object(r.getSetting)("paymentGatewaySortOrder",[]),F=Object(r.getSetting)("checkoutShowLoginReminder",!0),A={id:0,title:"",permalink:""},D=Object(r.getSetting)("storePages",{myaccount:A,shop:A,cart:A,checkout:A,privacy:A,terms:A}),M=D.shop.permalink,U=D.checkout.id,I=D.checkout.permalink,G=D.privacy.permalink,Q=D.privacy.title,Y=D.terms.permalink,K=D.terms.title,W=D.cart.id,q=D.cart.permalink,J=Object(r.getSetting)("checkoutAllowsGuest",!1),$=Object(r.getSetting)("checkoutAllowsSignup",!1),X=D.myaccount.permalink?D.myaccount.permalink:Object(r.getSetting)("loginUrl","/wp-login.php"),Z=n(23),ee=function(e,t){if(N>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(N>1)return Object(Z.registerBlockType)(e,t)},ne=function(){return N>2},re=function(){return N>1}},62:function(e,t){!function(){e.exports=this.wc.priceFormat}()},68:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(14),o=n.n(i),a=n(15),u=n.n(a),l=n(12),s=n.n(l),b=n(16),f=n.n(b),d=n(17),p=n.n(d),g=n(10),m=n.n(g),v=n(0),O=n(7),h=n(8),j=n.n(h),y=n(4),w=n(179);n(119);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return p()(this,n)}}var S=function(e){f()(n,e);var t=_(n);function n(){var e;return o()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return u()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,i=n.checked,o=n.instanceId,a=n.className,u=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(o);return u&&(e=Object(O.isFunction)(u)?u(i):u),Object(v.createElement)(y.BaseControl,{id:b,help:e,className:j()("components-toggle-button-control",a)},Object(v.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(v.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var i={};return s===e.value?(i.isPrimary=!0,i["aria-pressed"]=!0):(i.isSecondary=!0,i["aria-pressed"]=!1),Object(v.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},i),e.label)}))))}}]),n}(v.Component);t.a=Object(w.a)(S)},7:function(e,t){!function(){e.exports=this.lodash}()},854:function(e,t,n){e.exports=n(894)},855:function(e,t){},894:function(e,t,n){"use strict";n.r(t);var r=n(11),c=n.n(r),i=n(0),o=n(1),a=n(23),u=n(55),l=n(31),s=Object(i.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),b=n(8),f=n.n(b),d=n(22),p=n(4),g=n(144),m=n(174),v=n(68),O=n(18),h=n.n(O),j=n(147),y=(n(2),n(44)),w=(n(855),n(248)),_=n(62),S=n(255),k=function(e,t){return Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)(Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.formatPrice)(e),Object(_.formatPrice)(t)):Number.isFinite(e)?Object(o.sprintf)(Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.formatPrice)(e)):Object(o.sprintf)(Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.formatPrice)(t))},E=function(e){var t=e.type,n=e.name,r=e.prefix,c=e.removeCallback,a=void 0===c?function(){}:c,u=e.showLabel,l=void 0===u||u,s=e.displayStyle,b=r?Object(i.createElement)(i.Fragment,null,r," ",n):n,f=Object(o.sprintf)(Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),n);return Object(i.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+n},l&&Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(i.createElement)(S.a,{element:"span",text:b,onRemove:a,radius:"large",ariaLabel:f}):Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-name"},b,Object(i.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:a},f)))},x=n(157),C=n(28),N=n(249),P=function(e){var t=e.attributeObject,n=void 0===t?{}:t,r=e.slugs,c=void 0===r?[]:r,a=e.operator,u=void 0===a?"in":a,l=e.displayStyle,s=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[n.id]}),b=s.results,f=s.isLoading,d=Object(j.b)("attributes",[]),p=h()(d,2),g=p[0],m=p[1];if(f)return null;var v=n.label;return Object(i.createElement)("li",null,Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-type"},v,":"),Object(i.createElement)("ul",null,c.map((function(e,t){var r=b.find((function(t){return t.slug===e}));if(!r)return null;var c="";return t>0&&"and"===u&&(c=Object(i.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),E({type:v,name:Object(C.decodeEntities)(r.name||e),prefix:c,removeCallback:function(){Object(N.a)(g,m,n,e)},showLabel:!1,displayStyle:l})}))))},R=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=Object(j.b)("attributes",[]),a=h()(c,2),u=a[0],l=a[1],s=Object(j.b)("min_price"),b=h()(s,2),d=b[0],p=b[1],g=Object(j.b)("max_price"),m=h()(g,2),v=m[0],O=m[1],_=Object(i.useMemo)((function(){return Number.isFinite(d)||Number.isFinite(v)?E({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:k(d,v),removeCallback:function(){p(void 0),O(void 0)},displayStyle:t.displayStyle}):null}),[d,v,t.displayStyle,p,O]),S=Object(i.useMemo)((function(){return u.map((function(e){var n=Object(w.b)(e.attribute);return Object(i.createElement)(P,{attributeObject:n,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}))}),[u,t.displayStyle]);if(!(u.length>0||Number.isFinite(d)||Number.isFinite(v)||r))return null;var x="h".concat(t.headingLevel),C=f()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(i.createElement)(i.Fragment,null,!r&&t.heading&&Object(i.createElement)(x,null,t.heading),Object(i.createElement)("div",{className:"wc-block-active-filters"},Object(i.createElement)("ul",{className:C},r?Object(i.createElement)(i.Fragment,null,E({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),E({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(i.createElement)(i.Fragment,null,_,S)),Object(i.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:function(){p(void 0),O(void 0),l([])}},Object(i.createElement)(y.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},L=Object(p.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=t.className,c=t.displayStyle,a=t.heading,u=t.headingLevel;return Object(i.createElement)("div",{className:r},Object(i.createElement)(d.InspectorControls,{key:"inspector"},Object(i.createElement)(p.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(i.createElement)(v.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:c,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:function(e){return n({displayStyle:e})}}),Object(i.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(i.createElement)(g.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:u,onChange:function(e){return n({headingLevel:e})}}))),Object(i.createElement)(m.a,{headingLevel:u,heading:a,onChange:function(e){return n({heading:e})}}),Object(i.createElement)(p.Disabled,null,Object(i.createElement)(R,{attributes:t,isEditor:!0})))}));Object(a.registerBlockType)("woocommerce/active-filters",{title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(u.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:L,save:function(e){var t=e.attributes,n=t.className,r={"data-display-style":t.displayStyle,"data-heading":t.heading,"data-heading-level":t.headingLevel};return Object(i.createElement)("div",c()({className:f()("is-loading",n)},r),Object(i.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})},9:function(e,t){!function(){e.exports=this.React}()},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(18),c=n.n(r),i=n(0),o=function(){var e=Object(i.useState)(),t=c()(e,2)[1];return Object(i.useCallback)((function(e){return t((function(){throw e}))}),[])}},96:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(9),c=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}}});
|
build/all-products-frontend.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-warning', 'wp-wordcount'), 'version' => '4bd4f078fcc2386d43ee37259e04a558');
|
build/all-products-frontend.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function(e){function t(t){for(var n,o,c=t[0],i=t[1],a=0,s=[];a<c.length;a++)o=c[a],Object.prototype.hasOwnProperty.call(r,o)&&r[o]&&s.push(r[o][0]),r[o]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(u&&u(t);s.length;)s.shift()()}var n={},r={1:0};function o(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var c=new Promise((function(t,o){n=r[e]=[t,o]}));t.push(n[2]=c);var i,a=document.createElement("script");a.charset="utf-8",a.timeout=120,o.nc&&a.setAttribute("nonce",o.nc),a.src=function(e){return o.p+""+({2:"atomic-block-components/add-to-cart",3:"atomic-block-components/button",4:"atomic-block-components/category-list",5:"atomic-block-components/image",6:"atomic-block-components/price",7:"atomic-block-components/rating",8:"atomic-block-components/sale-badge",9:"atomic-block-components/sku",10:"atomic-block-components/stock-indicator",11:"atomic-block-components/summary",12:"atomic-block-components/tag-list",13:"atomic-block-components/title",20:"vendors--atomic-block-components/price"}[e]||e)+"-frontend.js"}(e);var u=new Error;i=function(t){a.onerror=a.onload=null,clearTimeout(s);var n=r[e];if(0!==n){if(n){var o=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;u.message="Loading chunk "+e+" failed.\n("+o+": "+c+")",u.name="ChunkLoadError",u.type=o,u.request=c,n[1](u)}r[e]=void 0}};var s=setTimeout((function(){i({type:"timeout",target:a})}),12e4);a.onerror=a.onload=i,document.head.appendChild(a)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var c=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],i=c.push.bind(c);c.push=t,c=c.slice();for(var a=0;a<c.length;a++)t(c[a]);var u=i;o(o.s=215)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(71)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t,n){var r;
|
2 |
+
/*!
|
3 |
+
Copyright (c) 2017 Jed Watson.
|
4 |
+
Licensed under the MIT License (MIT), see
|
5 |
+
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var i=o.apply(null,r);i&&e.push(i)}else if("object"===c)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"u",(function(){return c})),n.d(t,"y",(function(){return i})),n.d(t,"r",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return m})),n.d(t,"C",(function(){return v})),n.d(t,"D",(function(){return g})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return j})),n.d(t,"b",(function(){return w})),n.d(t,"q",(function(){return k})),n.d(t,"g",(function(){return E})),n.d(t,"x",(function(){return R})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return x})),n.d(t,"s",(function(){return C})),n.d(t,"B",(function(){return N})),n.d(t,"A",(function(){return T})),n.d(t,"d",(function(){return A})),n.d(t,"e",(function(){return D})),n.d(t,"f",(function(){return F})),n.d(t,"p",(function(){return M})),n.d(t,"E",(function(){return I}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),f=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),d=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),m=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),v=Object(r.getSetting)("wcBlocksAssetUrl",""),g=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),j=Object(r.getSetting)("shippingStates",{}),w=Object(r.getSetting)("allowedStates",{}),k=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),E=Object(r.getSetting)("checkoutShowLoginReminder",!0),S={id:0,title:"",permalink:""},P=Object(r.getSetting)("storePages",{myaccount:S,shop:S,cart:S,checkout:S,privacy:S,terms:S}),R=P.shop.permalink,_=(P.checkout.id,P.checkout.permalink),x=P.privacy.permalink,C=P.privacy.title,N=P.terms.permalink,T=P.terms.title,A=(P.cart.id,P.cart.permalink),D=Object(r.getSetting)("checkoutAllowsGuest",!1),F=Object(r.getSetting)("checkoutAllowsSignup",!1),M=P.myaccount.permalink?P.myaccount.permalink:Object(r.getSetting)("loginUrl","/wp-login.php"),I=(n(40),function(){return h>1})},function(e,t,n){var r=n(82),o=n(83),c=n(59),i=n(84);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||i()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(61);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(56);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(23);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},,,function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.primitives}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(50);var o=n(56);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(70);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(28),o=n(20);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=(n(3),n(2)),i=n(5),a=n.n(i);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=n,f=null!=r;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||c.Fragment,l&&f&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(21),c=n.n(o),i=function(e){var t=Object(r.useRef)();return c()(e,t.current)||(t.current=e),t.current}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(32),o=n.n(r),c=n(33),i=n.n(c),a=n(20),u=n.n(a),s=n(34),l=n.n(s),f=n(35),p=n.n(f),d=n(24),b=n.n(d),m=n(7),h=n.n(m),v=(n(3),n(2)),g=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(g.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,i=void 0===c?Object(g.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(g.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(73);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var w=function(e){l()(n,e);var t=j(n);function n(){var e;o()(this,n);for(var r=arguments.length,c=new Array(r),i=0;i<r;i++)c[i]=arguments[i];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,i=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof i?i({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(v.Component);w.defaultProps={showErrorMessage:!0};t.a=w},function(e,t){!function(){e.exports=this.wc.priceFormat}()},function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(58),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(74))},,,,,function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,,function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(16),o=n(0);function c(e){var t=Object(o.useState)((function(){return!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)})),n=Object(r.a)(t,2),c=n[0],i=n[1];return Object(o.useEffect)((function(){if(e){var t=function(){return i(window.matchMedia(e).matches)};t();var n=window.matchMedia(e);return n.addListener(t),function(){n.removeListener(t)}}}),[e]),e&&c}},function(e,t){!function(){e.exports=this.wp.warning}()},function(e,t,n){var r=n(60);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10),o=n.n(r),c=n(0),i=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=Object(r.createContext)("page"),c=function(){return Object(r.useContext)(o)};o.Provider},function(e,t,n){"use strict";var r=n(6),o=n(17),c=n(0),i=n(5),a=n.n(i),u=n(8),s=n(55),l=n.n(s);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}var h=n(42),v=n(13);function g(e,t){return!t||"object"!==Object(h.a)(t)&&"function"!=typeof t?Object(v.a)(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=n(16),j=n(41),w=n(52),k=n(57),E={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},S={">=":"min-width","<":"max-width"},P={">=":function(e,t){return t>=e},"<":function(e,t){return t<e}},R=Object(c.createContext)(null),_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">=",n=Object(c.useContext)(R),r=!n&&"(".concat(S[t],": ").concat(E[e],"px)"),o=Object(k.a)(r);return n?P[t](E[e],n):o};_.__experimentalWidthProvider=R.Provider;var x=_,C=n(160),N=n(120),T=n(19);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function F(e,t,n,r,o,c,i){var a=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-a/2>0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==c&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=s);var d,b={popoverLeft:f,contentWidth:f-a>0?a:f},m={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},h=n,v=null;if(!o)if("center"===n&&l.contentWidth===a)h="center";else if("left"===n&&b.contentWidth===a)h="left";else if("right"===n&&m.contentWidth===a)h="right";else{var g="left"===(h=b.contentWidth>m.contentWidth?"left":"right")?b.contentWidth:m.contentWidth;v=g!==a?g:null}if(d="center"===h?l.popoverLeft:"left"===h?b.popoverLeft:m.popoverLeft,i){var y=i.getBoundingClientRect();d=Math.min(d,y.right-a)}return{xAxis:h,popoverLeft:d,contentWidth:v}}function M(e,t,n,r,o,c,i){var a=t.height;if(o){var u=(Object(j.getScrollContainer)(c)||document.body).getBoundingClientRect().top+a-i;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,b=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&f.contentHeight===a)d="top";else if("bottom"===n&&p.contentHeight===a)d="bottom";else{var m="top"===(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;b=m!==a?m:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:b}}var I=n(31);var L=function(e,t){return function(n){var r=e(n),o=n.displayName,c=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(u.upperFirst)(Object(u.camelCase)(t)),"(").concat(c,")"),r}};function B(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var V=Object(c.createContext)({focusHistory:[]}),z=V.Provider,q=V.Consumer;z.displayName="FocusReturnProvider",q.displayName="FocusReturnConsumer";c.Component;function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var H=L((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,i=void 0===o?u.stubTrue:o;return function(e){var t=function(t){m(r,t);var n=W(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return d(r,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==i())for(var r,o=[].concat(Object(I.a)(u.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(I.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),r}(c.Component);return function(e){return Object(c.createElement)(q,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");function U(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var K=L((function(e){return function(t){m(r,t);var n=U(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(v.a)(e)),e}return d(r,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===w.TAB){var t=j.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),r}(c.Component)}),"withConstrainedTabbing");function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var G=["button","submit"];function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var $=L((function(e){return function(t){m(o,t);var n=Q(o);function o(){var e;return f(this,o),(e=n.apply(this,arguments)).bindNode=e.bindNode.bind(Object(v.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(v.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(v.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(v.a)(e)),e}return d(o,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,n=e.target;Object(u.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(u.includes)(G,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(c.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),o}(c.Component)}),"withFocusOutside")(function(e){m(n,e);var t=Y(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),n}(c.Component));function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,i=0,a=0;function u(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=a)}function s(){0===i&&u(!0),++i}function l(){1===i&&u(!1),--i}return function(e){m(n,e);var t=J(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function X(e){e.stopPropagation()}var ee=Object(c.forwardRef)((function(e,t){var n=e.children,i=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},i,{ref:t,onMouseDown:X}),n)})),te=n(45);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e){var t=Object(c.useContext)(te.a),n=t.slots[e]||{},r=t.fills[e],o=Object(c.useMemo)((function(){return r||[]}),[r]),i=Object(c.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),a=Object(c.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),u=Object(c.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),s=Object(c.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return re(re({},n),{},{updateSlot:i,unregisterSlot:a,fills:o,registerFill:u,unregisterFill:s})}function ce(e,t,n){return(ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}var ie=n(21),ae=n.n(ie);function ue(e){var t=function(e,t){if("object"!==Object(h.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Object(h.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(h.a)(t)?t:String(t)}function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e){var t,n,r,i,a,u,s,l,f,p,d,b,m,h=e.children,v=(t=Object(c.useState)({}),n=Object(O.a)(t,2),r=n[0],i=n[1],a=Object(c.useState)({}),u=Object(O.a)(a,2),s=u[0],l=u[1],f=Object(c.useCallback)((function(e,t,n){i((function(r){var o=r[e]||{};return le(le({},r),{},Object(T.a)({},e,le(le({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),p=Object(c.useCallback)((function(e,t){i((function(n){var r=n[e],c=Object(o.a)(n,[e].map(ue));return(null==r?void 0:r.ref)===t?c:n}))}),[]),d=Object(c.useCallback)((function(e,t){var n=r[e];if(n&&!ae()(n.fillProps,t)){n.fillProps=t;var o=s[e];o&&o.map((function(e){return e.current.rerender()}))}}),[r,s]),b=Object(c.useCallback)((function(e,t){l((function(n){return le(le({},n),{},Object(T.a)({},e,[].concat(Object(I.a)(n[e]||[]),[t])))}))}),[]),m=Object(c.useCallback)((function(e,t){l((function(n){return n[e]?le(le({},n),{},Object(T.a)({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(c.useMemo)((function(){return{slots:r,fills:s,registerSlot:f,updateSlot:d,unregisterSlot:p,registerFill:b,unregisterFill:m}}),[r,s,f,d,p,b,m]));return Object(c.createElement)(te.a.Provider,{value:v},h)}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var de=Object(c.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),be=de.Provider,me=de.Consumer;c.Component;function he(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var ve=function(e){m(n,e);var t=he(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(Object(v.a)(e)),e}return d(n,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||ce(y(n.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,r=e.fillProps,o=void 0===r?{}:r,i=e.getFills,a=Object(u.map)(i(n,this),(function(e){var t=e.occurrence,n=Object(u.isFunction)(e.children)?e.children(o):e.children;return c.Children.map(n,(function(e,n){if(!e||Object(u.isString)(e))return e;var r="".concat(t,"---").concat(e.key||n);return Object(c.cloneElement)(e,{key:r})}))})).filter(Object(u.negate)(c.isEmptyElement));return Object(c.createElement)(c.Fragment,null,Object(u.isFunction)(t)?t(a):a)}}]),n}(c.Component),ge=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,i=t.getFills;return Object(c.createElement)(ve,Object(r.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:i}))}))},ye=0;function Oe(e){var t=e.name,n=e.children,r=e.registerFill,o=e.unregisterFill,i=function(e){var t=Object(c.useContext)(de),n=t.getSlot,r=t.subscribe,o=Object(c.useState)(n(e)),i=Object(O.a)(o,2),a=i[0],u=i[1];return Object(c.useEffect)((function(){return u(n(e)),r((function(){u(n(e))}))}),[e]),a}(t),a=Object(c.useRef)({name:t,children:n});return a.current.occurrence||(a.current.occurrence=++ye),Object(c.useLayoutEffect)((function(){return r(t,a.current),function(){return o(t,a.current)}}),[]),Object(c.useLayoutEffect)((function(){a.current.children=n,i&&i.forceUpdate()}),[n]),Object(c.useLayoutEffect)((function(){t!==a.current.name&&(o(a.current.name,a.current),a.current.name=t,r(t,a.current))}),[t]),i&&i.node?(Object(u.isFunction)(n)&&(n=n(i.props.fillProps)),Object(c.createPortal)(n,i.node)):null}var je=function(e){return Object(c.createElement)(me,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(c.createElement)(Oe,Object(r.a)({},e,{registerFill:n,unregisterFill:o}))}))};function we(e){var t=e.name,n=e.fillProps,i=void 0===n?{}:n,a=e.as,u=void 0===a?"div":a,s=Object(o.a)(e,["name","fillProps","as"]),l=Object(c.useContext)(te.a),f=Object(c.useRef)();return Object(c.useLayoutEffect)((function(){return l.registerSlot(t,f,i),function(){l.unregisterSlot(t,f)}}),[l.registerSlot,l.unregisterSlot,t]),Object(c.useLayoutEffect)((function(){l.updateSlot(t,i)})),Object(c.createElement)(u,Object(r.a)({ref:f},s))}function ke(e){var t,n,r=e.name,o=e.children,i=oe(r),a=Object(c.useRef)({rerender:(t=Object(c.useState)({}),n=Object(O.a)(t,2)[1],function(){return n({})})});return Object(c.useEffect)((function(){return i.registerFill(a),function(){i.unregisterFill(a)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),Object(c.createPortal)(o,i.ref.current)):null}function Ee(e){var t=e.bubblesVirtually,n=Object(o.a)(e,["bubblesVirtually"]);return t?Object(c.createElement)(we,n):Object(c.createElement)(ge,n)}function Se(e){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(je,e),Object(c.createElement)(ke,e))}function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){Object(T.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _e(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,c=r.split(" "),i=Object(O.a)(c,2),u=i[0],s=i[1],l=void 0===s?"center":s;return a()("components-animate__appear",(o={},Object(T.a)(o,"is-from-"+l,"center"!==l),Object(T.a)(o,"is-from-"+u,"middle"!==u),o))}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):"loading"===t?a()("components-animate__loading"):void 0}function xe(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:_e(Re({type:t},r))})}var Ce=K(H((function(e){return e.children})));function Ne(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,c=r.paddingBottom,i=r.paddingLeft,a=r.paddingRight,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=i?parseInt(i,10):0,f=a?parseInt(a,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function Te(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Ae(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function De(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Fe=function(e){var t=e.headerTitle,n=e.onClose,i=e.onKeyDown,u=e.children,s=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,b=e.position,m=void 0===b?"bottom right":b,h=(e.range,e.focusOnMount),v=void 0===h?"firstElement":h,g=e.anchorRef,y=e.shouldAnchorIncludePadding,k=e.anchorRect,E=e.getAnchorRect,S=e.expandOnMobile,P=e.animate,R=void 0===P||P,_=e.onClickOutside,T=e.onFocusOutside,A=e.__unstableSticky,I=e.__unstableSlotName,L=void 0===I?"Popover":I,B=e.__unstableObserveElement,V=e.__unstableBoundaryParent,z=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(c.useRef)(null),W=Object(c.useRef)(null),H=Object(c.useRef)(),U=x("medium","<"),K=Object(c.useState)(),Q=Object(O.a)(K,2),G=Q[0],Y=Q[1],J=oe(L),X=S&&U,te=Object(C.a)(),ne=Object(O.a)(te,2),re=ne[0],ce=ne[1];p=X||p,Object(c.useLayoutEffect)((function(){if(X)return De(H.current,"is-without-arrow",p),De(H.current,"is-alternate",d),Te(H.current,"data-x-axis"),Te(H.current,"data-y-axis"),Ae(H.current,"top"),Ae(H.current,"left"),Ae(W.current,"maxHeight"),void Ae(W.current,"maxWidth");var e=function(){if(H.current&&W.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:Ne(c,r)}var i=r.top,a=r.bottom,u=i.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:Ne(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:Ne(p,f)}}(q,k,E,g,y);if(e){var t,n,r=H.current,o=r.offsetParent,c=r.ownerDocument,i=0;if(o&&o!==c.body){var a=o.getBoundingClientRect();i=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}if(V)t=null===(n=H.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode;var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,i=arguments.length>6?arguments[6]:void 0,a=n.split(" "),u=Object(O.a)(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=M(e,t,s,p,r,o,c),b=F(e,t,f,p,r,d.yAxis,i);return D(D({},b),d)}(e,ce.height?ce:W.current.getBoundingClientRect(),m,A,H.current,i,t),s=u.popoverTop,l=u.popoverLeft,f=u.xAxis,b=u.yAxis,h=u.contentHeight,v=u.contentWidth;"number"==typeof s&&"number"==typeof l&&(Ae(H.current,"top",s+"px"),Ae(H.current,"left",l+"px")),De(H.current,"is-without-arrow",p||"center"===f&&"middle"===b),De(H.current,"is-alternate",d),Te(H.current,"data-x-axis",f),Te(H.current,"data-y-axis",b),Ae(W.current,"maxHeight","number"==typeof h?h+"px":""),Ae(W.current,"maxWidth","number"==typeof v?v+"px":"");Y(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),B&&(n=new window.MutationObserver(e)).observe(B,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[X,k,E,g,y,m,ce,A,B,V]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=j.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(v,W);var ie=function(e){e.keyCode===w.ESCAPE&&n&&(e.stopPropagation(),n()),i&&i(e)};var ae=Object(c.createElement)($,{onFocusOutside:function(e){if(T)T(e);else if(_){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),_(t)}else n&&n()}},Object(c.createElement)(xe,{type:R&&G?"appear":null,options:{origin:G}},(function(e){var o=e.className;return Object(c.createElement)(ee,Object(r.a)({className:a()("components-popover",s,o,{"is-expanded":X,"is-without-arrow":p,"is-alternate":d})},z,{onKeyDown:ie,ref:H}),X&&Object(c.createElement)(Z,null),X&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(He,{className:"components-popover__close",icon:N.a,onClick:n})),Object(c.createElement)("div",{ref:W,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},re,u)))})));return v&&(ae=Object(c.createElement)(Ce,null,ae)),J.ref&&(ae=Object(c.createElement)(Se,{name:L},ae)),g||k?ae:Object(c.createElement)("span",{ref:q},ae)};Fe.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(Ee,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var Me=Fe;var Ie=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(u.isString)(r)&&(t=r),Object(u.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}var Be=function(e){m(n,e);var t=Le(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).delayedSetIsOver=Object(u.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return d(n,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(u.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var i=c.Children.only(t),a=this.state.isOver;return Object(c.cloneElement)(i,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(i.props.children,a&&Object(c.createElement)(Me,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(Ie,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),n}(c.Component),Ve=n(86);function ze(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,c=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var We=["onMouseDown","onClick"];var He=t.a=Object(c.forwardRef)((function(e,t){var n=e.href,i=e.target,s=e.isPrimary,f=e.isSmall,p=e.isTertiary,d=e.isPressed,b=e.isBusy,m=e.isDefault,h=e.isSecondary,v=e.isLink,g=e.isDestructive,y=e.className,O=e.disabled,j=e.icon,w=e.iconSize,k=e.showTooltip,E=e.tooltipPosition,S=e.shortcut,P=e.label,R=e.children,_=e.__experimentalIsFocusable,x=Object(o.a)(e,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);m&&l()("Button isDefault prop",{alternative:"isSecondary"});var C=a()("components-button",y,{"is-secondary":m||h,"is-primary":s,"is-small":f,"is-tertiary":p,"is-pressed":d,"is-busy":b,"is-link":v,"is-destructive":g,"has-text":!!j&&!!R,"has-icon":!!j}),N=O&&!_,T=void 0===n||N?"button":"a",A="a"===T?{href:n,target:i}:{type:"button",disabled:N,"aria-pressed":d};if(O&&_){A["aria-disabled"]=!0;var D,F=ze(We);try{for(F.s();!(D=F.n()).done;){x[D.value]=function(e){e.stopPropagation(),e.preventDefault()}}}catch(e){F.e(e)}finally{F.f()}}var M=!N&&(k&&P||S||!!P&&(!R||Object(u.isArray)(R)&&!R.length)&&!1!==k),I=Object(c.createElement)(T,Object(r.a)({},A,x,{className:C,"aria-label":x["aria-label"]||P,ref:t}),j&&Object(c.createElement)(Ve.a,{icon:j,size:w}),R);return M?Object(c.createElement)(Be,{text:P,shortcut:S,position:E},I):I}))},,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(72);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===i||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function b(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new b(e,t)),1!==s.length||l||a(d)},b.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(2),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},c=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},i=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=i);var t=r.useState(e(null)),n=t[0],o=t[1],a=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(c,{onResize:a})}),[a]),n]}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=(n(12),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),c=function(){return Object(r.useContext)(o)}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),c=r(n(61)),i=n(2),a=r(i),u=r(n(113)),s=r(n(20)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||e===t}};function f(){var e=i.useState(!1)[1];return i.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function d(e){return l.und(e)?[]:l.arr(e)?e:[e]}function b(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.fun(e)?e.apply(void 0,n):e}function m(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return l.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var h,v,g=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}return u(t,e),t}(g),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof g&&e.removeChild(s(t))}))},t}u(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof g)&&(t[n]=r instanceof g?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(g);function j(e,t){h={fn:e,transform:t}}function w(e){v=e}var k,E=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},S=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function P(e){k=e}var R,_=function(){return Date.now()};function x(e){R=e}var C,N,T=function(e){return e.current};function A(e){C=e}var D=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return v},injectColorNames:w,get requestFrame(){return E},get cancelFrame(){return S},injectFrame:function(e,t){E=e,S=t},get interpolation(){return k},injectStringInterpolator:P,get now(){return _},injectNow:function(e){_=e},get defaultElement(){return R},injectDefaultElement:x,get animatedApi(){return T},injectAnimatedApi:function(e){T=e},get createAnimatedStyle(){return C},injectCreateAnimatedStyle:A,get manualFrameloop(){return N},injectManualFrameloop:function(e){N=e}}),F=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:C(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),M=!1,I=new Set,L=function e(){if(!M)return!1;var t=_(),n=I,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var i=c,a=!1,u=0;u<i.configs.length;u++){for(var s=i.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var b=s.fromValues[p],m=s.toValues[p],h=d.lastPosition,v=m instanceof g,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(v&&(m=m.getValue()),s.immediate)d.setValue(m),d.done=!0;else if("string"!=typeof b&&"string"!=typeof m){if(void 0!==s.duration)h=b+s.easing((t-d.startTime)/s.duration)*(m-b),l=t>=d.startTime+s.duration;else if(s.decay)h=b+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(m=h);else{f=void 0!==d.lastTime?d.lastTime:t,y=void 0!==d.lastVelocity?d.lastVelocity:s.initialVelocity,t>f+64&&(f=t);for(var O=Math.floor(t-f),j=0;j<O;++j){h+=1*(y+=1*((-s.tension*(h-m)+-s.friction*y)/s.mass)/1e3)/1e3}var w=!(!s.clamp||0===s.tension)&&(b<m?h>m:h<m),k=Math.abs(y)<=s.precision,S=0===s.tension||Math.abs(m-h)<=s.precision;l=w||k&&S,d.lastVelocity=y,d.lastTime=t}v&&!s.toValues[p].done&&(l=!1),l?(d.value!==m&&(h=m),d.done=!0):a=!0,d.setValue(h),d.lastPosition=h}else d.setValue(m),d.done=!0}}i.props.onFrame&&(i.values[s.name]=s.interpolation.getValue())}i.props.onFrame&&i.props.onFrame(i.values),a||(I.delete(i),i.stop(!0))}return I.size?N?N():E(e):M=!1,M};function B(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return B({range:e,output:t,extrapolate:n});if(k&&"string"==typeof e.output[0])return k(e);var r=e,o=r.output,c=r.range||[0,1],i=r.extrapolateLeft||r.extrapolate||"extend",a=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,i,a,u){var s=u?u(e):e;if(s<t){if("identity"===i)return s;"clamp"===i&&(s=t)}if(s>n){if("identity"===a)return s;"clamp"===a&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],u,i,a,r.map)}}var V=function(e){function t(n,r,o,c){var i;return(i=e.call(this)||this).calc=void 0,i.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],i.calc=B(r,o,c),i}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=B(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(g),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new z(e)})),n}u(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(y),W=0,H=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=W++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,i=t.to,a=c(t,["delay","to"]);if(l.arr(i)||l.fun(i))this.queue.push(o({},a,{delay:r,to:i}));else if(i){var u={};Object.entries(i).forEach((function(e){var t,n=e[0],c=e[1],i=o({to:(t={},t[n]=c,t),delay:b(r,n)},a),s=u[i.delay]&&u[i.delay].to;u[i.delay]=o({},u[i.delay],i,{to:o({},s,i.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(a),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,i=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(i)&&(n.merged=o({},n.merged,i))}));var r=this.local=++this.guid,i=this.localQueue=this.queue;this.queue=[],i.forEach((function(t,o){var a=t.delay,u=c(t,["delay"]),s=function(t){o===i.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);a?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),a):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,I.has(t)||I.add(t),M||(M=!0,E(N||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,I.has(t)&&I.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),i=this.local,a=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,m(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),a=a.then((function(){if(i===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;a=a.then((function(){return r.to((function(e){var t=o({},r,m(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,i===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}a.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,i=n.to,a=void 0===i?{}:i,u=n.config,s=void 0===u?{}:u,f=n.reverse,m=n.attach,h=n.reset,g=n.immediate;if(f){var y=[a,c];c=y[0],a=y[1]}this.merged=o({},c,this.merged,a),this.hasChanged=!1;var O=m&&m(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],i=n[1],a=e[r]||{},u=l.num(i),f=l.str(i)&&!i.startsWith("#")&&!/\d/.test(i)&&!v[i],m=l.arr(i),y=!u&&!m&&!f,j=l.und(c[r])?i:c[r],w=u||m||f?i:1,E=b(s,r);O&&(w=O.animations[r].parent);var S,P=a.parent,R=a.interpolation,x=d(O?w.getPayload():w),C=i;y&&(C=k({range:[0,1],output:[i,i]})(1));var N,T=R&&R.getValue(),A=!l.und(P)&&a.animatedValues.some((function(e){return!e.done})),D=!l.equ(C,T),F=!l.equ(C,a.previous),M=!l.equ(E,a.config);if(h||F&&D||M){var I;if(u||f)P=R=a.parent||new z(j);else if(m)P=R=a.parent||new q(j);else if(y){var L=a.interpolation&&a.interpolation.calc(a.parent.value);L=void 0===L||h?j:L,a.parent?(P=a.parent).setValue(0,!1):P=new z(0);var B={output:[L,i]};a.interpolation?(R=a.interpolation,a.interpolation.updateConfig(B)):R=P.interpolate(B)}return x=d(O?w.getPayload():w),S=d(P.getPayload()),h&&!y&&P.setValue(j,!1),t.hasChanged=!0,S.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=A?e.lastVelocity:void 0,e.lastTime=A?e.lastTime:void 0,e.startTime=_(),e.done=!1,e.animatedStyles.clear()})),b(g,r)&&P.setValue(y?w:i,!1),o({},e,((I={})[r]=o({},a,{name:r,parent:P,interpolation:R,animatedValues:S,toValues:x,previous:C,config:E,fromValues:d(P.getValue()),immediate:b(g,r),initialVelocity:p(E.velocity,0),clamp:p(E.clamp,!1),precision:p(E.precision,.01),tension:p(E.tension,170),friction:p(E.friction,26),mass:p(E.mass,1),duration:E.duration,easing:p(E.easing,(function(e){return e})),decay:E.decay}),I))}return D?e:(y&&(P.setValue(1,!1),R.updateConfig({output:[C,C]})),P.done=!0,t.hasChanged=!0,o({},e,((N={})[r]=o({},e[r],{previous:C}),N)))}),this.animations),this.hasChanged)for(var j in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[j]=this.animations[j].interpolation,this.values[j]=this.animations[j].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),U=function(e,t){var n=i.useRef(!1),r=i.useRef(),o=l.fun(t),c=i.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new H,i=o?b(t,r,c):t[r];return 0===r&&(n=i.ref),c.update(i),n||c.start(),c})),n]}),[e]),a=c[0],u=c[1];r.current=a;i.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=i.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?b(e,n,t):e[n]),u||t.start()}))}}),[e]);i.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),i.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},K=0,Q=function(e,t){return("function"==typeof t?e.map(t):d(t)).map(String)},G=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,i=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:Q(t,r)},i)};function Y(e,t){var n=function(){if(o){if(c>=r.length)return"break";i=r[c++]}else{if((c=r.next()).done)return"break";i=c.value}var n=i.key,a=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(a),e.current.deleted=e.current.deleted.filter(a))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var i;if("break"===n())break}e.current.forceUpdate()}var $=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof g||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function X(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+X(Z,Z,Z)),te=new RegExp("rgba"+X(Z,Z,Z,Z)),ne=new RegExp("hsl"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+X(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{6})$/,ae=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ue(o,r,e+1/3),i=ue(o,r,e),a=ue(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*i)<<16|Math.round(255*a)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function de(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function be(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ie.exec(t))?parseInt(n[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|pe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ae.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),de(n[2]),de(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),de(n[2]),de(n[3]))|pe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,he=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ve=new RegExp("("+Object.keys(J).join("|")+")","g"),ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}ge=Object.keys(ge).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ge);var je={};A((function(e){return new $(e)})),x("div"),P((function(e){var t=e.output.map((function(e){return e.replace(he,be)})).map((function(e){return e.replace(ve,be)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return B(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),w(J),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,i=t.scrollLeft,a=c(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==i&&(e.scrollLeft=i),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=Oe(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var p in a){var d=u?p:je[p]||(je[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(d)&&e.setAttribute(d,a[p])}}),(function(e){return e}));var we,ke,Ee=(we=function(e){return i.forwardRef((function(t,n){var r=f(),u=i.useRef(!0),s=i.useRef(null),p=i.useRef(null),d=i.useCallback((function(e){var t=s.current;s.current=new F(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);i.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),i.useImperativeHandle(n,(function(){return T(p,u,r)})),d(t);var b,m=s.current.getValue(),v=(m.scrollTop,m.scrollLeft,c(m,["scrollTop","scrollLeft"])),g=(b=e,!l.fun(b)||b.prototype instanceof a.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return a.createElement(e,o({},v,{ref:g}))}))},void 0===(ke=!1)&&(ke=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=ke?t[0].toLowerCase()+t.substring(1):t;return e[n]=we(n),e}),we)}),Se=Ee(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Ee,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=Se,t.a=Se,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=D,t.useSpring=function(e){var t=l.fun(e),n=U(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=i.useRef(!1),r=l.fun(t),c=b(t),a=i.useRef(),u=U(e,(function(e,t){return 0===e&&(a.current=[]),a.current.push(t),o({},c,{config:b(c.config,e),attach:e>0&&function(){return a.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=i.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,i=a.current[r];return o({},e,{config:b(e.config||c.config,t),attach:i&&function(){return i}})}))}}),[e,c.reverse]);return i.useEffect((function(){n.current&&!r&&d(t)})),i.useEffect((function(){n.current=!0}),[]),r?[s,d,p]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),a=G(r),u=a.lazy,s=void 0!==u&&u,l=(a.unique,a.reset),p=void 0!==l&&l,d=(a.enter,a.leave,a.update,a.onDestroyed),m=(a.keys,a.items,a.onFrame),h=a.onRest,v=a.onStart,g=a.ref,y=c(a,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=i.useRef(!1),w=i.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return i.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(w.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(w.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(w.current.instances).map((function(e){return e[1]}))}}})),w.current=function(e,t){var n=e.first,r=e.prevProps,i=c(e,["first","prevProps"]),a=G(t),u=a.items,s=a.keys,l=a.initial,f=a.from,p=a.enter,d=a.leave,m=a.update,h=a.trail,v=void 0===h?0:h,g=a.unique,y=a.config,O=a.order,j=void 0===O?["enter","leave","update"]:O,w=G(r),k=w.keys,E=w.items,S=o({},i.current),P=[].concat(i.deleted),R=Object.keys(S),_=new Set(R),x=new Set(s),C=s.filter((function(e){return!_.has(e)})),N=i.transitions.filter((function(e){return!e.destroyed&&!x.has(e.originalKey)})).map((function(e){return e.originalKey})),T=s.filter((function(e){return _.has(e)})),A=-v;for(;j.length;){switch(j.shift()){case"enter":C.forEach((function(e,t){g&&P.find((function(t){return t.originalKey===e}))&&(P=P.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";S[e]={slot:c,originalKey:e,key:g?String(e):K++,item:o,trail:A+=v,config:b(y,o,c),from:b(n&&void 0!==l?l||{}:f,o),to:b(p,o)}}));break;case"leave":N.forEach((function(e){var t=k.indexOf(e),n=E[t];P.unshift(o({},S[e],{slot:"leave",destroyed:!0,left:k[Math.max(0,t-1)],right:k[Math.min(k.length,t+1)],trail:A+=v,config:b(y,n,"leave"),to:b(d,n)})),delete S[e]}));break;case"update":T.forEach((function(e){var t=s.indexOf(e),n=u[t];S[e]=o({},S[e],{item:n,slot:"update",trail:A+=v,config:b(y,n,"update"),to:b(m,n)})}))}}var D=s.map((function(e){return S[e]}));return P.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=D.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),D=[].concat(D.slice(0,t),[r],D.slice(t))})),o({},i,{changed:C.length||N.length||T.length,first:n&&0===C.length,transitions:D,current:S,deleted:P,prevProps:t})}(w.current,r),w.current.changed&&w.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,i=e.trail,a=e.key,u=e.item;w.current.instances.has(a)||w.current.instances.set(a,new H);var l=w.current.instances.get(a),f=o({},y,{to:r,from:n,config:c,ref:g,onRest:function(n){w.current.mounted&&(e.destroyed&&(g||s||Y(w,a),d&&d(u)),!Array.from(w.current.instances).some((function(e){return!e[1].idle}))&&(g||s)&&w.current.deleted.length>0&&Y(w),h&&h(u,t,n))},onStart:v&&function(){return v(u,t)},onFrame:m&&function(e){return m(u,t,e)},delay:i,reset:p&&"enter"===t});l.update(f),w.current.paused||l.start()})),i.useEffect((function(){return w.current.mounted=j.current=!0,function(){w.current.mounted=j.current=!1,Array.from(w.current.instances).map((function(e){return e[1].destroy()})),w.current.instances.clear()}}),[]),w.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:w.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=i.useRef();i.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var i=c.controllers;if(i.length){var a=n*t[r];i.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+a})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=U},,function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,function(e,t,n){"use strict";var r=n(19),o=n(6),c=n(17),i=n(0),a=n(29),u=n(11),s=n.n(u),l=n(14),f=n.n(l),p=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=f()(e,["className","size"]);return React.createElement(a.SVG,s()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},d=React.createElement(p,null),b=n(129),m=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=d;break;case"no-alt":t=b.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icon,n=void 0===t?null:t,r=e.size,u=Object(c.a)(e,["icon","size"]);if("string"==typeof n)return Object(i.createElement)(m,Object(o.a)({icon:n},u));if(n&&m===n.type)return Object(i.cloneElement)(n,v({},u));var s=r||24;if("function"==typeof n)return n.prototype instanceof i.Component?Object(i.createElement)(n,v({size:s},u)):n(v({size:s},u));if(n&&("svg"===n.type||n.type===a.SVG)){var l=v(v({width:s,height:s},n.props),u);return Object(i.createElement)(a.SVG,l)}return Object(i.isValidElement)(n)?Object(i.cloneElement)(n,v({size:s},u)):n}},function(e,t){!function(){e.exports=this.wp.autop}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(7),o=n.n(r),c=n(94),i=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(c.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,a=e.setIsSuppressed,s=Object(i.useRef)(t);Object(i.useEffect)((function(){s.current=t}),[t]);var l=Object(i.useMemo)((function(){return{hasNoticesOfType:function(e){return s.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),f=Object(i.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,u({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(e,t)}}}),[n,o]);return u(u(u({notices:t},l),f),{},{setIsSuppressed:a})}},function(e,t,n){"use strict";(function(e){var r=n(0),o=n(8),c=n(5),i=n.n(c),a=n(36),u=n(1),s=(n(58),n(68));t.a=Object(r.forwardRef)((function(t,n){var c=t.className,l=t.children,f=t.spokenMessage,p=void 0===f?l:f,d=t.politeness,b=void 0===d?"polite":d,m=t.actions,h=void 0===m?[]:m,v=t.onRemove,g=void 0===v?o.noop:v;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(a.speak)(n,t)}),[n,t])}(p,b),Object(r.useEffect)((function(){var e=setTimeout((function(){g()}),1e4);return function(){return clearTimeout(e)}}),[]);var y=i()(c,"components-snackbar");return h&&h.length>1&&(void 0!==e&&e.env,h=[h[0]]),Object(r.createElement)("div",{ref:n,className:y,onClick:g,tabIndex:"0",role:"button",onKeyPress:g,"aria-label":Object(u.__)("Dismiss this notice")},Object(r.createElement)("div",{className:"components-snackbar__content"},l,h.map((function(e,t){var n=e.label,o=e.onClick,c=e.url;return Object(r.createElement)(s.a,{key:t,href:c,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},n)}))))}))}).call(this,n(74))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return m}));var r=n(10),o=n.n(r),c=n(15),i=n(12),a=n(0),u=n(67),s=n(21),l=n.n(s),f=n(39),p=n(63),d=function(e){var t=Object(u.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(c.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},b=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(i.useSelect)((function(r){return r(c.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(i.useDispatch)(c.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},m=function(e,t){var n=Object(u.a)(),r=d(t=t||n),c=o()(r,2),i=c[0],s=c[1],b=Object(f.a)(i),m=Object(f.a)(e),h=Object(p.a)(m),v=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(h,m)||(s(Object.assign({},b,m)),v.current=!0)}),[b,m,h,s]),v.current?[i,s]:[e,s]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return x})),n.d(t,"a",(function(){return C}));var r=n(7),o=n.n(r),c=n(10),i=n.n(c),a=(n(3),n(0)),u=n(12),s=n(140),l=n(6),f=n(25),p=n.n(f);function d(e,t,n,r,o,c,i){try{var a=e[c](i),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}function b(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(e){d(c,r,o,i,a,"next",e)}function a(e){d(c,r,o,i,a,"throw",e)}i(void 0)}))}}var m=n(16),h=n(5),v=n.n(h),g=n(8),y=n(78),O=n(161),j=n(90);var w=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?g.noop:o,i=Object(O.a)(),u=Object(a.useState)((function(){return new WeakMap})),s=Object(m.a)(u,1)[0],f=Object(y.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=b(p.a.mark((function t(n){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:s.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=b(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:i});n=v()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(a.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(a.createElement)(y.animated.div,{key:n,style:r},Object(a.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(a.createElement)(j.a,Object(l.a)({},Object(g.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},k=n(89),E=n(77),S=function(){var e=Object(E.a)().isEditor,t=Object(k.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(w,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),x=function(){return Object(a.useContext)(_)},C=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,c=void 0===o||o,l=e.context,f=void 0===l?"wc/core":l,p=Object(u.useDispatch)("core/notices"),d=p.createNotice,b=p.removeNotice,m=Object(a.useState)(!1),h=i()(m,2),v=h[0],g=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,R(R({},n),{},{context:n.context||f}))}),[d,f]),O=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;b(e,t)}),[b,f]),j=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,R(R({},t),{},{type:"snackbar"}))}),[y]),w={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(f)}}),[f]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:f,setIsSuppressed:g},k=v?null:React.createElement(s.a,{className:r,notices:w.notices}),E=v?null:React.createElement(S,null);return React.createElement(_.Provider,{value:w},c&&k,t,E)}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(12),c=n(0),i=n(39),a=n(62),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,f=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(c.useRef)({results:[],isLoading:!0}),m=Object(i.a)(f),h=Object(i.a)(s),v=Object(a.a)(),g=Object(o.useSelect)((function(e){if(!d)return null;var o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,m,h],i=o.getCollectionError.apply(o,c);return i&&v(i),{results:o.getCollection.apply(o,c),isLoading:!o.hasFinishedResolution("getCollection",c)}}),[t,n,h,m,d]);return null!==g&&(b.current=g),b.current}},,function(e,t){!function(){e.exports=this.wp.wordcount}()},,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(32),i=n.n(c),a=n(33),u=n.n(a),s=n(20),l=n.n(s),f=n(34),p=n.n(f),d=n(35),b=n.n(d),m=n(24),h=n.n(m),v=n(7),g=n.n(v),y=n(2);n(131);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return i()(this,r),e=n.call(this),g()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),g()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),g()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(y.createRef)(),e}return u()(r,[{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),React.createElement(e,o()({},this.props,{scrollToTop:this.scrollToTop})))}}]),r}(y.Component);return t.displayName="withScrollToTop",t}},,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),c=n(7),i=n.n(c),a=n(0),u=n(43);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,n=e.containers,r=e.getProps,c=void 0===r?function(){}:r,i=e.getErrorBoundaryProps,s=void 0===i?function(){}:i;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),i=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,i,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:f})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,i=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(i,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(f.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,i,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,c=n.getErrorBoundaryProps,i=n.selector,a=n.wrapper.querySelectorAll(i),p({Block:r,containers:a,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t){},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},,,,,,function(e,t,n){"use strict";var r=n(0),o=n(8),c=n(5),i=n.n(c),a=n(1),u=n(36),s=n(120),l=n(68);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,f=e.children,p=e.spokenMessage,d=void 0===p?f:p,b=e.onRemove,m=void 0===b?o.noop:b,h=e.isDismissible,v=void 0===h||h,g=e.actions,y=void 0===g?[]:g,O=e.politeness,j=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):O,w=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(u.speak)(n,t)}),[n,t])}(d,j);var k=i()(t,"components-notice","is-"+c,{"is-dismissible":v});return w&&(f=Object(r.createElement)(r.RawHTML,null,f)),Object(r.createElement)("div",{className:k},Object(r.createElement)("div",{className:"components-notice__content"},f,y.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,a=e.noDefaultClasses,u=void 0!==a&&a,s=e.onClick,f=e.url;return Object(r.createElement)(l.a,{key:t,href:f,isPrimary:c,isSecondary:!u&&!f,isLink:!u&&!!f,onClick:f?void 0:s,className:i()("components-notice__action",n)},o)}))),v&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:s.a,label:Object(a.__)("Dismiss this notice"),onClick:m,showTooltip:!1}))}},function(e,t,n){"use strict";var r=n(0),o=n(29),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},,function(e,t,n){"use strict";var r=n(6),o=n(0),c=n(8);var i=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(i,")"),r}},a=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=a.get(e)||0;return a.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=i((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),i=n.n(c),a=n(29),u=function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(14),i=n.n(c),a=n(2);n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(15),i=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(i.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,i=r.hasFinishedResolution,a=t.dispatch(c.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,function(e,t,n){"use strict";n(3);var r=n(5),o=n.n(r),c=n(38),i=n(122);n(159);t.a=Object(i.a)((function(e){var t=e.className,n=e.instanceId,r=e.defaultValue,i=e.label,a=e.onChange,u=e.options,s=e.screenReaderLabel,l=e.readOnly,f=e.value,p="wc-block-components-sort-select__select-".concat(n);return React.createElement("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},React.createElement(c.a,{label:i,screenReaderLabel:s,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),React.createElement("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:r,onChange:a,readOnly:l,value:f},u.map((function(e){return React.createElement("option",{key:e.key,value:e.key},e.label)}))))}))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(3),n(5)),i=n.n(c),a=n(119),u=n(94),s=(n(112),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=i()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(a.a,o()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",s(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(37),o=n(0),c=n(9);n.p=c.D,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)((function(){return Promise.all([n.e(20),n.e(6)]).then(n.bind(null,300))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)((function(){return n.e(5).then(n.bind(null,310))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)((function(){return n.e(13).then(n.bind(null,309))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)((function(){return n.e(7).then(n.bind(null,301))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)((function(){return n.e(3).then(n.bind(null,302))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)((function(){return n.e(11).then(n.bind(null,303))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)((function(){return n.e(8).then(n.bind(null,287))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)((function(){return n.e(9).then(n.bind(null,304))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)((function(){return n.e(4).then(n.bind(null,305))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)((function(){return n.e(12).then(n.bind(null,306))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)((function(){return n.e(10).then(n.bind(null,307))}))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)((function(){return n.e(2).then(n.bind(null,308))}))});var i=function(e){return Object(r.getRegisteredBlockComponents)(e)}},,,,,,,,,,,function(e,t){},function(e,t,n){"use strict";var r=n(75),o=n.n(r);t.a=o.a},function(e,t,n){"use strict";(function(e){var r=n(57),o="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0,c=e.env.FORCE_REDUCED_MOTION||o?function(){return!0}:function(){return Object(r.a)("(prefers-reduced-motion: reduce)")};t.a=c}).call(this,n(74))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},,,function(e,t){!function(){e.exports=this.wp.blockEditor}()},function(e,t){!function(){e.exports=this.wp.components}()},,,,,,,,,,,,function(e,t,n){e.exports=n(269)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(132),o=n(94),c=n(111),i=n(32),a=n.n(i),u=n(33),s=n.n(u),l=n(34),f=n.n(l),p=n(35),d=n.n(p),b=n(24),m=n.n(b),h=n(2),v=(n(3),n(10)),g=n.n(v),y=n(0),O=n(14),j=n.n(O),w=n(7),k=n.n(w),E=n(1),S=n(8),P=n(5),R=n.n(P),_=n(38),x=(n(218),function(e){var t=e.currentPage,n=e.displayFirstAndLastPages,r=e.displayNextAndPreviousArrows,o=e.pagesToDisplay,c=e.onPageChange,i=e.totalPages,a=function(e,t,n){if(n<=2)return{minIndex:null,maxIndex:null};var r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}}(o,t,i),u=a.minIndex,s=a.maxIndex,l=n&&Boolean(1!==u),f=n&&Boolean(s!==i),p=n&&Boolean(u>3),d=n&&Boolean(s<i-2);l&&3===u&&(u-=1),f&&s===i-2&&(s+=1);var b=[];if(u&&s)for(var m=u;m<=s;m++)b.push(m);return React.createElement("div",{className:"wc-block-pagination wc-block-components-pagination"},React.createElement(_.a,{screenReaderLabel:Object(E.__)("Navigate to another page","woo-gutenberg-products-block")}),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t-1)},title:Object(E.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},React.createElement(_.a,{label:"<",screenReaderLabel:Object(E.__)("Previous page","woo-gutenberg-products-block")})),l&&React.createElement("button",{className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return c(1)},disabled:1===t},React.createElement(_.a,{label:1,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),1)})),p&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(E.__)("…","woo-gutenberg-products-block")),b.map((function(e){return React.createElement("button",{key:e,className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return c(e)},disabled:t===e},React.createElement(_.a,{label:e,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),e)}))})),d&&React.createElement("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(E.__)("…","woo-gutenberg-products-block")),f&&React.createElement("button",{className:R()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===i,"wc-block-components-pagination__page--active":t===i}),onClick:function(){return c(i)},disabled:t===i},React.createElement(_.a,{label:i,screenReaderLabel:Object(E.sprintf)(Object(E.__)("Page %d","woo-gutenberg-products-block"),i)})),r&&React.createElement("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return c(t+1)},title:Object(E.__)("Next page","woo-gutenberg-products-block"),disabled:t>=i},React.createElement(_.a,{label:">",screenReaderLabel:Object(E.__)("Next page","woo-gutenberg-products-block")})))});x.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var C=x,N=n(139),T=(n(217),function(e){var t=e.defaultValue,n=e.onChange,r=e.readOnly,o=e.value;return React.createElement(N.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:n,options:[{key:"menu_order",label:Object(E.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(E.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(E.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(E.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(E.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(E.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(E.__)("Order products by","woo-gutenberg-products-block"),value:o})}),A=n(80),D=n(122),F=n(11),M=n.n(F),I=n(148),L=Object(D.a)((function(e){var t=e.product,n=e.attributes,r=e.instanceId,o=n.layoutConfig,c=Object(A.useInnerBlockLayoutContext)(),i=c.parentClassName,a=c.parentName,u=0===Object.keys(t).length,s=R()("".concat(i,"__product"),"wc-block-layout",{"is-loading":u});return React.createElement("li",{className:s,"aria-hidden":u},function e(t,n,r,o){if(r){var c=Object(I.a)(t);return r.map((function(r,i){var a=g()(r,2),u=a[0],s=a[1],l=void 0===s?{}:s,f=[];l.children&&l.children.length>0&&(f=e(t,n,l.children,o));var p=c[u];if(!p)return null;var d=n.id||0,b=["layout",u,i,o,d];return React.createElement(y.Suspense,{key:b.join("_"),fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(p,M()({},l,{children:f,product:n})))}))}}(a,t,o,r))})),B=n(93),V=n(99),z=n(15),q=n(12),W=n(39);function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var K=function(e){var t={namespace:"/wc/store",resourceName:"products"},n=Object(V.a)(U(U({},t),{},{query:e})),r=n.results,o=n.isLoading,c=function(e,t){var n=t.namespace,r=t.resourceName,o=t.resourceValues,c=void 0===o?[]:o,i=t.query,a=void 0===i?{}:i;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var u=Object(W.a)(a),s=Object(W.a)(c),l=Object(q.useSelect)((function(t){var o=t(z.COLLECTIONS_STORE_KEY),c=[e,n,r,u,s];return{value:o.getCollectionHeader.apply(o,c),isLoading:o.hasFinishedResolution("getCollectionHeader",c)}}),[e,n,r,s,u]),f=l.value,p=l.isLoading;return{value:f,isLoading:void 0===p||p}}("x-wp-total",U(U({},t),{},{query:e})).value;return{products:r,totalProducts:parseInt(c,10),productsLoading:o}},Q=n(63),G=n(106),Y=n(36),$=(n(216),n(130)),J=n(29),Z=React.createElement(J.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})),X=function(){var e=Object(A.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(e,"__no-products")},React.createElement($.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:Z,size:100}),React.createElement("strong",{className:"".concat(e,"__no-products-title")},Object(E.__)("No products","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(e,"__no-products-description")},Object(E.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ee=React.createElement(J.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})),te=function(e){var t=e.resetCallback,n=void 0===t?function(){}:t,r=Object(A.useInnerBlockLayoutContext)().parentClassName;return React.createElement("div",{className:"".concat(r,"__no-products")},React.createElement($.a,{className:"".concat(r,"__no-products-image"),alt:"",srcElement:ee,size:100}),React.createElement("strong",{className:"".concat(r,"__no-products-title")},Object(E.__)("No products found","woo-gutenberg-products-block")),React.createElement("p",{className:"".concat(r,"__no-products-description")},Object(E.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),React.createElement("button",{onClick:n},Object(E.__)("Reset Search","woo-gutenberg-products-block")))};function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){k()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=function(e){var t=e.totalQuery,n=e.totalProducts,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.totalQuery;return!Object(S.isEqual)(t,o)&&Number.isFinite(n)},ce=Object(G.a)((function(e){var t=e.attributes,n=e.currentPage,r=e.onPageChange,o=e.onSortChange,c=e.sortValue,i=e.scrollToTop,a=Object(B.c)(function(e){var t=e.sortValue,n=e.currentPage,r=e.attributes,o=r.columns,c=r.rows;return re(re({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:o*c,page:n})}({attributes:t,sortValue:c,currentPage:n})),u=g()(a,1)[0],s=K(u),l=s.products,f=s.totalProducts,p=s.productsLoading,d=Object(A.useInnerBlockLayoutContext)().parentClassName,b=function(e){e.order,e.orderby,e.page,e.per_page;return j()(e,["order","orderby","page","per_page"])||{}}(u),m=Object(B.b)("attributes",[]),h=g()(m,2),v=h[0],O=h[1],w=Object(B.b)("min_price"),k=g()(w,2),P=k[0],_=k[1],x=Object(B.b)("max_price"),N=g()(x,2),D=N[0],F=N[1],M=Object(Q.a)({totalQuery:b,totalProducts:f},oe);Object(y.useEffect)((function(){Object(S.isEqual)(b,null==M?void 0:M.totalQuery)||(r(1),null!=M&&M.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(Y.speak)(Object(E.__)("No products found","woo-gutenberg-products-block")):Object(Y.speak)(Object(E.sprintf)(Object(E._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(f))}),[null==M?void 0:M.totalQuery,f,r,b]);var I,V,z,q,W,H=t.contentVisibility,U=t.columns*t.rows,G=!Number.isFinite(f)&&Number.isFinite(null==M?void 0:M.totalProducts)&&Object(S.isEqual)(b,null==M?void 0:M.totalQuery)?Math.ceil(M.totalProducts/U):Math.ceil(f/U),$=l.length?l:Array.from({length:U}),J=0!==l.length||p,Z=v.length>0||Number.isFinite(P)||Number.isFinite(D);return React.createElement("div",{className:(I=t.columns,V=t.rows,z=t.alignButtons,q=t.align,W=void 0!==q?"align"+q:"",R()(d,W,"has-"+I+"-columns",{"has-multiple-rows":V>1,"has-aligned-buttons":z}))},H.orderBy&&J&&React.createElement(T,{onChange:o,value:c}),!J&&Z&&React.createElement(te,{resetCallback:function(){O([]),_(null),F(null)}}),!J&&!Z&&React.createElement(X,null),J&&React.createElement("ul",{className:"".concat(d,"__products")},$.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return React.createElement(L,{key:e.id||n,attributes:t,product:e})}))),G>1&&React.createElement(C,{currentPage:n,onPageChange:function(e){i({focusableSelector:"a, button"}),r(e)},totalPages:G}))})),ie=function(e){var t=e.attributes,n=Object(y.useState)(1),r=g()(n,2),o=r[0],c=r[1],i=Object(y.useState)(t.orderby),a=g()(i,2),u=a[0],s=a[1];Object(y.useEffect)((function(){s(t.orderby)}),[t.orderby]);return React.createElement(ce,{attributes:t,currentPage:o,onPageChange:function(e){c(e)},onSortChange:function(e){var t=e.target.value;s(t),c(1)},sortValue:u})},ae=n(9),ue=React.createElement("img",{src:ae.C+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}});function se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var le=function(e){f()(n,e);var t=se(n);function n(){return a()(this,n),t.apply(this,arguments)}return s()(n,[{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.urlParameterSuffix;return t.isPreview?ue:React.createElement(A.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},React.createElement(ie,{attributes:t,urlParameterSuffix:n}))}}]),n}(h.Component);Object(c.a)({selector:".wp-block-woocommerce-all-products",Block:Object(r.a)((function(e){return React.createElement(o.a,{context:"wc/all-products"},React.createElement(le,e))})),getProps:function(e){return{attributes:JSON.parse(e.dataset.attributes)}}})}]);
|
build/all-products.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wc-shared-context', 'wc-shared-hocs', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning', 'wp-wordcount'), 'version' => 'b5bb0c4e7938fec6173417587f81ab3d');
|
build/all-products.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-products"]=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],b=0,p=[];b<i.length;b++)a=i[b],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&p.push(c[a][0]),c[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);p.length;)p.shift()();return o.push.apply(o,u||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==c[s]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={5:0,2:0,3:0,8:0,9:0,11:0,12:0,13:0,14:0,15:0,16:0},o=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=c[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=c[e]=[t,n]}));t.push(r[2]=n);var o,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({1:"atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title",2:"atomic-block-components/add-to-cart--atomic-block-components/button",3:"atomic-block-components/sale-badge",7:"atomic-block-components/add-to-cart",8:"atomic-block-components/button",9:"atomic-block-components/category-list",10:"atomic-block-components/image",11:"atomic-block-components/price",12:"atomic-block-components/rating",13:"atomic-block-components/sku",14:"atomic-block-components/stock-indicator",15:"atomic-block-components/summary",16:"atomic-block-components/tag-list",17:"atomic-block-components/title"}[e]||e)+".js"}(e);var s=new Error;o=function(t){i.onerror=i.onload=null,clearTimeout(u);var r=c[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;s.message="Loading chunk "+e+" failed.\n("+n+": "+o+")",s.name="ChunkLoadError",s.type=n,s.request=o,r[1](s)}c[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:i})}),12e4);i.onerror=i.onload=o,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=s;return o.push([834,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=Object(n.createContext)("page"),o=function(){return Object(n.useContext)(c)};c.Provider},106:function(e,t){},107:function(e,t){},108:function(e,t){},109:function(e,t){},110:function(e,t){},111:function(e,t){},112:function(e,t){},113:function(e,t){},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},121:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(0),c=r(21),o=Object(n.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),a=function(){return Object(n.useContext)(o)},i=function(e){var t=e.children,r=e.currentPostId,a=void 0===r?0:r,i=e.previewData,s=void 0===i?{}:i,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:s};return Object(n.createElement)(o.Provider,{value:u},t)}},127:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(55),a=r(158),i=r(3),s=r(22),u=r(39);t.a=function(e){var t=(Object(u.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(n.createElement)("a",{href:"".concat(i.ADMIN_URL,"post.php?post=").concat(t,"&action=edit"),target:"_blank",rel:"noopener noreferrer"},Object(c.__)("Edit this product's details","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:a.a,size:16}))),Object(n.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(c.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(5),c=r.n(n),o=r(177),a=r(0);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),b=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return s(s(s({notices:t},l),b),{},{setIsSuppressed:i})}},135:function(e,t){!function(){e.exports=this.wp.wordcount}()},136:function(e,t,r){"use strict";var n=r(30),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(1),u=r(7),l=(r(2),r(45)),b=r(4),p=r(8),d=r.n(p),f=r(14),m=r.n(f),O=r(15),g=r.n(O),j=r(16),v=r.n(j),h=r(17),y=r.n(h),w=r(10),E=r.n(w),k=r(139);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var P=Object(k.a)((function(e){var t=function(t){v()(n,t);var r=_(n);function n(){return m()(this,n),r.apply(this,arguments)}return g()(n,[{key:"render",value:function(){var t=this.props.selected,r=null==t;return Object(i.createElement)(e,a()({},this.props,{selected:r?[]:[t]}))}}]),n}(i.Component);return t.defaultProps={selected:null},t}),"withTransformSingleSelectToMultipleSelect"),S=r(277),C=r(13),N=r.n(C),x=r(27),D=r.n(x),B=r(12),z=r.n(B),V=r(5),R=r.n(V),T=r(33),A=r.n(T),I=r(36),L=r(38);function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){R()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=E()(e);if(t){var c=E()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return y()(this,r)}}var q=Object(k.a)((function(e){var t=function(t){v()(n,t);var r=H(n);function n(){var e;m()(this,n);for(var t=arguments.length,c=new Array(t),o=0;o<t;o++)c[o]=arguments[o];return e=r.call.apply(r,[this].concat(c)),R()(z()(e),"state",{error:null,loading:!1,variations:{}}),R()(z()(e),"loadVariations",(function(){var t=e.props.products,r=e.state,n=r.loading,c=r.variations;if(!n){var o=e.getExpandedProduct();if(o&&!c[o]){var a=t.find((function(e){return e.id===o}));a.variations&&0!==a.variations.length?(e.setState({loading:!0}),Object(I.g)(o).then((function(t){var r=t.map((function(e){return M(M({},e),{},{parent:o})}));e.setState({variations:M(M({},e.state.variations),{},R()({},o,r)),loading:!1,error:null})})).catch(function(){var t=D()(N.a.mark((function t(r){var n;return N.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(L.a)(r);case 2:n=t.sent,e.setState({variations:M(M({},e.state.variations),{},R()({},o,null)),loading:!1,error:n});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())):e.setState({variations:M(M({},e.state.variations),{},R()({},o,null)),loading:!1,error:null})}}})),e}return g()(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.selected,r=e.showVariations;t&&r&&this.loadVariations()}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.isLoading,n=t.selected;t.showVariations&&(!A()(e.selected,n)||e.isLoading&&!r)&&this.loadVariations()}},{key:"isProductId",value:function(e){return this.props.products.some((function(t){return t.id===e}))}},{key:"findParentProduct",value:function(e){return this.props.products.filter((function(t){return t.variations&&t.variations.find((function(t){return t.id===e}))}))[0].id}},{key:"getExpandedProduct",value:function(){var e=this.props,t=e.isLoading,r=e.selected;if(!e.showVariations)return null;var n=r&&r.length?r[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(t||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!t&&n?this.isProductId(n)?n:this.findParentProduct(n):null}},{key:"render",value:function(){var t=this.props,r=t.error,n=t.isLoading,c=this.state,o=c.error,s=c.loading,u=c.variations;return Object(i.createElement)(e,a()({},this.props,{error:o||r,expandedProduct:this.getExpandedProduct(),isLoading:n,variations:u,variationsLoading:s}))}}]),n}(i.Component);return R()(t,"defaultProps",{selected:[],showVariations:!1}),t}),"withProductVariations"),Q=r(55),G=r(31),W=Object(i.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),U=Object(i.createElement)(G.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"#757575",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),Y=r(43);r(187);function K(e,t){if(!t)return e;var r=new RegExp(Object(u.escapeRegExp)(t),"ig");return e.replace(r,"<strong>$&</strong>")}var J=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(i.createElement)(Q.a,{srcElement:W}):Object(i.createElement)(Q.a,{srcElement:U})},$={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},X=function(e){var t=e.expandedProduct,r=e.error,n=e.isLoading,o=e.onChange,p=e.onSearch,f=e.products,m=e.renderItem,O=e.selected,g=e.showVariations,j=e.variations,v=e.variationsLoading,h=function(e){var r=e.item,n=e.search,c=e.depth,o=void 0===c?0:c,p=e.isSelected,f=e.onSelect,m=r.variations&&Array.isArray(r.variations)?r.variations.length:0,O=d()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(o),{"is-searching":n.length>0,"is-skip-level":0===o&&0!==r.parent,"is-variable":m>0}),g=Object.assign({},e);delete g.isSingle;var j={role:"menuitemradio"};return r.breadcrumbs.length&&(j["aria-label"]="".concat(r.breadcrumbs[0],": ").concat(r.name)),m&&(j["aria-expanded"]=r.id===t),r.breadcrumbs.length?(Object(u.isEmpty)(r.variation)||(r.name=r.variation),Object(i.createElement)(l.b,a()({className:O},e,j))):[Object(i.createElement)(b.MenuItem,a()({key:"product-".concat(r.id),isSelected:p},g,j,{className:O,onClick:function(){f(r)()}}),Object(i.createElement)("span",{className:"woocommerce-search-list__item-state"},J(p)),Object(i.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(i.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:K(r.name,n)}})),m?Object(i.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(s.sprintf)(Object(s._n)("%d variation","%d variations",m,"woo-gutenberg-products-block"),m)):null),t===r.id&&m>0&&v&&Object(i.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(i.createElement)(b.Spinner,null))]};if(r)return Object(i.createElement)(Y.a,{error:r});var y=j&&j[t]?j[t]:[],w=[].concat(c()(f),c()(y));return Object(i.createElement)(l.a,{className:"woocommerce-products",list:w,isLoading:n,isSingle:!0,selected:w.filter((function(e){var t=e.id;return O.includes(t)})),onChange:o,renderItem:m||(g?h:null),onSearch:p,messages:$,isHierarchical:!0})};X.defaultProps={expandedProduct:null,selected:[],showVariations:!1};t.a=P(Object(S.a)(q(X)))},138:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=o},141:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(44),i=r(213);r(189);t.a=Object(i.a)((function(e){var t=e.className,r=e.instanceId,c=e.defaultValue,i=e.label,s=e.onChange,u=e.options,l=e.screenReaderLabel,b=e.readOnly,p=e.value,d="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:o()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(a.a,{label:i,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:c,onChange:s,readOnly:b,value:p},u.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},142:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(56),s=r(8),u=r.n(s),l=(r(2),r(149)),b=(r(215),function(e){var t=e.currency,r=e.maxPrice,n=e.minPrice,c=e.priceClassName,a=e.priceStyle;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",c),currency:t,value:n,style:a})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",c),currency:t,value:r,style:a}))}),p=function(e){var t=e.currency,r=e.regularPriceClassName,n=e.regularPriceStyle,c=e.regularPrice,s=e.priceClassName,l=e.priceStyle,b=e.price;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:t,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",r),style:n},e)},value:c}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:t,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",s),style:l},e)},value:b}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.format,s=void 0===a?"<price/>":a,d=e.maxPrice,f=void 0===d?null:d,m=e.minPrice,O=void 0===m?null:m,g=e.price,j=void 0===g?null:g,v=e.priceClassName,h=e.priceStyle,y=e.regularPrice,w=e.regularPriceClassName,E=e.regularPriceStyle,k=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));s.includes("<price/>")||(s="<price/>",console.error("Price formats need to include the `<price/>` tag."));var _=y&&j!==y,P=Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",v)});return _?P=Object(o.createElement)(p,{currency:n,price:j,priceClassName:v,priceStyle:h,regularPrice:y,regularPriceClassName:w,regularPriceStyle:E}):null!==O&&null!==f?P=Object(o.createElement)(b,{currency:n,maxPrice:f,minPrice:O,priceClassName:v,priceStyle:h}):null!==j&&(P=Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",v),currency:n,value:j,style:h})),Object(o.createElement)("span",{className:k},Object(l.a)(s,{price:P}))}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(5),c=r.n(n),o=r(7);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:s,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case s:return b.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,b));case u:return b.delete(o),i(i({},e),{},c()({},n,b))}return e}},144:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(15),a=r.n(o),i=r(16),s=r.n(i),u=r(17),l=r.n(u),b=r(10),p=r.n(b),d=r(0),f=r(7),m=r(1),O=r(4);function g(e){var t=e.level,r={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return r.hasOwnProperty(t)?Object(d.createElement)(O.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(d.createElement)(O.Path,{d:r[t]})):null}function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=p()(e);if(t){var c=p()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return l()(this,r)}}var v=function(e){s()(r,e);var t=j(r);function r(){return c()(this,r),t.apply(this,arguments)}return a()(r,[{key:"createLevelControl",value:function(e,t,r){var n=e===t;return{icon:Object(d.createElement)(g,{level:e}),title:Object(m.sprintf)(Object(m.__)("Heading %d"),e),isActive:n,onClick:function(){return r(e)}}}},{key:"render",value:function(){var e=this,t=this.props,r=t.isCollapsed,n=void 0===r||r,c=t.minLevel,o=t.maxLevel,a=t.selectedLevel,i=t.onChange;return Object(d.createElement)(O.ToolbarGroup,{isCollapsed:n,icon:Object(d.createElement)(g,{level:a}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,a,i)}))})}}]),r}(d.Component);t.a=v},145:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(5),c=r.n(n),o=r(37),a=r(21),i=r(121),s=r(28),u=r(7);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},d=b(b({},p),{},{email:"",phone:""}),f=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:d,shippingAddress:p,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){},extensions:{}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(i.b)(),r=t.isEditor,n=t.previewData,c=(null==n?void 0:n.previewCart)||{},s=e.shouldSelect,u=Object(a.useSelect)((function(e,t){var n=t.dispatch;if(!s)return m;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:d,shippingAddress:p,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(o.CART_STORE_KEY),i=a.getCartData(),u=a.getCartErrors(),l=a.getCartTotals(),b=!a.hasFinishedResolution("getCartData"),O=a.isCustomerDataUpdating(),g=n(o.CART_STORE_KEY).receiveCart,j=f(i.billingAddress),v=i.needsShipping?f(i.shippingAddress):j,h=i.fees.map((function(e){return f(e)}));return{cartCoupons:i.coupons,cartItems:i.items||[],cartFees:h,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors||[],cartTotals:l,cartIsLoading:b,cartErrors:u,billingAddress:j,shippingAddress:v,extensions:i.extensions||{},shippingRates:i.shippingRates||[],shippingRatesLoading:O,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements||[],receiveCart:g}}),[s]);return u}},147:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(18),c=r.n(n),o=r(37),a=r(21),i=r(0),s=r(100),u=r(33),l=r.n(u),b=r(53),p=r(96),d=function(e){var t=Object(s.a)();e=e||t;var r=Object(a.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(i.useCallback)((function(t){n(e,t)}),[e,n])]},f=function(e,t,r){var n=Object(s.a)();r=r||n;var c=Object(a.useSelect)((function(n){return n(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(a.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(i.useCallback)((function(t){u(r,e,t)}),[r,e,u])]},m=function(e,t){var r=Object(s.a)(),n=d(t=t||r),o=c()(n,2),a=o[0],u=o[1],f=Object(b.a)(a),m=Object(b.a)(e),O=Object(p.a)(m),g=Object(i.useRef)(!1);return Object(i.useEffect)((function(){l()(O,m)||(u(Object.assign({},f,m)),g.current=!0)}),[f,m,O,u]),g.current?[a,u]:[e,u]}},157:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(37),c=r(21),o=r(0),a=r(53),i=r(95),s=function(e){var t=e.namespace,r=e.resourceName,s=e.resourceValues,u=void 0===s?[]:s,l=e.query,b=void 0===l?{}:l,p=e.shouldSelect,d=void 0===p||p;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),m=Object(a.a)(b),O=Object(a.a)(u),g=Object(i.a)(),j=Object(c.useSelect)((function(e){if(!d)return null;var c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,m,O],a=c.getCollectionError.apply(c,o);return a&&g(a),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,r,O,m,d]);return null!==j&&(f.current=j),f.current}},158:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},167:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(6),o=Object(n.createElement)("img",{src:c.S+"img/grid.svg",alt:"Grid Preview",width:"230",height:"250",style:{width:"100%"}})},168:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=(r(2),r(28)),u=r(8),l=r.n(u);r(214);t.a=function(e){var t=e.className,r=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,u=e.name,b=e.permalink,p=void 0===b?"":b,d=a()(e,["className","disabled","name","permalink"]),f=l()("wc-block-components-product-name",r);return o?Object(i.createElement)("span",c()({className:f},d),Object(s.decodeEntities)(u)):Object(i.createElement)("a",c()({className:f,href:p},d),Object(s.decodeEntities)(u))}},169:function(e,t,r){"use strict";var n=r(0),c=r(135),o=r(89),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",n=i(e),c=n.split(" ").splice(0,t).join(" ");return Object(o.autop)(s(c,r))},l=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=i(e),a=c.slice(0,t);if(r)return Object(o.autop)(s(a,n));var u=a.match(/([\s]+)/g),l=u?u.length:0,b=c.slice(0,t+l);return Object(o.autop)(s(b,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,b=void 0===s?"words":s,p=e.className,d=void 0===p?"":p,f=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),b=Object(c.count)(s,r);return b<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,b)}),[t,i,b]);return Object(n.createElement)(n.RawHTML,{className:d},f)}},173:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),b=r(16),p=r.n(b),d=r(17),f=r.n(d),m=r(10),O=r.n(m),g=r(5),j=r.n(g),v=r(0),h=r(9);r(240);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}t.a=function(e){var t=function(t){p()(n,t);var r=y(n);function n(){var e;return a()(this,n),e=r.call(this),j()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),j()(l()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),j()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(h.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(v.createElement)(v.Fragment,null,Object(v.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(v.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),n}(h.Component);return t.displayName="withScrollToTop",t}},177:function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return j}));var n=r(5),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=(r(2),r(21)),u=r(279),l=r(931),b=r(134),p=r(121),d=function(){var e=Object(p.b)().isEditor,t=Object(b.a)(),r=t.notices,n=t.removeNotice;if(e)return null;var c=r.filter((function(e){return"snackbar"===e.type}));return Object(i.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:n})};function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(i.useContext)(O)},j=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,b=void 0===l?"wc/core":l,p=Object(s.useDispatch)("core/notices"),f=p.createNotice,g=p.removeNotice,j=Object(i.useState)(!1),v=a()(j,2),h=v[0],y=v[1],w=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};f(e,t,m(m({},r),{},{context:r.context||b}))}),[f,b]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;g(e,t)}),[g,b]),k=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};w("default",e,m(m({},t),{},{type:"snackbar"}))}),[w]),_={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(b)}}),[b]).notices,createNotice:w,createSnackbarNotice:k,removeNotice:E,context:b,setIsSuppressed:y},P=h?null:Object(i.createElement)(u.a,{className:n,notices:_.notices}),S=h?null:Object(i.createElement)(d,null);return Object(i.createElement)(O.Provider,{value:_},o&&P,t,S)}},180:function(e,t){},187:function(e,t){},189:function(e,t){},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},191:function(e,t){!function(){e.exports=this.wp.warning}()},20:function(e,t){!function(){e.exports=this.wp.url}()},208:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},i=function(e){return n(e,c.ERROR)},s=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},21:function(e,t){!function(){e.exports=this.wp.data}()},214:function(e,t){},215:function(e,t){},216:function(e,t){},217:function(e,t){},218:function(e,t){},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},240:function(e,t){},246:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=r(261);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},26:function(e,t){!function(){e.exports=this.moment}()},261:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},277:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(13),a=r.n(o),i=r(27),s=r.n(i),u=r(14),l=r.n(u),b=r(15),p=r.n(b),d=r(12),f=r.n(d),m=r(16),O=r.n(m),g=r(17),j=r.n(g),v=r(10),h=r.n(v),y=r(0),w=r(7),E=r(139),k=(r(2),r(6)),_=r(36),P=r(38);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=h()(e);if(t){var c=h()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return j()(this,r)}}var C=Object(E.a)((function(e){var t=function(t){O()(o,t);var r,n=S(o);function o(){var e;return l()(this,o),(e=n.apply(this,arguments)).state={list:[],loading:!0},e.setError=e.setError.bind(f()(e)),e.debouncedOnSearch=Object(w.debounce)(e.onSearch.bind(f()(e)),400),e}return p()(o,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(_.h)({selected:t}).then((function(t){e.setState({list:t,loading:!1})})).catch(this.setError)}},{key:"componentWillUnmount",value:function(){this.debouncedOnSearch.cancel()}},{key:"onSearch",value:function(e){var t=this,r=this.props.selected;Object(_.h)({selected:r,search:e}).then((function(e){t.setState({list:e,loading:!1})})).catch(this.setError)}},{key:"setError",value:(r=s()(a.a.mark((function e(t){var r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(P.a)(t);case 2:r=e.sent,this.setState({list:[],loading:!1,error:r});case 4:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var t=this,r=this.state,n=r.error,o=r.list,a=r.loading;return Object(y.createElement)(e,c()({},this.props,{error:n,products:o,isLoading:a,onSearch:k.u?function(e){t.setState({loading:!0}),t.debouncedOnSearch(e)}:null}))}}]),o}(y.Component);return t.defaultProps={selected:[]},t}),"withSearchedProducts");t.a=C},278:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(8),s=r.n(i),u=r(44),l=r(39),b=r(66);r(539);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(l.useInnerBlockLayoutContext)().parentClassName,i=Object(l.useProductDataContext)().product;if(!i.id||!i.on_sale)return null;var b="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(o.createElement)("div",{className:s()("wc-block-components-product-sale-badge",t,b,c()({},"".concat(n,"__product-onsale"),n))},Object(o.createElement)(u.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},279:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(375),u=r(177),l=(r(216),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,r=e.notices,n=Object(u.b)().removeNotice,a=r.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var b=i()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:b},a.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))}},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},280:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(88),o=(r(2),r(218),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,i=e.elementId,s=void 0===i?"":i,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var p=l(a)||{};if(!p.message||p.hidden)return null;r=p.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(s)},r))})},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},345:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},36:function(e,t,r){"use strict";r.d(t,"h",(function(){return p})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return f})),r.d(t,"i",(function(){return m})),r.d(t,"f",(function(){return O})),r.d(t,"c",(function(){return g})),r.d(t,"d",(function(){return j})),r.d(t,"g",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(5),c=r.n(n),o=r(20),a=r(19),i=r.n(a),s=r(7),u=r(6);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,l=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:u.u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",b(b({},s),i))];return u.u&&r.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),l}({selected:r,search:c,queryArgs:void 0===a?[]:a});return Promise.all(l.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return b(b({},e),{},{parent:0})}))})).catch((function(e){throw e}))},d=function(e){return i()({path:"/wc/store/products/".concat(e)})},f=function(){return i()({path:"wc/store/products/attributes"})},m=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},O=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.w?100:0,orderby:u.w?"count":"name",order:u.w?"desc":"asc",search:n})];return u.w&&r.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),c}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},g=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",b({per_page:0},e))})},j=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},v=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},h=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},376:function(e,t){},378:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(6);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.V)()&&(s=i(i({},s),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=s},379:function(e,t,r){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(13),c=r.n(n),o=r(27),a=r.n(o),i=r(1),s=function(){var e=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},380:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(18),s=r.n(i),u=r(0),l=(r(2),r(1)),b=r(8),p=r.n(b),d=r(6),f=r(39),m=r(66),O=r(278);r(540);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=function(){return Object(u.createElement)("img",{src:d.E,alt:"",width:500,height:500})},h=function(e){var t=e.image,r=e.onLoad,n=e.loaded,o=e.showFullSize,a=e.fallbackAlt,i=t||{},s=i.thumbnail,l=i.src,b=i.srcset,p=i.sizes,d=j({alt:i.alt||a,onLoad:r,hidden:!n,src:s},o&&{src:l,srcSet:b,sizes:p});return Object(u.createElement)(u.Fragment,null,d.src&&Object(u.createElement)("img",c()({"data-testid":"product-image"},d)),!n&&Object(u.createElement)(v,null))};t.a=Object(m.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,c=e.productLink,o=void 0===c||c,i=e.showSaleBadge,b=e.saleBadgeAlign,d=void 0===b?"right":b,m=Object(f.useInnerBlockLayoutContext)().parentClassName,g=Object(f.useProductDataContext)().product,y=Object(u.useState)(!1),w=s()(y,2),E=w[0],k=w[1];if(!g.id)return Object(u.createElement)("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",a()({},"".concat(m,"__product-image"),m))},Object(u.createElement)(v,null));var _=!!g.images.length,P=_?g.images[0]:null,S=o?"a":u.Fragment,C=Object(l.sprintf)(Object(l.__)("Link to %s","woo-gutenberg-products-block"),g.name),N=j({href:g.permalink,rel:"nofollow"},!_&&{"aria-label":C});return Object(u.createElement)("div",{className:p()(t,"wc-block-components-product-image",a()({},"".concat(m,"__product-image"),m))},Object(u.createElement)(S,o&&N,!!i&&Object(u.createElement)(O.default,{align:d,product:g}),Object(u.createElement)(h,{fallbackAlt:g.name,image:P,onLoad:function(){return k(!0)},loaded:E,showFullSize:"cropped"!==n})))}))},381:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(143),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},382:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return d}));var n=r(13),c=r.n(n),o=r(46),a=r.n(o),i=r(27),s=r.n(i);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=[],s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(n));case 10:d=e.sent,"object"===a()(d)&&i.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,p;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),i=u(o),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},383:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},384:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(18),i=r.n(a),s=r(1),u=r(53),l=r(134),b=r(208),p=r(916),d="pristine",f="idle",m="disabled",O="processing",g="before_processing",j="after_processing",v={status:d,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},h="set_pristine",y="set_idle",w="set_disabled",E="set_processing",k="set_before_processing",_="set_after_processing",P="set_processing_response",S="set_has_error",C="set_no_error",N="set_quantity",x="set_request_params",D=h,B=y,z=w,V=E,R=k,T=_,A=P,I=S,L=C,F=N,M=x,H=function(){return{type:D}},q=function(){return{type:B}},Q=function(){return{type:z}},G=function(){return{type:V}},W=function(){return{type:R}},U=function(){return{type:T}},Y=function(e){return{type:A,data:e}},K=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:L;return{type:t}},J=function(e){return{type:F,quantity:e}},$=function(e){return{type:M,data:e}},X=r(5),Z=r.n(X);function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=h,ne=y,ce=w,oe=E,ae=k,ie=_,se=P,ue=S,le=C,be=N,pe=x,de=d,fe=f,me=m,Oe=O,ge=g,je=j,ve=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case re:e=v;break;case ne:e=t.status!==fe?te(te({},t),{},{status:fe}):t;break;case ce:e=t.status!==me?te(te({},t),{},{status:me}):t;break;case be:e=n!==t.quantity?te(te({},t),{},{quantity:n}):t;break;case pe:e=te(te({},t),{},{requestParams:te(te({},t.requestParams),o)});break;case se:e=te(te({},t),{},{processingResponse:o});break;case oe:e=!1===(e=t.status!==Oe?te(te({},t),{},{status:Oe,hasError:!1}):t).hasError?e:te(te({},e),{},{hasError:!1});break;case ae:e=t.status!==ge?te(te({},t),{},{status:ge,hasError:!1}):t;break;case ie:e=t.status!==je?te(te({},t),{},{status:je}):t;break;case ue:e=t.hasError?t:te(te({},t),{},{hasError:!0}),e=t.status===Oe||t.status===ge?te(te({},e),{},{status:fe}):e;break;case le:e=t.hasError?te(te({},t),{},{hasError:!1}):t}return e!==t&&c!==re&&e.status===de&&(e.status=fe),e},he=r(143),ye=r(381),we="add_to_cart_before_processing",Ee="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",_e=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(ye.a)(Ee,e),onAddToCartProcessingWithError:Object(ye.a)(ke,e),onAddToCartBeforeProcessing:Object(ye.a)(we,e)}},Pe=r(382),Se=r(88),Ce=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ne=function(){return Object(n.useContext)(Ce)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(ve,v),a=i()(o,2),d=a[0],h=a[1],y=Object(n.useReducer)(he.b,{}),w=i()(y,2),E=w[0],k=w[1],_=Object(u.a)(E),P=Object(l.a)(),S=P.addErrorNotice,C=P.removeNotices,N=Object(Se.b)().setValidationErrors,x=Object(b.a)(),D=x.isSuccessResponse,B=x.isErrorResponse,z=x.isFailResponse,V=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:_e(k).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:_e(k).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:_e(k).onAddToCartBeforeProcessing}}),[k]),R=Object(n.useMemo)((function(){return{resetForm:function(){h(H())},submitForm:function(){h(W())},setQuantity:function(e){h(J(e))},setHasError:function(e){h(K(e))},setRequestParams:function(e){h($(e))},setAfterProcessing:function(e){h(Y(e)),h(U())}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(p.a)(r);e!==m||t?e!==m&&t&&h(Q()):h(q())}),[d.status,r,h]),Object(n.useEffect)((function(){d.status===g&&(C("error"),Object(Pe.a)(_,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&S(t),r&&N(r)})),h(q())):h(G())})))}),[d.status,N,S,C,h,_]),Object(n.useEffect)((function(){if(d.status===j){var e={processingResponse:d.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;S(e.message,t)}};if(d.hasError)return void Object(Pe.b)(_,ke,e).then((function(r){if(B(r)||z(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");S(c,{id:"add-to-cart"})}h(q())}));Object(Pe.b)(_,Ee,e).then((function(e){B(e)||z(e)?(t(e),h(K(!0))):h(q())}))}}),[d.status,d.hasError,d.processingResponse,R,S,B,z,D,_]);var T=Object(p.b)(r),A={product:r,productType:r.type||"simple",productIsPurchasable:Object(p.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:T,showFormElements:c&&T,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:d.status===f,isDisabled:d.status===m,isProcessing:d.status===O,isBeforeProcessing:d.status===g,isAfterProcessing:d.status===j,hasError:d.hasError,eventRegistration:V,dispatchActions:R};return Object(n.createElement)(Ce.Provider,{value:A},t)},De=r(19),Be=r.n(De),ze=r(145),Ve=r(28),Re=r(523);function Te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Ae=function(){var e=Ne(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,b=e.requestParams,p=Object(Se.b)(),d=p.hasValidationErrors,f=p.showAllValidationErrors,m=Object(l.a)(),O=m.addErrorNotice,g=m.removeNotice,j=Object(ze.a)().receiveCart,v=Object(n.useState)(!1),h=i()(v,2),y=h[0],w=h[1],E=!a&&u,k=Object(n.useCallback)((function(){return!d||(f(),{type:"error"})}),[d,f]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(k,0);return function(){e()}}),[o,k]);var _=Object(n.useCallback)((function(){w(!0),g("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},b);Be()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Be.a.setNonce(e.headers),e.json().then((function(r){e.ok?j(r):(r.body&&r.body.message?O(Object(Ve.decodeEntities)(r.body.message),{id:"add-to-cart"}):O(Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),w(!1),Object(Re.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&j(e.data.cart),t.setHasError(),t.setAfterProcessing(e),w(!1)}))}))}),[r,O,g,j,t,c,b]);return Object(n.useEffect)((function(){E&&!y&&_()}),[E,_,y]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(Se.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Ae,null)))},Le=r(39),Fe=r(7),Me=r(66),He=(r(376),r(94)),qe=r(55),Qe=r(549),Ge=r(837),We=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(He.a,{className:t,href:r,rel:"nofollow"},c)},Ue=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,i=e.onClick;return Object(n.createElement)(He.a,{className:t,disabled:o,showSpinner:c,onClick:i},a&&r>0?Object(s.sprintf)(Object(s._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(s.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(qe.a,{srcElement:Qe.a,alt:Object(s.__)("Done","woo-gutenberg-products-block")}))},Ye=function(){var e=Ne(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,p=e.hasError,d=e.dispatchActions,f=Object(Ge.a)(o.id||0).cartQuantity,m=Object(n.useState)(!1),O=i()(m,2),g=O[0],j=O[1],v=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return p||j(!0),!0}),0);return function(){e()}}),[b,p]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Ue,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:f,isDisabled:u,isProcessing:l,isDone:g,onClick:function(){return d.submitForm()}}):Object(n.createElement)(We,{className:"wc-block-components-product-add-to-cart-button",href:v.url,text:v.text||Object(s.__)("View Product","woo-gutenberg-products-block")})},Ke=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Je=function(e){var t=e.reason,r=void 0===t?Object(s.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Je,null):t.id&&!t.is_in_stock?Object(n.createElement)(Je,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},Xe=(r(548),r(30)),Ze=r.n(Xe),et=r(4),tt=r(9),rt=r(280),nt={value:"",label:Object(s.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,i=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,p=void 0===b?Object(s.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(Se.b)(),f=d.getValidationError,m=d.setValidationErrors,O=d.clearValidationError,g=t,j=f(g)||{};return Object(tt.useEffect)((function(){i?O(g):m(Z()({},g,{message:p,hidden:!0}))}),[i,g,p,O,m]),Object(tt.useEffect)((function(){return function(){O(g)}}),[g,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Ve.decodeEntities)(t),value:i||"",options:[nt].concat(Ze()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":j.message&&!j.hidden})}),Object(n.createElement)(rt.a,{propertyName:g,elementId:g}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},st=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],i=at(at({},r),{},Z()({},c,null)),s=o?it(e,t,i):null,u=null!==s?s.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Ve.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(u.a)(t),a=Object(u.a)(r),s=Object(n.useState)(0),l=i()(s,2),b=l[0],p=l[1],d=Object(n.useState)({}),f=i()(d,2),m=f[0],O=f[1],g=Object(n.useMemo)((function(){return st(o,a,m)}),[m,o,a]);return Object(n.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(o).length?p(function(e,t,r){return it(e,t,r)[0]||0}(o,a,m)):b>0&&p(0)}),[m,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[c,b,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:g[e],value:m[e],onChange:function(t){O(lt(lt({},m),{},Z()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Fe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Ne(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,i=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Je,null):t.id&&!t.is_in_stock?Object(n.createElement)(Je,{reason:Object(s.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(pt,{product:t,dispatchers:a}),Object(n.createElement)(Ke,{value:r,min:c,max:o,disabled:i,onChange:a.setQuantity}),Object(n.createElement)(Ye,null))},ft=function(){return Object(n.createElement)(Ye,null)},mt=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},Ot=function(){return Object(n.createElement)(mt,null)},gt=function(){var e=Ne(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(Ot,null):"external"===r?Object(n.createElement)(ft,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Ye,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Le.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Fe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(gt,null)))}))},385:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(39),u=r(22),l=r(6),b=function(e){var t=e.color,r=e.fontSize;return Object(l.V)()?{color:t,fontSize:r}:{}},p=r(66),d=r(168);r(538),t.a=Object(p.withProductDataContext)((function(e){var t,r,n,a=e.className,p=e.headingLevel,f=void 0===p?2:p,m=e.productLink,O=void 0===m||m,g=e.align,j=e.color,v=e.customColor,h=e.fontSize,y=e.customFontSize,w=Object(s.useInnerBlockLayoutContext)().parentClassName,E=Object(s.useProductDataContext)().product,k="h".concat(f),_=Object(u.getColorClassName)("color",j),P=Object(u.getFontSizeClass)(h),S=i()((t={"has-text-color":j||v,"has-font-size":h||y},c()(t,_,_),c()(t,P,P),t));return E.id?Object(o.createElement)(k,{className:i()(a,"wc-block-components-product-title",(r={},c()(r,"".concat(w,"__product-title"),w),c()(r,"wc-block-components-product-title--align-".concat(g),g&&Object(l.V)()),r))},Object(o.createElement)(d.a,{className:i()(c()({},S,Object(l.V)())),disabled:!O,name:E.name,permalink:E.permalink,rel:O?"nofollow":null,style:b({color:v,fontSize:y})})):Object(o.createElement)(k,{className:i()(a,"wc-block-components-product-title",(n={},c()(n,"".concat(w,"__product-title"),w),c()(n,"wc-block-components-product-title--align-".concat(g),g&&Object(l.V)()),c()(n,S,Object(l.V)()),n)),style:b({color:v,fontSize:y})})}))},39:function(e,t){!function(){e.exports=this.wc.wcSharedContext}()},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},43:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(40));t.a=function(e){var t,r,a,i=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=i).message,a=t.type,r?"general"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):"api"===a?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(r))):r:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},44:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r(8),s=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,b=null!=r,p=null!=n;return!b&&p?(t=c||"span",u=l(l({},u),{},{className:s()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,n)):(t=c||a.Fragment,b&&p&&r!==n?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,u,r))}},49:function(e,t){!function(){e.exports=this.wp.keycodes}()},51:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},520:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(142),u=r(62),l=r(39),b=r(22),p=r(6),d=r(66);t.default=Object(d.withProductDataContext)((function(e){var t,r,n,a,d,f,m,O=e.className,g=e.align,j=e.fontSize,v=e.customFontSize,h=e.saleFontSize,y=e.customSaleFontSize,w=e.color,E=e.customColor,k=e.saleColor,_=e.customSaleColor,P=Object(l.useInnerBlockLayoutContext)().parentClassName,S=Object(l.useProductDataContext)().product,C=i()(O,c()({},"".concat(P,"__product-price"),P));if(!S.id)return Object(o.createElement)(s.a,{align:g,className:C});var N=Object(b.getColorClassName)("color",w),x=Object(b.getFontSizeClass)(j),D=Object(b.getColorClassName)("color",k),B=Object(b.getFontSizeClass)(h),z=i()((t={"has-text-color":w||E,"has-font-size":j||v},c()(t,N,N),c()(t,x,x),t)),V=i()((r={"has-text-color":k||_,"has-font-size":h||y},c()(r,D,D),c()(r,B,B),r)),R={color:E,fontSize:v},T={color:_,fontSize:y},A=S.prices,I=Object(u.getCurrencyFromPriceResponse)(A),L=A.price!==A.regular_price,F=L?i()((n={},c()(n,"".concat(P,"__product-price__value"),P),c()(n,V,Object(p.V)()),n)):i()((a={},c()(a,"".concat(P,"__product-price__value"),P),c()(a,z,Object(p.V)()),a)),M=L?T:R;return Object(o.createElement)(s.a,{align:g,className:C,currency:I,price:A.price,priceClassName:F,priceStyle:Object(p.V)()?M:{},minPrice:null==A||null===(d=A.price_range)||void 0===d?void 0:d.min_amount,maxPrice:null==A||null===(f=A.price_range)||void 0===f?void 0:f.max_amount,regularPrice:A.regular_price,regularPriceClassName:i()((m={},c()(m,"".concat(P,"__product-price__regular"),P),c()(m,z,Object(p.V)()),m)),regularPriceStyle:Object(p.V)()?R:{}})}))},521:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(1)),i=r(8),s=r.n(i),u=r(39),l=r(66),b=(r(541),function(e){var t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0});t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product,i=b(n);if(!i)return null;var l={width:i/5*100+"%"},p=Object(a.sprintf)(Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),i);return Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-rating",c()({},"".concat(r,"__product-rating"),r))},Object(o.createElement)("div",{className:s()("wc-block-components-product-rating__stars","".concat(r,"__product-rating__stars")),role:"img","aria-label":p},Object(o.createElement)("span",{style:l},p)))}))},522:function(e,t,r){"use strict";r.r(t);var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(0),s=(r(2),r(8)),u=r.n(s),l=r(1),b=r(837),p=r(28),d=r(523),f=r(39),m=r(66),O=(r(542),function(e){var t=e.product,r=Object(i.useRef)(!0),n=t.id,o=t.permalink,a=t.add_to_cart,s=t.has_options,f=t.is_purchasable,m=t.is_in_stock,O=Object(b.a)(n),g=O.cartQuantity,j=O.addingToCart,v=O.addToCart;Object(i.useEffect)((function(){r.current?r.current=!1:Object(d.c)()}),[g]);var h=Number.isFinite(g)&&g>0,y=!s&&f&&m,w=Object(p.decodeEntities)((null==a?void 0:a.description)||""),E=h?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",g,"woo-gutenberg-products-block"),g):Object(p.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),k=y?"button":"a",_={};return y?_.onClick=function(){v()}:(_.href=o,_.rel="nofollow"),Object(i.createElement)(k,c()({"aria-label":w,className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:j,added:h}),disabled:j},_),E)}),g=function(){return Object(i.createElement)("button",{className:u()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};t.default=Object(m.withProductDataContext)((function(e){var t=e.className,r=Object(f.useInnerBlockLayoutContext)().parentClassName,n=Object(f.useProductDataContext)().product;return Object(i.createElement)("div",{className:u()(t,"wp-block-button","wc-block-components-product-button",a()({},"".concat(r,"__product-add-to-cart"),r))},n.id?Object(i.createElement)(O,{product:n}):Object(i.createElement)(g,null))}))},523:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a}));var n=window.Event||null,c=function(e,t){var r=t.bubbles,c=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element;if(i||(i=document.body),"function"==typeof n){var s=new n(e,{bubbles:c,cancelable:a});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,a),i.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var o=function(){c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},524:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(169),u=r(3),l=r(39),b=r(66);r(543);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product;if(!n)return Object(o.createElement)("div",{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r))});var a=n.short_description?n.short_description:n.description;if(!a)return null;var b=Object(u.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:i()(t,"wc-block-components-product-summary",c()({},"".concat(r,"__product-summary"),r)),source:a,maxLength:150,countType:b})}))},525:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(66);r(544);t.default=Object(l.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product.sku;return n?Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-sku",c()({},"".concat(r,"__product-sku"),r))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,n)):null}))},526:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(7),b=r(66);r(545);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-category-list",c()({},"".concat(r,"__product-category-list"),r))},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"category-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},527:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(7),b=r(66);r(546);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,r=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(l.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:s()(t,"wc-block-components-product-tag-list",c()({},"".concat(r,"__product-tag-list"),r))},Object(a.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(e){var t=e.name,r=e.link,n=e.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:r},t))}))))}))},528:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(8)),s=r.n(i),u=r(39),l=r(66),b=(r(547),function(e){return Object(a.sprintf)(Object(a.__)("%d left in stock","woo-gutenberg-products-block"),e)}),p=function(e,t){return t?Object(a.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(a.__)("In Stock","woo-gutenberg-products-block"):Object(a.__)("Out of Stock","woo-gutenberg-products-block")};t.default=Object(l.withProductDataContext)((function(e){var t,r=e.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;if(!a.id||!a.is_purchasable)return null;var i=!!a.is_in_stock,l=a.low_stock_remaining,d=a.is_on_backorder;return Object(o.createElement)("div",{className:s()(r,"wc-block-components-product-stock-indicator",(t={},c()(t,"".concat(n,"__stock-indicator"),n),c()(t,"wc-block-components-product-stock-indicator--in-stock",i),c()(t,"wc-block-components-product-stock-indicator--out-of-stock",!i),c()(t,"wc-block-components-product-stock-indicator--low-stock",!!l),c()(t,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),t))},l?b(l):p(i,d))}))},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(33),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},538:function(e,t){},539:function(e,t){},540:function(e,t){},541:function(e,t){},542:function(e,t){},543:function(e,t){},544:function(e,t){},545:function(e,t){},546:function(e,t){},547:function(e,t){},548:function(e,t){},549:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},55:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(24),a=r.n(o),i=r(9);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))}},56:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(24),s=r.n(i),u=r(0),l=r(172),b=r(8),p=r.n(b);r(180);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,o=e.onValueChange,a=s()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var i=r/Math.pow(10,n.minorUnit);if(!Number.isFinite(i))return null;var b=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),d=f(f(f({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),m=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:b},d,{value:i,onValueChange:m}))}},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return c})),r.d(t,"I",(function(){return o})),r.d(t,"O",(function(){return a})),r.d(t,"y",(function(){return i})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"z",(function(){return l})),r.d(t,"C",(function(){return b})),r.d(t,"o",(function(){return p})),r.d(t,"B",(function(){return d})),r.d(t,"n",(function(){return f})),r.d(t,"E",(function(){return m})),r.d(t,"u",(function(){return O})),r.d(t,"w",(function(){return g})),r.d(t,"r",(function(){return j})),r.d(t,"s",(function(){return v})),r.d(t,"t",(function(){return h})),r.d(t,"k",(function(){return y})),r.d(t,"K",(function(){return w})),r.d(t,"P",(function(){return E})),r.d(t,"q",(function(){return k})),r.d(t,"p",(function(){return _})),r.d(t,"H",(function(){return P})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return C})),r.d(t,"S",(function(){return x})),r.d(t,"T",(function(){return D})),r.d(t,"J",(function(){return B})),r.d(t,"a",(function(){return z})),r.d(t,"M",(function(){return V})),r.d(t,"b",(function(){return R})),r.d(t,"L",(function(){return T})),r.d(t,"D",(function(){return A})),r.d(t,"i",(function(){return I})),r.d(t,"N",(function(){return M})),r.d(t,"h",(function(){return H})),r.d(t,"j",(function(){return q})),r.d(t,"G",(function(){return Q})),r.d(t,"F",(function(){return G})),r.d(t,"R",(function(){return W})),r.d(t,"Q",(function(){return U})),r.d(t,"d",(function(){return Y})),r.d(t,"e",(function(){return K})),r.d(t,"f",(function(){return J})),r.d(t,"g",(function(){return $})),r.d(t,"x",(function(){return X})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));var n=r(3),c=Object(n.getSetting)("currentUserIsAdmin",!1),o=Object(n.getSetting)("reviewRatingsEnabled",!0),a=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),u=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),p=Object(n.getSetting)("default_rows",3),d=Object(n.getSetting)("min_height",500),f=Object(n.getSetting)("default_height",500),m=Object(n.getSetting)("placeholderImgSrc",""),O=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),g=Object(n.getSetting)("limitTags"),j=Object(n.getSetting)("hasProducts",!0),v=Object(n.getSetting)("hasTags",!0),h=Object(n.getSetting)("homeUrl",""),y=Object(n.getSetting)("couponsEnabled",!0),w=Object(n.getSetting)("shippingEnabled",!0),E=Object(n.getSetting)("taxesEnabled",!0),k=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),_=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),P=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),C=Object(n.getSetting)("isShippingCalculatorEnabled",!0),N=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),x=Object(n.getSetting)("wcBlocksAssetUrl",""),D=Object(n.getSetting)("wcBlocksBuildUrl",""),B=Object(n.getSetting)("shippingCountries",{}),z=Object(n.getSetting)("allowedCountries",{}),V=Object(n.getSetting)("shippingStates",{}),R=Object(n.getSetting)("allowedStates",{}),T=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("paymentGatewaySortOrder",[]),I=Object(n.getSetting)("checkoutShowLoginReminder",!0),L={id:0,title:"",permalink:""},F=Object(n.getSetting)("storePages",{myaccount:L,shop:L,cart:L,checkout:L,privacy:L,terms:L}),M=F.shop.permalink,H=F.checkout.id,q=F.checkout.permalink,Q=F.privacy.permalink,G=F.privacy.title,W=F.terms.permalink,U=F.terms.title,Y=F.cart.id,K=F.cart.permalink,J=Object(n.getSetting)("checkoutAllowsGuest",!1),$=Object(n.getSetting)("checkoutAllowsSignup",!1),X=F.myaccount.permalink?F.myaccount.permalink:Object(n.getSetting)("loginUrl","/wp-login.php"),Z=r(23),ee=function(e,t){if(N>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(N>1)return Object(Z.registerBlockType)(e,t)},re=function(){return N>2},ne=function(){return N>1}},62:function(e,t){!function(){e.exports=this.wc.priceFormat}()},63:function(e,t){!function(){e.exports=this.wp.hooks}()},66:function(e,t){!function(){e.exports=this.wc.wcSharedHocs}()},67:function(e,t){!function(){e.exports=this.wp.dom}()},68:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),b=r(16),p=r.n(b),d=r(17),f=r.n(d),m=r(10),O=r.n(m),g=r(0),j=r(7),v=r(8),h=r.n(v),y=r(4),w=r(179);r(119);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=O()(e);if(t){var c=O()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return f()(this,r)}}var k=function(e){p()(r,e);var t=E(r);function r(){var e;return a()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(l()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,o=r.checked,a=r.instanceId,i=r.className,s=r.help,u=r.options,l=r.value,b="inspector-toggle-button-control-".concat(a);return s&&(e=Object(j.isFunction)(s)?s(o):s),Object(g.createElement)(y.BaseControl,{id:b,help:e,className:h()("components-toggle-button-control",i)},Object(g.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(g.createElement)(y.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((function(e,r){var o={};return l===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(g.createElement)(y.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},o),e.label)}))))}}]),r}(g.Component);t.a=Object(w.a)(k)},7:function(e,t){!function(){e.exports=this.lodash}()},70:function(e,t){!function(){e.exports=this.wp.deprecated}()},71:function(e,t){!function(){e.exports=this.wp.a11y}()},73:function(e,t){!function(){e.exports=this.ReactDOM}()},75:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(7),a=(r(2),r(4)),i=r(6);t.a=function(e){var t=e.columns,r=e.rows,s=e.setAttributes,u=e.alignButtons;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:function(e){var t=Object(o.clamp)(e,i.A,i.y);s({columns:Number.isNaN(t)?"":t})},min:i.A,max:i.y}),Object(n.createElement)(a.RangeControl,{label:Object(c.__)("Rows","woo-gutenberg-products-block"),value:r,onChange:function(e){var t=Object(o.clamp)(e,i.C,i.z);s({rows:Number.isNaN(t)?"":t})},min:i.C,max:i.z}),Object(n.createElement)(a.ToggleControl,{label:Object(c.__)("Align Last Block","woo-gutenberg-products-block"),help:u?Object(c.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(c.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:u,onChange:function(){return s({alignButtons:!u})}}))}},76:function(e,t){!function(){e.exports=this.wp.viewport}()},77:function(e,t){!function(){e.exports=this.wp.date}()},806:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=o},813:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(n.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(n.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=o},821:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=o},822:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(6),o=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(n.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'<span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">$</span>7.99</span>',images:[{id:1,src:c.S+"img/pennant.jpg",thumbnail:c.S+"img/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(n.__)("Add to cart","woo-gutenberg-products-block"),description:Object(n.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},827:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));t.a=o},834:function(e,t,r){e.exports=r(886)},835:function(e,t){},836:function(e,t){},837:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var n=r(18),c=r.n(n),o=r(0),a=r(21),i=r(37),s=r(28),u=r(134),l=r(145),b=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},p=function(e){var t=Object(a.useDispatch)(i.CART_STORE_KEY).addItemToCart,r=Object(l.a)(),n=r.cartItems,p=r.cartIsLoading,d=Object(u.a)(),f=d.addErrorNotice,m=d.removeNotice,O=Object(o.useState)(!1),g=c()(O,2),j=g[0],v=g[1],h=Object(o.useRef)(b(n,e));return Object(o.useEffect)((function(){var t=b(n,e);t!==h.current&&(h.current=t)}),[n,e]),{cartQuantity:Number.isFinite(h.current)?h.current:0,addingToCart:j,cartIsLoading:p,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;v(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){f(Object(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){v(!1)}))}}}},839:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},840:function(e,t){},841:function(e,t){},842:function(e,t){},843:function(e,t){},88:function(e,t,r){"use strict";r.d(t,"b",(function(){return v})),r.d(t,"a",(function(){return h}));var n=r(46),c=r.n(n),o=r(5),a=r.n(o),i=r(24),s=r.n(i),u=r(18),l=r.n(u),b=r(0),p=r(7),d=r(33),f=r.n(d);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var j=Object(b.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),v=function(){return Object(b.useContext)(j)},h=function(e){var t=e.children,r=Object(b.useState)({}),n=l()(r,2),c=n[0],o=n[1],i=Object(b.useCallback)((function(e){return c[e]}),[c]),u=Object(b.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),d=Object(b.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return s()(t,[e].map(g))}))}),[]),m=Object(b.useCallback)((function(){o({})}),[]),v=Object(b.useCallback)((function(e){e&&o((function(t){return e=Object(p.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!f()(t[r],e))})),0===Object.values(e).length?t:O(O({},t),e)}))}),[]),h=Object(b.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=O(O({},r[e]),t);return f()(r[e],n)?r:O(O({},r),{},a()({},e,n))}))}),[]),y={getValidationError:i,setValidationErrors:v,clearValidationError:d,clearAllValidationErrors:m,hideValidationError:Object(b.useCallback)((function(e){h(e,{hidden:!0})}),[h]),showValidationError:Object(b.useCallback)((function(e){h(e,{hidden:!1})}),[h]),showAllValidationErrors:Object(b.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=O(O({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:O(O({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:y},t)}},886:function(e,t,r){"use strict";r.r(t);var n=r(5),c=r.n(n),o=r(11),a=r.n(o),i=r(0),s=r(1),u=r(22),l=r(23),b=r(55),p=r(31),d=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"})),f=r(6),m=r(8),O=r.n(m),g=function(e){var t=e.attributes;return Object(i.createElement)("div",{className:O()("is-loading",t.className)})},j={category:"woocommerce-product-elements",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},supports:{html:!1},parent:Object(f.U)()?null:["@woocommerce/all-products","@woocommerce/single-product"],save:g,deprecated:[{save:function(){}}]},v=r(378),h=r(4),y=r(925),w=r(144),E=r(385),k=r(18),_=r.n(k),P=r(136),S=r(24),C=r.n(S);r(836);var N=function(e){var t=e.className,r=void 0===t?"":t,n=C()(e,["className"]),c=O()("wc-block-text-toolbar-button",r);return Object(i.createElement)(h.Button,a()({className:c},n))},x=r(39),D=(r(835),function(e){return function(t){return function(r){var n=Object(x.useProductDataContext)(),c=r.attributes,o=r.setAttributes,a=c.productId,l=Object(i.useState)(!a),b=_()(l,2),p=b[0],d=b[1];return n.hasContext?Object(i.createElement)(t,r):Object(i.createElement)(i.Fragment,null,p?Object(i.createElement)(h.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(i.createElement)("div",null,e.description),Object(i.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(i.createElement)(P.a,{selected:a||0,showVariations:!0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];o({productId:e[0]?e[0].id:0})}}),Object(i.createElement)(h.Button,{isSecondary:!0,disabled:!a,onClick:function(){d(!1)}},Object(s.__)("Done","woo-gutenberg-products-block")))):Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,null,Object(i.createElement)(N,{onClick:function(){return d(!0)}},Object(s.__)("Switch product…","woo-gutenberg-products-block")))),Object(i.createElement)(t,r)))}}}),B=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(i.createElement)("path",{d:"M17 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"})),z=Object(s.__)("Product Title","woo-gutenberg-products-block"),V=Object(i.createElement)(b.a,{srcElement:B}),R=Object(s.__)("Display the title of a product.","woo-gutenberg-products-block"),T=function(e){var t=e.color,r=e.fontSize,n=e.setFontSize,c=e.setColor,o=e.attributes,a=e.setAttributes,l=o.headingLevel,b=o.productLink,p=o.align;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(w.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:l,onChange:function(e){return a({headingLevel:e})}}),Object(f.V)()&&Object(i.createElement)(u.AlignmentToolbar,{value:p,onChange:function(e){a({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:b,onChange:function(){return a({productLink:!b})}})),Object(f.V)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Text settings","woo-gutenberg-products-block")},Object(i.createElement)(u.FontSizePicker,{value:r.size,onChange:n})),Object(i.createElement)(u.PanelColorSettings,{title:Object(s.__)("Color settings","woo-gutenberg-products-block"),colorSettings:[{value:t.color,onChange:c,label:Object(s.__)("Text color","woo-gutenberg-products-block")}]}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(E.a,o)))},A=Object(f.V)()?Object(y.a)([Object(u.withFontSizes)("fontSize"),Object(u.withColors)("color",{textColor:"color"}),D({icon:V,label:z,description:Object(s.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(T):T;function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var F={title:z,description:R,icon:{src:V,foreground:"#874FB9"},attributes:v.a,edit:A};Object(l.registerBlockType)("woocommerce/product-title",L(L({},j),F));var M=r(520),H=r(345),q=Object(s.__)("Product Price","woo-gutenberg-products-block"),Q=Object(i.createElement)(b.a,{srcElement:H.a}),G=Object(s.__)("Display the price of a product.","woo-gutenberg-products-block"),W=function(e){var t=e.fontSize,r=e.setFontSize,n=e.color,c=e.setColor,o=e.colorLabel;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.FontSizePicker,{value:t.size,onChange:r}),Object(i.createElement)(h.BaseControl,{label:o},Object(i.createElement)(u.ColorPalette,{value:n.color,onChange:c,label:Object(s.__)("Color")})))},U=function(e){var t=e.fontSize,r=e.saleFontSize,n=e.setFontSize,c=e.setSaleFontSize,o=e.color,a=e.saleColor,l=e.setColor,b=e.setSaleColor,p=e.attributes,d=e.setAttributes,m=p.align;return Object(i.createElement)(i.Fragment,null,Object(f.V)()&&Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(u.AlignmentToolbar,{value:m,onChange:function(e){d({align:e})}})),Object(i.createElement)(u.InspectorControls,null,Object(f.V)()&&Object(i.createElement)(i.Fragment,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Price","woo-gutenberg-products-block")},Object(i.createElement)(W,{color:o,setColor:l,fontSize:t,setFontSize:n,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Sale price","woo-gutenberg-products-block")},Object(i.createElement)(W,{color:a,setColor:b,fontSize:r,setFontSize:c,colorLabel:Object(s.__)("Color","woo-gutenberg-products-block")})))),Object(i.createElement)(M.default,p))},Y=Object(f.V)()?Object(y.a)([Object(u.withFontSizes)("fontSize"),Object(u.withFontSizes)("saleFontSize"),Object(u.withFontSizes)("originalFontSize"),Object(u.withColors)("color",{textColor:"color"}),Object(u.withColors)("saleColor",{textColor:"saleColor"}),Object(u.withColors)("originalColor",{textColor:"originalColor"}),D({icon:Q,label:q,description:Object(s.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(U):U;function K(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?K(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $={productId:{type:"number",default:0}};function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(f.V)()&&($=J(J({},$),{},{align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}}));var ee={title:q,description:G,icon:{src:Q,foreground:"#874FB9"},attributes:$,edit:Y};Object(l.registerBlockType)("woocommerce/product-price",Z(Z({},j),ee));var te=r(379),re=r(149),ne=r(68),ce=r(3),oe=r(380),ae=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"})),ie=Object(s.__)("Product Image","woo-gutenberg-products-block"),se=Object(i.createElement)(b.a,{srcElement:ae}),ue=Object(s.__)("Display the main product image","woo-gutenberg-products-block"),le=D({icon:se,label:ie,description:Object(s.__)("Choose a product to display its image.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=t.productLink,c=t.imageSizing,o=t.showSaleBadge,a=t.saleBadgeAlign;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(s.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:n,onChange:function(){return r({productLink:!n})}}),Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(s.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showSaleBadge:!o})}}),o&&Object(i.createElement)(ne.a,{label:Object(s.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:a,options:[{label:Object(s.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(s.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(s.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:function(e){return r({saleBadgeAlign:e})}}),Object(i.createElement)(ne.a,{label:Object(s.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(re.a)(Object(s.__)("Product image cropping can be modified in the <a>Customizer</a>.","woo-gutenberg-products-block"),{a:Object(i.createElement)("a",{href:"".concat(Object(ce.getAdminLink)("customize.php"),"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images"),target:"_blank",rel:"noopener noreferrer"})}),value:c,options:[{label:Object(s.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(s.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:function(e){return r({imageSizing:e})}}))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(oe.a,t)))}));function be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var de={title:ie,description:ue,icon:{src:se,foreground:"#874FB9"},attributes:te.a,edit:le};Object(l.registerBlockType)("woocommerce/product-image",pe(pe({},j),de));var fe={productId:{type:"number",default:0}},me=r(521),Oe=r(821),ge=Object(s.__)("Product Rating","woo-gutenberg-products-block"),je=Object(i.createElement)(b.a,{srcElement:Oe.a});function ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function he(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ye={title:ge,description:Object(s.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:je,foreground:"#874FB9"},attributes:fe,edit:D({icon:je,label:ge,description:Object(s.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(me.default,t)}))};Object(l.registerBlockType)("woocommerce/product-rating",he(he({},j),ye));var we={productId:{type:"number",default:0}},Ee=r(522),ke=r(839),_e=Object(s.__)("Add to Cart Button","woo-gutenberg-products-block"),Pe=Object(i.createElement)(b.a,{srcElement:ke.a});function Se(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ce(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Se(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ne={title:_e,description:Object(s.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:Pe,foreground:"#874FB9"},attributes:we,edit:D({icon:Pe,label:_e,description:Object(s.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Ee.default,t))}))};Object(l.registerBlockType)("woocommerce/product-button",Ce(Ce({},j),Ne));var xe={productId:{type:"number",default:0}},De=r(524),Be=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(i.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(i.createElement)("path",{d:"M21 11.01L3 11v2h18zM3 16h12v2H3zM21 6H3v2.01L21 8z"})),ze=Object(s.__)("Product Summary","woo-gutenberg-products-block"),Ve=Object(i.createElement)(b.a,{srcElement:Be});function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae={title:ze,description:Object(s.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:Ve,foreground:"#874FB9"},attributes:xe,edit:D({icon:Ve,label:ze,description:Object(s.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(De.default,t)}))};Object(l.registerBlockType)("woocommerce/product-summary",Te(Te({},j),Ae));var Ie={productId:{type:"number",default:0}},Le=r(278),Fe=r(813),Me=Object(s.__)("On-Sale Badge","woo-gutenberg-products-block"),He=Object(i.createElement)(b.a,{srcElement:Fe.a});function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ge={title:Me,description:Object(s.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:He,foreground:"#874FB9"},supports:{html:!1},attributes:Ie,edit:D({icon:He,label:Me,description:Object(s.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(Le.default,t)}))};Object(l.registerBlockType)("woocommerce/product-sale-badge",Qe(Qe({},j),Ge));var We={productId:{type:"number",default:0}},Ue=r(127),Ye=r(525),Ke=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"})),Je=Object(s.__)("Product SKU","woo-gutenberg-products-block"),$e=Object(i.createElement)(b.a,{srcElement:Ke});function Xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ze(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var et={title:Je,description:Object(s.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:$e,foreground:"#874FB9"},attributes:We,edit:D({icon:$e,label:Je,description:Object(s.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(Ye.default,t))}))};Object(f.W)("woocommerce/product-sku",Ze(Ze({},j),et));var tt={productId:{type:"number",default:0}},rt=r(526),nt=r(806),ct=Object(s.__)("Product Category List","woo-gutenberg-products-block"),ot=Object(i.createElement)(b.a,{srcElement:nt.a});function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function it(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st={title:ct,description:Object(s.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block"),icon:{src:ot,foreground:"#874FB9"},attributes:tt,edit:D({icon:ot,label:ct,description:Object(s.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(rt.default,t)))}))};Object(f.W)("woocommerce/product-category-list",it(it({},j),st));var ut={productId:{type:"number",default:0}},lt=r(527),bt=Object(s.__)("Product Tag List","woo-gutenberg-products-block"),pt=Object(i.createElement)(b.a,{srcElement:Fe.a});function dt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mt={title:bt,description:Object(s.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:pt,foreground:"#874FB9"},attributes:ut,edit:D({icon:pt,label:bt,description:Object(s.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(lt.default,t)))}))};Object(f.W)("woocommerce/product-tag-list",ft(ft({},j),mt));var Ot={productId:{type:"number",default:0}},gt=r(528),jt=Object(i.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(i.createElement)("g",{fillRule:"evenodd"},Object(i.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(i.createElement)("path",{fillRule:"nonzero",d:"M20.5 5.2l-1.4-1.7C19 3.3 18.5 3 18 3H6c-.5 0-.9.2-1.2.5L3.5 5.3A2 2 0 003 6.5V19c0 1.1.9 2 2 2h14a2 2 0 002-2V6.5c0-.5-.2-1-.5-1.3zM6.2 5h11.6l.8 1H5.4l.8-1zM5 19V8h14v11H5z"}))),vt=Object(s.__)("Product Stock Indicator","woo-gutenberg-products-block"),ht=Object(i.createElement)(b.a,{srcElement:jt});function yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Et={title:vt,description:Object(s.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:ht,foreground:"#874FB9"},attributes:Ot,edit:D({icon:ht,label:vt,description:Object(s.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})((function(e){var t=e.attributes;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(Ue.a,null),Object(i.createElement)(gt.default,t))}))};Object(f.W)("woocommerce/product-stock-indicator",wt(wt({},j),Et));var kt=r(916),_t=(r(376),r(384)),Pt=Object(s.__)("Add to Cart","woo-gutenberg-products-block"),St=Object(i.createElement)(b.a,{srcElement:ke.a});function Ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xt={title:Pt,description:Object(s.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:St,foreground:"#874FB9"},edit:D({icon:St,label:Pt,description:Object(s.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})((function(e){var t=e.attributes,r=e.setAttributes,n=Object(x.useProductDataContext)().product,c=t.className,o=t.showFormElements;return Object(i.createElement)("div",{className:O()(c,"wc-block-components-product-add-to-cart")},Object(i.createElement)(Ue.a,{productId:n.id}),Object(i.createElement)(u.InspectorControls,null,Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout","woo-gutenberg-products-block")},Object(kt.b)(n)?Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Display form elements","woo-gutenberg-products-block"),help:Object(s.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:o,onChange:function(){return r({showFormElements:!o})}}):Object(i.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(s.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(i.createElement)(h.Disabled,null,Object(i.createElement)(_t.a,t)))})),attributes:r(383).a};Object(f.W)("woocommerce/product-add-to-cart",Nt(Nt({},j),xt));var Dt=r(14),Bt=r.n(Dt),zt=r(12),Vt=r.n(zt),Rt=r(16),Tt=r.n(Rt),At=r(17),It=r.n(At),Lt=r(10),Ft=r.n(Lt),Mt=r(21),Ht=(r(2),r(75)),qt=r(912),Qt=r(822),Gt=r(158),Wt=function(e,t){var r=t.className,n=t.contentVisibility;return O()(e,r,{"has-image":n&&n.image,"has-title":n&&n.title,"has-rating":n&&n.rating,"has-price":n&&n.price,"has-button":n&&n.button})},Ut=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(i.createElement)("p",null,Object(s.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-products__add-product-button",isSecondary:!0,href:ce.ADMIN_URL+"post-new.php?post_type=product"},Object(s.__)("Add new product","woo-gutenberg-products-block")+" ",Object(i.createElement)(b.a,{srcElement:Gt.a})),Object(i.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(s.__)("Learn more","woo-gutenberg-products-block")))},Yt=function(e,t){return Object(i.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(s.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))};function Kt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var $t=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],Xt=function e(t){return t&&0!==t.length?t.map((function(t){return[t.name,Jt(Jt({},t.attributes),{},{product:void 0,children:t.innerBlocks.length>0?e(t.innerBlocks):[]})]})):[]};function Zt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tr=function(e,t){var r=e.contentVisibility;return Object(i.createElement)(h.ToggleControl,{label:Object(s.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:r.orderBy,onChange:function(){return t({contentVisibility:er(er({},r),{},{orderBy:!r.orderBy})})}})},rr=function(e,t){return Object(i.createElement)(h.SelectControl,{label:Object(s.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(s.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(s.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(s.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(s.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(s.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(s.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:function(e){return t({orderby:e})}})},nr=r(15),cr=r.n(nr),or=r(9),ar=r(7),ir=r(44),sr=(r(843),function(e){var t=e.currentPage,r=e.displayFirstAndLastPages,n=e.displayNextAndPreviousArrows,c=e.pagesToDisplay,o=e.onPageChange,a=e.totalPages,u=function(e,t,r){if(r<=2)return{minIndex:null,maxIndex:null};var n=e-1,c=Math.max(Math.floor(t-n/2),2),o=Math.min(Math.ceil(t+(n-(t-c))),r-1);return{minIndex:Math.max(Math.floor(t-(n-(o-t))),2),maxIndex:o}}(c,t,a),l=u.minIndex,b=u.maxIndex,p=r&&Boolean(1!==l),d=r&&Boolean(b!==a),f=r&&Boolean(l>3),m=r&&Boolean(b<a-2);p&&3===l&&(l-=1),d&&b===a-2&&(b+=1);var g=[];if(l&&b)for(var j=l;j<=b;j++)g.push(j);return Object(i.createElement)("div",{className:"wc-block-pagination wc-block-components-pagination"},Object(i.createElement)(ir.a,{screenReaderLabel:Object(s.__)("Navigate to another page","woo-gutenberg-products-block")}),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t-1)},title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(i.createElement)(ir.a,{label:"<",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),p&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:function(){return o(1)},disabled:1===t},Object(i.createElement)(ir.a,{label:1,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),g.map((function(e){return Object(i.createElement)("button",{key:e,className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:function(){return o(e)},disabled:t===e},Object(i.createElement)(ir.a,{label:e,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),e)}))})),m&&Object(i.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),d&&Object(i.createElement)("button",{className:O()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===a,"wc-block-components-pagination__page--active":t===a}),onClick:function(){return o(a)},disabled:t===a},Object(i.createElement)(ir.a,{label:a,screenReaderLabel:Object(s.sprintf)(Object(s.__)("Page %d","woo-gutenberg-products-block"),a)})),n&&Object(i.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page",onClick:function(){return o(t+1)},title:Object(s.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(i.createElement)(ir.a,{label:">",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))});sr.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var ur=sr,lr=r(141),br=(r(842),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,c=e.value;return Object(i.createElement)(lr.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",defaultValue:t,name:"orderby",onChange:r,options:[{key:"menu_order",label:Object(s.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(s.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(s.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(s.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(s.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(s.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:c})}),pr=r(213),dr=Object(pr.a)((function(e){var t=e.product,r=e.attributes,n=e.instanceId,c=r.layoutConfig,o=Object(x.useInnerBlockLayoutContext)(),s=o.parentClassName,u=o.parentName,l=0===Object.keys(t).length,b=O()("".concat(s,"__product"),"wc-block-layout",{"is-loading":l});return Object(i.createElement)("li",{className:b,"aria-hidden":l},function e(t,r,n,c){if(n){var o=Object(qt.a)(t);return n.map((function(n,s){var u=_()(n,2),l=u[0],b=u[1],p=void 0===b?{}:b,d=[];p.children&&p.children.length>0&&(d=e(t,r,p.children,c));var f=o[l];if(!f)return null;var m=r.id||0,O=["layout",l,s,c,m];return Object(i.createElement)(i.Suspense,{key:O.join("_"),fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},Object(i.createElement)(f,a()({},p,{children:d,product:r})))}))}}(u,t,c,n))})),fr=r(147),mr=r(157),Or=r(37),gr=r(53);function jr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?jr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hr=function(e){var t={namespace:"/wc/store",resourceName:"products"},r=Object(mr.a)(vr(vr({},t),{},{query:e})),n=r.results,c=r.isLoading,o=function(e,t){var r=t.namespace,n=t.resourceName,c=t.resourceValues,o=void 0===c?[]:c,a=t.query,i=void 0===a?{}:a;if(!r||!n)throw new Error("The options object must have valid values for the namespace and the resource name properties.");var s=Object(gr.a)(i),u=Object(gr.a)(o),l=Object(Mt.useSelect)((function(t){var c=t(Or.COLLECTIONS_STORE_KEY),o=[e,r,n,s,u];return{value:c.getCollectionHeader.apply(c,o),isLoading:c.hasFinishedResolution("getCollectionHeader",o)}}),[e,r,n,u,s]),b=l.value,p=l.isLoading;return{value:b,isLoading:void 0===p||p}}("x-wp-total",vr(vr({},t),{},{query:e})).value;return{products:n,totalProducts:parseInt(o,10),productsLoading:c}},yr=r(96),wr=r(173),Er=r(71),kr=(r(841),r(138)),_r=function(){var e=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(e,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(e,"__no-products-image"),alt:"",srcElement:kr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(e,"__no-products-title")},Object(s.__)("No products","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(e,"__no-products-description")},Object(s.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},Pr=r(827),Sr=function(e){var t=e.resetCallback,r=void 0===t?function(){}:t,n=Object(x.useInnerBlockLayoutContext)().parentClassName;return Object(i.createElement)("div",{className:"".concat(n,"__no-products")},Object(i.createElement)(b.a,{className:"".concat(n,"__no-products-image"),alt:"",srcElement:Pr.a,size:100}),Object(i.createElement)("strong",{className:"".concat(n,"__no-products-title")},Object(s.__)("No products found","woo-gutenberg-products-block")),Object(i.createElement)("p",{className:"".concat(n,"__no-products-description")},Object(s.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(i.createElement)("button",{onClick:r},Object(s.__)("Reset Search","woo-gutenberg-products-block")))};function Cr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xr=function(e){var t=e.totalQuery,r=e.totalProducts,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=n.totalQuery;return!Object(ar.isEqual)(t,c)&&Number.isFinite(r)},Dr=Object(wr.a)((function(e){var t=e.attributes,r=e.currentPage,n=e.onPageChange,c=e.onSortChange,o=e.sortValue,a=e.scrollToTop,u=Object(fr.c)(function(e){var t=e.sortValue,r=e.currentPage,n=e.attributes,c=n.columns,o=n.rows;return Nr(Nr({},function(e){switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}}(t)),{},{catalog_visibility:"catalog",per_page:c*o,page:r})}({attributes:t,sortValue:o,currentPage:r})),l=_()(u,1)[0],b=hr(l),p=b.products,d=b.totalProducts,f=b.productsLoading,m=Object(x.useInnerBlockLayoutContext)().parentClassName,g=function(e){e.order,e.orderby,e.page,e.per_page;return C()(e,["order","orderby","page","per_page"])||{}}(l),j=Object(fr.b)("attributes",[]),v=_()(j,2),h=v[0],y=v[1],w=Object(fr.b)("min_price"),E=_()(w,2),k=E[0],P=E[1],S=Object(fr.b)("max_price"),N=_()(S,2),D=N[0],B=N[1],z=Object(yr.a)({totalQuery:g,totalProducts:d},xr);Object(i.useEffect)((function(){Object(ar.isEqual)(g,null==z?void 0:z.totalQuery)||(n(1),null!=z&&z.totalQuery&&function(e){Number.isFinite(e)&&(0===e?Object(Er.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(Er.speak)(Object(s.sprintf)(Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))}(d))}),[null==z?void 0:z.totalQuery,d,n,g]);var V,R,T,A,I,L=t.contentVisibility,F=t.columns*t.rows,M=!Number.isFinite(d)&&Number.isFinite(null==z?void 0:z.totalProducts)&&Object(ar.isEqual)(g,null==z?void 0:z.totalQuery)?Math.ceil(z.totalProducts/F):Math.ceil(d/F),H=p.length?p:Array.from({length:F}),q=0!==p.length||f,Q=h.length>0||Number.isFinite(k)||Number.isFinite(D);return Object(i.createElement)("div",{className:(V=t.columns,R=t.rows,T=t.alignButtons,A=t.align,I=void 0!==A?"align"+A:"",O()(m,I,"has-"+V+"-columns",{"has-multiple-rows":R>1,"has-aligned-buttons":T}))},L.orderBy&&q&&Object(i.createElement)(br,{onChange:c,value:o}),!q&&Q&&Object(i.createElement)(Sr,{resetCallback:function(){y([]),P(null),B(null)}}),!q&&!Q&&Object(i.createElement)(_r,null),q&&Object(i.createElement)("ul",{className:"".concat(m,"__products")},H.map((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return Object(i.createElement)(dr,{key:e.id||r,attributes:t,product:e})}))),M>1&&Object(i.createElement)(ur,{currentPage:r,onPageChange:function(e){a({focusableSelector:"a, button"}),n(e)},totalPages:M}))})),Br=function(e){var t=e.attributes,r=Object(i.useState)(1),n=_()(r,2),c=n[0],o=n[1],a=Object(i.useState)(t.orderby),s=_()(a,2),u=s[0],l=s[1];Object(i.useEffect)((function(){l(t.orderby)}),[t.orderby]);return Object(i.createElement)(Dr,{attributes:t,currentPage:c,onPageChange:function(e){o(e)},onSortChange:function(e){var t=e.target.value;l(t),o(1)},sortValue:u})},zr=r(167);function Vr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return It()(this,r)}}var Rr=function(e){Tt()(r,e);var t=Vr(r);function r(){return Bt()(this,r),t.apply(this,arguments)}return cr()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.urlParameterSuffix;return t.isPreview?zr.a:Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)(Br,{attributes:t,urlParameterSuffix:r}))}}]),r}(or.Component);r(840);function Tr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=Ft()(e);if(t){var c=Ft()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return It()(this,r)}}var Ar=function(e){Tt()(r,e);var t=Tr(r);function r(){var e;Bt()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),c()(Vt()(e),"state",{isEditing:!1,innerBlocks:[]}),c()(Vt()(e),"blockMap",Object(qt.a)("woocommerce/all-products")),c()(Vt()(e),"componentDidMount",(function(){var t=e.props.block;e.setState({innerBlocks:t.innerBlocks})})),c()(Vt()(e),"getTitle",(function(){return Object(s.__)("All Products","woo-gutenberg-products-block")})),c()(Vt()(e),"getIcon",(function(){return Object(i.createElement)(b.a,{srcElement:d})})),c()(Vt()(e),"togglePreview",(function(){var t=e.props.debouncedSpeak;e.setState({isEditing:!e.state.isEditing}),e.state.isEditing||t(Object(s.__)("Showing All Products block preview.","woo-gutenberg-products-block"))})),c()(Vt()(e),"getInspectorControls",(function(){var t=e.props,r=t.attributes,n=t.setAttributes,c=r.columns,o=r.rows,a=r.alignButtons;return Object(i.createElement)(u.InspectorControls,{key:"inspector"},Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(i.createElement)(Ht.a,{columns:c,rows:o,alignButtons:a,setAttributes:n})),Object(i.createElement)(h.PanelBody,{title:Object(s.__)("Content Settings","woo-gutenberg-products-block")},tr(r,n),rr(r,n)))})),c()(Vt()(e),"getBlockControls",(function(){var t=e.state.isEditing;return Object(i.createElement)(u.BlockControls,null,Object(i.createElement)(h.ToolbarGroup,{controls:[{icon:"edit",title:Object(s.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return e.togglePreview()},isActive:t}]}))})),c()(Vt()(e),"renderEditMode",(function(){var t={template:e.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(e.blockMap)};return 0!==e.props.attributes.layoutConfig.length&&(t.renderAppender=!1),Object(i.createElement)(h.Placeholder,{icon:e.getIcon(),label:e.getTitle()},Object(s.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(i.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(i.createElement)(h.Tip,null,Object(s.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(i.createElement)(x.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(i.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(i.createElement)("ul",{className:"wc-block-grid__products"},Object(i.createElement)("li",{className:"wc-block-grid__product"},Object(i.createElement)(x.ProductDataContextProvider,{product:Qt.a[0]},Object(i.createElement)(u.InnerBlocks,t)))))),Object(i.createElement)("div",{className:"wc-block-all-products__actions"},Object(i.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,onClick:function(){var t=e.props,r=t.block;(0,t.setAttributes)({layoutConfig:Xt(r.innerBlocks)}),e.setState({innerBlocks:r.innerBlocks}),e.togglePreview()}},Object(s.__)("Done","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=e.state.innerBlocks;n(r.clientId,c,!1),e.togglePreview()}},Object(s.__)("Cancel","woo-gutenberg-products-block")),Object(i.createElement)(h.Button,{className:"wc-block-all-products__reset-button",icon:Object(i.createElement)(b.a,{srcElement:d}),label:Object(s.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:function(){var t=e.props,r=t.block,n=t.replaceInnerBlocks,c=[];$t.map((function(e){var t=_()(e,2),r=t[0],n=t[1];return c.push(Object(l.createBlock)(r,n)),!0})),n(r.clientId,c,!1),e.setState({innerBlocks:r.innerBlocks})}},Object(s.__)("Reset Layout","woo-gutenberg-products-block")))))})),c()(Vt()(e),"renderViewMode",(function(){var t=e.props.attributes,r=t.layoutConfig,n=r&&0!==r.length,c=e.getTitle(),o=e.getIcon();return n?Object(i.createElement)(h.Disabled,null,Object(i.createElement)(Rr,{attributes:t})):Yt(c,o)})),c()(Vt()(e),"render",(function(){var t=e.props.attributes,r=e.state.isEditing,n=e.getTitle(),c=e.getIcon();return f.r?Object(i.createElement)("div",{className:Wt("wc-block-all-products",t)},e.getBlockControls(),e.getInspectorControls(),r?e.renderEditMode():e.renderViewMode()):Ut(n,c)})),e}return r}(i.Component),Ir=Object(y.a)(h.withSpokenMessages,Object(Mt.withSelect)((function(e,t){var r=t.clientId;return{block:(0,e("core/block-editor").getBlock)(r)}})),Object(Mt.withDispatch)((function(e){return{replaceInnerBlocks:e("core/block-editor").replaceInnerBlocks}})))(Ar),Lr={columns:f.m,rows:f.o,alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:$t,isPreview:!1};function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fr(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hr={title:Object(s.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(i.createElement)(b.a,{srcElement:d}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Lr,edit:function(e){return Object(i.createElement)(Ir,e)},save:function(e){var t=e.attributes,r={};Object.keys(t).sort().forEach((function(e){r[e]=t[e]}));var n={"data-attributes":JSON.stringify(r)};return Object(i.createElement)("div",a()({className:Wt("wc-block-all-products",t)},n),Object(i.createElement)(u.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",Mr(Mr({},Hr),{},{deprecated:[{attributes:Object.assign({},Hr.attributes,{rows:{type:"number",default:1}}),save:function(e){var t=e.attributes,r={"data-attributes":JSON.stringify(t)};return Object(i.createElement)("div",a()({className:Wt("wc-block-all-products",t)},r),Object(i.createElement)(u.InnerBlocks.Content,null))}}]}))},89:function(e,t){!function(){e.exports=this.wp.autop}()},9:function(e,t){!function(){e.exports=this.React}()},912:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(51),c=r(0),o=r(6);r.p=o.T,Object(n.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(11)]).then(r.bind(null,520))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(3),r.e(10)]).then(r.bind(null,933))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(c.lazy)((function(){return Promise.all([r.e(1),r.e(17)]).then(r.bind(null,934))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(c.lazy)((function(){return r.e(12).then(r.bind(null,521))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(2),r.e(8)]).then(r.bind(null,522))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(c.lazy)((function(){return r.e(15).then(r.bind(null,524))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(c.lazy)((function(){return r.e(3).then(r.bind(null,278))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(c.lazy)((function(){return r.e(13).then(r.bind(null,525))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(c.lazy)((function(){return r.e(9).then(r.bind(null,526))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(c.lazy)((function(){return r.e(16).then(r.bind(null,527))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(c.lazy)((function(){return r.e(14).then(r.bind(null,528))}))}),Object(n.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(c.lazy)((function(){return Promise.all([r.e(0),r.e(1),r.e(2),r.e(7)]).then(r.bind(null,935))}))});var a=function(e){return Object(n.getRegisteredBlockComponents)(e)}},916:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},94:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(212),u=(r(2),r(8)),l=r.n(u);r(217);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(s.a,c()({className:b},u),n&&Object(i.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(i.createElement)("span",{className:"wc-block-components-button__text"},o))}},95:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(18),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){return t((function(){throw e}))}),[])}},96:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(9),c=function(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}}});
|
build/all-reviews.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '633225237a98e73198b6fd5804bfa5f7');
|
build/all-reviews.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var n,i,a=t[0],s=t[1],l=t[2],b=0,d=[];b<a.length;b++)i=a[b],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&d.push(o[i][0]),o[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(u&&u(t);d.length;)d.shift()();return c.push.apply(c,l||[]),r()}function r(){for(var e,t=0;t<c.length;t++){for(var r=c[t],n=!0,a=1;a<r.length;a++){var s=r[a];0!==o[s]&&(n=!1)}n&&(c.splice(t--,1),e=i(i.s=r[0]))}return e}var n={},o={6:0},c=[];function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=n,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var a=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],s=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;l<a.length;l++)t(a[l]);var u=s;return c.push([823,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},119:function(e,t){},129:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return p}));var n=r(0),o=r(1),c=r(149),i=r(4),a=r(22),s=r(3),l=r(6),u=r(68),b=function(e,t){return Object(n.createElement)(a.BlockControls,null,Object(n.createElement)(i.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return t({editMode:!e})},isActive:e}]}))},d=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:function(){return t({showReviewRating:!e.showReviewRating})}}),e.showReviewRating&&!l.I&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Product rating is disabled in your <a>store settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:function(){return t({showReviewerName:!e.showReviewerName})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:function(){return t({showReviewImage:!e.showReviewImage})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:function(){return t({showReviewDate:!e.showReviewDate})}}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:function(){return t({showReviewContent:!e.showReviewContent})}}),e.showReviewImage&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{label:Object(o.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(o.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(o.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:function(e){return t({imageType:e})}}),"reviewer"===e.imageType&&!l.O&&Object(n.createElement)(i.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(c.a)(Object(o.__)("Reviewer photo is disabled in your <a>site settings</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},p=function(e,t){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:function(){return t({showOrderby:!e.showOrderby})}}),Object(n.createElement)(i.SelectControl,{label:Object(o.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:function(e){return t({orderby:e})}}),Object(n.createElement)(i.RangeControl,{label:Object(o.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:function(e){return t({reviewsOnPageLoad:e})},max:20,min:1}),Object(n.createElement)(i.ToggleControl,{label:Object(o.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:function(){return t({showLoadMore:!e.showLoadMore})}}),e.showLoadMore&&Object(n.createElement)(i.RangeControl,{label:Object(o.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:function(e){return t({reviewsOnLoadMore:e})},max:20,min:1}))}},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},138:function(e,t,r){"use strict";var n=r(0),o=r(31),c=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},140:function(e,t){},141:function(e,t,r){"use strict";var n=r(0),o=(r(2),r(8)),c=r.n(o),i=r(44),a=r(213);r(189);t.a=Object(a.a)((function(e){var t=e.className,r=e.instanceId,o=e.defaultValue,a=e.label,s=e.onChange,l=e.options,u=e.screenReaderLabel,b=e.readOnly,d=e.value,p="wc-block-components-sort-select__select-".concat(r);return Object(n.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:a,screenReaderLabel:u,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),Object(n.createElement)("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",defaultValue:o,onChange:s,readOnly:b,value:d},l.map((function(e){return Object(n.createElement)("option",{key:e.key,value:e.key},e.label)}))))}))},148:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(1),o=r(6),c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(n.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",reviewer:Object(n.__)("Alice","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.S+"img/avatar.jpg",96:o.S+"img/avatar.jpg"},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(n.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(n.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#",reviewer:Object(n.__)("Bob","woo-gutenberg-products-block"),review:"<p>".concat(Object(n.__)("This product is awesome, I love it!","woo-gutenberg-products-block"),"</p>\n"),reviewer_avatar_urls:{48:o.S+"img/avatar.jpg",96:o.S+"img/avatar.jpg"},rating:null,verified:!1}]}}},170:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},171:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(0),i=(r(188),r(65));t.a=function(e){var t=e.attributes;return Object(c.createElement)("div",o()({className:Object(i.a)(t)},Object(i.b)(t)))}},175:function(e,t,r){"use strict";var n=r(14),o=r.n(n),c=r(15),i=r.n(c),a=r(16),s=r.n(a),l=r(17),u=r.n(l),b=r(10),d=r.n(b),p=r(0),w=r(1),g=r(9),f=(r(2),r(7)),m=r(4),v=r(6),h=r(87),O=r(44),j=(r(239),function(e){var t=e.onClick,r=e.label,n=e.screenReaderLabel;return Object(p.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(p.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(p.createElement)(O.a,{label:r,screenReaderLabel:n})))});j.defaultProps={label:Object(w.__)("Load more","woo-gutenberg-products-block")};var y=j,_=r(141),k=(r(236),function(e){var t=e.defaultValue,r=e.onChange,n=e.readOnly,o=e.value;return Object(p.createElement)(_.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",defaultValue:t,label:Object(w.__)("Order by","woo-gutenberg-products-block"),onChange:r,options:[{key:"most-recent",label:Object(w.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(w.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(w.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(w.__)("Order reviews by","woo-gutenberg-products-block"),value:o})}),R=r(5),E=r.n(R),S=r(8),P=r.n(S),C=r(12),N=r.n(C),x=r(209),T=r.n(x),L=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...",n=T()(e,{suffix:r,limit:t});return n.html},D=function(e,t,r,n){var o=I(e,t,r);return L(e,o-n.length,n)},I=function(e,t,r){for(var n={start:0,middle:0,end:e.length};n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=L(e,n.middle),n=M(n,t.clientHeight,r);return n.middle},M=function(e,t,r){return t<=r?e.start=e.middle+1:e.end=e.middle-1,e};function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var B=function(e){s()(r,e);var t=A(r);function r(e){var n;return o()(this,r),(n=t.apply(this,arguments)).state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},n.reviewSummary=Object(g.createRef)(),n.reviewContent=Object(g.createRef)(),n.getButton=n.getButton.bind(N()(n)),n.onClick=n.onClick.bind(N()(n)),n}return i()(r,[{key:"componentDidMount",value:function(){if(this.props.children){var e=this.props,t=e.maxLines,r=e.ellipsis,n=(this.reviewSummary.current.clientHeight+1)*t+1,o=this.reviewContent.current.clientHeight+1>n;this.setState({clampEnabled:o}),o&&this.setState({summary:D(this.reviewContent.current.innerHTML,this.reviewSummary.current,n,r)})}}},{key:"getButton",value:function(){var e=this.state.isExpanded,t=this.props,r=t.className,n=t.lessText,o=t.moreText,c=e?n:o;if(c)return Object(p.createElement)("a",{href:"#more",className:r+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}},{key:"onClick",value:function(e){e.preventDefault();var t=this.state.isExpanded;this.setState({isExpanded:!t})}},{key:"render",value:function(){var e=this.props.className,t=this.state,r=t.content,n=t.summary,o=t.clampEnabled,c=t.isExpanded;return r?!1===o?Object(p.createElement)("div",{className:e},Object(p.createElement)("div",{ref:this.reviewContent},r)):Object(p.createElement)("div",{className:e},(!c||null===o)&&Object(p.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:n}}),(c||null===o)&&Object(p.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},r),this.getButton()):null}}]),r}(g.Component);B.defaultProps={maxLines:3,ellipsis:"…",moreText:Object(w.__)("Read more","woo-gutenberg-products-block"),lessText:Object(w.__)("Read less","woo-gutenberg-products-block"),className:"read-more-content"};var H=B;r(238);var V=function(e){var t=e.attributes,r=e.review,n=void 0===r?{}:r,o=t.imageType,c=t.showReviewDate,i=t.showReviewerName,a=t.showReviewImage,s=t.showReviewRating,l=t.showReviewContent,u=t.showProductName,b=n.rating,d=!Object.keys(n).length>0,g=Number.isFinite(b)&&s;return Object(p.createElement)("li",{className:P()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":d}),"aria-hidden":d},(u||c||i||a||g)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,o;return r||!e?Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image",width:"48",height:"48"}):Object(p.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(p.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(o=e.product_image)||void 0===o?void 0:o.thumbnail)||""}):Object(p.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[48]||"",srcSet:e.reviewer_avatar_urls[96]+" 2x"}),e.verified&&Object(p.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(w.__)("Verified buyer","woo-gutenberg-products-block")},Object(w.__)("Verified buyer","woo-gutenberg-products-block")))}(n,o,d),(u||i||g||c)&&Object(p.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},g&&function(e){var t=e.rating,r={width:t/5*100+"%"},n=Object(w.sprintf)(Object(w.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(p.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(p.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},Object(p.createElement)("span",{style:r},n)))}(n),u&&function(e){return Object(p.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(p.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(n),i&&function(e){var t=e.reviewer,r=void 0===t?"":t;return Object(p.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},r)}(n),c&&function(e){var t=e.date_created,r=e.formatted_date_created;return Object(p.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(n))),l&&function(e){return Object(p.createElement)(H,{maxLines:10,moreText:Object(w.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(w.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(p.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(n))};r(237);function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach((function(t){E()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var G=function(e){var t=e.attributes,r=e.reviews,n=(v.O||"product"===t.imageType)&&t.showReviewImage,o=v.I&&t.showReviewRating,c=z(z({},t),{},{showReviewImage:n,showReviewRating:o});return Object(p.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(p.createElement)(V,{attributes:c}):r.map((function(e,t){return Object(p.createElement)(V,{key:e.id||t,attributes:c,review:e})})))},U=r(11),W=r.n(U),J=r(13),q=r.n(J),K=r(27),Q=r.n(K),X=r(33),Y=r.n(X),Z=r(65),$=r(38);function ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var re=function(e){var t=function(t){s()(n,t);var r=ee(n);function n(){var e;o()(this,n);for(var t=arguments.length,c=new Array(t),i=0;i<t;i++)c[i]=arguments[i];return e=r.call.apply(r,[this].concat(c)),E()(N()(e),"isPreview",!!e.props.attributes.previewReviews),E()(N()(e),"delayedAppendReviews",e.props.delayFunction(e.appendReviews)),E()(N()(e),"state",{error:null,loading:!0,reviews:e.isPreview?e.props.attributes.previewReviews:[],totalReviews:e.isPreview?e.props.attributes.previewReviews.length:0}),E()(N()(e),"setError",function(){var t=Q()(q.a.mark((function t(r){var n,o;return q.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.props.onReviewsLoadError,t.next=3,Object($.a)(r);case 3:o=t.sent,e.setState({reviews:[],loading:!1,error:o}),n(o);case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e}return i()(n,[{key:"componentDidMount",value:function(){this.replaceReviews()}},{key:"componentDidUpdate",value:function(e){e.reviewsToDisplay<this.props.reviewsToDisplay?this.delayedAppendReviews():this.shouldReplaceReviews(e,this.props)&&this.replaceReviews()}},{key:"shouldReplaceReviews",value:function(e,t){return e.orderby!==t.orderby||e.order!==t.order||e.productId!==t.productId||!Y()(e.categoryIds,t.categoryIds)}},{key:"componentWillUnMount",value:function(){this.delayedAppendReviews.cancel&&this.delayedAppendReviews.cancel()}},{key:"getArgs",value:function(e){var t=this.props,r=t.categoryIds,n=t.order,o=t.orderby,c=t.productId,i={order:n,orderby:o,per_page:t.reviewsToDisplay-e,offset:e};return r&&r.length&&(i.category_id=Array.isArray(r)?r.join(","):r),c&&(i.product_id=c),i}},{key:"replaceReviews",value:function(){if(!this.isPreview){var e=this.props.onReviewsReplaced;this.updateListOfReviews().then(e)}}},{key:"appendReviews",value:function(){if(!this.isPreview){var e=this.props,t=e.onReviewsAppended,r=e.reviewsToDisplay,n=this.state.reviews;r<=n.length||this.updateListOfReviews(n).then(t)}}},{key:"updateListOfReviews",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=this.props.reviewsToDisplay,n=this.state.totalReviews,o=Math.min(n,r)-t.length;return this.setState({loading:!0,reviews:t.concat(Array(o).fill({}))}),Object(Z.c)(this.getArgs(t.length)).then((function(r){var n=r.reviews,o=r.totalReviews;return e.setState({reviews:t.filter((function(e){return Object.keys(e).length})).concat(n),totalReviews:o,loading:!1,error:null}),{newReviews:n}})).catch(this.setError)}},{key:"render",value:function(){var t=this.props.reviewsToDisplay,r=this.state,n=r.error,o=r.loading,c=r.reviews,i=r.totalReviews;return Object(p.createElement)(e,W()({},this.props,{error:n,isLoading:o,reviews:c.slice(0,t),totalReviews:i}))}}]),n}(g.Component);E()(t,"defaultProps",{delayFunction:function(e){return e},onReviewsAppended:function(){},onReviewsLoadError:function(){},onReviewsReplaced:function(){}});var r=e.displayName,n=void 0===r?e.name||"Component":r;return t.displayName="WithReviews( ".concat(n," )"),t}(function(e){s()(r,e);var t=te(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.error,n=e.isLoading,o=e.noReviewsPlaceholder,c=e.reviews,i=e.totalReviews;return r?Object(p.createElement)(h.a,{className:"wc-block-featured-product-error",error:r,isLoading:n}):0!==c.length||n?Object(p.createElement)(m.Disabled,null,t.showOrderby&&v.I&&Object(p.createElement)(k,{readOnly:!0,value:t.orderby}),Object(p.createElement)(G,{attributes:t,reviews:c}),t.showLoadMore&&i>c.length&&Object(p.createElement)(y,{screenReaderLabel:Object(w.__)("Load more reviews","woo-gutenberg-products-block")})):Object(p.createElement)(o,{attributes:t})}}]),r}(g.Component));function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d()(e);if(t){var o=d()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return u()(this,r)}}var oe=function(e){s()(r,e);var t=ne(r);function r(){return o()(this,r),t.apply(this,arguments)}return i()(r,[{key:"renderHiddenContentPlaceholder",value:function(){var e=this.props,t=e.icon,r=e.name;return Object(p.createElement)(m.Placeholder,{icon:t,label:r},Object(w.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block"))}},{key:"render",value:function(){var e=this.props,t=e.attributes,r=e.noReviewsPlaceholder,n=t.categoryIds,o=t.productId,c=t.reviewsOnPageLoad,i=t.showProductName,a=t.showReviewDate,s=t.showReviewerName,l=t.showReviewContent,u=t.showReviewImage,b=t.showReviewRating,d=Object(Z.d)(t.orderby),w=d.order,g=d.orderby;return!(l||b||a||s||u||i)?this.renderHiddenContentPlaceholder():Object(p.createElement)("div",{className:Object(Z.a)(t)},Object(p.createElement)(re,{attributes:t,categoryIds:n,delayFunction:function(e){return Object(f.debounce)(e,400)},noReviewsPlaceholder:r,orderby:g,order:w,productId:o,reviewsToDisplay:c}))}}]),r}(g.Component);t.a=oe},188:function(e,t){},189:function(e,t){},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},236:function(e,t){},237:function(e,t){},238:function(e,t){},239:function(e,t){},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l}));var n=r(13),o=r.n(n),c=r(27),i=r.n(c),a=r(1),s=function(){var e=i()(o.a.mark((function e(t){var r;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),l=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},4:function(e,t){!function(){e.exports=this.wp.components}()},40:function(e,t){!function(){e.exports=this.wp.escapeHtml}()},43:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(40));t.a=function(e){var t,r,i,a=e.error;return Object(n.createElement)("div",{className:"wc-block-error-message"},(r=(t=a).message,i=t.type,r?"general"===i?Object(n.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):"api"===i?Object(n.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(c.escapeHTML)(r))):r:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")))}},44:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(0),i=(r(2),r(9)),a=r(8),s=r.n(a);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,l=void 0===a?{}:a,b=null!=r,d=null!=n;return!b&&d?(t=o||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),Object(c.createElement)(t,l,n)):(t=o||i.Fragment,b&&d&&r!==n?Object(c.createElement)(t,l,Object(c.createElement)("span",{"aria-hidden":"true"},r),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,l,r))}},55:function(e,t,r){"use strict";var n=r(5),o=r.n(n),c=r(24),i=r.n(c),a=r(9);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,c=i()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},c))}},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return o})),r.d(t,"I",(function(){return c})),r.d(t,"O",(function(){return i})),r.d(t,"y",(function(){return a})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return l})),r.d(t,"z",(function(){return u})),r.d(t,"C",(function(){return b})),r.d(t,"o",(function(){return d})),r.d(t,"B",(function(){return p})),r.d(t,"n",(function(){return w})),r.d(t,"E",(function(){return g})),r.d(t,"u",(function(){return f})),r.d(t,"w",(function(){return m})),r.d(t,"r",(function(){return v})),r.d(t,"s",(function(){return h})),r.d(t,"t",(function(){return O})),r.d(t,"k",(function(){return j})),r.d(t,"K",(function(){return y})),r.d(t,"P",(function(){return _})),r.d(t,"q",(function(){return k})),r.d(t,"p",(function(){return R})),r.d(t,"H",(function(){return E})),r.d(t,"c",(function(){return S})),r.d(t,"v",(function(){return P})),r.d(t,"S",(function(){return N})),r.d(t,"T",(function(){return x})),r.d(t,"J",(function(){return T})),r.d(t,"a",(function(){return L})),r.d(t,"M",(function(){return D})),r.d(t,"b",(function(){return I})),r.d(t,"L",(function(){return M})),r.d(t,"D",(function(){return A})),r.d(t,"i",(function(){return B})),r.d(t,"N",(function(){return F})),r.d(t,"h",(function(){return z})),r.d(t,"j",(function(){return G})),r.d(t,"G",(function(){return U})),r.d(t,"F",(function(){return W})),r.d(t,"R",(function(){return J})),r.d(t,"Q",(function(){return q})),r.d(t,"d",(function(){return K})),r.d(t,"e",(function(){return Q})),r.d(t,"f",(function(){return X})),r.d(t,"g",(function(){return Y})),r.d(t,"x",(function(){return Z})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));var n=r(3),o=Object(n.getSetting)("currentUserIsAdmin",!1),c=Object(n.getSetting)("reviewRatingsEnabled",!0),i=Object(n.getSetting)("showAvatars",!0),a=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),l=Object(n.getSetting)("default_columns",3),u=Object(n.getSetting)("max_rows",6),b=Object(n.getSetting)("min_rows",1),d=Object(n.getSetting)("default_rows",3),p=Object(n.getSetting)("min_height",500),w=Object(n.getSetting)("default_height",500),g=Object(n.getSetting)("placeholderImgSrc",""),f=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),m=Object(n.getSetting)("limitTags"),v=Object(n.getSetting)("hasProducts",!0),h=Object(n.getSetting)("hasTags",!0),O=Object(n.getSetting)("homeUrl",""),j=Object(n.getSetting)("couponsEnabled",!0),y=Object(n.getSetting)("shippingEnabled",!0),_=Object(n.getSetting)("taxesEnabled",!0),k=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),R=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),E=Object(n.getSetting)("productCount",0),S=Object(n.getSetting)("attributes",[]),P=Object(n.getSetting)("isShippingCalculatorEnabled",!0),C=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),N=Object(n.getSetting)("wcBlocksAssetUrl",""),x=Object(n.getSetting)("wcBlocksBuildUrl",""),T=Object(n.getSetting)("shippingCountries",{}),L=Object(n.getSetting)("allowedCountries",{}),D=Object(n.getSetting)("shippingStates",{}),I=Object(n.getSetting)("allowedStates",{}),M=Object(n.getSetting)("shippingMethodsExist",!1),A=Object(n.getSetting)("paymentGatewaySortOrder",[]),B=Object(n.getSetting)("checkoutShowLoginReminder",!0),H={id:0,title:"",permalink:""},V=Object(n.getSetting)("storePages",{myaccount:H,shop:H,cart:H,checkout:H,privacy:H,terms:H}),F=V.shop.permalink,z=V.checkout.id,G=V.checkout.permalink,U=V.privacy.permalink,W=V.privacy.title,J=V.terms.permalink,q=V.terms.title,K=V.cart.id,Q=V.cart.permalink,X=Object(n.getSetting)("checkoutAllowsGuest",!1),Y=Object(n.getSetting)("checkoutAllowsSignup",!1),Z=V.myaccount.permalink?V.myaccount.permalink:Object(n.getSetting)("loginUrl","/wp-login.php"),$=r(23),ee=function(e,t){if(C>2)return Object($.registerBlockType)(e,t)},te=function(e,t){if(C>1)return Object($.registerBlockType)(e,t)},re=function(){return C>2},ne=function(){return C>1}},65:function(e,t,r){"use strict";r.d(t,"d",(function(){return s})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return b}));var n=r(19),o=r.n(n),c=r(8),i=r.n(c),a=r(6),s=function(e){if(a.I){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=function(e){return o()({path:"/wc/store/products/reviews?"+Object.entries(e).map((function(e){return e.join("=")})).join("&"),parse:!1}).then((function(e){return e.json().then((function(t){return{reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}}))}))},u=function(e){var t=e.className,r=e.categoryIds,n=e.productId,o=e.showReviewDate,c=e.showReviewerName,a=e.showReviewContent,s=e.showProductName,l=e.showReviewImage,u=e.showReviewRating,b="wc-block-all-reviews";return n&&(b="wc-block-reviews-by-product"),Array.isArray(r)&&(b="wc-block-reviews-by-category"),i()(b,t,{"has-image":l,"has-name":c,"has-date":o,"has-rating":u,"has-content":a,"has-product-name":s})},b=function(e){var t=e.categoryIds,r=e.imageType,n=e.orderby,o=e.productId,c={"data-image-type":r,"data-orderby":n,"data-reviews-on-page-load":e.reviewsOnPageLoad,"data-reviews-on-load-more":e.reviewsOnLoadMore,"data-show-load-more":e.showLoadMore,"data-show-orderby":e.showOrderby};return o&&(c["data-product-id"]=o),Array.isArray(t)&&(c["data-category-ids"]=t.join(",")),c}},68:function(e,t,r){"use strict";var n=r(11),o=r.n(n),c=r(14),i=r.n(c),a=r(15),s=r.n(a),l=r(12),u=r.n(l),b=r(16),d=r.n(b),p=r(17),w=r.n(p),g=r(10),f=r.n(g),m=r(0),v=r(7),h=r(8),O=r.n(h),j=r(4),y=r(179);r(119);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=f()(e);if(t){var o=f()(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return w()(this,r)}}var k=function(e){d()(r,e);var t=_(r);function r(){var e;return i()(this,r),(e=t.apply(this,arguments)).onClick=e.onClick.bind(u()(e)),e}return s()(r,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,r=this.props,n=r.label,c=r.checked,i=r.instanceId,a=r.className,s=r.help,l=r.options,u=r.value,b="inspector-toggle-button-control-".concat(i);return s&&(e=Object(v.isFunction)(s)?s(c):s),Object(m.createElement)(j.BaseControl,{id:b,help:e,className:O()("components-toggle-button-control",a)},Object(m.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},n),Object(m.createElement)(j.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,r){var c={};return u===e.value?(c.isPrimary=!0,c["aria-pressed"]=!0):(c.isSecondary=!0,c["aria-pressed"]=!1),Object(m.createElement)(j.Button,o()({key:"".concat(e.label,"-").concat(e.value,"-").concat(r),value:e.value,onClick:t.onClick,"aria-label":n+": "+e.label},c),e.label)}))))}}]),r}(m.Component);t.a=Object(y.a)(k)},7:function(e,t){!function(){e.exports=this.lodash}()},823:function(e,t,r){e.exports=r(900)},87:function(e,t,r){"use strict";var n=r(0),o=r(1),c=(r(2),r(55)),i=r(138),a=r(8),s=r.n(a),l=r(4),u=r(43);r(140);t.a=function(e){var t=e.className,r=e.error,a=e.isLoading,b=e.onRetry;return Object(n.createElement)(l.Placeholder,{icon:Object(n.createElement)(c.a,{srcElement:i.a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",t)},Object(n.createElement)(u.a,{error:r}),b&&Object(n.createElement)(n.Fragment,null,a?Object(n.createElement)(l.Spinner,null):Object(n.createElement)(l.Button,{isSecondary:!0,onClick:b},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},9:function(e,t){!function(){e.exports=this.React}()},900:function(e,t,r){"use strict";r.r(t);var n=r(5),o=r.n(n),c=r(0),i=r(1),a=r(23),s=r(55),l=r(31),u=Object(c.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M15 4v7H5.17l-.59.59-.58.58V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"})),b=(r(188),r(22)),d=r(4),p=(r(2),r(175)),w=function(){return Object(c.createElement)(d.Placeholder,{className:"wc-block-all-reviews",icon:Object(c.createElement)(s.a,{srcElement:u,className:"block-editor-block-icon"}),label:Object(i.__)("All Reviews","woo-gutenberg-products-block")},Object(i.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"))},g=r(129),f=function(e){var t=e.attributes,r=e.setAttributes;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(b.InspectorControls,{key:"inspector"},Object(c.createElement)(d.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(d.ToggleControl,{label:Object(i.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:function(){return r({showProductName:!t.showProductName})}}),Object(g.b)(t,r)),Object(c.createElement)(d.PanelBody,{title:Object(i.__)("List Settings","woo-gutenberg-products-block")},Object(g.c)(t,r))),Object(c.createElement)(p.a,{attributes:t,icon:Object(c.createElement)(s.a,{icon:u,className:"block-editor-block-icon"}),name:Object(i.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:w}))},m=r(170),v=r(171),h=r(148);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Object(a.registerBlockType)("woocommerce/all-reviews",{title:Object(i.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(s.a,{srcElement:u}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Show a list of all product reviews.","woo-gutenberg-products-block"),supports:{html:!1},example:j(j({},h.a),{},{attributes:j(j({},h.a.attributes),{},{showProductName:!0})}),attributes:j(j({},m.a),{},{showProductName:{type:"boolean",default:!0}}),edit:function(e){return Object(c.createElement)(f,e)},save:v.a})}});
|
build/atomic-block-components/add-to-cart--atomic-block-components/button.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{121:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(0),c=n(21),i=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),o=function(){return Object(r.useContext)(i)},a=function(e){var t=e.children,n=e.currentPostId,o=void 0===n?0:n,a=e.previewData,s=void 0===a?{}:a,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return o||e("core/editor").getCurrentPostId()}),[o]),previewData:s};return Object(r.createElement)(i.Provider,{value:u},t)}},134:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(5),c=n.n(r),i=n(177),o=n(0);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){var e=Object(i.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,c=e.createSnackbarNotice,a=e.setIsSuppressed,u=Object(o.useRef)(t);Object(o.useEffect)((function(){u.current=t}),[t]);var l=Object(o.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),d=Object(o.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[n,c]);return s(s(s({notices:t},l),d),{},{setIsSuppressed:a})}},145:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(5),c=n.n(r),i=n(37),o=n(21),a=n(121),s=n(28),u=n(7);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},p=d(d({},f),{},{email:"",phone:""}),b=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},v={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:p,shippingAddress:f,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){},extensions:{}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(a.b)(),n=t.isEditor,r=t.previewData,c=(null==r?void 0:r.previewCart)||{},s=e.shouldSelect,u=Object(o.useSelect)((function(e,t){var r=t.dispatch;if(!s)return v;if(n)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:p,shippingAddress:f,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var o=e(i.CART_STORE_KEY),a=o.getCartData(),u=o.getCartErrors(),l=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),g=r(i.CART_STORE_KEY).receiveCart,O=b(a.billingAddress),h=a.needsShipping?b(a.shippingAddress):O,j=a.fees.map((function(e){return b(e)}));return{cartCoupons:a.coupons,cartItems:a.items||[],cartFees:j,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors||[],cartTotals:l,cartIsLoading:d,cartErrors:u,billingAddress:O,shippingAddress:h,extensions:a.extensions||{},shippingRates:a.shippingRates||[],shippingRatesLoading:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements||[],receiveCart:g}}),[s]);return u}},177:function(e,t,n){"use strict";n.d(t,"b",(function(){return g})),n.d(t,"a",(function(){return O}));var r=n(5),c=n.n(r),i=n(18),o=n.n(i),a=n(0),s=(n(2),n(21)),u=n(279),l=n(931),d=n(134),f=n(121),p=function(){var e=Object(f.b)().isEditor,t=Object(d.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var c=n.filter((function(e){return"snackbar"===e.type}));return Object(a.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:r})};function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=Object(a.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),g=function(){return Object(a.useContext)(m)},O=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=e.createNoticeContainer,i=void 0===c||c,l=e.context,d=void 0===l?"wc/core":l,f=Object(s.useDispatch)("core/notices"),b=f.createNotice,g=f.removeNotice,O=Object(a.useState)(!1),h=o()(O,2),j=h[0],w=h[1],y=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};b(e,t,v(v({},n),{},{context:n.context||d}))}),[b,d]),E=Object(a.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;g(e,t)}),[g,d]),N=Object(a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,v(v({},t),{},{type:"snackbar"}))}),[y]),C={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(d)}}),[d]).notices,createNotice:y,createSnackbarNotice:N,removeNotice:E,context:d,setIsSuppressed:w},S=j?null:Object(a.createElement)(u.a,{className:r,notices:C.notices}),P=j?null:Object(a.createElement)(p,null);return Object(a.createElement)(m.Provider,{value:C},i&&S,t,P)}},216:function(e,t){},246:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),s=n(31),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=void 0===n?20:n,i=o()(e,["className","size"]);return Object(a.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},i),Object(a.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=n(261);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(a.cloneElement)(t,{size:e.size||20,className:e.className}):null}},261:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(24),o=n.n(i),a=n(0),s=n(31),u=Object(a.createElement)((function(e){var t=e.className,n=e.size,r=o()(e,["className","size"]);return Object(a.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(a.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},279:function(e,t,n){"use strict";var r=n(11),c=n.n(r),i=n(0),o=(n(2),n(8)),a=n.n(o),s=n(375),u=n(177),l=(n(216),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,o=n.filter((function(e){return"snackbar"!==e.type}));if(!o.length)return null;var d=a()(t,"wc-block-components-notices");return Object(i.createElement)("div",{className:d},o.map((function(e){return Object(i.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},523:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o}));var r=window.Event||null,c=function(e,t){var n=t.bubbles,c=void 0!==n&&n,i=t.cancelable,o=void 0!==i&&i,a=t.element;if(a||(a=document.body),"function"==typeof r){var s=new r(e,{bubbles:c,cancelable:o});a.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,o),a.dispatchEvent(u)}},i=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var i=function(){c(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,i),function(){return jQuery(document).off(e,i)}}},837:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(18),c=n.n(r),i=n(0),o=n(21),a=n(37),s=n(28),u=n(134),l=n(145),d=function(e,t){var n=e.find((function(e){return e.id===t}));return n?n.quantity:0},f=function(e){var t=Object(o.useDispatch)(a.CART_STORE_KEY).addItemToCart,n=Object(l.a)(),r=n.cartItems,f=n.cartIsLoading,p=Object(u.a)(),b=p.addErrorNotice,v=p.removeNotice,m=Object(i.useState)(!1),g=c()(m,2),O=g[0],h=g[1],j=Object(i.useRef)(d(r,e));return Object(i.useEffect)((function(){var t=d(r,e);t!==j.current&&(j.current=t)}),[r,e]),{cartQuantity:Number.isFinite(j.current)?j.current:0,addingToCart:O,cartIsLoading:f,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;h(!0),t(e,n).then((function(e){!0===e&&v("add-to-cart")})).catch((function(e){b(Object(s.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){h(!1)}))}}}}}]);
|
build/atomic-block-components/add-to-cart--atomic-block-components/image--atomic-block-components/title.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],{932:function(e,n,a){"use strict";var c=a(11),r=a.n(c),t=a(0),o=function(e,n){var a=[];return Object.keys(e).forEach((function(c){if(void 0!==n[c])switch(e[c].type){case"boolean":a[c]="false"!==n[c]&&!1!==n[c];break;case"number":a[c]=parseInt(n[c],10);break;case"array":case"object":a[c]=JSON.parse(n[c]);break;default:a[c]=n[c]}else a[c]=e[c].default})),a};n.a=function(e){return function(n){return function(a){var c=o(e,a);return Object(t.createElement)(n,r()({},a,c))}}}}}]);
|
build/atomic-block-components/add-to-cart-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{100:function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r(7),a=r.n(n),c=r(15),o=r(12),s=r(77),i=r(22),u=r(8);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},p=d(d({},f),{},{email:"",phone:""}),b=function(e){return Object(u.mapValues)(e,(function(e){return Object(i.decodeEntities)(e)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:p,shippingAddress:f,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){},extensions:{}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(s.a)(),r=t.isEditor,n=t.previewData,a=(null==n?void 0:n.previewCart)||{},i=e.shouldSelect,u=Object(o.useSelect)((function(e,t){var n=t.dispatch;if(!i)return m;if(r)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:[],cartTotals:a.totals,cartIsLoading:!1,cartErrors:[],billingAddress:p,shippingAddress:f,extensions:{},shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:function(){}};var o=e(c.CART_STORE_KEY),s=o.getCartData(),u=o.getCartErrors(),l=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),v=o.isCustomerDataUpdating(),h=n(c.CART_STORE_KEY).receiveCart,g=b(s.billingAddress),y=s.needsShipping?b(s.shippingAddress):g,O=s.fees.map((function(e){return b(e)}));return{cartCoupons:s.coupons,cartItems:s.items||[],cartFees:O,cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors||[],cartTotals:l,cartIsLoading:d,cartErrors:u,billingAddress:g,shippingAddress:y,extensions:s.extensions||{},shippingRates:s.shippingRates||[],shippingRatesLoading:v,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements||[],receiveCart:h}}),[i]);return u}},116:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d}));var n=r(7),a=r.n(n),c=r(8);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,c=t.id,o=t.callback,l=t.priority,d=new Map(e[n]);switch(r){case i:return d.set(c,{priority:l,callback:o}),s(s({},e),{},a()({},n,d));case u:return d.delete(c),s(s({},e),{},a()({},n,d))}return e}},138:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},a={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},o=function(e){return n(e,a.SUCCESS)},s=function(e){return n(e,a.ERROR)},i=function(e){return n(e,a.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:a,noticeContexts:c,shouldRetry:u,isSuccessResponse:o,isErrorResponse:s,isFailResponse:i}}},155:function(e,t){},156:function(e,t){},182:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(79),a=(r(3),r(155),function(e){var t=e.errorMessage,r=void 0===t?"":t,a=e.propertyName,c=void 0===a?"":a,o=e.elementId,s=void 0===o?"":o,i=Object(n.b)(),u=i.getValidationError,l=i.getValidationErrorId;if(!r){var d=u(c)||{};if(!d.message||d.hidden)return null;r=d.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(s)},r))})},190:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},204:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(116),a=function(e,t){return function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=n.a.addEventCallback(e,r,a);return t(c),function(){t(n.a.removeEventCallback(e,c.id))}}}},205:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return p}));var n=r(25),a=r.n(n),c=r(28),o=r.n(c),s=r(48),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,o=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,c=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f,p;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=[],i=u(c),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:p=e.sent,"object"===o()(p)&&s.push(p),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),p=function(){var e=i()(a.a.mark((function e(t,r,n){var c,s,i,l,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=d(t,r),s=u(c),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===o()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},278:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o}));var n=window.Event||null,a=function(e,t){var r=t.bubbles,a=void 0!==r&&r,c=t.cancelable,o=void 0!==c&&c,s=t.element;if(s||(s=document.body),"function"==typeof n){var i=new n(e,{bubbles:a,cancelable:o});s.dispatchEvent(i)}else{var u=document.createEvent("Event");u.initEvent(e,a,o),s.dispatchEvent(u)}},c=function(){a("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},o=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var c=function(){a(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}},279:function(e,t,r){"use strict";var n=r(29),a=React.createElement(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},285:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(190);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},292:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(10),a=r.n(n),c=r(0),o=r(12),s=r(15),i=r(22),u=r(89),l=r(100),d=function(e,t){var r=e.find((function(e){return e.id===t}));return r?r.quantity:0},f=function(e){var t=Object(o.useDispatch)(s.CART_STORE_KEY).addItemToCart,r=Object(l.a)(),n=r.cartItems,f=r.cartIsLoading,p=Object(u.a)(),b=p.addErrorNotice,m=p.removeNotice,v=Object(c.useState)(!1),h=a()(v,2),g=h[0],y=h[1],O=Object(c.useRef)(d(n,e));return Object(c.useEffect)((function(){var t=d(n,e);t!==O.current&&(O.current=t)}),[n,e]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:g,cartIsLoading:f,addToCart:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;y(!0),t(e,r).then((function(e){!0===e&&m("add-to-cart")})).catch((function(e){b(Object(i.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){y(!1)}))}}}},298:function(e,t){},299:function(e,t){},308:function(e,t,r){"use strict";r.r(t);var n=r(285),a=(r(3),r(5)),c=r.n(a),o=r(10),s=r.n(o),i=r(0),u=r(1),l=r(39),d=r(89),f=r(138),p=function(e){return e.is_purchasable||!1},b="pristine",m="idle",v="disabled",h="processing",g="before_processing",y="after_processing",O={status:b,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},j="set_pristine",E="set_idle",w="set_disabled",P="set_processing",k="set_before_processing",R="set_after_processing",_="set_processing_response",C="set_has_error",S="set_no_error",A="set_quantity",x="set_request_params",D=j,T=E,I=w,N=P,q=k,V=R,F=_,Q=C,W=S,B=A,L=x,M=function(){return{type:D}},H=function(){return{type:T}},Y=function(){return{type:I}},U=function(){return{type:N}},J=function(){return{type:q}},K=function(){return{type:V}},z=function(e){return{type:F,data:e}},G=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?Q:W;return{type:t}},X=function(e){return{type:B,quantity:e}},$=function(e){return{type:L,data:e}},Z=r(7),ee=r.n(Z);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=j,ae=E,ce=w,oe=P,se=k,ie=R,ue=_,le=C,de=S,fe=A,pe=x,be=b,me=m,ve=v,he=h,ge=g,ye=y,Oe=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,a=r.type,c=r.data;switch(a){case ne:e=O;break;case ae:e=t.status!==me?re(re({},t),{},{status:me}):t;break;case ce:e=t.status!==ve?re(re({},t),{},{status:ve}):t;break;case fe:e=n!==t.quantity?re(re({},t),{},{quantity:n}):t;break;case pe:e=re(re({},t),{},{requestParams:re(re({},t.requestParams),c)});break;case ue:e=re(re({},t),{},{processingResponse:c});break;case oe:e=!1===(e=t.status!==he?re(re({},t),{},{status:he,hasError:!1}):t).hasError?e:re(re({},e),{},{hasError:!1});break;case se:e=t.status!==ge?re(re({},t),{},{status:ge,hasError:!1}):t;break;case ie:e=t.status!==ye?re(re({},t),{},{status:ye}):t;break;case le:e=t.hasError?t:re(re({},t),{},{hasError:!0}),e=t.status===he||t.status===ge?re(re({},e),{},{status:me}):e;break;case de:e=t.hasError?re(re({},t),{},{hasError:!1}):t}return e!==t&&a!==ne&&e.status===be&&(e.status=me),e},je=r(116),Ee=r(204),we="add_to_cart_before_processing",Pe="add_to_cart_after_processing_with_success",ke="add_to_cart_after_processing_with_error",Re=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(Ee.a)(Pe,e),onAddToCartProcessingWithError:Object(Ee.a)(ke,e),onAddToCartBeforeProcessing:Object(Ee.a)(we,e)}},_e=r(205),Ce=r(79),Se=Object(i.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Ae=function(){return Object(i.useContext)(Se)},xe=function(e){var t=e.children,r=e.product,n=e.showFormElements,a=Object(i.useReducer)(Oe,O),c=s()(a,2),o=c[0],b=c[1],j=Object(i.useReducer)(je.b,{}),E=s()(j,2),w=E[0],P=E[1],k=Object(l.a)(w),R=Object(d.a)(),_=R.addErrorNotice,C=R.removeNotices,S=Object(Ce.b)().setValidationErrors,A=Object(f.a)(),x=A.isSuccessResponse,D=A.isErrorResponse,T=A.isFailResponse,I=Object(i.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:Re(P).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Re(P).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Re(P).onAddToCartBeforeProcessing}}),[P]),N=Object(i.useMemo)((function(){return{resetForm:function(){b(M())},submitForm:function(){b(J())},setQuantity:function(e){b(X(e))},setHasError:function(e){b(G(e))},setRequestParams:function(e){b($(e))},setAfterProcessing:function(e){b(z(e)),b(K())}}}),[]);Object(i.useEffect)((function(){var e=o.status,t=!r.id||!p(r);e!==v||t?e!==v&&t&&b(Y()):b(H())}),[o.status,r,b]),Object(i.useEffect)((function(){o.status===g&&(C("error"),Object(_e.a)(k,we,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&_(t),r&&S(r)})),b(H())):b(U())})))}),[o.status,S,_,C,b,k]),Object(i.useEffect)((function(){if(o.status===y){var e={processingResponse:o.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;_(e.message,t)}};if(o.hasError)return void Object(_e.b)(k,ke,e).then((function(r){if(D(r)||T(r))t(r);else{var n,a=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");_(a,{id:"add-to-cart"})}b(H())}));Object(_e.b)(k,Pe,e).then((function(e){D(e)||T(e)?(t(e),b(G(!0))):b(H())}))}}),[o.status,o.hasError,o.processingResponse,N,_,D,T,x,k]);var q=function(e){return["simple","variable"].includes(e.type||"simple")}(r),V={product:r,productType:r.type||"simple",productIsPurchasable:p(r),productHasOptions:r.has_options||!1,supportsFormElements:q,showFormElements:n&&q,quantity:o.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:o.requestParams,isIdle:o.status===m,isDisabled:o.status===v,isProcessing:o.status===h,isBeforeProcessing:o.status===g,isAfterProcessing:o.status===y,hasError:o.hasError,eventRegistration:I,dispatchActions:N};return React.createElement(Se.Provider,{value:V},t)},De=r(51),Te=r.n(De),Ie=r(100),Ne=r(22),qe=r(278);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Fe=function(){var e=Ae(),t=e.dispatchActions,r=e.product,n=e.quantity,a=e.eventRegistration,c=e.hasError,o=e.isProcessing,l=e.requestParams,f=Object(Ce.b)(),p=f.hasValidationErrors,b=f.showAllValidationErrors,m=Object(d.a)(),v=m.addErrorNotice,h=m.removeNotice,g=Object(Ie.a)().receiveCart,y=Object(i.useState)(!1),O=s()(y,2),j=O[0],E=O[1],w=!c&&o,P=Object(i.useCallback)((function(){return!p||(b(),{type:"error"})}),[p,b]);Object(i.useEffect)((function(){var e=a.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[a,P]);var k=Object(i.useCallback)((function(){E(!0),h("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:n},l);Te()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){Te.a.setNonce(e.headers),e.json().then((function(r){e.ok?g(r):(r.body&&r.body.message?v(Object(Ne.decodeEntities)(r.body.message),{id:"add-to-cart"}):v(Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(qe.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&g(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,v,h,g,t,n,l]);return Object(i.useEffect)((function(){w&&!j&&k()}),[w,k,j]),null},Qe=function(e){var t=e.children,r=e.product,n=e.showFormElements;return React.createElement(Ce.a,null,React.createElement(xe,{product:r,showFormElements:n},t,React.createElement(Fe,null)))},We=r(80),Be=r(8),Le=r(199),Me=(r(298),r(85)),He=r(130),Ye=r(279),Ue=r(292),Je=function(e){var t=e.className,r=e.href,n=e.text;return React.createElement(Me.a,{className:t,href:r,rel:"nofollow"},n)},Ke=function(e){var t=e.className,r=e.quantityInCart,n=e.isProcessing,a=e.isDisabled,c=e.isDone,o=e.onClick;return React.createElement(Me.a,{className:t,disabled:a,showSpinner:n,onClick:o},c&&r>0?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(u.__)("Add to cart","woo-gutenberg-products-block"),!!c&&React.createElement(He.a,{srcElement:Ye.a,alt:Object(u.__)("Done","woo-gutenberg-products-block")}))},ze=function(){var e=Ae(),t=e.showFormElements,r=e.productIsPurchasable,n=e.productHasOptions,a=e.product,c=e.productType,o=e.isDisabled,l=e.isProcessing,d=e.eventRegistration,f=e.hasError,p=e.dispatchActions,b=Object(Ue.a)(a.id||0).cartQuantity,m=Object(i.useState)(!1),v=s()(m,2),h=v[0],g=v[1],y=a.add_to_cart||{url:"",text:""};return Object(i.useEffect)((function(){var e=d.onAddToCartAfterProcessingWithSuccess((function(){return f||g(!0),!0}),0);return function(){e()}}),[d,f]),(t||!n&&"simple"===c)&&r?React.createElement(Ke,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:b,isDisabled:o,isProcessing:l,isDone:h,onClick:function(){return p.submitForm()}}):React.createElement(Je,{className:"wc-block-components-product-add-to-cart-button",href:y.url,text:y.text||Object(u.__)("View Product","woo-gutenberg-products-block")})},Ge=function(e){var t=e.disabled,r=e.min,n=e.max,a=e.value,c=e.onChange;return React.createElement("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:function(e){c(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(u.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return React.createElement("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Ae(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement(Xe,null):t.id&&!t.is_in_stock?React.createElement(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(Ge,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(ze,null))},Ze=(r(299),r(47)),et=r.n(Ze),tt=r(203),rt=r(2),nt=r(182),at={value:"",label:Object(u.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,n=void 0===r?[]:r,a=e.value,o=void 0===a?"":a,s=e.onChange,i=void 0===s?function(){}:s,l=e.errorMessage,d=void 0===l?Object(u.__)("Please select a value.","woo-gutenberg-products-block"):l,f=Object(Ce.b)(),p=f.getValidationError,b=f.setValidationErrors,m=f.clearValidationError,v=t,h=p(v)||{};return Object(rt.useEffect)((function(){o?m(v):b(ee()({},v,{message:d,hidden:!0}))}),[o,v,d,m,b]),Object(rt.useEffect)((function(){return function(){m(v)}}),[v,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},React.createElement(tt.SelectControl,{label:Object(Ne.decodeEntities)(t),value:o||"",options:[at].concat(et()(n)),onChange:i,required:!0,className:c()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":h.message&&!h.hidden})}),React.createElement(nt.a,{propertyName:v,elementId:v}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function st(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var it=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var a=Object.keys(e);return n.filter((function(e){return a.every((function(n){var a=r[n]||"",c=t["id:"+e].attributes[n];return""===a||(null===c||c===a)}))}))},ut=function(e,t,r){var n={},a=Object.keys(e),c=Object.values(r).filter(Boolean).length>0;return a.forEach((function(a){var o=e[a],s=st(st({},r),{},ee()({},a,null)),i=c?it(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[a]})):null;n[a]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Ne.decodeEntities)(r)}:null})).filter(Boolean)}(o.terms,u)})),n};function lt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(r),!0).forEach((function(t){ee()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ft=function(e){var t=e.attributes,r=e.variationAttributes,n=e.setRequestParams,a=Object(l.a)(t),c=Object(l.a)(r),o=Object(i.useState)(0),u=s()(o,2),d=u[0],f=u[1],p=Object(i.useState)({}),b=s()(p,2),m=b[0],v=b[1],h=Object(i.useMemo)((function(){return ut(a,c,m)}),[m,a,c]);return Object(i.useEffect)((function(){Object.values(m).filter((function(e){return""!==e})).length===Object.keys(a).length?f(function(e,t,r){return it(e,t,r)[0]||0}(a,c,m)):d>0&&f(0)}),[m,d,a,c]),Object(i.useEffect)((function(){n({id:d,variation:Object.keys(m).map((function(e){return{attribute:e,value:m[e]}}))})}),[n,d,m]),React.createElement("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map((function(e){return React.createElement(ct,{key:e,attributeName:e,options:h[e],value:m[e],onChange:function(t){v(dt(dt({},m),{},ee()({},e,t)))}})})))},pt=function(e){var t=e.product,r=e.dispatchers,n=function(e){return e?Object(Be.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),a=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(n).length||0===a.length?null:React.createElement(ft,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},bt=function(){var e=Ae(),t=e.product,r=e.quantity,n=e.minQuantity,a=e.maxQuantity,c=e.dispatchActions,o=e.isDisabled;return t.id&&!t.is_purchasable?React.createElement(Xe,null):t.id&&!t.is_in_stock?React.createElement(Xe,{reason:Object(u.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):React.createElement(React.Fragment,null,React.createElement(pt,{product:t,dispatchers:c}),React.createElement(Ge,{value:r,min:n,max:a,disabled:o,onChange:c.setQuantity}),React.createElement(ze,null))},mt=function(){return React.createElement(ze,null)},vt=function(){return React.createElement(tt.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},ht=function(){return React.createElement(vt,null)},gt=function(){var e=Ae(),t=e.showFormElements,r=e.productType;return t?"variable"===r?React.createElement(bt,null):"grouped"===r?React.createElement(ht,null):"external"===r?React.createElement(mt,null):"simple"===r||"variation"===r?React.createElement($e,null):null:React.createElement(ze,null)},yt=Object(Le.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,n=Object(We.useProductDataContext)().product,a=c()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Be.isEmpty)(n)});return React.createElement(Qe,{product:n,showFormElements:r},React.createElement("div",{className:a},React.createElement(gt,null)))})),Ot={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}};t.default=Object(n.a)(Ot)(yt)},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),a=r(21),c=r.n(a),o=function(e){var t=Object(n.useRef)();return c()(e,t.current)||(t.current=e),t.current}},47:function(e,t,r){var n=r(95),a=r(96),c=r(59),o=r(97);e.exports=function(e){return n(e)||a(e)||c(e)||o()}},48:function(e,t){function r(e,t,r,n,a,c,o){try{var s=e[c](o),i=s.value}catch(e){return void r(e)}s.done?t(i):Promise.resolve(i).then(n,a)}e.exports=function(e){return function(){var t=this,n=arguments;return new Promise((function(a,c){var o=e.apply(t,n);function s(e){r(o,a,c,s,i,"next",e)}function i(e){r(o,a,c,s,i,"throw",e)}s(void 0)}))}}},79:function(e,t,r){"use strict";r.d(t,"b",(function(){return y})),r.d(t,"a",(function(){return O}));var n=r(28),a=r.n(n),c=r(7),o=r.n(c),s=r(14),i=r.n(s),u=r(10),l=r.n(u),d=r(0),f=r(8),p=r(21),b=r.n(p);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function h(e){var t=function(e,t){if("object"!==a()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==a()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a()(t)?t:String(t)}var g=Object(d.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),y=function(){return Object(d.useContext)(g)},O=function(e){var t=e.children,r=Object(d.useState)({}),n=l()(r,2),a=n[0],c=n[1],s=Object(d.useCallback)((function(e){return a[e]}),[a]),u=Object(d.useCallback)((function(e){var t=a[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[a]),p=Object(d.useCallback)((function(e){c((function(t){if(!t[e])return t;t[e];return i()(t,[e].map(h))}))}),[]),m=Object(d.useCallback)((function(){c({})}),[]),y=Object(d.useCallback)((function(e){e&&c((function(t){return e=Object(f.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!b()(t[r],e))})),0===Object.values(e).length?t:v(v({},t),e)}))}),[]),O=Object(d.useCallback)((function(e,t){c((function(r){if(!r.hasOwnProperty(e))return r;var n=v(v({},r[e]),t);return b()(r[e],n)?r:v(v({},r),{},o()({},e,n))}))}),[]),j={getValidationError:s,setValidationErrors:y,clearValidationError:p,clearAllValidationErrors:m,hideValidationError:Object(d.useCallback)((function(e){O(e,{hidden:!0})}),[O]),showValidationError:Object(d.useCallback)((function(e){O(e,{hidden:!1})}),[O]),showAllValidationErrors:Object(d.useCallback)((function(){c((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=v(v({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:v(v({},e),t)}))}),[]),hasValidationErrors:Object.keys(a).length>0,getValidationErrorId:u};return React.createElement(g.Provider,{value:j},t)}},85:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(14),o=r.n(c),s=r(68),i=(r(3),r(5)),u=r.n(i);r(156);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,c=e.children,i=o()(e,["className","showSpinner","children"]),l=u()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return React.createElement(s.a,a()({className:l},i),n&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},95:function(e,t,r){var n=r(60);e.exports=function(e){if(Array.isArray(e))return n(e)}},96:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},97:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}}}]);
|
build/atomic-block-components/add-to-cart.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{143:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return b}));var n=r(5),c=r.n(n),o=r(7);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var i="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:i,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},b=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,b=new Map(e[n]);switch(r){case i:return b.set(o,{priority:l,callback:a}),s(s({},e),{},c()({},n,b));case u:return b.delete(o),s(s({},e),{},c()({},n,b))}return e}},208:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},s=function(e){return n(e,c.ERROR)},i=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:s,isFailResponse:i}}},217:function(e,t){},218:function(e,t){},280:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(88),o=(r(2),r(218),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,s=e.elementId,i=void 0===s?"":s,u=Object(c.b)(),l=u.getValidationError,b=u.getValidationErrorId;if(!r){var f=l(a)||{};if(!f.message||f.hidden)return null;r=f.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:b(i)},r))})},376:function(e,t){},381:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(143),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},382:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return d}));var n=r(13),c=r.n(n),o=r(46),a=r.n(o),s=r(27),i=r.n(s);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},f=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=[],i=u(o),e.prev=3,i.s();case 5:if((l=i.n()).done){e.next=19;break}return f=l.value,e.prev=7,e.next=10,Promise.resolve(f.callback(n));case 10:d=e.sent,"object"===a()(d)&&s.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),i.e(e.t1);case 24:return e.prev=24,i.f(),e.finish(24);case 27:return e.abrupt("return",!s.length||s);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),d=function(){var e=i()(c.a.mark((function e(t,r,n){var o,s,i,l,f;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=b(t,r),s=u(o),e.prev=2,s.s();case 4:if((i=s.n()).done){e.next=23;break}return l=i.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(f=e.sent,"object"===a()(f)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==f.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",f);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),s.e(e.t1);case 28:return e.prev=28,s.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},383:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},384:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(8)),o=r.n(c),a=r(18),s=r.n(a),i=r(1),u=r(53),l=r(134),b=r(208),f=r(916),d="pristine",p="idle",O="disabled",m="processing",v="before_processing",j="after_processing",h={status:d,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},y="set_pristine",g="set_idle",E="set_disabled",w="set_processing",P="set_before_processing",k="set_after_processing",_="set_processing_response",C="set_has_error",A="set_no_error",S="set_quantity",x="set_request_params",D=y,q=g,N=E,R=w,T=P,V=k,F=_,I=C,B=A,Q=S,M=x,W=function(){return{type:D}},H=function(){return{type:q}},L=function(){return{type:N}},U=function(){return{type:R}},z=function(){return{type:T}},G=function(){return{type:V}},J=function(e){return{type:F,data:e}},Y=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:B;return{type:t}},X=function(e){return{type:Q,quantity:e}},$=function(e){return{type:M,data:e}},K=r(5),Z=r.n(K);function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var re=y,ne=g,ce=E,oe=w,ae=P,se=k,ie=_,ue=C,le=A,be=S,fe=x,de=d,pe=p,Oe=O,me=m,ve=v,je=j,he=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h,r=arguments.length>1?arguments[1]:void 0,n=r.quantity,c=r.type,o=r.data;switch(c){case re:e=h;break;case ne:e=t.status!==pe?te(te({},t),{},{status:pe}):t;break;case ce:e=t.status!==Oe?te(te({},t),{},{status:Oe}):t;break;case be:e=n!==t.quantity?te(te({},t),{},{quantity:n}):t;break;case fe:e=te(te({},t),{},{requestParams:te(te({},t.requestParams),o)});break;case ie:e=te(te({},t),{},{processingResponse:o});break;case oe:e=!1===(e=t.status!==me?te(te({},t),{},{status:me,hasError:!1}):t).hasError?e:te(te({},e),{},{hasError:!1});break;case ae:e=t.status!==ve?te(te({},t),{},{status:ve,hasError:!1}):t;break;case se:e=t.status!==je?te(te({},t),{},{status:je}):t;break;case ue:e=t.hasError?t:te(te({},t),{},{hasError:!0}),e=t.status===me||t.status===ve?te(te({},e),{},{status:pe}):e;break;case le:e=t.hasError?te(te({},t),{},{hasError:!1}):t}return e!==t&&c!==re&&e.status===de&&(e.status=pe),e},ye=r(143),ge=r(381),Ee="add_to_cart_before_processing",we="add_to_cart_after_processing_with_success",Pe="add_to_cart_after_processing_with_error",ke=function(e){return{onAddToCartAfterProcessingWithSuccess:Object(ge.a)(we,e),onAddToCartProcessingWithError:Object(ge.a)(Pe,e),onAddToCartBeforeProcessing:Object(ge.a)(Ee,e)}},_e=r(382),Ce=r(88),Ae=Object(n.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:function(e){},onAddToCartAfterProcessingWithError:function(e){},onAddToCartBeforeProcessing:function(e){}},dispatchActions:{resetForm:function(){},submitForm:function(){},setQuantity:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},setRequestParams:function(e){}}}),Se=function(){return Object(n.useContext)(Ae)},xe=function(e){var t=e.children,r=e.product,c=e.showFormElements,o=Object(n.useReducer)(he,h),a=s()(o,2),d=a[0],y=a[1],g=Object(n.useReducer)(ye.b,{}),E=s()(g,2),w=E[0],P=E[1],k=Object(u.a)(w),_=Object(l.a)(),C=_.addErrorNotice,A=_.removeNotices,S=Object(Ce.b)().setValidationErrors,x=Object(b.a)(),D=x.isSuccessResponse,q=x.isErrorResponse,N=x.isFailResponse,R=Object(n.useMemo)((function(){return{onAddToCartAfterProcessingWithSuccess:ke(P).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:ke(P).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:ke(P).onAddToCartBeforeProcessing}}),[P]),T=Object(n.useMemo)((function(){return{resetForm:function(){y(W())},submitForm:function(){y(z())},setQuantity:function(e){y(X(e))},setHasError:function(e){y(Y(e))},setRequestParams:function(e){y($(e))},setAfterProcessing:function(e){y(J(e)),y(G())}}}),[]);Object(n.useEffect)((function(){var e=d.status,t=!r.id||!Object(f.a)(r);e!==O||t?e!==O&&t&&y(L()):y(H())}),[d.status,r,y]),Object(n.useEffect)((function(){d.status===v&&(A("error"),Object(_e.a)(k,Ee,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;t&&C(t),r&&S(r)})),y(H())):y(U())})))}),[d.status,S,C,A,y,k]),Object(n.useEffect)((function(){if(d.status===j){var e={processingResponse:d.processingResponse},t=function(e){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;C(e.message,t)}};if(d.hasError)return void Object(_e.b)(k,Pe,e).then((function(r){if(q(r)||N(r))t(r);else{var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");C(c,{id:"add-to-cart"})}y(H())}));Object(_e.b)(k,we,e).then((function(e){q(e)||N(e)?(t(e),y(Y(!0))):y(H())}))}}),[d.status,d.hasError,d.processingResponse,T,C,q,N,D,k]);var V=Object(f.b)(r),F={product:r,productType:r.type||"simple",productIsPurchasable:Object(f.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:V,showFormElements:c&&V,quantity:d.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:d.requestParams,isIdle:d.status===p,isDisabled:d.status===O,isProcessing:d.status===m,isBeforeProcessing:d.status===v,isAfterProcessing:d.status===j,hasError:d.hasError,eventRegistration:R,dispatchActions:T};return Object(n.createElement)(Ae.Provider,{value:F},t)},De=r(19),qe=r.n(De),Ne=r(145),Re=r(28),Te=r(523);function Ve(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Fe=function(){var e=Se(),t=e.dispatchActions,r=e.product,c=e.quantity,o=e.eventRegistration,a=e.hasError,u=e.isProcessing,b=e.requestParams,f=Object(Ce.b)(),d=f.hasValidationErrors,p=f.showAllValidationErrors,O=Object(l.a)(),m=O.addErrorNotice,v=O.removeNotice,j=Object(Ne.a)().receiveCart,h=Object(n.useState)(!1),y=s()(h,2),g=y[0],E=y[1],w=!a&&u,P=Object(n.useCallback)((function(){return!d||(p(),{type:"error"})}),[d,p]);Object(n.useEffect)((function(){var e=o.onAddToCartBeforeProcessing(P,0);return function(){e()}}),[o,P]);var k=Object(n.useCallback)((function(){E(!0),v("add-to-cart");var e=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ve(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({id:r.id||0,quantity:c},b);qe()({path:"/wc/store/cart/add-item",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){qe.a.setNonce(e.headers),e.json().then((function(r){e.ok?j(r):(r.body&&r.body.message?m(Object(Re.decodeEntities)(r.body.message),{id:"add-to-cart"}):m(Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),t.setHasError()),t.setAfterProcessing(r),E(!1),Object(Te.c)()}))})).catch((function(e){e.json().then((function(e){var r;null!==(r=e.data)&&void 0!==r&&r.cart&&j(e.data.cart),t.setHasError(),t.setAfterProcessing(e),E(!1)}))}))}),[r,m,v,j,t,c,b]);return Object(n.useEffect)((function(){w&&!g&&k()}),[w,k,g]),null},Ie=function(e){var t=e.children,r=e.product,c=e.showFormElements;return Object(n.createElement)(Ce.a,null,Object(n.createElement)(xe,{product:r,showFormElements:c},t,Object(n.createElement)(Fe,null)))},Be=r(39),Qe=r(7),Me=r(66),We=(r(376),r(94)),He=r(55),Le=r(549),Ue=r(837),ze=function(e){var t=e.className,r=e.href,c=e.text;return Object(n.createElement)(We.a,{className:t,href:r,rel:"nofollow"},c)},Ge=function(e){var t=e.className,r=e.quantityInCart,c=e.isProcessing,o=e.isDisabled,a=e.isDone,s=e.onClick;return Object(n.createElement)(We.a,{className:t,disabled:o,showSpinner:c,onClick:s},a&&r>0?Object(i.sprintf)(Object(i._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(i.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(n.createElement)(He.a,{srcElement:Le.a,alt:Object(i.__)("Done","woo-gutenberg-products-block")}))},Je=function(){var e=Se(),t=e.showFormElements,r=e.productIsPurchasable,c=e.productHasOptions,o=e.product,a=e.productType,u=e.isDisabled,l=e.isProcessing,b=e.eventRegistration,f=e.hasError,d=e.dispatchActions,p=Object(Ue.a)(o.id||0).cartQuantity,O=Object(n.useState)(!1),m=s()(O,2),v=m[0],j=m[1],h=o.add_to_cart||{url:"",text:""};return Object(n.useEffect)((function(){var e=b.onAddToCartAfterProcessingWithSuccess((function(){return f||j(!0),!0}),0);return function(){e()}}),[b,f]),(t||!c&&"simple"===a)&&r?Object(n.createElement)(Ge,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:u,isProcessing:l,isDone:v,onClick:function(){return d.submitForm()}}):Object(n.createElement)(ze,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(i.__)("View Product","woo-gutenberg-products-block")})},Ye=function(e){var t=e.disabled,r=e.min,c=e.max,o=e.value,a=e.onChange;return Object(n.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:o,min:r,max:c,hidden:1===c,disabled:t,onChange:function(e){a(e.target.value)}})},Xe=function(e){var t=e.reason,r=void 0===t?Object(i.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block"):t;return Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},r)},$e=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Ye,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Je,null))},Ke=(r(548),r(30)),Ze=r.n(Ke),et=r(4),tt=r(9),rt=r(280),nt={value:"",label:Object(i.__)("Select an option","woo-gutenberg-products-block")},ct=function(e){var t=e.attributeName,r=e.options,c=void 0===r?[]:r,a=e.value,s=void 0===a?"":a,u=e.onChange,l=void 0===u?function(){}:u,b=e.errorMessage,f=void 0===b?Object(i.__)("Please select a value.","woo-gutenberg-products-block"):b,d=Object(Ce.b)(),p=d.getValidationError,O=d.setValidationErrors,m=d.clearValidationError,v=t,j=p(v)||{};return Object(tt.useEffect)((function(){s?m(v):O(Z()({},v,{message:f,hidden:!0}))}),[s,v,f,m,O]),Object(tt.useEffect)((function(){return function(){m(v)}}),[v,m]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(n.createElement)(et.SelectControl,{label:Object(Re.decodeEntities)(t),value:s||"",options:[nt].concat(Ze()(c)),onChange:l,required:!0,className:o()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":j.message&&!j.hidden})}),Object(n.createElement)(rt.a,{propertyName:v,elementId:v}))};function ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var st=function(e,t,r){var n=Object.values(t).map((function(e){return e.id}));if(Object.values(r).every((function(e){return""===e})))return n;var c=Object.keys(e);return n.filter((function(e){return c.every((function(n){var c=r[n]||"",o=t["id:"+e].attributes[n];return""===c||(null===o||o===c)}))}))},it=function(e,t,r){var n={},c=Object.keys(e),o=Object.values(r).filter(Boolean).length>0;return c.forEach((function(c){var a=e[c],s=at(at({},r),{},Z()({},c,null)),i=o?st(e,t,s):null,u=null!==i?i.map((function(e){return t["id:"+e].attributes[c]})):null;n[c]=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map((function(e){var r=e.name,n=e.slug;return null===t||t.includes(null)||t.includes(n)?{value:n,label:Object(Re.decodeEntities)(r)}:null})).filter(Boolean)}(a.terms,u)})),n};function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(r),!0).forEach((function(t){Z()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var bt=function(e){var t=e.attributes,r=e.variationAttributes,c=e.setRequestParams,o=Object(u.a)(t),a=Object(u.a)(r),i=Object(n.useState)(0),l=s()(i,2),b=l[0],f=l[1],d=Object(n.useState)({}),p=s()(d,2),O=p[0],m=p[1],v=Object(n.useMemo)((function(){return it(o,a,O)}),[O,o,a]);return Object(n.useEffect)((function(){Object.values(O).filter((function(e){return""!==e})).length===Object.keys(o).length?f(function(e,t,r){return st(e,t,r)[0]||0}(o,a,O)):b>0&&f(0)}),[O,b,o,a]),Object(n.useEffect)((function(){c({id:b,variation:Object.keys(O).map((function(e){return{attribute:e,value:O[e]}}))})}),[c,b,O]),Object(n.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(o).map((function(e){return Object(n.createElement)(ct,{key:e,attributeName:e,options:v[e],value:O[e],onChange:function(t){m(lt(lt({},O),{},Z()({},e,t)))}})})))},ft=function(e){var t=e.product,r=e.dispatchers,c=function(e){return e?Object(Qe.keyBy)(Object.values(e).filter((function(e){return e.has_variations})),"name"):{}}(t.attributes),o=function(e){if(!e)return{};var t={};return e.forEach((function(e){var r=e.id,n=e.attributes;t["id:".concat(r)]={id:r,attributes:n.reduce((function(e,t){var r=t.name,n=t.value;return e[r]=n,e}),{})}})),t}(t.variations);return 0===Object.keys(c).length||0===o.length?null:Object(n.createElement)(bt,{attributes:c,variationAttributes:o,setRequestParams:r.setRequestParams})},dt=function(){var e=Se(),t=e.product,r=e.quantity,c=e.minQuantity,o=e.maxQuantity,a=e.dispatchActions,s=e.isDisabled;return t.id&&!t.is_purchasable?Object(n.createElement)(Xe,null):t.id&&!t.is_in_stock?Object(n.createElement)(Xe,{reason:Object(i.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ft,{product:t,dispatchers:a}),Object(n.createElement)(Ye,{value:r,min:c,max:o,disabled:s,onChange:a.setQuantity}),Object(n.createElement)(Je,null))},pt=function(){return Object(n.createElement)(Je,null)},Ot=function(){return Object(n.createElement)(et.Placeholder,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element.")},mt=function(){return Object(n.createElement)(Ot,null)},vt=function(){var e=Se(),t=e.showFormElements,r=e.productType;return t?"variable"===r?Object(n.createElement)(dt,null):"grouped"===r?Object(n.createElement)(mt,null):"external"===r?Object(n.createElement)(pt,null):"simple"===r||"variation"===r?Object(n.createElement)($e,null):null:Object(n.createElement)(Je,null)};t.a=Object(Me.withProductDataContext)((function(e){var t=e.className,r=e.showFormElements,c=Object(Be.useProductDataContext)().product,a=o()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(Qe.isEmpty)(c)});return Object(n.createElement)(Ie,{product:c,showFormElements:r},Object(n.createElement)("div",{className:a},Object(n.createElement)(vt,null)))}))},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(33),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},548:function(e,t){},549:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=o},88:function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return y}));var n=r(46),c=r.n(n),o=r(5),a=r.n(o),s=r(24),i=r.n(s),u=r(18),l=r.n(u),b=r(0),f=r(7),d=r(33),p=r.n(d);function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?O(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function v(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var j=Object(b.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),h=function(){return Object(b.useContext)(j)},y=function(e){var t=e.children,r=Object(b.useState)({}),n=l()(r,2),c=n[0],o=n[1],s=Object(b.useCallback)((function(e){return c[e]}),[c]),u=Object(b.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),d=Object(b.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return i()(t,[e].map(v))}))}),[]),O=Object(b.useCallback)((function(){o({})}),[]),h=Object(b.useCallback)((function(e){e&&o((function(t){return e=Object(f.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!p()(t[r],e))})),0===Object.values(e).length?t:m(m({},t),e)}))}),[]),y=Object(b.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=m(m({},r[e]),t);return p()(r[e],n)?r:m(m({},r),{},a()({},e,n))}))}),[]),g={getValidationError:s,setValidationErrors:h,clearValidationError:d,clearAllValidationErrors:O,hideValidationError:Object(b.useCallback)((function(e){y(e,{hidden:!0})}),[y]),showValidationError:Object(b.useCallback)((function(e){y(e,{hidden:!1})}),[y]),showAllValidationErrors:Object(b.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=m(m({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:m(m({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(b.createElement)(j.Provider,{value:g},t)}},916:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.is_purchasable||!1},c=function(e){return["simple","variable"].includes(e.type||"simple")}},935:function(e,t,r){"use strict";r.r(t);var n=r(932),c=r(384),o=r(383);t.default=Object(n.a)(o.a)(c.a)},94:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),s=r(0),i=r(212),u=(r(2),r(8)),l=r.n(u);r(217);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),b=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(s.createElement)(i.a,c()({className:b},u),n&&Object(s.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(s.createElement)("span",{className:"wc-block-components-button__text"},o))}}}]);
|
build/atomic-block-components/button-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{100:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(7),c=n.n(r),a=n(15),i=n(12),o=n(77),s=n(22),u=n(8);function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function p(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?d(Object(n),!0).forEach((function(e){c()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},b=p(p({},l),{},{email:"",phone:""}),f=function(t){return Object(u.mapValues)(t,(function(t){return Object(s.decodeEntities)(t)}))},m={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:b,shippingAddress:l,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){},extensions:{}},g=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},e=Object(o.a)(),n=e.isEditor,r=e.previewData,c=(null==r?void 0:r.previewCart)||{},s=t.shouldSelect,u=Object(i.useSelect)((function(t,e){var r=e.dispatch;if(!s)return m;if(n)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:b,shippingAddress:l,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var i=t(a.CART_STORE_KEY),o=i.getCartData(),u=i.getCartErrors(),d=i.getCartTotals(),p=!i.hasFinishedResolution("getCartData"),g=i.isCustomerDataUpdating(),h=r(a.CART_STORE_KEY).receiveCart,v=f(o.billingAddress),_=o.needsShipping?f(o.shippingAddress):v,O=o.fees.map((function(t){return f(t)}));return{cartCoupons:o.coupons,cartItems:o.items||[],cartFees:O,cartItemsCount:o.itemsCount,cartItemsWeight:o.itemsWeight,cartNeedsPayment:o.needsPayment,cartNeedsShipping:o.needsShipping,cartItemErrors:o.errors||[],cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:v,shippingAddress:_,extensions:o.extensions||{},shippingRates:o.shippingRates||[],shippingRatesLoading:g,cartHasCalculatedShipping:o.hasCalculatedShipping,paymentRequirements:o.paymentRequirements||[],receiveCart:h}}),[s]);return u}},278:function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return i}));var r=window.Event||null,c=function(t,e){var n=e.bubbles,c=void 0!==n&&n,a=e.cancelable,i=void 0!==a&&a,o=e.element;if(o||(o=document.body),"function"==typeof r){var s=new r(t,{bubbles:c,cancelable:i});o.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(t,c,i),o.dispatchEvent(u)}},a=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},i=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var a=function(){c(e,{bubbles:n,cancelable:r})};return jQuery(document).on(t,a),function(){return jQuery(document).off(t,a)}}},291:function(t,e){},292:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(10),c=n.n(r),a=n(0),i=n(12),o=n(15),s=n(22),u=n(89),d=n(100),p=function(t,e){var n=t.find((function(t){return t.id===e}));return n?n.quantity:0},l=function(t){var e=Object(i.useDispatch)(o.CART_STORE_KEY).addItemToCart,n=Object(d.a)(),r=n.cartItems,l=n.cartIsLoading,b=Object(u.a)(),f=b.addErrorNotice,m=b.removeNotice,g=Object(a.useState)(!1),h=c()(g,2),v=h[0],_=h[1],O=Object(a.useRef)(p(r,t));return Object(a.useEffect)((function(){var e=p(r,t);e!==O.current&&(O.current=e)}),[r,t]),{cartQuantity:Number.isFinite(O.current)?O.current:0,addingToCart:v,cartIsLoading:l,addToCart:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;_(!0),e(t,n).then((function(t){!0===t&&m("add-to-cart")})).catch((function(t){f(Object(s.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})})).finally((function(){_(!1)}))}}}},302:function(t,e,n){"use strict";n.r(e);var r=n(11),c=n.n(r),a=n(7),i=n.n(a),o=(n(3),n(5)),s=n.n(o),u=n(1),d=n(0),p=n(292),l=n(22),b=n(278),f=n(80),m=n(199),g=(n(291),function(t){var e=t.product,n=Object(d.useRef)(!0),r=e.id,a=e.permalink,i=e.add_to_cart,o=e.has_options,f=e.is_purchasable,m=e.is_in_stock,g=Object(p.a)(r),h=g.cartQuantity,v=g.addingToCart,_=g.addToCart;Object(d.useEffect)((function(){n.current?n.current=!1:Object(b.c)()}),[h]);var O=Number.isFinite(h)&&h>0,j=!o&&f&&m,y=Object(l.decodeEntities)((null==i?void 0:i.description)||""),C=O?Object(u.sprintf)(Object(u._n)("%d in cart","%d in cart",h,"woo-gutenberg-products-block"),h):Object(l.decodeEntities)((null==i?void 0:i.text)||Object(u.__)("Add to cart","woo-gutenberg-products-block")),E=j?"button":"a",w={};return j?w.onClick=function(){_()}:(w.href=a,w.rel="nofollow"),React.createElement(E,c()({"aria-label":y,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:v,added:O}),disabled:v},w),C)}),h=function(){return React.createElement("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};e.default=Object(m.withProductDataContext)((function(t){var e=t.className,n=Object(f.useInnerBlockLayoutContext)().parentClassName,r=Object(f.useProductDataContext)().product;return React.createElement("div",{className:s()(e,"wp-block-button","wc-block-components-product-button",i()({},"".concat(n,"__product-add-to-cart"),n))},r.id?React.createElement(g,{product:r}):React.createElement(h,null))}))}}]);
|
build/atomic-block-components/button.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{522:function(t,c,e){"use strict";e.r(c);var o=e(11),n=e.n(o),a=e(5),r=e.n(a),u=e(0),d=(e(2),e(8)),b=e.n(d),l=e(1),i=e(837),s=e(28),p=e(523),_=e(39),k=e(66),j=(e(542),function(t){var c=t.product,e=Object(u.useRef)(!0),o=c.id,a=c.permalink,r=c.add_to_cart,d=c.has_options,_=c.is_purchasable,k=c.is_in_stock,j=Object(i.a)(o),w=j.cartQuantity,O=j.addingToCart,m=j.addToCart;Object(u.useEffect)((function(){e.current?e.current=!1:Object(p.c)()}),[w]);var f=Number.isFinite(w)&&w>0,E=!d&&_&&k,v=Object(s.decodeEntities)((null==r?void 0:r.description)||""),C=f?Object(l.sprintf)(Object(l._n)("%d in cart","%d in cart",w,"woo-gutenberg-products-block"),w):Object(s.decodeEntities)((null==r?void 0:r.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),g=E?"button":"a",h={};return E?h.onClick=function(){m()}:(h.href=a,h.rel="nofollow"),Object(u.createElement)(g,n()({"aria-label":v,className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:O,added:f}),disabled:O},h),C)}),w=function(){return Object(u.createElement)("button",{className:b()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0})};c.default=Object(k.withProductDataContext)((function(t){var c=t.className,e=Object(_.useInnerBlockLayoutContext)().parentClassName,o=Object(_.useProductDataContext)().product;return Object(u.createElement)("div",{className:b()(c,"wp-block-button","wc-block-components-product-button",r()({},"".concat(e,"__product-add-to-cart"),e))},o.id?Object(u.createElement)(j,{product:o}):Object(u.createElement)(w,null))}))},542:function(t,c){}}]);
|
build/atomic-block-components/category-list-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[4],{295:function(e,t){},305:function(e,t,c){"use strict";c.r(t);var a=c(7),n=c.n(a),o=c(1),r=(c(3),c(5)),s=c.n(r),l=c(80),u=c(8),i=c(199);c(295);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,c=Object(l.useInnerBlockLayoutContext)().parentClassName,a=Object(l.useProductDataContext)().product;return Object(u.isEmpty)(a.categories)?null:React.createElement("div",{className:s()(t,"wc-block-components-product-category-list",n()({},"".concat(c,"__product-category-list"),c))},Object(o.__)("Categories:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(a.categories).map((function(e){var t=e.name,c=e.link,a=e.slug;return React.createElement("li",{key:"category-list-item-".concat(a)},React.createElement("a",{href:c},t))}))))}))}}]);
|
build/atomic-block-components/category-list.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{526:function(e,t,c){"use strict";c.r(t);var n=c(5),o=c.n(n),a=c(0),r=c(1),s=(c(2),c(8)),l=c.n(s),u=c(39),i=c(7),b=c(66);c(545);t.default=Object(b.withProductDataContext)((function(e){var t=e.className,c=Object(u.useInnerBlockLayoutContext)().parentClassName,n=Object(u.useProductDataContext)().product;return Object(i.isEmpty)(n.categories)?null:Object(a.createElement)("div",{className:l()(t,"wc-block-components-product-category-list",o()({},"".concat(c,"__product-category-list"),c))},Object(r.__)("Categories:","woo-gutenberg-products-block")," ",Object(a.createElement)("ul",null,Object.values(n.categories).map((function(e){var t=e.name,c=e.link,n=e.slug;return Object(a.createElement)("li",{key:"category-list-item-".concat(n)},Object(a.createElement)("a",{href:c},t))}))))}))},545:function(e,t){}}]);
|
build/atomic-block-components/image-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[5,8],{190:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var n=function(e,t){var r=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default})),r}},285:function(e,t,r){"use strict";var n=r(11),a=r.n(n),c=r(190);t.a=function(e){return function(t){return function(r){var n=Object(c.a)(e,r);return React.createElement(t,a()({},r,n))}}}},286:function(e,t){},287:function(e,t,r){"use strict";r.r(t);var n=r(7),a=r.n(n),c=(r(3),r(1)),o=r(5),l=r.n(o),s=r(38),u=r(80),i=r(199);r(286);t.default=Object(i.withProductDataContext)((function(e){var t=e.className,r=e.align,n=Object(u.useInnerBlockLayoutContext)().parentClassName,o=Object(u.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var i="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:l()("wc-block-components-product-sale-badge",t,i,a()({},"".concat(n,"__product-onsale"),n))},React.createElement(s.a,{label:Object(c.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Product on sale","woo-gutenberg-products-block")}))}))},288:function(e,t){},310:function(e,t,r){"use strict";r.r(t);var n=r(285),a=r(11),c=r.n(a),o=r(7),l=r.n(o),s=r(10),u=r.n(s),i=(r(3),r(0)),p=r(1),d=r(5),b=r.n(d),f=r(9),m=r(80),g=r(199),O=r(287);r(288);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){l()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var y=function(){return React.createElement("img",{src:f.r,alt:"",width:500,height:500})},v=function(e){var t=e.image,r=e.onLoad,n=e.loaded,a=e.showFullSize,o=e.fallbackAlt,l=t||{},s=l.thumbnail,u=l.src,i=l.srcset,p=l.sizes,d=w({alt:l.alt||o,onLoad:r,hidden:!n,src:s},a&&{src:u,srcSet:i,sizes:p});return React.createElement(React.Fragment,null,d.src&&React.createElement("img",c()({"data-testid":"product-image"},d)),!n&&React.createElement(y,null))},h=Object(g.withProductDataContext)((function(e){var t=e.className,r=e.imageSizing,n=void 0===r?"full-size":r,a=e.productLink,c=void 0===a||a,o=e.showSaleBadge,s=e.saleBadgeAlign,d=void 0===s?"right":s,f=Object(m.useInnerBlockLayoutContext)().parentClassName,g=Object(m.useProductDataContext)().product,j=Object(i.useState)(!1),h=u()(j,2),k=h[0],E=h[1];if(!g.id)return React.createElement("div",{className:b()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",l()({},"".concat(f,"__product-image"),f))},React.createElement(y,null));var P=!!g.images.length,R=P?g.images[0]:null,S=c?"a":i.Fragment,_=Object(p.sprintf)(Object(p.__)("Link to %s","woo-gutenberg-products-block"),g.name),D=w({href:g.permalink,rel:"nofollow"},!P&&{"aria-label":_});return React.createElement("div",{className:b()(t,"wc-block-components-product-image",l()({},"".concat(f,"__product-image"),f))},React.createElement(S,c&&D,!!o&&React.createElement(O.default,{align:d,product:g}),React.createElement(v,{fallbackAlt:g.name,image:R,onLoad:function(){return E(!0)},loaded:k,showFullSize:"cropped"!==n})))})),k={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}};t.default=Object(n.a)(k)(h)},38:function(e,t,r){"use strict";var n=r(7),a=r.n(n),c=(r(3),r(2)),o=r(5),l=r.n(o);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,a=e.wrapperElement,o=e.wrapperProps,s=void 0===o?{}:o,i=null!=r,p=null!=n;return!i&&p?(t=a||"span",s=u(u({},s),{},{className:l()(s.className,"screen-reader-text")}),React.createElement(t,s,n)):(t=a||c.Fragment,i&&p&&r!==n?React.createElement(t,s,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,s,r))}}}]);
|
build/atomic-block-components/image.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{379:function(e,t,c){"use strict";t.a={productLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},380:function(e,t,c){"use strict";var n=c(11),r=c.n(n),a=c(5),o=c.n(a),l=c(18),i=c.n(l),s=c(0),u=(c(2),c(1)),d=c(8),p=c.n(d),b=c(6),m=c(39),g=c(66),f=c(278);c(540);function O(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function j(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?O(Object(c),!0).forEach((function(t){o()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):O(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var w=function(){return Object(s.createElement)("img",{src:b.E,alt:"",width:500,height:500})},h=function(e){var t=e.image,c=e.onLoad,n=e.loaded,a=e.showFullSize,o=e.fallbackAlt,l=t||{},i=l.thumbnail,u=l.src,d=l.srcset,p=l.sizes,b=j({alt:l.alt||o,onLoad:c,hidden:!n,src:i},a&&{src:u,srcSet:d,sizes:p});return Object(s.createElement)(s.Fragment,null,b.src&&Object(s.createElement)("img",r()({"data-testid":"product-image"},b)),!n&&Object(s.createElement)(w,null))};t.a=Object(g.withProductDataContext)((function(e){var t=e.className,c=e.imageSizing,n=void 0===c?"full-size":c,r=e.productLink,a=void 0===r||r,l=e.showSaleBadge,d=e.saleBadgeAlign,b=void 0===d?"right":d,g=Object(m.useInnerBlockLayoutContext)().parentClassName,O=Object(m.useProductDataContext)().product,y=Object(s.useState)(!1),k=i()(y,2),v=k[0],E=k[1];if(!O.id)return Object(s.createElement)("div",{className:p()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",o()({},"".concat(g,"__product-image"),g))},Object(s.createElement)(w,null));var P=!!O.images.length,S=P?O.images[0]:null,z=a?"a":s.Fragment,B=Object(u.sprintf)(Object(u.__)("Link to %s","woo-gutenberg-products-block"),O.name),L=j({href:O.permalink,rel:"nofollow"},!P&&{"aria-label":B});return Object(s.createElement)("div",{className:p()(t,"wc-block-components-product-image",o()({},"".concat(g,"__product-image"),g))},Object(s.createElement)(z,a&&L,!!l&&Object(s.createElement)(f.default,{align:b,product:O}),Object(s.createElement)(h,{fallbackAlt:O.name,image:S,onLoad:function(){return E(!0)},loaded:v,showFullSize:"cropped"!==n})))}))},540:function(e,t){},933:function(e,t,c){"use strict";c.r(t);var n=c(932),r=c(380),a=c(379);t.default=Object(n.a)(a.a)(r.a)}}]);
|
build/atomic-block-components/price-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[6],{117:function(e,r,c){"use strict";var t=c(7),a=c.n(t),n=c(1),o=c(46),l=c(5),i=c.n(l),u=(c(3),c(150)),s=(c(154),function(e){var r=e.currency,c=e.maxPrice,t=e.minPrice,a=e.priceClassName,n=e.priceStyle;return React.createElement(React.Fragment,null,React.createElement(o.a,{className:i()("wc-block-components-product-price__value",a),currency:r,value:t,style:n})," — ",React.createElement(o.a,{className:i()("wc-block-components-product-price__value",a),currency:r,value:c,style:n}))}),p=function(e){var r=e.currency,c=e.regularPriceClassName,t=e.regularPriceStyle,a=e.regularPrice,l=e.priceClassName,u=e.priceStyle,s=e.price;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:r,renderText:function(e){return React.createElement("del",{className:i()("wc-block-components-product-price__regular",c),style:t},e)},value:a}),React.createElement("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(o.a,{currency:r,renderText:function(e){return React.createElement("ins",{className:i()("wc-block-components-product-price__value","is-discounted",l),style:u},e)},value:s}))};r.a=function(e){var r=e.align,c=e.className,t=e.currency,n=e.format,l=void 0===n?"<price/>":n,m=e.maxPrice,d=void 0===m?null:m,b=e.minPrice,f=void 0===b?null:b,g=e.price,v=void 0===g?null:g,y=e.priceClassName,_=e.priceStyle,O=e.regularPrice,P=e.regularPriceClassName,N=e.regularPriceStyle,S=i()(c,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));l.includes("<price/>")||(l="<price/>",console.error("Price formats need to include the `<price/>` tag."));var C=O&&v!==O,j=React.createElement("span",{className:i()("wc-block-components-product-price__value",y)});return C?j=React.createElement(p,{currency:t,price:v,priceClassName:y,priceStyle:_,regularPrice:O,regularPriceClassName:P,regularPriceStyle:N}):null!==f&&null!==d?j=React.createElement(s,{currency:t,maxPrice:d,minPrice:f,priceClassName:y,priceStyle:_}):null!==v&&(j=React.createElement(o.a,{className:i()("wc-block-components-product-price__value",y),currency:t,value:v,style:_})),React.createElement("span",{className:S},Object(u.a)(l,{price:j}))}},125:function(e,r){},154:function(e,r){},300:function(e,r,c){"use strict";c.r(r);var t=c(7),a=c.n(t),n=(c(3),c(5)),o=c.n(n),l=c(117),i=c(44),u=c(80),s=c(202),p=c(9),m=c(199);r.default=Object(m.withProductDataContext)((function(e){var r,c,t,n,m,d,b,f=e.className,g=e.align,v=e.fontSize,y=e.customFontSize,_=e.saleFontSize,O=e.customSaleFontSize,P=e.color,N=e.customColor,S=e.saleColor,C=e.customSaleColor,j=Object(u.useInnerBlockLayoutContext)().parentClassName,w=Object(u.useProductDataContext)().product,E=o()(f,a()({},"".concat(j,"__product-price"),j));if(!w.id)return React.createElement(l.a,{align:g,className:E});var R=Object(s.getColorClassName)("color",P),x=Object(s.getFontSizeClass)(v),h=Object(s.getColorClassName)("color",S),k=Object(s.getFontSizeClass)(_),z=o()((r={"has-text-color":P||N,"has-font-size":v||y},a()(r,R,R),a()(r,x,x),r)),F=o()((c={"has-text-color":S||C,"has-font-size":_||O},a()(c,h,h),a()(c,k,k),c)),D={color:N,fontSize:y},V={color:C,fontSize:O},B=w.prices,T=Object(i.getCurrencyFromPriceResponse)(B),U=B.price!==B.regular_price,J=U?o()((t={},a()(t,"".concat(j,"__product-price__value"),j),a()(t,F,Object(p.E)()),t)):o()((n={},a()(n,"".concat(j,"__product-price__value"),j),a()(n,z,Object(p.E)()),n)),M=U?V:D;return React.createElement(l.a,{align:g,className:E,currency:T,price:B.price,priceClassName:J,priceStyle:Object(p.E)()?M:{},minPrice:null==B||null===(m=B.price_range)||void 0===m?void 0:m.min_amount,maxPrice:null==B||null===(d=B.price_range)||void 0===d?void 0:d.max_amount,regularPrice:B.regular_price,regularPriceClassName:o()((b={},a()(b,"".concat(j,"__product-price__regular"),j),a()(b,z,Object(p.E)()),b)),regularPriceStyle:Object(p.E)()?D:{}})}))},46:function(e,r,c){"use strict";var t=c(11),a=c.n(t),n=c(7),o=c.n(n),l=c(14),i=c.n(l),u=c(105),s=c(5),p=c.n(s);c(125);function m(e,r){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),c.push.apply(c,t)}return c}function d(e){for(var r=1;r<arguments.length;r++){var c=null!=arguments[r]?arguments[r]:{};r%2?m(Object(c),!0).forEach((function(r){o()(e,r,c[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):m(Object(c)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(c,r))}))}return e}r.a=function(e){var r=e.className,c=e.value,t=e.currency,n=e.onValueChange,o=i()(e,["className","value","currency","onValueChange"]);if("-"===c)return null;var l=c/Math.pow(10,t.minorUnit);if(!Number.isFinite(l))return null;var s=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),m=d(d(d({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(t)),{},{value:void 0,currency:void 0,onValueChange:void 0}),b=n?function(e){var r=e.value*Math.pow(10,t.minorUnit);n(r)}:function(){};return React.createElement(u.a,a()({className:s},m,{value:l,onValueChange:b}))}}}]);
|
build/atomic-block-components/price.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{142:function(e,r,c){"use strict";var t=c(5),a=c.n(t),n=c(0),o=c(1),l=c(56),i=c(8),u=c.n(i),s=(c(2),c(149)),p=(c(215),function(e){var r=e.currency,c=e.maxPrice,t=e.minPrice,a=e.priceClassName,o=e.priceStyle;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(l.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:t,style:o})," — ",Object(n.createElement)(l.a,{className:u()("wc-block-components-product-price__value",a),currency:r,value:c,style:o}))}),m=function(e){var r=e.currency,c=e.regularPriceClassName,t=e.regularPriceStyle,a=e.regularPrice,i=e.priceClassName,s=e.priceStyle,p=e.price;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(n.createElement)(l.a,{currency:r,renderText:function(e){return Object(n.createElement)("del",{className:u()("wc-block-components-product-price__regular",c),style:t},e)},value:a}),Object(n.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(n.createElement)(l.a,{currency:r,renderText:function(e){return Object(n.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",i),style:s},e)},value:p}))};r.a=function(e){var r=e.align,c=e.className,t=e.currency,o=e.format,i=void 0===o?"<price/>":o,b=e.maxPrice,d=void 0===b?null:b,O=e.minPrice,f=void 0===O?null:O,g=e.price,v=void 0===g?null:g,y=e.priceClassName,j=e.priceStyle,_=e.regularPrice,P=e.regularPriceClassName,N=e.regularPriceStyle,S=u()(c,"price","wc-block-components-product-price",a()({},"wc-block-components-product-price--align-".concat(r),r));i.includes("<price/>")||(i="<price/>",console.error("Price formats need to include the `<price/>` tag."));var C=_&&v!==_,w=Object(n.createElement)("span",{className:u()("wc-block-components-product-price__value",y)});return C?w=Object(n.createElement)(m,{currency:t,price:v,priceClassName:y,priceStyle:j,regularPrice:_,regularPriceClassName:P,regularPriceStyle:N}):null!==f&&null!==d?w=Object(n.createElement)(p,{currency:t,maxPrice:d,minPrice:f,priceClassName:y,priceStyle:j}):null!==v&&(w=Object(n.createElement)(l.a,{className:u()("wc-block-components-product-price__value",y),currency:t,value:v,style:j})),Object(n.createElement)("span",{className:S},Object(s.a)(i,{price:w}))}},180:function(e,r){},215:function(e,r){},520:function(e,r,c){"use strict";c.r(r);var t=c(5),a=c.n(t),n=c(0),o=(c(2),c(8)),l=c.n(o),i=c(142),u=c(62),s=c(39),p=c(22),m=c(6),b=c(66);r.default=Object(b.withProductDataContext)((function(e){var r,c,t,o,b,d,O,f=e.className,g=e.align,v=e.fontSize,y=e.customFontSize,j=e.saleFontSize,_=e.customSaleFontSize,P=e.color,N=e.customColor,S=e.saleColor,C=e.customSaleColor,w=Object(s.useInnerBlockLayoutContext)().parentClassName,x=Object(s.useProductDataContext)().product,E=l()(f,a()({},"".concat(w,"__product-price"),w));if(!x.id)return Object(n.createElement)(i.a,{align:g,className:E});var h=Object(p.getColorClassName)("color",P),k=Object(p.getFontSizeClass)(v),z=Object(p.getColorClassName)("color",S),F=Object(p.getFontSizeClass)(j),V=l()((r={"has-text-color":P||N,"has-font-size":v||y},a()(r,h,h),a()(r,k,k),r)),D=l()((c={"has-text-color":S||C,"has-font-size":j||_},a()(c,z,z),a()(c,F,F),c)),B={color:N,fontSize:y},T={color:C,fontSize:_},U=x.prices,J=Object(u.getCurrencyFromPriceResponse)(U),M=U.price!==U.regular_price,W=M?l()((t={},a()(t,"".concat(w,"__product-price__value"),w),a()(t,D,Object(m.V)()),t)):l()((o={},a()(o,"".concat(w,"__product-price__value"),w),a()(o,V,Object(m.V)()),o)),I=M?T:B;return Object(n.createElement)(i.a,{align:g,className:E,currency:J,price:U.price,priceClassName:W,priceStyle:Object(m.V)()?I:{},minPrice:null==U||null===(b=U.price_range)||void 0===b?void 0:b.min_amount,maxPrice:null==U||null===(d=U.price_range)||void 0===d?void 0:d.max_amount,regularPrice:U.regular_price,regularPriceClassName:l()((O={},a()(O,"".concat(w,"__product-price__regular"),w),a()(O,V,Object(m.V)()),O)),regularPriceStyle:Object(m.V)()?B:{}})}))},56:function(e,r,c){"use strict";var t=c(11),a=c.n(t),n=c(5),o=c.n(n),l=c(24),i=c.n(l),u=c(0),s=c(172),p=c(8),m=c.n(p);c(180);function b(e,r){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),c.push.apply(c,t)}return c}function d(e){for(var r=1;r<arguments.length;r++){var c=null!=arguments[r]?arguments[r]:{};r%2?b(Object(c),!0).forEach((function(r){o()(e,r,c[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):b(Object(c)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(c,r))}))}return e}r.a=function(e){var r=e.className,c=e.value,t=e.currency,n=e.onValueChange,o=i()(e,["className","value","currency","onValueChange"]);if("-"===c)return null;var l=c/Math.pow(10,t.minorUnit);if(!Number.isFinite(l))return null;var p=m()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",r),b=d(d(d({displayType:"text"},o),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(t)),{},{value:void 0,currency:void 0,onValueChange:void 0}),O=n?function(e){var r=e.value*Math.pow(10,t.minorUnit);n(r)}:function(){};return Object(u.createElement)(s.a,a()({className:p},b,{value:l,onValueChange:O}))}}}]);
|
build/atomic-block-components/rating-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{290:function(t,e){},301:function(t,e,a){"use strict";a.r(e);var c=a(7),n=a.n(c),r=(a(3),a(1)),o=a(5),s=a.n(o),u=a(80),i=a(199),l=(a(290),function(t){var e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0});e.default=Object(i.withProductDataContext)((function(t){var e=t.className,a=Object(u.useInnerBlockLayoutContext)().parentClassName,c=Object(u.useProductDataContext)().product,o=l(c);if(!o)return null;var i={width:o/5*100+"%"},p=Object(r.sprintf)(Object(r.__)("Rated %f out of 5","woo-gutenberg-products-block"),o);return React.createElement("div",{className:s()(e,"wc-block-components-product-rating",n()({},"".concat(a,"__product-rating"),a))},React.createElement("div",{className:s()("wc-block-components-product-rating__stars","".concat(a,"__product-rating__stars")),role:"img","aria-label":p},React.createElement("span",{style:i},p)))}))}}]);
|
build/atomic-block-components/rating.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{521:function(t,e,c){"use strict";c.r(e);var a=c(5),n=c.n(a),r=c(0),o=(c(2),c(1)),s=c(8),u=c.n(s),i=c(39),l=c(66),p=(c(541),function(t){var e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0});e.default=Object(l.withProductDataContext)((function(t){var e=t.className,c=Object(i.useInnerBlockLayoutContext)().parentClassName,a=Object(i.useProductDataContext)().product,s=p(a);if(!s)return null;var l={width:s/5*100+"%"},b=Object(o.sprintf)(Object(o.__)("Rated %f out of 5","woo-gutenberg-products-block"),s);return Object(r.createElement)("div",{className:u()(e,"wc-block-components-product-rating",n()({},"".concat(c,"__product-rating"),c))},Object(r.createElement)("div",{className:u()("wc-block-components-product-rating__stars","".concat(c,"__product-rating__stars")),role:"img","aria-label":b},Object(r.createElement)("span",{style:l},b)))}))},541:function(t,e){}}]);
|
build/atomic-block-components/sale-badge-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{286:function(e,t){},287:function(e,t,r){"use strict";r.r(t);var c=r(7),n=r.n(c),a=(r(3),r(1)),o=r(5),s=r.n(o),l=r(38),u=r(80),p=r(199);r(286);t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(u.useInnerBlockLayoutContext)().parentClassName,o=Object(u.useProductDataContext)().product;if(!o.id||!o.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return React.createElement("div",{className:s()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},React.createElement(l.a,{label:Object(a.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Product on sale","woo-gutenberg-products-block")}))}))},38:function(e,t,r){"use strict";var c=r(7),n=r.n(c),a=(r(3),r(2)),o=r(5),s=r.n(o);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,o=e.wrapperProps,l=void 0===o?{}:o,p=null!=r,b=null!=c;return!p&&b?(t=n||"span",l=u(u({},l),{},{className:s()(l.className,"screen-reader-text")}),React.createElement(t,l,c)):(t=n||a.Fragment,p&&b&&r!==c?React.createElement(t,l,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},c)):React.createElement(t,l,r))}}}]);
|
build/atomic-block-components/sale-badge.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{278:function(e,t,r){"use strict";r.r(t);var c=r(5),n=r.n(c),a=r(0),o=(r(2),r(1)),s=r(8),l=r.n(s),u=r(44),b=r(39),p=r(66);r(539);t.default=Object(p.withProductDataContext)((function(e){var t=e.className,r=e.align,c=Object(b.useInnerBlockLayoutContext)().parentClassName,s=Object(b.useProductDataContext)().product;if(!s.id||!s.on_sale)return null;var p="string"==typeof r?"wc-block-components-product-sale-badge--align-".concat(r):"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,p,n()({},"".concat(c,"__product-onsale"),c))},Object(a.createElement)(u.a,{label:Object(o.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Product on sale","woo-gutenberg-products-block")}))}))},44:function(e,t,r){"use strict";var c=r(5),n=r.n(c),a=r(0),o=(r(2),r(9)),s=r(8),l=r.n(s);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);t&&(c=c.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,c)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){n()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,c=e.screenReaderLabel,n=e.wrapperElement,s=e.wrapperProps,u=void 0===s?{}:s,p=null!=r,i=null!=c;return!p&&i?(t=n||"span",u=b(b({},u),{},{className:l()(u.className,"screen-reader-text")}),Object(a.createElement)(t,u,c)):(t=n||o.Fragment,p&&i&&r!==c?Object(a.createElement)(t,u,Object(a.createElement)("span",{"aria-hidden":"true"},r),Object(a.createElement)("span",{className:"screen-reader-text"},c)):Object(a.createElement)(t,u,r))}},539:function(e,t){}}]);
|
build/atomic-block-components/sku-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{294:function(t,c){},304:function(t,c,e){"use strict";e.r(c);var n=e(7),o=e.n(n),a=e(1),u=(e(3),e(5)),s=e.n(u),r=e(80),l=e(199);e(294);c.default=Object(l.withProductDataContext)((function(t){var c=t.className,e=Object(r.useInnerBlockLayoutContext)().parentClassName,n=Object(r.useProductDataContext)().product.sku;return n?React.createElement("div",{className:s()(c,"wc-block-components-product-sku",o()({},"".concat(e,"__product-sku"),e))},Object(a.__)("SKU:","woo-gutenberg-products-block")," ",React.createElement("strong",null,n)):null}))}}]);
|
build/atomic-block-components/sku.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{525:function(t,c,e){"use strict";e.r(c);var n=e(5),o=e.n(n),u=e(0),s=e(1),a=(e(2),e(8)),r=e.n(a),l=e(39),b=e(66);e(544);c.default=Object(b.withProductDataContext)((function(t){var c=t.className,e=Object(l.useInnerBlockLayoutContext)().parentClassName,n=Object(l.useProductDataContext)().product.sku;return n?Object(u.createElement)("div",{className:r()(c,"wc-block-components-product-sku",o()({},"".concat(e,"__product-sku"),e))},Object(s.__)("SKU:","woo-gutenberg-products-block")," ",Object(u.createElement)("strong",null,n)):null}))},544:function(t,c){}}]);
|
build/atomic-block-components/stock-indicator-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{297:function(o,c){},307:function(o,c,t){"use strict";t.r(c);var n=t(7),e=t.n(n),r=t(1),s=(t(3),t(5)),a=t.n(s),i=t(80),u=t(199),k=(t(297),function(o){return Object(r.sprintf)(Object(r.__)("%d left in stock","woo-gutenberg-products-block"),o)}),b=function(o,c){return c?Object(r.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(r.__)("In Stock","woo-gutenberg-products-block"):Object(r.__)("Out of Stock","woo-gutenberg-products-block")};c.default=Object(u.withProductDataContext)((function(o){var c,t=o.className,n=Object(i.useInnerBlockLayoutContext)().parentClassName,r=Object(i.useProductDataContext)().product;if(!r.id||!r.is_purchasable)return null;var s=!!r.is_in_stock,u=r.low_stock_remaining,d=r.is_on_backorder;return React.createElement("div",{className:a()(t,"wc-block-components-product-stock-indicator",(c={},e()(c,"".concat(n,"__stock-indicator"),n),e()(c,"wc-block-components-product-stock-indicator--in-stock",s),e()(c,"wc-block-components-product-stock-indicator--out-of-stock",!s),e()(c,"wc-block-components-product-stock-indicator--low-stock",!!u),e()(c,"wc-block-components-product-stock-indicator--available-on-backorder",!!d),c))},u?k(u):b(s,d))}))}}]);
|
build/atomic-block-components/stock-indicator.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{528:function(o,c,t){"use strict";t.r(c);var n=t(5),e=t.n(n),r=t(0),s=t(1),a=(t(2),t(8)),i=t.n(a),u=t(39),k=t(66),b=(t(547),function(o){return Object(s.sprintf)(Object(s.__)("%d left in stock","woo-gutenberg-products-block"),o)}),d=function(o,c){return c?Object(s.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(s.__)("In Stock","woo-gutenberg-products-block"):Object(s.__)("Out of Stock","woo-gutenberg-products-block")};c.default=Object(k.withProductDataContext)((function(o){var c,t=o.className,n=Object(u.useInnerBlockLayoutContext)().parentClassName,s=Object(u.useProductDataContext)().product;if(!s.id||!s.is_purchasable)return null;var a=!!s.is_in_stock,k=s.low_stock_remaining,l=s.is_on_backorder;return Object(r.createElement)("div",{className:i()(t,"wc-block-components-product-stock-indicator",(c={},e()(c,"".concat(n,"__stock-indicator"),n),e()(c,"wc-block-components-product-stock-indicator--in-stock",a),e()(c,"wc-block-components-product-stock-indicator--out-of-stock",!a),e()(c,"wc-block-components-product-stock-indicator--low-stock",!!k),e()(c,"wc-block-components-product-stock-indicator--available-on-backorder",!!l),c))},k?b(k):d(a,l))}))},547:function(o,c){}}]);
|
build/atomic-block-components/summary-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{137:function(t,e,n){"use strict";var c=n(0),r=n(101),o=n(87),a=function(t){var e=t.indexOf("</p>");return-1===e?t:t.substr(0,e+4)},u=function(t){return t.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(t,e){return t.replace(/[\s|\.\,]+$/i,"")+e},i=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",c=u(t),r=c.split(" ").splice(0,e).join(" ");return Object(o.autop)(s(r,n))},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",r=u(t),a=r.slice(0,e);if(n)return Object(o.autop)(s(a,c));var i=a.match(/([\s]+)/g),l=i?i.length:0,p=r.slice(0,e+l);return Object(o.autop)(s(p,c))};e.a=function(t){var e=t.source,n=t.maxLength,u=void 0===n?15:n,s=t.countType,p=void 0===s?"words":s,d=t.className,m=void 0===d?"":d,v=Object(c.useMemo)((function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",c=Object(o.autop)(t),u=Object(r.count)(c,n);if(u<=e)return c;var s=a(c),p=Object(r.count)(s,n);return p<=e?s:"words"===n?i(s,e):l(s,e,"characters_including_spaces"===n)}(e,u,p)}),[e,u,p]);return React.createElement(c.RawHTML,{className:m},v)}},293:function(t,e){},303:function(t,e,n){"use strict";n.r(e);var c=n(7),r=n.n(c),o=(n(3),n(5)),a=n.n(o),u=n(137),s=n(4),i=n(80),l=n(199);n(293);e.default=Object(l.withProductDataContext)((function(t){var e=t.className,n=Object(i.useInnerBlockLayoutContext)().parentClassName,c=Object(i.useProductDataContext)().product;if(!c)return React.createElement("div",{className:a()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n))});var o=c.short_description?c.short_description:c.description;if(!o)return null;var l=Object(s.getSetting)("wordCountType","words");return React.createElement(u.a,{className:a()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:o,maxLength:150,countType:l})}))}}]);
|
build/atomic-block-components/summary.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{169:function(t,e,n){"use strict";var c=n(0),r=n(135),o=n(89),a=function(t){var e=t.indexOf("</p>");return-1===e?t:t.substr(0,e+4)},u=function(t){return t.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(t,e){return t.replace(/[\s|\.\,]+$/i,"")+e},i=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",c=u(t),r=c.split(" ").splice(0,e).join(" ");return Object(o.autop)(s(r,n))},l=function(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",r=u(t),a=r.slice(0,e);if(n)return Object(o.autop)(s(a,c));var i=a.match(/([\s]+)/g),l=i?i.length:0,p=r.slice(0,e+l);return Object(o.autop)(s(p,c))};e.a=function(t){var e=t.source,n=t.maxLength,u=void 0===n?15:n,s=t.countType,p=void 0===s?"words":s,d=t.className,m=void 0===d?"":d,v=Object(c.useMemo)((function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",c=Object(o.autop)(t),u=Object(r.count)(c,n);if(u<=e)return c;var s=a(c),p=Object(r.count)(s,n);return p<=e?s:"words"===n?i(s,e):l(s,e,"characters_including_spaces"===n)}(e,u,p)}),[e,u,p]);return Object(c.createElement)(c.RawHTML,{className:m},v)}},524:function(t,e,n){"use strict";n.r(e);var c=n(5),r=n.n(c),o=n(0),a=(n(2),n(8)),u=n.n(a),s=n(169),i=n(3),l=n(39),p=n(66);n(543);e.default=Object(p.withProductDataContext)((function(t){var e=t.className,n=Object(l.useInnerBlockLayoutContext)().parentClassName,c=Object(l.useProductDataContext)().product;if(!c)return Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n))});var a=c.short_description?c.short_description:c.description;if(!a)return null;var p=Object(i.getSetting)("wordCountType","words");return Object(o.createElement)(s.a,{className:u()(e,"wc-block-components-product-summary",r()({},"".concat(n,"__product-summary"),n)),source:a,maxLength:150,countType:p})}))},543:function(t,e){}}]);
|
build/atomic-block-components/tag-list-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{296:function(t,e){},306:function(t,e,c){"use strict";c.r(e);var a=c(7),n=c.n(a),o=c(1),s=(c(3),c(5)),l=c.n(s),u=c(80),r=c(8),i=c(199);c(296);e.default=Object(i.withProductDataContext)((function(t){var e=t.className,c=Object(u.useInnerBlockLayoutContext)().parentClassName,a=Object(u.useProductDataContext)().product;return Object(r.isEmpty)(a.tags)?null:React.createElement("div",{className:l()(e,"wc-block-components-product-tag-list",n()({},"".concat(c,"__product-tag-list"),c))},Object(o.__)("Tags:","woo-gutenberg-products-block")," ",React.createElement("ul",null,Object.values(a.tags).map((function(t){var e=t.name,c=t.link,a=t.slug;return React.createElement("li",{key:"tag-list-item-".concat(a)},React.createElement("a",{href:c},e))}))))}))}}]);
|
build/atomic-block-components/tag-list.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{527:function(t,e,c){"use strict";c.r(e);var n=c(5),a=c.n(n),o=c(0),s=c(1),l=(c(2),c(8)),u=c.n(l),r=c(39),i=c(7),b=c(66);c(546);e.default=Object(b.withProductDataContext)((function(t){var e=t.className,c=Object(r.useInnerBlockLayoutContext)().parentClassName,n=Object(r.useProductDataContext)().product;return Object(i.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-tag-list",a()({},"".concat(c,"__product-tag-list"),c))},Object(s.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map((function(t){var e=t.name,c=t.link,n=t.slug;return Object(o.createElement)("li",{key:"tag-list-item-".concat(n)},Object(o.createElement)("a",{href:c},e))}))))}))},546:function(t,e){}}]);
|
build/atomic-block-components/title-frontend.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{133:function(e,t,c){"use strict";var n=c(11),o=c.n(n),r=c(14),a=c.n(r),i=(c(3),c(22)),s=c(5),l=c.n(s);c(153);t.a=function(e){var t=e.className,c=void 0===t?"":t,n=e.disabled,r=void 0!==n&&n,s=e.name,u=e.permalink,p=void 0===u?"":u,b=a()(e,["className","disabled","name","permalink"]),f=l()("wc-block-components-product-name",c);return r?React.createElement("span",o()({className:f},b),Object(i.decodeEntities)(s)):React.createElement("a",o()({className:f,href:p},b),Object(i.decodeEntities)(s))}},153:function(e,t){},190:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var n=function(e,t){var c=[];return Object.keys(e).forEach((function(n){if(void 0!==t[n])switch(e[n].type){case"boolean":c[n]="false"!==t[n]&&!1!==t[n];break;case"number":c[n]=parseInt(t[n],10);break;case"array":case"object":c[n]=JSON.parse(t[n]);break;default:c[n]=t[n]}else c[n]=e[n].default})),c}},285:function(e,t,c){"use strict";var n=c(11),o=c.n(n),r=c(190);t.a=function(e){return function(t){return function(c){var n=Object(r.a)(e,c);return React.createElement(t,o()({},c,n))}}}},289:function(e,t){},309:function(e,t,c){"use strict";c.r(t);var n=c(285),o=c(7),r=c.n(o),a=(c(3),c(5)),i=c.n(a),s=c(80),l=c(202),u=c(9),p=function(e){var t=e.color,c=e.fontSize;return Object(u.E)()?{color:t,fontSize:c}:{}},b=c(199),f=c(133),d=(c(289),Object(b.withProductDataContext)((function(e){var t,c,n,o=e.className,a=e.headingLevel,b=void 0===a?2:a,d=e.productLink,m=void 0===d||d,O=e.align,j=e.color,y=e.customColor,v=e.fontSize,k=e.customFontSize,w=Object(s.useInnerBlockLayoutContext)().parentClassName,g=Object(s.useProductDataContext)().product,E="h".concat(b),h=Object(l.getColorClassName)("color",j),S=Object(l.getFontSizeClass)(v),N=i()((t={"has-text-color":j||y,"has-font-size":v||k},r()(t,h,h),r()(t,S,S),t));return g.id?React.createElement(E,{className:i()(o,"wc-block-components-product-title",(c={},r()(c,"".concat(w,"__product-title"),w),r()(c,"wc-block-components-product-title--align-".concat(O),O&&Object(u.E)()),c))},React.createElement(f.a,{className:i()(r()({},N,Object(u.E)())),disabled:!m,name:g.name,permalink:g.permalink,rel:m?"nofollow":null,style:p({color:y,fontSize:k})})):React.createElement(E,{className:i()(o,"wc-block-components-product-title",(n={},r()(n,"".concat(w,"__product-title"),w),r()(n,"wc-block-components-product-title--align-".concat(O),O&&Object(u.E)()),r()(n,N,Object(u.E)()),n)),style:p({color:y,fontSize:k})})})));function m(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,n)}return c}function O(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?m(Object(c),!0).forEach((function(t){r()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):m(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var j={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(u.E)()&&(j=O(O({},j),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}));var y=j;t.default=Object(n.a)(y)(d)}}]);
|
build/atomic-block-components/title.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{168:function(e,t,c){"use strict";var o=c(11),n=c.n(o),r=c(24),a=c.n(r),i=c(0),l=(c(2),c(28)),s=c(8),u=c.n(s);c(214);t.a=function(e){var t=e.className,c=void 0===t?"":t,o=e.disabled,r=void 0!==o&&o,s=e.name,p=e.permalink,b=void 0===p?"":p,d=a()(e,["className","disabled","name","permalink"]),m=u()("wc-block-components-product-name",c);return r?Object(i.createElement)("span",n()({className:m},d),Object(l.decodeEntities)(s)):Object(i.createElement)("a",n()({className:m,href:b},d),Object(l.decodeEntities)(s))}},214:function(e,t){},378:function(e,t,c){"use strict";var o=c(5),n=c.n(o),r=c(6);function a(e,t){var c=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),c.push.apply(c,o)}return c}function i(e){for(var t=1;t<arguments.length;t++){var c=null!=arguments[t]?arguments[t]:{};t%2?a(Object(c),!0).forEach((function(t){n()(e,t,c[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(c)):a(Object(c)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(c,t))}))}return e}var l={headingLevel:{type:"number",default:2},productLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(r.V)()&&(l=i(i({},l),{},{align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}})),t.a=l},385:function(e,t,c){"use strict";var o=c(5),n=c.n(o),r=c(0),a=(c(2),c(8)),i=c.n(a),l=c(39),s=c(22),u=c(6),p=function(e){var t=e.color,c=e.fontSize;return Object(u.V)()?{color:t,fontSize:c}:{}},b=c(66),d=c(168);c(538),t.a=Object(b.withProductDataContext)((function(e){var t,c,o,a=e.className,b=e.headingLevel,m=void 0===b?2:b,O=e.productLink,f=void 0===O||O,j=e.align,y=e.color,g=e.customColor,v=e.fontSize,w=e.customFontSize,k=Object(l.useInnerBlockLayoutContext)().parentClassName,h=Object(l.useProductDataContext)().product,S="h".concat(m),z=Object(s.getColorClassName)("color",y),N=Object(s.getFontSizeClass)(v),P=i()((t={"has-text-color":y||g,"has-font-size":v||w},n()(t,z,z),n()(t,N,N),t));return h.id?Object(r.createElement)(S,{className:i()(a,"wc-block-components-product-title",(c={},n()(c,"".concat(k,"__product-title"),k),n()(c,"wc-block-components-product-title--align-".concat(j),j&&Object(u.V)()),c))},Object(r.createElement)(d.a,{className:i()(n()({},P,Object(u.V)())),disabled:!f,name:h.name,permalink:h.permalink,rel:f?"nofollow":null,style:p({color:g,fontSize:w})})):Object(r.createElement)(S,{className:i()(a,"wc-block-components-product-title",(o={},n()(o,"".concat(k,"__product-title"),k),n()(o,"wc-block-components-product-title--align-".concat(j),j&&Object(u.V)()),n()(o,P,Object(u.V)()),o)),style:p({color:g,fontSize:w})})}))},538:function(e,t){},934:function(e,t,c){"use strict";c.r(t);var o=c(932),n=c(385),r=c(378);t.default=Object(o.a)(r.a)(n.a)}}]);
|
build/attribute-filter-frontend.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-blocks', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'e9b99da02e5e8de3a6147d198d8a12ed');
|
build/attribute-filter-frontend.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=222)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(71)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t,n){var r;
|
2 |
+
/*!
|
3 |
+
Copyright (c) 2017 Jed Watson.
|
4 |
+
Licensed under the MIT License (MIT), see
|
5 |
+
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var c=o.apply(null,r);c&&e.push(c)}else if("object"===i)for(var a in r)n.call(r,a)&&r[a]&&e.push(a)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"u",(function(){return i})),n.d(t,"y",(function(){return c})),n.d(t,"r",(function(){return a})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return p})),n.d(t,"l",(function(){return d})),n.d(t,"k",(function(){return f})),n.d(t,"c",(function(){return b})),n.d(t,"n",(function(){return g})),n.d(t,"C",(function(){return h})),n.d(t,"D",(function(){return v})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return w})),n.d(t,"b",(function(){return j})),n.d(t,"q",(function(){return S})),n.d(t,"g",(function(){return E})),n.d(t,"x",(function(){return k})),n.d(t,"h",(function(){return _})),n.d(t,"t",(function(){return R})),n.d(t,"s",(function(){return P})),n.d(t,"B",(function(){return C})),n.d(t,"A",(function(){return D})),n.d(t,"d",(function(){return T})),n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return A})),n.d(t,"p",(function(){return H})),n.d(t,"E",(function(){return N}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),i=Object(r.getSetting)("reviewRatingsEnabled",!0),c=Object(r.getSetting)("showAvatars",!0),a=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),p=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),d=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),f=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),b=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),g=Object(r.getSetting)("isShippingCalculatorEnabled",!0),m=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),h=Object(r.getSetting)("wcBlocksAssetUrl",""),v=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),w=Object(r.getSetting)("shippingStates",{}),j=Object(r.getSetting)("allowedStates",{}),S=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),E=Object(r.getSetting)("checkoutShowLoginReminder",!0),I={id:0,title:"",permalink:""},x=Object(r.getSetting)("storePages",{myaccount:I,shop:I,cart:I,checkout:I,privacy:I,terms:I}),k=x.shop.permalink,_=(x.checkout.id,x.checkout.permalink),R=x.privacy.permalink,P=x.privacy.title,C=x.terms.permalink,D=x.terms.title,T=(x.cart.id,x.cart.permalink),M=Object(r.getSetting)("checkoutAllowsGuest",!1),A=Object(r.getSetting)("checkoutAllowsSignup",!1),H=x.myaccount.permalink?x.myaccount.permalink:Object(r.getSetting)("loginUrl","/wp-login.php"),N=(n(40),function(){return m>1})},function(e,t,n){var r=n(82),o=n(83),i=n(59),c=n(84);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(61);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},,,,,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,,,function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.primitives}()},,,function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(70);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(28),o=n(20);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){!function(){e.exports=this.wp.a11y}()},,function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=(n(3),n(2)),c=n(5),a=n.n(c);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,c=e.wrapperProps,u=void 0===c?{}:c,l=null!=n,p=null!=r;return!l&&p?(t=o||"span",u=s(s({},u),{},{className:a()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||i.Fragment,l&&p&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=n(21),i=n.n(o),c=function(e){var t=Object(r.useRef)();return i()(e,t.current)||(t.current=e),t.current}},function(e,t){!function(){e.exports=this.wp.blocks}()},,,function(e,t,n){"use strict";var r=n(32),o=n.n(r),i=n(33),c=n.n(i),a=n(20),u=n.n(a),s=n(34),l=n.n(s),p=n(35),d=n.n(p),f=n(24),b=n.n(f),g=n(7),m=n.n(g),h=(n(3),n(2)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,i=e.text,c=void 0===i?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):i,a=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),c&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},c),a&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",a)))};n(73);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var o=b()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d()(this,n)}}var j=function(e){l()(n,e);var t=w(n);function n(){var e;o()(this,n);for(var r=arguments.length,i=new Array(r),c=0;c<r;c++)i[c]=arguments[c];return e=t.call.apply(t,[this].concat(i)),m()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return c()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,i=e.errorMessagePrefix,c=e.renderError,a=this.state,u=a.errorMessage;return a.hasError?"function"==typeof c?c({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:i}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(h.Component);j.defaultProps={showErrorMessage:!0};t.a=j},,,,function(e,t,n){var r=n(95),o=n(96),i=n(59),c=n(97);e.exports=function(e){return r(e)||o(e)||i(e)||c()}},,,,,,,,,,,,function(e,t,n){var r=n(60);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(10),o=n.n(r),i=n(0),c=function(){var e=Object(i.useState)(),t=o()(e,2)[1];return Object(i.useCallback)((function(e){return t((function(){throw e}))}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=Object(r.createContext)("page"),i=function(){return Object(r.useContext)(o)};o.Provider},,,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(72);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,c){if(c!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},,,,,,,,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(r=(c=a.next()).done)&&(n.push(c.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,i=Object(r.useRef)(null),c=Object(r.useRef)([]),a=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),p=Object(r.useRef)(!1),d=Object(r.useRef)(e);d.current=e;var f=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(i.current),i.current=null,c.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var b=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];c.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!a||s.current||(d.current.apply(d,e),s.current=!0),l.current=setTimeout((function(){var t=!0;a&&s.current&&(t=!1),f(),!p.current&&u&&t&&d.current.apply(d,e)}),t),o&&!i.current&&u&&(i.current=setTimeout((function(){var e=c.current;f(),p.current||d.current.apply(null,e)}),o))}),[o,t,f,a,u]),g=Object(r.useCallback)((function(){l.current&&(d.current.apply(null,c.current),f())}),[f]);return[b,f,g]}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return b})),n.d(t,"c",(function(){return g}));var r=n(10),o=n.n(r),i=n(15),c=n(12),a=n(0),u=n(67),s=n(21),l=n.n(s),p=n(39),d=n(63),f=function(e){var t=Object(u.a)();e=e||t;var n=Object(c.useSelect)((function(t){return t(i.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(a.useCallback)((function(t){r(e,t)}),[e,r])]},b=function(e,t,n){var r=Object(u.a)();n=n||r;var o=Object(c.useSelect)((function(r){return r(i.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),s=Object(c.useDispatch)(i.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(a.useCallback)((function(t){s(n,e,t)}),[n,e,s])]},g=function(e,t){var n=Object(u.a)(),r=f(t=t||n),i=o()(r,2),c=i[0],s=i[1],b=Object(p.a)(c),g=Object(p.a)(e),m=Object(d.a)(g),h=Object(a.useRef)(!1);return Object(a.useEffect)((function(){l()(m,g)||(s(Object.assign({},b,g)),h.current=!0)}),[b,g,m,s]),h.current?[c,s]:[e,s]}},,function(e,t,n){var r=n(60);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(15),o=n(12),i=n(0),c=n(39),a=n(62),u=function(e){var t=e.namespace,n=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,d=e.shouldSelect,f=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var b=Object(i.useRef)({results:[],isLoading:!0}),g=Object(c.a)(p),m=Object(c.a)(s),h=Object(a.a)(),v=Object(o.useSelect)((function(e){if(!f)return null;var o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,g,m],c=o.getCollectionError.apply(o,i);return c&&h(c),{results:o.getCollection.apply(o,i),isLoading:!o.hasFinishedResolution("getCollection",i)}}),[t,n,m,g,f]);return null!==v&&(b.current=v),b.current}},,,,,,,,function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function i(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function c(e,t,n,r,o,i,c,a){return i<e&&c>t||i>e&&c<t?0:i<=e&&a<=n||c>=t&&a>=n?i-e-r:c>t&&a<n||i<e&&a>n?c-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,a=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,p="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var d=document.scrollingElement||document.documentElement,f=[],b=e;r(b)&&p(b);){if((b=b.parentNode)===d){f.push(b);break}b===document.body&&i(b)&&!i(document.documentElement)||i(b,l)&&f.push(b)}for(var g=n.visualViewport?n.visualViewport.width:innerWidth,m=n.visualViewport?n.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,w=y.width,j=y.top,S=y.right,E=y.bottom,I=y.left,x="start"===a||"nearest"===a?j:"end"===a?E:j+O/2,k="center"===u?I+w/2:"end"===u?S:I,_=[],R=0;R<f.length;R++){var P=f[R],C=P.getBoundingClientRect(),D=C.height,T=C.width,M=C.top,A=C.right,H=C.bottom,N=C.left;if("if-needed"===o&&j>=0&&I>=0&&E<=m&&S<=g&&j>=M&&E<=H&&I>=N&&S<=A)return _;var L=getComputedStyle(P),B=parseInt(L.borderLeftWidth,10),V=parseInt(L.borderTopWidth,10),K=parseInt(L.borderRightWidth,10),F=parseInt(L.borderBottomWidth,10),U=0,q=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-B-K:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-F:0;if(d===P)U="start"===a?x:"end"===a?x-m:"nearest"===a?c(v,v+m,m,V,F,v+x,v+x+O,O):x-m/2,q="start"===u?k:"center"===u?k-g/2:"end"===u?k-g:c(h,h+g,g,B,K,h+k,h+k+w,w),U=Math.max(0,U+v),q=Math.max(0,q+h);else{U="start"===a?x-M-V:"end"===a?x-H+F+W:"nearest"===a?c(M,H,D,V,F+W,x,x+O,O):x-(M+D/2)+W/2,q="start"===u?k-N-B:"center"===u?k-(N+T/2)+$/2:"end"===u?k-A+K+$:c(N,A,T,B,K+$,k,k+w,w);var Y=P.scrollLeft,z=P.scrollTop;x+=z-(U=Math.max(0,Math.min(z+U,P.scrollHeight-D+W))),k+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollWidth-T+$)))}_.push({el:P,top:U,left:q})}return _}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(11),o=n.n(r),i=n(7),c=n.n(i),a=n(0),u=n(43);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=[".wp-block-woocommerce-cart"],d=function(e){var t=e.Block,n=e.containers,r=e.getProps,i=void 0===r?function(){}:r,c=e.getErrorBoundaryProps,s=void 0===c?function(){}:c;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=i(e,n),c=s(e,n),p=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(a.render)(React.createElement(u.a,c,React.createElement(a.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:p})))),e)}))},f=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,i=e.wrappers,c=document.body.querySelectorAll(o);i.length>0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),d({Block:t,containers:c,getProps:n,getErrorBoundaryProps:r})},b=function(e){var t=document.body.querySelectorAll(p.join(","));f(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,i,c,a;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,i=n.getErrorBoundaryProps,c=n.selector,a=n.wrapper.querySelectorAll(c),d({Block:r,containers:a,getProps:o,getErrorBoundaryProps:i})}))}))}},,,function(e,t){},,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=n(29),u=function(e){var t=e.className,n=e.size,r=c()(e,["className","size"]);return React.createElement(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(7),o=n.n(r),i=n(14),c=n.n(i),a=n(2);n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,i=c()(e,["srcElement","size"]);return Object(a.isValidElement)(t)&&Object(a.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},i))}},,function(e,t,n){"use strict";var r=n(0),o=n(4),i=n(15),c=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(c.useSelect)((function(e,t){if(n.current){var r=e(i.SCHEMA_STORE_KEY),o=r.isResolving,c=r.hasFinishedResolution,a=t.dispatch(i.SCHEMA_STORE_KEY),u=a.receiveRoutes,s=a.startResolution,l=a.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||c("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(2),o=n(91);function i(e,t){return e===t}function c(e,t,n){var c=n&&n.equalityFn?n.equalityFn:i,a=Object(r.useState)(e),u=a[0],s=a[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),p=l[0],d=l[1],f=l[2],b=Object(r.useRef)(e);return Object(r.useEffect)((function(){c(b.current,e)||(p(e),b.current=e)}),[e,p,c]),[u,d,f]}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(5)),i=n.n(o),c=n(38),a=(n(162),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(r.__)("Go","woo-gutenberg-products-block"):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(r.__)("Apply filter","woo-gutenberg-products-block"):s;return React.createElement("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:u},React.createElement(c.a,{label:a,screenReaderLabel:l}))});a.defaultProps={disabled:!1},t.a=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(9),o=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),i=function(e){if(e)return o.find((function(t){return t.id===e}))},c=function(e){if(e)return o.find((function(t){return t.taxonomy===e}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(8),o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=e.filter((function(e){return e.attribute===n.taxonomy})),c=i.length?i[0]:null;if(c&&c.slug&&Array.isArray(c.slug)&&c.slug.includes(o)){var a=c.slug.filter((function(e){return e!==o})),u=e.filter((function(e){return e.attribute!==n.taxonomy}));a.length>0&&(c.slug=a.sort(),u.push(c)),t(Object(r.sortBy)(u,"attribute"))}},i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",c=e.filter((function(e){return e.attribute!==n.taxonomy}));0===o.length?t(c):(c.push({attribute:n.taxonomy,operator:i,slug:Object(r.map)(o,"slug").sort()}),t(Object(r.sortBy)(c,"attribute")))}},,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),i=n(14),c=n.n(i),a=(n(3),n(5)),u=n.n(a),s=n(1),l=n(130),p=n(129),d=(n(114),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,i=e.element,a=void 0===i?"li":i,s=e.className,l=void 0===s?"":s,p=e.radius,d=void 0===p?"small":p,f=e.children,b=void 0===f?null:f,g=c()(e,["text","screenReaderText","element","className","radius","children"]),m=a,h=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+d),v=Boolean(r&&r!==t);return React.createElement(m,o()({className:h},g),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),b)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,i=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,b=e.onRemove,g=void 0===b?function(){}:b,m=e.removeOnAnyClick,h=void 0!==m&&m,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,w=c()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),j=h?"span":"button";if(!n){var S=O&&"string"==typeof O?O:v;n="string"!=typeof S?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),S)}var E={"aria-label":n,disabled:f,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},I=h?E:{},x=h?{"aria-hidden":!0}:E;return React.createElement(d,o()({},w,I,{className:u()(i,"is-removable"),element:h?"button":w.element,screenReaderText:O,text:v}),React.createElement(j,o()({className:"wc-block-components-chip__remove"},x),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},,,,,,,,,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";e.exports=n(225)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return O}));var r=n(7),o=n.n(r),i=n(47),c=n.n(i),a=n(28),u=n.n(a),s=n(10),l=n.n(s),p=n(0),d=n(67),f=n(141),b=n(8),g=n(39),m=n(93),h=n(99);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,o=Object(d.a)();o="".concat(o,"-collection-data");var i=Object(m.a)(o),a=l()(i,1)[0],s=Object(m.b)("calculate_attribute_counts",[],o),v=l()(s,2),O=v[0],w=v[1],j=Object(m.b)("calculate_price_range",null,o),S=l()(j,2),E=S[0],I=S[1],x=Object(g.a)(t||{}),k=Object(g.a)(n);Object(p.useEffect)((function(){"object"===u()(x)&&Object.keys(x).length&&(O.find((function(e){return e.taxonomy===x.taxonomy}))||w([].concat(c()(O),[x])))}),[x,O,w]),Object(p.useEffect)((function(){E!==k&&void 0!==k&&I(k)}),[k,I,E]);var _=Object(p.useState)(!1),R=l()(_,2),P=R[0],C=R[1],D=Object(f.a)(P,200),T=l()(D,1)[0];P||C(!0);var M=Object(p.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(b.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(a)}),[a]);return Object(h.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:y(y({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},M),shouldSelect:T})}},,function(e,t,n){e.exports=n(271)},function(e,t){},function(e,t){},function(e,t,n){"use strict";
|
7 |
+
/** @license React v17.0.1
|
8 |
+
* react-is.production.min.js
|
9 |
+
*
|
10 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
11 |
+
*
|
12 |
+
* This source code is licensed under the MIT license found in the
|
13 |
+
* LICENSE file in the root directory of this source tree.
|
14 |
+
*/var r=60103,o=60106,i=60107,c=60108,a=60114,u=60109,s=60110,l=60112,p=60113,d=60120,f=60115,b=60116,g=60121,m=60122,h=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var O=Symbol.for;r=O("react.element"),o=O("react.portal"),i=O("react.fragment"),c=O("react.strict_mode"),a=O("react.profiler"),u=O("react.provider"),s=O("react.context"),l=O("react.forward_ref"),p=O("react.suspense"),d=O("react.suspense_list"),f=O("react.memo"),b=O("react.lazy"),g=O("react.block"),m=O("react.server.block"),h=O("react.fundamental"),v=O("react.debug_trace_mode"),y=O("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case a:case c:case p:case d:return e;default:switch(e=e&&e.$$typeof){case s:case l:case b:case f:case u:return e;default:return t}}case o:return t}}}var j=u,S=r,E=l,I=i,x=b,k=f,_=o,R=a,P=c,C=p;t.ContextConsumer=s,t.ContextProvider=j,t.Element=S,t.ForwardRef=E,t.Fragment=I,t.Lazy=x,t.Memo=k,t.Portal=_,t.Profiler=R,t.StrictMode=P,t.Suspense=C,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return w(e)===s},t.isContextProvider=function(e){return w(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===l},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===b},t.isMemo=function(e){return w(e)===f},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===c},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===a||e===v||e===c||e===p||e===d||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===f||e.$$typeof===u||e.$$typeof===s||e.$$typeof===l||e.$$typeof===h||e.$$typeof===g||e[0]===m)},t.typeOf=w},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(132),o=n(111),i=n(7),c=n.n(i),a=n(10),u=n.n(a),s=n(1),l=n(36),p=n(93),d=n(99),f=n(220),b=n(39),g=n(63),m=n(0),h=n(47),v=n.n(h),y=n(3),O=n.n(y),w=n(5),j=n.n(w),S=(n(226),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,o=e.options,i=void 0===o?[]:o,c=e.checked,a=void 0===c?[]:c,l=e.isLoading,p=void 0!==l&&l,d=e.isDisabled,f=void 0!==d&&d,b=e.limit,g=void 0===b?10:b,h=Object(m.useState)(!1),y=u()(h,2),O=y[0],w=y[1],S=Object(m.useMemo)((function(){return v()(Array(5)).map((function(e,t){return React.createElement("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),E=Object(m.useMemo)((function(){var e=i.length-g;return!O&&React.createElement("li",{key:"show-more",className:"show-more"},React.createElement("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(s.sprintf)(Object(s._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(s.sprintf)(Object(s._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[i,g,O]),I=Object(m.useMemo)((function(){return O&&React.createElement("li",{key:"show-less",className:"show-less"},React.createElement("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(s.__)("Show less options","woo-gutenberg-products-block")},Object(s.__)("Show less","woo-gutenberg-products-block")))}),[O]),x=Object(m.useMemo)((function(){var e=i.length>g+5;return React.createElement(React.Fragment,null,i.map((function(t,n){return React.createElement(m.Fragment,{key:t.value},React.createElement("li",e&&!O&&n>=g&&{hidden:!0},React.createElement("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:a.includes(t.value),disabled:f}),React.createElement("label",{htmlFor:t.value},t.label)),e&&n===g-1&&E)})),e&&I)}),[i,r,a,O,g,I,E,f]),k=j()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":p},t);return React.createElement("ul",{className:k},p?S:x)}),E=n(23),I=n(6),x=n(13),k=n(107),_=n(2),R=(n(185),n(108)),P=0;function C(e){return"function"==typeof e?e:D}function D(){}function T(e,t){e&&Object(R.a)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function M(e,t){return e===t||t instanceof Node&&e.contains&&e.contains(t)}function A(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),c=0;c<o;c++)i[c]=arguments[c];r(),n=setTimeout((function(){n=null,e.apply(void 0,i)}),t)}return o.cancel=r,o}function H(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function N(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function L(){return String(P++)}function B(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function V(e,t){return!(e=Array.isArray(e)?e[0]:e)&&t?t:e}function K(e){return"string"==typeof e.type}function F(e){return e.props}var U=["highlightedIndex","inputValue","isOpen","selectedItem","type"];function q(e){void 0===e&&(e={});var t={};return U.forEach((function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function $(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=W(t,r)?t[r]:e[r],n}),{})}function W(e,t){return void 0!==e[t]}function Y(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function z(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var c=t+e;c<0?c=o?i:0:c>i&&(c=o?0:i);var a=Q(e,c,n,r,o);return-1===a?t>=n?-1:t:a}function Q(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var c=t+1;c<n;c++)if(!r(c).hasAttribute("disabled"))return c}else for(var a=t-1;a>=0;a--)if(!r(a).hasAttribute("disabled"))return a;return o?e>0?Q(1,0,n,r,!1):Q(-1,n-1,n,r,!1):-1}function G(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(M(t,e)||r&&M(t,n.activeElement))}))}var X=A((function(e){Z(e).textContent=""}),500);function J(e,t){var n=Z(t);e&&(n.textContent=e,X(t))}function Z(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var ee=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),te=function(){var e=function(e){function t(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+L(),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=q(t),n.internalSetState(Object(I.a)({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=q(t),n.internalSetState(Object(I.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},c="function"==typeof e;return!c&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,Object(I.a)({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var a=c?e(t):e;a=n.props.stateReducer(t,a),r=a.hasOwnProperty("selectedItem");var u={};return r&&a.selectedItem!==t.selectedItem&&(o=a.selectedItem),a.type=a.type||0,Object.keys(a).forEach((function(e){t[e]!==a[e]&&(i[e]=a[e]),"type"!==e&&(a[e],W(n.props,e)||(u[e]=a[e]))})),c&&a.hasOwnProperty("inputValue")&&n.props.onInputValueChange(a.inputValue,Object(I.a)({},n.getStateAndHelpers(),a)),u}),(function(){C(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,c=void 0===i?"ref":i,a=o.ref,u=Object(E.a)(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;n.getRootProps.called=!0,n.getRootProps.refKey=c,n.getRootProps.suppressRefError=l;var p=n.getState().isOpen;return Object(I.a)(((r={})[c]=N(a,n.rootRef),r.role="combobox",r["aria-expanded"]=p,r["aria-haspopup"]="listbox",r["aria-owns"]=p?n.menuId:null,r["aria-labelledby"]=n.labelId,r),u)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=z(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=z(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(Object(I.a)({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=Object(I.a)({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=Object(I.a)({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=Q(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=Q(-1,r-1,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick,o=(t.onPress,t.onKeyDown),i=t.onKeyUp,c=t.onBlur,a=Object(E.a)(t,["onClick","onPress","onKeyDown","onKeyUp","onBlur"]),u=n.getState().isOpen,s={onClick:H(r,n.buttonHandleClick),onKeyDown:H(o,n.buttonHandleKeyDown),onKeyUp:H(i,n.buttonHandleKeyUp),onBlur:H(c,n.buttonHandleBlur)},l=a.disabled?{}:s;return Object(I.a)({type:"button",role:"button","aria-label":u?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,a)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=Y(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(Object(x.a)(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return Object(I.a)({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,c=t.onInput,a=(t.onChangeText,Object(E.a)(t,["onKeyDown","onBlur","onChange","onInput","onChangeText"])),u={};var s,l=n.getState(),p=l.inputValue,d=l.isOpen,f=l.highlightedIndex;a.disabled||((s={}).onChange=H(i,c,n.inputHandleChange),s.onKeyDown=H(r,n.inputHandleKeyDown),s.onBlur=H(o,n.inputHandleBlur),u=s);return Object(I.a)({"aria-autocomplete":"list","aria-activedescendant":d&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":d?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},u,a)},n.inputHandleKeyDown=function(e){var t=Y(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(Object(x.a)(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,c=void 0===i?"ref":i,a=o.ref,u=Object(E.a)(o,["refKey","ref"]),s=(void 0===t?{}:t).suppressRefError,l=void 0!==s&&s;return n.getMenuProps.called=!0,n.getMenuProps.refKey=c,n.getMenuProps.suppressRefError=l,Object(I.a)(((r={})[c]=N(a,n.menuRef),r.role="listbox",r["aria-labelledby"]=u&&u["aria-label"]?null:n.labelId,r.id=n.menuId,r),u)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,c=r.onClick,a=(r.onPress,r.index),u=r.item,s=void 0===u?void 0:u,l=Object(E.a)(r,["onMouseMove","onMouseDown","onClick","onPress","index","item"]);void 0===a?(n.items.push(s),a=n.items.indexOf(s)):n.items[a]=s;var p=c,d=((t={onMouseMove:H(o,(function(){a!==n.getState().highlightedIndex&&(n.setHighlightedIndex(a,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:H(i,(function(e){e.preventDefault()}))}).onClick=H(p,(function(){n.selectItemAtIndex(a,{type:9})})),t),f=l.disabled?{onMouseDown:d.onMouseDown}:d;return Object(I.a)({id:n.getItemId(a),role:"option","aria-selected":n.getState().highlightedIndex===a},f,l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=q(e),n.internalSetState((function(t){var r=t.selectedItem;return Object(I.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=q(e),n.internalSetState((function(t){var r=t.isOpen;return Object(I.a)({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),C(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=A((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(Object(I.a)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,J(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,c=void 0===i?o:i,a=r.defaultIsOpen,u=r.initialIsOpen,s=void 0===u?a:u,l=r.initialInputValue,p=void 0===l?"":l,d=r.initialSelectedItem,f=void 0===d?null:d,b=n.getState({highlightedIndex:c,isOpen:s,inputValue:p,selectedItem:f});return null!=b.selectedItem&&void 0===n.props.initialInputValue&&(b.inputValue=n.props.itemToString(b.selectedItem)),n.state=b,n}Object(k.a)(t,e);var n=t.prototype;return n.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},n.getState=function(e){return void 0===e&&(e=this.state),$(e,this.props)},n.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},n.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},n.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},n.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=z(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},n.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,c=this.id,a=this.getRootProps,u=this.getToggleButtonProps,s=this.getLabelProps,l=this.getMenuProps,p=this.getInputProps,d=this.getItemProps,f=this.openMenu,b=this.closeMenu,g=this.toggleMenu,m=this.selectItem,h=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,O=this.clearSelection,w=this.clearItems;return{getRootProps:a,getToggleButtonProps:u,getLabelProps:s,getMenuProps:l,getInputProps:p,getItemProps:d,reset:this.reset,openMenu:f,closeMenu:b,toggleMenu:g,selectItem:m,selectItemAtIndex:h,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:O,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:c,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},n.componentDidMount=function(){var e=this;var t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!G(t.target,[e._rootNode,e._menuNode],e.props.environment.document)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=G(t.target,[e._rootNode,e._menuNode],e.props.environment.document,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},c=this.props.environment;c.addEventListener("mousedown",t),c.addEventListener("mouseup",n),c.addEventListener("touchstart",r),c.addEventListener("touchmove",o),c.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),c.removeEventListener("mousedown",t),c.removeEventListener("mouseup",n),c.removeEventListener("touchstart",r),c.removeEventListener("touchmove",o),c.removeEventListener("touchend",i)}},n.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},n.componentDidUpdate=function(e,t){W(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},n.componentWillUnmount=function(){this.cleanup()},n.render=function(){var e=V(this.props.children,D);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=V(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:K(t)?Object(_.cloneElement)(t,this.getRootProps(F(t))):void 0:null},t}(_.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:B,itemToString:function(e){return null==e?"":String(e)},onStateChange:D,onInputValueChange:D,onUserAction:D,onChange:D,onSelect:D,onOuterClick:D,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:T},e.stateChangeTypes=ee,e}();A((function(e,t){J(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?_.useLayoutEffect:_.useEffect;var ne={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:T,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};O.a.array.isRequired,O.a.func,O.a.func,O.a.func,O.a.bool,O.a.number,O.a.number,O.a.number,O.a.bool,O.a.bool,O.a.bool,O.a.any,O.a.any,O.a.any,O.a.string,O.a.string,O.a.string,O.a.func,O.a.string,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});Object(I.a)({},ne,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}});O.a.array.isRequired,O.a.func,O.a.func,O.a.func,O.a.bool,O.a.number,O.a.number,O.a.number,O.a.bool,O.a.bool,O.a.bool,O.a.any,O.a.any,O.a.any,O.a.string,O.a.string,O.a.string,O.a.string,O.a.string,O.a.string,O.a.func,O.a.string,O.a.string,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.func,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});Object(I.a)({},ne,{getA11yStatusMessage:B,circularNavigation:!0});O.a.array,O.a.array,O.a.array,O.a.func,O.a.func,O.a.func,O.a.number,O.a.number,O.a.number,O.a.func,O.a.func,O.a.string,O.a.string,O.a.shape({addEventListener:O.a.func,removeEventListener:O.a.func,document:O.a.shape({getElementById:O.a.func,activeElement:O.a.any,body:O.a.any})});var re=te,oe=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,o=e.isDisabled,i=e.onFocus,c=e.onRemoveItem,a=e.placeholder,u=e.tabIndex,s=e.value;return React.createElement("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&c(t[t.length-1])},placeholder:a,tabIndex:u}))},ie=function(e){var t=e.children,n=e.onClick;return React.createElement("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},ce=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,o=e.highlightedIndex,i=e.options;return React.createElement("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),i.map((function(e,r){var i=t.includes(e.value);return React.createElement("li",n({key:e.value,className:j()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":i,"is-highlighted":o===r}),index:r,item:e.value,"aria-label":i?Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},ae=n(149),ue=function(e){var t=e.onRemoveItem,n=e.option;return React.createElement(ae.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},se=n(130),le=n(129),pe=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,o=Object(m.useRef)(null);return Object(m.useEffect)((function(){o.current.focus()}),[o]),React.createElement("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},React.createElement("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),React.createElement("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(s.sprintf)(Object(s.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},React.createElement(se.a,{srcElement:le.a,size:16})))};n(224);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,o=e.checked,i=void 0===o?[]:o,c=e.inputLabel,a=void 0===c?"":c,u=e.isDisabled,l=void 0!==u&&u,p=e.isLoading,d=void 0!==p&&p,f=e.multiple,b=void 0!==f&&f,g=e.onChange,h=void 0===g?function(){}:g,v=e.options,y=void 0===v?[]:v,O=Object(m.useRef)(null),w=j()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":l,"is-loading":d}),S=Object(m.useCallback)((function(e,t){switch(t.type){case re.stateChangeTypes.keyDownEnter:case re.stateChangeTypes.clickItem:return fe(fe({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:b,inputValue:""});case re.stateChangeTypes.blurInput:case re.stateChangeTypes.mouseUp:return fe(fe({},t),{},{inputValue:e.inputValue});default:return t}}),[b]);return React.createElement(re,{onChange:h,selectedItem:null,stateReducer:S},(function(e){var t=e.getInputProps,r=e.getItemProps,o=e.getLabelProps,c=e.getMenuProps,u=e.highlightedIndex,p=e.inputValue,d=e.isOpen,f=e.openMenu;return React.createElement("div",{className:j()(w,{"is-multiple":b,"is-single":!b,"has-checked":i.length>0,"is-open":d})},React.createElement("label",o({className:"screen-reader-text"}),a),React.createElement(ie,{isOpen:d,onClick:function(){return O.current.focus()}},i.map((function(e){var t=y.find((function(t){return t.value===e})),n=function(e){h(e),O.current.focus()};return b?React.createElement(ue,{key:e,onRemoveItem:n,option:t}):React.createElement(pe,{key:e,onClick:function(){return O.current.focus()},onRemoveItem:n,option:t})})),React.createElement(oe,{checked:i,getInputProps:t,inputRef:O,isDisabled:l,onFocus:f,onRemoveItem:function(e){h(e),O.current.focus()},placeholder:i.length>0&&b?null:Object(s.sprintf)(Object(s.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!b&&i.length>0?"-1":"0",value:p})),d&&!l&&React.createElement(ce,{checked:i,getItemProps:r,getMenuProps:c,highlightedIndex:u,options:y.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},ge=n(142),me=n(21),he=n.n(me),ve=n(22),ye=n(143),Oe=n(144),we=n(38),je=function(e){var t=e.name,n=e.count;return React.createElement(React.Fragment,null,t,Number.isFinite(n)&&React.createElement(we.a,{label:n,screenReaderLabel:Object(s.sprintf)(Object(s._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},Se=[{value:"preview-1",name:"Blue",label:React.createElement(je,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:React.createElement(je,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:React.createElement(je,{name:"Red",count:2})}],Ee={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(223);function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ke=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,o=t.isPreview&&!t.attributeId?Ee:Object(ye.a)(t.attributeId),i=Object(m.useState)([]),c=u()(i,2),a=c[0],h=c[1],v=Object(m.useState)(t.isPreview&&!t.attributeId?Se:[]),y=u()(v,2),O=y[0],w=y[1],j=Object(p.a)(),E=u()(j,1)[0],I=Object(p.b)("attributes",[]),x=u()(I,2),k=x[0],_=x[1],R=Object(d.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[o.id],shouldSelect:t.attributeId>0}),P=R.results,C=R.isLoading,D="dropdown"!==t.displayStyle&&"and"===t.queryType,T=Object(f.a)({queryAttribute:{taxonomy:o.taxonomy,queryType:t.queryType},queryState:xe(xe({},E),{},{attributes:D?E.attributes:null})}),M=T.results,A=T.isLoading,H=Object(m.useCallback)((function(e){return M.attribute_counts?M.attribute_counts.find((function(t){return t.term===e})):null}),[M]);Object(m.useEffect)((function(){if(!C&&!A){var e=P.map((function(e){var n,r=H(e.id);if(!(r||a.includes(e.slug)||(n=e.slug,null!=E&&E.attributes&&E.attributes.some((function(e){var t=e.attribute,r=e.slug,i=void 0===r?[]:r;return t===o.taxonomy&&i.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(ve.decodeEntities)(e.name),label:React.createElement(je,{name:Object(ve.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);w(e)}}),[o.taxonomy,P,C,t.showCounts,A,H,a,E.attributes]),Object(m.useEffect)((function(){t.showFilterButton||K(a)}),[t.showFilterButton,a,K]);var N=Object(m.useMemo)((function(){return k.filter((function(e){return e.attribute===o.taxonomy})).flatMap((function(e){return e.slug}))}),[k,o.taxonomy]),L=Object(b.a)(N),B=Object(g.a)(L);Object(m.useEffect)((function(){he()(B,L)||he()(a,L)||h(L)}),[a,L,B]);var V=Object(m.useCallback)((function(e){return P.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[P]),K=Object(m.useCallback)((function(e){r||Object(Oe.b)(k,_,o,V(e),"or"===t.queryType?"in":"and")}),[r,k,_,o,V,t.queryType]),F="dropdown"!==t.displayStyle||"or"===t.queryType,U=Object(m.useCallback)((function(e){var t,n=function(e){return O.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,o=t?n(t):null,i=r?n(r):null;o&&i?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,i)):o?Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter added.","woo-gutenberg-products-block"),o)):i&&Object(l.speak)(Object(s.sprintf)(Object(s.__)("%s filter removed.","woo-gutenberg-products-block"),i))},o=a.includes(e);F?(t=a.filter((function(t){return t!==e})),o?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=o?[]:[e],r({filterAdded:o?null:e,filterRemoved:1===a.length?a[0]:null}));h(t)}),[a,O,F]);if(0===O.length&&!C)return null;var q="h".concat(t.headingLevel),$=!t.isPreview&&C,W=!t.isPreview&&A;return React.createElement(React.Fragment,null,!r&&t.heading&&React.createElement(q,null,t.heading),React.createElement("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?React.createElement(be,{attributeLabel:o.label,checked:a,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:$,multiple:F,onChange:U,options:O}):React.createElement(S,{className:"wc-block-attribute-filter-list",options:O,checked:a,onChange:U,isLoading:$,isDisabled:W}),t.showFilterButton&&React.createElement(ge.a,{className:"wc-block-attribute-filter__button",disabled:$||W,onClick:function(){return K(a)}})))};Object(o.a)({selector:".wp-block-woocommerce-attribute-filter",Block:Object(r.a)(ke),getProps:function(e){return{attributes:{attributeId:parseInt(e.dataset.attributeId||0,10),showCounts:"true"===e.dataset.showCounts,queryType:e.dataset.queryType,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,displayStyle:e.dataset.displayStyle,showFilterButton:"true"===e.dataset.showFilterButton}}}})}]);
|
build/attribute-filter.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'moment', 'react', 'react-dom', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-data-controls', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-viewport'), 'version' => 'fcdb12a5a5f5f42042eef7da8a50fc7a');
|
build/attribute-filter.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var r,i,u=t[0],a=t[1],l=t[2],b=0,d=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(c,i)&&c[i]&&d.push(c[i][0]),c[i]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(s&&s(t);d.length;)d.shift()();return o.push.apply(o,l||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={18:0},o=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var l=0;l<u.length;l++)t(u[l]);var s=a;return o.push([848,0]),n()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},100:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0),c=Object(r.createContext)("page"),o=function(){return Object(r.useContext)(c)};c.Provider},106:function(e,t){},107:function(e,t){},108:function(e,t){},109:function(e,t){},110:function(e,t){},111:function(e,t){},112:function(e,t){},113:function(e,t){},114:function(e,t){},115:function(e,t){},116:function(e,t){},117:function(e,t){},118:function(e,t){},119:function(e,t){},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},144:function(e,t,n){"use strict";var r=n(14),c=n.n(r),o=n(15),i=n.n(o),u=n(16),a=n.n(u),l=n(17),s=n.n(l),b=n(10),d=n.n(b),p=n(0),f=n(7),g=n(1),m=n(4);function O(e){var t=e.level,n={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return n.hasOwnProperty(t)?Object(p.createElement)(m.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)(m.Path,{d:n[t]})):null}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var c=d()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return s()(this,n)}}var j=function(e){a()(n,e);var t=h(n);function n(){return c()(this,n),t.apply(this,arguments)}return i()(n,[{key:"createLevelControl",value:function(e,t,n){var r=e===t;return{icon:Object(p.createElement)(O,{level:e}),title:Object(g.sprintf)(Object(g.__)("Heading %d"),e),isActive:r,onClick:function(){return n(e)}}}},{key:"render",value:function(){var e=this,t=this.props,n=t.isCollapsed,r=void 0===n||n,c=t.minLevel,o=t.maxLevel,i=t.selectedLevel,u=t.onChange;return Object(p.createElement)(m.ToolbarGroup,{isCollapsed:r,icon:Object(p.createElement)(O,{level:i}),controls:Object(f.range)(c,o).map((function(t){return e.createLevelControl(t,i,u)}))})}}]),n}(p.Component);t.a=j},147:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return g}));var r=n(18),c=n.n(r),o=n(37),i=n(21),u=n(0),a=n(100),l=n(33),s=n.n(l),b=n(53),d=n(96),p=function(e){var t=Object(a.a)();e=e||t;var n=Object(i.useSelect)((function(t){return t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),r=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[n,Object(u.useCallback)((function(t){r(e,t)}),[e,r])]},f=function(e,t,n){var r=Object(a.a)();n=n||r;var c=Object(i.useSelect)((function(r){return r(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t)}),[n,e]),l=Object(i.useDispatch)(o.QUERY_STATE_STORE_KEY).setQueryValue;return[c,Object(u.useCallback)((function(t){l(n,e,t)}),[n,e,l])]},g=function(e,t){var n=Object(a.a)(),r=p(t=t||n),o=c()(r,2),i=o[0],l=o[1],f=Object(b.a)(i),g=Object(b.a)(e),m=Object(d.a)(g),O=Object(u.useRef)(!1);return Object(u.useEffect)((function(){s()(m,g)||(l(Object.assign({},f,g)),O.current=!0)}),[f,g,m,l]),O.current?[i,l]:[e,l]}},157:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(37),c=n(21),o=n(0),i=n(53),u=n(95),a=function(e){var t=e.namespace,n=e.resourceName,a=e.resourceValues,l=void 0===a?[]:a,s=e.query,b=void 0===s?{}:s,d=e.shouldSelect,p=void 0===d||d;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");var f=Object(o.useRef)({results:[],isLoading:!0}),g=Object(i.a)(b),m=Object(i.a)(l),O=Object(u.a)(),h=Object(c.useSelect)((function(e){if(!p)return null;var c=e(r.COLLECTIONS_STORE_KEY),o=[t,n,g,m],i=c.getCollectionError.apply(c,o);return i&&O(i),{results:c.getCollection.apply(c,o),isLoading:!c.hasFinishedResolution("getCollection",o)}}),[t,n,m,g,p]);return null!==h&&(f.current=h),f.current}},158:function(e,t,n){"use strict";var r=n(0),c=n(31),o=Object(r.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},174:function(e,t,n){"use strict";var r=n(0),c=(n(2),n(22)),o=n(8),i=n.n(o);n(241);t.a=function(e){var t=e.className,n=e.headingLevel,o=e.onChange,u=e.heading,a="h".concat(n);return Object(r.createElement)(a,null,Object(r.createElement)(c.PlainText,{className:i()("wc-block-editor-components-title",t),value:u,onChange:o}))}},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},190:function(e,t){},20:function(e,t){!function(){e.exports=this.wp.url}()},21:function(e,t){!function(){e.exports=this.wp.data}()},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},241:function(e,t){},247:function(e,t,n){"use strict";var r=n(0),c=n(1),o=(n(2),n(8)),i=n.n(o),u=n(44),a=(n(346),function(e){var t=e.className,n=e.disabled,o=e.label,a=void 0===o?Object(c.__)("Go","woo-gutenberg-products-block"):o,l=e.onClick,s=e.screenReaderLabel,b=void 0===s?Object(c.__)("Apply filter","woo-gutenberg-products-block"):s;return Object(r.createElement)("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:l},Object(r.createElement)(u.a,{label:a,screenReaderLabel:b}))});a.defaultProps={disabled:!1},t.a=a},248:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(6),c=r.c.reduce((function(e,t){var n,r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;return r.id&&e.push(r),e}),[]),o=function(e){if(e)return c.find((function(t){return t.id===e}))},i=function(e){if(e)return c.find((function(t){return t.taxonomy===e}))}},249:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o}));var r=n(7),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=e.filter((function(e){return e.attribute===n.taxonomy})),i=o.length?o[0]:null;if(i&&i.slug&&Array.isArray(i.slug)&&i.slug.includes(c)){var u=i.slug.filter((function(e){return e!==c})),a=e.filter((function(e){return e.attribute!==n.taxonomy}));u.length>0&&(i.slug=u.sort(),a.push(i)),t(Object(r.sortBy)(a,"attribute"))}},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in",i=e.filter((function(e){return e.attribute!==n.taxonomy}));0===c.length?t(i):(i.push({attribute:n.taxonomy,operator:o,slug:Object(r.map)(c,"slug").sort()}),t(Object(r.sortBy)(i,"attribute")))}},255:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(24),i=n.n(o),u=n(0),a=(n(2),n(8)),l=n.n(a),s=n(1),b=n(55),d=n(261),p=(n(190),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,o=e.element,a=void 0===o?"li":o,s=e.className,b=void 0===s?"":s,d=e.radius,p=void 0===d?"small":d,f=e.children,g=void 0===f?null:f,m=i()(e,["text","screenReaderText","element","className","radius","children"]),O=a,h=l()(b,"wc-block-components-chip","wc-block-components-chip--radius-"+p),j=Boolean(r&&r!==t);return Object(u.createElement)(O,c()({className:h},m),Object(u.createElement)("span",{"aria-hidden":j,className:"wc-block-components-chip__text"},t),j&&Object(u.createElement)("span",{className:"screen-reader-text"},r),g)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,o=void 0===r?"":r,a=e.disabled,f=void 0!==a&&a,g=e.onRemove,m=void 0===g?function(){}:g,O=e.removeOnAnyClick,h=void 0!==O&&O,j=e.text,v=e.screenReaderText,w=void 0===v?"":v,y=i()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),_=h?"span":"button";if(!n){var k=w&&"string"==typeof w?w:j;n="string"!=typeof k?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),k)}var E={"aria-label":n,disabled:f,onClick:m,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||m()}},S=h?E:{},x=h?{"aria-hidden":!0}:E;return Object(u.createElement)(p,c()({},y,S,{className:l()(o,"is-removable"),element:h?"button":y.element,screenReaderText:w,text:j}),Object(u.createElement)(_,c()({className:"wc-block-components-chip__remove"},x),Object(u.createElement)(b.a,{className:"wc-block-components-chip__remove-icon",srcElement:d.a,size:16})))}},26:function(e,t){!function(){e.exports=this.moment}()},261:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(24),i=n.n(o),u=n(0),a=n(31),l=Object(u.createElement)((function(e){var t=e.className,n=e.size,r=i()(e,["className","size"]);return Object(u.createElement)(a.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(u.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=l},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},34:function(e,t){!function(){e.exports=this.wp.dataControls}()},346:function(e,t){},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},4:function(e,t){!function(){e.exports=this.wp.components}()},44:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(0),i=(n(2),n(9)),u=n(8),a=n.n(u);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,c=e.wrapperElement,u=e.wrapperProps,l=void 0===u?{}:u,b=null!=n,d=null!=r;return!b&&d?(t=c||"span",l=s(s({},l),{},{className:a()(l.className,"screen-reader-text")}),Object(o.createElement)(t,l,r)):(t=c||i.Fragment,b&&d&&n!==r?Object(o.createElement)(t,l,Object(o.createElement)("span",{"aria-hidden":"true"},n),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,l,n))}},49:function(e,t){!function(){e.exports=this.wp.keycodes}()},53:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),c=n(33),o=n.n(c),i=function(e){var t=Object(r.useRef)();return o()(e,t.current)||(t.current=e),t.current}},55:function(e,t,n){"use strict";var r=n(5),c=n.n(r),o=n(24),i=n.n(o),u=n(9);n(2);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=i()(e,["srcElement","size"]);return Object(u.isValidElement)(t)&&Object(u.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},o))}},6:function(e,t,n){"use strict";n.d(t,"l",(function(){return c})),n.d(t,"I",(function(){return o})),n.d(t,"O",(function(){return i})),n.d(t,"y",(function(){return u})),n.d(t,"A",(function(){return a})),n.d(t,"m",(function(){return l})),n.d(t,"z",(function(){return s})),n.d(t,"C",(function(){return b})),n.d(t,"o",(function(){return d})),n.d(t,"B",(function(){return p})),n.d(t,"n",(function(){return f})),n.d(t,"E",(function(){return g})),n.d(t,"u",(function(){return m})),n.d(t,"w",(function(){return O})),n.d(t,"r",(function(){return h})),n.d(t,"s",(function(){return j})),n.d(t,"t",(function(){return v})),n.d(t,"k",(function(){return w})),n.d(t,"K",(function(){return y})),n.d(t,"P",(function(){return _})),n.d(t,"q",(function(){return k})),n.d(t,"p",(function(){return E})),n.d(t,"H",(function(){return S})),n.d(t,"c",(function(){return x})),n.d(t,"v",(function(){return P})),n.d(t,"S",(function(){return R})),n.d(t,"T",(function(){return N})),n.d(t,"J",(function(){return T})),n.d(t,"a",(function(){return L})),n.d(t,"M",(function(){return D})),n.d(t,"b",(function(){return B})),n.d(t,"L",(function(){return I})),n.d(t,"D",(function(){return A})),n.d(t,"i",(function(){return V})),n.d(t,"N",(function(){return H})),n.d(t,"h",(function(){return z})),n.d(t,"j",(function(){return q})),n.d(t,"G",(function(){return G})),n.d(t,"F",(function(){return U})),n.d(t,"R",(function(){return Y})),n.d(t,"Q",(function(){return K})),n.d(t,"d",(function(){return Q})),n.d(t,"e",(function(){return W})),n.d(t,"f",(function(){return J})),n.d(t,"g",(function(){return $})),n.d(t,"x",(function(){return X})),n.d(t,"W",(function(){return ee})),n.d(t,"X",(function(){return te})),n.d(t,"U",(function(){return ne})),n.d(t,"V",(function(){return re}));var r=n(3),c=Object(r.getSetting)("currentUserIsAdmin",!1),o=Object(r.getSetting)("reviewRatingsEnabled",!0),i=Object(r.getSetting)("showAvatars",!0),u=Object(r.getSetting)("max_columns",6),a=Object(r.getSetting)("min_columns",1),l=Object(r.getSetting)("default_columns",3),s=Object(r.getSetting)("max_rows",6),b=Object(r.getSetting)("min_rows",1),d=Object(r.getSetting)("default_rows",3),p=Object(r.getSetting)("min_height",500),f=Object(r.getSetting)("default_height",500),g=Object(r.getSetting)("placeholderImgSrc",""),m=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),O=Object(r.getSetting)("limitTags"),h=Object(r.getSetting)("hasProducts",!0),j=Object(r.getSetting)("hasTags",!0),v=Object(r.getSetting)("homeUrl",""),w=Object(r.getSetting)("couponsEnabled",!0),y=Object(r.getSetting)("shippingEnabled",!0),_=Object(r.getSetting)("taxesEnabled",!0),k=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),E=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),S=Object(r.getSetting)("productCount",0),x=Object(r.getSetting)("attributes",[]),P=Object(r.getSetting)("isShippingCalculatorEnabled",!0),C=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),R=Object(r.getSetting)("wcBlocksAssetUrl",""),N=Object(r.getSetting)("wcBlocksBuildUrl",""),T=Object(r.getSetting)("shippingCountries",{}),L=Object(r.getSetting)("allowedCountries",{}),D=Object(r.getSetting)("shippingStates",{}),B=Object(r.getSetting)("allowedStates",{}),I=Object(r.getSetting)("shippingMethodsExist",!1),A=Object(r.getSetting)("paymentGatewaySortOrder",[]),V=Object(r.getSetting)("checkoutShowLoginReminder",!0),M={id:0,title:"",permalink:""},F=Object(r.getSetting)("storePages",{myaccount:M,shop:M,cart:M,checkout:M,privacy:M,terms:M}),H=F.shop.permalink,z=F.checkout.id,q=F.checkout.permalink,G=F.privacy.permalink,U=F.privacy.title,Y=F.terms.permalink,K=F.terms.title,Q=F.cart.id,W=F.cart.permalink,J=Object(r.getSetting)("checkoutAllowsGuest",!1),$=Object(r.getSetting)("checkoutAllowsSignup",!1),X=F.myaccount.permalink?F.myaccount.permalink:Object(r.getSetting)("loginUrl","/wp-login.php"),Z=n(23),ee=function(e,t){if(C>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(C>1)return Object(Z.registerBlockType)(e,t)},ne=function(){return C>2},re=function(){return C>1}},63:function(e,t){!function(){e.exports=this.wp.hooks}()},67:function(e,t){!function(){e.exports=this.wp.dom}()},68:function(e,t,n){"use strict";var r=n(11),c=n.n(r),o=n(14),i=n.n(o),u=n(15),a=n.n(u),l=n(12),s=n.n(l),b=n(16),d=n.n(b),p=n(17),f=n.n(p),g=n(10),m=n.n(g),O=n(0),h=n(7),j=n(8),v=n.n(j),w=n(4),y=n(179);n(119);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var c=m()(this).constructor;n=Reflect.construct(r,arguments,c)}else n=r.apply(this,arguments);return f()(this,n)}}var k=function(e){d()(n,e);var t=_(n);function n(){var e;return i()(this,n),(e=t.apply(this,arguments)).onClick=e.onClick.bind(s()(e)),e}return a()(n,[{key:"onClick",value:function(e){this.props.onChange&&this.props.onChange(e.target.value)}},{key:"render",value:function(){var e,t=this,n=this.props,r=n.label,o=n.checked,i=n.instanceId,u=n.className,a=n.help,l=n.options,s=n.value,b="inspector-toggle-button-control-".concat(i);return a&&(e=Object(h.isFunction)(a)?a(o):a),Object(O.createElement)(w.BaseControl,{id:b,help:e,className:v()("components-toggle-button-control",u)},Object(O.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},r),Object(O.createElement)(w.ButtonGroup,{"aria-labelledby":b+"__label"},l.map((function(e,n){var o={};return s===e.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(O.createElement)(w.Button,c()({key:"".concat(e.label,"-").concat(e.value,"-").concat(n),value:e.value,onClick:t.onClick,"aria-label":r+": "+e.label},o),e.label)}))))}}]),n}(O.Component);t.a=Object(y.a)(k)},7:function(e,t){!function(){e.exports=this.lodash}()},70:function(e,t){!function(){e.exports=this.wp.deprecated}()},71:function(e,t){!function(){e.exports=this.wp.a11y}()},73:function(e,t){!function(){e.exports=this.ReactDOM}()},76:function(e,t){!function(){e.exports=this.wp.viewport}()},77:function(e,t){!function(){e.exports=this.wp.date}()},846:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(5),c=n.n(r),o=n(30),i=n.n(o),u=n(46),a=n.n(u),l=n(18),s=n.n(l),b=n(0),d=n(100),p=n(536),f=n(7),g=n(53),m=n(147),O=n(157);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=function(e){var t=e.queryAttribute,n=e.queryPrices,r=e.queryState,c=Object(d.a)();c="".concat(c,"-collection-data");var o=Object(m.a)(c),u=s()(o,1)[0],l=Object(m.b)("calculate_attribute_counts",[],c),h=s()(l,2),v=h[0],w=h[1],y=Object(m.b)("calculate_price_range",null,c),_=s()(y,2),k=_[0],E=_[1],S=Object(g.a)(t||{}),x=Object(g.a)(n);Object(b.useEffect)((function(){"object"===a()(S)&&Object.keys(S).length&&(v.find((function(e){return e.taxonomy===S.taxonomy}))||w([].concat(i()(v),[S])))}),[S,v,w]),Object(b.useEffect)((function(){k!==x&&void 0!==x&&E(x)}),[x,E,k]);var P=Object(b.useState)(!1),C=s()(P,2),R=C[0],N=C[1],T=Object(p.a)(R,200),L=s()(T,1)[0];R||N(!0);var D=Object(b.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(f.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(u)}),[u]);return Object(O.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:j(j({},r),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},D),shouldSelect:L})}},848:function(e,t,n){e.exports=n(889)},849:function(e,t){},850:function(e,t){},851:function(e,t){},853:function(e,t){},889:function(e,t,n){"use strict";n.r(t);var r=n(11),c=n.n(r),o=n(0),i=n(1),u=n(23),a=n(55),l=n(31),s=Object(o.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"})),b=n(8),d=n.n(b),p=n(18),f=n.n(p),g=n(22),m=n(4),O=n(158),h=n(45),j=n(7),v=n(6),w=n(3),y=n(144),_=n(174),k=n(68),E=n(5),S=n.n(E),x=n(71),P=n(147),C=n(157),R=n(846),N=n(53),T=n(96),L=n(30),D=n.n(L),B=(n(2),n(853),function(e){var t=e.className,n=e.onChange,r=void 0===n?function(){}:n,c=e.options,u=void 0===c?[]:c,a=e.checked,l=void 0===a?[]:a,s=e.isLoading,b=void 0!==s&&s,p=e.isDisabled,g=void 0!==p&&p,m=e.limit,O=void 0===m?10:m,h=Object(o.useState)(!1),j=f()(h,2),v=j[0],w=j[1],y=Object(o.useMemo)((function(){return D()(Array(5)).map((function(e,t){return Object(o.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})}))}),[]),_=Object(o.useMemo)((function(){var e=u.length-O;return!v&&Object(o.createElement)("li",{key:"show-more",className:"show-more"},Object(o.createElement)("button",{onClick:function(){w(!0)},"aria-expanded":!1,"aria-label":Object(i.sprintf)(Object(i._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(i.sprintf)(Object(i._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))}),[u,O,v]),k=Object(o.useMemo)((function(){return v&&Object(o.createElement)("li",{key:"show-less",className:"show-less"},Object(o.createElement)("button",{onClick:function(){w(!1)},"aria-expanded":!0,"aria-label":Object(i.__)("Show less options","woo-gutenberg-products-block")},Object(i.__)("Show less","woo-gutenberg-products-block")))}),[v]),E=Object(o.useMemo)((function(){var e=u.length>O+5;return Object(o.createElement)(o.Fragment,null,u.map((function(t,n){return Object(o.createElement)(o.Fragment,{key:t.value},Object(o.createElement)("li",e&&!v&&n>=O&&{hidden:!0},Object(o.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:function(e){r(e.target.value)},checked:l.includes(t.value),disabled:g}),Object(o.createElement)("label",{htmlFor:t.value},t.label)),e&&n===O-1&&_)})),e&&k)}),[u,r,l,v,O,k,_,g]),S=d()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":b},t);return Object(o.createElement)("ul",{className:S},b?y:E)}),I=n(211),A=function(e){var t=e.checked,n=e.getInputProps,r=e.inputRef,c=e.isDisabled,i=e.onFocus,u=e.onRemoveItem,a=e.placeholder,l=e.tabIndex,s=e.value;return Object(o.createElement)("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:c,onFocus:i,onKeyDown:function(e){"Backspace"===e.key&&!s&&t.length>0&&u(t[t.length-1])},placeholder:a,tabIndex:l}))},V=function(e){var t=e.children,n=e.onClick;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},M=function(e){var t=e.checked,n=e.getItemProps,r=e.getMenuProps,c=e.highlightedIndex,u=e.options;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),u.map((function(e,r){var u=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:d()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":u,"is-highlighted":c===r}),index:r,item:e.value,"aria-label":u?Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)})))},F=n(255),H=function(e){var t=e.onRemoveItem,n=e.option;return Object(o.createElement)(F.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:function(){t(n.value)},ariaLabel:Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},z=n(261),q=function(e){var t=e.onClick,n=e.onRemoveItem,r=e.option,c=Object(o.useRef)(null);return Object(o.useEffect)((function(){c.current.focus()}),[c]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:c,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:function(e){e.stopPropagation(),t(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:function(){n(r.value)},onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(i.sprintf)(Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},Object(o.createElement)(a.a,{srcElement:z.a,size:16})))};n(851);function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function U(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){S()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=function(e){var t=e.attributeLabel,n=void 0===t?"":t,r=e.className,c=e.checked,u=void 0===c?[]:c,a=e.inputLabel,l=void 0===a?"":a,s=e.isDisabled,b=void 0!==s&&s,p=e.isLoading,f=void 0!==p&&p,g=e.multiple,m=void 0!==g&&g,O=e.onChange,h=void 0===O?function(){}:O,j=e.options,v=void 0===j?[]:j,w=Object(o.useRef)(null),y=d()(r,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":b,"is-loading":f}),_=Object(o.useCallback)((function(e,t){switch(t.type){case I.a.stateChangeTypes.keyDownEnter:case I.a.stateChangeTypes.clickItem:return U(U({},t),{},{highlightedIndex:e.highlightedIndex,isOpen:m,inputValue:""});case I.a.stateChangeTypes.blurInput:case I.a.stateChangeTypes.mouseUp:return U(U({},t),{},{inputValue:e.inputValue});default:return t}}),[m]);return Object(o.createElement)(I.a,{onChange:h,selectedItem:null,stateReducer:_},(function(e){var t=e.getInputProps,r=e.getItemProps,c=e.getLabelProps,a=e.getMenuProps,s=e.highlightedIndex,p=e.inputValue,f=e.isOpen,g=e.openMenu;return Object(o.createElement)("div",{className:d()(y,{"is-multiple":m,"is-single":!m,"has-checked":u.length>0,"is-open":f})},Object(o.createElement)("label",c({className:"screen-reader-text"}),l),Object(o.createElement)(V,{isOpen:f,onClick:function(){return w.current.focus()}},u.map((function(e){var t=v.find((function(t){return t.value===e})),n=function(e){h(e),w.current.focus()};return m?Object(o.createElement)(H,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(q,{key:e,onClick:function(){return w.current.focus()},onRemoveItem:n,option:t})})),Object(o.createElement)(A,{checked:u,getInputProps:t,inputRef:w,isDisabled:b,onFocus:g,onRemoveItem:function(e){h(e),w.current.focus()},placeholder:u.length>0&&m?null:Object(i.sprintf)(Object(i.__)("Any %s","woo-gutenberg-products-block"),n),tabIndex:!m&&u.length>0?"-1":"0",value:p})),f&&!b&&Object(o.createElement)(M,{checked:u,getItemProps:r,getMenuProps:a,highlightedIndex:s,options:v.filter((function(e){return!p||e.value.startsWith(p)}))}))}))},K=n(247),Q=n(33),W=n.n(Q),J=n(28),$=n(248),X=n(249),Z=n(44),ee=function(e){var t=e.name,n=e.count;return Object(o.createElement)(o.Fragment,null,t,Number.isFinite(n)&&Object(o.createElement)(Z.a,{label:n,screenReaderLabel:Object(i.sprintf)(Object(i._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-block-attribute-filter-list-count"}}))},te=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(ee,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(ee,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(ee,{name:"Red",count:2})}],ne={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(850);function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){S()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var oe=function(e){var t=e.attributes,n=e.isEditor,r=void 0!==n&&n,c=t.isPreview&&!t.attributeId?ne:Object($.a)(t.attributeId),u=Object(o.useState)([]),a=f()(u,2),l=a[0],s=a[1],b=Object(o.useState)(t.isPreview&&!t.attributeId?te:[]),d=f()(b,2),p=d[0],g=d[1],m=Object(P.a)(),O=f()(m,1)[0],h=Object(P.b)("attributes",[]),j=f()(h,2),v=j[0],w=j[1],y=Object(C.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[c.id],shouldSelect:t.attributeId>0}),_=y.results,k=y.isLoading,E="dropdown"!==t.displayStyle&&"and"===t.queryType,S=Object(R.a)({queryAttribute:{taxonomy:c.taxonomy,queryType:t.queryType},queryState:ce(ce({},O),{},{attributes:E?O.attributes:null})}),L=S.results,D=S.isLoading,I=Object(o.useCallback)((function(e){return L.attribute_counts?L.attribute_counts.find((function(t){return t.term===e})):null}),[L]);Object(o.useEffect)((function(){if(!k&&!D){var e=_.map((function(e){var n,r=I(e.id);if(!(r||l.includes(e.slug)||(n=e.slug,null!=O&&O.attributes&&O.attributes.some((function(e){var t=e.attribute,r=e.slug,o=void 0===r?[]:r;return t===c.taxonomy&&o.includes(n)})))))return null;var i=r?r.count:0;return{value:e.slug,name:Object(J.decodeEntities)(e.name),label:Object(o.createElement)(ee,{name:Object(J.decodeEntities)(e.name),count:t.showCounts?i:null})}})).filter(Boolean);g(e)}}),[c.taxonomy,_,k,t.showCounts,D,I,l,O.attributes]),Object(o.useEffect)((function(){t.showFilterButton||H(l)}),[t.showFilterButton,l,H]);var A=Object(o.useMemo)((function(){return v.filter((function(e){return e.attribute===c.taxonomy})).flatMap((function(e){return e.slug}))}),[v,c.taxonomy]),V=Object(N.a)(A),M=Object(T.a)(V);Object(o.useEffect)((function(){W()(M,V)||W()(l,V)||s(V)}),[l,V,M]);var F=Object(o.useCallback)((function(e){return _.reduce((function(t,n){return e.includes(n.slug)&&t.push(n),t}),[])}),[_]),H=Object(o.useCallback)((function(e){r||Object(X.b)(v,w,c,F(e),"or"===t.queryType?"in":"and")}),[r,v,w,c,F,t.queryType]),z="dropdown"!==t.displayStyle||"or"===t.queryType,q=Object(o.useCallback)((function(e){var t,n=function(e){return p.find((function(t){return t.value===e})).name},r=function(e){var t=e.filterAdded,r=e.filterRemoved,c=t?n(t):null,o=r?n(r):null;c&&o?Object(x.speak)(Object(i.sprintf)(Object(i.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),c,o)):c?Object(x.speak)(Object(i.sprintf)(Object(i.__)("%s filter added.","woo-gutenberg-products-block"),c)):o&&Object(x.speak)(Object(i.sprintf)(Object(i.__)("%s filter removed.","woo-gutenberg-products-block"),o))},c=l.includes(e);z?(t=l.filter((function(t){return t!==e})),c?r({filterRemoved:e}):(t.push(e),t.sort(),r({filterAdded:e}))):(t=c?[]:[e],r({filterAdded:c?null:e,filterRemoved:1===l.length?l[0]:null}));s(t)}),[l,p,z]);if(0===p.length&&!k)return null;var G="h".concat(t.headingLevel),U=!t.isPreview&&k,Q=!t.isPreview&&D;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(G,null,t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter"},"dropdown"===t.displayStyle?Object(o.createElement)(Y,{attributeLabel:c.label,checked:l,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:U,multiple:z,onChange:q,options:p}):Object(o.createElement)(B,{className:"wc-block-attribute-filter-list",options:p,checked:l,onChange:q,isLoading:U,isDisabled:Q}),t.showFilterButton&&Object(o.createElement)(K.a,{className:"wc-block-attribute-filter__button",disabled:U||Q,onClick:function(){return H(l)}})))},ie=(n(849),Object(m.withSpokenMessages)((function(e){var t=e.attributes,n=e.setAttributes,r=e.debouncedSpeak,c=t.attributeId,u=t.className,l=t.displayStyle,b=t.heading,d=t.headingLevel,p=t.isPreview,E=t.queryType,S=t.showCounts,x=t.showFilterButton,P=Object(o.useState)(!c&&!p),C=f()(P,2),R=C[0],N=C[1],T=function(){N(!1),r(Object(i.__)("Showing Filter Products by Attribute block preview.","woo-gutenberg-products-block"))},L=function(e){if(e&&e.length){var t=e[0].id,r=Object(j.find)(v.c,["attribute_id",t.toString()]);if(r&&c!==t){var o=r.attribute_label;n({attributeId:t,heading:Object(i.sprintf)(Object(i.__)("Filter by %s","woo-gutenberg-products-block"),o)})}}},D=function(){var e={clear:Object(i.__)("Clear selected attribute","woo-gutenberg-products-block"),list:Object(i.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(i.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(i.__)("Search for a product attribute:","woo-gutenberg-products-block"),selected:function(e){return Object(i.sprintf)(Object(i._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e)},updated:Object(i.__)("Product attribute search results updated.","woo-gutenberg-products-block")},t=Object(j.sortBy)(Object(j.toArray)(Object(j.mapValues)(v.c,(function(e){return{id:parseInt(e.attribute_id,10),name:e.attribute_label}}))),"name");return Object(o.createElement)(h.a,{className:"woocommerce-product-attributes",list:t,selected:t.filter((function(e){return e.id===c})),onChange:L,messages:e,isSingle:!0})};return 0===Object.keys(v.c).length?Object(o.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("p",null,Object(i.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woo-gutenberg-products-block")),Object(o.createElement)(m.Button,{className:"wc-block-attribute-filter__add-attribute-button",isSecondary:!0,href:Object(w.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(i.__)("Add new attribute","woo-gutenberg-products-block")+" ",Object(o.createElement)(a.a,{srcElement:O.a})),Object(o.createElement)(m.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(i.__)("Learn more","woo-gutenberg-products-block"))):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(g.BlockControls,null,Object(o.createElement)(m.ToolbarGroup,{controls:[{icon:"edit",title:Object(i.__)("Edit","woo-gutenberg-products-block"),onClick:function(){return N(!R)},isActive:R}]})),Object(o.createElement)(g.InspectorControls,{key:"inspector"},Object(o.createElement)(m.PanelBody,{title:Object(i.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(m.ToggleControl,{label:Object(i.__)("Product count","woo-gutenberg-products-block"),help:S?Object(i.__)("Product count is visible.","woo-gutenberg-products-block"):Object(i.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:S,onChange:function(){return n({showCounts:!S})}}),Object(o.createElement)("p",null,Object(i.__)("Heading Level","woo-gutenberg-products-block")),Object(o.createElement)(y.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:d,onChange:function(e){return n({headingLevel:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(i.__)("Block Settings","woo-gutenberg-products-block")},Object(o.createElement)(k.a,{label:Object(i.__)("Query Type","woo-gutenberg-products-block"),help:"and"===E?Object(i.__)("Products that have all of the selected attributes will be shown.","woo-gutenberg-products-block"):Object(i.__)("Products that have any of the selected attributes will be shown.","woo-gutenberg-products-block"),value:E,options:[{label:Object(i.__)("And","woo-gutenberg-products-block"),value:"and"},{label:Object(i.__)("Or","woo-gutenberg-products-block"),value:"or"}],onChange:function(e){return n({queryType:e})}}),Object(o.createElement)(k.a,{label:Object(i.__)("Display Style","woo-gutenberg-products-block"),value:l,options:[{label:Object(i.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(i.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:function(e){return n({displayStyle:e})}}),Object(o.createElement)(m.ToggleControl,{label:Object(i.__)("Filter button","woo-gutenberg-products-block"),help:x?Object(i.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(i.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:x,onChange:function(e){return n({showFilterButton:e})}})),Object(o.createElement)(m.PanelBody,{title:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),initialOpen:!1},D())),R?Object(o.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(o.createElement)(a.a,{srcElement:s}),label:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(o.createElement)("div",{className:"wc-block-attribute-filter__selection"},D(),Object(o.createElement)(m.Button,{isPrimary:!0,onClick:T},Object(i.__)("Done","woo-gutenberg-products-block")))):Object(o.createElement)("div",{className:u},Object(o.createElement)(_.a,{headingLevel:d,heading:b,onChange:function(e){return n({heading:e})}}),Object(o.createElement)(m.Disabled,null,Object(o.createElement)(oe,{attributes:t,isEditor:!0}))))})));Object(u.registerBlockType)("woocommerce/attribute-filter",{title:Object(i.__)("Filter Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:s}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Allow customers to filter the grid by product attribute, such as color. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1},example:{attributes:{isPreview:!0}},attributes:{attributeId:{type:"number",default:0},showCounts:{type:"boolean",default:!0},queryType:{type:"string",default:"or"},heading:{type:"string",default:Object(i.__)("Filter by attribute","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},displayStyle:{type:"string",default:"list"},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:ie,save:function(e){var t=e.attributes,n=t.className,r=t.showCounts,i=t.queryType,u=t.attributeId,a=t.heading,l=t.headingLevel,s=t.displayStyle,b=t.showFilterButton,p={"data-attribute-id":u,"data-show-counts":r,"data-query-type":i,"data-heading":a,"data-heading-level":l};return"list"!==s&&(p["data-display-style"]=s),b&&(p["data-show-filter-button"]=b),Object(o.createElement)("div",c()({className:d()("is-loading",n)},p),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},9:function(e,t){!function(){e.exports=this.React}()},95:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(18),c=n.n(r),o=n(0),i=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){return t((function(){throw e}))}),[])}},96:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(9),c=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}}});
|
build/blocks-checkout.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-warning'), 'version' => 'b2c2d651253fcd8341360994bf8245df');
|
build/blocks-checkout.js
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
this.wc=this.wc||{},this.wc.blocksCheckout=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=165)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t,n){e.exports=n(30)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},,function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){var r;
|
2 |
+
/*!
|
3 |
+
Copyright (c) 2017 Jed Watson.
|
4 |
+
Licensed under the MIT License (MIT), see
|
5 |
+
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===i)for(var c in r)n.call(r,c)&&r[c]&&e.push(c)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){!function(){e.exports=this.wp.data}()},,function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t,n){var r=n(24),o=n(25),i=n(20),a=n(26);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()}},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.deprecated}()},,function(e,t,n){var r=n(157);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}},function(e,t){!function(){e.exports=this.wp.primitives}()},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.React}()},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(){e.exports=this.wp.htmlEntities}()},function(e,t,n){var r=n(21);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(44),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(163))},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t,n){"use strict";var r=n(31);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},,function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},,,,,,,function(e,t){!function(){e.exports=this.wc.priceFormat}()},function(e,t){!function(){e.exports=this.wp.warning}()},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(164);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(11),o=n(33);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],u=!1,f=-1;function p(){u&&s&&(u=!1,s.length?l=s.concat(l):f=-1,l.length&&m())}function m(){if(!u){var e=c(p);u=!0;for(var t=l.length;t;){for(s=l,l=[];++f<t;)s&&s[f].run();f=-1,t=l.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||u||c(m)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";n.r(t),n.d(t,"TotalsItem",(function(){return q})),n.d(t,"Subtotal",(function(){return J})),n.d(t,"TotalsTaxes",(function(){return X})),n.d(t,"TotalsFees",(function(){return te})),n.d(t,"ShippingRatesControlPackage",(function(){return Le})),n.d(t,"useSlot",(function(){return Ut})),n.d(t,"createSlotFill",(function(){return Bt})),n.d(t,"__experimentalRegisterCheckoutFilters",(function(){return $t})),n.d(t,"__experimentalApplyCheckoutFilter",(function(){return zt})),n.d(t,"ExperimentalOrderMeta",(function(){return cn})),n.d(t,"ExperimentalOrderShippingPackages",(function(){return fn})),n.d(t,"Panel",(function(){return Ee})),n.d(t,"SlotFillProvider",(function(){return dt}));var r=n(0),o=n(1),i=n.n(o),a=n(6),c=n.n(a),s=n(16),l=n.n(s),u=n(3),f=n.n(u),p=n(14),m=n.n(p),g=n(17),d=n.n(g);function b(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 h(){return(h=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 v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(){}function S(){}S.resetWarningCache=j;var w=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:S,resetWarningCache:j};return n.PropTypes=n,n}()}));function E(){}function x(e){return!!(e||"").match(/\d/)}function k(e){return null==e}function P(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function _(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNagation:n,addNegation:r}}function C(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function F(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function R(e,t,n){return Math.min(Math.max(e,t),n)}function N(e){return Math.max(e.selectionStart,e.selectionEnd)}var T={thousandSeparator:w.oneOfType([w.string,w.oneOf([!0])]),decimalSeparator:w.string,allowedDecimalSeparators:w.arrayOf(w.string),thousandsGroupStyle:w.oneOf(["thousand","lakh","wan"]),decimalScale:w.number,fixedDecimalScale:w.bool,displayType:w.oneOf(["input","text"]),prefix:w.string,suffix:w.string,format:w.oneOfType([w.string,w.func]),removeFormatting:w.func,mask:w.oneOfType([w.string,w.arrayOf(w.string)]),value:w.oneOfType([w.number,w.string]),defaultValue:w.oneOfType([w.number,w.string]),isNumericString:w.bool,customInput:w.elementType,allowNegative:w.bool,allowEmptyFormatting:w.bool,allowLeadingZeros:w.bool,onValueChange:w.func,onKeyDown:w.func,onMouseUp:w.func,onChange:w.func,onFocus:w.func,onBlur:w.func,type:w.oneOf(["text","tel","password"]),isAllowed:w.func,renderText:w.func,getInputRef:w.oneOfType([w.func,w.shape({current:w.any})])},D={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:E,onChange:E,onKeyDown:E,onMouseUp:E,onFocus:E,onBlur:E,isAllowed:function(){return!0}},I=function(e){function t(e){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n=!(o=v(t).call(this,e))||"object"!=typeof o&&"function"!=typeof o?O(r):o;var i=e.defaultValue;n.validateProps();var a=n.formatValueProp(i);return n.state={value:a,numAsString:n.removeFormatting(a)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(O(n)),n.onKeyDown=n.onKeyDown.bind(O(n)),n.onMouseUp=n.onMouseUp.bind(O(n)),n.onFocus=n.onFocus.bind(O(n)),n.onBlur=n.onBlur.bind(O(n)),n}var n,r,o;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,i=n.numAsString,a=void 0===i?"":i;if(e!==t){this.validateProps();var c=this.formatNumString(a),s=k(t.value)?c:this.formatValueProp(),l=this.removeFormatting(s),u=parseFloat(l),f=parseFloat(a);(isNaN(u)&&isNaN(f)||u===f)&&c===o&&(null!==r||s===o)||this.updateValue({formattedValue:s,numAsString:l,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),i="-"===e[0];i&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var a=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(e="".concat(e.substring(0,a),".").concat(e.substring(a+1,e.length).replace(new RegExp(P(r),"g"),""))),i&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,i=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!i||0===o||t||r?"":"|"+P(i)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){F(e,t),setTimeout((function(){e.value===n&&F(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,a=r.format;if(""===e)return 0;if(t=R(t,0,e.length),!a){var c="-"===e[0];return R(t,o.length+(c?1:0),e.length-i.length)}if("function"==typeof a)return t;if("#"===a[t]&&x(e[t]))return t;if("#"===a[t-1]&&x(e[t-1]))return t;var s=a.indexOf("#");t=R(t,s,a.lastIndexOf("#")+1);for(var l=a.substring(t,a.length).indexOf("#"),u=t,f=t+(-1===l?0:l);u>s&&("#"!==a[u]||!x(e[u]));)u-=1;return!x(e[f])||"left"===n&&t!==s||t-u<f-t?x(e[u])?u+1:u:f}},{key:"getCaretPosition",value:function(e,t,n){var r,o,i=this.props.format,a=this.state.value,c=this.getNumberRegex(!0),s=(e.match(c)||[]).join(""),l=(t.match(c)||[]).join("");for(r=0,o=0;o<n;o++){var u=e[o]||"",f=t[r]||"";if((u.match(c)||u===f)&&("0"!==u||!f.match(c)||"0"===f||s.length===l.length)){for(;u!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof i||a||(r=t.length),r=this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var a=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,i&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,i=t.length;o<=i;o++){var a=t[o]||"",c=o===i?e.length:e.indexOf(a,n);if(-1===c){r=e;break}r+=e.substring(n,c),n=c+a.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,i=t.length;o<i;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,i=t.suffix,a=t.allowNegative,c=t.thousandsGroupStyle,s=this.getSeparators(),l=s.thousandSeparator,u=s.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=_(e,a),m=p.beforeDecimal,g=p.afterDecimal,d=p.addNegation;return void 0!==n&&(g=C(g,n,r)),l&&(m=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(m,l,c)),o&&(m=o+m),i&&(g+=i),d&&(m="-"+m),e=m+(f&&u||"")+g}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,a=this.props,c=a.value,s=a.isNumericString,l=!(c=k(c)?e:c)&&0!==c;return l&&i&&(c=""),l&&!i?"":("number"==typeof c&&(c=c.toString(),s=!0),"Infinity"===c&&s&&(c=""),s&&!n&&"number"==typeof r&&(c=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=_(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNagation,s=parseFloat("0.".concat(a||"0")).toFixed(t).split("."),l=i.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),s[0]),u=C(s[1]||"",Math.min(t,a.length),n),f=r?".":"";return"".concat(c?"-":"").concat(l).concat(f).concat(u)}(c,r,o)),s?this.formatNumString(c):this.formatInput(c))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,a=n.decimalScale,c=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-i.length||a&&c&&t[e]===s))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,i=r.allowNegative,a=r.prefix,c=r.suffix,s=r.decimalScale,l=this.getSeparators(),u=l.allowedDecimalSeparators,f=l.decimalSeparator,p=this.state.numAsString||"",m=this.selectionBeforeInput,g=m.selectionStart,d=m.selectionEnd,b=function(e,t){for(var n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[i-1-r]&&i-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),h=b.start,v=b.end;if(!o&&h===v&&-1!==u.indexOf(n[g])){var y=0===s?"":f;return n.substr(0,g)+y+n.substr(g+1,n.length)}var O=o?0:a.length,j=t.length-(o?0:c.length);if(n.length>t.length||!n.length||h===v||0===g&&d===t.length||g===O&&d===j)return n;if(this.checkIfFormatGotDeleted(h,v,t)&&(n=t),!o){var S=this.removeFormatting(n),w=_(S,i),E=w.beforeDecimal,x=w.afterDecimal,k=w.addNegation,P=e<n.indexOf(f)+1;if(S.length<p.length&&P&&""===E&&!parseFloat(x))return k?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,i=e.numAsString,a=e.caretPos,c=this.props.onValueChange,s=this.state.value;if(n)if(o){if(!a){var l=e.inputValue||n.value,u=N(n);n.value=t,a=this.getCaretPosition(l,t,u)}this.setPatchedCaretPosition(n,a,t)}else n.value=t;void 0===i&&(i=this.removeFormatting(t)),t!==s&&(this.setState({value:t,numAsString:i}),c(this.getValueObject(t,i)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,i=o.isAllowed,a=r.value||"",c=N(t);n=this.correctInputValue(c,a,n);var s=this.formatInput(n)||"",l=this.removeFormatting(s);i(this.getValueObject(s,l))||(s=a),this.updateValue({formattedValue:s,numAsString:l,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,i=t.allowLeadingZeros,a=n.numAsString,c=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(a))&&(a=""),i||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(a));var s=this.formatNumString(a);if(s!==c)return this.updateValue({formattedValue:s,numAsString:a,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,i=n.selectionEnd,a=n.value,c=void 0===a?"":a,s=this.props,l=s.decimalScale,u=s.fixedDecimalScale,f=s.prefix,p=s.suffix,m=s.format,g=s.onKeyDown,d=void 0!==l&&u,b=this.getNumberRegex(!1,d),h=new RegExp("-"),v="string"==typeof m;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===i){var y=t,O=v?m.indexOf("#"):f.length,j=v?m.lastIndexOf("#")+1:c.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var S="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(c,t,S)}else if("Delete"!==r||b.test(c[t])||h.test(c[t])){if("Backspace"===r&&!b.test(c[t]))if(o<=O+1&&"-"===c[0]&&void 0===m){var w=c.substring(1);this.updateValue({formattedValue:w,caretPos:y,input:n})}else if(!h.test(c[t])){for(;!b.test(c[y-1])&&y>O;)y--;y=this.correctCaretPosition(c,y,"left")}}else for(;!b.test(c[y])&&y<j;)y++;(y!==t||t<O||t>j)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,c)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,c),g(e)}else g(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,i=void 0===o?"":o;if(n===r){var a=this.correctCaretPosition(i,n);a!==n&&this.setPatchedCaretPosition(t,a,i)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,i=n.value,a=void 0===i?"":i,c=t.correctCaretPosition(a,r);c===r||0===r&&o===a.length||t.setPatchedCaretPosition(n,c,a),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,i=r.displayType,a=r.customInput,c=r.renderText,s=r.getInputRef,l=r.format,u=this.state.value,f=(e=this.props,t=T,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),p=h({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(l)?"numeric":void 0},f,{type:o,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return c?c(u)||null:d.a.createElement("span",h({},f,{ref:s}),u);if(a){var m=a;return d.a.createElement(m,h({},p,{ref:s}))}return d.a.createElement("input",h({},p,{ref:s}))}}])&&b(n.prototype,r),o&&b(n,o),t}(d.a.Component);I.propTypes=T,I.defaultProps=D;var A=I;n(158);function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=function(e){var t=e.className,n=e.value,o=e.currency,i=e.onValueChange,a=m()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var s=n/Math.pow(10,o.minorUnit);if(!Number.isFinite(s))return null;var u=c()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),f=M(M(M({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(o)),{},{value:void 0,currency:void 0,onValueChange:void 0}),p=i?function(e){var t=e.value*Math.pow(10,o.minorUnit);i(t)}:function(){};return Object(r.createElement)(A,l()({className:u},f,{value:s,onValueChange:p}))},U=(n(156),function(e){var t=e.className,n=e.currency,o=e.label,i=e.value,a=e.description;return Object(r.createElement)("div",{className:c()("wc-block-components-totals-item",t)},Object(r.createElement)("span",{className:"wc-block-components-totals-item__label"},o),Object(r.isValidElement)(i)?Object(r.createElement)("div",{className:"wc-block-components-totals-item__value"},i):Object(r.createElement)(L,{className:"wc-block-components-totals-item__value",currency:n,displayType:"text",value:i}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},a))});U.propTypes={currency:i.a.object,label:i.a.string.isRequired,value:i.a.oneOfType([i.a.number,i.a.node]),className:i.a.string,description:i.a.node};var q=U,B=n(9),W=n(2),K=Object(W.getSetting)("currentUserIsAdmin",!1),G=(Object(W.getSetting)("reviewRatingsEnabled",!0),Object(W.getSetting)("showAvatars",!0),Object(W.getSetting)("max_columns",6),Object(W.getSetting)("min_columns",1),Object(W.getSetting)("default_columns",3),Object(W.getSetting)("max_rows",6),Object(W.getSetting)("min_rows",1),Object(W.getSetting)("default_rows",3),Object(W.getSetting)("min_height",500),Object(W.getSetting)("default_height",500),Object(W.getSetting)("placeholderImgSrc",""),Object(W.getSetting)("thumbnail_size",300),Object(W.getSetting)("isLargeCatalog"),Object(W.getSetting)("limitTags"),Object(W.getSetting)("hasProducts",!0),Object(W.getSetting)("hasTags",!0),Object(W.getSetting)("homeUrl",""),Object(W.getSetting)("couponsEnabled",!0),Object(W.getSetting)("shippingEnabled",!0),Object(W.getSetting)("taxesEnabled",!0)),$=Object(W.getSetting)("displayItemizedTaxes",!1),z=(Object(W.getSetting)("hasDarkEditorStyleSupport",!1),Object(W.getSetting)("displayShopPricesIncludingTax",!1),Object(W.getSetting)("displayCartPricesIncludingTax",!1)),H=(Object(W.getSetting)("productCount",0),Object(W.getSetting)("attributes",[]),Object(W.getSetting)("isShippingCalculatorEnabled",!0),Object(W.getSetting)("isShippingCostHidden",!1),Object(W.getSetting)("woocommerceBlocksPhase",1),Object(W.getSetting)("wcBlocksAssetUrl",""),Object(W.getSetting)("wcBlocksBuildUrl",""),Object(W.getSetting)("shippingCountries",{}),Object(W.getSetting)("allowedCountries",{}),Object(W.getSetting)("shippingStates",{}),Object(W.getSetting)("allowedStates",{}),Object(W.getSetting)("shippingMethodsExist",!1),Object(W.getSetting)("paymentGatewaySortOrder",[]),Object(W.getSetting)("checkoutShowLoginReminder",!0),{id:0,title:"",permalink:""}),Y=Object(W.getSetting)("storePages",{myaccount:H,shop:H,cart:H,checkout:H,privacy:H,terms:H}),Z=(Y.shop.permalink,Y.checkout.id,Y.checkout.permalink,Y.privacy.permalink,Y.privacy.title,Y.terms.permalink,Y.terms.title,Y.cart.id,Y.cart.permalink,Object(W.getSetting)("checkoutAllowsGuest",!1),Object(W.getSetting)("checkoutAllowsSignup",!1),Y.myaccount.permalink?Y.myaccount.permalink:Object(W.getSetting)("loginUrl","/wp-login.php"),n(35),function(e){var t=e.currency,n=e.values,o=e.className,i=n.total_items,a=n.total_items_tax,c=parseInt(i,10),s=parseInt(a,10);return Object(r.createElement)(q,{className:o,currency:t,label:Object(B.__)("Subtotal","woo-gutenberg-products-block"),value:z?c+s:c})});Z.propTypes={currency:i.a.object.isRequired,values:i.a.shape({total_items:i.a.string,total_items_tax:i.a.string}).isRequired,className:i.a.string};var J=Z,Q=function(e){var t=e.currency,n=e.values,o=e.className,i=n.total_tax,a=n.tax_lines;return G?$?Object(r.createElement)(r.Fragment,null,a.map((function(e,n){var o=e.name,i=e.price;return Object(r.createElement)(q,{key:"tax-line-".concat(n),className:"wc-block-components-totals-taxes",currency:t,label:o,value:parseInt(i,10)})}))," "):Object(r.createElement)(q,{className:c()("wc-block-components-totals-taxes",o),currency:t,label:Object(B.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(i,10)}):null};Q.propTypes={currency:i.a.object.isRequired,values:i.a.shape({total_tax:i.a.string}).isRequired,className:i.a.string};var X=Q,ee=function(e){var t=e.currency,n=e.cartFees,o=e.className;return Object(r.createElement)(r.Fragment,null,n.map((function(e){var n=e.id,i=e.name,a=e.totals,s=parseInt(a.total,10);if(!s)return null;var l=parseInt(a.total_tax,10);return Object(r.createElement)(q,{key:n,className:c()("wc-block-components-totals-fees",o),currency:t,label:i||Object(B.__)("Fee","woo-gutenberg-products-block"),value:z?s+l:s})})))};ee.propTypes={currency:i.a.object.isRequired,cartFees:i.a.array.isRequired,className:i.a.string};var te=ee,ne=n(19);function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ie=function(e){var t,n=e.label,o=e.screenReaderLabel,i=e.wrapperElement,a=e.wrapperProps,s=void 0===a?{}:a,l=null!=n,u=null!=o;return!l&&u?(t=i||"span",s=oe(oe({},s),{},{className:c()(s.className,"screen-reader-text")}),Object(r.createElement)(t,s,o)):(t=i||g.Fragment,l&&u&&n!==o?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,s,n))};ie.propTypes={label:i.a.node,screenReaderLabel:i.a.node,wrapperElement:i.a.elementType,wrapperProps:i.a.object};var ae=ie,ce=(n(160),function(e){var t=e.children,n=e.className,o=e.headingLevel,i=m()(e,["children","className","headingLevel"]),a=c()("wc-block-components-title",n),s="h".concat(o);return Object(r.createElement)(s,l()({className:a},i),t)});ce.propTypes={headingLevel:i.a.oneOf(["1","2","3","4","5","6"]).isRequired,className:i.a.string,children:i.a.node};var se=ce,le=n(10),ue=n.n(le),fe=n(29),pe=n.n(fe),me=n(7),ge=n(23),de=function(){var e,t,n=(e=Object(r.useState)(),t=ue()(e,2)[1],Object(r.useCallback)((function(e){return t((function(){throw e}))}),[])),o=Object(me.useDispatch)(ge.CART_STORE_KEY).selectShippingRate;return{selectShippingRate:Object(r.useCallback)((function(e,t){o(e,t).catch((function(e){n(e)}))}),[n,o]),isSelectingRate:Object(me.useSelect)((function(e){return e(ge.CART_STORE_KEY).isShippingRateBeingSelected()}),[])}},be=function(e){var t;return null===(t=e.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id};function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,o=m()(e,["srcElement","size"]);return Object(g.isValidElement)(t)&&Object(g.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},o))}ve.propTypes={srcElement:i.a.element,size:i.a.number};var ye=ve,Oe=n(15),je=Object(r.createElement)(Oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.6 1-1.2z"})),Se=Object(r.createElement)(Oe.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),we=(n(162),function(e){var t=e.children,n=e.className,o=e.initialOpen,i=void 0!==o&&o,a=e.hasBorder,s=void 0!==a&&a,l=e.title,u=e.titleTag,f=void 0===u?"div":u,p=Object(r.useState)(i),m=ue()(p,2),g=m[0],d=m[1];return Object(r.createElement)("div",{className:c()(n,"wc-blocks-components-panel",{"has-border":s})},Object(r.createElement)(f,null,Object(r.createElement)("button",{"aria-expanded":g,className:"wc-blocks-components-panel__button",onClick:function(){return d(!g)}},Object(r.createElement)(ye,{"aria-hidden":"true",className:"wc-blocks-components-panel__button-icon",srcElement:g?je:Se}),l)),Object(r.createElement)("div",{className:"wc-blocks-components-panel__content",hidden:!g},t))});we.propTypes={className:i.a.string,hasBorder:i.a.bool,initialOpen:i.a.bool,title:i.a.node,titleTag:i.a.string};var Ee=we;function xe(){return(xe=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)}var ke=n(5);var Pe=function(e,t){return function(n){var r=e(n),o=n.displayName,i=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(ke.upperFirst)(Object(ke.camelCase)(t)),"(").concat(i,")"),r}},_e=new WeakMap;function Ce(e,t){return Object(r.useMemo)((function(){var n=function(e){var t=_e.get(e)||0;return _e.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}var Fe=Pe((function(e){return function(t){var n=Ce(e);return Object(r.createElement)(e,xe({},t,{instanceId:n}))}}),"withInstanceId"),Re=function(e){var t=e.label,n=e.secondaryLabel,o=e.description,i=e.secondaryDescription,a=e.id;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:a?"".concat(a,"__label"):null,className:"wc-block-components-radio-control__label"},t),n&&Object(r.createElement)("span",{id:a?"".concat(a,"__secondary-label"):null,className:"wc-block-components-radio-control__secondary-label"},n)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},o&&Object(r.createElement)("span",{id:a?"".concat(a,"__description"):null,className:"wc-block-components-radio-control__description"},o),i&&Object(r.createElement)("span",{id:a?"".concat(a,"__secondary-description"):null,className:"wc-block-components-radio-control__secondary-description"},i)))},Ne=function(e){var t,n=e.checked,o=e.name,i=e.onChange,a=e.option,s=a.value,l=a.label,u=a.description,p=a.secondaryLabel,m=a.secondaryDescription;return Object(r.createElement)("label",{className:c()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":n}),htmlFor:"".concat(o,"-").concat(s)},Object(r.createElement)("input",{id:"".concat(o,"-").concat(s),className:"wc-block-components-radio-control__input",type:"radio",name:o,value:s,onChange:function(e){return i(e.target.value)},checked:n,"aria-describedby":c()((t={},f()(t,"".concat(o,"-").concat(s,"__label"),l),f()(t,"".concat(o,"-").concat(s,"__secondary-label"),p),f()(t,"".concat(o,"-").concat(s,"__description"),u),f()(t,"".concat(o,"-").concat(s,"__secondary-description"),m),t))}),Object(r.createElement)(Re,{id:"".concat(o,"-").concat(s),label:l,secondaryLabel:p,description:u,secondaryDescription:m}))},Te=(n(161),Fe((function(e){var t=e.className,n=e.instanceId,o=e.id,i=e.selected,a=e.onChange,s=e.options,l=void 0===s?[]:s,u=o||n;return l.length&&Object(r.createElement)("div",{className:c()("wc-block-components-radio-control",t)},l.map((function(e){return Object(r.createElement)(Ne,{key:"".concat(u,"-").concat(e.value),name:"radio-control-".concat(u),checked:e.value===i,option:e,onChange:function(t){a(t),"function"==typeof e.onChange&&e.onChange(t)}})})))}))),De=n(43),Ie=function(e){var t=z?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(ne.decodeEntities)(e.name),value:e.rate_id,description:Object(r.createElement)(r.Fragment,null,Number.isFinite(t)&&Object(r.createElement)(L,{currency:Object(De.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(ne.decodeEntities)(e.delivery_time))}},Ae=function(e){var t=e.className,n=e.noResultsMessage,o=e.onSelectRate,i=e.rates,a=e.renderOption,c=void 0===a?Ie:a,s=e.selected;if(0===i.length)return n;if(i.length>1)return Object(r.createElement)(Te,{className:t,onChange:function(e){o(e)},selected:s,options:i.map(c)});var l=c(i[0]),u=l.label,f=l.secondaryLabel,p=l.description,m=l.secondaryDescription;return Object(r.createElement)(Re,{label:u,secondaryLabel:f,description:p,secondaryDescription:m})};Ae.propTypes={onSelectRate:i.a.func.isRequired,rates:i.a.arrayOf(i.a.object).isRequired,renderOption:i.a.func,className:i.a.string,noResultsMessage:i.a.node,selected:i.a.string};var Ve=Ae,Me=(n(159),function(e){var t=e.packageId,n=e.className,o=e.noResultsMessage,i=e.renderOption,a=e.packageData,s=e.collapsible,l=void 0!==s&&s,u=e.collapse,f=void 0!==u&&u,p=e.showItems,m=void 0!==p&&p,g=function(e,t){var n=de(),o=n.selectShippingRate,i=n.isSelectingRate,a=Object(r.useState)((function(){return be(t)})),c=ue()(a,2),s=c[0],l=c[1],u=Object(r.useRef)(t);return Object(r.useEffect)((function(){pe()(u.current,t)||(u.current=t,l(be(t)))}),[t]),{selectShippingRate:Object(r.useCallback)((function(t){l(t),o(t,e)}),[e,o]),selectedShippingRate:s,isSelectingRate:i}}(t,a.shipping_rates),d=g.selectShippingRate,b=g.selectedShippingRate,h=Object(r.createElement)(r.Fragment,null,(m||l)&&Object(r.createElement)(se,{className:"wc-block-components-shipping-rates-control__package-title",headingLevel:"3"},a.name),m&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(a.items).map((function(e){var t=Object(ne.decodeEntities)(e.name),n=e.quantity;return Object(r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(ae,{label:n>1?"".concat(t," × ").concat(n):"".concat(t),screenReaderLabel:Object(B.sprintf)(Object(B._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))})))),v=Object(r.createElement)(Ve,{className:n,noResultsMessage:o,rates:a.shipping_rates,onSelectRate:d,selected:b,renderOption:i});return l?Object(r.createElement)(Ee,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!f,title:h},v):Object(r.createElement)("div",{className:c()("wc-block-components-shipping-rates-control__package",n)},h,v)});Me.propTypes={renderOption:i.a.func,packageData:i.a.shape({shipping_rates:i.a.arrayOf(i.a.object).isRequired,items:i.a.arrayOf(i.a.shape({name:i.a.string.isRequired,key:i.a.string.isRequired,quantity:i.a.number.isRequired}).isRequired).isRequired}).isRequired,className:i.a.string,collapsible:i.a.bool,noResultsMessage:i.a.node,showItems:i.a.bool};var Le=Me;n(12);function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qe=n(22);function Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(n),!0).forEach((function(t){Ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Be(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e){var t=Object(r.useContext)(qe.a),n=t.slots[e]||{},o=t.fills[e],i=Object(r.useMemo)((function(){return o||[]}),[o]),a=Object(r.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),c=Object(r.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),s=Object(r.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),l=Object(r.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return We(We({},n),{},{updateSlot:a,unregisterSlot:c,fills:i,registerFill:s,unregisterFill:l})}function Ge(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function $e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(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 He(e,t,n){return t&&ze(e.prototype,t),n&&ze(e,n),e}function Ye(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ze(e){return(Ze=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Je(e,t,n){return(Je="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ze(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xe(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&&Qe(e,t)}function et(e){return(et="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 tt(e,t){return!t||"object"!==et(t)&&"function"!=typeof t?Ye(e):t}function nt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rt(e,t){if(e){if("string"==typeof e)return nt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nt(e,t):void 0}}function ot(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}}(e,t)||rt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function it(e){return function(e){if(Array.isArray(e))return nt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||rt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(e){var t=function(e,t){if("object"!==et(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===et(t)?t:String(t)}function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){Ue(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lt(e){var t,n,o,i,a,c,s,l,u,f,p,m=e.children,g=(t=ot(Object(r.useState)({}),2),n=t[0],o=t[1],i=ot(Object(r.useState)({}),2),a=i[0],c=i[1],s=Object(r.useCallback)((function(e,t,n){o((function(r){var o=r[e]||{};return st(st({},r),{},Ue({},e,st(st({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),l=Object(r.useCallback)((function(e,t){o((function(n){var r=n[e],o=Ge(n,[e].map(at));return(null==r?void 0:r.ref)===t?o:n}))}),[]),u=Object(r.useCallback)((function(e,t){var r=n[e];if(r&&!pe()(r.fillProps,t)){r.fillProps=t;var o=a[e];o&&o.map((function(e){return e.current.rerender()}))}}),[n,a]),f=Object(r.useCallback)((function(e,t){c((function(n){return st(st({},n),{},Ue({},e,[].concat(it(n[e]||[]),[t])))}))}),[]),p=Object(r.useCallback)((function(e,t){c((function(n){return n[e]?st(st({},n),{},Ue({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(r.useMemo)((function(){return{slots:n,fills:a,registerSlot:s,updateSlot:u,unregisterSlot:l,registerFill:f,unregisterFill:p}}),[n,a,s,u,l,f,p]));return Object(r.createElement)(qe.a.Provider,{value:g},m)}function ut(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var o=Ze(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tt(this,n)}}var ft=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),pt=ft.Provider,mt=ft.Consumer,gt=function(e){Xe(n,e);var t=ut(n);function n(){var e;return $e(this,n),(e=t.apply(this,arguments)).registerSlot=e.registerSlot.bind(Ye(e)),e.registerFill=e.registerFill.bind(Ye(e)),e.unregisterSlot=e.unregisterSlot.bind(Ye(e)),e.unregisterFill=e.unregisterFill.bind(Ye(e)),e.getSlot=e.getSlot.bind(Ye(e)),e.getFills=e.getFills.bind(Ye(e)),e.hasFills=e.hasFills.bind(Ye(e)),e.subscribe=e.subscribe.bind(Ye(e)),e.slots={},e.fills={},e.listeners=[],e.contextValue={registerSlot:e.registerSlot,unregisterSlot:e.unregisterSlot,registerFill:e.registerFill,unregisterFill:e.unregisterFill,getSlot:e.getSlot,getFills:e.getFills,hasFills:e.hasFills,subscribe:e.subscribe},e}return He(n,[{key:"registerSlot",value:function(e,t){var n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}},{key:"registerFill",value:function(e,t){this.fills[e]=[].concat(it(this.fills[e]||[]),[t]),this.forceUpdateSlot(e)}},{key:"unregisterSlot",value:function(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}},{key:"unregisterFill",value:function(e,t){this.fills[e]=Object(ke.without)(this.fills[e],t),this.resetFillOccurrence(e),this.forceUpdateSlot(e)}},{key:"getSlot",value:function(e){return this.slots[e]}},{key:"getFills",value:function(e,t){return this.slots[e]!==t?[]:Object(ke.sortBy)(this.fills[e],"occurrence")}},{key:"hasFills",value:function(e){return this.fills[e]&&!!this.fills[e].length}},{key:"resetFillOccurrence",value:function(e){Object(ke.forEach)(this.fills[e],(function(e){e.occurrence=void 0}))}},{key:"forceUpdateSlot",value:function(e){var t=this.getSlot(e);t&&t.forceUpdate()}},{key:"triggerListeners",value:function(){this.listeners.forEach((function(e){return e()}))}},{key:"subscribe",value:function(e){var t=this;return this.listeners.push(e),function(){t.listeners=Object(ke.without)(t.listeners,e)}}},{key:"render",value:function(){return Object(r.createElement)(pt,{value:this.contextValue},Object(r.createElement)(lt,null,this.props.children))}}]),n}(r.Component),dt=gt;function bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ze(e);if(t){var o=Ze(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tt(this,n)}}var ht=function(e){Xe(n,e);var t=bt(n);function n(){var e;return $e(this,n),(e=t.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(Ye(e)),e}return He(n,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||Je(Ze(n.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,o=e.fillProps,i=void 0===o?{}:o,a=e.getFills,c=Object(ke.map)(a(n,this),(function(e){var t=e.occurrence,n=Object(ke.isFunction)(e.children)?e.children(i):e.children;return r.Children.map(n,(function(e,n){if(!e||Object(ke.isString)(e))return e;var o="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:o})}))})).filter(Object(ke.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(ke.isFunction)(t)?t(c):c)}}]),n}(r.Component),vt=function(e){return Object(r.createElement)(mt,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,i=t.getFills;return Object(r.createElement)(ht,xe({},e,{registerSlot:n,unregisterSlot:o,getFills:i}))}))},yt=0;function Ot(e){var t=e.name,n=e.children,o=e.registerFill,i=e.unregisterFill,a=function(e){var t=Object(r.useContext)(ft),n=t.getSlot,o=t.subscribe,i=ot(Object(r.useState)(n(e)),2),a=i[0],c=i[1];return Object(r.useEffect)((function(){return c(n(e)),o((function(){c(n(e))}))}),[e]),a}(t),c=Object(r.useRef)({name:t,children:n});return c.current.occurrence||(c.current.occurrence=++yt),Object(r.useLayoutEffect)((function(){return o(t,c.current),function(){return i(t,c.current)}}),[]),Object(r.useLayoutEffect)((function(){c.current.children=n,a&&a.forceUpdate()}),[n]),Object(r.useLayoutEffect)((function(){t!==c.current.name&&(i(c.current.name,c.current),c.current.name=t,o(t,c.current))}),[t]),a&&a.node?(Object(ke.isFunction)(n)&&(n=n(a.props.fillProps)),Object(r.createPortal)(n,a.node)):null}var jt=function(e){return Object(r.createElement)(mt,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(Ot,xe({},e,{registerFill:n,unregisterFill:o}))}))};function St(e){var t=e.name,n=e.fillProps,o=void 0===n?{}:n,i=e.as,a=void 0===i?"div":i,c=Ge(e,["name","fillProps","as"]),s=Object(r.useContext)(qe.a),l=Object(r.useRef)();return Object(r.useLayoutEffect)((function(){return s.registerSlot(t,l,o),function(){s.unregisterSlot(t,l)}}),[s.registerSlot,s.unregisterSlot,t]),Object(r.useLayoutEffect)((function(){s.updateSlot(t,o)})),Object(r.createElement)(a,xe({ref:l},c))}function wt(e){var t,n=e.name,o=e.children,i=Ke(n),a=Object(r.useRef)({rerender:(t=ot(Object(r.useState)({}),2)[1],function(){return t({})})});return Object(r.useEffect)((function(){return i.registerFill(a),function(){i.unregisterFill(a)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),Object(r.createPortal)(o,i.ref.current)):null}function Et(e){var t=e.bubblesVirtually,n=Ge(e,["bubblesVirtually"]);return t?Object(r.createElement)(St,n):Object(r.createElement)(vt,n)}function xt(e){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(jt,e),Object(r.createElement)(wt,e))}function kt(e){var t=function(t){return Object(r.createElement)(xt,xe({name:e},t))};t.displayName=e+"Fill";var n=function(t){return Object(r.createElement)(Et,xe({name:e},t))};return n.displayName=e+"Slot",{Fill:t,Slot:n}}var Pt=n(18),_t=n.n(Pt),Ct=n(45),Ft=n.n(Ct),Rt=n(33),Nt=n.n(Rt),Tt=n(46),Dt=n.n(Tt),It=n(47),At=n.n(It),Vt=n(36),Mt=n.n(Vt);function Lt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mt()(e);if(t){var o=Mt()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return At()(this,n)}}var Ut,qt=function(e){Dt()(n,e);var t=Lt(n);function n(){var e;_t()(this,n);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return e=t.call.apply(t,[this].concat(o)),f()(Nt()(e),"state",{errorMessage:"",hasError:!1}),e}return Ft()(n,[{key:"render",value:function(){var e=this.props.renderError,t=this.state,n=t.errorMessage;return t.hasError?"function"==typeof e?e(n):Object(r.createElement)("p",null,n):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("strong",null,e.status),": "+e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(g.Component);Ut=Ke;var Bt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=kt(e),o=n.Fill,i=n.Slot,a=function(e){var n=e.children;return Object(r.createElement)(o,null,(function(e){return r.Children.map(n,(function(n){return Object(r.createElement)(qt,{renderError:K?t:function(){return null}},Object(r.cloneElement)(n,e))}))}))},c=function(e){return Object(r.createElement)(i,l()({},e,{bubblesVirtually:!0}))};return{Fill:a,Slot:c}};function Wt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wt(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gt={},$t=function(e,t){Gt=Kt(Kt({},Gt),{},f()({},e,t))},zt=function(e){var t=e.filterName,n=e.defaultValue,r=e.arg,o=void 0===r?null:r,i=e.validation,a=void 0===i?function(){return!0}:i,c=function(e){return Object.keys(Gt).map((function(t){return Gt[t][e]})).filter(Boolean)}(t),s=n;return c.forEach((function(e){try{var t=e(s,o);s=a(t)?t:s}catch(e){console.log(e)}})),s},Ht=Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),Yt=function(){return Object(r.useContext)(Ht)};function Zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zt(Object(n),!0).forEach((function(t){f()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qt={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},Xt=Jt(Jt({},Qt),{},{email:"",phone:""}),en=function(e){return Object(ke.mapValues)(e,(function(e){return Object(ne.decodeEntities)(e)}))},tn={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:Xt,shippingAddress:Qt,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){},extensions:{}},nn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Yt(),n=t.isEditor,r=t.previewData,o=(null==r?void 0:r.previewCart)||{},i=e.shouldSelect,a=Object(me.useSelect)((function(e,t){var r=t.dispatch;if(!i)return tn;if(n)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:[],cartTotals:o.totals,cartIsLoading:!1,cartErrors:[],billingAddress:Xt,shippingAddress:Qt,extensions:{},shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var a=e(ge.CART_STORE_KEY),c=a.getCartData(),s=a.getCartErrors(),l=a.getCartTotals(),u=!a.hasFinishedResolution("getCartData"),f=a.isCustomerDataUpdating(),p=r(ge.CART_STORE_KEY).receiveCart,m=en(c.billingAddress),g=c.needsShipping?en(c.shippingAddress):m,d=c.fees.map((function(e){return en(e)}));return{cartCoupons:c.coupons,cartItems:c.items||[],cartFees:d,cartItemsCount:c.itemsCount,cartItemsWeight:c.itemsWeight,cartNeedsPayment:c.needsPayment,cartNeedsShipping:c.needsShipping,cartItemErrors:c.errors||[],cartTotals:l,cartIsLoading:u,cartErrors:s,billingAddress:m,shippingAddress:g,extensions:c.extensions||{},shippingRates:c.shippingRates||[],shippingRatesLoading:f,cartHasCalculatedShipping:c.hasCalculatedShipping,paymentRequirements:c.paymentRequirements||[],receiveCart:p}}),[i]);return a},rn=Bt("__experimentalOrderMeta"),on=rn.Fill,an=rn.Slot;on.Slot=function(e){var t=e.className,n=nn(),o=n.extensions,i=(n.receiveCart,m()(n,["extensions","receiveCart"]));return Object(r.createElement)(an,{className:c()(t,"wc-block-components-order-meta"),fillProps:{extensions:o,cart:i}})};var cn=on,sn=Bt("__experimentalOrderShippingPackages"),ln=sn.Fill,un=sn.Slot;ln.Slot=function(e){var t=e.className,n=e.collapsible,o=e.noResultsMessage,i=e.renderOption,a=nn(),s=a.extensions,l=(a.receiveCart,m()(a,["extensions","receiveCart"])),u=Ut("__experimentalOrderShippingPackages").fills.length>1;return Object(r.createElement)(un,{className:c()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:n,collapse:u,showItems:u,noResultsMessage:o,renderOption:i,extensions:s,cart:l}})};var fn=ln}]);
|
build/blocks.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wp-blocks', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '705b3ef2bf7a0bc56d3ccd08a574ec0d');
|
build/blocks.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(t){function e(e){for(var r,i,s=e[0],u=e[1],a=e[2],f=0,p=[];f<s.length;f++)i=s[f],Object.prototype.hasOwnProperty.call(o,i)&&o[i]&&p.push(o[i][0]),o[i]=0;for(r in u)Object.prototype.hasOwnProperty.call(u,r)&&(t[r]=u[r]);for(l&&l(e);p.length;)p.shift()();return c.push.apply(c,a||[]),n()}function n(){for(var t,e=0;e<c.length;e++){for(var n=c[e],r=!0,s=1;s<n.length;s++){var u=n[s];0!==o[u]&&(r=!1)}r&&(c.splice(e--,1),t=i(i.s=n[0]))}return t}var r={},o={19:0},c=[];function i(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=t,i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="";var s=window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[],u=s.push.bind(s);s.push=e,s=s.slice();for(var a=0;a<s.length;a++)e(s[a]);var l=u;return c.push([896,0]),n()}({0:function(t,e){!function(){t.exports=this.wp.element}()},1:function(t,e){!function(){t.exports=this.wp.i18n}()},23:function(t,e){!function(){t.exports=this.wp.blocks}()},31:function(t,e){!function(){t.exports=this.wp.primitives}()},55:function(t,e,n){"use strict";var r=n(5),o=n.n(r),c=n(24),i=n.n(c),s=n(9);n(2);function u(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}e.a=function(t){var e=t.srcElement,n=t.size,r=void 0===n?24:n,c=i()(t,["srcElement","size"]);return Object(s.isValidElement)(e)&&Object(s.cloneElement)(e,function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){o()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({width:r,height:r},c))}},561:function(t,e){},562:function(t,e){},63:function(t,e){!function(){t.exports=this.wp.hooks}()},7:function(t,e){!function(){t.exports=this.lodash}()},896:function(t,e,n){"use strict";n.r(e);var r=n(30),o=n.n(r),c=n(0),i=n(23),s=n(1),u=n(55),a=n(11),l=n.n(a),f=n(24),p=n.n(f),b=n(31),h=n(8),m=n.n(h),d=Object(c.createElement)((function(t){var e=t.className,n=t.height,r=t.width,o=p()(t,["className","height","width"]);return Object(c.createElement)(b.SVG,l()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 245 145",className:m()("woo-icon",e),width:r,height:n},o),Object(c.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))}),null),w=Object(c.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M12 11a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1M4.2 4.2c1.5-1.4 4.5-.8 7.8 1.4 3.3-2.2 6.4-2.8 7.8-1.4 1.4 1.5.8 4.5-1.4 7.8 2.2 3.3 2.8 6.4 1.4 7.8-1.4 1.4-4.6.8-7.8-1.4-3.3 2.2-6.3 2.8-7.8 1.4-1.4-1.4-.8-4.6 1.4-7.8-2.2-3.3-2.8-6.3-1.4-7.8m11.3 4.3a29 29 0 011.7 1.8c1.4-2 2-4 1.2-4.7-.8-.7-2.6-.2-4.7 1.2l1.8 1.7m-7 7a29 29 0 01-1.7-1.8c-1.4 2-2 4-1.2 4.7.8.7 2.6.2 4.7-1.2a29 29 0 01-1.8-1.7M5.6 5.6c-.7.8-.2 2.6 1.2 4.7a29 29 0 013.5-3.5c-2-1.4-4-2-4.7-1.2m4.3 8.5l2.1 2a28.1 28.1 0 004-4.1 28.1 28.1 0 00-4-4 28.1 28.1 0 00-4 4l1.9 2.1m8.5 4.3c.7-.8.2-2.6-1.2-4.7a29 29 0 01-3.5 3.5c2 1.4 4 2 4.7 1.2z"})),v=(n(561),n(562),n(14)),O=n.n(v),g=n(15),y=n.n(g),j=n(12),k=n.n(j),E=n(16),x=n.n(E),P=n(17),D=n.n(P),M=n(10),W=n.n(M),z=n(5),A=n.n(z),S=n(139),_=n(63);function B(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=W()(t);if(e){var o=W()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return D()(this,n)}}var C=Object(S.a)((function(t){return function(e){x()(r,e);var n=B(r);function r(){var t;O()(this,r);for(var e=arguments.length,o=new Array(e),c=0;c<e;c++)o[c]=arguments[c];return t=n.call.apply(n,[this].concat(o)),A()(k()(t),"mounted",!1),t}return y()(r,[{key:"componentDidMount",value:function(){var t=this.props,e=t.block,n=t.setAttributes;e.name.startsWith("woocommerce/")&&n(this.getAttributesWithDefaults())}},{key:"componentDidUpdate",value:function(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}},{key:"getAttributesWithDefaults",value:function(){var t=Object(i.getBlockType)(this.props.block.name),e=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==t.attributes&&void 0!==t.defaults&&(e=Object.assign({},this.props.attributes||{}),Object.keys(t.attributes).map((function(n){return void 0===e[n]&&void 0!==t.defaults[n]&&(e[n]=t.defaults[n]),n}))),e}},{key:"render",value:function(){return Object(c.createElement)(t,l()({},this.props,{attributes:this.getAttributesWithDefaults()}))}}]),r}(c.Component)}),"withDefaultAttributes");Object(_.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",C);Object(_.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",(function(t,e){return e.name.startsWith("woocommerce/")&&Object.keys(e.attributes).map((function(n){return void 0===t[n]&&void 0!==e.defaults&&void 0!==e.defaults[n]&&(t[n]=e.defaults[n]),n})),t})),Object(i.setCategories)([].concat(o()(Object(i.getCategories)().filter((function(t){var e=t.slug;return"woocommerce"!==e&&"woocommerce-product-elements"!==e}))),[{slug:"woocommerce",title:Object(s.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(c.createElement)(u.a,{srcElement:d})},{slug:"woocommerce-product-elements",title:Object(s.__)("WooCommerce Product Elements","woo-gutenberg-products-block"),icon:Object(c.createElement)(u.a,{srcElement:w,style:{fill:"#874FB9"}})}]))},9:function(t,e){!function(){t.exports=this.React}()}});
|
build/cart-frontend.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-warning', 'wp-wordcount'), 'version' => '3fefb07841dd7c54d4468ebed716713b');
|
build/cart-frontend.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=229)}([function(e,t){!function(){e.exports=this.wp.element}()},function(e,t){!function(){e.exports=this.wp.i18n}()},function(e,t){!function(){e.exports=this.React}()},function(e,t,n){e.exports=n(71)()},function(e,t){!function(){e.exports=this.wc.wcSettings}()},function(e,t,n){var r;
|
2 |
+
/*!
|
3 |
+
Copyright (c) 2017 Jed Watson.
|
4 |
+
Licensed under the MIT License (MIT), see
|
5 |
+
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var c=typeof r;if("string"===c||"number"===c)e.push(r);else if(Array.isArray(r)&&r.length){var a=o.apply(null,r);a&&e.push(a)}else if("object"===c)for(var i in r)n.call(r,i)&&r[i]&&e.push(i)}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){!function(){e.exports=this.lodash}()},function(e,t,n){"use strict";n.d(t,"j",(function(){return o})),n.d(t,"u",(function(){return c})),n.d(t,"y",(function(){return a})),n.d(t,"r",(function(){return i})),n.d(t,"m",(function(){return u})),n.d(t,"o",(function(){return s})),n.d(t,"i",(function(){return l})),n.d(t,"z",(function(){return f})),n.d(t,"l",(function(){return p})),n.d(t,"k",(function(){return d})),n.d(t,"c",(function(){return m})),n.d(t,"n",(function(){return b})),n.d(t,"C",(function(){return g})),n.d(t,"D",(function(){return v})),n.d(t,"v",(function(){return y})),n.d(t,"a",(function(){return O})),n.d(t,"w",(function(){return j})),n.d(t,"b",(function(){return E})),n.d(t,"q",(function(){return w})),n.d(t,"g",(function(){return S})),n.d(t,"x",(function(){return R})),n.d(t,"h",(function(){return P})),n.d(t,"t",(function(){return C})),n.d(t,"s",(function(){return x})),n.d(t,"B",(function(){return I})),n.d(t,"A",(function(){return N})),n.d(t,"d",(function(){return T})),n.d(t,"e",(function(){return M})),n.d(t,"f",(function(){return A})),n.d(t,"p",(function(){return D})),n.d(t,"E",(function(){return F}));var r=n(4),o=Object(r.getSetting)("currentUserIsAdmin",!1),c=Object(r.getSetting)("reviewRatingsEnabled",!0),a=Object(r.getSetting)("showAvatars",!0),i=(Object(r.getSetting)("max_columns",6),Object(r.getSetting)("min_columns",1),Object(r.getSetting)("default_columns",3),Object(r.getSetting)("max_rows",6),Object(r.getSetting)("min_rows",1),Object(r.getSetting)("default_rows",3),Object(r.getSetting)("min_height",500),Object(r.getSetting)("default_height",500),Object(r.getSetting)("placeholderImgSrc","")),u=(Object(r.getSetting)("thumbnail_size",300),Object(r.getSetting)("isLargeCatalog")),s=Object(r.getSetting)("limitTags"),l=(Object(r.getSetting)("hasProducts",!0),Object(r.getSetting)("hasTags",!0),Object(r.getSetting)("homeUrl",""),Object(r.getSetting)("couponsEnabled",!0)),f=(Object(r.getSetting)("shippingEnabled",!0),Object(r.getSetting)("taxesEnabled",!0)),p=(Object(r.getSetting)("displayItemizedTaxes",!1),Object(r.getSetting)("hasDarkEditorStyleSupport",!1)),d=(Object(r.getSetting)("displayShopPricesIncludingTax",!1),Object(r.getSetting)("displayCartPricesIncludingTax",!1)),m=(Object(r.getSetting)("productCount",0),Object(r.getSetting)("attributes",[])),b=Object(r.getSetting)("isShippingCalculatorEnabled",!0),h=(Object(r.getSetting)("isShippingCostHidden",!1),Object(r.getSetting)("woocommerceBlocksPhase",1)),g=Object(r.getSetting)("wcBlocksAssetUrl",""),v=Object(r.getSetting)("wcBlocksBuildUrl",""),y=Object(r.getSetting)("shippingCountries",{}),O=Object(r.getSetting)("allowedCountries",{}),j=Object(r.getSetting)("shippingStates",{}),E=Object(r.getSetting)("allowedStates",{}),w=(Object(r.getSetting)("shippingMethodsExist",!1),Object(r.getSetting)("paymentGatewaySortOrder",[])),S=Object(r.getSetting)("checkoutShowLoginReminder",!0),k={id:0,title:"",permalink:""},_=Object(r.getSetting)("storePages",{myaccount:k,shop:k,cart:k,checkout:k,privacy:k,terms:k}),R=_.shop.permalink,P=(_.checkout.id,_.checkout.permalink),C=_.privacy.permalink,x=_.privacy.title,I=_.terms.permalink,N=_.terms.title,T=(_.cart.id,_.cart.permalink),M=Object(r.getSetting)("checkoutAllowsGuest",!1),A=Object(r.getSetting)("checkoutAllowsSignup",!1),D=_.myaccount.permalink?_.myaccount.permalink:Object(r.getSetting)("loginUrl","/wp-login.php"),F=(n(40),function(){return h>1})},function(e,t,n){var r=n(82),o=n(83),c=n(59),a=n(84);e.exports=function(e,t){return r(e)||o(e,t)||c(e,t)||a()}},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t){!function(){e.exports=this.wp.data}()},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(61);e.exports=function(e,t){if(null==e)return{};var n,o,c=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(56);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}}(e,t)||Object(r.a)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(23);function o(e,t){if(null==e)return{};var n,o,c=Object(r.a)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(c[n]=e[n])}return c}},,function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},function(e,t){!function(){e.exports=this.wp.htmlEntities}()},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.regeneratorRuntime}()},,function(e,t){!function(){e.exports=this.wc.blocksCheckout}()},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(e){return typeof e}:e.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}e.exports=n},function(e,t){!function(){e.exports=this.wp.primitives}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(50);var o=n(56);function c(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(70);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t,n){var r=n(28),o=n(20);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){!function(){e.exports=this.wp.a11y}()},function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=(n(3),n(2)),a=n(5),i=n.n(a);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t,n=e.label,r=e.screenReaderLabel,o=e.wrapperElement,a=e.wrapperProps,u=void 0===a?{}:a,l=null!=n,f=null!=r;return!l&&f?(t=o||"span",u=s(s({},u),{},{className:i()(u.className,"screen-reader-text")}),React.createElement(t,u,r)):(t=o||c.Fragment,l&&f&&n!==r?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},n),React.createElement("span",{className:"screen-reader-text"},r)):React.createElement(t,u,n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n(21),c=n.n(o),a=function(e){var t=Object(r.useRef)();return c()(e,t.current)||(t.current=e),t.current}},function(e,t){!function(){e.exports=this.wp.blocks}()},function(e,t){!function(){e.exports=this.wp.dom}()},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(32),o=n.n(r),c=n(33),a=n.n(c),i=n(20),u=n.n(i),s=n(34),l=n.n(s),f=n(35),p=n.n(f),d=n(24),m=n.n(d),b=n(7),h=n.n(b),g=(n(3),n(2)),v=n(1),y=n(9),O=function(e){var t=e.imageUrl,n=void 0===t?"".concat(y.C,"img/block-error.svg"):t,r=e.header,o=void 0===r?Object(v.__)("Oops!","woo-gutenberg-products-block"):r,c=e.text,a=void 0===c?Object(v.__)("There was an error loading the content.","woo-gutenberg-products-block"):c,i=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:","woo-gutenberg-products-block"):u;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},n&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:n,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),a&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},a),i&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",i)))};n(73);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var E=function(e){l()(n,e);var t=j(n);function n(){var e;o()(this,n);for(var r=arguments.length,c=new Array(r),a=0;a<r;a++)c[a]=arguments[a];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(n,[{key:"render",value:function(){var e=this.props,t=e.header,n=e.imageUrl,r=e.showErrorMessage,o=e.text,c=e.errorMessagePrefix,a=e.renderError,i=this.state,u=i.errorMessage;return i.hasError?"function"==typeof a?a({errorMessage:u}):React.createElement(O,{errorMessage:r?u:null,header:t,imageUrl:n,text:o,errorMessagePrefix:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),n}(g.Component);E.defaultProps={showErrorMessage:!0};t.a=E},function(e,t){!function(){e.exports=this.wc.priceFormat}()},function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(58),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(74))},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(7),a=n.n(c),i=n(14),u=n.n(i),s=n(105),l=n(5),f=n.n(l);n(125);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.className,n=e.value,r=e.currency,c=e.onValueChange,a=u()(e,["className","value","currency","onValueChange"]);if("-"===n)return null;var i=n/Math.pow(10,r.minorUnit);if(!Number.isFinite(i))return null;var l=f()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),p=d(d(d({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(r)),{},{value:void 0,currency:void 0,onValueChange:void 0}),m=c?function(e){var t=e.value*Math.pow(10,r.minorUnit);c(t)}:function(){};return React.createElement(s.a,o()({className:l},p,{value:i,onValueChange:m}))}},function(e,t,n){var r=n(95),o=n(96),c=n(59),a=n(97);e.exports=function(e){return r(e)||o(e)||c(e)||a()}},function(e,t){function n(e,t,n,r,o,c,a){try{var i=e[c](a),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,c){var a=e.apply(t,r);function i(e){n(a,o,c,i,u,"next",e)}function u(e){n(a,o,c,i,u,"throw",e)}i(void 0)}))}}},,function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t){!function(){e.exports=this.wp.apiFetch}()},function(e,t){!function(){e.exports=this.wp.keycodes}()},,,function(e,t){!function(){e.exports=this.wp.deprecated}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(50);function o(e,t){if(e){if("string"==typeof e)return Object(r.a)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r.a)(e,t):void 0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(16),o=n(0);function c(e){var t=Object(o.useState)((function(){return!(!e||"undefined"==typeof window||!window.matchMedia(e).matches)})),n=Object(r.a)(t,2),c=n[0],a=n[1];return Object(o.useEffect)((function(){if(e){var t=function(){return a(window.matchMedia(e).matches)};t();var n=window.matchMedia(e);return n.addListener(t),function(){n.removeListener(t)}}}),[e]),e&&c}},function(e,t){!function(){e.exports=this.wp.warning}()},function(e,t,n){var r=n(60);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},c=Object.keys(e);for(r=0;r<c.length;r++)n=c[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(10),o=n.n(r),c=n(0),a=function(){var e=Object(c.useState)(),t=o()(e,2)[1];return Object(c.useCallback)((function(e){return t((function(){throw e}))}),[])}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2),o=function(e,t){var n=Object(r.useRef)();return Object(r.useEffect)((function(){n.current===e||t&&!t(e,n.current)||(n.current=e)}),[e,t]),n.current}},function(e,t,n){"use strict";n.d(t,"b",(function(){return M})),n.d(t,"a",(function(){return A}));var r=n(7),o=n.n(r),c=n(10),a=n.n(c),i=n(0),u=n(100),s=n(12),l=n(15),f=n(62),p=n(21),d=n.n(p),m=function(e){return e.map((function(e){var t;return[e.package_id,null===(t=e.shipping_rates.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id]})).reduce((function(e,t){var n=a()(t,2),r=n[0],o=n[1];return o&&(e[r]=o),e}),{})},b={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},h={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},g={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:function(){return null},shippingErrorTypes:b,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:function(){return null},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:function(){return null},onShippingRateSuccess:function(){return null},onShippingRateFail:function(){return null},onShippingRateSelectSuccess:function(){return null},onShippingRateSelectFail:function(){return null},needsShipping:!1},v=function(e,t){var n=t.type;return Object.values(b).includes(n)?n:e},y=n(116),O=n(204),j="shipping_rates_success",E="shipping_rates_fail",w="shipping_rate_select_success",S="shipping_rate_select_fail",k=function(e){return{onSuccess:Object(O.a)(j,e),onFail:Object(O.a)(E,e),onSelectSuccess:Object(O.a)(w,e),onSelectFail:Object(O.a)(S,e)}},_=n(205),R=n(65),P=n(66);function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var x=b.NONE,I=b.INVALID_ADDRESS,N=b.UNKNOWN,T=Object(i.createContext)(g),M=function(){return Object(i.useContext)(T)},A=function(e){var t=e.children,n=Object(R.b)().dispatchActions,r=Object(P.b)(),c=r.shippingAddress,p=r.setShippingAddress,g=Object(u.a)(),O=g.cartNeedsShipping,M=g.cartHasCalculatedShipping,A=g.shippingRates,D=g.shippingRatesLoading,F=g.cartErrors,L=function(){var e=Object(f.a)(),t=Object(s.useDispatch)(l.CART_STORE_KEY).selectShippingRate;return{selectShippingRate:Object(i.useCallback)((function(n,r){t(n,r).catch((function(t){e(t)}))}),[e,t]),isSelectingRate:Object(s.useSelect)((function(e){return e(l.CART_STORE_KEY).isShippingRateBeingSelected()}),[])}}(),V=L.selectShippingRate,B=L.isSelectingRate,U=Object(i.useReducer)(v,x),q=a()(U,2),z=q[0],H=q[1],W=Object(i.useReducer)(y.b,{}),K=a()(W,2),G=K[0],Y=K[1],$=Object(i.useRef)(G),X=Object(i.useMemo)((function(){return{onShippingRateSuccess:k(Y).onSuccess,onShippingRateFail:k(Y).onFail,onShippingRateSelectSuccess:k(Y).onSelectSuccess,onShippingRateSelectFail:k(Y).onSelectFail}}),[Y]);Object(i.useEffect)((function(){$.current=G}),[G]);var Q=Object(i.useRef)((function(){return m(A)}));Object(i.useEffect)((function(){var e=m(A);d()(Q.current,e)||(Q.current=e)}),[A]),Object(i.useEffect)((function(){D?n.incrementCalculating():n.decrementCalculating()}),[D,n]),Object(i.useEffect)((function(){B?n.incrementCalculating():n.decrementCalculating()}),[B,n]),Object(i.useEffect)((function(){F.length>0&&F.some((function(e){return!(!e.code||!Object.values(h).includes(e.code))}))?H({type:I}):H({type:x})}),[F]);var Z=Object(i.useMemo)((function(){return{isPristine:z===x,isValid:z===x,hasInvalidAddress:z===I,hasError:z===N||z===I}}),[z]);Object(i.useEffect)((function(){D||0!==A.length&&!Z.hasError||Object(_.a)($.current,E,{hasInvalidAddress:Z.hasInvalidAddress,hasError:Z.hasError})}),[A,D,Z.hasError,Z.hasInvalidAddress]),Object(i.useEffect)((function(){!D&&A.length>0&&!Z.hasError&&Object(_.a)($.current,j,A)}),[A,D,Z.hasError]),Object(i.useEffect)((function(){B||(Z.hasError?Object(_.a)($.current,S,{hasError:Z.hasError,hasInvalidAddress:Z.hasInvalidAddress}):Object(_.a)($.current,w,Q.current))}),[B,Z.hasError,Z.hasInvalidAddress]);var J=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({shippingErrorStatus:Z,dispatchErrorStatus:H,shippingErrorTypes:b,shippingRates:A,shippingRatesLoading:D,selectedRates:Q.current,setSelectedRates:V,isSelectingRate:B,shippingAddress:c,setShippingAddress:p,needsShipping:O,hasCalculatedShipping:M},X);return React.createElement(React.Fragment,null,React.createElement(T.Provider,{value:J},t))}},function(e,t,n){"use strict";n.d(t,"b",(function(){return Fe})),n.d(t,"a",(function(){return Le}));var r=n(7),o=n.n(r),c=n(10),a=n.n(c),i=n(0),u=n(1),s=n(89),l=n(138),f=n(12),p=n(63),d=n(4),m="pristine",b="idle",h="processing",g="complete",v="before_processing",y="after_processing",O=Object(d.getSetting)("checkoutData",{order_id:0,customer_id:0}),j={redirectUrl:"",status:m,hasError:!1,calculatingCount:0,orderId:O.order_id,orderNotes:"",customerId:O.customer_id,shouldCreateAccount:!1,processingResponse:null},E={SET_IDLE:"set_idle",SET_PRISTINE:"set_pristine",SET_REDIRECT_URL:"set_redirect_url",SET_COMPLETE:"set_checkout_complete",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_PROCESSING:"set_checkout_is_processing",SET_HAS_ERROR:"set_checkout_has_error",SET_NO_ERROR:"set_checkout_no_error",SET_CUSTOMER_ID:"set_checkout_customer_id",SET_ORDER_ID:"set_checkout_order_id",SET_ORDER_NOTES:"set_checkout_order_notes",INCREMENT_CALCULATING:"increment_calculating",DECREMENT_CALCULATING:"decrement_calculating"},w=E.SET_PRISTINE,S=E.SET_IDLE,k=E.SET_PROCESSING,_=E.SET_BEFORE_PROCESSING,R=E.SET_AFTER_PROCESSING,P=E.SET_PROCESSING_RESPONSE,C=E.SET_REDIRECT_URL,x=E.SET_COMPLETE,I=E.SET_HAS_ERROR,N=E.SET_NO_ERROR,T=E.INCREMENT_CALCULATING,M=E.DECREMENT_CALCULATING,A=E.SET_CUSTOMER_ID,D=E.SET_ORDER_ID,F=E.SET_SHOULD_CREATE_ACCOUNT,L=E.SET_ORDER_NOTES,V=function(){return{type:w}},B=function(){return{type:S}},U=function(){return{type:k}},q=function(e){return{type:C,url:e}},z=function(e){return{type:P,data:e}},H=function(e){return{type:x,data:e}},W=function(){return{type:_}},K=function(){return{type:R}},G=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:N;return{type:t}},Y=function(){return{type:T}},$=function(){return{type:M}},X=function(e){return{type:A,customerId:e}},Q=function(e){return{type:D,orderId:e}},Z=function(e){return{type:F,shouldCreateAccount:e}},J=function(e){return{type:L,orderNotes:e}},ee=n(22);function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=E.SET_PRISTINE,oe=E.SET_IDLE,ce=E.SET_PROCESSING,ae=E.SET_BEFORE_PROCESSING,ie=E.SET_AFTER_PROCESSING,ue=E.SET_PROCESSING_RESPONSE,se=E.SET_REDIRECT_URL,le=E.SET_COMPLETE,fe=E.SET_HAS_ERROR,pe=E.SET_NO_ERROR,de=E.INCREMENT_CALCULATING,me=E.DECREMENT_CALCULATING,be=E.SET_CUSTOMER_ID,he=E.SET_ORDER_ID,ge=E.SET_ORDER_NOTES,ve=E.SET_SHOULD_CREATE_ACCOUNT,ye=m,Oe=b,je=h,Ee=v,we=y,Se=g,ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,t=arguments.length>1?arguments[1]:void 0,n=t.url,r=t.type,o=t.customerId,c=t.orderId,a=t.orderNotes,i=t.shouldCreateAccount,u=t.data,s=e;switch(r){case re:s=j;break;case oe:s=e.status!==Oe?ne(ne({},e),{},{status:Oe}):e;break;case se:s=n!==e.url?ne(ne({},e),{},{redirectUrl:n}):e;break;case ue:s=ne(ne({},e),{},{processingResponse:u});break;case le:s=e.status!==Se?ne(ne({},e),{},{status:Se,redirectUrl:(null==u?void 0:u.redirectUrl)||e.redirectUrl}):e;break;case ce:s=!1===(s=e.status!==je?ne(ne({},e),{},{status:je,hasError:!1}):e).hasError?s:ne(ne({},s),{},{hasError:!1});break;case ae:s=e.status!==Ee?ne(ne({},e),{},{status:Ee,hasError:!1}):e;break;case ie:s=e.status!==we?ne(ne({},e),{},{status:we}):e;break;case fe:s=e.hasError?e:ne(ne({},e),{},{hasError:!0}),s=e.status===je||e.status===Ee?ne(ne({},s),{},{status:Oe}):s;break;case pe:s=e.hasError?ne(ne({},e),{},{hasError:!1}):e;break;case de:s=ne(ne({},e),{},{calculatingCount:e.calculatingCount+1});break;case me:s=ne(ne({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case be:s=ne(ne({},e),{},{customerId:o});break;case he:s=ne(ne({},e),{},{orderId:c});break;case ve:i!==e.shouldCreateAccount&&(s=ne(ne({},e),{},{shouldCreateAccount:i}));break;case ge:e.orderNotes!==a&&(s=ne(ne({},e),{},{orderNotes:a}))}return s!==e&&r!==re&&s.status===ye&&(s.status=Oe),s},_e=n(116),Re=n(204),Pe="checkout_before_processing",Ce="checkout_after_processing_with_success",xe="checkout_after_processing_with_error",Ie=function(e){return{onCheckoutAfterProcessingWithSuccess:Object(Re.a)(Ce,e),onCheckoutAfterProcessingWithError:Object(Re.a)(xe,e),onCheckoutBeforeProcessing:Object(Re.a)(Pe,e)}},Ne=n(205),Te=n(79);function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var De=Object(i.createContext)({isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onSubmit:function(){},onCheckoutAfterProcessingWithSuccess:function(e){},onCheckoutAfterProcessingWithError:function(e){},onCheckoutBeforeProcessing:function(e){},dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setCustomerId:function(e){},setOrderId:function(e){},setOrderNotes:function(e){}},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:function(e){}}),Fe=function(){return Object(i.useContext)(De)},Le=function(e){var t=e.children,n=e.redirectUrl,r=e.isCart,o=void 0!==r&&r;j.redirectUrl=n;var c,d=Object(i.useReducer)(ke,j),m=a()(d,2),O=m[0],E=m[1],w=Object(i.useReducer)(_e.b,{}),S=a()(w,2),k=S[0],_=S[1],R=Object(i.useRef)(k),P=Object(Te.b)().setValidationErrors,C=Object(s.a)(),x=C.addErrorNotice,I=C.removeNotices,N=O.calculatingCount>0,T=Object(l.a)(),M=T.isSuccessResponse,A=T.isErrorResponse,D=T.isFailResponse,F=T.shouldRetry,L=(c=Object(l.a)().noticeContexts,{checkoutNotices:Object(f.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(f.useSelect)((function(e){return e("core/notices").getNotices(c.EXPRESS_PAYMENTS)}),[c.EXPRESS_PAYMENTS]),paymentNotices:Object(f.useSelect)((function(e){return e("core/notices").getNotices(c.PAYMENTS)}),[c.PAYMENTS])}),te=L.checkoutNotices,ne=L.paymentNotices,re=L.expressPaymentNotices;Object(i.useEffect)((function(){R.current=k}),[k]);var oe=Object(i.useMemo)((function(){return Ie(_).onCheckoutAfterProcessingWithSuccess}),[_]),ce=Object(i.useMemo)((function(){return Ie(_).onCheckoutAfterProcessingWithError}),[_]),ae=Object(i.useMemo)((function(){return Ie(_).onCheckoutBeforeProcessing}),[_]),ie=Object(i.useMemo)((function(){return{resetCheckout:function(){E(V())},setRedirectUrl:function(e){E(q(e))},setHasError:function(e){E(G(e))},incrementCalculating:function(){E(Y())},decrementCalculating:function(){E($())},setCustomerId:function(e){E(X(e))},setOrderId:function(e){E(Q(e))},setOrderNotes:function(e){E(J(e))},setAfterProcessing:function(e){var t,n,r,o;(!e.payment_result&&e.message&&200!==(null==e||null===(t=e.data)||void 0===t?void 0:t.status)&&(e.payment_result=Ae(Ae({},e.payment_result),{},{message:e.message})),e.payment_result)&&(null!==(n=e.payment_result)&&void 0!==n&&n.redirect_url&&E(q(e.payment_result.redirect_url)),E(z((r=e.payment_result,o={message:(null==r?void 0:r.message)||"",paymentStatus:r.payment_status,paymentDetails:{}},Array.isArray(r.payment_details)&&r.payment_details.forEach((function(e){var t=e.key,n=e.value;o.paymentDetails[t]=Object(ee.decodeEntities)(n)})),o))));E(K())}}}),[]);Object(i.useEffect)((function(){O.status===v&&(I("error"),Object(Ne.a)(R.current,Pe,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,n=e.validationErrors;x(t),P(n)})),E(B())):E(U())})))}),[O.status,P,x,I,E]);var ue=Object(p.a)(O.status),se=Object(p.a)(O.hasError);Object(i.useEffect)((function(){if((O.status!==ue||O.hasError!==se)&&O.status===y){var e={redirectUrl:O.redirectUrl,orderId:O.orderId,customerId:O.customerId,customerNote:O.customerNote,processingResponse:O.processingResponse};O.hasError?Object(Ne.b)(R.current,xe,e).then((function(t){if(A(t)||D(t)){if(t.message){var n={id:null==t?void 0:t.messageContext,context:null==t?void 0:t.messageContext};x(t.message,n)}F(t)?E(B()):E(H(t))}else{if(!(te.some((function(e){return"error"===e.status}))||re.some((function(e){return"error"===e.status}))||ne.some((function(e){return"error"===e.status})))){var r,o=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(u.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");x(o,{id:"checkout"})}E(B())}})):Object(Ne.b)(R.current,Ce,e).then((function(e){if(M(e))E(H(e));else if(A(e)||D(e)){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;x(e.message,t)}F(e)?E(G(!0)):E(H(e))}else E(H())}))}}),[O.status,O.hasError,O.redirectUrl,O.orderId,O.customerId,O.customerNote,O.processingResponse,ue,se,ie,x,A,D,M,F,te,re,ne]);var le={onSubmit:Object(i.useCallback)((function(){E(W())}),[]),isComplete:O.status===g,isIdle:O.status===b,isCalculating:N,isProcessing:O.status===h,isBeforeProcessing:O.status===v,isAfterProcessing:O.status===y,hasError:O.hasError,redirectUrl:O.redirectUrl,onCheckoutAfterProcessingWithSuccess:oe,onCheckoutAfterProcessingWithError:ce,onCheckoutBeforeProcessing:ae,dispatchActions:ie,isCart:o,orderId:O.orderId,hasOrder:!!O.orderId,customerId:O.customerId,orderNotes:O.orderNotes,shouldCreateAccount:O.shouldCreateAccount,setShouldCreateAccount:function(e){return E(Z(e))}};return React.createElement(De.Provider,{value:le},t)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return E}));var r=n(0),o=n(7),c=n.n(o),a=n(10),i=n.n(a),u=n(12),s=n(15),l=n(141),f=n(21),p=n.n(f),d=n(115),m=function(e){var t=e.country,n=void 0===t?"":t,r=e.state,o=void 0===r?"":r,c=e.city,a=void 0===c?"":c,i=e.postcode,u=void 0===i?"":i;return{country:n.trim(),state:o.trim(),city:a.trim(),postcode:u?u.replace(" ","").toUpperCase():""}},b=function(e,t){return!!t.country&&!p()(m(e),m(t))},h=n(89),g=n(100);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O=Object(r.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setBillingData:function(){return null},setShippingAddress:function(){return null}}),j=function(){return Object(r.useContext)(O)},E=function(e){var t=e.children,n=function(){var e=Object(u.useDispatch)(s.CART_STORE_KEY).updateCustomerData,t=Object(h.a)(),n=t.addErrorNotice,o=t.removeNotice,c=Object(g.a)(),a=c.billingAddress,f=c.shippingAddress,m=Object(r.useState)({billingData:a,shippingAddress:f}),v=i()(m,2),O=v[0],j=v[1],E=Object(r.useRef)(O),w=Object(l.a)(O,1e3,{equalityFn:function(e,t){return p()(e.billingData,t.billingData)&&p()(e.shippingAddress,t.shippingAddress)}}),S=i()(w,1)[0],k=Object(r.useCallback)((function(e){j((function(t){return y(y({},t),{},{billingData:y(y({},t.billingData),e)})}))}),[]),_=Object(r.useCallback)((function(e){j((function(t){return y(y({},t),{},{shippingAddress:e})}))}),[]);return Object(r.useEffect)((function(){(b(E.current.billingData,S.billingData)||b(E.current.shippingAddress,S.shippingAddress))&&(E.current=S,e({billing_address:S.billingData,shipping_address:S.shippingAddress}).then((function(){o("checkout")})).catch((function(e){n(Object(d.b)(e),{id:"checkout"})})))}),[S,n,o,e]),{billingData:O.billingData,shippingAddress:O.shippingAddress,setBillingData:k,setShippingAddress:_}}(),o={billingData:n.billingData,shippingAddress:n.shippingAddress,setBillingData:n.setBillingData,setShippingAddress:n.setShippingAddress};return React.createElement(O.Provider,{value:o},t)}},,function(e,t,n){"use strict";var r=n(6),o=n(17),c=n(0),a=n(5),i=n.n(a),u=n(8),s=n(55),l=n.n(s);function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),e}function m(e,t){return(m=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&&m(e,t)}var h=n(42),g=n(13);function v(e,t){return!t||"object"!==Object(h.a)(t)&&"function"!=typeof t?Object(g.a)(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=n(16),j=n(41),E=n(52),w=n(57),S={huge:1440,wide:1280,large:960,medium:782,small:600,mobile:480},k={">=":"min-width","<":"max-width"},_={">=":function(e,t){return t>=e},"<":function(e,t){return t<e}},R=Object(c.createContext)(null),P=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:">=",n=Object(c.useContext)(R),r=!n&&"(".concat(k[t],": ").concat(S[e],"px)"),o=Object(w.a)(r);return n?_[t](S[e],n):o};P.__experimentalWidthProvider=R.Provider;var C=P,x=n(160),I=n(120),N=n(19);function T(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?T(Object(n),!0).forEach((function(t){Object(N.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n,r,o,c,a){var i=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-i/2>0?i/2:s)+(s+i/2>window.innerWidth?window.innerWidth-s:i/2)},f=e.left;"right"===r?f=e.right:"middle"!==c&&(f=s);var p=e.right;"left"===r?p=e.left:"middle"!==c&&(p=s);var d,m={popoverLeft:f,contentWidth:f-i>0?i:f},b={popoverLeft:p,contentWidth:p+i>window.innerWidth?window.innerWidth-p:i},h=n,g=null;if(!o)if("center"===n&&l.contentWidth===i)h="center";else if("left"===n&&m.contentWidth===i)h="left";else if("right"===n&&b.contentWidth===i)h="right";else{var v="left"===(h=m.contentWidth>b.contentWidth?"left":"right")?m.contentWidth:b.contentWidth;g=v!==i?v:null}if(d="center"===h?l.popoverLeft:"left"===h?m.popoverLeft:b.popoverLeft,a){var y=a.getBoundingClientRect();d=Math.min(d,y.right-i)}return{xAxis:h,popoverLeft:d,contentWidth:g}}function D(e,t,n,r,o,c,a){var i=t.height;if(o){var u=(Object(j.getScrollContainer)(c)||document.body).getBoundingClientRect().top+i-a;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-i/2>0?i/2:s)+(s+i/2>window.innerHeight?window.innerHeight-s:i/2)},f={popoverTop:e.top,contentHeight:e.top-10-i>0?i:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+i>window.innerHeight?window.innerHeight-10-e.bottom:i},d=n,m=null;if(!o)if("middle"===n&&l.contentHeight===i)d="middle";else if("top"===n&&f.contentHeight===i)d="top";else if("bottom"===n&&p.contentHeight===i)d="bottom";else{var b="top"===(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;m=b!==i?b:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:m}}var F=n(31);var L=function(e,t){return function(n){var r=e(n),o=n.displayName,c=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(u.upperFirst)(Object(u.camelCase)(t)),"(").concat(c,")"),r}};function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var B=Object(c.createContext)({focusHistory:[]}),U=B.Provider,q=B.Consumer;U.displayName="FocusReturnProvider",q.displayName="FocusReturnConsumer";c.Component;function z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var H=L((function e(t){if((r=t)instanceof c.Component||"function"==typeof r){var n=t;return e({})(n)}var r,o=t.onFocusReturn,a=void 0===o?u.stubTrue:o;return function(e){var t=function(t){b(r,t);var n=z(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return d(r,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,n=this.ownFocusedElements;if(t&&!1!==a())for(var r,o=[].concat(Object(F.a)(u.without.apply(void 0,[this.props.focus.focusHistory].concat(Object(F.a)(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(c.createElement)(e,this.props.childProps))}}]),r}(c.Component);return function(e){return Object(c.createElement)(q,null,(function(n){return Object(c.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var K=L((function(e){return function(t){b(r,t);var n=W(r);function r(){var e;return f(this,r),(e=n.apply(this,arguments)).focusContainRef=Object(c.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(Object(g.a)(e)),e}return d(r,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===E.TAB){var t=j.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(c.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(c.createElement)(e,this.props))}}]),r}(c.Component)}),"withConstrainedTabbing");function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var Y=["button","submit"];function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var X=L((function(e){return function(t){b(o,t);var n=G(o);function o(){var e;return f(this,o),(e=n.apply(this,arguments)).bindNode=e.bindNode.bind(Object(g.a)(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(Object(g.a)(e)),e.queueBlurCheck=e.queueBlurCheck.bind(Object(g.a)(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(Object(g.a)(e)),e}return d(o,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,n=e.target;Object(u.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(u.includes)(Y,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(c.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(c.createElement)(e,Object(r.a)({ref:this.bindNode},this.props)))}}]),o}(c.Component)}),"withFocusOutside")(function(e){b(n,e);var t=$(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),n}(c.Component));function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,r=e.className,o=void 0===r?"lockscroll":r,a=0,i=0;function u(e){var t=n.scrollingElement||n.body;e&&(i=t.scrollTop);var r=e?"add":"remove";t.classList[r](o),n.documentElement.classList[r](o),e||(t.scrollTop=i)}function s(){0===a&&u(!0),++a}function l(){1===a&&u(!1),--a}return function(e){b(n,e);var t=Q(n);function n(){return f(this,n),t.apply(this,arguments)}return d(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(c.Component)}();function J(e){e.stopPropagation()}var ee=Object(c.forwardRef)((function(e,t){var n=e.children,a=Object(o.a)(e,["children"]);return Object(c.createElement)("div",Object(r.a)({},a,{ref:t,onMouseDown:J}),n)})),te=n(45);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){Object(N.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e){var t=Object(c.useContext)(te.a),n=t.slots[e]||{},r=t.fills[e],o=Object(c.useMemo)((function(){return r||[]}),[r]),a=Object(c.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),i=Object(c.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),u=Object(c.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),s=Object(c.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return re(re({},n),{},{updateSlot:a,unregisterSlot:i,fills:o,registerFill:u,unregisterFill:s})}function ce(e,t,n){return(ce="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}var ae=n(21),ie=n.n(ae);function ue(e){var t=function(e,t){if("object"!==Object(h.a)(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Object(h.a)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Object(h.a)(t)?t:String(t)}function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){Object(N.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function fe(e){var t,n,r,a,i,u,s,l,f,p,d,m,b,h=e.children,g=(t=Object(c.useState)({}),n=Object(O.a)(t,2),r=n[0],a=n[1],i=Object(c.useState)({}),u=Object(O.a)(i,2),s=u[0],l=u[1],f=Object(c.useCallback)((function(e,t,n){a((function(r){var o=r[e]||{};return le(le({},r),{},Object(N.a)({},e,le(le({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),p=Object(c.useCallback)((function(e,t){a((function(n){var r=n[e],c=Object(o.a)(n,[e].map(ue));return(null==r?void 0:r.ref)===t?c:n}))}),[]),d=Object(c.useCallback)((function(e,t){var n=r[e];if(n&&!ie()(n.fillProps,t)){n.fillProps=t;var o=s[e];o&&o.map((function(e){return e.current.rerender()}))}}),[r,s]),m=Object(c.useCallback)((function(e,t){l((function(n){return le(le({},n),{},Object(N.a)({},e,[].concat(Object(F.a)(n[e]||[]),[t])))}))}),[]),b=Object(c.useCallback)((function(e,t){l((function(n){return n[e]?le(le({},n),{},Object(N.a)({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(c.useMemo)((function(){return{slots:r,fills:s,registerSlot:f,updateSlot:d,unregisterSlot:p,registerFill:m,unregisterFill:b}}),[r,s,f,d,p,m,b]));return Object(c.createElement)(te.a.Provider,{value:g},h)}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var de=Object(c.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),me=de.Provider,be=de.Consumer;c.Component;function he(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var ge=function(e){b(n,e);var t=he(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(Object(g.a)(e)),e}return d(n,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||ce(y(n.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,r=e.fillProps,o=void 0===r?{}:r,a=e.getFills,i=Object(u.map)(a(n,this),(function(e){var t=e.occurrence,n=Object(u.isFunction)(e.children)?e.children(o):e.children;return c.Children.map(n,(function(e,n){if(!e||Object(u.isString)(e))return e;var r="".concat(t,"---").concat(e.key||n);return Object(c.cloneElement)(e,{key:r})}))})).filter(Object(u.negate)(c.isEmptyElement));return Object(c.createElement)(c.Fragment,null,Object(u.isFunction)(t)?t(i):i)}}]),n}(c.Component),ve=function(e){return Object(c.createElement)(be,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,a=t.getFills;return Object(c.createElement)(ge,Object(r.a)({},e,{registerSlot:n,unregisterSlot:o,getFills:a}))}))},ye=0;function Oe(e){var t=e.name,n=e.children,r=e.registerFill,o=e.unregisterFill,a=function(e){var t=Object(c.useContext)(de),n=t.getSlot,r=t.subscribe,o=Object(c.useState)(n(e)),a=Object(O.a)(o,2),i=a[0],u=a[1];return Object(c.useEffect)((function(){return u(n(e)),r((function(){u(n(e))}))}),[e]),i}(t),i=Object(c.useRef)({name:t,children:n});return i.current.occurrence||(i.current.occurrence=++ye),Object(c.useLayoutEffect)((function(){return r(t,i.current),function(){return o(t,i.current)}}),[]),Object(c.useLayoutEffect)((function(){i.current.children=n,a&&a.forceUpdate()}),[n]),Object(c.useLayoutEffect)((function(){t!==i.current.name&&(o(i.current.name,i.current),i.current.name=t,r(t,i.current))}),[t]),a&&a.node?(Object(u.isFunction)(n)&&(n=n(a.props.fillProps)),Object(c.createPortal)(n,a.node)):null}var je=function(e){return Object(c.createElement)(be,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(c.createElement)(Oe,Object(r.a)({},e,{registerFill:n,unregisterFill:o}))}))};function Ee(e){var t=e.name,n=e.fillProps,a=void 0===n?{}:n,i=e.as,u=void 0===i?"div":i,s=Object(o.a)(e,["name","fillProps","as"]),l=Object(c.useContext)(te.a),f=Object(c.useRef)();return Object(c.useLayoutEffect)((function(){return l.registerSlot(t,f,a),function(){l.unregisterSlot(t,f)}}),[l.registerSlot,l.unregisterSlot,t]),Object(c.useLayoutEffect)((function(){l.updateSlot(t,a)})),Object(c.createElement)(u,Object(r.a)({ref:f},s))}function we(e){var t,n,r=e.name,o=e.children,a=oe(r),i=Object(c.useRef)({rerender:(t=Object(c.useState)({}),n=Object(O.a)(t,2)[1],function(){return n({})})});return Object(c.useEffect)((function(){return a.registerFill(i),function(){a.unregisterFill(i)}}),[a.registerFill,a.unregisterFill]),a.ref&&a.ref.current?("function"==typeof o&&(o=o(a.fillProps)),Object(c.createPortal)(o,a.ref.current)):null}function Se(e){var t=e.bubblesVirtually,n=Object(o.a)(e,["bubblesVirtually"]);return t?Object(c.createElement)(Ee,n):Object(c.createElement)(ve,n)}function ke(e){return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(je,e),Object(c.createElement)(we,e))}function _e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(n),!0).forEach((function(t){Object(N.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_e(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,c=r.split(" "),a=Object(O.a)(c,2),u=a[0],s=a[1],l=void 0===s?"center":s;return i()("components-animate__appear",(o={},Object(N.a)(o,"is-from-"+l,"center"!==l),Object(N.a)(o,"is-from-"+u,"middle"!==u),o))}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+r):"loading"===t?i()("components-animate__loading"):void 0}function Ce(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:Pe(Re({type:t},r))})}var xe=K(H((function(e){return e.children})));function Ie(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,c=r.paddingBottom,a=r.paddingLeft,i=r.paddingRight,u=o?parseInt(o,10):0,s=c?parseInt(c,10):0,l=a?parseInt(a,10):0,f=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function Ne(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Te(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function Me(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Ae=function(e){var t=e.headerTitle,n=e.onClose,a=e.onKeyDown,u=e.children,s=e.className,f=e.noArrow,p=void 0===f||f,d=e.isAlternate,m=e.position,b=void 0===m?"bottom right":m,h=(e.range,e.focusOnMount),g=void 0===h?"firstElement":h,v=e.anchorRef,y=e.shouldAnchorIncludePadding,w=e.anchorRect,S=e.getAnchorRect,k=e.expandOnMobile,_=e.animate,R=void 0===_||_,P=e.onClickOutside,N=e.onFocusOutside,T=e.__unstableSticky,F=e.__unstableSlotName,L=void 0===F?"Popover":F,V=e.__unstableObserveElement,B=e.__unstableBoundaryParent,U=Object(o.a)(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),q=Object(c.useRef)(null),z=Object(c.useRef)(null),H=Object(c.useRef)(),W=C("medium","<"),K=Object(c.useState)(),G=Object(O.a)(K,2),Y=G[0],$=G[1],Q=oe(L),J=k&&W,te=Object(x.a)(),ne=Object(O.a)(te,2),re=ne[0],ce=ne[1];p=J||p,Object(c.useLayoutEffect)((function(){if(J)return Me(H.current,"is-without-arrow",p),Me(H.current,"is-alternate",d),Ne(H.current,"data-x-axis"),Ne(H.current,"data-y-axis"),Te(H.current,"top"),Te(H.current,"left"),Te(z.current,"maxHeight"),void Te(z.current,"maxWidth");var e=function(){if(H.current&&z.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(j.getRectangleFromRange)(r);if(r instanceof window.Element){var c=r.getBoundingClientRect();return o?c:Ie(c,r)}var a=r.top,i=r.bottom,u=a.getBoundingClientRect(),s=i.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:Ie(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:Ie(p,f)}}(q,w,S,v,y);if(e){var t,n,r=H.current,o=r.offsetParent,c=r.ownerDocument,a=0;if(o&&o!==c.body){var i=o.getBoundingClientRect();a=i.top,e=new window.DOMRect(e.left-i.left,e.top-i.top,e.width,e.height)}if(B)t=null===(n=H.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode;var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,c=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,i=n.split(" "),u=Object(O.a)(i,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=D(e,t,s,p,r,o,c),m=A(e,t,f,p,r,d.yAxis,a);return M(M({},m),d)}(e,ce.height?ce:z.current.getBoundingClientRect(),b,T,H.current,a,t),s=u.popoverTop,l=u.popoverLeft,f=u.xAxis,m=u.yAxis,h=u.contentHeight,g=u.contentWidth;"number"==typeof s&&"number"==typeof l&&(Te(H.current,"top",s+"px"),Te(H.current,"left",l+"px")),Me(H.current,"is-without-arrow",p||"center"===f&&"middle"===m),Me(H.current,"is-alternate",d),Ne(H.current,"data-x-axis",f),Ne(H.current,"data-y-axis",m),Te(z.current,"maxHeight","number"==typeof h?h+"px":""),Te(z.current,"maxWidth","number"==typeof g?g+"px":"");$(({left:"right",right:"left"}[f]||"center")+" "+({top:"bottom",bottom:"top"}[m]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),V&&(n=new window.MutationObserver(e)).observe(V,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[J,w,S,v,y,b,ce,T,V,B]),function(e,t){Object(c.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=j.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(g,z);var ae=function(e){e.keyCode===E.ESCAPE&&n&&(e.stopPropagation(),n()),a&&a(e)};var ie=Object(c.createElement)(X,{onFocusOutside:function(e){if(N)N(e);else if(P){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),l()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),P(t)}else n&&n()}},Object(c.createElement)(Ce,{type:R&&Y?"appear":null,options:{origin:Y}},(function(e){var o=e.className;return Object(c.createElement)(ee,Object(r.a)({className:i()("components-popover",s,o,{"is-expanded":J,"is-without-arrow":p,"is-alternate":d})},U,{onKeyDown:ae,ref:H}),J&&Object(c.createElement)(Z,null),J&&Object(c.createElement)("div",{className:"components-popover__header"},Object(c.createElement)("span",{className:"components-popover__header-title"},t),Object(c.createElement)(He,{className:"components-popover__close",icon:I.a,onClick:n})),Object(c.createElement)("div",{ref:z,className:"components-popover__content",tabIndex:"-1"},Object(c.createElement)("div",{style:{position:"relative"}},re,u)))})));return g&&(ie=Object(c.createElement)(xe,null,ie)),Q.ref&&(ie=Object(c.createElement)(ke,{name:L},ie)),v||w?ie:Object(c.createElement)("span",{ref:q},ie)};Ae.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(c.createElement)(Se,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var De=Ae;var Fe=function(e){var t,n,r=e.shortcut,o=e.className;return r?(Object(u.isString)(r)&&(t=r),Object(u.isObject)(r)&&(t=r.display,n=r.ariaLabel),Object(c.createElement)("span",{className:o,"aria-label":n},t)):null};function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}var Ve=function(e){b(n,e);var t=Le(n);function n(){var e;return f(this,n),(e=t.apply(this,arguments)).delayedSetIsOver=Object(u.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return d(n,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var n=this.props.children;if(1===c.Children.count(n)){var r=c.Children.only(n);"function"==typeof r.props[e]&&r.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(u.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,r=e.text,o=e.shortcut;if(1!==c.Children.count(t))return t;var a=c.Children.only(t),i=this.state.isOver;return Object(c.cloneElement)(a,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(c.concatChildren)(a.props.children,i&&Object(c.createElement)(De,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(c.createElement)(Fe,{className:"components-tooltip__shortcut",shortcut:o})))})}}]),n}(c.Component),Be=n(86);function Ue(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qe(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw c}}}}function qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ze=["onMouseDown","onClick"];var He=t.a=Object(c.forwardRef)((function(e,t){var n=e.href,a=e.target,s=e.isPrimary,f=e.isSmall,p=e.isTertiary,d=e.isPressed,m=e.isBusy,b=e.isDefault,h=e.isSecondary,g=e.isLink,v=e.isDestructive,y=e.className,O=e.disabled,j=e.icon,E=e.iconSize,w=e.showTooltip,S=e.tooltipPosition,k=e.shortcut,_=e.label,R=e.children,P=e.__experimentalIsFocusable,C=Object(o.a)(e,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);b&&l()("Button isDefault prop",{alternative:"isSecondary"});var x=i()("components-button",y,{"is-secondary":b||h,"is-primary":s,"is-small":f,"is-tertiary":p,"is-pressed":d,"is-busy":m,"is-link":g,"is-destructive":v,"has-text":!!j&&!!R,"has-icon":!!j}),I=O&&!P,N=void 0===n||I?"button":"a",T="a"===N?{href:n,target:a}:{type:"button",disabled:I,"aria-pressed":d};if(O&&P){T["aria-disabled"]=!0;var M,A=Ue(ze);try{for(A.s();!(M=A.n()).done;){C[M.value]=function(e){e.stopPropagation(),e.preventDefault()}}}catch(e){A.e(e)}finally{A.f()}}var D=!I&&(w&&_||k||!!_&&(!R||Object(u.isArray)(R)&&!R.length)&&!1!==w),F=Object(c.createElement)(N,Object(r.a)({},T,C,{className:x,"aria-label":C["aria-label"]||_,ref:t}),j&&Object(c.createElement)(Be.a,{icon:j,size:E}),R);return D?Object(c.createElement)(Ve,{text:_,shortcut:k,position:S},F):F}))},,function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){"use strict";var r=n(72);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,a){if(a!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=i(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function b(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new m(e,t)),1!==s.length||l||i(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=b,o.addListener=b,o.once=b,o.off=b,o.removeListener=b,o.removeAllListeners=b,o.emit=b,o.prependListener=b,o.prependOnceListener=b,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){var r=n(2),o={display:"block",opacity:0,position:"absolute",top:0,left:0,height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none",zIndex:-1},c=function(e){var t=e.onResize,n=r.useRef();return function(e,t){var n=function(){return e.current&&e.current.contentDocument&&e.current.contentDocument.defaultView};function o(){t();var e=n();e&&e.addEventListener("resize",t)}r.useEffect((function(){return n()?o():e.current&&e.current.addEventListener&&e.current.addEventListener("load",o),function(){var e=n();e&&"function"==typeof e.removeEventListener&&e.removeEventListener("resize",t)}}),[])}(n,(function(){return t(n)})),r.createElement("iframe",{style:o,src:"about:blank",ref:n,"aria-hidden":!0,tabIndex:-1,frameBorder:0})},a=function(e){return{width:null!=e?e.offsetWidth:null,height:null!=e?e.offsetHeight:null}};e.exports=function(e){void 0===e&&(e=a);var t=r.useState(e(null)),n=t[0],o=t[1],i=r.useCallback((function(t){return o(e(t.current))}),[e]);return[r.useMemo((function(){return r.createElement(c,{onResize:i})}),[i]),n]}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(5)),c=n.n(o),a=n(0);function i(){return Object(a.createElement)("span",{className:"components-spinner"})}n(163),t.a=function(e){var t=e.children,n=e.className,o=e.screenReaderLabel,a=e.showSpinner,u=void 0!==a&&a,s=e.isLoading;return void 0===s||s?React.createElement("div",{className:c()(n,"wc-block-components-loading-mask")},u&&React.createElement(i,null),React.createElement("div",{className:"wc-block-components-loading-mask__children","aria-hidden":!0},t),React.createElement("span",{className:"screen-reader-text"},o||Object(r.__)("Loading…","woo-gutenberg-products-block"))):t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0),o=(n(12),Object(r.createContext)({isEditor:!1,currentPostId:0,previewData:{}})),c=function(){return Object(r.useContext)(o)}},function(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(11)),c=r(n(61)),a=n(2),i=r(a),u=r(n(113)),s=r(n(20)),l={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(l.str(e)||l.num(e))return e===t;if(l.obj(e)&&l.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var n;for(n in e)if(!(n in t))return!1;for(n in t)if(e[n]!==t[n])return!1;return!l.und(n)||e===t}};function f(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return l.und(e)||l.nul(e)?t:e}function d(e){return l.und(e)?[]:l.arr(e)?e:[e]}function m(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return l.fun(e)?e.apply(void 0,n):e}function b(e){var t=function(e){return e.to,e.from,e.config,e.onStart,e.onRest,e.onFrame,e.children,e.reset,e.reverse,e.force,e.immediate,e.delay,e.attach,e.destroyed,e.interpolateTo,e.ref,e.lazy,c(e,["to","from","config","onStart","onRest","onFrame","children","reset","reverse","force","immediate","delay","attach","destroyed","interpolateTo","ref","lazy"])}(e);if(l.und(t))return o({to:t},e);var n=Object.keys(e).reduce((function(n,r){var c;return l.und(t[r])?o({},n,((c={})[r]=e[r],c)):n}),{});return o({to:t},n)}var h,g,v=function(){function e(){this.payload=void 0,this.children=[]}var t=e.prototype;return t.getAnimatedValue=function(){return this.getValue()},t.getPayload=function(){return this.payload||this},t.attach=function(){},t.detach=function(){},t.getChildren=function(){return this.children},t.addChild=function(e){0===this.children.length&&this.attach(),this.children.push(e)},t.removeChild=function(e){var t=this.children.indexOf(e);this.children.splice(t,1),0===this.children.length&&this.detach()},e}(),y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload=[],t.attach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.addChild(s(t))}))},t.detach=function(){return t.payload.forEach((function(e){return e instanceof v&&e.removeChild(s(t))}))},t}return u(t,e),t}(v),O=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).payload={},t.attach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.addChild(s(t))}))},t.detach=function(){return Object.values(t.payload).forEach((function(e){return e instanceof v&&e.removeChild(s(t))}))},t}u(t,e);var n=t.prototype;return n.getValue=function(e){void 0===e&&(e=!1);var t={};for(var n in this.payload){var r=this.payload[n];(!e||r instanceof v)&&(t[n]=r instanceof v?r[e?"getAnimatedValue":"getValue"]():r)}return t},n.getAnimatedValue=function(){return this.getValue(!0)},t}(v);function j(e,t){h={fn:e,transform:t}}function E(e){g=e}var w,S=function(e){return"undefined"!=typeof window?window.requestAnimationFrame(e):-1},k=function(e){"undefined"!=typeof window&&window.cancelAnimationFrame(e)};function _(e){w=e}var R,P=function(){return Date.now()};function C(e){R=e}var x,I,N=function(e){return e.current};function T(e){x=e}var M=Object.freeze({get applyAnimatedValues(){return h},injectApplyAnimatedValues:j,get colorNames(){return g},injectColorNames:E,get requestFrame(){return S},get cancelFrame(){return k},injectFrame:function(e,t){S=e,k=t},get interpolation(){return w},injectStringInterpolator:_,get now(){return P},injectNow:function(e){P=e},get defaultElement(){return R},injectDefaultElement:C,get animatedApi(){return N},injectAnimatedApi:function(e){N=e},get createAnimatedStyle(){return x},injectCreateAnimatedStyle:T,get manualFrameloop(){return I},injectManualFrameloop:function(e){I=e}}),A=function(e){function t(t,n){var r;return(r=e.call(this)||this).update=void 0,r.payload=t.style?o({},t,{style:x(t.style)}):t,r.update=n,r.attach(),r}return u(t,e),t}(O),D=!1,F=new Set,L=function e(){if(!D)return!1;var t=P(),n=F,r=Array.isArray(n),o=0;for(n=r?n:n[Symbol.iterator]();;){var c;if(r){if(o>=n.length)break;c=n[o++]}else{if((o=n.next()).done)break;c=o.value}for(var a=c,i=!1,u=0;u<a.configs.length;u++){for(var s=a.configs[u],l=void 0,f=void 0,p=0;p<s.animatedValues.length;p++){var d=s.animatedValues[p];if(!d.done){var m=s.fromValues[p],b=s.toValues[p],h=d.lastPosition,g=b instanceof v,y=Array.isArray(s.initialVelocity)?s.initialVelocity[p]:s.initialVelocity;if(g&&(b=b.getValue()),s.immediate)d.setValue(b),d.done=!0;else if("string"!=typeof m&&"string"!=typeof b){if(void 0!==s.duration)h=m+s.easing((t-d.startTime)/s.duration)*(b-m),l=t>=d.startTime+s.duration;else if(s.decay)h=m+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-d.startTime))),(l=Math.abs(d.lastPosition-h)<.1)&&(b=h);else{f=void 0!==d.lastTime?d.lastTime:t,y=void 0!==d.lastVelocity?d.lastVelocity:s.initialVelocity,t>f+64&&(f=t);for(var O=Math.floor(t-f),j=0;j<O;++j){h+=1*(y+=1*((-s.tension*(h-b)+-s.friction*y)/s.mass)/1e3)/1e3}var E=!(!s.clamp||0===s.tension)&&(m<b?h>b:h<b),w=Math.abs(y)<=s.precision,k=0===s.tension||Math.abs(b-h)<=s.precision;l=E||w&&k,d.lastVelocity=y,d.lastTime=t}g&&!s.toValues[p].done&&(l=!1),l?(d.value!==b&&(h=b),d.done=!0):i=!0,d.setValue(h),d.lastPosition=h}else d.setValue(b),d.done=!0}}a.props.onFrame&&(a.values[s.name]=s.interpolation.getValue())}a.props.onFrame&&a.props.onFrame(a.values),i||(F.delete(a),a.stop(!0))}return F.size?I?I():S(e):D=!1,D};function V(e,t,n){if("function"==typeof e)return e;if(Array.isArray(e))return V({range:e,output:t,extrapolate:n});if(w&&"string"==typeof e.output[0])return w(e);var r=e,o=r.output,c=r.range||[0,1],a=r.extrapolateLeft||r.extrapolate||"extend",i=r.extrapolateRight||r.extrapolate||"extend",u=r.easing||function(e){return e};return function(e){var t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,c);return function(e,t,n,r,o,c,a,i,u){var s=u?u(e):e;if(s<t){if("identity"===a)return s;"clamp"===a&&(s=t)}if(s>n){if("identity"===i)return s;"clamp"===i&&(s=n)}if(r===o)return r;if(t===n)return e<=t?r:o;t===-1/0?s=-s:n===1/0?s-=t:s=(s-t)/(n-t);s=c(s),r===-1/0?s=-s:o===1/0?s+=r:s=s*(o-r)+r;return s}(e,c[t],c[t+1],o[t],o[t+1],u,a,i,r.map)}}var B=function(e){function t(n,r,o,c){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=V(r,o,c),a}u(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=V(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y);var U=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}u(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new B(this,e,t,n)},t}(v),q=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new U(e)})),n}u(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new B(this,e,t)},t}(y),z=0,H=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=b(e),n=t.delay,r=void 0===n?0:n,a=t.to,i=c(t,["delay","to"]);if(l.arr(a)||l.fun(a))this.queue.push(o({},i,{delay:r,to:a}));else if(a){var u={};Object.entries(a).forEach((function(e){var t,n=e[0],c=e[1],a=o({to:(t={},t[n]=c,t),delay:m(r,n)},i),s=u[a.delay]&&u[a.delay].to;u[a.delay]=o({},u[a.delay],a,{to:o({},s,a.to)})})),this.queue=Object.values(u)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(i),this},t.start=function(e){var t,n=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var t=e.from,r=void 0===t?{}:t,c=e.to,a=void 0===c?{}:c;l.obj(r)&&(n.merged=o({},r,n.merged)),l.obj(a)&&(n.merged=o({},n.merged,a))}));var r=this.local=++this.guid,a=this.localQueue=this.queue;this.queue=[],a.forEach((function(t,o){var i=t.delay,u=c(t,["delay"]),s=function(t){o===a.length-1&&r===n.guid&&t&&(n.idle=!0,n.props.onRest&&n.props.onRest(n.merged)),e&&e()},f=l.arr(u.to)||l.fun(u.to);i?setTimeout((function(){r===n.guid&&(f?n.runAsync(u,s):n.diff(u).start(s))}),i):f?n.runAsync(u,s):n.diff(u).start(s)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),t=this,F.has(t)||F.add(t),D||(D=!0,S(I||L));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){var t;return this.stop(!0),e&&(t=this,F.has(t)&&F.delete(t)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,c(e,["delay"])),a=this.local,i=Promise.resolve(void 0);if(l.arr(r.to))for(var u=function(e){var t=e,c=o({},r,b(r.to[t]));l.arr(c.config)&&(c.config=c.config[t]),i=i.then((function(){if(a===n.guid)return new Promise((function(e){return n.diff(c).start(e)}))}))},s=0;s<r.to.length;s++)u(s);else if(l.fun(r.to)){var f,p=0;i=i.then((function(){return r.to((function(e){var t=o({},r,b(e));if(l.arr(t.config)&&(t.config=t.config[p]),p++,a===n.guid)return f=new Promise((function(e){return n.diff(t).start(e)}))}),(function(e){return void 0===e&&(e=!0),n.stop(e)})).then((function(){return f}))}))}i.then(t)},t.diff=function(e){var t=this;this.props=o({},this.props,e);var n=this.props,r=n.from,c=void 0===r?{}:r,a=n.to,i=void 0===a?{}:a,u=n.config,s=void 0===u?{}:u,f=n.reverse,b=n.attach,h=n.reset,v=n.immediate;if(f){var y=[i,c];c=y[0],i=y[1]}this.merged=o({},c,this.merged,i),this.hasChanged=!1;var O=b&&b(this);if(this.animations=Object.entries(this.merged).reduce((function(e,n){var r=n[0],a=n[1],i=e[r]||{},u=l.num(a),f=l.str(a)&&!a.startsWith("#")&&!/\d/.test(a)&&!g[a],b=l.arr(a),y=!u&&!b&&!f,j=l.und(c[r])?a:c[r],E=u||b||f?a:1,S=m(s,r);O&&(E=O.animations[r].parent);var k,_=i.parent,R=i.interpolation,C=d(O?E.getPayload():E),x=a;y&&(x=w({range:[0,1],output:[a,a]})(1));var I,N=R&&R.getValue(),T=!l.und(_)&&i.animatedValues.some((function(e){return!e.done})),M=!l.equ(x,N),A=!l.equ(x,i.previous),D=!l.equ(S,i.config);if(h||A&&M||D){var F;if(u||f)_=R=i.parent||new U(j);else if(b)_=R=i.parent||new q(j);else if(y){var L=i.interpolation&&i.interpolation.calc(i.parent.value);L=void 0===L||h?j:L,i.parent?(_=i.parent).setValue(0,!1):_=new U(0);var V={output:[L,a]};i.interpolation?(R=i.interpolation,i.interpolation.updateConfig(V)):R=_.interpolate(V)}return C=d(O?E.getPayload():E),k=d(_.getPayload()),h&&!y&&_.setValue(j,!1),t.hasChanged=!0,k.forEach((function(e){e.startPosition=e.value,e.lastPosition=e.value,e.lastVelocity=T?e.lastVelocity:void 0,e.lastTime=T?e.lastTime:void 0,e.startTime=P(),e.done=!1,e.animatedStyles.clear()})),m(v,r)&&_.setValue(y?E:a,!1),o({},e,((F={})[r]=o({},i,{name:r,parent:_,interpolation:R,animatedValues:k,toValues:C,previous:x,config:S,fromValues:d(_.getValue()),immediate:m(v,r),initialVelocity:p(S.velocity,0),clamp:p(S.clamp,!1),precision:p(S.precision,.01),tension:p(S.tension,170),friction:p(S.friction,26),mass:p(S.mass,1),duration:S.duration,easing:p(S.easing,(function(e){return e})),decay:S.decay}),F))}return M?e:(y&&(_.setValue(1,!1),R.updateConfig({output:[x,x]})),_.done=!0,t.hasChanged=!0,o({},e,((I={})[r]=o({},e[r],{previous:x}),I)))}),this.animations),this.hasChanged)for(var j in this.configs=Object.values(this.animations),this.values={},this.interpolations={},this.animations)this.interpolations[j]=this.animations[j].interpolation,this.values[j]=this.animations[j].interpolation.getValue();return this},t.destroy=function(){this.stop(),this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.local=0},e}(),W=function(e,t){var n=a.useRef(!1),r=a.useRef(),o=l.fun(t),c=a.useMemo((function(){var n;return r.current&&(r.current.map((function(e){return e.destroy()})),r.current=void 0),[new Array(e).fill().map((function(e,r){var c=new H,a=o?m(t,r,c):t[r];return 0===r&&(n=a.ref),c.update(a),n||c.start(),c})),n]}),[e]),i=c[0],u=c[1];r.current=i;a.useImperativeHandle(u,(function(){return{start:function(){return Promise.all(r.current.map((function(e){return new Promise((function(t){return e.start(t)}))})))},stop:function(e){return r.current.forEach((function(t){return t.stop(e)}))},get controllers(){return r.current}}}));var s=a.useMemo((function(){return function(e){return r.current.map((function(t,n){t.update(o?m(e,n,t):e[n]),u||t.start()}))}}),[e]);a.useEffect((function(){n.current?o||s(t):u||r.current.forEach((function(e){return e.start()}))})),a.useEffect((function(){return n.current=!0,function(){return r.current.forEach((function(e){return e.destroy()}))}}),[]);var f=r.current.map((function(e){return e.getValues()}));return o?[f,s,function(e){return r.current.forEach((function(t){return t.pause(e)}))}]:f},K=0,G=function(e,t){return("function"==typeof t?e.map(t):d(t)).map(String)},Y=function(e){var t=e.items,n=e.keys,r=void 0===n?function(e){return e}:n,a=c(e,["items","keys"]);return t=d(void 0!==t?t:null),o({items:t,keys:G(t,r)},a)};function $(e,t){var n=function(){if(o){if(c>=r.length)return"break";a=r[c++]}else{if((c=r.next()).done)return"break";a=c.value}var n=a.key,i=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(i),e.current.deleted=e.current.deleted.filter(i))},r=e.current.deleted,o=Array.isArray(r),c=0;for(r=o?r:r[Symbol.iterator]();;){var a;if("break"===n())break}e.current.forceUpdate()}var X=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=h.transform(t)),n.payload=t,n}return u(t,e),t}(O),Q={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Z="[-+]?\\d*\\.?\\d+";function J(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"\\(\\s*("+t.join(")\\s*,\\s*(")+")\\s*\\)"}var ee=new RegExp("rgb"+J(Z,Z,Z)),te=new RegExp("rgba"+J(Z,Z,Z,Z)),ne=new RegExp("hsl"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),re=new RegExp("hsla"+J(Z,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",Z)),oe=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ce=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,ie=/^#([0-9a-fA-F]{8})$/;function ue(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function se(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,c=ue(o,r,e+1/3),a=ue(o,r,e),i=ue(o,r,e-1/3);return Math.round(255*c)<<24|Math.round(255*a)<<16|Math.round(255*i)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function de(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ae.exec(t))?parseInt(n[1]+"ff",16)>>>0:Q.hasOwnProperty(t)?Q[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|pe(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=ie.exec(t))?parseInt(n[1],16)>>>0:(n=ce.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|se(fe(n[1]),de(n[2]),de(n[3])))>>>0:(n=re.exec(t))?(se(fe(n[1]),de(n[2]),de(n[3]))|pe(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var be=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,he=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(Q).join("|")+")","g"),ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function Oe(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ve);var je={};T((function(e){return new X(e)})),C("div"),_((function(e){var t=e.output.map((function(e){return e.replace(he,me)})).map((function(e){return e.replace(ge,me)})),n=t[0].match(be).map((function(){return[]}));t.forEach((function(e){e.match(be).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(be).map((function(t,r){return V(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(be,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),E(Q),j((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,i=c(t,["style","children","scrollTop","scrollLeft"]),u="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var s in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(s)){var l=0===s.indexOf("--"),f=Oe(s,n[s],l);"float"===s&&(s="cssFloat"),l?e.style.setProperty(s,f):e.style[s]=f}for(var p in i){var d=u?p:je[p]||(je[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(d)&&e.setAttribute(d,i[p])}}),(function(e){return e}));var Ee,we,Se=(Ee=function(e){return a.forwardRef((function(t,n){var r=f(),u=a.useRef(!0),s=a.useRef(null),p=a.useRef(null),d=a.useCallback((function(e){var t=s.current;s.current=new A(e,(function(){var e=!1;p.current&&(e=h.fn(p.current,s.current.getAnimatedValue())),p.current&&!1!==e||r()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){u.current=!1,s.current&&s.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return N(p,u,r)})),d(t);var m,b=s.current.getValue(),g=(b.scrollTop,b.scrollLeft,c(b,["scrollTop","scrollLeft"])),v=(m=e,!l.fun(m)||m.prototype instanceof i.Component?function(e){return p.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return i.createElement(e,o({},g,{ref:v}))}))},void 0===(we=!1)&&(we=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=we?t[0].toLowerCase()+t.substring(1):t;return e[n]=Ee(n),e}),Ee)}),ke=Se(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Se,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=L,t.animated=ke,t.a=ke,t.interpolate=function(e,t,n){return e&&new B(e,t,n)},t.Globals=M,t.useSpring=function(e){var t=l.fun(e),n=W(1,t?e:[e]),r=n[0],o=n[1],c=n[2];return t?[r[0],o,c]:r},t.useTrail=function(e,t){var n=a.useRef(!1),r=l.fun(t),c=m(t),i=a.useRef(),u=W(e,(function(e,t){return 0===e&&(i.current=[]),i.current.push(t),o({},c,{config:m(c.config,e),attach:e>0&&function(){return i.current[e-1]}})})),s=u[0],f=u[1],p=u[2],d=a.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,a=i.current[r];return o({},e,{config:m(e.config||c.config,t),attach:a&&function(){return a}})}))}}),[e,c.reverse]);return a.useEffect((function(){n.current&&!r&&d(t)})),a.useEffect((function(){n.current=!0}),[]),r?[s,d,p]:s},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),i=Y(r),u=i.lazy,s=void 0!==u&&u,l=(i.unique,i.reset),p=void 0!==l&&l,d=(i.enter,i.leave,i.update,i.onDestroyed),b=(i.keys,i.items,i.onFrame),h=i.onRest,g=i.onStart,v=i.ref,y=c(i,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),O=f(),j=a.useRef(!1),E=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!j.current&&new Map,forceUpdate:O});return a.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(E.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(E.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(E.current.instances).map((function(e){return e[1]}))}}})),E.current=function(e,t){var n=e.first,r=e.prevProps,a=c(e,["first","prevProps"]),i=Y(t),u=i.items,s=i.keys,l=i.initial,f=i.from,p=i.enter,d=i.leave,b=i.update,h=i.trail,g=void 0===h?0:h,v=i.unique,y=i.config,O=i.order,j=void 0===O?["enter","leave","update"]:O,E=Y(r),w=E.keys,S=E.items,k=o({},a.current),_=[].concat(a.deleted),R=Object.keys(k),P=new Set(R),C=new Set(s),x=s.filter((function(e){return!P.has(e)})),I=a.transitions.filter((function(e){return!e.destroyed&&!C.has(e.originalKey)})).map((function(e){return e.originalKey})),N=s.filter((function(e){return P.has(e)})),T=-g;for(;j.length;){switch(j.shift()){case"enter":x.forEach((function(e,t){v&&_.find((function(t){return t.originalKey===e}))&&(_=_.filter((function(t){return t.originalKey!==e})));var r=s.indexOf(e),o=u[r],c=n&&void 0!==l?"initial":"enter";k[e]={slot:c,originalKey:e,key:v?String(e):K++,item:o,trail:T+=g,config:m(y,o,c),from:m(n&&void 0!==l?l||{}:f,o),to:m(p,o)}}));break;case"leave":I.forEach((function(e){var t=w.indexOf(e),n=S[t];_.unshift(o({},k[e],{slot:"leave",destroyed:!0,left:w[Math.max(0,t-1)],right:w[Math.min(w.length,t+1)],trail:T+=g,config:m(y,n,"leave"),to:m(d,n)})),delete k[e]}));break;case"update":N.forEach((function(e){var t=s.indexOf(e),n=u[t];k[e]=o({},k[e],{item:n,slot:"update",trail:T+=g,config:m(y,n,"update"),to:m(b,n)})}))}}var M=s.map((function(e){return k[e]}));return _.forEach((function(e){var t,n=e.left,r=(e.right,c(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[r],M.slice(t))})),o({},a,{changed:x.length||I.length||N.length,first:n&&0===x.length,transitions:M,current:k,deleted:_,prevProps:t})}(E.current,r),E.current.changed&&E.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,c=e.config,a=e.trail,i=e.key,u=e.item;E.current.instances.has(i)||E.current.instances.set(i,new H);var l=E.current.instances.get(i),f=o({},y,{to:r,from:n,config:c,ref:v,onRest:function(n){E.current.mounted&&(e.destroyed&&(v||s||$(E,i),d&&d(u)),!Array.from(E.current.instances).some((function(e){return!e[1].idle}))&&(v||s)&&E.current.deleted.length>0&&$(E),h&&h(u,t,n))},onStart:g&&function(){return g(u,t)},onFrame:b&&function(e){return b(u,t,e)},delay:a,reset:p&&"enter"===t});l.update(f),E.current.paused||l.start()})),a.useEffect((function(){return E.current.mounted=j.current=!0,function(){E.current.mounted=j.current=!1,Array.from(E.current.instances).map((function(e){return e[1].destroy()})),E.current.instances.clear()}}),[]),E.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:E.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=a.useRef();a.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var c=e.current;if(c){var a=c.controllers;if(a.length){var i=n*t[r];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+i})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=W},function(e,t,n){"use strict";n.d(t,"b",(function(){return y})),n.d(t,"a",(function(){return O}));var r=n(28),o=n.n(r),c=n(7),a=n.n(c),i=n(14),u=n.n(i),s=n(10),l=n.n(s),f=n(0),p=n(8),d=n(21),m=n.n(d);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e){var t=function(e,t){if("object"!==o()(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==o()(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o()(t)?t:String(t)}var v=Object(f.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),y=function(){return Object(f.useContext)(v)},O=function(e){var t=e.children,n=Object(f.useState)({}),r=l()(n,2),o=r[0],c=r[1],i=Object(f.useCallback)((function(e){return o[e]}),[o]),s=Object(f.useCallback)((function(e){var t=o[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[o]),d=Object(f.useCallback)((function(e){c((function(t){if(!t[e])return t;t[e];return u()(t,[e].map(g))}))}),[]),b=Object(f.useCallback)((function(){c({})}),[]),y=Object(f.useCallback)((function(e){e&&c((function(t){return e=Object(p.pickBy)(e,(function(e,n){return"string"==typeof e.message&&(!t.hasOwnProperty(n)||!m()(t[n],e))})),0===Object.values(e).length?t:h(h({},t),e)}))}),[]),O=Object(f.useCallback)((function(e,t){c((function(n){if(!n.hasOwnProperty(e))return n;var r=h(h({},n[e]),t);return m()(n[e],r)?n:h(h({},n),{},a()({},e,r))}))}),[]),j={getValidationError:i,setValidationErrors:y,clearValidationError:d,clearAllValidationErrors:b,hideValidationError:Object(f.useCallback)((function(e){O(e,{hidden:!0})}),[O]),showValidationError:Object(f.useCallback)((function(e){O(e,{hidden:!1})}),[O]),showAllValidationErrors:Object(f.useCallback)((function(){c((function(e){var t={};return Object.keys(e).forEach((function(n){e[n].hidden&&(t[n]=h(h({},e[n]),{},{hidden:!1}))})),0===Object.values(t).length?e:h(h({},e),t)}))}),[]),hasValidationErrors:Object.keys(o).length>0,getValidationErrorId:s};return React.createElement(v.Provider,{value:j},t)}},,,function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,c=void 0;try{for(var a,i=e[Symbol.iterator]();!(r=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,c=e}finally{try{r||null==i.return||i.return()}finally{if(o)throw c}}return n}}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=n(68),u=(n(3),n(5)),s=n.n(u);n(156);t.a=function(e){var t=e.className,n=e.showSpinner,r=void 0!==n&&n,c=e.children,u=a()(e,["className","showSpinner","children"]),l=s()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return React.createElement(i.a,o()({className:l},u),r&&React.createElement("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),React.createElement("span",{className:"wc-block-components-button__text"},c))}},function(e,t,n){"use strict";var r=n(19),o=n(6),c=n(17),a=n(0),i=n(29),u=n(11),s=n.n(u),l=n(14),f=n.n(l),p=function(e){var t=e.className,n=e.size,r=void 0===n?20:n,o=f()(e,["className","size"]);return React.createElement(i.SVG,s()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},o),React.createElement("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))},d=React.createElement(p,null),m=n(129),b=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=d;break;case"no-alt":t=m.a}return t?Object(a.cloneElement)(t,{size:e.size||20,className:e.className}):null};function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icon,n=void 0===t?null:t,r=e.size,u=Object(c.a)(e,["icon","size"]);if("string"==typeof n)return Object(a.createElement)(b,Object(o.a)({icon:n},u));if(n&&b===n.type)return Object(a.cloneElement)(n,g({},u));var s=r||24;if("function"==typeof n)return n.prototype instanceof a.Component?Object(a.createElement)(n,g({size:s},u)):n(g({size:s},u));if(n&&("svg"===n.type||n.type===i.SVG)){var l=g(g({width:s,height:s},n.props),u);return Object(a.createElement)(i.SVG,l)}return Object(a.isValidElement)(n)?Object(a.cloneElement)(n,g({size:s},u)):n}},function(e,t){!function(){e.exports=this.wp.autop}()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(7),o=n.n(r),c=n(94),a=n(0);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s=function(){var e=Object(c.b)(),t=e.notices,n=e.createNotice,r=e.removeNotice,o=e.createSnackbarNotice,i=e.setIsSuppressed,s=Object(a.useRef)(t);Object(a.useEffect)((function(){s.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return s.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach((function(t){null!==e&&t.status!==e||r(t.id)}))},removeNotice:r}}),[r]),f=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("default",e,u({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("error",e,u({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("warning",e,u({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("info",e,u({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n("success",e,u({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(e,t)}}}),[n,o]);return u(u(u({notices:t},l),f),{},{setIsSuppressed:i})}},function(e,t,n){"use strict";(function(e){var r=n(0),o=n(8),c=n(5),a=n.n(c),i=n(36),u=n(1),s=(n(58),n(68));t.a=Object(r.forwardRef)((function(t,n){var c=t.className,l=t.children,f=t.spokenMessage,p=void 0===f?l:f,d=t.politeness,m=void 0===d?"polite":d,b=t.actions,h=void 0===b?[]:b,g=t.onRemove,v=void 0===g?o.noop:g;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(i.speak)(n,t)}),[n,t])}(p,m),Object(r.useEffect)((function(){var e=setTimeout((function(){v()}),1e4);return function(){return clearTimeout(e)}}),[]);var y=a()(c,"components-snackbar");return h&&h.length>1&&(void 0!==e&&e.env,h=[h[0]]),Object(r.createElement)("div",{ref:n,className:y,onClick:v,tabIndex:"0",role:"button",onKeyPress:v,"aria-label":Object(u.__)("Dismiss this notice")},Object(r.createElement)("div",{className:"components-snackbar__content"},l,h.map((function(e,t){var n=e.label,o=e.onClick,c=e.url;return Object(r.createElement)(s.a,{key:t,href:c,isTertiary:!0,onClick:function(e){e.stopPropagation(),o&&o(e)},className:"components-snackbar__action"},n)}))))}))}).call(this,n(74))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(2);function o(e,t,n){void 0===n&&(n={});var o=n.maxWait,c=Object(r.useRef)(null),a=Object(r.useRef)([]),i=n.leading,u=void 0===n.trailing||n.trailing,s=Object(r.useRef)(!1),l=Object(r.useRef)(null),f=Object(r.useRef)(!1),p=Object(r.useRef)(e);p.current=e;var d=Object(r.useCallback)((function(){clearTimeout(l.current),clearTimeout(c.current),c.current=null,a.current=[],l.current=null,s.current=!1}),[]);Object(r.useEffect)((function(){return f.current=!1,function(){f.current=!0}}),[]);var m=Object(r.useCallback)((function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];a.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!i||s.current||(p.current.apply(p,e),s.current=!0),l.current=setTimeout((function(){var t=!0;i&&s.current&&(t=!1),d(),!f.current&&u&&t&&p.current.apply(p,e)}),t),o&&!c.current&&u&&(c.current=setTimeout((function(){var e=a.current;d(),f.current||p.current.apply(null,e)}),o))}),[o,t,d,i,u]),b=Object(r.useCallback)((function(){l.current&&(p.current.apply(null,a.current),d())}),[d]);return[m,d,b]}},function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(3),n(166);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-product-badge",n)},t)}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return C})),n.d(t,"a",(function(){return x}));var r=n(7),o=n.n(r),c=n(10),a=n.n(c),i=(n(3),n(0)),u=n(12),s=n(140),l=n(6),f=n(25),p=n.n(f);function d(e,t,n,r,o,c,a){try{var i=e[c](a),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function a(e){d(c,r,o,a,i,"next",e)}function i(e){d(c,r,o,a,i,"throw",e)}a(void 0)}))}}var b=n(16),h=n(5),g=n.n(h),v=n(8),y=n(78),O=n(161),j=n(90);var E=function(e){var t=e.notices,n=e.className,r=e.children,o=e.onRemove,c=void 0===o?v.noop:o,a=Object(O.a)(),u=Object(i.useState)((function(){return new WeakMap})),s=Object(b.a)(u,1)[0],f=Object(y.useTransition)(t,(function(e){return e.id}),{from:{opacity:0,height:0},enter:function(e){return function(){var t=m(p.a.mark((function t(n){return p.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n({opacity:1,height:s.get(e).offsetHeight});case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()},leave:function(){return function(){var e=m(p.a.mark((function e(t){return p.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({opacity:0});case 2:return e.next=4,t({height:0});case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},immediate:a});n=g()("components-snackbar-list",n);var d=function(e){return function(){return c(e.id)}};return Object(i.createElement)("div",{className:n},r,f.map((function(e){var t=e.item,n=e.key,r=e.props;return Object(i.createElement)(y.animated.div,{key:n,style:r},Object(i.createElement)("div",{className:"components-snackbar-list__notice-container",ref:function(e){return e&&s.set(t,e)}},Object(i.createElement)(j.a,Object(l.a)({},Object(v.omit)(t,["content"]),{onRemove:d(t)}),t.content)))})))},w=n(89),S=n(77),k=function(){var e=Object(S.a)().isEditor,t=Object(w.a)(),n=t.notices,r=t.removeNotice;if(e)return null;var o=n.filter((function(e){return"snackbar"===e.type}));return React.createElement(E,{notices:o,className:"wc-block-components-notices__snackbar",onRemove:r})};function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=Object(i.createContext)({notices:[],createNotice:function(e,t,n){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),C=function(){return Object(i.useContext)(P)},x=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,o=e.createNoticeContainer,c=void 0===o||o,l=e.context,f=void 0===l?"wc/core":l,p=Object(u.useDispatch)("core/notices"),d=p.createNotice,m=p.removeNotice,b=Object(i.useState)(!1),h=a()(b,2),g=h[0],v=h[1],y=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};d(e,t,R(R({},n),{},{context:n.context||f}))}),[d,f]),O=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f;m(e,t)}),[m,f]),j=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y("default",e,R(R({},t),{},{type:"snackbar"}))}),[y]),E={notices:Object(u.useSelect)((function(e){return{notices:e("core/notices").getNotices(f)}}),[f]).notices,createNotice:y,createSnackbarNotice:j,removeNotice:O,context:f,setIsSuppressed:v},w=g?null:React.createElement(s.a,{className:r,notices:E.notices}),S=g?null:React.createElement(k,null);return React.createElement(P.Provider,{value:E},c&&w,t,S)}},function(e,t,n){var r=n(60);e.exports=function(e){if(Array.isArray(e))return r(e)}},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(7),o=n.n(r),c=n(15),a=n(12),i=n(77),u=n(22),s=n(8);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},d=f(f({},p),{},{email:"",phone:""}),m=function(e){return Object(s.mapValues)(e,(function(e){return Object(u.decodeEntities)(e)}))},b={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:d,shippingAddress:p,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){},extensions:{}},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(i.a)(),n=t.isEditor,r=t.previewData,o=(null==r?void 0:r.previewCart)||{},u=e.shouldSelect,s=Object(a.useSelect)((function(e,t){var r=t.dispatch;if(!u)return b;if(n)return{cartCoupons:o.coupons,cartItems:o.items,cartFees:o.fees,cartItemsCount:o.items_count,cartItemsWeight:o.items_weight,cartNeedsPayment:o.needs_payment,cartNeedsShipping:o.needs_shipping,cartItemErrors:[],cartTotals:o.totals,cartIsLoading:!1,cartErrors:[],billingAddress:d,shippingAddress:p,extensions:{},shippingRates:o.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:o.has_calculated_shipping,paymentRequirements:o.paymentRequirements,receiveCart:"function"==typeof(null==o?void 0:o.receiveCart)?o.receiveCart:function(){}};var a=e(c.CART_STORE_KEY),i=a.getCartData(),s=a.getCartErrors(),l=a.getCartTotals(),f=!a.hasFinishedResolution("getCartData"),h=a.isCustomerDataUpdating(),g=r(c.CART_STORE_KEY).receiveCart,v=m(i.billingAddress),y=i.needsShipping?m(i.shippingAddress):v,O=i.fees.map((function(e){return m(e)}));return{cartCoupons:i.coupons,cartItems:i.items||[],cartFees:O,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors||[],cartTotals:l,cartIsLoading:f,cartErrors:s,billingAddress:v,shippingAddress:y,extensions:i.extensions||{},shippingRates:i.shippingRates||[],shippingRatesLoading:h,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements||[],receiveCart:g}}),[u]);return s}},function(e,t){!function(){e.exports=this.wp.wordcount}()},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=n(5),u=n.n(i);n(3),n(164);t.a=function(e){var t=e.children,n=e.className,r=e.headingLevel,c=a()(e,["children","className","headingLevel"]),i=u()("wc-block-components-title",n),s="h".concat(r);return React.createElement(s,o()({className:i},c),t)}},function(e,t,n){"use strict";var r=n(1),o={first_name:{label:Object(r.__)("First name","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("First name (optional)","woo-gutenberg-products-block"),autocomplete:"given-name",autocapitalize:"sentences",required:!0,hidden:!1,index:10},last_name:{label:Object(r.__)("Last name","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Last name (optional)","woo-gutenberg-products-block"),autocomplete:"family-name",autocapitalize:"sentences",required:!0,hidden:!1,index:20},company:{label:Object(r.__)("Company","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Company (optional)","woo-gutenberg-products-block"),autocomplete:"organization",autocapitalize:"sentences",required:!1,hidden:!1,index:30},address_1:{label:Object(r.__)("Address","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Address (optional)","woo-gutenberg-products-block"),autocomplete:"address-line1",autocapitalize:"sentences",required:!0,hidden:!1,index:40},address_2:{label:Object(r.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Apartment, suite, etc. (optional)","woo-gutenberg-products-block"),autocomplete:"address-line2",autocapitalize:"sentences",required:!1,hidden:!1,index:50},country:{label:Object(r.__)("Country/Region","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Country/Region (optional)","woo-gutenberg-products-block"),autocomplete:"country",required:!0,hidden:!1,index:60},city:{label:Object(r.__)("City","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("City (optional)","woo-gutenberg-products-block"),autocomplete:"address-level2",autocapitalize:"sentences",required:!0,hidden:!1,index:70},state:{label:Object(r.__)("State/County","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("State/County (optional)","woo-gutenberg-products-block"),autocomplete:"address-level1",autocapitalize:"sentences",required:!0,hidden:!1,index:80},postcode:{label:Object(r.__)("Postal code","woo-gutenberg-products-block"),optionalLabel:Object(r.__)("Postal code (optional)","woo-gutenberg-products-block"),autocomplete:"postal-code",autocapitalize:"characters",required:!0,hidden:!1,index:90}};t.a=o},function(e,t,n){"use strict";var r={globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}};function o(e){return(o="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 c(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i={normalizePrecision:function(e){var t=e.reduce((function(e,t){return Math.max(e.getPrecision(),t.getPrecision())}));return e.map((function(e){return e.getPrecision()!==t?e.convertPrecision(t):e}))},minimum:function(e){var t=c(e),n=t[0],r=t.slice(1),o=n;return r.forEach((function(e){o=o.lessThan(e)?o:e})),o},maximum:function(e){var t=c(e),n=t[0],r=t.slice(1),o=n;return r.forEach((function(e){o=o.greaterThan(e)?o:e})),o}};function u(e){return!isNaN(parseInt(e))&&isFinite(e)}function s(e){return e%2==0}function l(e){return u(e)&&!Number.isInteger(e)}function f(e){return Math.abs(e)%1==.5}function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t)e.setRequestHeader(n,t[n]);return e}function d(e){return void 0===e}function m(){var e=function(e,t){var n=function(e){return Math.pow(10,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e.toString();if(t.indexOf("e-")>0)return parseInt(t.split("e-")[1]);var n=t.split(".")[1];return n?n.length:0}(e))},r=Math.max(n(e),n(t));return Math.round(e*r)*Math.round(t*r)/(r*r)},t={HALF_ODD:function(e){var t=Math.round(e);return f(e)&&s(t)?t-1:t},HALF_EVEN:function(e){var t=Math.round(e);return f(e)?s(t)?t:t-1:t},HALF_UP:function(e){return Math.round(e)},HALF_DOWN:function(e){return f(e)?Math.floor(e):Math.round(e)},HALF_TOWARDS_ZERO:function(e){return f(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e)},HALF_AWAY_FROM_ZERO:function(e){return f(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e)},DOWN:function(e){return Math.floor(e)}};return{add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(t,n){return l(t)||l(n)?e(t,n):t*n},divide:function(e,t){return e/t},modulo:function(e,t){return e%t},round:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HALF_EVEN";return t[n](e)}}}var b=m();function h(e){var t=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(e);return{getMatches:function(){return null!==t?t.slice(1).filter((function(e){return!d(e)})):[]},getMinimumFractionDigits:function(){var e=function(e){return"."===e};return d(this.getMatches().find(e))?0:this.getMatches()[b.add(this.getMatches().findIndex(e),1)].split("").length},getCurrencyDisplay:function(){return{USD:"code",dollar:"name",$:"symbol"}[this.getMatches().find((function(e){return"USD"===e||"dollar"===e||"$"===e}))]},getStyle:function(){return d(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!d(this.getMatches().find((function(e){return","===e})))}}}function g(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;for(var n in t)e=e.replace("{{".concat(n,"}}"),t[n]);return e},n=function(n,r){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var o=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){4===o.readyState&&(o.status>=200&&o.status<400?n(JSON.parse(o.responseText)):r(new Error(o.statusText)))},onerror:function(){r(new Error("Network error"))}});o.open("GET",e,!0),p(o,t.headers),o.send()}))}(t(e.endpoint,{from:n,to:r}),{headers:e.headers})};return{getExchangeRate:function(r,c){return(a=e.endpoint,!Boolean(a)||"object"!==o(a)&&"function"!=typeof a||"function"!=typeof a.then?n(r,c):e.endpoint).then((function(n){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",r={};return Object.entries(t).forEach((function(t){if("object"===o(t[1])){var c=e(t[1]);Object.entries(c).forEach((function(e){r[t[0]+n+e[0]]=e[1]}))}else r[t[0]]=t[1]})),r}(n)[t(e.propertyPath,{from:r,to:c})]}));var a}}}function v(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!e)throw new n(t)}function y(e){v(function(e){return u(e)&&e<=100&&e>=0}(e),"You must provide a numeric value between 0 and 100.",RangeError)}function O(e){v(Number.isInteger(e),"You must provide an integer.",TypeError)}var j=m(),E=Object.assign((function e(t){var n=Object.assign({},{amount:e.defaultAmount,currency:e.defaultCurrency,precision:e.defaultPrecision},t),r=n.amount,o=n.currency,c=n.precision;O(r),O(c);var a=e.globalLocale,i=e.globalFormat,u=e.globalRoundingMode,s=e.globalFormatRoundingMode,l=Object.assign({},e.globalExchangeRatesApi),f=function(t){var n=Object.assign({},Object.assign({},{amount:r,currency:o,precision:c},t),Object.assign({},{locale:this.locale},t));return Object.assign(e({amount:n.amount,currency:n.currency,precision:n.precision}),{locale:n.locale})},p=function(e){v(this.hasSameCurrency(e),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return r},getCurrency:function(){return o},getLocale:function(){return this.locale||a},setLocale:function(e){return f.call(this,{locale:e})},getPrecision:function(){return c},convertPrecision:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;return O(e),f.call(this,{amount:j.round(j.multiply(this.getAmount(),Math.pow(10,j.subtract(e,this.getPrecision()))),t),precision:e})},add:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return f.call(this,{amount:j.add(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},subtract:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return f.call(this,{amount:j.subtract(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},multiply:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;return f.call(this,{amount:j.round(j.multiply(this.getAmount(),e),t)})},divide:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;return f.call(this,{amount:j.round(j.divide(this.getAmount(),e),t)})},percentage:function(e){return y(e),this.multiply(j.divide(e,100))},allocate:function(e){var t=this;!function(e){v(function(e){return e.length>0&&e.every((function(e){return e>=0}))&&e.some((function(e){return e>0}))}(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}(e);for(var n=e.reduce((function(e,t){return j.add(e,t)})),r=this.getAmount(),o=e.map((function(e){var o=Math.floor(j.divide(j.multiply(t.getAmount(),e),n));return r=j.subtract(r,o),f.call(t,{amount:o})})),c=0;r>0;)e[c]>0&&(o[c]=o[c].add(f.call(this,{amount:1})),r=j.subtract(r,1)),c+=1;return o},convert:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.endpoint,o=void 0===r?l.endpoint:r,c=n.propertyPath,a=void 0===c?l.propertyPath||"rates.{{to}}":c,i=n.headers,s=void 0===i?l.headers:i,p=n.roundingMode,m=void 0===p?u:p,b=Object.assign({},{endpoint:o,propertyPath:a,headers:s,roundingMode:m});return g(b).getExchangeRate(this.getCurrency(),e).then((function(n){return v(!d(n),'No rate was found for the destination currency "'.concat(e,'".'),TypeError),f.call(t,{amount:j.round(j.multiply(t.getAmount(),parseFloat(n)),b.roundingMode),currency:e})}))},equalsTo:function(e){return this.hasSameAmount(e)&&this.hasSameCurrency(e)},lessThan:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()<n[1].getAmount()},lessThanOrEqual:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()<=n[1].getAmount()},greaterThan:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()>n[1].getAmount()},greaterThanOrEqual:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()>=n[1].getAmount()},isZero:function(){return 0===this.getAmount()},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return 0!==j.modulo(this.getAmount(),Math.pow(10,c))},hasCents:function(){return 0!==j.modulo(this.getAmount(),Math.pow(10,c))},hasSameCurrency:function(e){return this.getCurrency()===e.getCurrency()},hasSameAmount:function(t){var n=e.normalizePrecision([this,t]);return n[0].getAmount()===n[1].getAmount()},toFormat:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=h(e);return this.toRoundedUnit(n.getMinimumFractionDigits(),t).toLocaleString(this.getLocale(),{currencyDisplay:n.getCurrencyDisplay(),useGrouping:n.getUseGrouping(),minimumFractionDigits:n.getMinimumFractionDigits(),style:n.getStyle(),currency:this.getCurrency()})},toUnit:function(){return j.divide(this.getAmount(),Math.pow(10,c))},toRoundedUnit:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,n=Math.pow(10,e);return j.divide(j.round(j.multiply(this.toUnit(),n),t),n)},toObject:function(){return{amount:r,currency:o,precision:c}},toJSON:function(){return this.toObject()}}}),{defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},r,i);t.a=E},function(e,t,n){"use strict";var r=n(2),o=n.n(r);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 a(){return(a=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 i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){}function f(){}f.resetWarningCache=l;var p=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(){function e(e,t,n,r,o,c){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==c){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:f,resetWarningCache:l};return n.PropTypes=n,n}()}));function d(){}function m(e){return!!(e||"").match(/\d/)}function b(e){return null==e}function h(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function g(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),c=o[0],a=o[1]||"";return{beforeDecimal:c,afterDecimal:a,hasNagation:n,addNegation:r}}function v(e,t,n){for(var r="",o=n?"0":"",c=0;c<=t-1;c++)r+=e[c]||o;return r}function y(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function O(e,t,n){return Math.min(Math.max(e,t),n)}function j(e){return Math.max(e.selectionStart,e.selectionEnd)}var E={thousandSeparator:p.oneOfType([p.string,p.oneOf([!0])]),decimalSeparator:p.string,allowedDecimalSeparators:p.arrayOf(p.string),thousandsGroupStyle:p.oneOf(["thousand","lakh","wan"]),decimalScale:p.number,fixedDecimalScale:p.bool,displayType:p.oneOf(["input","text"]),prefix:p.string,suffix:p.string,format:p.oneOfType([p.string,p.func]),removeFormatting:p.func,mask:p.oneOfType([p.string,p.arrayOf(p.string)]),value:p.oneOfType([p.number,p.string]),defaultValue:p.oneOfType([p.number,p.string]),isNumericString:p.bool,customInput:p.elementType,allowNegative:p.bool,allowEmptyFormatting:p.bool,allowLeadingZeros:p.bool,onValueChange:p.func,onKeyDown:p.func,onMouseUp:p.func,onChange:p.func,onFocus:p.func,onBlur:p.func,type:p.oneOf(["text","tel","password"]),isAllowed:p.func,renderText:p.func,getInputRef:p.oneOfType([p.func,p.shape({current:p.any})])},w={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:d,onChange:d,onKeyDown:d,onMouseUp:d,onFocus:d,onBlur:d,isAllowed:function(){return!0}},S=function(e){function t(e){var n,r,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=this,n=!(o=i(t).call(this,e))||"object"!=typeof o&&"function"!=typeof o?s(r):o;var c=e.defaultValue;n.validateProps();var a=n.formatValueProp(c);return n.state={value:a,numAsString:n.removeFormatting(a)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(s(n)),n.onKeyDown=n.onKeyDown.bind(s(n)),n.onMouseUp=n.onMouseUp.bind(s(n)),n.onFocus=n.onFocus.bind(s(n)),n.onBlur=n.onBlur.bind(s(n)),n}var n,r,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,c=n.numAsString,a=void 0===c?"":c;if(e!==t){this.validateProps();var i=this.formatNumString(a),u=b(t.value)?i:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),f=parseFloat(a);(isNaN(l)&&isNaN(f)||l===f)&&i===o&&(null!==r||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),c="-"===e[0];c&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var a=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(e="".concat(e.substring(0,a),".").concat(e.substring(a+1,e.length).replace(new RegExp(h(r),"g"),""))),c&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,c=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!c||0===o||t||r?"":"|"+h(c)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){y(e,t),setTimeout((function(){e.value===n&&y(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,c=r.suffix,a=r.format;if(""===e)return 0;if(t=O(t,0,e.length),!a){var i="-"===e[0];return O(t,o.length+(i?1:0),e.length-c.length)}if("function"==typeof a)return t;if("#"===a[t]&&m(e[t]))return t;if("#"===a[t-1]&&m(e[t-1]))return t;var u=a.indexOf("#");t=O(t,u,a.lastIndexOf("#")+1);for(var s=a.substring(t,a.length).indexOf("#"),l=t,f=t+(-1===s?0:s);l>u&&("#"!==a[l]||!m(e[l]));)l-=1;return!m(e[f])||"left"===n&&t!==u||t-l<f-t?m(e[l])?l+1:l:f}},{key:"getCaretPosition",value:function(e,t,n){var r,o,c=this.props.format,a=this.state.value,i=this.getNumberRegex(!0),u=(e.match(i)||[]).join(""),s=(t.match(i)||[]).join("");for(r=0,o=0;o<n;o++){var l=e[o]||"",f=t[r]||"";if((l.match(i)||l===f)&&("0"!==l||!f.match(i)||"0"===f||u.length===s.length)){for(;l!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof c||a||(r=t.length),r=this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var c="-"===e[0];c&&(e=e.substring(1,e.length));var a=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,c&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,c=t.length;o<=c;o++){var a=t[o]||"",i=o===c?e.length:e.indexOf(a,n);if(-1===i){r=e;break}r+=e.substring(n,i),n=i+a.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,c=t.length;o<c;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,c=t.suffix,a=t.allowNegative,i=t.thousandsGroupStyle,u=this.getSeparators(),s=u.thousandSeparator,l=u.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=g(e,a),d=p.beforeDecimal,m=p.afterDecimal,b=p.addNegation;return void 0!==n&&(m=v(m,n,r)),s&&(d=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(d,s,i)),o&&(d=o+d),c&&(m+=c),b&&(d="-"+d),e=d+(f&&l||"")+m}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,n=t.format,r=t.allowEmptyFormatting,o=e;return o=""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,c=t.allowEmptyFormatting,a=this.props,i=a.value,u=a.isNumericString,s=!(i=b(i)?e:i)&&0!==i;return s&&c&&(i=""),s&&!c?"":("number"==typeof i&&(i=i.toString(),u=!0),"Infinity"===i&&u&&(i=""),u&&!n&&"number"==typeof r&&(i=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=g(e),c=o.beforeDecimal,a=o.afterDecimal,i=o.hasNagation,u=parseFloat("0.".concat(a||"0")).toFixed(t).split("."),s=c.split("").reverse().reduce((function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=v(u[1]||"",Math.min(t,a.length),n),f=r?".":"";return"".concat(i?"-":"").concat(s).concat(f).concat(l)}(i,r,o)),u?this.formatNumString(i):this.formatInput(i))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),c=r.test(e);return e=e.replace(/-/g,""),o&&!c&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,c=n.suffix,a=n.decimalScale,i=n.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-c.length||a&&i&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,c=r.allowNegative,a=r.prefix,i=r.suffix,u=r.decimalScale,s=this.getSeparators(),l=s.allowedDecimalSeparators,f=s.decimalSeparator,p=this.state.numAsString||"",d=this.selectionBeforeInput,m=d.selectionStart,b=d.selectionEnd,h=function(e,t){for(var n=0,r=0,o=e.length,c=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[c-1-r]&&c-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),v=h.start,y=h.end;if(!o&&v===y&&-1!==l.indexOf(n[m])){var O=0===u?"":f;return n.substr(0,m)+O+n.substr(m+1,n.length)}var j=o?0:a.length,E=t.length-(o?0:i.length);if(n.length>t.length||!n.length||v===y||0===m&&b===t.length||m===j&&b===E)return n;if(this.checkIfFormatGotDeleted(v,y,t)&&(n=t),!o){var w=this.removeFormatting(n),S=g(w,c),k=S.beforeDecimal,_=S.afterDecimal,R=S.addNegation,P=e<n.indexOf(f)+1;if(w.length<p.length&&P&&""===k&&!parseFloat(_))return R?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,c=e.numAsString,a=e.caretPos,i=this.props.onValueChange,u=this.state.value;if(n)if(o){if(!a){var s=e.inputValue||n.value,l=j(n);n.value=t,a=this.getCaretPosition(s,t,l)}this.setPatchedCaretPosition(n,a,t)}else n.value=t;void 0===c&&(c=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:c}),i(this.getValueObject(t,c)))}},{key:"onChange",value:function(e){var t=e.target,n=t.value,r=this.state,o=this.props,c=o.isAllowed,a=r.value||"",i=j(t);n=this.correctInputValue(i,a,n);var u=this.formatInput(n)||"",s=this.removeFormatting(u);c(this.getValueObject(u,s))||(u=a),this.updateValue({formattedValue:u,numAsString:s,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,c=t.allowLeadingZeros,a=n.numAsString,i=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(a))&&(a=""),c||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(a));var u=this.formatNumString(a);if(u!==i)return this.updateValue({formattedValue:u,numAsString:a,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,n=e.target,r=e.key,o=n.selectionStart,c=n.selectionEnd,a=n.value,i=void 0===a?"":a,u=this.props,s=u.decimalScale,l=u.fixedDecimalScale,f=u.prefix,p=u.suffix,d=u.format,m=u.onKeyDown,b=void 0!==s&&l,h=this.getNumberRegex(!1,b),g=new RegExp("-"),v="string"==typeof d;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:c},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===c){var y=t,O=v?d.indexOf("#"):f.length,j=v?d.lastIndexOf("#")+1:i.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var E="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(i,t,E)}else if("Delete"!==r||h.test(i[t])||g.test(i[t])){if("Backspace"===r&&!h.test(i[t]))if(o<=O+1&&"-"===i[0]&&void 0===d){var w=i.substring(1);this.updateValue({formattedValue:w,caretPos:y,input:n})}else if(!g.test(i[t])){for(;!h.test(i[y-1])&&y>O;)y--;y=this.correctCaretPosition(i,y,"left")}}else for(;!h.test(i[y])&&y<j;)y++;(y!==t||t<O||t>j)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,i),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,c=void 0===o?"":o;if(n===r){var a=this.correctCaretPosition(c,n);a!==n&&this.setPatchedCaretPosition(t,a,c)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var n=e.target,r=n.selectionStart,o=n.selectionEnd,c=n.value,a=void 0===c?"":c,i=t.correctCaretPosition(a,r);i===r||0===r&&o===a.length||t.setPatchedCaretPosition(n,i,a),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,c=r.type,i=r.displayType,u=r.customInput,s=r.renderText,l=r.getInputRef,f=r.format,p=this.state.value,d=(e=this.props,t=E,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),m=a({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(f)?"numeric":void 0},d,{type:c,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return s?s(p)||null:o.a.createElement("span",a({},d,{ref:l}),p);if(u){var b=u;return o.a.createElement(b,a({},m,{ref:l}))}return o.a.createElement("input",a({},m,{ref:l}))}}])&&c(n.prototype,r),l&&c(n,l),t}(o.a.Component);S.propTypes=E,S.defaultProps=w,t.a=S},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(32),a=n.n(c),i=n(33),u=n.n(i),s=n(20),l=n.n(s),f=n(34),p=n.n(f),d=n(35),m=n.n(d),b=n(24),h=n.n(b),g=n(7),v=n.n(g),y=n(2);n(131);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h()(e);if(t){var o=h()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}t.a=function(e){var t=function(t){p()(r,t);var n=O(r);function r(){var e;return a()(this,r),e=n.call(this),v()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),v()(l()(e),"moveFocusToTop",(function(t){var n=e.scrollPointRef.current.parentElement.querySelectorAll(t);n.length&&n[0].focus()})),v()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(y.createRef)(),e}return u()(r,[{key:"render",value:function(){return React.createElement(React.Fragment,null,React.createElement("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),React.createElement(e,o()({},this.props,{scrollToTop:this.scrollToTop})))}}]),r}(y.Component);return t.displayName="withScrollToTop",t}},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==typeof e&&1===e.nodeType}function o(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function c(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return o(n.overflowY,t)||o(n.overflowX,t)||function(e){var t=function(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}}(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)}(e)}return!1}function a(e,t,n,r,o,c,a,i){return c<e&&a>t||c>e&&a<t?0:c<=e&&i<=n||a>=t&&i>=n?c-e-r:a>t&&i<n||c<e&&i>n?a-t+o:0}t.a=function(e,t){var n=window,o=t.scrollMode,i=t.block,u=t.inline,s=t.boundary,l=t.skipOverflowHiddenElements,f="function"==typeof s?s:function(e){return e!==s};if(!r(e))throw new TypeError("Invalid target");for(var p=document.scrollingElement||document.documentElement,d=[],m=e;r(m)&&f(m);){if((m=m.parentNode)===p){d.push(m);break}m===document.body&&c(m)&&!c(document.documentElement)||c(m,l)&&d.push(m)}for(var b=n.visualViewport?n.visualViewport.width:innerWidth,h=n.visualViewport?n.visualViewport.height:innerHeight,g=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,y=e.getBoundingClientRect(),O=y.height,j=y.width,E=y.top,w=y.right,S=y.bottom,k=y.left,_="start"===i||"nearest"===i?E:"end"===i?S:E+O/2,R="center"===u?k+j/2:"end"===u?w:k,P=[],C=0;C<d.length;C++){var x=d[C],I=x.getBoundingClientRect(),N=I.height,T=I.width,M=I.top,A=I.right,D=I.bottom,F=I.left;if("if-needed"===o&&E>=0&&k>=0&&S<=h&&w<=b&&E>=M&&S<=D&&k>=F&&w<=A)return P;var L=getComputedStyle(x),V=parseInt(L.borderLeftWidth,10),B=parseInt(L.borderTopWidth,10),U=parseInt(L.borderRightWidth,10),q=parseInt(L.borderBottomWidth,10),z=0,H=0,W="offsetWidth"in x?x.offsetWidth-x.clientWidth-V-U:0,K="offsetHeight"in x?x.offsetHeight-x.clientHeight-B-q:0;if(p===x)z="start"===i?_:"end"===i?_-h:"nearest"===i?a(v,v+h,h,B,q,v+_,v+_+O,O):_-h/2,H="start"===u?R:"center"===u?R-b/2:"end"===u?R-b:a(g,g+b,b,V,U,g+R,g+R+j,j),z=Math.max(0,z+v),H=Math.max(0,H+g);else{z="start"===i?_-M-B:"end"===i?_-D+q+K:"nearest"===i?a(M,D,N,B,q+K,_,_+O,O):_-(M+N/2)+K/2,H="start"===u?R-F-V:"center"===u?R-(F+T/2)+W/2:"end"===u?R-A+U+W:a(F,A,T,V,U+W,R,R+j,j);var G=x.scrollLeft,Y=x.scrollTop;_+=Y-(z=Math.max(0,Math.min(Y+z,x.scrollHeight-N+K))),R+=G-(H=Math.max(0,Math.min(G+H,x.scrollWidth-T+W)))}P.push({el:x,top:z,left:H})}return P}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(11),o=n.n(r),c=n(7),a=n.n(c),i=n(0),u=n(43);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=[".wp-block-woocommerce-cart"],p=function(e){var t=e.Block,n=e.containers,r=e.getProps,c=void 0===r?function(){}:r,a=e.getErrorBoundaryProps,s=void 0===a?function(){}:a;0!==n.length&&Array.prototype.forEach.call(n,(function(e,n){var r=c(e,n),a=s(e,n),f=l(l({},e.dataset),r.attributes);e.classList.remove("is-loading"),Object(i.render)(React.createElement(u.a,a,React.createElement(i.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},r,{attributes:f})))),e)}))},d=function(e){var t=e.Block,n=e.getProps,r=e.getErrorBoundaryProps,o=e.selector,c=e.wrappers,a=document.body.querySelectorAll(o);c.length>0&&Array.prototype.filter.call(a,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,c)})),p({Block:t,containers:a,getProps:n,getErrorBoundaryProps:r})},m=function(e){var t=document.body.querySelectorAll(f.join(","));d(l(l({},e),{},{wrappers:t})),Array.prototype.forEach.call(t,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var n,r,o,c,a,i;n=l(l({},e),{},{wrapper:t}),r=n.Block,o=n.getProps,c=n.getErrorBoundaryProps,a=n.selector,i=n.wrapper.querySelectorAll(a),p({Block:r,containers:i,getProps:o,getErrorBoundaryProps:c})}))}))}},function(e,t){},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"b",(function(){return s}));var r=n(25),o=n.n(r),c=n(48),a=n.n(c),i=n(1),u=function(){var e=a()(o.a.mark((function e(t){var n;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return n=e.sent,e.abrupt("return",{message:n.message,type:n.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),s=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return f}));var r=n(7),o=n.n(r),c=n(8);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u="add_event_callback",s="remove_event_callback",l={addEventCallback:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(c.uniqueId)(),type:u,eventType:e,callback:t,priority:n}},removeEventCallback:function(e,t){return{id:t,type:s,eventType:e}}},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.eventType,c=t.id,a=t.callback,l=t.priority,f=new Map(e[r]);switch(n){case u:return f.set(c,{priority:l,callback:a}),i(i({},e),{},o()({},r,f));case s:return f.delete(c),i(i({},e),{},o()({},r,f))}return e}},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(1),a=n(46),i=n(5),u=n.n(i),s=(n(3),n(150)),l=(n(154),function(e){var t=e.currency,n=e.maxPrice,r=e.minPrice,o=e.priceClassName,c=e.priceStyle;return React.createElement(React.Fragment,null,React.createElement(a.a,{className:u()("wc-block-components-product-price__value",o),currency:t,value:r,style:c})," — ",React.createElement(a.a,{className:u()("wc-block-components-product-price__value",o),currency:t,value:n,style:c}))}),f=function(e){var t=e.currency,n=e.regularPriceClassName,r=e.regularPriceStyle,o=e.regularPrice,i=e.priceClassName,s=e.priceStyle,l=e.price;return React.createElement(React.Fragment,null,React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Previous price:","woo-gutenberg-products-block")),React.createElement(a.a,{currency:t,renderText:function(e){return React.createElement("del",{className:u()("wc-block-components-product-price__regular",n),style:r},e)},value:o}),React.createElement("span",{className:"screen-reader-text"},Object(c.__)("Discounted price:","woo-gutenberg-products-block")),React.createElement(a.a,{currency:t,renderText:function(e){return React.createElement("ins",{className:u()("wc-block-components-product-price__value","is-discounted",i),style:s},e)},value:l}))};t.a=function(e){var t=e.align,n=e.className,r=e.currency,c=e.format,i=void 0===c?"<price/>":c,p=e.maxPrice,d=void 0===p?null:p,m=e.minPrice,b=void 0===m?null:m,h=e.price,g=void 0===h?null:h,v=e.priceClassName,y=e.priceStyle,O=e.regularPrice,j=e.regularPriceClassName,E=e.regularPriceStyle,w=u()(n,"price","wc-block-components-product-price",o()({},"wc-block-components-product-price--align-".concat(t),t));i.includes("<price/>")||(i="<price/>",console.error("Price formats need to include the `<price/>` tag."));var S=O&&g!==O,k=React.createElement("span",{className:u()("wc-block-components-product-price__value",v)});return S?k=React.createElement(f,{currency:r,price:g,priceClassName:v,priceStyle:y,regularPrice:O,regularPriceClassName:j,regularPriceStyle:E}):null!==b&&null!==d?k=React.createElement(l,{currency:r,maxPrice:d,minPrice:b,priceClassName:v,priceStyle:y}):null!==g&&(k=React.createElement(a.a,{className:u()("wc-block-components-product-price__value",v),currency:r,value:g,style:y})),React.createElement("span",{className:w},Object(s.a)(i,{price:k}))}},function(e,t,n){"use strict";var r=n(32),o=n.n(r),c=n(33),a=n.n(c),i=n(20),u=n.n(i),s=n(34),l=n.n(s),f=n(35),p=n.n(f),d=n(24),m=n.n(d),b=n(7),h=n.n(b),g=n(1),v=n(2),y=n(140),O=(n(3),n(9));function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var o=m()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return p()(this,n)}}var E=function(e){l()(n,e);var t=j(n);function n(){var e;o()(this,n);for(var r=arguments.length,c=new Array(r),a=0;a<r;a++)c[a]=arguments[a];return e=t.call.apply(t,[this].concat(c)),h()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(n,[{key:"render",value:function(){var e=this.state,t=e.hasError,n=e.errorMessage,r=this.props.isEditor;if(t){var o=Object(g.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(r||O.j)&&(o=n||Object(g.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));var c=[{id:"0",content:o,isDismissible:!1,status:"error"}];return React.createElement(y.a,{notices:c})}return this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{errorMessage:e.message,hasError:!0}}}]),n}(v.Component);E.defaultProps={isEditor:!1},t.a=E},function(e,t,n){"use strict";var r=n(0),o=n(8),c=n(5),a=n.n(c),i=n(1),u=n(36),s=n(120),l=n(68);t.a=function(e){var t=e.className,n=e.status,c=void 0===n?"info":n,f=e.children,p=e.spokenMessage,d=void 0===p?f:p,m=e.onRemove,b=void 0===m?o.noop:m,h=e.isDismissible,g=void 0===h||h,v=e.actions,y=void 0===v?[]:v,O=e.politeness,j=void 0===O?function(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}(c):O,E=e.__unstableHTML;!function(e,t){var n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)((function(){n&&Object(u.speak)(n,t)}),[n,t])}(d,j);var w=a()(t,"components-notice","is-"+c,{"is-dismissible":g});return E&&(f=Object(r.createElement)(r.RawHTML,null,f)),Object(r.createElement)("div",{className:w},Object(r.createElement)("div",{className:"components-notice__content"},f,y.map((function(e,t){var n=e.className,o=e.label,c=e.isPrimary,i=e.noDefaultClasses,u=void 0!==i&&i,s=e.onClick,f=e.url;return Object(r.createElement)(l.a,{key:t,href:f,isPrimary:c,isSecondary:!u&&!f,isLink:!u&&!!f,onClick:f?void 0:s,className:a()("components-notice__action",n)},o)}))),g&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:s.a,label:Object(i.__)("Dismiss this notice"),onClick:b,showTooltip:!1}))}},function(e,t,n){"use strict";var r=n(0),o=n(29),c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));t.a=c},function(e,t,n){"use strict";e.exports=n(172)},function(e,t,n){"use strict";var r=n(6),o=n(0),c=n(8);var a=function(e,t){return function(n){var r=e(n),o=n.displayName,a=void 0===o?n.name||"Component":o;return r.displayName="".concat(Object(c.upperFirst)(Object(c.camelCase)(t)),"(").concat(a,")"),r}},i=new WeakMap;function u(e,t){return Object(o.useMemo)((function(){var n=function(e){var t=i.get(e)||0;return i.set(e,t+1),t}(e);return t?"".concat(t,"-").concat(n):n}),[e])}t.a=a((function(e){return function(t){var n=u(e);return Object(o.createElement)(e,Object(r.a)({},t,{instanceId:n}))}}),"withInstanceId")},,,function(e,t){},,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=n(29),u=function(e){var t=e.className,n=e.size,r=a()(e,["className","size"]);return React.createElement(i.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),React.createElement("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},s=React.createElement(u,null);t.a=s},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(14),a=n.n(c),i=n(2);n(3);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t.a=function(e){var t=e.srcElement,n=e.size,r=void 0===n?24:n,c=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},c))}},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(15),a=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("restApiRoutes")),Object(a.useSelect)((function(e,t){if(n.current){var r=e(c.SCHEMA_STORE_KEY),o=r.isResolving,a=r.hasFinishedResolution,i=t.dispatch(c.SCHEMA_STORE_KEY),u=i.receiveRoutes,s=i.startResolution,l=i.finishResolution;Object.keys(n.current).forEach((function(e){var t=n.current[e];o("getRoutes",[e])||a("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=(n(3),n(22)),u=n(5),s=n.n(u);n(153);t.a=function(e){var t=e.className,n=void 0===t?"":t,r=e.disabled,c=void 0!==r&&r,u=e.name,l=e.permalink,f=void 0===l?"":l,p=a()(e,["className","disabled","name","permalink"]),d=s()("wc-block-components-product-name",n);return c?React.createElement("span",o()({className:d},p),Object(i.decodeEntities)(u)):React.createElement("a",o()({className:d,href:f},p),Object(i.decodeEntities)(u))}},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(101),c=n(87),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},u=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},s=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",r=i(e),o=r.split(" ").splice(0,t).join(" ");return Object(c.autop)(u(o,n))},l=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",o=i(e),a=o.slice(0,t);if(n)return Object(c.autop)(u(a,r));var s=a.match(/([\s]+)/g),l=s?s.length:0,f=o.slice(0,t+l);return Object(c.autop)(u(f,r))};t.a=function(e){var t=e.source,n=e.maxLength,i=void 0===n?15:n,u=e.countType,f=void 0===u?"words":u,p=e.className,d=void 0===p?"":p,m=Object(r.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",r=Object(c.autop)(e),i=Object(o.count)(r,n);if(i<=t)return r;var u=a(r),f=Object(o.count)(u,n);return f<=t?u:"words"===n?s(u,t):l(u,t,"characters_including_spaces"===n)}(t,i,f)}),[t,i,f]);return React.createElement(r.RawHTML,{className:d},m)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=function(e,t){return!!e.type&&e.type===t},o={SUCCESS:"success",FAIL:"failure",ERROR:"error"},c={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return r(e,o.SUCCESS)},i=function(e){return r(e,o.ERROR)},u=function(e){return r(e,o.FAIL)},s=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:o,noticeContexts:c,shouldRetry:s,isSuccessResponse:a,isErrorResponse:i,isFailResponse:u}}},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=(n(3),n(5)),a=n.n(c),i=n(119),u=n(94),s=(n(112),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,n=e.notices,r=Object(u.b)().removeNotice,c=n.filter((function(e){return"snackbar"!==e.type}));if(!c.length)return null;var l=a()(t,"wc-block-components-notices");return React.createElement("div",{className:l},c.map((function(e){return React.createElement(i.a,o()({key:"store-notice-"+e.id},e,{className:a()("wc-block-components-notices__notice","woocommerce-message",s(e)),onRemove:function(){e.isDismissible&&r(e.id)}}),e.content)})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),o=n(91);function c(e,t){return e===t}function a(e,t,n){var a=n&&n.equalityFn?n.equalityFn:c,i=Object(r.useState)(e),u=i[0],s=i[1],l=Object(o.a)(Object(r.useCallback)((function(e){return s(e)}),[]),t,n),f=l[0],p=l[1],d=l[2],m=Object(r.useRef)(e);return Object(r.useEffect)((function(){a(m.current,e)||(f(e),m.current=e)}),[e,f,a]),[u,p,d]}},,,,function(e,t){!function(){e.exports=this.wp.plugins}()},function(e,t,n){"use strict";var r=n(14),o=n.n(r),c=n(1),a=n(0),i=(n(3),n(36)),u=n(76),s=n(27),l=n(151),f=function(e){var t=e.packages,n=e.collapse,r=e.showItems,c=e.collapsible,a=e.noResultsMessage,i=e.renderOption;return t.length?t.map((function(e){var t=e.package_id,u=o()(e,["package_id"]);return React.createElement(s.ShippingRatesControlPackage,{key:t,packageId:t,packageData:u,collapsible:c,collapse:n,showItems:r,noResultsMessage:a,renderOption:i})})):null};t.a=function(e){var t=e.shippingRates,n=e.shippingRatesLoading,r=e.className,o=e.collapsible,p=void 0!==o&&o,d=e.noResultsMessage,m=e.renderOption;return Object(a.useEffect)((function(){if(!n){var e=Object(l.a)(t),r=Object(l.b)(t);1===e?Object(i.speak)(Object(c.sprintf)(Object(c._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(i.speak)(Object(c.sprintf)(Object(c._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(c.sprintf)(Object(c._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))}}),[n,t]),React.createElement(u.a,{isLoading:n,screenReaderLabel:Object(c.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},React.createElement(s.ExperimentalOrderShippingPackages.Slot,{className:r,collapsible:p,noResultsMessage:d,renderOption:m}),React.createElement(s.ExperimentalOrderShippingPackages,null,React.createElement(f,{packages:t,noResultsMessage:d,renderOption:m})))}},function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(187),a=n(186),i=n(0),u=n(77),s=n(152),l=n(118);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(){var e=Object(u.a)().isEditor,t=Object(s.b)(),n=t.setActivePaymentMethod,r=t.activePaymentMethod,o=t.paymentMethodData,f=t.setPaymentStatus,d=Object(c.a)(),m=Object(a.a)().paymentMethods,b=Object(i.useRef)(r),h=Object(i.useRef)(o),g=Object(i.useCallback)((function(e){return function(){b.current=r,h.current=o,f().started(),n(e)}}),[r,o,n,f]),v=Object(i.useCallback)((function(){n(b.current),h.current.isSavedToken&&f().success(h.current)}),[n,f]),y=Object.keys(m),O=y.length>0?y.map((function(t){var n=e?m[t].edit:m[t].content;return Object(i.isValidElement)(n)?React.createElement("li",{key:t,id:"express-payment-method-".concat(t)},Object(i.cloneElement)(n,p(p({},d),{},{onClick:g(t),onClose:v}))):null})):React.createElement("li",{key:"noneRegistered"},"No registered Payment Methods");return React.createElement(l.a,{isEditor:e},React.createElement("ul",{className:"wc-block-components-express-payment__event-buttons"},O))}},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(14),a=n.n(c),i=(n(3),n(5)),u=n.n(i),s=n(1),l=n(130),f=n(129),p=(n(114),function(e){var t=e.text,n=e.screenReaderText,r=void 0===n?"":n,c=e.element,i=void 0===c?"li":c,s=e.className,l=void 0===s?"":s,f=e.radius,p=void 0===f?"small":f,d=e.children,m=void 0===d?null:d,b=a()(e,["text","screenReaderText","element","className","radius","children"]),h=i,g=u()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+p),v=Boolean(r&&r!==t);return React.createElement(h,o()({className:g},b),React.createElement("span",{"aria-hidden":v,className:"wc-block-components-chip__text"},t),v&&React.createElement("span",{className:"screen-reader-text"},r),m)});t.a=function(e){var t=e.ariaLabel,n=void 0===t?"":t,r=e.className,c=void 0===r?"":r,i=e.disabled,d=void 0!==i&&i,m=e.onRemove,b=void 0===m?function(){}:m,h=e.removeOnAnyClick,g=void 0!==h&&h,v=e.text,y=e.screenReaderText,O=void 0===y?"":y,j=a()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),E=g?"span":"button";if(!n){var w=O&&"string"==typeof O?O:v;n="string"!=typeof w?Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)(Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),w)}var S={"aria-label":n,disabled:d,onClick:b,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||b()}},k=g?S:{},_=g?{"aria-hidden":!0}:S;return React.createElement(p,o()({},j,k,{className:u()(c,"is-removable"),element:g?"button":j.element,screenReaderText:O,text:v}),React.createElement(E,o()({className:"wc-block-components-chip__remove"},_),React.createElement(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:f.a,size:16})))}},function(e,t,n){"use strict";var r,o,c,a,i=n(16),u=n(42),s=n(31),l=n(2),f=/<(\/)?(\w+)\s*(\/)?>/g;function p(e,t,n,r,o){return{element:e,tokenStart:t,tokenLength:n,prevOffset:r,leadingTextStart:o,children:[]}}var d=function(e){var t="object"===Object(u.a)(e),n=t&&Object.values(e);return t&&n.length&&n.every((function(e){return Object(l.isValidElement)(e)}))};function m(e){var t=function(){var e=f.exec(r);if(null===e)return["no-more-tokens"];var t=e.index,n=Object(i.a)(e,4),o=n[0],c=n[1],a=n[2],u=n[3],s=o.length;if(u)return["self-closed",a,t,s];if(c)return["closer",a,t,s];return["opener",a,t,s]}(),n=Object(i.a)(t,4),u=n[0],d=n[1],m=n[2],g=n[3],v=a.length,y=m>o?o:null;if(!e[d])return b(),!1;switch(u){case"no-more-tokens":if(0!==v){var O=a.pop(),j=O.leadingTextStart,E=O.tokenStart;c.push(r.substr(j,E))}return b(),!1;case"self-closed":return 0===v?(null!==y&&c.push(r.substr(y,m-y)),c.push(e[d]),o=m+g,!0):(h(p(e[d],m,g)),o=m+g,!0);case"opener":return a.push(p(e[d],m,g,m+g,y)),o=m+g,!0;case"closer":if(1===v)return function(e){var t=a.pop(),n=t.element,o=t.leadingTextStart,i=t.prevOffset,u=t.tokenStart,f=t.children,p=e?r.substr(i,e-i):r.substr(i);p&&f.push(p);null!==o&&c.push(r.substr(o,u-o));c.push(l.cloneElement.apply(void 0,[n,null].concat(Object(s.a)(f))))}(m),o=m+g,!0;var w=a.pop(),S=r.substr(w.prevOffset,m-w.prevOffset);w.children.push(S),w.prevOffset=m+g;var k=p(w.element,w.tokenStart,w.tokenLength,m+g);return k.children=w.children,h(k),o=m+g,!0;default:return b(),!1}}function b(){var e=r.length-o;0!==e&&c.push(r.substr(o,e))}function h(e){var t=e.element,n=e.tokenStart,o=e.tokenLength,c=e.prevOffset,i=e.children,u=a[a.length-1],f=r.substr(u.prevOffset,n-u.prevOffset);f&&u.children.push(f),u.children.push(l.cloneElement.apply(void 0,[t,null].concat(Object(s.a)(i)))),u.prevOffset=c||n+o}t.a=function(e,t){if(r=e,o=0,c=[],a=[],f.lastIndex=0,!d(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are WPElements");do{}while(m(t));return l.createElement.apply(void 0,[l.Fragment,null].concat(Object(s.a)(c)))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o}));var r=function(e){return e.length},o=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return ye})),n.d(t,"a",(function(){return Oe}));var r=n(47),o=n.n(r),c=n(10),a=n.n(c),i=n(0),u=n(4),s=n(138),l=n(89),f=n(7),p=n.n(f);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b={PRISTINE:"pristine",STARTED:"started",PROCESSING:"processing",ERROR:"has_error",FAILED:"failed",SUCCESS:"success",COMPLETE:"complete"},h=m(m({},b),{},{SET_REGISTERED_PAYMENT_METHODS:"set_registered_payment_methods",SET_REGISTERED_EXPRESS_PAYMENT_METHODS:"set_registered_express_payment_methods",SET_SHOULD_SAVE_PAYMENT_METHOD:"set_should_save_payment_method"}),g={currentStatus:b.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},v={setPaymentStatus:function(){return{started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1},paymentStatuses:b,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){},onPaymentSuccess:function(){},onPaymentFail:function(){}},y=n(28),O=n.n(y);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=h.STARTED,S=h.ERROR,k=h.FAILED,_=h.SUCCESS,R=h.PROCESSING,P=h.PRISTINE,C=h.COMPLETE,x=h.SET_REGISTERED_PAYMENT_METHODS,I=h.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,N=h.SET_SHOULD_SAVE_PAYMENT_METHOD,T=function(e){return!("object"!==O()(e)||!e.isSavedToken)},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,t=arguments.length>1?arguments[1]:void 0,n=t.type,r=t.paymentMethodData,o=t.shouldSavePaymentMethod,c=t.errorMessage,a=t.paymentMethods;switch(n){case w:return e.currentStatus!==w?E(E({},e),{},{currentStatus:w}):e;case S:return e.currentStatus!==S?E(E({},e),{},{currentStatus:S,errorMessage:c||e.errorMessage}):e;case k:return e.currentStatus!==k?E(E({},e),{},{currentStatus:k,paymentMethodData:r||e.paymentMethodData,errorMessage:c||e.errorMessage}):e;case _:return e.currentStatus!==_?E(E({},e),{},{currentStatus:_,paymentMethodData:r||e.paymentMethodData,hasSavedToken:T(r)}):e;case R:return e.currentStatus!==R?E(E({},e),{},{currentStatus:R,errorMessage:""}):e;case C:return e.currentStatus!==C?E(E({},e),{},{currentStatus:C}):e;case P:return E(E({},g),{},{currentStatus:P,paymentMethods:E({},e.paymentMethods),expressPaymentMethods:E({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case x:return E(E({},e),{},{paymentMethods:a});case I:return E(E({},e),{},{expressPaymentMethods:a});case N:return E(E({},e),{},{shouldSavePaymentMethod:o})}return e},A=h.ERROR,D=h.FAILED,F=h.SUCCESS,L=h.SET_REGISTERED_PAYMENT_METHODS,V=h.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,B=h.SET_SHOULD_SAVE_PAYMENT_METHOD,U=function(e){return{type:e}},q=function(e){var t=e.errorMessage,n=e.paymentMethodData;return{type:D,errorMessage:t,paymentMethodData:n}},z=function(e){var t=e.paymentMethodData;return{type:F,paymentMethodData:t}},H=n(25),W=n.n(H),K=n(48),G=n.n(K),Y=n(1),$=n(37),X=n(39),Q=n(100),Z=n(9),J=n(77),ee=n(64);function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var re=function(e,t,n,r){var o=Object(i.useState)(!1),c=a()(o,2),u=c[0],s=c[1],f=Object(J.a)().isEditor,d=Object(ee.b)(),m=d.selectedRates,b=d.shippingAddress,h=Object(X.a)(m),g=Object(X.a)(n),v=Object(Q.a)(),y=v.cartTotals,O=v.cartNeedsShipping,j=v.paymentRequirements,E=Object(i.useRef)({cartTotals:y,cartNeedsShipping:O,shippingAddress:b,selectedShippingMethods:h,paymentRequirements:j}),w=Object(l.a)().addErrorNotice;Object(i.useEffect)((function(){E.current={cartTotals:y,cartNeedsShipping:O,shippingAddress:b,selectedShippingMethods:h,paymentRequirements:j}}),[y,O,b,h,j]);var S=Object(i.useCallback)(G()(W.a.mark((function n(){var o,c,a,i,u,l,d;return W.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:o={},c=function(e){o=ne(ne({},o),{},p()({},e.name,e))},a=0;case 3:if(!(a<g.length)){n.next=24;break}if(i=g[a],u=t[i]){n.next=8;break}return n.abrupt("continue",21);case 8:return n.prev=8,n.next=11,Promise.resolve(u.canMakePayment(E.current));case 11:if(!(l=n.sent)){n.next=16;break}if(!l.error){n.next=15;break}throw new Error(l.error.message);case 15:c(u);case 16:n.next=21;break;case 18:n.prev=18,n.t0=n.catch(8),(Z.j||f)&&(d=Object(Y.sprintf)(Object(Y.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),u.paymentMethodId),w("".concat(d," ").concat(n.t0),{context:r,id:"wc-".concat(u.paymentMethodId,"-registration-error")}));case 21:a++,n.next=3;break;case 24:e(o),s(!0);case 26:case"end":return n.stop()}}),n,null,[[8,18]])}))),[w,e,f,r,g,t]);return Object(i.useEffect)((function(){S()}),[S,y,h,j]),u},oe=n(66),ce=n(65),ae=n(116),ie=n(204),ue="payment_processing",se=n(205),le=n(79),fe=b.STARTED,pe=b.PROCESSING,de=b.COMPLETE,me=b.PRISTINE,be=b.ERROR,he=b.FAILED,ge=b.SUCCESS,ve=Object(i.createContext)(v),ye=function(){return Object(i.useContext)(ve)},Oe=function(e){var t=e.children,n=Object(oe.b)().setBillingData,r=Object(ce.b)(),c=r.isProcessing,f=r.isIdle,p=r.isCalculating,d=r.hasError,m=Object(s.a)(),h=m.isSuccessResponse,v=m.isErrorResponse,y=m.isFailResponse,O=m.noticeContexts,j=Object(i.useState)(""),E=a()(j,2),w=E[0],S=E[1],k=Object(i.useState)(""),_=a()(k,2),R=_[0],P=_[1],C=Object(i.useReducer)(ae.b,{}),x=a()(C,2),I=x[0],N=x[1],T=Object(i.useRef)(I),D=Object(J.a)(),F=D.isEditor,H=D.previewData,W=Object(i.useReducer)(M,g),K=a()(W,2),G=K[0],Y=K[1],X=Object(i.useCallback)((function(e){S(e),Y(U(me))}),[S,Y]),Q=Object(i.useCallback)((function(e){Y(function(e){return{type:L,paymentMethods:e}}(e))}),[Y]),te=Object(i.useCallback)((function(e){Y(function(e){return{type:V,paymentMethods:e}}(e))}),[Y]),ne=function(e){var t=Object($.getPaymentMethods)(),n=Object(s.a)().noticeContexts,r=new Set([].concat(o()(Z.q),o()(Object.keys(t))));return re(e,t,Array.from(r),n.PAYMENTS)}(Q),ye=function(e){var t=Object($.getExpressPaymentMethods)(),n=Object(s.a)().noticeContexts;return re(e,t,Object.keys(t),n.EXPRESS_PAYMENTS)}(te),Oe=Object(le.b)().setValidationErrors,je=Object(l.a)(),Ee=je.addErrorNotice,we=je.removeNotice,Se=Object(ee.b)().setShippingAddress,ke=Object(i.useCallback)((function(e){Y({type:B,shouldSavePaymentMethod:e})}),[Y]),_e=Object(i.useMemo)((function(){return F&&H.previewSavedPaymentMethods?H.previewSavedPaymentMethods:ne&&0!==Object.keys(G.paymentMethods).length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(u.getSetting)("customerPaymentMethods",{}),n=Object.keys(t),r={};return n.forEach((function(n){var o=t[n].filter((function(t){var n,r=t.method.gateway;return r in e&&(null===(n=e[r].supports)||void 0===n?void 0:n.showSavedCards)}));o.length&&(r[n]=o)})),r}(G.paymentMethods):{}}),[F,H.previewSavedPaymentMethods,ne,G.paymentMethods]),Re=Object(i.useCallback)((function(e){e?Ee(e,{id:"wc-express-payment-error",context:O.EXPRESS_PAYMENTS}):we("wc-express-payment-error",O.EXPRESS_PAYMENTS)}),[Ee,O.EXPRESS_PAYMENTS,we]);Object(i.useEffect)((function(){T.current=I}),[I]);var Pe=Object(i.useMemo)((function(){return(e=N,{onPaymentProcessing:Object(ie.a)(ue,e)}).onPaymentProcessing;var e}),[N]),Ce=Object(i.useMemo)((function(){return{isPristine:G.currentStatus===me,isStarted:G.currentStatus===fe,isProcessing:G.currentStatus===pe,isFinished:[be,he,ge].includes(G.currentStatus),hasError:G.currentStatus===be,hasFailed:G.currentStatus===he,isSuccessful:G.currentStatus===ge}}),[G.currentStatus]),xe=Object(i.useCallback)((function(){return{started:function(){return Y(U(fe))},processing:function(){return Y(U(pe))},completed:function(){return Y(U(de))},error:function(e){return Y(function(e){return{type:A,errorMessage:e}}(e))},failed:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r&&n(r),Y(q({errorMessage:e,paymentMethodData:t}))},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&n(t),null!==r&&null!=r&&r.address&&Se(r.address),Y(z({paymentMethodData:e}))}}}),[Y,n,Se]);Object(i.useEffect)((function(){!c||d||p||Ce.isFinished||xe().processing()}),[c,d,p,Ce.isFinished,xe]),Object(i.useEffect)((function(){f&&!Ce.isSuccessful&&Y(U(me))}),[f,Ce.isSuccessful]),Object(i.useEffect)((function(){d&&Ce.isSuccessful&&!G.hasSavedToken&&Y(U(me))}),[d,Ce.isSuccessful,G.hasSavedToken]),Object(i.useEffect)((function(){var e=Object.keys(G.paymentMethods),t=[].concat(o()(e),o()(Object.keys(G.expressPaymentMethods)));ne&&e.length&&S((function(e){return e&&t.includes(e)?e:(Y(U(me)),Object.keys(G.paymentMethods)[0])}))}),[ne,G.paymentMethods,G.expressPaymentMethods,S]),Object(i.useEffect)((function(){Ce.isProcessing&&(we("wc-payment-error",O.PAYMENTS),Object(se.b)(T.current,ue,{}).then((function(e){var t,n,r;if(h(e))xe().success(null==e||null===(t=e.meta)||void 0===t?void 0:t.paymentMethodData,null==e||null===(n=e.meta)||void 0===n?void 0:n.billingData,null==e||null===(r=e.meta)||void 0===r?void 0:r.shippingData);else if(y(e)){var o,c;e.message&&e.message.length&&Ee(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||O.PAYMENTS}),xe().failed(null==e?void 0:e.message,null==e||null===(o=e.meta)||void 0===o?void 0:o.paymentMethodData,null==e||null===(c=e.meta)||void 0===c?void 0:c.billingData)}else v(e)?(e.message&&e.message.length&&Ee(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||O.PAYMENTS}),xe().error(e.message),Oe(null==e?void 0:e.validationErrors)):xe().success()})))}),[Ce.isProcessing,Oe,xe,we,O.PAYMENTS,h,y,v,Ee]);var Ie={setPaymentStatus:xe,currentStatus:Ce,paymentStatuses:b,paymentMethodData:G.paymentMethodData,errorMessage:G.errorMessage,activePaymentMethod:w,setActivePaymentMethod:X,activeSavedToken:R,setActiveSavedToken:P,onPaymentProcessing:Pe,customerPaymentMethods:_e,paymentMethods:G.paymentMethods,expressPaymentMethods:G.expressPaymentMethods,paymentMethodsInitialized:ne,expressPaymentMethodsInitialized:ye,setExpressPaymentError:Re,shouldSavePayment:G.shouldSavePaymentMethod,setShouldSavePayment:ke};return React.createElement(ve.Provider,{value:Ie},t)}},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,function(e,t,n){"use strict";var r=n(75),o=n.n(r);t.a=o.a},function(e,t,n){"use strict";(function(e){var r=n(57),o="undefined"!=typeof window&&window.navigator.userAgent.indexOf("Trident")>=0,c=e.env.FORCE_REDUCED_MOTION||o?function(){return!0}:function(){return Object(r.a)("(prefers-reduced-motion: reduce)")};t.a=c}).call(this,n(74))},,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";
|
7 |
+
/** @license React v16.13.1
|
8 |
+
* react-is.production.min.js
|
9 |
+
*
|
10 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
11 |
+
*
|
12 |
+
* This source code is licensed under the MIT license found in the
|
13 |
+
* LICENSE file in the root directory of this source tree.
|
14 |
+
*/var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,c=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,i=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,b=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,O=r?Symbol.for("react.responder"):60118,j=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case p:case a:case u:case i:case m:return e;default:switch(e=e&&e.$$typeof){case l:case d:case g:case h:case s:return e;default:return t}}case c:return t}}}function w(e){return E(e)===p}t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=s,t.Element=o,t.ForwardRef=d,t.Fragment=a,t.Lazy=g,t.Memo=h,t.Portal=c,t.Profiler=u,t.StrictMode=i,t.Suspense=m,t.isAsyncMode=function(e){return w(e)||E(e)===f},t.isConcurrentMode=w,t.isContextConsumer=function(e){return E(e)===l},t.isContextProvider=function(e){return E(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===g},t.isMemo=function(e){return E(e)===h},t.isPortal=function(e){return E(e)===c},t.isProfiler=function(e){return E(e)===u},t.isStrictMode=function(e){return E(e)===i},t.isSuspense=function(e){return E(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===u||e===i||e===m||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===s||e.$$typeof===l||e.$$typeof===d||e.$$typeof===y||e.$$typeof===O||e.$$typeof===j||e.$$typeof===v)},t.typeOf=E},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(22),a=n(9);n(3);t.a=function(e){var t=e.image,n=void 0===t?{}:t,r={src:n.thumbnail||a.r,alt:Object(c.decodeEntities)(n.alt)||""};return React.createElement("img",o()({},r,{alt:r.alt}))}},function(e,t,n){"use strict";var r=n(1),o=n(92);t.a=function(){return React.createElement(o.a,{className:"wc-block-components-product-backorder-badge"},Object(r.__)("Available on backorder","woo-gutenberg-products-block"))}},function(e,t,n){"use strict";var r=n(1),o=(n(3),n(92));t.a=function(e){var t=e.lowStockRemaining;return t?React.createElement(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(r.sprintf)(Object(r.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(79),o=(n(3),n(155),function(e){var t=e.errorMessage,n=void 0===t?"":t,o=e.propertyName,c=void 0===o?"":o,a=e.elementId,i=void 0===a?"":a,u=Object(r.b)(),s=u.getValidationError,l=u.getValidationErrorId;if(!n){var f=s(c)||{};if(!f.message||f.hidden)return null;n=f.message}return React.createElement("div",{className:"wc-block-components-validation-error",role:"alert"},React.createElement("p",{id:l(i)},n))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(145),o=n(9),c=n(43),a=n(27),i=n(152),u=n(64),s=n(66),l=n(65),f=n(7),p=n.n(f),d=n(10),m=n.n(d),b=n(1),h=n(51),g=n.n(h),v=n(0),y=n(100),O=n(89),j=n(115),E=function(e,t,n){var r=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),o="wc-".concat(n,"-new-payment-method");return r.push({key:o,value:t}),r},w=n(79);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){p()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _=function(){var e=Object(l.b)(),t=e.hasError,n=e.onCheckoutBeforeProcessing,r=e.dispatchActions,o=e.redirectUrl,c=e.isProcessing,a=e.isBeforeProcessing,f=e.isComplete,p=e.orderNotes,d=e.shouldCreateAccount,h=Object(w.b)().hasValidationErrors,S=Object(u.b)().shippingErrorStatus,_=Object(s.b)(),R=_.billingData,P=_.shippingAddress,C=Object(y.a)(),x=C.cartNeedsPayment,I=C.receiveCart,N=Object(i.b)(),T=N.activePaymentMethod,M=N.currentStatus,A=N.paymentMethodData,D=N.expressPaymentMethods,F=N.paymentMethods,L=N.shouldSavePayment,V=Object(O.a)(),B=V.addErrorNotice,U=V.removeNotice,q=V.setIsSuppressed,z=Object(v.useRef)(R),H=Object(v.useRef)(P),W=Object(v.useRef)(o),K=Object(v.useState)(!1),G=m()(K,2),Y=G[0],$=G[1],X=Object.keys(D).includes(T),Q=Object(v.useMemo)((function(){var e,t=k(k({},D),F);return null==t||null===(e=t[T])||void 0===e?void 0:e.paymentMethodId}),[T,D,F]),Z=h&&!X||M.hasError||S.hasError;Object(v.useEffect)((function(){q(X)}),[X,q]),Object(v.useEffect)((function(){Z===t||!c&&!a||X||r.setHasError(Z)}),[Z,t,c,a,X,r]);var J=!t&&!Z&&(M.isSuccessful||!x)&&c;Object(v.useEffect)((function(){z.current=R,H.current=P,W.current=o}),[R,P,o]);var ee=Object(v.useCallback)((function(){return h?{errorMessage:Object(b.__)("Some input fields are invalid.","woo-gutenberg-products-block")}:M.hasError?{errorMessage:Object(b.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!S.hasError||{errorMessage:Object(b.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}}),[h,M.hasError,S.hasError]);Object(v.useEffect)((function(){var e;return X||(e=n(ee,0)),function(){X||e()}}),[n,ee,X]);var te=Object(v.useCallback)((function(){$(!0),U("checkout");var e={billing_address:z.current,shipping_address:H.current,customer_note:p,should_create_account:d};x&&(e=k(k({},e),{},{payment_method:Q,payment_data:E(A,L,T)})),g()({path:"/wc/store/checkout",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){g.a.setNonce(e.headers),r.setCustomerId(e.headers.get("X-WC-Store-API-User")),e.json().then((function(t){e.ok||(B(Object(j.b)(t),{id:"checkout"}),r.setHasError()),r.setAfterProcessing(t),$(!1)}))})).catch((function(e){var t;g.a.setNonce(e.headers),null!==(t=e.headers)&&void 0!==t&&t.get("X-WC-Store-API-User")&&r.setCustomerId(e.headers.get("X-WC-Store-API-User")),e.json().then((function(e){var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&I(e.data.cart),B(Object(j.b)(e),{id:"checkout"}),null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,(function(e){B(e.message,{id:e.error_code})})),r.setHasError(),r.setAfterProcessing(e),$(!1)}))}))}),[B,U,Q,T,A,L,x,I,r,p,d]);return Object(v.useEffect)((function(){W.current&&(window.location.href=W.current)}),[f]),Object(v.useEffect)((function(){J&&!Y&&te()}),[te,J,Y]),null},R=function(e){var t=e.children,n=e.isCart,f=void 0!==n&&n,p=e.redirectUrl;return React.createElement(l.a,{redirectUrl:p,isCart:f},React.createElement(s.a,null,React.createElement(u.a,null,React.createElement(i.a,null,React.createElement(a.SlotFillProvider,null,t,React.createElement(c.a,{renderError:o.j?null:function(){return null}},React.createElement(r.PluginArea,null))),React.createElement(_,null)))))}},function(e,t,n){"use strict";n(3);var r=n(8),o=n(22),c=(n(168),function(e){var t=e.details,n=void 0===t?[]:t;return Array.isArray(n)?0===(n=n.filter((function(e){return!e.hidden}))).length?null:React.createElement("ul",{className:"wc-block-components-product-details"},n.map((function(e){var t=e.name?"wc-block-components-product-details__".concat(Object(r.kebabCase)(e.name)):"";return React.createElement("li",{key:e.name+(e.display||e.name),className:t},e.name&&React.createElement(React.Fragment,null,React.createElement("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(e.name),":")," "),React.createElement("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null}),a=n(137),i=n(4),u=function(e){var t=e.className,n=e.shortDescription,r=void 0===n?"":n,o=e.fullDescription,c=r||(void 0===o?"":o);return c?React.createElement(a.a,{className:t,source:c,maxLength:15,countType:Object(i.getSetting)("wordCountType","words")}):null};n(167),t.a=function(e){var t=e.shortDescription,n=void 0===t?"":t,r=e.fullDescription,o=void 0===r?"":r,a=e.itemData,i=void 0===a?[]:a,s=e.variation,l=void 0===s?[]:s;return React.createElement("div",{className:"wc-block-components-product-metadata"},React.createElement(u,{className:"wc-block-components-product-metadata__description",shortDescription:n,fullDescription:o}),React.createElement(c,{details:i}),React.createElement(c,{details:l.map((function(e){var t=e.attribute;return{name:void 0===t?"":t,value:e.value}}))}))}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return a}));var r=n(152),o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(r.b)(),n=t.paymentMethods,o=t.expressPaymentMethods,c=t.paymentMethodsInitialized,a=t.expressPaymentMethodsInitialized;return e?{paymentMethods:o,isInitialized:a}:{paymentMethods:n,isInitialized:c}},c=function(){return o()},a=function(){return o(!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var r=n(65),o=n(152),c=n(64),a=n(66),i=n(1),u=n(44),s=n(0),l=n(9),f=n(182),p=n(277),d=n(5),m=n.n(d),b=n(29),h=React.createElement(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0z"}),React.createElement("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),g=React.createElement(b.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),v=n(239),y=React.createElement(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("path",{d:"M0 0h24v24H0z"}),React.createElement("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),React.createElement("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),O=n(130),j=(n(178),{bank:h,bill:g,card:v.a,checkPayment:y}),E=function(e){var t=e.icon,n=void 0===t?"":t,r=e.text,o=void 0===r?"":r,c=!!n,a=c&&"string"==typeof n&&j[n],i=m()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return React.createElement("span",{className:i},a?React.createElement(O.a,{srcElement:j[n]}):n,o)},w=n(100),S=n(231),k=n(138),_=function(e,t){var n=[],r=function(t,n){var r=parseInt(e[n],10);return{label:t,value:r,valueWithTax:r+parseInt(e[n+"_tax"],10)}};return n.push(r(Object(i.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(r(Object(i.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(r(Object(i.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({label:Object(i.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(r(Object(i.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},R=function(){var e=Object(r.b)(),t=e.isCalculating,n=e.isComplete,d=e.isIdle,m=e.isProcessing,b=e.onCheckoutAfterProcessingWithSuccess,h=e.onCheckoutAfterProcessingWithError,g=e.onCheckoutBeforeProcessing,v=e.onSubmit,y=e.customerId,O=Object(o.b)(),j=O.currentStatus,R=O.activePaymentMethod,P=O.onPaymentProcessing,C=O.setExpressPaymentError,x=Object(c.b)(),I=x.shippingErrorStatus,N=x.shippingErrorTypes,T=x.shippingRates,M=x.shippingRatesLoading,A=x.selectedRates,D=x.setSelectedRates,F=x.isSelectingRate,L=x.onShippingRateSuccess,V=x.onShippingRateFail,B=x.onShippingRateSelectSuccess,U=x.onShippingRateSelectFail,q=x.needsShipping,z=Object(a.b)(),H=z.billingData,W=z.shippingAddress,K=z.setShippingAddress,G=Object(w.a)().cartTotals,Y=Object(S.a)().appliedCoupons,$=Object(k.a)(),X=$.noticeContexts,Q=$.responseTypes,Z=Object(s.useRef)(_(G,q)),J=Object(s.useRef)({label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(G.total_price,10)});return Object(s.useEffect)((function(){Z.current=_(G,q),J.current={label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(G.total_price,10)}}),[G,q]),{checkoutStatus:{isCalculating:t,isComplete:n,isIdle:d,isProcessing:m},paymentStatus:j,shippingStatus:{shippingErrorStatus:I,shippingErrorTypes:N},shippingData:{shippingRates:T,shippingRatesLoading:M,selectedRates:A,setSelectedRates:D,isSelectingRate:F,shippingAddress:W,setShippingAddress:K,needsShipping:q},billing:{billingData:H,cartTotal:J.current,currency:Object(u.getCurrencyFromPriceResponse)(G),cartTotalItems:Z.current,displayPricesIncludingTax:l.k,appliedCoupons:Y,customerId:y},eventRegistration:{onCheckoutAfterProcessingWithSuccess:b,onCheckoutAfterProcessingWithError:h,onCheckoutBeforeProcessing:g,onShippingRateSuccess:L,onShippingRateFail:V,onShippingRateSelectSuccess:B,onShippingRateSelectFail:U,onPaymentProcessing:P},components:{ValidationInputError:f.a,PaymentMethodIcons:p.a,PaymentMethodLabel:E},emitResponse:{noticeContexts:X,responseTypes:Q},onSubmit:v,activePaymentMethod:R,setExpressPaymentError:C}}},function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));var r=n(10),o=n.n(r),c=(n(3),n(0)),a=n(75),i=n.n(a).a,u=n(5),s=n.n(u),l=Object(c.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),f=function(){return Object(c.useContext)(l)},p=function(e){var t=e.children,n=e.className,r=void 0===n?"":n,c=function(){var e=i(),t=o()(e,2),n=t[0],r=t[1].width,c="";return r>700?c="is-large":r>520?c="is-medium":r>400?c="is-small":r&&(c="is-mobile"),[n,c]}(),a=o()(c,2),u=a[0],f=a[1],p={hasContainerWidth:""!==f,containerClassName:f,isMobile:"is-mobile"===f,isSmall:"is-small"===f,isMedium:"is-medium"===f,isLarge:"is-large"===f};return React.createElement(l.Provider,{value:p},React.createElement("div",{className:s()(r,f)},u,t))}},function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(7),a=n.n(c),i=n(10),u=n.n(i),s=n(14),l=n.n(s),f=n(1),p=n(2),d=(n(3),n(5)),m=n.n(d),b=n(79),h=n(182),g=n(122),v=n(0),y=n(38),O=(n(136),Object(p.forwardRef)((function(e,t){var n=e.className,r=e.id,o=e.type,c=void 0===o?"text":o,a=e.ariaLabel,i=e.ariaDescribedBy,s=e.label,l=e.screenReaderLabel,f=e.disabled,p=e.help,d=e.autoCapitalize,b=void 0===d?"off":d,h=e.autoComplete,g=void 0===h?"off":h,O=e.value,j=void 0===O?"":O,E=e.onChange,w=e.required,S=void 0!==w&&w,k=e.onBlur,_=void 0===k?function(){}:k,R=e.feedback,P=Object(v.useState)(!1),C=u()(P,2),x=C[0],I=C[1];return React.createElement("div",{className:m()("wc-block-components-text-input",n,{"is-active":x||j})},React.createElement("input",{type:c,id:r,value:j,ref:t,autoCapitalize:b,autoComplete:g,onChange:function(e){E(e.target.value)},onFocus:function(){return I(!0)},onBlur:function(){_(),I(!1)},"aria-label":a||s,disabled:f,"aria-describedby":p&&!i?r+"__help":i,required:S}),React.createElement(y.a,{label:s,screenReaderLabel:l||s,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!p&&React.createElement("p",{id:r+"__help",className:"wc-block-components-text-input__help"},p),R)})));t.a=Object(g.a)((function(e){var t=e.className,n=e.instanceId,r=e.id,c=e.ariaDescribedBy,i=e.errorId,s=e.validateOnMount,d=void 0===s||s,g=e.focusOnMount,v=void 0!==g&&g,y=e.onChange,j=e.showError,E=void 0===j||j,w=l()(e,["className","instanceId","id","ariaDescribedBy","errorId","validateOnMount","focusOnMount","onChange","showError"]),S=Object(p.useState)(!0),k=u()(S,2),_=k[0],R=k[1],P=Object(p.useRef)(),C=Object(b.b)(),x=C.getValidationError,I=C.hideValidationError,N=C.setValidationErrors,T=C.clearValidationError,M=C.getValidationErrorId,A=r||"textinput-"+n;i=i||A;var D=Object(p.useCallback)((function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=P.current||null;if(t){t.value=t.value.trim();var n=t.checkValidity();n?T(i):N(a()({},i,{message:t.validationMessage||Object(f.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}}),[T,i,N]);Object(p.useEffect)((function(){_&&(v&&P.current.focus(),R(!1))}),[v,_,R]),Object(p.useEffect)((function(){_&&(d&&D(),R(!1))}),[_,R,d,D]),Object(p.useEffect)((function(){return function(){T(i)}}),[T,i]);var F=x(i)||{},L=F.message&&!F.hidden,V=E&&L&&M(i)?M(i):c;return React.createElement(O,o()({className:m()(t,{"has-error":L}),id:A,onBlur:function(){D(!1)},feedback:E&&React.createElement(h.a,{propertyName:i}),ref:P,onChange:function(e){I(i),y(e)},ariaDescribedBy:V},w))}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e,t){var n=[];return Object.keys(e).forEach((function(r){if(void 0!==t[r])switch(e[r].type){case"boolean":n[r]="false"!==t[r]&&!1!==t[r];break;case"number":n[r]=parseInt(t[r],10);break;case"array":case"object":n[r]=JSON.parse(t[r]);break;default:n[r]=t[r]}else n[r]=e[r].default})),n}},,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(116),o=function(e,t){return function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,c=r.a.addEventCallback(e,n,o);return t(c),function(){t(r.a.removeEventCallback(e,c.id))}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return d}));var r=n(25),o=n.n(r),c=n(28),a=n.n(c),i=n(48),u=n.n(i);function s(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,a=!0,i=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){i=!0,c=e},f:function(){try{a||null==n.return||n.return()}finally{if(i)throw c}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var f=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},p=function(){var e=u()(o.a.mark((function e(t,n,r){var c,i,u,l,p,d;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=f(t,n),i=[],u=s(c),e.prev=3,u.s();case 5:if((l=u.n()).done){e.next=19;break}return p=l.value,e.prev=7,e.next=10,Promise.resolve(p.callback(r));case 10:d=e.sent,"object"===a()(d)&&i.push(d),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),u.e(e.t1);case 24:return e.prev=24,u.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,n,r){return e.apply(this,arguments)}}(),d=function(){var e=u()(o.a.mark((function e(t,n,r){var c,i,u,l,p;return o.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:c=f(t,n),i=s(c),e.prev=2,i.s();case 4:if((u=i.n()).done){e.next=23;break}return l=u.value,e.prev=6,e.next=9,Promise.resolve(l.callback(r));case 9:if(p=e.sent,"object"===a()(p)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==p.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",p);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,n,r){return e.apply(this,arguments)}}()},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(270)},function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(7),o=n.n(r),c=n(1),a=n(12),i=n(15),u=n(79),s=n(22),l=n(100),f=n(89);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var d=function(){var e=Object(l.a)(),t=e.cartCoupons,n=e.cartIsLoading,r=Object(f.a)(),d=r.addErrorNotice,m=r.addSnackbarNotice,b=Object(u.b)().setValidationErrors;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({appliedCoupons:t,isLoading:n},Object(a.useSelect)((function(e,t){var n=t.dispatch,r=e(i.CART_STORE_KEY),o=r.isApplyingCoupon(),a=r.isRemovingCoupon(),u=n(i.CART_STORE_KEY),l=u.applyCoupon,f=u.removeCoupon,p=u.receiveApplyingCoupon;return{applyCoupon:function(e){l(e).then((function(t){!0===t&&m(Object(c.sprintf)(Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){b({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),p("")}))},removeCoupon:function(e){f(e).then((function(t){!0===t&&m(Object(c.sprintf)(Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){d(e.message,{id:"coupon-form"}),p("")}))},isApplyingCoupon:o,isRemovingCoupon:a}}),[d,m]))}},function(e,t,n){"use strict";var r=n(5),o=n.n(r),c=(n(3),n(188));n(165);t.a=function(e){var t=e.children,n=e.className;return React.createElement(c.a,{className:o()("wc-block-components-sidebar-layout",n)},t)}},function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(3);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-main",n)},t)}},function(e,t){},function(e,t,n){"use strict";var r=n(5),o=n.n(r);n(3);t.a=function(e){var t=e.children,n=e.className;return React.createElement("div",{className:o()("wc-block-components-sidebar",n)},t)}},function(e,t,n){"use strict";var r=n(1),o=n(9),c=n(76),a=n(149),i=(n(3),n(27));n(169);t.a=function(e){var t=e.cartCoupons,n=void 0===t?[]:t,u=e.currency,s=e.isRemovingCoupon,l=e.removeCoupon,f=e.values,p=f.total_discount,d=f.total_discount_tax,m=parseInt(p,10);if(!m&&0===n.length)return null;var b=parseInt(d,10),h=o.k?m+b:m;return React.createElement(i.TotalsItem,{className:"wc-block-components-totals-discount",currency:u,description:0!==n.length&&React.createElement(c.a,{screenReaderLabel:Object(r.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:s,showSpinner:!1},React.createElement("ul",{className:"wc-block-components-totals-discount__coupon-list"},n.map((function(e){return React.createElement(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.code,screenReaderText:Object(r.sprintf)(Object(r.__)("Coupon: %s","woo-gutenberg-products-block"),e.code),disabled:s,onRemove:function(){l(e.code)},radius:"large",ariaLabel:Object(r.sprintf)(Object(r.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.code)})})))),label:h?Object(r.__)("Discount","woo-gutenberg-products-block"):Object(r.__)("Coupons","woo-gutenberg-products-block"),value:h?-1*h:"-"})}},function(e,t,n){"use strict";var r=n(10),o=n.n(r),c=n(1),a=n(0),i=n(85),u=n(189),s=n(38),l=n(182),f=n(76),p=(n(3),n(122)),d=n(79),m=n(27);n(174);t.a=Object(p.a)((function(e){var t=e.instanceId,n=e.isLoading,r=void 0!==n&&n,p=e.initialOpen,b=void 0!==p&&p,h=e.onSubmit,g=void 0===h?function(){}:h,v=Object(a.useState)(""),y=o()(v,2),O=y[0],j=y[1],E=Object(a.useRef)(!1),w=Object(d.b)(),S=w.getValidationError,k=w.getValidationErrorId,_=S("coupon");Object(a.useEffect)((function(){E.current!==r&&(r||!O||_||j(""),E.current=r)}),[r,O,_]);var R="wc-block-components-totals-coupon__input-".concat(t);return React.createElement(m.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!0,initialOpen:b,title:React.createElement(s.a,{label:Object(c.__)("Coupon Code?","woo-gutenberg-products-block"),screenReaderLabel:Object(c.__)("Introduce Coupon Code","woo-gutenberg-products-block"),htmlFor:R})},React.createElement(f.a,{screenReaderLabel:Object(c.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:r,showSpinner:!1},React.createElement("div",{className:"wc-block-components-totals-coupon__content"},React.createElement("form",{className:"wc-block-components-totals-coupon__form"},React.createElement(u.a,{id:R,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(c.__)("Enter code","woo-gutenberg-products-block"),value:O,ariaDescribedBy:k(R),onChange:function(e){j(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),React.createElement(i.a,{className:"wc-block-components-totals-coupon__button",disabled:r||!O,showSpinner:r,onClick:function(e){e.preventDefault(),g(O)},type:"submit"},Object(c.__)("Apply","woo-gutenberg-products-block"))),React.createElement(l.a,{propertyName:"coupon",elementId:R}))))}))},function(e,t,n){"use strict";var r=n(1),o=n(9),c=n(150),a=n(46),i=(n(3),n(27)),u=n(100),s=(n(175),o.z&&o.k);t.a=function(e){var t=e.currency,n=e.values,o=n.total_price,l=n.total_tax,f=Object(u.a)().extensions,p=Object(i.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(r.__)("Total","woo-gutenberg-products-block"),arg:{extensions:f},validation:function(e){return"string"==typeof e}});return React.createElement(i.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:p,value:parseInt(o,10),description:s&&React.createElement("p",{className:"wc-block-components-totals-footer-item-tax"},Object(c.a)(Object(r.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:React.createElement(a.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,displayType:"text",value:parseInt(l,10)})}))})}},function(e,t,n){"use strict";var r=n(29),o=React.createElement(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},React.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),React.createElement("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(4),c=n(15),a=n(12);t.a=function(e){return function(t){var n;return n=Object(r.useRef)(Object(o.getSetting)("cartData")),Object(a.useSelect)((function(e,t){if(n.current){var r,o,a=e(c.CART_STORE_KEY),i=a.isResolving,u=a.hasFinishedResolution,s=t.dispatch(c.CART_STORE_KEY),l=s.receiveCart,f=s.receiveError,p=s.startResolution,d=s.finishResolution;i("getCartData",[])||u("getCartData",[])||(p("getCartData",[]),null!==(r=n.current)&&void 0!==r&&null!==(o=r.code)&&void 0!==o&&o.includes("error")?f(n.current):l(n.current),d("getCartData",[]))}}),[]),React.createElement(e,t)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(7),o=n.n(r),c=n(3),a=n.n(c),i=n(189),u=n(11),s=n.n(u),l=n(9),f=n(0),p=n(1),d=n(22),m=n(5),b=n.n(m),h=n(14),g=n.n(h),v=n(2),y=n(79),O=n(39),j=n(122),E=n(182),w=n(6),S=n(23),k=(n(13),n(107),n(121),n(108)),_=0;function R(e,t){e&&Object(k.a)(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function P(e,t){return e===t||e.contains&&e.contains(t)}function C(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,c=new Array(o),a=0;a<o;a++)c[a]=arguments[a];r(),n=setTimeout((function(){n=null,e.apply(void 0,c)}),t)}return o.cancel=r,o}function x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return t.some((function(t){return t&&t.apply(void 0,[e].concat(r)),e.preventDownshiftDefault||e.hasOwnProperty("nativeEvent")&&e.nativeEvent.preventDownshiftDefault}))}}function I(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){"function"==typeof t?t(e):t&&(t.current=e)}))}}function N(){return String(_++)}function T(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter key to select.":"":"No results are available.":""}function M(e,t){return Object.keys(e).reduce((function(n,r){return n[r]=A(t,r)?t[r]:e[r],n}),{})}function A(e,t){return void 0!==e[t]}function D(e){var t=e.key,n=e.keyCode;return n>=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function F(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var c=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:c+1);var a=t+e;a<0?a=o?c:0:a>c&&(a=o?0:c);var i=L(e,a,n,r,o);return-1===i?t>=n?-1:t:i}function L(e,t,n,r,o){var c=r(t);if(!c||!c.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a<n;a++)if(!r(a).hasAttribute("disabled"))return a}else for(var i=t-1;i>=0;i--)if(!r(i).hasAttribute("disabled"))return i;return o?e>0?L(1,0,n,r,!1):L(-1,n-1,n,r,!1):-1}function V(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(P(t,e)||r&&P(t,n.activeElement))}))}var B=C((function(){q().textContent=""}),500);function U(e,t){var n=q(t);e&&(n.textContent=e,B())}function q(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var z={highlightedIndex:-1,isOpen:!1,selectedItem:null,inputValue:""};function H(e,t,n){var r=e.props,o=e.type,c={};Object.keys(t).forEach((function(e){!function(e,t,n,r){var o="on"+$(e)+"Change";t[o]&&void 0!==r[e]&&r[e]!==n[e]&&t[o](r)}(e,r,t,n),n[e]!==t[e]&&(c[e]=n[e])})),r.onStateChange&&Object.keys(c).length&&r.onStateChange(Object(w.a)({type:o},c))}var W=C((function(e,t){U(e(),t)}),200);function K(e){var t=e.id,n=e.labelId,r=e.menuId,o=e.getItemId,c=e.toggleButtonId,a=void 0===t?"downshift-"+N():t;return{labelId:n||a+"-label",menuId:r||a+"-menu",getItemId:o||function(e){return a+"-item-"+e},toggleButtonId:c||a+"-toggle-button"}}function G(e,t,n){return void 0!==e?e:0===n.length?-1:n.indexOf(t)}function Y(e){return/^\S{1}$/.test(e)}function $(e){return""+e.slice(0,1).toUpperCase()+e.slice(1)}function X(e){var t=Object(v.useRef)(e);return t.current=e,t}function Q(e,t,n){var r=Object(v.useRef)(),o=Object(v.useRef)(),c=Object(v.useCallback)((function(t,n){o.current=n,t=M(t,n.props);var r=e(t,n);return n.props.stateReducer(t,Object(w.a)({},n,{changes:r}))}),[e]),a=Object(v.useReducer)(c,t),i=a[0],u=a[1],s=X(n),l=Object(v.useCallback)((function(e){return u(Object(w.a)({props:s.current},e))}),[s]),f=o.current;return Object(v.useEffect)((function(){f&&r.current&&r.current!==i&&H(f,M(r.current,f.props),i),r.current=i}),[i,n,f]),[i,l]}function Z(e,t,n){var r=Q(e,t,n),o=r[0],c=r[1];return[M(o,n),c]}var J={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:R,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};function ee(e,t,n){void 0===n&&(n=z);var r="default"+$(t);return r in e?e[r]:n[t]}function te(e,t,n){if(void 0===n&&(n=z),t in e)return e[t];var r="initial"+$(t);return r in e?e[r]:ee(e,t,n)}function ne(e){var t=te(e,"selectedItem"),n=te(e,"isOpen"),r=te(e,"highlightedIndex"),o=te(e,"inputValue");return{highlightedIndex:r<0&&t&&n?e.items.indexOf(t):r,isOpen:n,selectedItem:t,inputValue:o}}function re(e,t,n,r){var o=e.items,c=e.initialHighlightedIndex,a=e.defaultHighlightedIndex,i=t.selectedItem,u=t.highlightedIndex;return 0===o.length?-1:void 0!==c&&u===c?c:void 0!==a?a:i?0===n?o.indexOf(i):F(n,o.indexOf(i),o.length,r,!1):0===n?-1:n<0?o.length-1:0}function oe(e,t,n,r){var o=Object(v.useRef)({isMouseDown:!1,isTouchMove:!1});return Object(v.useEffect)((function(){var c=function(){o.current.isMouseDown=!0},a=function(c){o.current.isMouseDown=!1,e&&!V(c.target,t.map((function(e){return e.current})),n.document)&&r()},i=function(){o.current.isTouchMove=!1},u=function(){o.current.isTouchMove=!0},s=function(c){!e||o.current.isTouchMove||V(c.target,t.map((function(e){return e.current})),n.document,!1)||r()};return n.addEventListener("mousedown",c),n.addEventListener("mouseup",a),n.addEventListener("touchstart",i),n.addEventListener("touchmove",u),n.addEventListener("touchend",s),function(){n.removeEventListener("mousedown",c),n.removeEventListener("mouseup",a),n.removeEventListener("touchstart",i),n.removeEventListener("touchmove",u),n.removeEventListener("touchend",s)}}),[e,n]),o}function ce(){for(var e=!1,t=Object(v.useRef)(!0),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var c=Object(v.useRef)(r.reduce((function(e,t){return e[t]={},e}),{}));Object(v.useEffect)((function(){e&&(Object.keys(c.current).forEach((function(e){var n=c.current[e];if(!t.current||Object.keys(n).length){var r=n.suppressRefError,o=n.refKey,a=n.elementRef;a&&a.current||r||console.error('downshift: The ref prop "'+o+'" from '+e+" was not applied correctly on your element.")}else console.error("downshift: You forgot to call the "+e+" getter function on your component / element.")})),t.current=!1)}));var a=Object(v.useCallback)((function(e,t,n,r){0}),[]);return a}function ae(e,t,n,r,o){for(var c=n.map((function(e){return r(e).toLowerCase()})),a=e.toLowerCase(),i=function(e,t){var n=o(t);return e.startsWith(a)&&!(n&&n.hasAttribute("disabled"))},u=t+1;u<c.length;u++){if(i(c[u],u))return u}for(var s=0;s<t;s++){if(i(c[s],s))return s}return t}a.a.array.isRequired,a.a.func,a.a.func,a.a.func,a.a.bool,a.a.number,a.a.number,a.a.number,a.a.bool,a.a.bool,a.a.bool,a.a.any,a.a.any,a.a.any,a.a.string,a.a.string,a.a.string,a.a.func,a.a.string,a.a.func,a.a.func,a.a.func,a.a.func,a.a.func,a.a.shape({addEventListener:a.a.func,removeEventListener:a.a.func,document:a.a.shape({getElementById:a.a.func,activeElement:a.a.any,body:a.a.any})});var ie=Object(w.a)({},J,{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),ue=Object.freeze({__proto__:null,MenuKeyDownArrowDown:0,MenuKeyDownArrowUp:1,MenuKeyDownEscape:2,MenuKeyDownHome:3,MenuKeyDownEnd:4,MenuKeyDownEnter:5,MenuKeyDownSpaceButton:6,MenuKeyDownCharacter:7,MenuBlur:8,MenuMouseLeave:9,ItemMouseMove:10,ItemClick:11,ToggleButtonClick:12,ToggleButtonKeyDownArrowDown:13,ToggleButtonKeyDownArrowUp:14,ToggleButtonKeyDownCharacter:15,FunctionToggleMenu:16,FunctionOpenMenu:17,FunctionCloseMenu:18,FunctionSetHighlightedIndex:19,FunctionSelectItem:20,FunctionSetInputValue:21,FunctionReset:22});function se(e,t){var n,r=t.type,o=t.props,c=t.shiftKey;switch(r){case 10:n={highlightedIndex:t.index};break;case 11:n={isOpen:ee(o,"isOpen"),highlightedIndex:ee(o,"highlightedIndex"),selectedItem:o.items[t.index]};break;case 15:var a=t.key,i=""+e.inputValue+a,u=ae(i,e.selectedItem?o.items.indexOf(e.selectedItem):-1,o.items,o.itemToString,t.getItemNodeFromIndex);n=Object(w.a)({inputValue:i},u>=0&&{selectedItem:o.items[u]});break;case 13:n={highlightedIndex:re(o,e,1,t.getItemNodeFromIndex),isOpen:!0};break;case 14:n={highlightedIndex:re(o,e,-1,t.getItemNodeFromIndex),isOpen:!0};break;case 5:case 6:n=Object(w.a)({isOpen:ee(o,"isOpen"),highlightedIndex:ee(o,"highlightedIndex")},e.highlightedIndex>=0&&{selectedItem:o.items[e.highlightedIndex]});break;case 3:n={highlightedIndex:L(1,0,o.items.length,t.getItemNodeFromIndex,!1)};break;case 4:n={highlightedIndex:L(-1,o.items.length-1,o.items.length,t.getItemNodeFromIndex,!1)};break;case 2:case 8:n={isOpen:!1,highlightedIndex:-1};break;case 7:var s=t.key,l=""+e.inputValue+s,f=ae(l,e.highlightedIndex,o.items,o.itemToString,t.getItemNodeFromIndex);n=Object(w.a)({inputValue:l},f>=0&&{highlightedIndex:f});break;case 0:n={highlightedIndex:F(c?5:1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,o.circularNavigation)};break;case 1:n={highlightedIndex:F(c?-5:-1,e.highlightedIndex,o.items.length,t.getItemNodeFromIndex,o.circularNavigation)};break;case 9:n={highlightedIndex:-1};break;case 12:case 16:n={isOpen:!e.isOpen,highlightedIndex:e.isOpen?-1:re(o,e,0)};break;case 17:n={isOpen:!0,highlightedIndex:re(o,e,0)};break;case 18:n={isOpen:!1};break;case 19:n={highlightedIndex:t.highlightedIndex};break;case 20:n={selectedItem:t.selectedItem};break;case 21:n={inputValue:t.inputValue};break;case 22:n={highlightedIndex:ee(o,"highlightedIndex"),isOpen:ee(o,"isOpen"),selectedItem:ee(o,"selectedItem"),inputValue:ee(o,"inputValue")};break;default:throw new Error("Reducer called without proper action type.")}return Object(w.a)({},e,n)}function le(e){void 0===e&&(e={});var t=Object(w.a)({},ie,e),n=t.items,r=t.scrollIntoView,o=t.environment,c=t.initialIsOpen,a=t.defaultIsOpen,i=t.itemToString,u=t.getA11ySelectionMessage,s=t.getA11yStatusMessage,l=Z(se,ne(t),t),f=l[0],p=l[1],d=f.isOpen,m=f.highlightedIndex,b=f.selectedItem,h=f.inputValue,g=Object(v.useRef)(null),y=Object(v.useRef)(null),O=Object(v.useRef)();O.current={};var j=Object(v.useRef)(!0),E=Object(v.useRef)(!0),k=Object(v.useRef)(null),_=Object(v.useRef)(K(t)),R=Object(v.useRef)(),P=Object(v.useRef)(!0),N=Object(v.useRef)(t),T=X({state:f,props:t}),M=function(e){return O.current[_.current.getItemId(e)]};Object(v.useEffect)((function(){if(!P.current){var e=R.current;W((function(){return s({isOpen:d,highlightedIndex:m,selectedItem:b,inputValue:h,highlightedItem:n[m],resultCount:n.length,itemToString:i,previousResultCount:e})}),o.document)}}),[d,m,h,n]),Object(v.useEffect)((function(){if(!P.current){var e=R.current;W((function(){return u({isOpen:d,highlightedIndex:m,selectedItem:b,inputValue:h,highlightedItem:n[m],resultCount:n.length,itemToString:i,previousResultCount:e})}),o.document)}}),[b]),Object(v.useEffect)((function(){P.current&&(k.current=C((function(e){e({type:21,inputValue:""})}),500)),h&&k.current(p)}),[h]),Object(v.useEffect)((function(){P.current?(c||a||d)&&y.current&&y.current.focus():d?y.current&&y.current.focus():o.document.activeElement===y.current&&g.current&&(E.current=!1,g.current.focus())}),[d]),Object(v.useEffect)((function(){m<0||!d||!Object.keys(O.current).length||(!1===j.current?j.current=!0:r(M(m),y.current))}),[m]),Object(v.useEffect)((function(){P.current||(R.current=n.length)})),Object(v.useEffect)((function(){P.current||(N.current,N.current=t)}),[f,t]);var A=oe(d,[y,g],o,(function(){p({type:8})})),F=ce("getMenuProps","getToggleButtonProps");Object(v.useEffect)((function(){P.current=!1}),[]);var L=Object(v.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),p({type:13,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),p({type:14,getItemNodeFromIndex:M,shiftKey:e.shiftKey})}}}),[p]),V=Object(v.useMemo)((function(){return{ArrowDown:function(e){e.preventDefault(),p({type:0,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},ArrowUp:function(e){e.preventDefault(),p({type:1,getItemNodeFromIndex:M,shiftKey:e.shiftKey})},Home:function(e){e.preventDefault(),p({type:3,getItemNodeFromIndex:M})},End:function(e){e.preventDefault(),p({type:4,getItemNodeFromIndex:M})},Escape:function(){p({type:2})},Enter:function(e){e.preventDefault(),p({type:5})}," ":function(e){e.preventDefault(),p({type:6})}}}),[p]),B=Object(v.useCallback)((function(){p({type:16})}),[p]),U=Object(v.useCallback)((function(){p({type:18})}),[p]),q=Object(v.useCallback)((function(){p({type:17})}),[p]),z=Object(v.useCallback)((function(e){p({type:19,highlightedIndex:e})}),[p]),H=Object(v.useCallback)((function(e){p({type:20,selectedItem:e})}),[p]),$=Object(v.useCallback)((function(){p({type:22})}),[p]),Q=Object(v.useCallback)((function(e){p({type:21,inputValue:e})}),[p]),J=Object(v.useCallback)((function(e){return Object(w.a)({id:_.current.labelId,htmlFor:_.current.toggleButtonId},e)}),[]),ee=Object(v.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onMouseLeave,c=r.refKey,a=void 0===c?"ref":c,i=r.onKeyDown,u=r.onBlur,s=r.ref,l=Object(S.a)(r,["onMouseLeave","refKey","onKeyDown","onBlur","ref"]),f=(void 0===t?{}:t).suppressRefError,d=void 0!==f&&f,m=T.current.state;return F("getMenuProps",d,a,y),Object(w.a)(((n={})[a]=I(s,(function(e){y.current=e})),n.id=_.current.menuId,n.role="listbox",n["aria-labelledby"]=_.current.labelId,n.tabIndex=-1,n),m.isOpen&&m.highlightedIndex>-1&&{"aria-activedescendant":_.current.getItemId(m.highlightedIndex)},{onMouseLeave:x(o,(function(){p({type:9})})),onKeyDown:x(i,(function(e){var t=D(e);t&&V[t]?V[t](e):Y(t)&&p({type:7,key:t,getItemNodeFromIndex:M})})),onBlur:x(u,(function(){!1!==E.current?!A.current.isMouseDown&&p({type:8}):E.current=!0}))},l)}),[p,T,V,A,F]);return{getToggleButtonProps:Object(v.useCallback)((function(e,t){var n,r=void 0===e?{}:e,o=r.onClick,c=r.onKeyDown,a=r.refKey,i=void 0===a?"ref":a,u=r.ref,s=Object(S.a)(r,["onClick","onKeyDown","refKey","ref"]),l=(void 0===t?{}:t).suppressRefError,f=void 0!==l&&l,d=Object(w.a)(((n={})[i]=I(u,(function(e){g.current=e})),n.id=_.current.toggleButtonId,n["aria-haspopup"]="listbox",n["aria-expanded"]=T.current.state.isOpen,n["aria-labelledby"]=_.current.labelId+" "+_.current.toggleButtonId,n),s);return s.disabled||(d.onClick=x(o,(function(){p({type:12})})),d.onKeyDown=x(c,(function(e){var t=D(e);t&&L[t]?L[t](e):Y(t)&&p({type:15,key:t,getItemNodeFromIndex:M})}))),F("getToggleButtonProps",f,i,g),d}),[p,T,L,F]),getLabelProps:J,getMenuProps:ee,getItemProps:Object(v.useCallback)((function(e){var t,n=void 0===e?{}:e,r=n.item,o=n.index,c=n.onMouseMove,a=n.onClick,i=n.refKey,u=void 0===i?"ref":i,s=n.ref,l=Object(S.a)(n,["item","index","onMouseMove","onClick","refKey","ref"]),f=T.current,d=f.state,m=f.props,b=G(o,r,m.items);if(b<0)throw new Error("Pass either item or item index in getItemProps!");var h=Object(w.a)(((t={role:"option","aria-selected":""+(b===d.highlightedIndex),id:_.current.getItemId(b)})[u]=I(s,(function(e){e&&(O.current[_.current.getItemId(b)]=e)})),t),l);return l.disabled||(h.onMouseMove=x(c,(function(){o!==d.highlightedIndex&&(j.current=!1,p({type:10,index:o}))})),h.onClick=x(a,(function(){p({type:11,index:o})}))),h}),[p,T]),toggleMenu:B,openMenu:q,closeMenu:U,setHighlightedIndex:z,selectItem:H,reset:$,setInputValue:Q,highlightedIndex:m,isOpen:d,selectedItem:b,inputValue:h}}le.stateChangeTypes=ue;a.a.array.isRequired,a.a.func,a.a.func,a.a.func,a.a.bool,a.a.number,a.a.number,a.a.number,a.a.bool,a.a.bool,a.a.bool,a.a.any,a.a.any,a.a.any,a.a.string,a.a.string,a.a.string,a.a.string,a.a.string,a.a.string,a.a.func,a.a.string,a.a.string,a.a.func,a.a.func,a.a.func,a.a.func,a.a.func,a.a.func,a.a.shape({addEventListener:a.a.func,removeEventListener:a.a.func,document:a.a.shape({getElementById:a.a.func,activeElement:a.a.any,body:a.a.any})});Object(w.a)({},J,{getA11yStatusMessage:T,circularNavigation:!0});a.a.array,a.a.array,a.a.array,a.a.func,a.a.func,a.a.func,a.a.number,a.a.number,a.a.number,a.a.func,a.a.func,a.a.string,a.a.string,a.a.shape({addEventListener:a.a.func,removeEventListener:a.a.func,document:a.a.shape({getElementById:a.a.func,activeElement:a.a.any,body:a.a.any})});var fe=n(19),pe=n(17);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var me=function(e){var t=e.icon,n=e.size,r=void 0===n?24:n,o=Object(pe.a)(e,["icon","size"]);return Object(f.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){Object(fe.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:r,height:r},o))},be=n(29),he=Object(f.createElement)(be.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(f.createElement)(be.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),ge=Object(f.createElement)(be.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(f.createElement)(be.Path,{d:"M18.3 5.6L9.9 16.9l-4.6-3.4-.9 1.2 5.8 4.3 9.3-12.6z"}));function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ye=function(e){var t=e.as,n=void 0===t?"div":t,r=e.className,o=Object(pe.a)(e,["as","className"]);return function(e){var t=e.as,n=void 0===t?"div":t,r=Object(pe.a)(e,["as"]);return"function"==typeof r.children?r.children(r):Object(f.createElement)(n,r)}(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){Object(fe.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({as:n,className:b()("components-visually-hidden",r)},o))},Oe=n(68),je=function(e){return e&&e.name},Ee=function(e,t){var n=e.selectedItem,r=t.type,o=t.changes,c=t.props.items;switch(r){case le.stateChangeTypes.ToggleButtonKeyDownArrowDown:return{selectedItem:c[n?Math.min(c.indexOf(n)+1,c.length-1):0]};case le.stateChangeTypes.ToggleButtonKeyDownArrowUp:return{selectedItem:c[n?Math.max(c.indexOf(n)-1,0):c.length-1]};default:return o}};function we(e){var t=e.className,n=e.hideLabelFromVision,r=e.label,o=e.options,c=e.onChange,a=e.value,i=le({initialSelectedItem:o[0],items:o,itemToString:je,onSelectedItemChange:c,selectedItem:a,stateReducer:Ee}),u=i.getLabelProps,s=i.getToggleButtonProps,l=i.getMenuProps,p=i.getItemProps,d=i.isOpen,m=i.highlightedIndex,h=i.selectedItem,g=l({className:"components-custom-select-control__menu","aria-hidden":!d});return g["aria-activedescendant"]&&"downshift-null"===g["aria-activedescendant"].slice(0,"downshift-null".length)&&delete g["aria-activedescendant"],Object(f.createElement)("div",{className:b()("components-custom-select-control",t)},n?Object(f.createElement)(ye,Object(w.a)({as:"label"},u()),r):Object(f.createElement)("label",u({className:"components-custom-select-control__label"}),r),Object(f.createElement)(Oe.a,s({"aria-label":r,"aria-labelledby":void 0,className:"components-custom-select-control__button",isSmall:!0}),je(h),Object(f.createElement)(me,{icon:he,className:"components-custom-select-control__button-icon"})),Object(f.createElement)("ul",g,d&&o.map((function(e,t){return Object(f.createElement)("li",p({item:e,index:t,key:e.key,className:b()(e.className,"components-custom-select-control__item",{"is-highlighted":t===m}),style:e.style}),e===h&&Object(f.createElement)(me,{icon:ge,className:"components-custom-select-control__item-icon"}),e.name)}))))}n(135);var Se=function(e){var t=e.className,n=e.feedback,r=e.id,o=e.label,c=e.onChange,a=e.options,i=e.value;return React.createElement("div",{id:r,className:b()("wc-block-components-select",t,{"is-active":i})},React.createElement(we,{label:o,onChange:function(e){var t=e.selectedItem;c(t.key)},options:a,value:i||null}),n)},ke=Object(j.a)((function(e){var t=e.className,n=e.id,r=e.value,c=e.instanceId,a=e.required,i=e.errorId,u=e.errorMessage,l=void 0===u?Object(p.__)("Please select a value.","woo-gutenberg-products-block"):u,f=g()(e,["className","id","value","instanceId","required","errorId","errorMessage"]),d=n||"select-"+c;i=i||d;var m=Object(O.a)(r),h=Object(y.b)(),j=h.getValidationError,w=h.setValidationErrors,S=h.clearValidationError;Object(v.useEffect)((function(){!a||m?S(i):w(o()({},i,{message:l,hidden:!0}))}),[S,m,i,l,a,w]),Object(v.useEffect)((function(){return function(){S(i)}}),[S,i]);var k=j(i)||{};return React.createElement(Se,s()({id:d,className:b()(t,{"has-error":k.message&&!k.hidden}),feedback:React.createElement(E.a,{propertyName:i}),value:m},f))})),_e=(n(171),function(e){var t=e.className,n=e.countries,r=e.id,o=e.label,c=e.onChange,a=e.value,i=void 0===a?"":a,u=e.autoComplete,s=void 0===u?"off":u,l=e.required,m=void 0!==l&&l,h=e.errorId,g=e.errorMessage,v=void 0===g?Object(p.__)("Please select a country.","woo-gutenberg-products-block"):g,y=Object(f.useMemo)((function(){return Object.keys(n).map((function(e){return{key:e,name:Object(d.decodeEntities)(n[e])}}))}),[n]);return React.createElement("div",{className:b()(t,"wc-block-components-country-input")},React.createElement(ke,{id:r,label:o,onChange:c,options:y,value:y.find((function(e){return e.key===i})),errorId:h,errorMessage:v,required:m}),"off"!==s&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:s,value:i,onChange:function(e){var t=e.target.value,n=y.find((function(e){return e.key===t}));c(n?n.key:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),Re=function(e){return React.createElement(_e,s()({countries:l.v},e))},Pe=function(e){return React.createElement(_e,s()({countries:l.a},e))},Ce=(n(173),function(e){var t=e.className,n=e.id,r=e.states,o=e.country,c=e.label,a=e.onChange,u=e.autoComplete,s=void 0===u?"off":u,l=e.value,m=void 0===l?"":l,h=e.required,g=void 0!==h&&h,v=r[o],y=Object(f.useMemo)((function(){return v?Object.keys(v).map((function(e){return{key:e,name:Object(d.decodeEntities)(v[e])}})):[]}),[v]),O=Object(f.useCallback)((function(e){if(y.length>0){var t=y.find((function(t){return t.key===e||t.name===e}));a(t?t.key:"")}else a(e)}),[a,y]);return y.length>0?React.createElement(React.Fragment,null,React.createElement(ke,{className:b()(t,"wc-block-components-state-input"),id:n,label:c,onChange:O,options:y,value:y.find((function(e){return e.key===m})),errorMessage:Object(p.__)("Please select a state.","woo-gutenberg-products-block"),required:g}),"off"!==s&&React.createElement("input",{type:"text","aria-hidden":!0,autoComplete:s,value:m,onChange:function(e){return O(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):React.createElement(i.a,{className:t,id:n,label:c,onChange:O,autoComplete:s,value:m,required:g})}),xe=function(e){return React.createElement(Ce,s()({states:l.w},e))},Ie=function(e){return React.createElement(Ce,s()({states:l.b},e))},Ne=n(103),Te=n(10),Me=n.n(Te),Ae=n(4),De=Object(Ae.getSetting)("countryLocale",{}),Fe=function(e){var t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(p.sprintf)(Object(p.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(t.index=parseInt(e.priority,10)),!0===e.hidden&&(t.required=!1),t},Le=Object.entries(De).map((function(e){var t=Me()(e,2),n=t[0],r=t[1];return[n,Object.entries(r).map((function(e){var t=Me()(e,2),n=t[0],r=t[1];return[n,Fe(r)]})).reduce((function(e,t){var n=Me()(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})]})).reduce((function(e,t){var n=Me()(t,2),r=n[0],o=n[1];return e[r]=o,e}),{});function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ue=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=n&&void 0!==Le[n]?Le[n]:{};return e.map((function(e){var n=Ne.a[e]||{},o=r[e]||{},c=t[e]||{};return Be(Be(Be({key:e},n),o),c)})).sort((function(e,t){return e.index-t.index}))};function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=Object(j.a)((function(e){var t=e.id,n=e.fields,r=void 0===n?Object.keys(Ne.a):n,c=e.fieldConfig,a=void 0===c?{}:c,u=e.instanceId,s=e.onChange,l=e.type,d=void 0===l?"shipping":l,m=e.values,b=Object(y.b)(),h=b.getValidationError,g=b.setValidationErrors,v=b.clearValidationError,j=Object(O.a)(r),E=h("shipping-missing-country")||{},w=Object(f.useMemo)((function(){return Ue(j,a,m.country)}),[j,a,m.country]);return Object(f.useEffect)((function(){"shipping"===d&&function(e,t,n,r){r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(p.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&n("shipping-missing-country")}(m,g,v,E.message&&!E.hidden)}),[m,E.message,E.hidden,g,v,d]),t=t||u,React.createElement("div",{id:t,className:"wc-block-components-address-form"},w.map((function(e){if(e.hidden)return null;if("country"===e.key){var n="shipping"===d?Re:Pe;return React.createElement(n,{key:e.key,id:"".concat(t,"-").concat(e.key),label:e.required?e.label:e.optionalLabel,value:m.country,autoComplete:e.autocomplete,onChange:function(e){return s(ze(ze({},m),{},{country:e,state:"",city:"",postcode:""}))},errorId:"shipping"===d?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){var r="shipping"===d?xe:Ie;return React.createElement(r,{key:e.key,id:"".concat(t,"-").concat(e.key),country:m.country,label:e.required?e.label:e.optionalLabel,value:m.state,autoComplete:e.autocomplete,onChange:function(e){return s(ze(ze({},m),{},{state:e}))},errorMessage:e.errorMessage,required:e.required})}return React.createElement(i.a,{key:e.key,id:"".concat(t,"-").concat(e.key),className:"wc-block-components-address-form__".concat(e.key),label:e.required?e.label:e.optionalLabel,value:m[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:function(t){return s(ze(ze({},m),{},o()({},e.key,t)))},errorMessage:e.errorMessage,required:e.required})})))}))},,function(e,t,n){"use strict";n.r(t);var r=n(241),o=n(132),c=n(1),a=n(94),i=n(9),u=n(150),s=n(190),l=n(111),f=n(15),p=n(12),d=n(100),m=n(0),b=n(76),h=n(79),g=n(278),v=n(106),y=(n(3),n(236)),O=n(275),j=n(237),E=n(238),w=n(27),S=n(44),k=n(186),_=n(138),R=n(147),P=(n(176),function(){var e=Object(k.a)(),t=e.paymentMethods,n=e.isInitialized,r=Object(_.a)().noticeContexts;return!n||n&&0===Object.keys(t).length?null:React.createElement(React.Fragment,null,React.createElement("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},React.createElement("div",{className:"wc-block-components-express-payment__content"},React.createElement(a.a,{context:r.EXPRESS_PAYMENTS},React.createElement(R.a,null)))),React.createElement("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(c.__)("Or","woo-gutenberg-products-block")))}),C=n(231),x=n(89),I=n(5),N=n.n(I),T=n(232),M=n(233),A=n(235),D=n(102),F=n(4),L=n(22),V=n(183),B=function(e){var t=e.children,n=e.redirectUrl;return React.createElement(V.a,{isCart:!0,redirectUrl:n},t)},U=n(10),q=n.n(U),z=n(277),H=n(85),W=n(65),K={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},G=function(){var e,t,n=Object(m.useState)(""),r=q()(n,2),o=r[0],c=r[1],a=Object(m.useRef)(null),i=Object(m.useRef)((e=function(e){e[0].isIntersecting?c("visible"):c(e[0].boundingClientRect.top>0?"below":"above")},t={threshold:1},"function"!=typeof IntersectionObserver?{observe:function(){},unobserve:function(){}}:new IntersectionObserver(e,t)));return Object(m.useLayoutEffect)((function(){var e=a.current,t=i.current;return e&&t.observe(e),function(){t.unobserve(e)}}),[]),[React.createElement("div",{"aria-hidden":!0,ref:a,style:K}),o]},Y=(n(240),function(e){return Object.values(e).reduce((function(e,t){return null!==t.icons&&(e=e.concat(t.icons)),e}),[])}),$=function(e){var t=e.link,n=Object(W.b)().isCalculating,r=G(),o=q()(r,2),a=o[0],u=o[1],s=Object(m.useState)(!1),l=q()(s,2),f=l[0],p=l[1],d=Object(k.b)().paymentMethods;Object(m.useEffect)((function(){if(window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var e=function(){p(!1)};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}}),[]);var b=React.createElement(React.Fragment,null,React.createElement(H.a,{className:"wc-block-cart__submit-button",href:t||i.h,disabled:n,onClick:function(){return p(!0)},showSpinner:f},Object(c.__)("Proceed to Checkout","woo-gutenberg-products-block")),React.createElement(z.a,{icons:Y(d)}));return React.createElement("div",{className:"wc-block-cart__submit"},a,React.createElement("div",{className:"wc-block-cart__submit-container"},b),"below"===u&&React.createElement("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},b))},X=function(e){var t=e.itemCount,n=void 0===t?1:t;return React.createElement(D.a,{headingLevel:"2"},Object(c.sprintf)(Object(c._n)("Your cart (%d item)","Your cart (%d items)",n,"woo-gutenberg-products-block"),n))},Q=n(47),Z=n.n(Q),J=n(28),ee=n.n(J),te=n(36),ne=n(52),re=(n(234),function(e){var t=e.className,n=e.quantity,r=void 0===n?1:n,o=e.minimum,a=void 0===o?1:o,i=e.maximum,u=e.onChange,s=void 0===u?function(){return null}:u,l=e.itemName,f=void 0===l?"":l,p=e.disabled,d=N()("wc-block-components-quantity-selector",t),b=void 0!==i,h=r>a,g=!b||r<i,v=Object(m.useCallback)((function(e){var t=void 0!==ee()(e.key)?"ArrowDown"===e.key:e.keyCode===ne.DOWN,n=void 0!==ee()(e.key)?"ArrowUp"===e.key:e.keyCode===ne.UP;t&&h&&(e.preventDefault(),s(r-1)),n&&g&&(e.preventDefault(),s(r+1))}),[r,s,g,h]);return React.createElement("div",{className:d},React.createElement("input",{className:"wc-block-components-quantity-selector__input",disabled:p,type:"number",step:"1",min:"0",value:r,onKeyDown:v,onChange:function(e){var t=isNaN(e.target.value)||!e.target.value?0:parseInt(e.target.value,10);b&&(t=Math.min(t,i)),(t=Math.max(t,a))!==r&&s(t)},"aria-label":Object(c.sprintf)(Object(c.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),f)}),React.createElement("button",{"aria-label":Object(c.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:p||!h,onClick:function(){var e=r-1;s(e),Object(te.speak)(Object(c.sprintf)(Object(c.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e))}},"-"),React.createElement("button",{"aria-label":Object(c.__)("Increase quantity","woo-gutenberg-products-block"),disabled:p||!g,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:function(){var e=r+1;s(e),Object(te.speak)(Object(c.sprintf)(Object(c.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e))}},"+"))}),oe=n(117),ce=n(133),ae=n(141),ie=n(63),ue=n(179),se=n(180),le=n(181),fe=n(46),pe=n(92),de=function(e){var t=e.currency,n=e.saleAmount,r=e.format,o=void 0===r?"<price/>":r;if(!n||n<=0)return null;o.includes("<price/>")||(o="<price/>",console.error("Price formats need to include the `<price/>` tag."));var a=Object(c.sprintf)(Object(c.__)("Save %s","woo-gutenberg-products-block"),o);return React.createElement(pe.a,{className:"wc-block-components-sale-badge"},Object(u.a)(a,{price:React.createElement(fe.a,{currency:t,value:n})}))},me=n(184),be=n(104),he=function(e,t){return e.convertPrecision(t.minorUnit).getAmount()},ge=function(e){var t=e.lineItem,n=void 0===t?{}:t,r=n.name,o=void 0===r?"":r,a=n.catalog_visibility,u=void 0===a?"":a,s=n.short_description,l=void 0===s?"":s,b=n.description,h=void 0===b?"":b,v=n.low_stock_remaining,y=void 0===v?null:v,O=n.show_backorder_badge,j=void 0!==O&&O,E=n.quantity_limit,k=void 0===E?99:E,_=n.permalink,R=void 0===_?"":_,P=n.images,C=void 0===P?[]:P,x=n.variation,I=void 0===x?[]:x,T=n.item_data,M=void 0===T?[]:T,A=n.prices,D=void 0===A?{currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}}:A,F=n.totals,L=void 0===F?{currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_total:"0",line_total_tax:"0"}:F,V=n.extensions,B=function(e){var t=e.key,n=void 0===t?"":t,r=e.quantity,o=void 0===r?1:r,c=Object(d.a)().cartErrors,a=Object(W.b)().dispatchActions,i=Object(m.useState)(o),u=q()(i,2),s=u[0],l=u[1],b=Object(ae.a)(s,400),h=q()(b,1)[0],v=Object(ie.a)(h),y=Object(p.useDispatch)(f.CART_STORE_KEY),O=y.removeItemFromCart,j=y.changeCartItemQuantity,E=Object(p.useSelect)((function(e){return!!n&&e(f.CART_STORE_KEY).isItemPendingQuantity(n)}),[n]),w=Object(ie.a)(E),S=Object(p.useSelect)((function(e){return!!n&&e(f.CART_STORE_KEY).isItemPendingDelete(n)}),[n]),k=Object(ie.a)(S);return Object(m.useEffect)((function(){n&&Number.isFinite(v)&&v!==h&&j(n,h).then(g.c)}),[n,j,h,v]),Object(m.useEffect)((function(){w!==E&&(E?a.incrementCalculating():a.decrementCalculating())}),[a,E,w]),Object(m.useEffect)((function(){return k!==S&&(S?a.incrementCalculating():a.decrementCalculating()),function(){S&&a.decrementCalculating()}}),[a,S,k]),{isPendingDelete:S,quantity:s,changeQuantity:l,removeItem:function(){return!!n&&O(n).then((function(){Object(g.c)()}))},cartItemQuantityErrors:c}}(n),U=B.quantity,z=B.changeQuantity,H=B.removeItem,K=B.isPendingDelete,G=Object(S.getCurrency)(D),Y=Object(w.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:o,arg:{extensions:V,context:"cart"},validation:function(e){return"string"==typeof e}}),$=Object(be.a)({amount:parseInt(D.raw_prices.regular_price,10),precision:parseInt(D.raw_prices.precision,10)}),X=Object(be.a)({amount:parseInt(D.raw_prices.price,10),precision:parseInt(D.raw_prices.precision,10)}),Q=$.subtract(X),Z=Q.multiply(U),J=Object(S.getCurrency)(L),ee=parseInt(L.line_total,10);i.k&&(ee+=parseInt(L.line_total_tax,10));var te=Object(be.a)({amount:ee}),ne=C.length?C[0]:{},fe="hidden"===u||"search"===u,pe=Object(w.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"<price/>",arg:{cartItem:n,block:"cart"},validation:function(e){return"string"==typeof e&&e.includes("<price/>")}}),ge=Object(w.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"<price/>",arg:{lineItem:n},validation:function(e){return"string"==typeof e&&e.includes("<price/>")}}),ve=Object(w.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"<price/>",arg:{lineItem:n},validation:function(e){return"string"==typeof e&&e.includes("<price/>")}});return React.createElement("tr",{className:N()("wc-block-cart-items__row",{"is-disabled":K})},React.createElement("td",{className:"wc-block-cart-item__image","aria-hidden":!ne.alt},fe?React.createElement(ue.a,{image:ne}):React.createElement("a",{href:R,tabIndex:-1},React.createElement(ue.a,{image:ne}))),React.createElement("td",{className:"wc-block-cart-item__product"},React.createElement(ce.a,{disabled:K||fe,name:Y,permalink:R}),j?React.createElement(se.a,null):!!y&&React.createElement(le.a,{lowStockRemaining:y}),React.createElement("div",{className:"wc-block-cart-item__prices"},React.createElement(oe.a,{currency:G,regularPrice:he($,G),price:he(X,G),format:ge})),React.createElement(de,{currency:G,saleAmount:he(Q,G),format:ve}),React.createElement(me.a,{shortDescription:l,fullDescription:h,itemData:M,variation:I}),React.createElement("div",{className:"wc-block-cart-item__quantity"},React.createElement(re,{disabled:K,quantity:U,maximum:k,onChange:z,itemName:Y}),React.createElement("button",{className:"wc-block-cart-item__remove-link",onClick:H,disabled:K},Object(c.__)("Remove item","woo-gutenberg-products-block")))),React.createElement("td",{className:"wc-block-cart-item__total"},React.createElement(oe.a,{currency:J,format:pe,price:he(te,J)}),U>1&&React.createElement(de,{currency:G,saleAmount:he(Z,G),format:ve})))},ve=Z()(Array(3)).map((function(e,t){return React.createElement(ge,{key:t})})),ye=function(e){var t=e.lineItems,n=void 0===t?[]:t,r=e.isLoading,o=void 0!==r&&r?ve:n.map((function(e){return React.createElement(ge,{key:e.key,lineItem:e})}));return React.createElement("table",{className:"wc-block-cart-items"},React.createElement("thead",null,React.createElement("tr",{className:"wc-block-cart-items__header"},React.createElement("th",{className:"wc-block-cart-items__header-image"},React.createElement("span",null,Object(c.__)("Product","woo-gutenberg-products-block"))),React.createElement("th",{className:"wc-block-cart-items__header-product"},React.createElement("span",null,Object(c.__)("Details","woo-gutenberg-products-block"))),React.createElement("th",{className:"wc-block-cart-items__header-total"},React.createElement("span",null,Object(c.__)("Total","woo-gutenberg-products-block"))))),React.createElement("tbody",null,o))},Oe=(n(230),function(e){var t=e.attributes,n=t.isShippingCalculatorEnabled,r=t.hasDarkControls,o=Object(d.a)(),a=o.cartItems,u=o.cartFees,s=o.cartTotals,l=o.cartIsLoading,f=o.cartItemsCount,p=o.cartItemErrors,b=o.cartNeedsPayment,h=o.cartNeedsShipping,g=Object(C.a)(),v=g.applyCoupon,k=g.removeCoupon,_=g.isApplyingCoupon,R=g.isRemovingCoupon,I=g.appliedCoupons,V=Object(x.a)().addErrorNotice;Object(m.useEffect)((function(){p.forEach((function(e){V(Object(L.decodeEntities)(e.message),{isDismissible:!0,id:e.code})}))}),[V,p]);var B=Object(S.getCurrencyFromPriceResponse)(s),U=N()("wc-block-cart",{"wc-block-cart--is-loading":l,"has-dark-controls":r});return React.createElement(React.Fragment,null,React.createElement(X,{itemCount:f}),React.createElement(T.a,{className:U},React.createElement(M.a,{className:"wc-block-cart__main"},React.createElement(ye,{lineItems:a,isLoading:l})),React.createElement(A.a,{className:"wc-block-cart__sidebar"},React.createElement(D.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(c.__)("Cart totals","woo-gutenberg-products-block")),React.createElement(w.Subtotal,{currency:B,values:s}),React.createElement(w.TotalsFees,{currency:B,cartFees:u}),React.createElement(y.a,{cartCoupons:I,currency:B,isRemovingCoupon:R,removeCoupon:k,values:s}),h&&React.createElement(O.a,{showCalculator:n,showRateSelector:!0,values:s,currency:B}),!i.k&&React.createElement(w.TotalsTaxes,{currency:B,values:s}),i.i&&React.createElement(j.a,{onSubmit:v,isLoading:_}),React.createElement(E.a,{currency:B,values:s}),React.createElement(w.ExperimentalOrderMeta.Slot,null),React.createElement("div",{className:"wc-block-cart__payment-options"},b&&React.createElement(P,null),React.createElement($,{link:Object(F.getSetting)("page-"+(null==t?void 0:t.checkoutPageId),!1)})))))}),je=function(e){return React.createElement(B,null,React.createElement(Oe,e))},Ee=function(e){var t=e.content;return Object(m.useEffect)((function(){Object(g.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})}),[]),React.createElement(m.RawHTML,null,t)},we=Object(v.a)((function(e){var t=e.emptyCart,n=e.attributes,r=e.scrollToTop,o=Object(d.a)(),c=o.cartItems,a=o.cartIsLoading;return Object(m.useEffect)((function(){var e=function(){Object(p.dispatch)(f.CART_STORE_KEY).invalidateResolutionForStore(),r()},t=Object(g.b)("added_to_cart","wc-blocks_added_to_cart"),n=Object(g.b)("removed_from_cart","wc-blocks_removed_from_cart");return document.body.addEventListener("wc-blocks_added_to_cart",e),document.body.addEventListener("wc-blocks_removed_from_cart",e),function(){t(),n(),document.body.removeEventListener("wc-blocks_added_to_cart",e),document.body.removeEventListener("wc-blocks_removed_from_cart",e)}}),[r]),React.createElement(React.Fragment,null,a||0!==c.length?React.createElement(b.a,{showSpinner:!0,isLoading:a},React.createElement(h.a,null,React.createElement(je,{attributes:n}))):React.createElement(Ee,{content:t}))})),Se={isPreview:{type:"boolean",default:!1,save:!1},isShippingCalculatorEnabled:{type:"boolean",default:i.n},checkoutPageId:{type:"number",default:0},hasDarkControls:{type:"boolean",default:i.l}},ke=function(){window.location.reload(!0)};Object(l.a)({selector:".wp-block-woocommerce-cart",Block:Object(r.a)(Object(o.a)((function(e){return React.createElement(a.a,{context:"wc/cart"},React.createElement(we,e))}))),getProps:function(e){return{emptyCart:e.innerHTML,attributes:Object(s.a)(Se,e.dataset)}},getErrorBoundaryProps:function(){return{header:Object(c.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(u.a)(Object(c.__)("The cart has encountered an unexpected error. <button>Try reloading the page</button>. If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:React.createElement("button",{className:"wc-block-link-button",onClick:ke})}),showErrorMessage:i.j}}})},,,,,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(10),a=n.n(c),i=n(5),u=n.n(i),s=n(1),l=n(9),f=(n(3),n(0)),p=n(100),d=n(64),m=n(85),b=n(21),h=n.n(b),g=n(79),v=(n(134),n(268)),y=function(e){var t=e.address,n=e.onUpdate,r=e.addressFields,o=Object(f.useState)(t),c=a()(o,2),i=c[0],u=c[1],l=Object(g.b)(),p=l.hasValidationErrors,d=l.showAllValidationErrors;return React.createElement("form",{className:"wc-block-components-shipping-calculator-address"},React.createElement(v.a,{fields:r,onChange:u,values:i}),React.createElement(m.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:h()(i,t),onClick:function(e){if(e.preventDefault(),d(),!p)return n(i)},type:"submit"},Object(s.__)("Update","woo-gutenberg-products-block")))},O=function(e){var t=e.onUpdate,n=void 0===t?function(){}:t,r=e.addressFields,o=void 0===r?["country","state","city","postcode"]:r,c=Object(d.b)(),a=c.shippingAddress,i=c.setShippingAddress;return React.createElement("div",{className:"wc-block-components-shipping-calculator"},React.createElement(y,{address:a,addressFields:o,onUpdate:function(e){i(e),n(e)}}))},j=n(28),E=n.n(j),w=n(22),S=function(e){var t=e.address;if(0===Object.values(t).length)return null;var n="string"==typeof l.v[t.country]?Object(w.decodeEntities)(l.v[t.country]):"",r="object"===E()(l.w[t.country])&&"string"==typeof l.w[t.country][t.state]?Object(w.decodeEntities)(l.w[t.country][t.state]):t.state,o=[];o.push(t.postcode.toUpperCase()),o.push(t.city),o.push(r),o.push(n);var c=o.filter(Boolean).join(", ");return c&&React.createElement("span",{className:"wc-block-components-shipping-address"},Object(s.sprintf)(Object(s.__)("Shipping to %s","woo-gutenberg-products-block"),c)+" ")},k=n(27),_=n(119),R=n(146),P=function(e){var t=e.hasRates,n=e.shippingRates,r=e.shippingRatesLoading,o=t?Object(s.__)("Shipping options","woo-gutenberg-products-block"):Object(s.__)("Choose a shipping option","woo-gutenberg-products-block");return React.createElement("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},React.createElement("legend",{className:"screen-reader-text"},o),React.createElement(R.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:React.createElement(_.a,{isDismissible:!1,className:u()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(s.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:n,shippingRatesLoading:r}))},C=function(e){return e.some((function(e){return e.shipping_rates.length}))},x=(n(170),function(e){var t=e.showCalculator,n=e.isShippingCalculatorOpen,r=e.setIsShippingCalculatorOpen,o=e.shippingAddress;return React.createElement(React.Fragment,null,React.createElement(S,{address:o}),t&&React.createElement(N,{label:Object(s.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:r}))}),I=function(e){var t=e.showCalculator,n=e.isShippingCalculatorOpen,r=e.setIsShippingCalculatorOpen;return t?React.createElement(N,{isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:r}):React.createElement("em",null,Object(s.__)("Calculated during checkout","woo-gutenberg-products-block"))},N=function(e){var t=e.label,n=void 0===t?Object(s.__)("Calculate","woo-gutenberg-products-block"):t,r=e.isShippingCalculatorOpen,o=e.setIsShippingCalculatorOpen;return React.createElement("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){o(!r)},"aria-expanded":r},n)};t.a=function(e){var t=e.currency,n=e.values,r=e.showCalculator,c=void 0===r||r,i=e.showRateSelector,d=void 0===i||i,m=e.className,b=Object(f.useState)(!1),h=a()(b,2),g=h[0],v=h[1],y=Object(p.a)(),j=y.shippingAddress,E=y.cartHasCalculatedShipping,w=y.shippingRates,S=y.shippingRatesLoading,_=l.k?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),R=C(w)||_,N={isShippingCalculatorOpen:g,setIsShippingCalculatorOpen:v};return React.createElement("div",{className:u()("wc-block-components-totals-shipping",m)},React.createElement(k.TotalsItem,{label:Object(s.__)("Shipping","woo-gutenberg-products-block"),value:E?_:React.createElement(I,o()({showCalculator:c},N)),description:React.createElement(React.Fragment,null,E&&React.createElement(x,o()({shippingAddress:j,showCalculator:c},N))),currency:t}),c&&g&&React.createElement(O,{onUpdate:function(){v(!1)}}),d&&E&&React.createElement(P,{hasRates:R,shippingRates:w,shippingRatesLoading:S}))}},,function(e,t,n){"use strict";var r=n(11),o=n.n(r),c=n(7),a=n.n(c),i=n(5),u=n.n(i),s=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},l=function(e){var t=e.id,n=e.src,r=void 0===n?null:n,o=e.alt,c=void 0===o?"":o;return r?React.createElement("img",{className:s(t),src:r,alt:c}):null},f=n(9),p=[{id:"alipay",alt:"Alipay",src:f.C+"img/payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:f.C+"img/payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:f.C+"img/payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:f.C+"img/payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:f.C+"img/payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:f.C+"img/payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:f.C+"img/payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:f.C+"img/payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:f.C+"img/payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:f.C+"img/payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:f.C+"img/payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:f.C+"img/payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:f.C+"img/payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:f.C+"img/payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:f.C+"img/payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:f.C+"img/payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:f.C+"img/payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:f.C+"img/payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:f.C+"img/payment-methods/wechat.svg"}],d=n(28),m=n.n(d);n(177);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.a=function(e){var t=e.icons,n=void 0===t?[]:t,r=e.align,c=void 0===r?"center":r,a=function(e){var t={};return e.forEach((function(e){var n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"===m()(e)&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&!t[n.id]&&(t[n.id]=n)})),Object.values(t)}(n);if(0===a.length)return null;var i=u()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c});return React.createElement("div",{className:i},a.map((function(e){var t,n=h(h({},e),(t=e.id,p.find((function(e){return e.id===t}))||{}));return React.createElement(l,o()({key:"payment-method-icon-"+e.id},n))})))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return a}));var r=window.Event||null,o=function(e,t){var n=t.bubbles,o=void 0!==n&&n,c=t.cancelable,a=void 0!==c&&c,i=t.element;if(i||(i=document.body),"function"==typeof r){var u=new r(e,{bubbles:o,cancelable:a});i.dispatchEvent(u)}else{var s=document.createEvent("Event");s.initEvent(e,o,a),i.dispatchEvent(s)}},c=function(){o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var c=function(){o(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,c),function(){return jQuery(document).off(e,c)}}}]);
|
build/cart.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '43654b2739684652068a315e6bac4363');
|
build/cart.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.cart=function(e){function t(t){for(var n,a,i=t[0],s=t[1],u=t[2],p=0,d=[];p<i.length;p++)a=i[p],Object.prototype.hasOwnProperty.call(c,a)&&c[a]&&d.push(c[a][0]),c[a]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(l&&l(t);d.length;)d.shift()();return o.push.apply(o,u||[]),r()}function r(){for(var e,t=0;t<o.length;t++){for(var r=o[t],n=!0,i=1;i<r.length;i++){var s=r[i];0!==c[s]&&(n=!1)}n&&(o.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},c={20: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||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=s;return o.push([856,0]),r()}({0:function(e,t){!function(){e.exports=this.wp.element}()},1:function(e,t){!function(){e.exports=this.wp.i18n}()},120:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(8)),a=r.n(o),i=r(537);r(348);t.a=function(e){var t=e.children,r=e.className,o=e.screenReaderLabel,s=e.showSpinner,u=void 0!==s&&s,l=e.isLoading;return void 0===l||l?Object(n.createElement)("div",{className:a()(r,"wc-block-components-loading-mask")},u&&Object(n.createElement)(i.a,null),Object(n.createElement)("div",{className:"wc-block-components-loading-mask__children","aria-hidden":!0},t),Object(n.createElement)("span",{className:"screen-reader-text"},o||Object(c.__)("Loading…","woo-gutenberg-products-block"))):t}},121:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(0),c=r(21),o=Object(n.createContext)({isEditor:!1,currentPostId:0,previewData:{}}),a=function(){return Object(n.useContext)(o)},i=function(e){var t=e.children,r=e.currentPostId,a=void 0===r?0:r,i=e.previewData,s=void 0===i?{}:i,u={isEditor:!0,currentPostId:Object(c.useSelect)((function(e){return a||e("core/editor").getCurrentPostId()}),[a]),previewData:s};return Object(n.createElement)(o.Provider,{value:u},t)}},13:function(e,t){!function(){e.exports=this.regeneratorRuntime}()},134:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(5),c=r.n(n),o=r(177),a=r(0);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=function(){var e=Object(o.b)(),t=e.notices,r=e.createNotice,n=e.removeNotice,c=e.createSnackbarNotice,i=e.setIsSuppressed,u=Object(a.useRef)(t);Object(a.useEffect)((function(){u.current=t}),[t]);var l=Object(a.useMemo)((function(){return{hasNoticesOfType:function(e){return u.current.some((function(t){return t.type===e}))},removeNotices:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;u.current.forEach((function(t){null!==e&&t.status!==e||n(t.id)}))},removeNotice:n}}),[n]),p=Object(a.useMemo)((function(){return{addDefaultNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("default",e,s({},t))},addErrorNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("error",e,s({},t))},addWarningNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("warning",e,s({},t))},addInfoNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("info",e,s({},t))},addSuccessNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r("success",e,s({},t))},addSnackbarNotice:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(e,t)}}}),[r,c]);return s(s(s({notices:t},l),p),{},{setIsSuppressed:i})}},135:function(e,t){!function(){e.exports=this.wp.wordcount}()},137:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(15),a=r.n(o),i=r(12),s=r.n(i),u=r(16),l=r.n(u),p=r(17),d=r.n(p),b=r(10),m=r.n(b),f=r(5),g=r.n(f),O=r(0),h=(r(2),r(9)),j=r(1),v=r(6),y=function(e){var t=e.imageUrl,r=void 0===t?"".concat(v.S,"img/block-error.svg"):t,n=e.header,c=void 0===n?Object(j.__)("Oops!","woo-gutenberg-products-block"):n,o=e.text,a=void 0===o?Object(j.__)("There was an error loading the content.","woo-gutenberg-products-block"):o,i=e.errorMessage,s=e.errorMessagePrefix,u=void 0===s?Object(j.__)("Error:","woo-gutenberg-products-block"):s;return Object(O.createElement)("div",{className:"wc-block-error wc-block-components-error"},r&&Object(O.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),Object(O.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(O.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),a&&Object(O.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},a),i&&Object(O.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},u?u+" ":"",i)))};r(242);function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=m()(e);if(t){var c=m()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return d()(this,r)}}var E=function(e){l()(r,e);var t=_(r);function r(){var e;c()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),g()(s()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(r,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,c=e.text,o=e.errorMessagePrefix,a=e.renderError,i=this.state,s=i.errorMessage;return i.hasError?"function"==typeof a?a({errorMessage:s}):Object(O.createElement)(y,{errorMessage:n?s:null,header:t,imageUrl:r,text:c,errorMessagePrefix:o}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(O.createElement)(O.Fragment,null,Object(O.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),r}(h.Component);E.defaultProps={showErrorMessage:!0};t.a=E},142:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(1),i=r(56),s=r(8),u=r.n(s),l=(r(2),r(149)),p=(r(215),function(e){var t=e.currency,r=e.maxPrice,n=e.minPrice,c=e.priceClassName,a=e.priceStyle;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",c),currency:t,value:n,style:a})," — ",Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",c),currency:t,value:r,style:a}))}),d=function(e){var t=e.currency,r=e.regularPriceClassName,n=e.regularPriceStyle,c=e.regularPrice,s=e.priceClassName,l=e.priceStyle,p=e.price;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:t,renderText:function(e){return Object(o.createElement)("del",{className:u()("wc-block-components-product-price__regular",r),style:n},e)},value:c}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(i.a,{currency:t,renderText:function(e){return Object(o.createElement)("ins",{className:u()("wc-block-components-product-price__value","is-discounted",s),style:l},e)},value:p}))};t.a=function(e){var t=e.align,r=e.className,n=e.currency,a=e.format,s=void 0===a?"<price/>":a,b=e.maxPrice,m=void 0===b?null:b,f=e.minPrice,g=void 0===f?null:f,O=e.price,h=void 0===O?null:O,j=e.priceClassName,v=e.priceStyle,y=e.regularPrice,_=e.regularPriceClassName,E=e.regularPriceStyle,w=u()(r,"price","wc-block-components-product-price",c()({},"wc-block-components-product-price--align-".concat(t),t));s.includes("<price/>")||(s="<price/>",console.error("Price formats need to include the `<price/>` tag."));var S=y&&h!==y,k=Object(o.createElement)("span",{className:u()("wc-block-components-product-price__value",j)});return S?k=Object(o.createElement)(d,{currency:n,price:h,priceClassName:j,priceStyle:v,regularPrice:y,regularPriceClassName:_,regularPriceStyle:E}):null!==g&&null!==m?k=Object(o.createElement)(p,{currency:n,maxPrice:m,minPrice:g,priceClassName:j,priceStyle:v}):null!==h&&(k=Object(o.createElement)(i.a,{className:u()("wc-block-components-product-price__value",j),currency:n,value:h,style:v})),Object(o.createElement)("span",{className:w},Object(l.a)(s,{price:k}))}},143:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return p}));var n=r(5),c=r.n(n),o=r(7);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var s="add_event_callback",u="remove_event_callback",l={addEventCallback:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:s,eventType:e,callback:t,priority:r}},removeEventCallback:function(e,t){return{id:t,type:u,eventType:e}}},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.eventType,o=t.id,a=t.callback,l=t.priority,p=new Map(e[n]);switch(r){case s:return p.set(o,{priority:l,callback:a}),i(i({},e),{},c()({},n,p));case u:return p.delete(o),i(i({},e),{},c()({},n,p))}return e}},145:function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var n=r(5),c=r.n(n),o=r(37),a=r(21),i=r(121),s=r(28),u=r(7);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},b=p(p({},d),{},{email:"",phone:""}),m=function(e){return Object(u.mapValues)(e,(function(e){return Object(s.decodeEntities)(e)}))},f={cartCoupons:[],cartItems:[],cartFees:[],cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:[],cartTotals:{},cartIsLoading:!0,cartErrors:[],billingAddress:b,shippingAddress:d,shippingRates:[],shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:[],receiveCart:function(){},extensions:{}},g=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0},t=Object(i.b)(),r=t.isEditor,n=t.previewData,c=(null==n?void 0:n.previewCart)||{},s=e.shouldSelect,u=Object(a.useSelect)((function(e,t){var n=t.dispatch;if(!s)return f;if(r)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:[],cartTotals:c.totals,cartIsLoading:!1,cartErrors:[],billingAddress:b,shippingAddress:d,extensions:{},shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:function(){}};var a=e(o.CART_STORE_KEY),i=a.getCartData(),u=a.getCartErrors(),l=a.getCartTotals(),p=!a.hasFinishedResolution("getCartData"),g=a.isCustomerDataUpdating(),O=n(o.CART_STORE_KEY).receiveCart,h=m(i.billingAddress),j=i.needsShipping?m(i.shippingAddress):h,v=i.fees.map((function(e){return m(e)}));return{cartCoupons:i.coupons,cartItems:i.items||[],cartFees:v,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors||[],cartTotals:l,cartIsLoading:p,cartErrors:u,billingAddress:h,shippingAddress:j,extensions:i.extensions||{},shippingRates:i.shippingRates||[],shippingRatesLoading:g,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements||[],receiveCart:O}}),[s]);return u}},146:function(e,t,r){"use strict";var n=r(0),c=r(8),o=r.n(c);r(2),r(351);t.a=function(e){var t=e.children,r=e.className;return Object(n.createElement)("div",{className:o()("wc-block-components-product-badge",r)},t)}},158:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},159:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(8),u=r.n(s);r(2),r(349);t.a=function(e){var t=e.children,r=e.className,n=e.headingLevel,o=a()(e,["children","className","headingLevel"]),s=u()("wc-block-components-title",r),l="h".concat(n);return Object(i.createElement)(l,c()({className:s},o),t)}},160:function(e,t,r){"use strict";var n=r(1),c={first_name:{label:Object(n.__)("First name","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("First name (optional)","woo-gutenberg-products-block"),autocomplete:"given-name",autocapitalize:"sentences",required:!0,hidden:!1,index:10},last_name:{label:Object(n.__)("Last name","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Last name (optional)","woo-gutenberg-products-block"),autocomplete:"family-name",autocapitalize:"sentences",required:!0,hidden:!1,index:20},company:{label:Object(n.__)("Company","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Company (optional)","woo-gutenberg-products-block"),autocomplete:"organization",autocapitalize:"sentences",required:!1,hidden:!1,index:30},address_1:{label:Object(n.__)("Address","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Address (optional)","woo-gutenberg-products-block"),autocomplete:"address-line1",autocapitalize:"sentences",required:!0,hidden:!1,index:40},address_2:{label:Object(n.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Apartment, suite, etc. (optional)","woo-gutenberg-products-block"),autocomplete:"address-line2",autocapitalize:"sentences",required:!1,hidden:!1,index:50},country:{label:Object(n.__)("Country/Region","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Country/Region (optional)","woo-gutenberg-products-block"),autocomplete:"country",required:!0,hidden:!1,index:60},city:{label:Object(n.__)("City","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("City (optional)","woo-gutenberg-products-block"),autocomplete:"address-level2",autocapitalize:"sentences",required:!0,hidden:!1,index:70},state:{label:Object(n.__)("State/County","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("State/County (optional)","woo-gutenberg-products-block"),autocomplete:"address-level1",autocapitalize:"sentences",required:!0,hidden:!1,index:80},postcode:{label:Object(n.__)("Postal code","woo-gutenberg-products-block"),optionalLabel:Object(n.__)("Postal code (optional)","woo-gutenberg-products-block"),autocomplete:"postal-code",autocapitalize:"characters",required:!0,hidden:!1,index:90}};t.a=c},168:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=(r(2),r(28)),u=r(8),l=r.n(u);r(214);t.a=function(e){var t=e.className,r=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,u=e.name,p=e.permalink,d=void 0===p?"":p,b=a()(e,["className","disabled","name","permalink"]),m=l()("wc-block-components-product-name",r);return o?Object(i.createElement)("span",c()({className:m},b),Object(s.decodeEntities)(u)):Object(i.createElement)("a",c()({className:m,href:d},b),Object(s.decodeEntities)(u))}},169:function(e,t,r){"use strict";var n=r(0),c=r(135),o=r(89),a=function(e){var t=e.indexOf("</p>");return-1===t?e:e.substr(0,t+4)},i=function(e){return e.replace(/<\/?[a-z][^>]*?>/gi,"")},s=function(e,t){return e.replace(/[\s|\.\,]+$/i,"")+t},u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…",n=i(e),c=n.split(" ").splice(0,t).join(" ");return Object(o.autop)(s(c,r))},l=function(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…",c=i(e),a=c.slice(0,t);if(r)return Object(o.autop)(s(a,n));var u=a.match(/([\s]+)/g),l=u?u.length:0,p=c.slice(0,t+l);return Object(o.autop)(s(p,n))};t.a=function(e){var t=e.source,r=e.maxLength,i=void 0===r?15:r,s=e.countType,p=void 0===s?"words":s,d=e.className,b=void 0===d?"":d,m=Object(n.useMemo)((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words",n=Object(o.autop)(e),i=Object(c.count)(n,r);if(i<=t)return n;var s=a(n),p=Object(c.count)(s,r);return p<=t?s:"words"===r?u(s,t):l(s,t,"characters_including_spaces"===r)}(t,i,p)}),[t,i,p]);return Object(n.createElement)(n.RawHTML,{className:b},m)}},173:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(14),a=r.n(o),i=r(15),s=r.n(i),u=r(12),l=r.n(u),p=r(16),d=r.n(p),b=r(17),m=r.n(b),f=r(10),g=r.n(f),O=r(5),h=r.n(O),j=r(0),v=r(9);r(240);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g()(e);if(t){var c=g()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return m()(this,r)}}t.a=function(e){var t=function(t){d()(n,t);var r=y(n);function n(){var e;return a()(this,n),e=r.call(this),h()(l()(e),"scrollToTopIfNeeded",(function(){var t=e.scrollPointRef.current.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollPointRef.current.scrollIntoView()})),h()(l()(e),"moveFocusToTop",(function(t){var r=e.scrollPointRef.current.parentElement.querySelectorAll(t);r.length&&r[0].focus()})),h()(l()(e),"scrollToTop",(function(t){window&&Number.isFinite(window.innerHeight)&&(e.scrollToTopIfNeeded(),t&&t.focusableSelector&&e.moveFocusToTop(t.focusableSelector))})),e.scrollPointRef=Object(v.createRef)(),e}return s()(n,[{key:"render",value:function(){return Object(j.createElement)(j.Fragment,null,Object(j.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:this.scrollPointRef,"aria-hidden":!0}),Object(j.createElement)(e,c()({},this.props,{scrollToTop:this.scrollToTop})))}}]),n}(v.Component);return t.displayName="withScrollToTop",t}},177:function(e,t,r){"use strict";r.d(t,"b",(function(){return O})),r.d(t,"a",(function(){return h}));var n=r(5),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=(r(2),r(21)),u=r(279),l=r(931),p=r(134),d=r(121),b=function(){var e=Object(d.b)().isEditor,t=Object(p.a)(),r=t.notices,n=t.removeNotice;if(e)return null;var c=r.filter((function(e){return"snackbar"===e.type}));return Object(i.createElement)(l.a,{notices:c,className:"wc-block-components-notices__snackbar",onRemove:n})};function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var g=Object(i.createContext)({notices:[],createNotice:function(e,t,r){},createSnackbarNotice:function(e,t){},removeNotice:function(e,t){},setIsSuppressed:function(e){},context:"wc/core"}),O=function(){return Object(i.useContext)(g)},h=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,c=e.createNoticeContainer,o=void 0===c||c,l=e.context,p=void 0===l?"wc/core":l,d=Object(s.useDispatch)("core/notices"),m=d.createNotice,O=d.removeNotice,h=Object(i.useState)(!1),j=a()(h,2),v=j[0],y=j[1],_=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m(e,t,f(f({},r),{},{context:r.context||p}))}),[m,p]),E=Object(i.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;O(e,t)}),[O,p]),w=Object(i.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};_("default",e,f(f({},t),{},{type:"snackbar"}))}),[_]),S={notices:Object(s.useSelect)((function(e){return{notices:e("core/notices").getNotices(p)}}),[p]).notices,createNotice:_,createSnackbarNotice:w,removeNotice:E,context:p,setIsSuppressed:y},k=v?null:Object(i.createElement)(u.a,{className:n,notices:S.notices}),P=v?null:Object(i.createElement)(b,null);return Object(i.createElement)(g.Provider,{value:S},o&&k,t,P)}},180:function(e,t){},19:function(e,t){!function(){e.exports=this.wp.apiFetch}()},190:function(e,t){},191:function(e,t){!function(){e.exports=this.wp.warning}()},192:function(e,t,r){"use strict";var n=r(14),c=r.n(n),o=r(15),a=r.n(o),i=r(12),s=r.n(i),u=r(16),l=r.n(u),p=r(17),d=r.n(p),b=r(10),m=r.n(b),f=r(5),g=r.n(f),O=r(0),h=r(1),j=r(9),v=r(279),y=(r(2),r(6));function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=m()(e);if(t){var c=m()(this).constructor;r=Reflect.construct(n,arguments,c)}else r=n.apply(this,arguments);return d()(this,r)}}var E=function(e){l()(r,e);var t=_(r);function r(){var e;c()(this,r);for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return e=t.call.apply(t,[this].concat(o)),g()(s()(e),"state",{errorMessage:"",hasError:!1}),e}return a()(r,[{key:"render",value:function(){var e=this.state,t=e.hasError,r=e.errorMessage,n=this.props.isEditor;if(t){var c=Object(h.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(n||y.l)&&(c=r||Object(h.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));var o=[{id:"0",content:c,isDismissible:!1,status:"error"}];return Object(O.createElement)(v.a,{notices:o})}return this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{errorMessage:e.message,hasError:!0}}}]),r}(j.Component);E.defaultProps={isEditor:!1},t.a=E},20:function(e,t){!function(){e.exports=this.wp.url}()},208:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=function(e,t){return!!e.type&&e.type===t},c={SUCCESS:"success",FAIL:"failure",ERROR:"error"},o={PAYMENTS:"wc/payment-area",EXPRESS_PAYMENTS:"wc/express-payment-area"},a=function(e){return n(e,c.SUCCESS)},i=function(e){return n(e,c.ERROR)},s=function(e){return n(e,c.FAIL)},u=function(e){return void 0===e.retry||!0===e.retry},l=function(){return{responseTypes:c,noticeContexts:o,shouldRetry:u,isSuccessResponse:a,isErrorResponse:i,isFailResponse:s}}},21:function(e,t){!function(){e.exports=this.wp.data}()},214:function(e,t){},215:function(e,t){},216:function(e,t){},217:function(e,t){},218:function(e,t){},22:function(e,t){!function(){e.exports=this.wp.blockEditor}()},23:function(e,t){!function(){e.exports=this.wp.blocks}()},240:function(e,t){},242:function(e,t){},243:function(e,t){},244:function(e,t){},245:function(e,t){},246:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=void 0===r?20:r,o=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},o),Object(i.createElement)("path",{d:"M5 6l5 5 5-5 2 1-7 7-7-7z"}))}),null),l=r(261);t.a=function(e){let t;switch(e.icon){case"arrow-down-alt2":t=u;break;case"no-alt":t=l.a}return t?Object(i.cloneElement)(t,{size:e.size||20,className:e.className}):null}},250:function(e,t,r){"use strict";var n=r(30),c=r.n(n),o=r(0),a=r(1),i=r(4),s=r(21),u=r(36);t.a=function(e){var t=e.setPageId,r=e.pageId,n=e.labels,l=Object(s.useSelect)((function(e){return e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100})}),[])||null;return l?Object(o.createElement)(i.PanelBody,{title:n.title},Object(o.createElement)(i.SelectControl,{label:Object(a.__)("Link to","woo-gutenberg-products-block"),value:r,options:[{label:n.default,value:0}].concat(c()(l.map((function(e){return{label:Object(u.a)(e,l),value:parseInt(e.id,10)}})))),onChange:function(e){return t(parseInt(e,10))}})):null}},251:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),c=r(1),o=(r(2),r(55)),a=r(284),i=r(158),s=(r(347),function(e){var t=e.text,r=e.url,s=void 0===r?"https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565":r;return Object(n.createElement)("div",{className:"wc-block-feedback-prompt"},Object(n.createElement)(o.a,{srcElement:a.a}),Object(n.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(c.__)("Feedback?","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(n.createElement)("a",{href:s,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(c.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(n.createElement)(o.a,{srcElement:i.a,size:16})))}),u=function(){return Object(n.createElement)(s,{text:Object(c.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woo-gutenberg-products-block"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"})}},252:function(e,t){!function(){e.exports=this.wp.plugins}()},253:function(e,t,r){"use strict";var n=r(24),c=r.n(n),o=r(0),a=r(1),i=(r(2),r(71)),s=r(120),u=r(42),l=r(257),p=function(e){var t=e.packages,r=e.collapse,n=e.showItems,a=e.collapsible,i=e.noResultsMessage,s=e.renderOption;return t.length?t.map((function(e){var t=e.package_id,l=c()(e,["package_id"]);return Object(o.createElement)(u.ShippingRatesControlPackage,{key:t,packageId:t,packageData:l,collapsible:a,collapse:r,showItems:n,noResultsMessage:i,renderOption:s})})):null};t.a=function(e){var t=e.shippingRates,r=e.shippingRatesLoading,n=e.className,c=e.collapsible,d=void 0!==c&&c,b=e.noResultsMessage,m=e.renderOption;return Object(o.useEffect)((function(){if(!r){var e=Object(l.a)(t),n=Object(l.b)(t);1===e?Object(i.speak)(Object(a.sprintf)(Object(a._n)("%d shipping option was found.","%d shipping options were found.",n,"woo-gutenberg-products-block"),n)):Object(i.speak)(Object(a.sprintf)(Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)(Object(a._n)("%d shipping option was found","%d shipping options were found",n,"woo-gutenberg-products-block"),n))}}),[r,t]),Object(o.createElement)(s.a,{isLoading:r,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},Object(o.createElement)(u.ExperimentalOrderShippingPackages.Slot,{className:n,collapsible:d,noResultsMessage:b,renderOption:m}),Object(o.createElement)(u.ExperimentalOrderShippingPackages,null,Object(o.createElement)(p,{packages:t,noResultsMessage:b,renderOption:m})))}},254:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(372),i=r(371),s=r(121),u=r(258),l=r(192);function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(){var e=Object(s.b)().isEditor,t=Object(u.b)(),r=t.setActivePaymentMethod,n=t.activePaymentMethod,c=t.paymentMethodData,p=t.setPaymentStatus,b=Object(a.a)(),m=Object(i.a)().paymentMethods,f=Object(o.useRef)(n),g=Object(o.useRef)(c),O=Object(o.useCallback)((function(e){return function(){f.current=n,g.current=c,p().started(),r(e)}}),[n,c,r,p]),h=Object(o.useCallback)((function(){r(f.current),g.current.isSavedToken&&p().success(g.current)}),[r,p]),j=Object.keys(m),v=j.length>0?j.map((function(t){var r=e?m[t].edit:m[t].content;return Object(o.isValidElement)(r)?Object(o.createElement)("li",{key:t,id:"express-payment-method-".concat(t)},Object(o.cloneElement)(r,d(d({},b),{},{onClick:O(t),onClose:h}))):null})):Object(o.createElement)("li",{key:"noneRegistered"},"No registered Payment Methods");return Object(o.createElement)(l.a,{isEditor:e},Object(o.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},v))}},255:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=(r(2),r(8)),u=r.n(s),l=r(1),p=r(55),d=r(261),b=(r(190),function(e){var t=e.text,r=e.screenReaderText,n=void 0===r?"":r,o=e.element,s=void 0===o?"li":o,l=e.className,p=void 0===l?"":l,d=e.radius,b=void 0===d?"small":d,m=e.children,f=void 0===m?null:m,g=a()(e,["text","screenReaderText","element","className","radius","children"]),O=s,h=u()(p,"wc-block-components-chip","wc-block-components-chip--radius-"+b),j=Boolean(n&&n!==t);return Object(i.createElement)(O,c()({className:h},g),Object(i.createElement)("span",{"aria-hidden":j,className:"wc-block-components-chip__text"},t),j&&Object(i.createElement)("span",{className:"screen-reader-text"},n),f)});t.a=function(e){var t=e.ariaLabel,r=void 0===t?"":t,n=e.className,o=void 0===n?"":n,s=e.disabled,m=void 0!==s&&s,f=e.onRemove,g=void 0===f?function(){}:f,O=e.removeOnAnyClick,h=void 0!==O&&O,j=e.text,v=e.screenReaderText,y=void 0===v?"":v,_=a()(e,["ariaLabel","className","disabled","onRemove","removeOnAnyClick","text","screenReaderText"]),E=h?"span":"button";if(!r){var w=y&&"string"==typeof y?y:j;r="string"!=typeof w?Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)(Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),w)}var S={"aria-label":r,disabled:m,onClick:g,onKeyDown:function(e){"Backspace"!==e.key&&"Delete"!==e.key||g()}},k=h?S:{},P=h?{"aria-hidden":!0}:S;return Object(i.createElement)(b,c()({},_,k,{className:u()(o,"is-removable"),element:h?"button":_.element,screenReaderText:y,text:j}),Object(i.createElement)(E,c()({className:"wc-block-components-chip__remove"},P),Object(i.createElement)(p.a,{className:"wc-block-components-chip__remove-icon",srcElement:d.a,size:16})))}},257:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var n=function(e){return e.length},c=function(e){return e.reduce((function(e,t){return e+t.shipping_rates.length}),0)}},258:function(e,t,r){"use strict";r.d(t,"b",(function(){return je})),r.d(t,"a",(function(){return ve}));var n=r(30),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=r(3),u=r(208),l=r(134),p=r(5),d=r.n(p);function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){d()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f={PRISTINE:"pristine",STARTED:"started",PROCESSING:"processing",ERROR:"has_error",FAILED:"failed",SUCCESS:"success",COMPLETE:"complete"},g=m(m({},f),{},{SET_REGISTERED_PAYMENT_METHODS:"set_registered_payment_methods",SET_REGISTERED_EXPRESS_PAYMENT_METHODS:"set_registered_express_payment_methods",SET_SHOULD_SAVE_PAYMENT_METHOD:"set_should_save_payment_method"}),O={currentStatus:f.PRISTINE,shouldSavePaymentMethod:!1,paymentMethodData:{payment_method:""},hasSavedToken:!1,errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},h={setPaymentStatus:function(){return{started:function(){},processing:function(){},completed:function(){},error:function(e){},failed:function(e,t){},success:function(e,t){}}},currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1},paymentStatuses:f,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",setActivePaymentMethod:function(){},activeSavedToken:"",setActiveSavedToken:function(){},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:function(){},onPaymentSuccess:function(){},onPaymentFail:function(){}},j=r(46),v=r.n(j);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){d()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=g.STARTED,w=g.ERROR,S=g.FAILED,k=g.SUCCESS,P=g.PROCESSING,N=g.PRISTINE,C=g.COMPLETE,M=g.SET_REGISTERED_PAYMENT_METHODS,I=g.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,D=g.SET_SHOULD_SAVE_PAYMENT_METHOD,x=function(e){return!("object"!==v()(e)||!e.isSavedToken)},R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,t=arguments.length>1?arguments[1]:void 0,r=t.type,n=t.paymentMethodData,c=t.shouldSavePaymentMethod,o=t.errorMessage,a=t.paymentMethods;switch(r){case E:return e.currentStatus!==E?_(_({},e),{},{currentStatus:E}):e;case w:return e.currentStatus!==w?_(_({},e),{},{currentStatus:w,errorMessage:o||e.errorMessage}):e;case S:return e.currentStatus!==S?_(_({},e),{},{currentStatus:S,paymentMethodData:n||e.paymentMethodData,errorMessage:o||e.errorMessage}):e;case k:return e.currentStatus!==k?_(_({},e),{},{currentStatus:k,paymentMethodData:n||e.paymentMethodData,hasSavedToken:x(n)}):e;case P:return e.currentStatus!==P?_(_({},e),{},{currentStatus:P,errorMessage:""}):e;case C:return e.currentStatus!==C?_(_({},e),{},{currentStatus:C}):e;case N:return _(_({},O),{},{currentStatus:N,paymentMethods:_({},e.paymentMethods),expressPaymentMethods:_({},e.expressPaymentMethods),shouldSavePaymentMethod:e.shouldSavePaymentMethod});case M:return _(_({},e),{},{paymentMethods:a});case I:return _(_({},e),{},{expressPaymentMethods:a});case D:return _(_({},e),{},{shouldSavePaymentMethod:c})}return e},T=g.ERROR,A=g.FAILED,L=g.SUCCESS,z=g.SET_REGISTERED_PAYMENT_METHODS,U=g.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,V=g.SET_SHOULD_SAVE_PAYMENT_METHOD,F=function(e){return{type:e}},q=function(e){var t=e.errorMessage,r=e.paymentMethodData;return{type:A,errorMessage:t,paymentMethodData:r}},B=function(e){var t=e.paymentMethodData;return{type:L,paymentMethodData:t}},Y=r(13),H=r.n(Y),G=r(27),Q=r.n(G),W=r(1),$=r(51),K=r(53),X=r(145),J=r(6),Z=r(121),ee=r(97);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){d()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=function(e,t,r,n){var c=Object(i.useState)(!1),o=a()(c,2),s=o[0],u=o[1],p=Object(Z.b)().isEditor,b=Object(ee.b)(),m=b.selectedRates,f=b.shippingAddress,g=Object(K.a)(m),O=Object(K.a)(r),h=Object(X.a)(),j=h.cartTotals,v=h.cartNeedsShipping,y=h.paymentRequirements,_=Object(i.useRef)({cartTotals:j,cartNeedsShipping:v,shippingAddress:f,selectedShippingMethods:g,paymentRequirements:y}),E=Object(l.a)().addErrorNotice;Object(i.useEffect)((function(){_.current={cartTotals:j,cartNeedsShipping:v,shippingAddress:f,selectedShippingMethods:g,paymentRequirements:y}}),[j,v,f,g,y]);var w=Object(i.useCallback)(Q()(H.a.mark((function r(){var c,o,a,i,s,l,b;return H.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:c={},o=function(e){c=re(re({},c),{},d()({},e.name,e))},a=0;case 3:if(!(a<O.length)){r.next=24;break}if(i=O[a],s=t[i]){r.next=8;break}return r.abrupt("continue",21);case 8:return r.prev=8,r.next=11,Promise.resolve(s.canMakePayment(_.current));case 11:if(!(l=r.sent)){r.next=16;break}if(!l.error){r.next=15;break}throw new Error(l.error.message);case 15:o(s);case 16:r.next=21;break;case 18:r.prev=18,r.t0=r.catch(8),(J.l||p)&&(b=Object(W.sprintf)(Object(W.__)("There was an error registering the payment method with id '%s': ","woo-gutenberg-products-block"),s.paymentMethodId),E("".concat(b," ").concat(r.t0),{context:n,id:"wc-".concat(s.paymentMethodId,"-registration-error")}));case 21:a++,r.next=3;break;case 24:e(c),u(!0);case 26:case"end":return r.stop()}}),r,null,[[8,18]])}))),[E,e,p,n,O,t]);return Object(i.useEffect)((function(){w()}),[w,j,g,y]),s},ce=r(99),oe=r(98),ae=r(143),ie=r(381),se="payment_processing",ue=r(382),le=r(88),pe=f.STARTED,de=f.PROCESSING,be=f.COMPLETE,me=f.PRISTINE,fe=f.ERROR,ge=f.FAILED,Oe=f.SUCCESS,he=Object(i.createContext)(h),je=function(){return Object(i.useContext)(he)},ve=function(e){var t=e.children,r=Object(ce.b)().setBillingData,n=Object(oe.b)(),o=n.isProcessing,p=n.isIdle,d=n.isCalculating,b=n.hasError,m=Object(u.a)(),g=m.isSuccessResponse,h=m.isErrorResponse,j=m.isFailResponse,v=m.noticeContexts,y=Object(i.useState)(""),_=a()(y,2),E=_[0],w=_[1],S=Object(i.useState)(""),k=a()(S,2),P=k[0],N=k[1],C=Object(i.useReducer)(ae.b,{}),M=a()(C,2),I=M[0],D=M[1],x=Object(i.useRef)(I),A=Object(Z.b)(),L=A.isEditor,Y=A.previewData,H=Object(i.useReducer)(R,O),G=a()(H,2),Q=G[0],W=G[1],K=Object(i.useCallback)((function(e){w(e),W(F(me))}),[w,W]),X=Object(i.useCallback)((function(e){W(function(e){return{type:z,paymentMethods:e}}(e))}),[W]),te=Object(i.useCallback)((function(e){W(function(e){return{type:U,paymentMethods:e}}(e))}),[W]),re=function(e){var t=Object($.getPaymentMethods)(),r=Object(u.a)().noticeContexts,n=new Set([].concat(c()(J.D),c()(Object.keys(t))));return ne(e,t,Array.from(n),r.PAYMENTS)}(X),je=function(e){var t=Object($.getExpressPaymentMethods)(),r=Object(u.a)().noticeContexts;return ne(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)}(te),ve=Object(le.b)().setValidationErrors,ye=Object(l.a)(),_e=ye.addErrorNotice,Ee=ye.removeNotice,we=Object(ee.b)().setShippingAddress,Se=Object(i.useCallback)((function(e){W({type:V,shouldSavePaymentMethod:e})}),[W]),ke=Object(i.useMemo)((function(){return L&&Y.previewSavedPaymentMethods?Y.previewSavedPaymentMethods:re&&0!==Object.keys(Q.paymentMethods).length?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(s.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach((function(r){var c=t[r].filter((function(t){var r,n=t.method.gateway;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)}));c.length&&(n[r]=c)})),n}(Q.paymentMethods):{}}),[L,Y.previewSavedPaymentMethods,re,Q.paymentMethods]),Pe=Object(i.useCallback)((function(e){e?_e(e,{id:"wc-express-payment-error",context:v.EXPRESS_PAYMENTS}):Ee("wc-express-payment-error",v.EXPRESS_PAYMENTS)}),[_e,v.EXPRESS_PAYMENTS,Ee]);Object(i.useEffect)((function(){x.current=I}),[I]);var Ne=Object(i.useMemo)((function(){return(e=D,{onPaymentProcessing:Object(ie.a)(se,e)}).onPaymentProcessing;var e}),[D]),Ce=Object(i.useMemo)((function(){return{isPristine:Q.currentStatus===me,isStarted:Q.currentStatus===pe,isProcessing:Q.currentStatus===de,isFinished:[fe,ge,Oe].includes(Q.currentStatus),hasError:Q.currentStatus===fe,hasFailed:Q.currentStatus===ge,isSuccessful:Q.currentStatus===Oe}}),[Q.currentStatus]),Me=Object(i.useCallback)((function(){return{started:function(){return W(F(pe))},processing:function(){return W(F(de))},completed:function(){return W(F(be))},error:function(e){return W(function(e){return{type:T,errorMessage:e}}(e))},failed:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;n&&r(n),W(q({errorMessage:e,paymentMethodData:t}))},success:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;t&&r(t),null!==n&&null!=n&&n.address&&we(n.address),W(B({paymentMethodData:e}))}}}),[W,r,we]);Object(i.useEffect)((function(){!o||b||d||Ce.isFinished||Me().processing()}),[o,b,d,Ce.isFinished,Me]),Object(i.useEffect)((function(){p&&!Ce.isSuccessful&&W(F(me))}),[p,Ce.isSuccessful]),Object(i.useEffect)((function(){b&&Ce.isSuccessful&&!Q.hasSavedToken&&W(F(me))}),[b,Ce.isSuccessful,Q.hasSavedToken]),Object(i.useEffect)((function(){var e=Object.keys(Q.paymentMethods),t=[].concat(c()(e),c()(Object.keys(Q.expressPaymentMethods)));re&&e.length&&w((function(e){return e&&t.includes(e)?e:(W(F(me)),Object.keys(Q.paymentMethods)[0])}))}),[re,Q.paymentMethods,Q.expressPaymentMethods,w]),Object(i.useEffect)((function(){Ce.isProcessing&&(Ee("wc-payment-error",v.PAYMENTS),Object(ue.b)(x.current,se,{}).then((function(e){var t,r,n;if(g(e))Me().success(null==e||null===(t=e.meta)||void 0===t?void 0:t.paymentMethodData,null==e||null===(r=e.meta)||void 0===r?void 0:r.billingData,null==e||null===(n=e.meta)||void 0===n?void 0:n.shippingData);else if(j(e)){var c,o;e.message&&e.message.length&&_e(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||v.PAYMENTS}),Me().failed(null==e?void 0:e.message,null==e||null===(c=e.meta)||void 0===c?void 0:c.paymentMethodData,null==e||null===(o=e.meta)||void 0===o?void 0:o.billingData)}else h(e)?(e.message&&e.message.length&&_e(e.message,{id:"wc-payment-error",isDismissible:!1,context:(null==e?void 0:e.messageContext)||v.PAYMENTS}),Me().error(e.message),ve(null==e?void 0:e.validationErrors)):Me().success()})))}),[Ce.isProcessing,ve,Me,Ee,v.PAYMENTS,g,j,h,_e]);var Ie={setPaymentStatus:Me,currentStatus:Ce,paymentStatuses:f,paymentMethodData:Q.paymentMethodData,errorMessage:Q.errorMessage,activePaymentMethod:E,setActivePaymentMethod:K,activeSavedToken:P,setActiveSavedToken:N,onPaymentProcessing:Ne,customerPaymentMethods:ke,paymentMethods:Q.paymentMethods,expressPaymentMethods:Q.expressPaymentMethods,paymentMethodsInitialized:re,expressPaymentMethodsInitialized:je,setExpressPaymentError:Pe,shouldSavePayment:Q.shouldSavePaymentMethod,setShouldSavePayment:Se};return Object(i.createElement)(he.Provider,{value:Ie},t)}},261:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(31),u=Object(i.createElement)((function(e){var t=e.className,r=e.size,n=a()(e,["className","size"]);return Object(i.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))}),null);t.a=u},279:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(0),a=(r(2),r(8)),i=r.n(a),s=r(375),u=r(177),l=(r(216),function(e){var t=e.status;switch(void 0===t?"default":t){case"error":return"woocommerce-error";case"success":return"woocommerce-success";case"info":case"warning":return"woocommerce-info"}return""});t.a=function(e){var t=e.className,r=e.notices,n=Object(u.b)().removeNotice,a=r.filter((function(e){return"snackbar"!==e.type}));if(!a.length)return null;var p=i()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:p},a.map((function(e){return Object(o.createElement)(s.a,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice","woocommerce-message",l(e)),onRemove:function(){e.isDismissible&&n(e.id)}}),e.content)})))}},28:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},280:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0),c=r(88),o=(r(2),r(218),function(e){var t=e.errorMessage,r=void 0===t?"":t,o=e.propertyName,a=void 0===o?"":o,i=e.elementId,s=void 0===i?"":i,u=Object(c.b)(),l=u.getValidationError,p=u.getValidationErrorId;if(!r){var d=l(a)||{};if(!d.message||d.hidden)return null;r=d.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:p(s)},r))})},284:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=o},3:function(e,t){!function(){e.exports=this.wc.wcSettings}()},31:function(e,t){!function(){e.exports=this.wp.primitives}()},33:function(e,t){!function(){e.exports=this.wp.isShallowEqual}()},345:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},347:function(e,t){},348:function(e,t){},349:function(e,t){},350:function(e,t){},351:function(e,t){},352:function(e,t){},353:function(e,t){},354:function(e,t){},355:function(e,t){},356:function(e,t){},357:function(e,t){},358:function(e,t){},359:function(e,t){},36:function(e,t,r){"use strict";r.d(t,"h",(function(){return d})),r.d(t,"e",(function(){return b})),r.d(t,"b",(function(){return m})),r.d(t,"i",(function(){return f})),r.d(t,"f",(function(){return g})),r.d(t,"c",(function(){return O})),r.d(t,"d",(function(){return h})),r.d(t,"g",(function(){return j})),r.d(t,"a",(function(){return v}));var n=r(5),c=r.n(n),o=r(20),a=r(19),i=r.n(a),s=r(7),u=r(6);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var d=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,l=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=void 0===n?"":n,a=e.queryArgs,i=void 0===a?[]:a,s={per_page:u.u?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},l=[Object(o.addQueryArgs)("/wc/store/products",p(p({},s),i))];return u.u&&r.length&&l.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:r})),l}({selected:r,search:c,queryArgs:void 0===a?[]:a});return Promise.all(l.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id").map((function(e){return p(p({},e),{},{parent:0})}))})).catch((function(e){throw e}))},b=function(e){return i()({path:"/wc/store/products/".concat(e)})},m=function(){return i()({path:"wc/store/products/attributes"})},f=function(e){return i()({path:"wc/store/products/attributes/".concat(e,"/terms")})},g=function(e){var t=e.selected,r=function(e){var t=e.selected,r=void 0===t?[]:t,n=e.search,c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:u.w?100:0,orderby:u.w?"count":"name",order:u.w?"desc":"asc",search:n})];return u.w&&r.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:r})),c}({selected:void 0===t?[]:t,search:e.search});return Promise.all(r.map((function(e){return i()({path:e})}))).then((function(e){return Object(s.uniqBy)(Object(s.flatten)(e),"id")}))},O=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products/categories",p({per_page:0},e))})},h=function(e){return i()({path:"wc/store/products/categories/".concat(e)})},j=function(e){return i()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})})},v=function(e,t){if(!e.title.raw)return e.slug;var r=1===t.filter((function(t){return t.title.raw===e.title.raw})).length;return e.title.raw+(r?"":" - ".concat(e.slug))}},360:function(e,t){},361:function(e,t){},362:function(e,t){},363:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(0),a=r(28),i=r(6);r(2);t.a=function(e){var t=e.image,r=void 0===t?{}:t,n={src:r.thumbnail||i.E,alt:Object(a.decodeEntities)(r.alt)||""};return Object(o.createElement)("img",c()({},n,{alt:n.alt}))}},364:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(146);t.a=function(){return Object(n.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(c.__)("Available on backorder","woo-gutenberg-products-block"))}},365:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(2),r(146));t.a=function(e){var t=e.lowStockRemaining;return t?Object(n.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(c.sprintf)(Object(c.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},366:function(e,t,r){"use strict";r.d(t,"a",(function(){return P}));var n=r(0),c=r(252),o=r(6),a=r(137),i=r(42),s=r(258),u=r(97),l=r(99),p=r(98),d=r(5),b=r.n(d),m=r(18),f=r.n(m),g=r(1),O=r(19),h=r.n(O),j=r(145),v=r(134),y=r(38),_=function(e,t,r){var n=Object.keys(e).map((function(t){return{key:t,value:e[t]}}),[]),c="wc-".concat(r,"-new-payment-method");return n.push({key:c,value:t}),n},E=r(88);function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){b()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var k=function(){var e=Object(p.b)(),t=e.hasError,r=e.onCheckoutBeforeProcessing,c=e.dispatchActions,o=e.redirectUrl,a=e.isProcessing,i=e.isBeforeProcessing,d=e.isComplete,b=e.orderNotes,m=e.shouldCreateAccount,O=Object(E.b)().hasValidationErrors,w=Object(u.b)().shippingErrorStatus,k=Object(l.b)(),P=k.billingData,N=k.shippingAddress,C=Object(j.a)(),M=C.cartNeedsPayment,I=C.receiveCart,D=Object(s.b)(),x=D.activePaymentMethod,R=D.currentStatus,T=D.paymentMethodData,A=D.expressPaymentMethods,L=D.paymentMethods,z=D.shouldSavePayment,U=Object(v.a)(),V=U.addErrorNotice,F=U.removeNotice,q=U.setIsSuppressed,B=Object(n.useRef)(P),Y=Object(n.useRef)(N),H=Object(n.useRef)(o),G=Object(n.useState)(!1),Q=f()(G,2),W=Q[0],$=Q[1],K=Object.keys(A).includes(x),X=Object(n.useMemo)((function(){var e,t=S(S({},A),L);return null==t||null===(e=t[x])||void 0===e?void 0:e.paymentMethodId}),[x,A,L]),J=O&&!K||R.hasError||w.hasError;Object(n.useEffect)((function(){q(K)}),[K,q]),Object(n.useEffect)((function(){J===t||!a&&!i||K||c.setHasError(J)}),[J,t,a,i,K,c]);var Z=!t&&!J&&(R.isSuccessful||!M)&&a;Object(n.useEffect)((function(){B.current=P,Y.current=N,H.current=o}),[P,N,o]);var ee=Object(n.useCallback)((function(){return O?{errorMessage:Object(g.__)("Some input fields are invalid.","woo-gutenberg-products-block")}:R.hasError?{errorMessage:Object(g.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!w.hasError||{errorMessage:Object(g.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}}),[O,R.hasError,w.hasError]);Object(n.useEffect)((function(){var e;return K||(e=r(ee,0)),function(){K||e()}}),[r,ee,K]);var te=Object(n.useCallback)((function(){$(!0),F("checkout");var e={billing_address:B.current,shipping_address:Y.current,customer_note:b,should_create_account:m};M&&(e=S(S({},e),{},{payment_method:X,payment_data:_(T,z,x)})),h()({path:"/wc/store/checkout",method:"POST",data:e,cache:"no-store",parse:!1}).then((function(e){h.a.setNonce(e.headers),c.setCustomerId(e.headers.get("X-WC-Store-API-User")),e.json().then((function(t){e.ok||(V(Object(y.b)(t),{id:"checkout"}),c.setHasError()),c.setAfterProcessing(t),$(!1)}))})).catch((function(e){var t;h.a.setNonce(e.headers),null!==(t=e.headers)&&void 0!==t&&t.get("X-WC-Store-API-User")&&c.setCustomerId(e.headers.get("X-WC-Store-API-User")),e.json().then((function(e){var t,r,n;null!==(t=e.data)&&void 0!==t&&t.cart&&I(e.data.cart),V(Object(y.b)(e),{id:"checkout"}),null===(r=e.additional_errors)||void 0===r||null===(n=r.forEach)||void 0===n||n.call(r,(function(e){V(e.message,{id:e.error_code})})),c.setHasError(),c.setAfterProcessing(e),$(!1)}))}))}),[V,F,X,x,T,z,M,I,c,b,m]);return Object(n.useEffect)((function(){H.current&&(window.location.href=H.current)}),[d]),Object(n.useEffect)((function(){Z&&!W&&te()}),[te,Z,W]),null},P=function(e){var t=e.children,r=e.isCart,d=void 0!==r&&r,b=e.redirectUrl;return Object(n.createElement)(p.a,{redirectUrl:b,isCart:d},Object(n.createElement)(l.a,null,Object(n.createElement)(u.a,null,Object(n.createElement)(s.a,null,Object(n.createElement)(i.SlotFillProvider,null,t,Object(n.createElement)(a.a,{renderError:o.l?null:function(){return null}},Object(n.createElement)(c.PluginArea,null))),Object(n.createElement)(k,null)))))}},367:function(e,t,r){"use strict";var n=r(0),c=(r(2),r(7)),o=r(28),a=(r(353),function(e){var t=e.details,r=void 0===t?[]:t;return Array.isArray(r)?0===(r=r.filter((function(e){return!e.hidden}))).length?null:Object(n.createElement)("ul",{className:"wc-block-components-product-details"},r.map((function(e){var t=e.name?"wc-block-components-product-details__".concat(Object(c.kebabCase)(e.name)):"";return Object(n.createElement)("li",{key:e.name+(e.display||e.name),className:t},e.name&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(e.name),":")," "),Object(n.createElement)("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null}),i=r(169),s=r(3),u=function(e){var t=e.className,r=e.shortDescription,c=void 0===r?"":r,o=e.fullDescription,a=c||(void 0===o?"":o);return a?Object(n.createElement)(i.a,{className:t,source:a,maxLength:15,countType:Object(s.getSetting)("wordCountType","words")}):null};r(352),t.a=function(e){var t=e.shortDescription,r=void 0===t?"":t,c=e.fullDescription,o=void 0===c?"":c,i=e.itemData,s=void 0===i?[]:i,l=e.variation,p=void 0===l?[]:l;return Object(n.createElement)("div",{className:"wc-block-components-product-metadata"},Object(n.createElement)(u,{className:"wc-block-components-product-metadata__description",shortDescription:r,fullDescription:o}),Object(n.createElement)(a,{details:s}),Object(n.createElement)(a,{details:p.map((function(e){var t=e.attribute;return{name:void 0===t?"":t,value:e.value}}))}))}},37:function(e,t){!function(){e.exports=this.wc.wcBlocksData}()},371:function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return a}));var n=r(258),c=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=Object(n.b)(),r=t.paymentMethods,c=t.expressPaymentMethods,o=t.paymentMethodsInitialized,a=t.expressPaymentMethodsInitialized;return e?{paymentMethods:c,isInitialized:a}:{paymentMethods:r,isInitialized:o}},o=function(){return c()},a=function(){return c(!0)}},372:function(e,t,r){"use strict";r.d(t,"a",(function(){return P}));var n=r(98),c=r(258),o=r(97),a=r(99),i=r(1),s=r(62),u=r(0),l=r(6),p=r(280),d=r(903),b=r(8),m=r.n(b),f=r(31),g=Object(u.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(u.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),O=r(345),h=r(869),j=Object(u.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(u.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(u.createElement)("path",{d:"M0 0h24v24H0z"}),Object(u.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(u.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),v=r(55),y=(r(362),{bank:g,bill:O.a,card:h.a,checkPayment:j}),_=function(e){var t=e.icon,r=void 0===t?"":t,n=e.text,c=void 0===n?"":n,o=!!r,a=o&&"string"==typeof r&&y[r],i=m()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return Object(u.createElement)("span",{className:i},a?Object(u.createElement)(v.a,{srcElement:y[r]}):r,c)},E=r(145),w=r(861),S=r(208),k=function(e,t){var r=[],n=function(t,r){var n=parseInt(e[r],10);return{label:t,value:n,valueWithTax:n+parseInt(e[r+"_tax"],10)}};return r.push(n(Object(i.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),r.push(n(Object(i.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),r.push(n(Object(i.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),r.push({label:Object(i.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&r.push(n(Object(i.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),r},P=function(){var e=Object(n.b)(),t=e.isCalculating,r=e.isComplete,b=e.isIdle,m=e.isProcessing,f=e.onCheckoutAfterProcessingWithSuccess,g=e.onCheckoutAfterProcessingWithError,O=e.onCheckoutBeforeProcessing,h=e.onSubmit,j=e.customerId,v=Object(c.b)(),y=v.currentStatus,P=v.activePaymentMethod,N=v.onPaymentProcessing,C=v.setExpressPaymentError,M=Object(o.b)(),I=M.shippingErrorStatus,D=M.shippingErrorTypes,x=M.shippingRates,R=M.shippingRatesLoading,T=M.selectedRates,A=M.setSelectedRates,L=M.isSelectingRate,z=M.onShippingRateSuccess,U=M.onShippingRateFail,V=M.onShippingRateSelectSuccess,F=M.onShippingRateSelectFail,q=M.needsShipping,B=Object(a.b)(),Y=B.billingData,H=B.shippingAddress,G=B.setShippingAddress,Q=Object(E.a)().cartTotals,W=Object(w.a)().appliedCoupons,$=Object(S.a)(),K=$.noticeContexts,X=$.responseTypes,J=Object(u.useRef)(k(Q,q)),Z=Object(u.useRef)({label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(Q.total_price,10)});return Object(u.useEffect)((function(){J.current=k(Q,q),Z.current={label:Object(i.__)("Total","woo-gutenberg-products-block"),value:parseInt(Q.total_price,10)}}),[Q,q]),{checkoutStatus:{isCalculating:t,isComplete:r,isIdle:b,isProcessing:m},paymentStatus:y,shippingStatus:{shippingErrorStatus:I,shippingErrorTypes:D},shippingData:{shippingRates:x,shippingRatesLoading:R,selectedRates:T,setSelectedRates:A,isSelectingRate:L,shippingAddress:H,setShippingAddress:G,needsShipping:q},billing:{billingData:Y,cartTotal:Z.current,currency:Object(s.getCurrencyFromPriceResponse)(Q),cartTotalItems:J.current,displayPricesIncludingTax:l.p,appliedCoupons:W,customerId:j},eventRegistration:{onCheckoutAfterProcessingWithSuccess:f,onCheckoutAfterProcessingWithError:g,onCheckoutBeforeProcessing:O,onShippingRateSuccess:z,onShippingRateFail:U,onShippingRateSelectSuccess:V,onShippingRateSelectFail:F,onPaymentProcessing:N},components:{ValidationInputError:p.a,PaymentMethodIcons:d.a,PaymentMethodLabel:_},emitResponse:{noticeContexts:K,responseTypes:X},onSubmit:h,activePaymentMethod:P,setExpressPaymentError:C}}},373:function(e,t,r){"use strict";r.d(t,"b",(function(){return l})),r.d(t,"a",(function(){return p}));var n=r(18),c=r.n(n),o=r(0),a=(r(2),r(928)),i=r(8),s=r.n(i),u=Object(o.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=function(){return Object(o.useContext)(u)},p=function(e){var t=e.children,r=e.className,n=void 0===r?"":r,i=function(){var e=Object(a.a)(),t=c()(e,2),r=t[0],n=t[1].width,o="";return n>700?o="is-large":n>520?o="is-medium":n>400?o="is-small":n&&(o="is-mobile"),[r,o]}(),l=c()(i,2),p=l[0],d=l[1],b={hasContainerWidth:""!==d,containerClassName:d,isMobile:"is-mobile"===d,isSmall:"is-small"===d,isMedium:"is-medium"===d,isLarge:"is-large"===d};return Object(o.createElement)(u.Provider,{value:b},Object(o.createElement)("div",{className:s()(n,d)},p,t))}},374:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(18),s=r.n(i),u=r(24),l=r.n(u),p=r(0),d=r(1),b=r(9),m=(r(2),r(8)),f=r.n(m),g=r(88),O=r(280),h=r(213),j=r(44),v=(r(245),Object(b.forwardRef)((function(e,t){var r=e.className,n=e.id,c=e.type,o=void 0===c?"text":c,a=e.ariaLabel,i=e.ariaDescribedBy,u=e.label,l=e.screenReaderLabel,d=e.disabled,b=e.help,m=e.autoCapitalize,g=void 0===m?"off":m,O=e.autoComplete,h=void 0===O?"off":O,v=e.value,y=void 0===v?"":v,_=e.onChange,E=e.required,w=void 0!==E&&E,S=e.onBlur,k=void 0===S?function(){}:S,P=e.feedback,N=Object(p.useState)(!1),C=s()(N,2),M=C[0],I=C[1];return Object(p.createElement)("div",{className:f()("wc-block-components-text-input",r,{"is-active":M||y})},Object(p.createElement)("input",{type:o,id:n,value:y,ref:t,autoCapitalize:g,autoComplete:h,onChange:function(e){_(e.target.value)},onFocus:function(){return I(!0)},onBlur:function(){k(),I(!1)},"aria-label":a||u,disabled:d,"aria-describedby":b&&!i?n+"__help":i,required:w}),Object(p.createElement)(j.a,{label:u,screenReaderLabel:l||u,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!b&&Object(p.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},b),P)})));t.a=Object(h.a)((function(e){var t=e.className,r=e.instanceId,n=e.id,o=e.ariaDescribedBy,i=e.errorId,u=e.validateOnMount,m=void 0===u||u,h=e.focusOnMount,j=void 0!==h&&h,y=e.onChange,_=e.showError,E=void 0===_||_,w=l()(e,["className","instanceId","id","ariaDescribedBy","errorId","validateOnMount","focusOnMount","onChange","showError"]),S=Object(b.useState)(!0),k=s()(S,2),P=k[0],N=k[1],C=Object(b.useRef)(),M=Object(g.b)(),I=M.getValidationError,D=M.hideValidationError,x=M.setValidationErrors,R=M.clearValidationError,T=M.getValidationErrorId,A=n||"textinput-"+r;i=i||A;var L=Object(b.useCallback)((function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=C.current||null;if(t){t.value=t.value.trim();var r=t.checkValidity();r?R(i):x(a()({},i,{message:t.validationMessage||Object(d.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}))}}),[R,i,x]);Object(b.useEffect)((function(){P&&(j&&C.current.focus(),N(!1))}),[j,P,N]),Object(b.useEffect)((function(){P&&(m&&L(),N(!1))}),[P,N,m,L]),Object(b.useEffect)((function(){return function(){R(i)}}),[R,i]);var z=I(i)||{},U=z.message&&!z.hidden,V=E&&U&&T(i)?T(i):o;return Object(p.createElement)(v,c()({className:f()(t,{"has-error":U}),id:A,onBlur:function(){L(!1)},feedback:E&&Object(p.createElement)(O.a,{propertyName:i}),ref:C,onChange:function(e){D(i),y(e)},ariaDescribedBy:V},w))}))},38:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(13),c=r.n(n),o=r(27),a=r.n(o),i=r(1),s=function(){var e=a()(c.a.mark((function e(t){var r;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof t.json){e.next=11;break}return e.prev=1,e.next=4,t.json();case 4:return r=e.sent,e.abrupt("return",{message:r.message,type:r.type||"api"});case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",{message:e.t0.message,type:"general"});case 11:return e.abrupt("return",{message:t.message,type:t.type||"general"});case 12:case"end":return e.stop()}}),e,null,[[1,8]])})));return function(t){return e.apply(this,arguments)}}(),u=function(e){if(e.data&&"rest_invalid_param"===e.code){var t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(i.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},381:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(143),c=function(e,t){return function(r){var c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,o=n.a.addEventCallback(e,r,c);return t(o),function(){t(n.a.removeEventCallback(e,o.id))}}}},382:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return b}));var n=r(13),c=r.n(n),o=r(46),a=r.n(o),i=r(27),s=r.n(i);function u(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,c=function(){};return{s:c,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:c}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,i=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw o}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var p=function(e,t){return e[t]?Array.from(e[t].values()).sort((function(e,t){return e.priority-t.priority})):[]},d=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,d,b;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=p(t,r),i=[],s=u(o),e.prev=3,s.s();case 5:if((l=s.n()).done){e.next=19;break}return d=l.value,e.prev=7,e.next=10,Promise.resolve(d.callback(n));case 10:b=e.sent,"object"===a()(b)&&i.push(b),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),console.error(e.t0);case 17:e.next=5;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(3),s.e(e.t1);case 24:return e.prev=24,s.f(),e.finish(24);case 27:return e.abrupt("return",!i.length||i);case 28:case"end":return e.stop()}}),e,null,[[3,21,24,27],[7,14]])})));return function(t,r,n){return e.apply(this,arguments)}}(),b=function(){var e=s()(c.a.mark((function e(t,r,n){var o,i,s,l,d;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=p(t,r),i=u(o),e.prev=2,i.s();case 4:if((s=i.n()).done){e.next=23;break}return l=s.value,e.prev=6,e.next=9,Promise.resolve(l.callback(n));case 9:if(d=e.sent,"object"===a()(d)){e.next=12;break}return e.abrupt("continue",21);case 12:if(void 0!==d.type){e.next=14;break}throw new Error("If you want to abort event emitter processing, your observer must return an object with a type property");case 14:return e.abrupt("return",d);case 17:return e.prev=17,e.t0=e.catch(6),console.error(e.t0),e.abrupt("return",{type:"error"});case 21:e.next=4;break;case 23:e.next=28;break;case 25:e.prev=25,e.t1=e.catch(2),i.e(e.t1);case 28:return e.prev=28,i.f(),e.finish(28);case 31:return e.abrupt("return",!0);case 32:case"end":return e.stop()}}),e,null,[[2,25,28,31],[6,17]])})));return function(t,r,n){return e.apply(this,arguments)}}()},4:function(e,t){!function(){e.exports=this.wp.components}()},42:function(e,t){!function(){e.exports=this.wc.blocksCheckout}()},44:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(9)),i=r(8),s=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,c=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,p=null!=r,d=null!=n;return!p&&d?(t=c||"span",u=l(l({},u),{},{className:s()(u.className,"screen-reader-text")}),Object(o.createElement)(t,u,n)):(t=c||a.Fragment,p&&d&&r!==n?Object(o.createElement)(t,u,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,u,r))}},49:function(e,t){!function(){e.exports=this.wp.keycodes}()},51:function(e,t){!function(){e.exports=this.wc.wcBlocksRegistry}()},523:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a}));var n=window.Event||null,c=function(e,t){var r=t.bubbles,c=void 0!==r&&r,o=t.cancelable,a=void 0!==o&&o,i=t.element;if(i||(i=document.body),"function"==typeof n){var s=new n(e,{bubbles:c,cancelable:a});i.dispatchEvent(s)}else{var u=document.createEvent("Event");u.initEvent(e,c,a),i.dispatchEvent(u)}},o=function(){c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},a=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return function(){};var o=function(){c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),function(){return jQuery(document).off(e,o)}}},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),c=r(33),o=r.n(c),a=function(e){var t=Object(n.useRef)();return o()(e,t.current)||(t.current=e),t.current}},55:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(24),a=r.n(o),i=r(9);r(2);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}t.a=function(e){var t=e.srcElement,r=e.size,n=void 0===r?24:r,o=a()(e,["srcElement","size"]);return Object(i.isValidElement)(t)&&Object(i.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:n,height:n},o))}},56:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(24),s=r.n(i),u=r(0),l=r(172),p=r(8),d=r.n(p);r(180);function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,o=e.onValueChange,a=s()(e,["className","value","currency","onValueChange"]);if("-"===r)return null;var i=r/Math.pow(10,n.minorUnit);if(!Number.isFinite(i))return null;var p=d()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),b=m(m(m({displayType:"text"},a),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),f=o?function(e){var t=e.value*Math.pow(10,n.minorUnit);o(t)}:function(){};return Object(u.createElement)(l.a,c()({className:p},b,{value:i,onValueChange:f}))}},6:function(e,t,r){"use strict";r.d(t,"l",(function(){return c})),r.d(t,"I",(function(){return o})),r.d(t,"O",(function(){return a})),r.d(t,"y",(function(){return i})),r.d(t,"A",(function(){return s})),r.d(t,"m",(function(){return u})),r.d(t,"z",(function(){return l})),r.d(t,"C",(function(){return p})),r.d(t,"o",(function(){return d})),r.d(t,"B",(function(){return b})),r.d(t,"n",(function(){return m})),r.d(t,"E",(function(){return f})),r.d(t,"u",(function(){return g})),r.d(t,"w",(function(){return O})),r.d(t,"r",(function(){return h})),r.d(t,"s",(function(){return j})),r.d(t,"t",(function(){return v})),r.d(t,"k",(function(){return y})),r.d(t,"K",(function(){return _})),r.d(t,"P",(function(){return E})),r.d(t,"q",(function(){return w})),r.d(t,"p",(function(){return S})),r.d(t,"H",(function(){return k})),r.d(t,"c",(function(){return P})),r.d(t,"v",(function(){return N})),r.d(t,"S",(function(){return M})),r.d(t,"T",(function(){return I})),r.d(t,"J",(function(){return D})),r.d(t,"a",(function(){return x})),r.d(t,"M",(function(){return R})),r.d(t,"b",(function(){return T})),r.d(t,"L",(function(){return A})),r.d(t,"D",(function(){return L})),r.d(t,"i",(function(){return z})),r.d(t,"N",(function(){return F})),r.d(t,"h",(function(){return q})),r.d(t,"j",(function(){return B})),r.d(t,"G",(function(){return Y})),r.d(t,"F",(function(){return H})),r.d(t,"R",(function(){return G})),r.d(t,"Q",(function(){return Q})),r.d(t,"d",(function(){return W})),r.d(t,"e",(function(){return $})),r.d(t,"f",(function(){return K})),r.d(t,"g",(function(){return X})),r.d(t,"x",(function(){return J})),r.d(t,"W",(function(){return ee})),r.d(t,"X",(function(){return te})),r.d(t,"U",(function(){return re})),r.d(t,"V",(function(){return ne}));var n=r(3),c=Object(n.getSetting)("currentUserIsAdmin",!1),o=Object(n.getSetting)("reviewRatingsEnabled",!0),a=Object(n.getSetting)("showAvatars",!0),i=Object(n.getSetting)("max_columns",6),s=Object(n.getSetting)("min_columns",1),u=Object(n.getSetting)("default_columns",3),l=Object(n.getSetting)("max_rows",6),p=Object(n.getSetting)("min_rows",1),d=Object(n.getSetting)("default_rows",3),b=Object(n.getSetting)("min_height",500),m=Object(n.getSetting)("default_height",500),f=Object(n.getSetting)("placeholderImgSrc",""),g=(Object(n.getSetting)("thumbnail_size",300),Object(n.getSetting)("isLargeCatalog")),O=Object(n.getSetting)("limitTags"),h=Object(n.getSetting)("hasProducts",!0),j=Object(n.getSetting)("hasTags",!0),v=Object(n.getSetting)("homeUrl",""),y=Object(n.getSetting)("couponsEnabled",!0),_=Object(n.getSetting)("shippingEnabled",!0),E=Object(n.getSetting)("taxesEnabled",!0),w=(Object(n.getSetting)("displayItemizedTaxes",!1),Object(n.getSetting)("hasDarkEditorStyleSupport",!1)),S=(Object(n.getSetting)("displayShopPricesIncludingTax",!1),Object(n.getSetting)("displayCartPricesIncludingTax",!1)),k=Object(n.getSetting)("productCount",0),P=Object(n.getSetting)("attributes",[]),N=Object(n.getSetting)("isShippingCalculatorEnabled",!0),C=(Object(n.getSetting)("isShippingCostHidden",!1),Object(n.getSetting)("woocommerceBlocksPhase",1)),M=Object(n.getSetting)("wcBlocksAssetUrl",""),I=Object(n.getSetting)("wcBlocksBuildUrl",""),D=Object(n.getSetting)("shippingCountries",{}),x=Object(n.getSetting)("allowedCountries",{}),R=Object(n.getSetting)("shippingStates",{}),T=Object(n.getSetting)("allowedStates",{}),A=Object(n.getSetting)("shippingMethodsExist",!1),L=Object(n.getSetting)("paymentGatewaySortOrder",[]),z=Object(n.getSetting)("checkoutShowLoginReminder",!0),U={id:0,title:"",permalink:""},V=Object(n.getSetting)("storePages",{myaccount:U,shop:U,cart:U,checkout:U,privacy:U,terms:U}),F=V.shop.permalink,q=V.checkout.id,B=V.checkout.permalink,Y=V.privacy.permalink,H=V.privacy.title,G=V.terms.permalink,Q=V.terms.title,W=V.cart.id,$=V.cart.permalink,K=Object(n.getSetting)("checkoutAllowsGuest",!1),X=Object(n.getSetting)("checkoutAllowsSignup",!1),J=V.myaccount.permalink?V.myaccount.permalink:Object(n.getSetting)("loginUrl","/wp-login.php"),Z=r(23),ee=function(e,t){if(C>2)return Object(Z.registerBlockType)(e,t)},te=function(e,t){if(C>1)return Object(Z.registerBlockType)(e,t)},re=function(){return C>2},ne=function(){return C>1}},62:function(e,t){!function(){e.exports=this.wc.priceFormat}()},67:function(e,t){!function(){e.exports=this.wp.dom}()},7:function(e,t){!function(){e.exports=this.lodash}()},70:function(e,t){!function(){e.exports=this.wp.deprecated}()},71:function(e,t){!function(){e.exports=this.wp.a11y}()},839:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},856:function(e,t,r){e.exports=r(888)},857:function(e,t){},858:function(e,t){},859:function(e,t){},860:function(e,t){},861:function(e,t,r){"use strict";r.d(t,"a",(function(){return b}));var n=r(5),c=r.n(n),o=r(1),a=r(21),i=r(37),s=r(88),u=r(28),l=r(145),p=r(134);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var b=function(){var e=Object(l.a)(),t=e.cartCoupons,r=e.cartIsLoading,n=Object(p.a)(),b=n.addErrorNotice,m=n.addSnackbarNotice,f=Object(s.b)().setValidationErrors;return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({appliedCoupons:t,isLoading:r},Object(a.useSelect)((function(e,t){var r=t.dispatch,n=e(i.CART_STORE_KEY),c=n.isApplyingCoupon(),a=n.isRemovingCoupon(),s=r(i.CART_STORE_KEY),l=s.applyCoupon,p=s.removeCoupon,d=s.receiveApplyingCoupon;return{applyCoupon:function(e){l(e).then((function(t){!0===t&&m(Object(o.sprintf)(Object(o.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){f({coupon:{message:Object(u.decodeEntities)(e.message),hidden:!1}}),d("")}))},removeCoupon:function(e){p(e).then((function(t){!0===t&&m(Object(o.sprintf)(Object(o.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})})).catch((function(e){b(e.message,{id:"coupon-form"}),d("")}))},isApplyingCoupon:c,isRemovingCoupon:a}}),[b,m]))}},862:function(e,t,r){"use strict";var n=r(0),c=r(8),o=r.n(c),a=(r(2),r(373));r(350);t.a=function(e){var t=e.children,r=e.className;return Object(n.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",r)},t)}},863:function(e,t,r){"use strict";var n=r(0),c=r(8),o=r.n(c);r(2);t.a=function(e){var t=e.children,r=e.className;return Object(n.createElement)("div",{className:o()("wc-block-components-main",r)},t)}},864:function(e,t){},865:function(e,t,r){"use strict";var n=r(0),c=r(8),o=r.n(c);r(2);t.a=function(e){var t=e.children,r=e.className;return Object(n.createElement)("div",{className:o()("wc-block-components-sidebar",r)},t)}},866:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(6),a=r(120),i=r(255),s=(r(2),r(42));r(354);t.a=function(e){var t=e.cartCoupons,r=void 0===t?[]:t,u=e.currency,l=e.isRemovingCoupon,p=e.removeCoupon,d=e.values,b=d.total_discount,m=d.total_discount_tax,f=parseInt(b,10);if(!f&&0===r.length)return null;var g=parseInt(m,10),O=o.p?f+g:f;return Object(n.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:u,description:0!==r.length&&Object(n.createElement)(a.a,{screenReaderLabel:Object(c.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:l,showSpinner:!1},Object(n.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},r.map((function(e){return Object(n.createElement)(i.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.code,screenReaderText:Object(c.sprintf)(Object(c.__)("Coupon: %s","woo-gutenberg-products-block"),e.code),disabled:l,onRemove:function(){p(e.code)},radius:"large",ariaLabel:Object(c.sprintf)(Object(c.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.code)})})))),label:O?Object(c.__)("Discount","woo-gutenberg-products-block"):Object(c.__)("Coupons","woo-gutenberg-products-block"),value:O?-1*O:"-"})}},867:function(e,t,r){"use strict";var n=r(18),c=r.n(n),o=r(0),a=r(1),i=r(94),s=r(374),u=r(44),l=r(280),p=r(120),d=(r(2),r(213)),b=r(88),m=r(42);r(358);t.a=Object(d.a)((function(e){var t=e.instanceId,r=e.isLoading,n=void 0!==r&&r,d=e.initialOpen,f=void 0!==d&&d,g=e.onSubmit,O=void 0===g?function(){}:g,h=Object(o.useState)(""),j=c()(h,2),v=j[0],y=j[1],_=Object(o.useRef)(!1),E=Object(b.b)(),w=E.getValidationError,S=E.getValidationErrorId,k=w("coupon");Object(o.useEffect)((function(){_.current!==n&&(n||!v||k||y(""),_.current=n)}),[n,v,k]);var P="wc-block-components-totals-coupon__input-".concat(t);return Object(o.createElement)(m.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!0,initialOpen:f,title:Object(o.createElement)(u.a,{label:Object(a.__)("Coupon Code?","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Introduce Coupon Code","woo-gutenberg-products-block"),htmlFor:P})},Object(o.createElement)(p.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:n,showSpinner:!1},Object(o.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(o.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(o.createElement)(s.a,{id:P,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:v,ariaDescribedBy:S(P),onChange:function(e){y(e)},validateOnMount:!1,focusOnMount:!0,showError:!1}),Object(o.createElement)(i.a,{className:"wc-block-components-totals-coupon__button",disabled:n||!v,showSpinner:n,onClick:function(e){e.preventDefault(),O(v)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(o.createElement)(l.a,{propertyName:"coupon",elementId:P}))))}))},868:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(6),a=r(149),i=r(56),s=(r(2),r(42)),u=r(145),l=(r(359),o.P&&o.p);t.a=function(e){var t=e.currency,r=e.values,o=r.total_price,p=r.total_tax,d=Object(u.a)().extensions,b=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(c.__)("Total","woo-gutenberg-products-block"),arg:{extensions:d},validation:function(e){return"string"==typeof e}});return Object(n.createElement)(s.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:b,value:parseInt(o,10),description:l&&Object(n.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(a.a)(Object(c.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(n.createElement)(i.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,displayType:"text",value:parseInt(p,10)})}))})}},869:function(e,t,r){"use strict";var n=r(0),c=r(31),o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},870:function(e,t){},871:function(e,t){},88:function(e,t,r){"use strict";r.d(t,"b",(function(){return j})),r.d(t,"a",(function(){return v}));var n=r(46),c=r.n(n),o=r(5),a=r.n(o),i=r(24),s=r.n(i),u=r(18),l=r.n(u),p=r(0),d=r(7),b=r(33),m=r.n(b);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function O(e){var t=function(e,t){if("object"!==c()(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==c()(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===c()(t)?t:String(t)}var h=Object(p.createContext)({getValidationError:function(){return""},setValidationErrors:function(e){},clearValidationError:function(e){},clearAllValidationErrors:function(){},hideValidationError:function(){},showValidationError:function(){},showAllValidationErrors:function(){},hasValidationErrors:!1,getValidationErrorId:function(e){return e}}),j=function(){return Object(p.useContext)(h)},v=function(e){var t=e.children,r=Object(p.useState)({}),n=l()(r,2),c=n[0],o=n[1],i=Object(p.useCallback)((function(e){return c[e]}),[c]),u=Object(p.useCallback)((function(e){var t=c[e];return!t||t.hidden?"":"validate-error-".concat(e)}),[c]),b=Object(p.useCallback)((function(e){o((function(t){if(!t[e])return t;t[e];return s()(t,[e].map(O))}))}),[]),f=Object(p.useCallback)((function(){o({})}),[]),j=Object(p.useCallback)((function(e){e&&o((function(t){return e=Object(d.pickBy)(e,(function(e,r){return"string"==typeof e.message&&(!t.hasOwnProperty(r)||!m()(t[r],e))})),0===Object.values(e).length?t:g(g({},t),e)}))}),[]),v=Object(p.useCallback)((function(e,t){o((function(r){if(!r.hasOwnProperty(e))return r;var n=g(g({},r[e]),t);return m()(r[e],n)?r:g(g({},r),{},a()({},e,n))}))}),[]),y={getValidationError:i,setValidationErrors:j,clearValidationError:b,clearAllValidationErrors:f,hideValidationError:Object(p.useCallback)((function(e){v(e,{hidden:!0})}),[v]),showValidationError:Object(p.useCallback)((function(e){v(e,{hidden:!1})}),[v]),showAllValidationErrors:Object(p.useCallback)((function(){o((function(e){var t={};return Object.keys(e).forEach((function(r){e[r].hidden&&(t[r]=g(g({},e[r]),{},{hidden:!1}))})),0===Object.values(t).length?e:g(g({},e),t)}))}),[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:u};return Object(p.createElement)(h.Provider,{value:y},t)}},888:function(e,t,r){"use strict";r.r(t);var n=r(0),c=r(1),o=r(22),a=r(55),i=r(839),s=r(8),u=r.n(s),l=r(6),p=r(251),d=r(4),b=(r(2),r(18)),m=r.n(b),f=r(179),g=(r(859),Object(f.a)((function(e){var t=e.className,r=e.label,o=void 0===r?Object(c.__)("View","woo-gutenberg-products-block"):r,a=e.views,i=e.defaultView,s=e.instanceId,l=e.render,p=Object(n.useState)(i),b=m()(p,2),f=b[0],g=b[1],O=u()(t,"wc-block-view-switch-control"),h="wc-block-view-switch-control-"+s;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:O},Object(n.createElement)("label",{htmlFor:h,className:"wc-block-view-switch-control__label"},o+": "),Object(n.createElement)(d.ButtonGroup,{id:h},a.map((function(e){return Object(n.createElement)(d.Button,{key:e.value,isPrimary:f===e.value,"aria-pressed":f===e.value,onMouseDown:function(){f!==e.value&&g(e.value)},onClick:function(){f!==e.value&&g(e.value)}},e.name)})))),l(f))}))),O=r(250),h=r(137),j=r(121),v=r(366),y=function(e){var t=e.children,r=e.redirectUrl;return Object(n.createElement)(v.a,{isCart:!0,redirectUrl:r},t)},_=r(149),E=r(3),w=r(913),S=r(37),k=r(21),P=r(145),N=r(120),C=r(88),M=r(523),I=r(173),D=r(866),x=r(895),R=r(867),T=r(868),A=r(42),L=r(62),z=r(371),U=r(208),V=r(177),F=r(254),q=(r(360),function(){var e=Object(z.a)(),t=e.paymentMethods,r=e.isInitialized,o=Object(U.a)().noticeContexts;return!r||r&&0===Object.keys(t).length?null:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(n.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(n.createElement)(V.a,{context:o.EXPRESS_PAYMENTS},Object(n.createElement)(F.a,null)))),Object(n.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(c.__)("Or","woo-gutenberg-products-block")))}),B=r(861),Y=r(134),H=r(862),G=r(863),Q=r(865),W=r(159),$=r(28),K=r(903),X=r(94),J=r(98),Z={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},ee=function(){var e,t,r=Object(n.useState)(""),c=m()(r,2),o=c[0],a=c[1],i=Object(n.useRef)(null),s=Object(n.useRef)((e=function(e){e[0].isIntersecting?a("visible"):a(e[0].boundingClientRect.top>0?"below":"above")},t={threshold:1},"function"!=typeof IntersectionObserver?{observe:function(){},unobserve:function(){}}:new IntersectionObserver(e,t)));return Object(n.useLayoutEffect)((function(){var e=i.current,t=s.current;return e&&t.observe(e),function(){t.unobserve(e)}}),[]),[Object(n.createElement)("div",{"aria-hidden":!0,ref:i,style:Z}),o]},te=(r(870),function(e){return Object.values(e).reduce((function(e,t){return null!==t.icons&&(e=e.concat(t.icons)),e}),[])}),re=function(e){var t=e.link,r=Object(J.b)().isCalculating,o=ee(),a=m()(o,2),i=a[0],s=a[1],u=Object(n.useState)(!1),p=m()(u,2),d=p[0],b=p[1],f=Object(z.b)().paymentMethods;Object(n.useEffect)((function(){if(window&&"function"==typeof window.addEventListener&&"function"==typeof window.removeEventListener){var e=function(){b(!1)};return window.addEventListener("beforeunload",e),function(){window.removeEventListener("beforeunload",e)}}}),[]);var g=Object(n.createElement)(n.Fragment,null,Object(n.createElement)(X.a,{className:"wc-block-cart__submit-button",href:t||l.j,disabled:r,onClick:function(){return b(!0)},showSpinner:d},Object(c.__)("Proceed to Checkout","woo-gutenberg-products-block")),Object(n.createElement)(K.a,{icons:te(f)}));return Object(n.createElement)("div",{className:"wc-block-cart__submit"},i,Object(n.createElement)("div",{className:"wc-block-cart__submit-container"},g),"below"===s&&Object(n.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},g))},ne=function(e){var t=e.itemCount,r=void 0===t?1:t;return Object(n.createElement)(W.a,{headingLevel:"2"},Object(c.sprintf)(Object(c._n)("Your cart (%d item)","Your cart (%d items)",r,"woo-gutenberg-products-block"),r))},ce=r(30),oe=r.n(ce),ae=r(46),ie=r.n(ae),se=r(71),ue=r(49),le=(r(864),function(e){var t=e.className,r=e.quantity,o=void 0===r?1:r,a=e.minimum,i=void 0===a?1:a,s=e.maximum,l=e.onChange,p=void 0===l?function(){return null}:l,d=e.itemName,b=void 0===d?"":d,m=e.disabled,f=u()("wc-block-components-quantity-selector",t),g=void 0!==s,O=o>i,h=!g||o<s,j=Object(n.useCallback)((function(e){var t=void 0!==ie()(e.key)?"ArrowDown"===e.key:e.keyCode===ue.DOWN,r=void 0!==ie()(e.key)?"ArrowUp"===e.key:e.keyCode===ue.UP;t&&O&&(e.preventDefault(),p(o-1)),r&&h&&(e.preventDefault(),p(o+1))}),[o,p,h,O]);return Object(n.createElement)("div",{className:f},Object(n.createElement)("input",{className:"wc-block-components-quantity-selector__input",disabled:m,type:"number",step:"1",min:"0",value:o,onKeyDown:j,onChange:function(e){var t=isNaN(e.target.value)||!e.target.value?0:parseInt(e.target.value,10);g&&(t=Math.min(t,s)),(t=Math.max(t,i))!==o&&p(t)},"aria-label":Object(c.sprintf)(Object(c.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),b)}),Object(n.createElement)("button",{"aria-label":Object(c.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:m||!O,onClick:function(){var e=o-1;p(e),Object(se.speak)(Object(c.sprintf)(Object(c.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e))}},"-"),Object(n.createElement)("button",{"aria-label":Object(c.__)("Increase quantity","woo-gutenberg-products-block"),disabled:m||!h,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:function(){var e=o+1;p(e),Object(se.speak)(Object(c.sprintf)(Object(c.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e))}},"+"))}),pe=r(142),de=r(168),be=r(536),me=r(96),fe=r(363),ge=r(364),Oe=r(365),he=r(56),je=r(146),ve=function(e){var t=e.currency,r=e.saleAmount,o=e.format,a=void 0===o?"<price/>":o;if(!r||r<=0)return null;a.includes("<price/>")||(a="<price/>",console.error("Price formats need to include the `<price/>` tag."));var i=Object(c.sprintf)(Object(c.__)("Save %s","woo-gutenberg-products-block"),a);return Object(n.createElement)(je.a,{className:"wc-block-components-sale-badge"},Object(_.a)(i,{price:Object(n.createElement)(he.a,{currency:t,value:r})}))},ye=r(367),_e=r(178),Ee=function(e,t){return e.convertPrecision(t.minorUnit).getAmount()},we=function(e){var t=e.lineItem,r=void 0===t?{}:t,o=r.name,a=void 0===o?"":o,i=r.catalog_visibility,s=void 0===i?"":i,p=r.short_description,d=void 0===p?"":p,b=r.description,f=void 0===b?"":b,g=r.low_stock_remaining,O=void 0===g?null:g,h=r.show_backorder_badge,j=void 0!==h&&h,v=r.quantity_limit,y=void 0===v?99:v,_=r.permalink,E=void 0===_?"":_,w=r.images,N=void 0===w?[]:w,C=r.variation,I=void 0===C?[]:C,D=r.item_data,x=void 0===D?[]:D,R=r.prices,T=void 0===R?{currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}}:R,z=r.totals,U=void 0===z?{currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_total:"0",line_total_tax:"0"}:z,V=r.extensions,F=function(e){var t=e.key,r=void 0===t?"":t,c=e.quantity,o=void 0===c?1:c,a=Object(P.a)().cartErrors,i=Object(J.b)().dispatchActions,s=Object(n.useState)(o),u=m()(s,2),l=u[0],p=u[1],d=Object(be.a)(l,400),b=m()(d,1)[0],f=Object(me.a)(b),g=Object(k.useDispatch)(S.CART_STORE_KEY),O=g.removeItemFromCart,h=g.changeCartItemQuantity,j=Object(k.useSelect)((function(e){return!!r&&e(S.CART_STORE_KEY).isItemPendingQuantity(r)}),[r]),v=Object(me.a)(j),y=Object(k.useSelect)((function(e){return!!r&&e(S.CART_STORE_KEY).isItemPendingDelete(r)}),[r]),_=Object(me.a)(y);return Object(n.useEffect)((function(){r&&Number.isFinite(f)&&f!==b&&h(r,b).then(M.c)}),[r,h,b,f]),Object(n.useEffect)((function(){v!==j&&(j?i.incrementCalculating():i.decrementCalculating())}),[i,j,v]),Object(n.useEffect)((function(){return _!==y&&(y?i.incrementCalculating():i.decrementCalculating()),function(){y&&i.decrementCalculating()}}),[i,y,_]),{isPendingDelete:y,quantity:l,changeQuantity:p,removeItem:function(){return!!r&&O(r).then((function(){Object(M.c)()}))},cartItemQuantityErrors:a}}(r),q=F.quantity,B=F.changeQuantity,Y=F.removeItem,H=F.isPendingDelete,G=Object(L.getCurrency)(T),Q=Object(A.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:a,arg:{extensions:V,context:"cart"},validation:function(e){return"string"==typeof e}}),W=Object(_e.a)({amount:parseInt(T.raw_prices.regular_price,10),precision:parseInt(T.raw_prices.precision,10)}),$=Object(_e.a)({amount:parseInt(T.raw_prices.price,10),precision:parseInt(T.raw_prices.precision,10)}),K=W.subtract($),X=K.multiply(q),Z=Object(L.getCurrency)(U),ee=parseInt(U.line_total,10);l.p&&(ee+=parseInt(U.line_total_tax,10));var te=Object(_e.a)({amount:ee}),re=N.length?N[0]:{},ne="hidden"===s||"search"===s,ce=Object(A.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"<price/>",arg:{cartItem:r,block:"cart"},validation:function(e){return"string"==typeof e&&e.includes("<price/>")}}),oe=Object(A.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"<price/>",arg:{lineItem:r},validation:function(e){return"string"==typeof e&&e.includes("<price/>")}}),ae=Object(A.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"<price/>",arg:{lineItem:r},validation:function(e){return"string"==typeof e&&e.includes("<price/>")}});return Object(n.createElement)("tr",{className:u()("wc-block-cart-items__row",{"is-disabled":H})},Object(n.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!re.alt},ne?Object(n.createElement)(fe.a,{image:re}):Object(n.createElement)("a",{href:E,tabIndex:-1},Object(n.createElement)(fe.a,{image:re}))),Object(n.createElement)("td",{className:"wc-block-cart-item__product"},Object(n.createElement)(de.a,{disabled:H||ne,name:Q,permalink:E}),j?Object(n.createElement)(ge.a,null):!!O&&Object(n.createElement)(Oe.a,{lowStockRemaining:O}),Object(n.createElement)("div",{className:"wc-block-cart-item__prices"},Object(n.createElement)(pe.a,{currency:G,regularPrice:Ee(W,G),price:Ee($,G),format:oe})),Object(n.createElement)(ve,{currency:G,saleAmount:Ee(K,G),format:ae}),Object(n.createElement)(ye.a,{shortDescription:d,fullDescription:f,itemData:x,variation:I}),Object(n.createElement)("div",{className:"wc-block-cart-item__quantity"},Object(n.createElement)(le,{disabled:H,quantity:q,maximum:y,onChange:B,itemName:Q}),Object(n.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:Y,disabled:H},Object(c.__)("Remove item","woo-gutenberg-products-block")))),Object(n.createElement)("td",{className:"wc-block-cart-item__total"},Object(n.createElement)(pe.a,{currency:Z,format:ce,price:Ee(te,Z)}),q>1&&Object(n.createElement)(ve,{currency:G,saleAmount:Ee(X,G),format:ae})))},Se=oe()(Array(3)).map((function(e,t){return Object(n.createElement)(we,{key:t})})),ke=function(e){var t=e.lineItems,r=void 0===t?[]:t,o=e.isLoading,a=void 0!==o&&o?Se:r.map((function(e){return Object(n.createElement)(we,{key:e.key,lineItem:e})}));return Object(n.createElement)("table",{className:"wc-block-cart-items"},Object(n.createElement)("thead",null,Object(n.createElement)("tr",{className:"wc-block-cart-items__header"},Object(n.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(n.createElement)("span",null,Object(c.__)("Product","woo-gutenberg-products-block"))),Object(n.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(n.createElement)("span",null,Object(c.__)("Details","woo-gutenberg-products-block"))),Object(n.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(n.createElement)("span",null,Object(c.__)("Total","woo-gutenberg-products-block"))))),Object(n.createElement)("tbody",null,a))},Pe=(r(860),function(e){var t=e.attributes,r=t.isShippingCalculatorEnabled,o=t.hasDarkControls,a=Object(P.a)(),i=a.cartItems,s=a.cartFees,p=a.cartTotals,d=a.cartIsLoading,b=a.cartItemsCount,m=a.cartItemErrors,f=a.cartNeedsPayment,g=a.cartNeedsShipping,O=Object(B.a)(),h=O.applyCoupon,j=O.removeCoupon,v=O.isApplyingCoupon,y=O.isRemovingCoupon,_=O.appliedCoupons,w=Object(Y.a)().addErrorNotice;Object(n.useEffect)((function(){m.forEach((function(e){w(Object($.decodeEntities)(e.message),{isDismissible:!0,id:e.code})}))}),[w,m]);var S=Object(L.getCurrencyFromPriceResponse)(p),k=u()("wc-block-cart",{"wc-block-cart--is-loading":d,"has-dark-controls":o});return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(ne,{itemCount:b}),Object(n.createElement)(H.a,{className:k},Object(n.createElement)(G.a,{className:"wc-block-cart__main"},Object(n.createElement)(ke,{lineItems:i,isLoading:d})),Object(n.createElement)(Q.a,{className:"wc-block-cart__sidebar"},Object(n.createElement)(W.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(c.__)("Cart totals","woo-gutenberg-products-block")),Object(n.createElement)(A.Subtotal,{currency:S,values:p}),Object(n.createElement)(A.TotalsFees,{currency:S,cartFees:s}),Object(n.createElement)(D.a,{cartCoupons:_,currency:S,isRemovingCoupon:y,removeCoupon:j,values:p}),g&&Object(n.createElement)(x.a,{showCalculator:r,showRateSelector:!0,values:p,currency:S}),!l.p&&Object(n.createElement)(A.TotalsTaxes,{currency:S,values:p}),l.k&&Object(n.createElement)(R.a,{onSubmit:h,isLoading:v}),Object(n.createElement)(T.a,{currency:S,values:p}),Object(n.createElement)(A.ExperimentalOrderMeta.Slot,null),Object(n.createElement)("div",{className:"wc-block-cart__payment-options"},f&&Object(n.createElement)(q,null),Object(n.createElement)(re,{link:Object(E.getSetting)("page-"+(null==t?void 0:t.checkoutPageId),!1)})))))}),Ne=function(e){return Object(n.createElement)(y,null,Object(n.createElement)(Pe,e))},Ce=function(e){var t=e.content;return Object(n.useEffect)((function(){Object(M.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})}),[]),Object(n.createElement)(n.RawHTML,null,t)},Me=Object(I.a)((function(e){var t=e.emptyCart,r=e.attributes,c=e.scrollToTop,o=Object(P.a)(),a=o.cartItems,i=o.cartIsLoading;return Object(n.useEffect)((function(){var e=function(){Object(k.dispatch)(S.CART_STORE_KEY).invalidateResolutionForStore(),c()},t=Object(M.b)("added_to_cart","wc-blocks_added_to_cart"),r=Object(M.b)("removed_from_cart","wc-blocks_removed_from_cart");return document.body.addEventListener("wc-blocks_added_to_cart",e),document.body.addEventListener("wc-blocks_removed_from_cart",e),function(){t(),r(),document.body.removeEventListener("wc-blocks_added_to_cart",e),document.body.removeEventListener("wc-blocks_removed_from_cart",e)}}),[c]),Object(n.createElement)(n.Fragment,null,i||0!==a.length?Object(n.createElement)(N.a,{showSpinner:!0,isLoading:i},Object(n.createElement)(C.a,null,Object(n.createElement)(Ne,{attributes:r}))):Object(n.createElement)(Ce,{content:t}))})),Ie=(r(871),function(e){var t=e.hidden,r=void 0!==t&&t;return Object(n.createElement)("div",{hidden:r},Object(n.createElement)(o.InnerBlocks,{templateInsertUpdatesSelection:!1,template:[["core/image",{align:"center",url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDBDOC41MDQwMyAwIDAgOC41MDQwMyAwIDE5QzAgMjkuNDk2IDguNTA0MDMgMzggMTkgMzhDMjkuNDk2IDM4IDM4IDI5LjQ5NiAzOCAxOUMzOCA4LjUwNDAzIDI5LjQ5NiAwIDE5IDBaTTI1LjEyOSAxMi44NzFDMjYuNDg1MSAxMi44NzEgMjcuNTgwNiAxMy45NjY1IDI3LjU4MDYgMTUuMzIyNkMyNy41ODA2IDE2LjY3ODYgMjYuNDg1MSAxNy43NzQyIDI1LjEyOSAxNy43NzQyQzIzLjc3MyAxNy43NzQyIDIyLjY3NzQgMTYuNjc4NiAyMi42Nzc0IDE1LjMyMjZDMjIuNjc3NCAxMy45NjY1IDIzLjc3MyAxMi44NzEgMjUuMTI5IDEyLjg3MVpNMTEuNjQ1MiAzMS4yNTgxQzkuNjE0OTIgMzEuMjU4MSA3Ljk2Nzc0IDI5LjY0OTIgNy45Njc3NCAyNy42NTczQzcuOTY3NzQgMjYuMTI1IDEwLjE1MTIgMjMuMDI5OCAxMS4xNTQ4IDIxLjY5NjhDMTEuNCAyMS4zNjczIDExLjg5MDMgMjEuMzY3MyAxMi4xMzU1IDIxLjY5NjhDMTMuMTM5MSAyMy4wMjk4IDE1LjMyMjYgMjYuMTI1IDE1LjMyMjYgMjcuNjU3M0MxNS4zMjI2IDI5LjY0OTIgMTMuNjc1NCAzMS4yNTgxIDExLjY0NTIgMzEuMjU4MVpNMTIuODcxIDE3Ljc3NDJDMTEuNTE0OSAxNy43NzQyIDEwLjQxOTQgMTYuNjc4NiAxMC40MTk0IDE1LjMyMjZDMTAuNDE5NCAxMy45NjY1IDExLjUxNDkgMTIuODcxIDEyLjg3MSAxMi44NzFDMTQuMjI3IDEyLjg3MSAxNS4zMjI2IDEzLjk2NjUgMTUuMzIyNiAxNS4zMjI2QzE1LjMyMjYgMTYuNjc4NiAxNC4yMjcgMTcuNzc0MiAxMi44NzEgMTcuNzc0MlpNMjUuOTEwNSAyOS41ODc5QzI0LjE5NDQgMjcuNTM0NyAyMS42NzM4IDI2LjM1NDggMTkgMjYuMzU0OEMxNy4zNzU4IDI2LjM1NDggMTcuMzc1OCAyMy45MDMyIDE5IDIzLjkwMzJDMjIuNDAxNiAyMy45MDMyIDI1LjYxMTcgMjUuNDA0OCAyNy43ODc1IDI4LjAyNUMyOC44NDQ4IDI5LjI4MTUgMjYuOTI5NCAzMC44MjE0IDI1LjkxMDUgMjkuNTg3OVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=",sizeSlug:"small"}],["core/heading",{align:"center",content:Object(c.__)("Your cart is currently empty!","woo-gutenberg-products-block"),level:2,className:"wc-block-cart__empty-cart__title"}],["core/paragraph",{align:"center",content:Object(c.sprintf)(Object(c.__)('<a href="%s">Browse store</a>.',"woo-gutenberg-products-block"),l.N),dropCap:!1}],["core/separator",{className:"is-style-dots"}],["core/heading",{align:"center",content:Object(c.__)("New in store","woo-gutenberg-products-block"),level:2}],["woocommerce/product-new",{columns:3,rows:1}]]}))}),De=(r(858),function(e){var t=e.attributes,r=e.setAttributes,a=t.isShippingCalculatorEnabled,i=t.checkoutPageId,s=t.hasDarkControls,u=Object(j.b)().currentPostId,b=Object(n.useRef)(i).current;return Object(n.createElement)(o.InspectorControls,null,u!==l.d&&Object(n.createElement)(d.Notice,{className:"wc-block-cart__page-notice",isDismissible:!1,status:"warning"},Object(_.a)(Object(c.__)("If you would like to use this block as your default cart you must update your <a>page settings in WooCommerce</a>.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(E.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),l.K&&Object(n.createElement)(d.PanelBody,{title:Object(c.__)("Shipping rates","woo-gutenberg-products-block")},Object(n.createElement)(d.ToggleControl,{label:Object(c.__)("Shipping calculator","woo-gutenberg-products-block"),help:Object(c.__)("Allow customers to estimate shipping by entering their address.","woo-gutenberg-products-block"),checked:a,onChange:function(){return r({isShippingCalculatorEnabled:!a})}})),!(u===l.d&&0===b)&&Object(n.createElement)(O.a,{pageId:i,setPageId:function(e){return r({checkoutPageId:e})},labels:{title:Object(c.__)("Proceed to Checkout button","woo-gutenberg-products-block"),default:Object(c.__)("WooCommerce Checkout Page","woo-gutenberg-products-block")}}),Object(n.createElement)(d.PanelBody,{title:Object(c.__)("Style","woo-gutenberg-products-block")},Object(n.createElement)(d.ToggleControl,{label:Object(c.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(c.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:s,onChange:function(){return r({hasDarkControls:!s})}})),Object(n.createElement)(p.a,null))}),xe=function(e){var t=e.className,r=e.attributes,o=e.setAttributes;return Object(n.createElement)("div",{className:u()(t,"wp-block-woocommerce-cart",{"is-editor-preview":r.isPreview})},Object(n.createElement)(g,{label:Object(c.__)("Edit","woo-gutenberg-products-block"),views:[{value:"full",name:Object(c.__)("Full Cart","woo-gutenberg-products-block")},{value:"empty",name:Object(c.__)("Empty Cart","woo-gutenberg-products-block")}],defaultView:"full",render:function(e){return Object(n.createElement)(h.a,{header:Object(c.__)("Cart Block Error","woo-gutenberg-products-block"),text:Object(c.__)("There was an error whilst rendering the cart block. If this problem continues, try re-creating the block.","woo-gutenberg-products-block"),showErrorMessage:!0,errorMessagePrefix:Object(c.__)("Error message:","woo-gutenberg-products-block")},"full"===e&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(j.a,{previewData:{previewCart:w.a}},Object(n.createElement)(De,{attributes:r,setAttributes:o}),Object(n.createElement)(d.Disabled,null,Object(n.createElement)(y,null,Object(n.createElement)(Me,{attributes:r})))),Object(n.createElement)(Ie,{hidden:!0})),"empty"===e&&Object(n.createElement)(Ie,null))}}))},Re=(r(857),{isPreview:{type:"boolean",default:!1,save:!1},isShippingCalculatorEnabled:{type:"boolean",default:l.v},checkoutPageId:{type:"number",default:0},hasDarkControls:{type:"boolean",default:l.q}}),Te={title:Object(c.__)("Cart","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(a.a,{srcElement:i.a}),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Shopping cart.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:Re,edit:xe,save:function(e){var t=e.attributes;return Object(n.createElement)("div",{className:u()("is-loading",t.className)},Object(n.createElement)(o.InnerBlocks.Content,null))}};Object(l.X)("woocommerce/cart",Te)},89:function(e,t){!function(){e.exports=this.wp.autop}()},891:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=(r(2),r(374)),i=r(11),s=r.n(i),u=r(6),l=r(1),p=r(28),d=r(8),b=r.n(d),m=r(24),f=r.n(m),g=r(9),O=r(88),h=r(53),j=r(213),v=r(280),y=r(930),_=(r(244),function(e){var t=e.className,r=e.feedback,n=e.id,c=e.label,a=e.onChange,i=e.options,s=e.value;return Object(o.createElement)("div",{id:n,className:b()("wc-block-components-select",t,{"is-active":s})},Object(o.createElement)(y.a,{label:c,onChange:function(e){var t=e.selectedItem;a(t.key)},options:i,value:s||null}),r)}),E=Object(j.a)((function(e){var t=e.className,r=e.id,n=e.value,a=e.instanceId,i=e.required,u=e.errorId,p=e.errorMessage,d=void 0===p?Object(l.__)("Please select a value.","woo-gutenberg-products-block"):p,m=f()(e,["className","id","value","instanceId","required","errorId","errorMessage"]),j=r||"select-"+a;u=u||j;var y=Object(h.a)(n),E=Object(O.b)(),w=E.getValidationError,S=E.setValidationErrors,k=E.clearValidationError;Object(g.useEffect)((function(){!i||y?k(u):S(c()({},u,{message:d,hidden:!0}))}),[k,y,u,d,i,S]),Object(g.useEffect)((function(){return function(){k(u)}}),[k,u]);var P=w(u)||{};return Object(o.createElement)(_,s()({id:j,className:b()(t,{"has-error":P.message&&!P.hidden}),feedback:Object(o.createElement)(v.a,{propertyName:u}),value:y},m))})),w=(r(356),function(e){var t=e.className,r=e.countries,n=e.id,c=e.label,a=e.onChange,i=e.value,s=void 0===i?"":i,u=e.autoComplete,d=void 0===u?"off":u,m=e.required,f=void 0!==m&&m,g=e.errorId,O=e.errorMessage,h=void 0===O?Object(l.__)("Please select a country.","woo-gutenberg-products-block"):O,j=Object(o.useMemo)((function(){return Object.keys(r).map((function(e){return{key:e,name:Object(p.decodeEntities)(r[e])}}))}),[r]);return Object(o.createElement)("div",{className:b()(t,"wc-block-components-country-input")},Object(o.createElement)(E,{id:n,label:c,onChange:a,options:j,value:j.find((function(e){return e.key===s})),errorId:g,errorMessage:h,required:f}),"off"!==d&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:d,value:s,onChange:function(e){var t=e.target.value,r=j.find((function(e){return e.key===t}));a(r?r.key:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))}),S=function(e){return Object(o.createElement)(w,s()({countries:u.J},e))},k=function(e){return Object(o.createElement)(w,s()({countries:u.a},e))},P=(r(357),function(e){var t=e.className,r=e.id,n=e.states,c=e.country,i=e.label,s=e.onChange,u=e.autoComplete,d=void 0===u?"off":u,m=e.value,f=void 0===m?"":m,g=e.required,O=void 0!==g&&g,h=n[c],j=Object(o.useMemo)((function(){return h?Object.keys(h).map((function(e){return{key:e,name:Object(p.decodeEntities)(h[e])}})):[]}),[h]),v=Object(o.useCallback)((function(e){if(j.length>0){var t=j.find((function(t){return t.key===e||t.name===e}));s(t?t.key:"")}else s(e)}),[s,j]);return j.length>0?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(E,{className:b()(t,"wc-block-components-state-input"),id:r,label:i,onChange:v,options:j,value:j.find((function(e){return e.key===f})),errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:O}),"off"!==d&&Object(o.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:d,value:f,onChange:function(e){return v(e.target.value)},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(o.createElement)(a.a,{className:t,id:r,label:i,onChange:v,autoComplete:d,value:f,required:O})}),N=function(e){return Object(o.createElement)(P,s()({states:u.M},e))},C=function(e){return Object(o.createElement)(P,s()({states:u.b},e))},M=r(160),I=r(18),D=r.n(I),x=r(3),R=Object(x.getSetting)("countryLocale",{}),T=function(e){var t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(l.sprintf)(Object(l.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(t.index=parseInt(e.priority,10)),!0===e.hidden&&(t.required=!1),t},A=Object.entries(R).map((function(e){var t=D()(e,2),r=t[0],n=t[1];return[r,Object.entries(n).map((function(e){var t=D()(e,2),r=t[0],n=t[1];return[r,T(n)]})).reduce((function(e,t){var r=D()(t,2),n=r[0],c=r[1];return e[n]=c,e}),{})]})).reduce((function(e,t){var r=D()(t,2),n=r[0],c=r[1];return e[n]=c,e}),{});function L(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?L(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var U=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=r&&void 0!==A[r]?A[r]:{};return e.map((function(e){var r=M.a[e]||{},c=n[e]||{},o=t[e]||{};return z(z(z({key:e},r),c),o)})).sort((function(e,t){return e.index-t.index}))};function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?V(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):V(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=Object(j.a)((function(e){var t=e.id,r=e.fields,n=void 0===r?Object.keys(M.a):r,i=e.fieldConfig,s=void 0===i?{}:i,u=e.instanceId,p=e.onChange,d=e.type,b=void 0===d?"shipping":d,m=e.values,f=Object(O.b)(),g=f.getValidationError,j=f.setValidationErrors,v=f.clearValidationError,y=Object(h.a)(n),_=g("shipping-missing-country")||{},E=Object(o.useMemo)((function(){return U(y,s,m.country)}),[y,s,m.country]);return Object(o.useEffect)((function(){"shipping"===b&&function(e,t,r,n){n||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),n&&e.country&&r("shipping-missing-country")}(m,j,v,_.message&&!_.hidden)}),[m,_.message,_.hidden,j,v,b]),t=t||u,Object(o.createElement)("div",{id:t,className:"wc-block-components-address-form"},E.map((function(e){if(e.hidden)return null;if("country"===e.key){var r="shipping"===b?S:k;return Object(o.createElement)(r,{key:e.key,id:"".concat(t,"-").concat(e.key),label:e.required?e.label:e.optionalLabel,value:m.country,autoComplete:e.autocomplete,onChange:function(e){return p(F(F({},m),{},{country:e,state:"",city:"",postcode:""}))},errorId:"shipping"===b?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){var n="shipping"===b?N:C;return Object(o.createElement)(n,{key:e.key,id:"".concat(t,"-").concat(e.key),country:m.country,label:e.required?e.label:e.optionalLabel,value:m.state,autoComplete:e.autocomplete,onChange:function(e){return p(F(F({},m),{},{state:e}))},errorMessage:e.errorMessage,required:e.required})}return Object(o.createElement)(a.a,{key:e.key,id:"".concat(t,"-").concat(e.key),className:"wc-block-components-address-form__".concat(e.key),label:e.required?e.label:e.optionalLabel,value:m[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:function(t){return p(F(F({},m),{},c()({},e.key,t)))},errorMessage:e.errorMessage,required:e.required})})))}))},895:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=r(8),u=r.n(s),l=r(1),p=r(6),d=(r(2),r(145)),b=r(97),m=r(94),f=r(33),g=r.n(f),O=r(88),h=(r(243),r(891)),j=function(e){var t=e.address,r=e.onUpdate,n=e.addressFields,c=Object(i.useState)(t),o=a()(c,2),s=o[0],u=o[1],p=Object(O.b)(),d=p.hasValidationErrors,b=p.showAllValidationErrors;return Object(i.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(i.createElement)(h.a,{fields:n,onChange:u,values:s}),Object(i.createElement)(m.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:g()(s,t),onClick:function(e){if(e.preventDefault(),b(),!d)return r(s)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},v=function(e){var t=e.onUpdate,r=void 0===t?function(){}:t,n=e.addressFields,c=void 0===n?["country","state","city","postcode"]:n,o=Object(b.b)(),a=o.shippingAddress,s=o.setShippingAddress;return Object(i.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(i.createElement)(j,{address:a,addressFields:c,onUpdate:function(e){s(e),r(e)}}))},y=r(46),_=r.n(y),E=r(28),w=function(e){var t=e.address;if(0===Object.values(t).length)return null;var r="string"==typeof p.J[t.country]?Object(E.decodeEntities)(p.J[t.country]):"",n="object"===_()(p.M[t.country])&&"string"==typeof p.M[t.country][t.state]?Object(E.decodeEntities)(p.M[t.country][t.state]):t.state,c=[];c.push(t.postcode.toUpperCase()),c.push(t.city),c.push(n),c.push(r);var o=c.filter(Boolean).join(", ");return o&&Object(i.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)(Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),o)+" ")},S=r(42),k=r(375),P=r(253),N=function(e){var t=e.hasRates,r=e.shippingRates,n=e.shippingRatesLoading,c=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(i.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(i.createElement)("legend",{className:"screen-reader-text"},c),Object(i.createElement)(P.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(i.createElement)(k.a,{isDismissible:!1,className:u()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:r,shippingRatesLoading:n}))},C=function(e){return e.some((function(e){return e.shipping_rates.length}))},M=(r(355),function(e){var t=e.showCalculator,r=e.isShippingCalculatorOpen,n=e.setIsShippingCalculatorOpen,c=e.shippingAddress;return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(w,{address:c}),t&&Object(i.createElement)(D,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:r,setIsShippingCalculatorOpen:n}))}),I=function(e){var t=e.showCalculator,r=e.isShippingCalculatorOpen,n=e.setIsShippingCalculatorOpen;return t?Object(i.createElement)(D,{isShippingCalculatorOpen:r,setIsShippingCalculatorOpen:n}):Object(i.createElement)("em",null,Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))},D=function(e){var t=e.label,r=void 0===t?Object(l.__)("Calculate","woo-gutenberg-products-block"):t,n=e.isShippingCalculatorOpen,c=e.setIsShippingCalculatorOpen;return Object(i.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:function(){c(!n)},"aria-expanded":n},r)};t.a=function(e){var t=e.currency,r=e.values,n=e.showCalculator,o=void 0===n||n,s=e.showRateSelector,b=void 0===s||s,m=e.className,f=Object(i.useState)(!1),g=a()(f,2),O=g[0],h=g[1],j=Object(d.a)(),y=j.shippingAddress,_=j.cartHasCalculatedShipping,E=j.shippingRates,w=j.shippingRatesLoading,k=p.p?parseInt(r.total_shipping,10)+parseInt(r.total_shipping_tax,10):parseInt(r.total_shipping,10),P=C(E)||k,D={isShippingCalculatorOpen:O,setIsShippingCalculatorOpen:h};return Object(i.createElement)("div",{className:u()("wc-block-components-totals-shipping",m)},Object(i.createElement)(S.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:_?k:Object(i.createElement)(I,c()({showCalculator:o},D)),description:Object(i.createElement)(i.Fragment,null,_&&Object(i.createElement)(M,c()({shippingAddress:y,showCalculator:o},D))),currency:t}),o&&O&&Object(i.createElement)(v,{onUpdate:function(){h(!1)}}),b&&_&&Object(i.createElement)(N,{hasRates:P,shippingRates:E,shippingRatesLoading:w}))}},9:function(e,t){!function(){e.exports=this.React}()},903:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(5),a=r.n(o),i=r(0),s=r(8),u=r.n(s),l=function(e){return"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--".concat(e)},p=function(e){var t=e.id,r=e.src,n=void 0===r?null:r,c=e.alt,o=void 0===c?"":c;return n?Object(i.createElement)("img",{className:l(t),src:n,alt:o}):null},d=r(6),b=[{id:"alipay",alt:"Alipay",src:d.S+"img/payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.S+"img/payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.S+"img/payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.S+"img/payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.S+"img/payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.S+"img/payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.S+"img/payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.S+"img/payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.S+"img/payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.S+"img/payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.S+"img/payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.S+"img/payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.S+"img/payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.S+"img/payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.S+"img/payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.S+"img/payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.S+"img/payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.S+"img/payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.S+"img/payment-methods/wechat.svg"}],m=r(46),f=r.n(m);r(361);function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){a()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.icons,r=void 0===t?[]:t,n=e.align,o=void 0===n?"center":n,a=function(e){var t={};return e.forEach((function(e){var r={};"string"==typeof e&&(r={id:e,alt:e,src:null}),"object"===f()(e)&&(r={id:e.id||"",alt:e.alt||"",src:e.src||null}),r.id&&!t[r.id]&&(t[r.id]=r)})),Object.values(t)}(r);if(0===a.length)return null;var s=u()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===o,"wc-block-components-payment-method-icons--align-right":"right"===o});return Object(i.createElement)("div",{className:s},a.map((function(e){var t,r=O(O({},e),(t=e.id,b.find((function(e){return e.id===t}))||{}));return Object(i.createElement)(p,c()({key:"payment-method-icon-"+e.id},r))})))}},913:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(1),c=r(6),o=[{destination:{},package_id:0,name:Object(n.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(n._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(n._x)("Beanie","example product in Cart Block","woo-gutenberg-products-block"),quantity:1}],shipping_rates:[{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(n.__)("Free shipping","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"000",rate_id:"free_shipping:1",method_id:"flat_rate",selected:!0},{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(n.__)("Local pickup","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"200",rate_id:"local_pickup:1",method_id:"local_pickup",selected:!1}]}],a={coupons:[],shipping_rates:c.L?o:[],items:[{key:"1",id:1,quantity:2,name:Object(n.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(n.__)("Warm hat for winter","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:10,src:c.S+"img/beanie.jpg",thumbnail:c.S+"img/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(n.__)("Color","woo-gutenberg-products-block"),value:Object(n.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(n.__)("Size","woo-gutenberg-products-block"),value:Object(n.__)("Small","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:"800",regular_price:"800",sale_price:"800",raw_prices:{precision:6,price:"8000000",regular_price:"8000000",sale_price:"8000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"1600",line_subtotal_tax:"0",line_total:"1600",line_total_tax:"0"}},{key:"2",id:2,quantity:1,name:Object(n.__)("Cap","woo-gutenberg-products-block"),short_description:Object(n.__)("Lightweight baseball cap","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:11,src:c.S+"img/cap.jpg",thumbnail:c.S+"img/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(n.__)("Color","woo-gutenberg-products-block"),value:Object(n.__)("Orange","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:"1400",regular_price:"1600",sale_price:"1400",raw_prices:{precision:6,price:"14000000",regular_price:"16000000",sale_price:"14000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"1400",line_subtotal_tax:"0",line_total:"1400",line_total_tax:"0"}}],fees:[],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:c.K,has_calculated_shipping:!0,totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"3000",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"0",total_price:"3000",tax_lines:[]}}},94:function(e,t,r){"use strict";var n=r(11),c=r.n(n),o=r(24),a=r.n(o),i=r(0),s=r(212),u=(r(2),r(8)),l=r.n(u);r(217);t.a=function(e){var t=e.className,r=e.showSpinner,n=void 0!==r&&r,o=e.children,u=a()(e,["className","showSpinner","children"]),p=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(i.createElement)(s.a,c()({className:p},u),n&&Object(i.createElement)("span",{className:"wc-block-components-button__spinner","aria-hidden":"true"}),Object(i.createElement)("span",{className:"wc-block-components-button__text"},o))}},95:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(18),c=r.n(n),o=r(0),a=function(){var e=Object(o.useState)(),t=c()(e,2)[1];return Object(o.useCallback)((function(e){return t((function(){throw e}))}),[])}},96:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(9),c=function(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}},97:function(e,t,r){"use strict";r.d(t,"b",(function(){return R})),r.d(t,"a",(function(){return T}));var n=r(5),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=r(145),u=r(21),l=r(37),p=r(95),d=r(33),b=r.n(d),m=function(e){return e.map((function(e){var t;return[e.package_id,null===(t=e.shipping_rates.find((function(e){return e.selected})))||void 0===t?void 0:t.rate_id]})).reduce((function(e,t){var r=a()(t,2),n=r[0],c=r[1];return c&&(e[n]=c),e}),{})},f={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},g={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},O={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:function(){return null},shippingErrorTypes:f,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:function(){return null},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:function(){return null},onShippingRateSuccess:function(){return null},onShippingRateFail:function(){return null},onShippingRateSelectSuccess:function(){return null},onShippingRateSelectFail:function(){return null},needsShipping:!1},h=function(e,t){var r=t.type;return Object.values(f).includes(r)?r:e},j=r(143),v=r(381),y="shipping_rates_success",_="shipping_rates_fail",E="shipping_rate_select_success",w="shipping_rate_select_fail",S=function(e){return{onSuccess:Object(v.a)(y,e),onFail:Object(v.a)(_,e),onSelectSuccess:Object(v.a)(E,e),onSelectFail:Object(v.a)(w,e)}},k=r(382),P=r(98),N=r(99);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var M=f.NONE,I=f.INVALID_ADDRESS,D=f.UNKNOWN,x=Object(i.createContext)(O),R=function(){return Object(i.useContext)(x)},T=function(e){var t=e.children,r=Object(P.b)().dispatchActions,n=Object(N.b)(),o=n.shippingAddress,d=n.setShippingAddress,O=Object(s.a)(),v=O.cartNeedsShipping,R=O.cartHasCalculatedShipping,T=O.shippingRates,A=O.shippingRatesLoading,L=O.cartErrors,z=function(){var e=Object(p.a)(),t=Object(u.useDispatch)(l.CART_STORE_KEY).selectShippingRate;return{selectShippingRate:Object(i.useCallback)((function(r,n){t(r,n).catch((function(t){e(t)}))}),[e,t]),isSelectingRate:Object(u.useSelect)((function(e){return e(l.CART_STORE_KEY).isShippingRateBeingSelected()}),[])}}(),U=z.selectShippingRate,V=z.isSelectingRate,F=Object(i.useReducer)(h,M),q=a()(F,2),B=q[0],Y=q[1],H=Object(i.useReducer)(j.b,{}),G=a()(H,2),Q=G[0],W=G[1],$=Object(i.useRef)(Q),K=Object(i.useMemo)((function(){return{onShippingRateSuccess:S(W).onSuccess,onShippingRateFail:S(W).onFail,onShippingRateSelectSuccess:S(W).onSelectSuccess,onShippingRateSelectFail:S(W).onSelectFail}}),[W]);Object(i.useEffect)((function(){$.current=Q}),[Q]);var X=Object(i.useRef)((function(){return m(T)}));Object(i.useEffect)((function(){var e=m(T);b()(X.current,e)||(X.current=e)}),[T]),Object(i.useEffect)((function(){A?r.incrementCalculating():r.decrementCalculating()}),[A,r]),Object(i.useEffect)((function(){V?r.incrementCalculating():r.decrementCalculating()}),[V,r]),Object(i.useEffect)((function(){L.length>0&&L.some((function(e){return!(!e.code||!Object.values(g).includes(e.code))}))?Y({type:I}):Y({type:M})}),[L]);var J=Object(i.useMemo)((function(){return{isPristine:B===M,isValid:B===M,hasInvalidAddress:B===I,hasError:B===D||B===I}}),[B]);Object(i.useEffect)((function(){A||0!==T.length&&!J.hasError||Object(k.a)($.current,_,{hasInvalidAddress:J.hasInvalidAddress,hasError:J.hasError})}),[T,A,J.hasError,J.hasInvalidAddress]),Object(i.useEffect)((function(){!A&&T.length>0&&!J.hasError&&Object(k.a)($.current,y,T)}),[T,A,J.hasError]),Object(i.useEffect)((function(){V||(J.hasError?Object(k.a)($.current,w,{hasError:J.hasError,hasInvalidAddress:J.hasInvalidAddress}):Object(k.a)($.current,E,X.current))}),[V,J.hasError,J.hasInvalidAddress]);var Z=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({shippingErrorStatus:J,dispatchErrorStatus:Y,shippingErrorTypes:f,shippingRates:T,shippingRatesLoading:A,selectedRates:X.current,setSelectedRates:U,isSelectingRate:V,shippingAddress:o,setShippingAddress:d,needsShipping:v,hasCalculatedShipping:R},K);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)(x.Provider,{value:Z},t))}},98:function(e,t,r){"use strict";r.d(t,"b",(function(){return Le})),r.d(t,"a",(function(){return ze}));var n=r(5),c=r.n(n),o=r(18),a=r.n(o),i=r(0),s=r(1),u=r(134),l=r(208),p=r(21),d=r(96),b=r(3),m="pristine",f="idle",g="processing",O="complete",h="before_processing",j="after_processing",v=Object(b.getSetting)("checkoutData",{order_id:0,customer_id:0}),y={redirectUrl:"",status:m,hasError:!1,calculatingCount:0,orderId:v.order_id,orderNotes:"",customerId:v.customer_id,shouldCreateAccount:!1,processingResponse:null},_={SET_IDLE:"set_idle",SET_PRISTINE:"set_pristine",SET_REDIRECT_URL:"set_redirect_url",SET_COMPLETE:"set_checkout_complete",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_PROCESSING:"set_checkout_is_processing",SET_HAS_ERROR:"set_checkout_has_error",SET_NO_ERROR:"set_checkout_no_error",SET_CUSTOMER_ID:"set_checkout_customer_id",SET_ORDER_ID:"set_checkout_order_id",SET_ORDER_NOTES:"set_checkout_order_notes",INCREMENT_CALCULATING:"increment_calculating",DECREMENT_CALCULATING:"decrement_calculating"},E=_.SET_PRISTINE,w=_.SET_IDLE,S=_.SET_PROCESSING,k=_.SET_BEFORE_PROCESSING,P=_.SET_AFTER_PROCESSING,N=_.SET_PROCESSING_RESPONSE,C=_.SET_REDIRECT_URL,M=_.SET_COMPLETE,I=_.SET_HAS_ERROR,D=_.SET_NO_ERROR,x=_.INCREMENT_CALCULATING,R=_.DECREMENT_CALCULATING,T=_.SET_CUSTOMER_ID,A=_.SET_ORDER_ID,L=_.SET_SHOULD_CREATE_ACCOUNT,z=_.SET_ORDER_NOTES,U=function(){return{type:E}},V=function(){return{type:w}},F=function(){return{type:S}},q=function(e){return{type:C,url:e}},B=function(e){return{type:N,data:e}},Y=function(e){return{type:M,data:e}},H=function(){return{type:k}},G=function(){return{type:P}},Q=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=e?I:D;return{type:t}},W=function(){return{type:x}},$=function(){return{type:R}},K=function(e){return{type:T,customerId:e}},X=function(e){return{type:A,orderId:e}},J=function(e){return{type:L,shouldCreateAccount:e}},Z=function(e){return{type:z,orderNotes:e}},ee=r(28);function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?te(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):te(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ne=_.SET_PRISTINE,ce=_.SET_IDLE,oe=_.SET_PROCESSING,ae=_.SET_BEFORE_PROCESSING,ie=_.SET_AFTER_PROCESSING,se=_.SET_PROCESSING_RESPONSE,ue=_.SET_REDIRECT_URL,le=_.SET_COMPLETE,pe=_.SET_HAS_ERROR,de=_.SET_NO_ERROR,be=_.INCREMENT_CALCULATING,me=_.DECREMENT_CALCULATING,fe=_.SET_CUSTOMER_ID,ge=_.SET_ORDER_ID,Oe=_.SET_ORDER_NOTES,he=_.SET_SHOULD_CREATE_ACCOUNT,je=m,ve=f,ye=g,_e=h,Ee=j,we=O,Se=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y,t=arguments.length>1?arguments[1]:void 0,r=t.url,n=t.type,c=t.customerId,o=t.orderId,a=t.orderNotes,i=t.shouldCreateAccount,s=t.data,u=e;switch(n){case ne:u=y;break;case ce:u=e.status!==ve?re(re({},e),{},{status:ve}):e;break;case ue:u=r!==e.url?re(re({},e),{},{redirectUrl:r}):e;break;case se:u=re(re({},e),{},{processingResponse:s});break;case le:u=e.status!==we?re(re({},e),{},{status:we,redirectUrl:(null==s?void 0:s.redirectUrl)||e.redirectUrl}):e;break;case oe:u=!1===(u=e.status!==ye?re(re({},e),{},{status:ye,hasError:!1}):e).hasError?u:re(re({},u),{},{hasError:!1});break;case ae:u=e.status!==_e?re(re({},e),{},{status:_e,hasError:!1}):e;break;case ie:u=e.status!==Ee?re(re({},e),{},{status:Ee}):e;break;case pe:u=e.hasError?e:re(re({},e),{},{hasError:!0}),u=e.status===ye||e.status===_e?re(re({},u),{},{status:ve}):u;break;case de:u=e.hasError?re(re({},e),{},{hasError:!1}):e;break;case be:u=re(re({},e),{},{calculatingCount:e.calculatingCount+1});break;case me:u=re(re({},e),{},{calculatingCount:Math.max(0,e.calculatingCount-1)});break;case fe:u=re(re({},e),{},{customerId:c});break;case ge:u=re(re({},e),{},{orderId:o});break;case he:i!==e.shouldCreateAccount&&(u=re(re({},e),{},{shouldCreateAccount:i}));break;case Oe:e.orderNotes!==a&&(u=re(re({},e),{},{orderNotes:a}))}return u!==e&&n!==ne&&u.status===je&&(u.status=ve),u},ke=r(143),Pe=r(381),Ne="checkout_before_processing",Ce="checkout_after_processing_with_success",Me="checkout_after_processing_with_error",Ie=function(e){return{onCheckoutAfterProcessingWithSuccess:Object(Pe.a)(Ce,e),onCheckoutAfterProcessingWithError:Object(Pe.a)(Me,e),onCheckoutBeforeProcessing:Object(Pe.a)(Ne,e)}},De=r(382),xe=r(88);function Re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Te(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(r),!0).forEach((function(t){c()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ae=Object(i.createContext)({isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onSubmit:function(){},onCheckoutAfterProcessingWithSuccess:function(e){},onCheckoutAfterProcessingWithError:function(e){},onCheckoutBeforeProcessing:function(e){},dispatchActions:{resetCheckout:function(){},setRedirectUrl:function(e){},setHasError:function(e){},setAfterProcessing:function(e){},incrementCalculating:function(){},decrementCalculating:function(){},setCustomerId:function(e){},setOrderId:function(e){},setOrderNotes:function(e){}},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:function(e){}}),Le=function(){return Object(i.useContext)(Ae)},ze=function(e){var t=e.children,r=e.redirectUrl,n=e.isCart,c=void 0!==n&&n;y.redirectUrl=r;var o,b=Object(i.useReducer)(Se,y),m=a()(b,2),v=m[0],_=m[1],E=Object(i.useReducer)(ke.b,{}),w=a()(E,2),S=w[0],k=w[1],P=Object(i.useRef)(S),N=Object(xe.b)().setValidationErrors,C=Object(u.a)(),M=C.addErrorNotice,I=C.removeNotices,D=v.calculatingCount>0,x=Object(l.a)(),R=x.isSuccessResponse,T=x.isErrorResponse,A=x.isFailResponse,L=x.shouldRetry,z=(o=Object(l.a)().noticeContexts,{checkoutNotices:Object(p.useSelect)((function(e){return e("core/notices").getNotices("wc/checkout")}),[]),expressPaymentNotices:Object(p.useSelect)((function(e){return e("core/notices").getNotices(o.EXPRESS_PAYMENTS)}),[o.EXPRESS_PAYMENTS]),paymentNotices:Object(p.useSelect)((function(e){return e("core/notices").getNotices(o.PAYMENTS)}),[o.PAYMENTS])}),te=z.checkoutNotices,re=z.paymentNotices,ne=z.expressPaymentNotices;Object(i.useEffect)((function(){P.current=S}),[S]);var ce=Object(i.useMemo)((function(){return Ie(k).onCheckoutAfterProcessingWithSuccess}),[k]),oe=Object(i.useMemo)((function(){return Ie(k).onCheckoutAfterProcessingWithError}),[k]),ae=Object(i.useMemo)((function(){return Ie(k).onCheckoutBeforeProcessing}),[k]),ie=Object(i.useMemo)((function(){return{resetCheckout:function(){_(U())},setRedirectUrl:function(e){_(q(e))},setHasError:function(e){_(Q(e))},incrementCalculating:function(){_(W())},decrementCalculating:function(){_($())},setCustomerId:function(e){_(K(e))},setOrderId:function(e){_(X(e))},setOrderNotes:function(e){_(Z(e))},setAfterProcessing:function(e){var t,r,n,c;(!e.payment_result&&e.message&&200!==(null==e||null===(t=e.data)||void 0===t?void 0:t.status)&&(e.payment_result=Te(Te({},e.payment_result),{},{message:e.message})),e.payment_result)&&(null!==(r=e.payment_result)&&void 0!==r&&r.redirect_url&&_(q(e.payment_result.redirect_url)),_(B((n=e.payment_result,c={message:(null==n?void 0:n.message)||"",paymentStatus:n.payment_status,paymentDetails:{}},Array.isArray(n.payment_details)&&n.payment_details.forEach((function(e){var t=e.key,r=e.value;c.paymentDetails[t]=Object(ee.decodeEntities)(r)})),c))));_(G())}}}),[]);Object(i.useEffect)((function(){v.status===h&&(I("error"),Object(De.a)(P.current,Ne,{}).then((function(e){!0!==e?(Array.isArray(e)&&e.forEach((function(e){var t=e.errorMessage,r=e.validationErrors;M(t),N(r)})),_(V())):_(F())})))}),[v.status,N,M,I,_]);var se=Object(d.a)(v.status),ue=Object(d.a)(v.hasError);Object(i.useEffect)((function(){if((v.status!==se||v.hasError!==ue)&&v.status===j){var e={redirectUrl:v.redirectUrl,orderId:v.orderId,customerId:v.customerId,customerNote:v.customerNote,processingResponse:v.processingResponse};v.hasError?Object(De.b)(P.current,Me,e).then((function(t){if(T(t)||A(t)){if(t.message){var r={id:null==t?void 0:t.messageContext,context:null==t?void 0:t.messageContext};M(t.message,r)}L(t)?_(V()):_(Y(t))}else{if(!(te.some((function(e){return"error"===e.status}))||ne.some((function(e){return"error"===e.status}))||re.some((function(e){return"error"===e.status})))){var n,c=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(s.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");M(c,{id:"checkout"})}_(V())}})):Object(De.b)(P.current,Ce,e).then((function(e){if(R(e))_(Y(e));else if(T(e)||A(e)){if(e.message){var t=e.messageContext?{context:e.messageContext}:void 0;M(e.message,t)}L(e)?_(Q(!0)):_(Y(e))}else _(Y())}))}}),[v.status,v.hasError,v.redirectUrl,v.orderId,v.customerId,v.customerNote,v.processingResponse,se,ue,ie,M,T,A,R,L,te,ne,re]);var le={onSubmit:Object(i.useCallback)((function(){_(H())}),[]),isComplete:v.status===O,isIdle:v.status===f,isCalculating:D,isProcessing:v.status===g,isBeforeProcessing:v.status===h,isAfterProcessing:v.status===j,hasError:v.hasError,redirectUrl:v.redirectUrl,onCheckoutAfterProcessingWithSuccess:ce,onCheckoutAfterProcessingWithError:oe,onCheckoutBeforeProcessing:ae,dispatchActions:ie,isCart:c,orderId:v.orderId,hasOrder:!!v.orderId,customerId:v.customerId,orderNotes:v.orderNotes,shouldCreateAccount:v.shouldCreateAccount,setShouldCreateAccount:function(e){return _(J(e))}};return Object(i.createElement)(Ae.Provider,{value:le},t)}},99:function(e,t,r){"use strict";r.d(t,"b",(function(){return y})),r.d(t,"a",(function(){return _}));var n=r(0),c=r(5),o=r.n(c),a=r(18),i=r.n(a),s=r(21),u=r(37),l=r(536),p=r(33),d=r.n(p),b=r(38),m=function(e){var t=e.country,r=void 0===t?"":t,n=e.state,c=void 0===n?"":n,o=e.city,a=void 0===o?"":o,i=e.postcode,s=void 0===i?"":i;return{country:r.trim(),state:c.trim(),city:a.trim(),postcode:s?s.replace(" ","").toUpperCase():""}},f=function(e,t){return!!t.country&&!d()(m(e),m(t))},g=r(134),O=r(145);function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v=Object(n.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setBillingData:function(){return null},setShippingAddress:function(){return null}}),y=function(){return Object(n.useContext)
|