diff --git a/build/blocks.deps.json b/build/blocks.deps.json new file mode 100644 index 00000000000..604b0110f15 --- /dev/null +++ b/build/blocks.deps.json @@ -0,0 +1 @@ +["wp-blocks","wp-components","wp-element","wp-i18n","wp-polyfill"] \ No newline at end of file diff --git a/build/blocks.js b/build/blocks.js new file mode 100644 index 00000000000..f761afb89a5 --- /dev/null +++ b/build/blocks.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.blocks=function(e){function t(t){for(var c,i,l=t[0],a=t[1],s=t[2],h=0,f=[];hdiv{width:100%;white-space:nowrap;overflow:hidden;display:flex}.woocommerce-slide-animation.animate-left .slide-enter-active{-webkit-animation:slide-in-left;animation:slide-in-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-left .slide-exit-active{-webkit-animation:slide-out-left;animation:slide-out-left;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-enter-active{-webkit-animation:slide-in-right;animation:slide-in-right;-webkit-animation-duration:.2s;animation-duration:.2s}.woocommerce-slide-animation.animate-right .slide-exit-active{-webkit-animation:slide-out-right;animation:slide-out-right;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (prefers-reduced-motion:reduce){.woocommerce-slide-animation .slide-enter-active,.woocommerce-slide-animation .slide-exit-active{-webkit-animation:none!important;animation:none!important}}.woocommerce-calendar{width:100%;background-color:#f8f9f9;border-top:1px solid #ccd0d4;height:396px}.woocommerce-calendar.is-mobile{height:100%}.woocommerce-calendar__react-dates{width:100%;overflow-x:hidden}.woocommerce-calendar__react-dates .DayPicker{margin:0 auto}.woocommerce-calendar__react-dates .CalendarMonth_table{margin-top:10px}.woocommerce-calendar__react-dates .CalendarDay__selected_span{background:#95588a;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__selected{background:#622557;border:1px solid #ccd0d4}.woocommerce-calendar__react-dates .CalendarDay__hovered_span{background:#95588a;border:1px solid #e2e4e7;color:#fff}.woocommerce-calendar__react-dates .CalendarDay__blocked_out_of_range{color:#a2aab2}.woocommerce-calendar__react-dates .CalendarMonth,.woocommerce-calendar__react-dates .CalendarMonthGrid,.woocommerce-calendar__react-dates .DayPicker,.woocommerce-calendar__react-dates .DayPicker_transitionContainer{background-color:#f8f9f9}.woocommerce-calendar__react-dates .DayPicker_weekHeader_li{color:#606a73}.woocommerce-calendar__react-dates .DayPickerNavigation_button:focus{outline:2px solid #bfe7f3}.woocommerce-calendar__react-dates.is-core-datepicker .components-datetime__date{padding-left:0}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__default{background-color:transparent}.woocommerce-calendar__react-dates.is-core-datepicker .CalendarDay__selected{background:#622557;border:none}.woocommerce-calendar__inputs{padding:1em;width:100%;max-width:500px;display:-ms-grid;display:grid;-ms-grid-columns:43% 14% 43%;grid-template-columns:43% 14% 43%;margin:0 auto}.woocommerce-calendar__inputs .components-base-control{margin:0}.woocommerce-calendar__inputs-to{display:flex;align-items:center;justify-content:center;-ms-grid-column:2;grid-column-start:2}.woocommerce-calendar__input{position:relative}.woocommerce-calendar__input .dashicons-calendar{position:absolute;top:50%;transform:translateY(-50%);left:10px}.woocommerce-calendar__input .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input:first-child{-ms-grid-column:1;grid-column-start:1}.woocommerce-calendar__input:last-child{-ms-grid-column:3;grid-column-start:3}.woocommerce-calendar__input.is-empty .dashicons-calendar path{fill:#6c7781}.woocommerce-calendar__input.is-error .dashicons-calendar path{fill:#d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text{border:1px solid #d94f4f;box-shadow:inset 0 0 8px #d94f4f}.woocommerce-calendar__input.is-error .woocommerce-calendar__input-text:focus{box-shadow:inset 0 0 8px #d94f4f,0 0 6px rgba(30,140,190,.8)}.woocommerce-calendar__input .woocommerce-calendar__input-text{color:#555d66;border-radius:3px;padding:10px 10px 10px 30px;width:100%;font-size:13px;font-size:.8125rem}.woocommerce-calendar__input .woocommerce-calendar__input-text:-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-ms-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-webkit-input-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::-moz-placeholder{color:#6c7781}.woocommerce-calendar__input .woocommerce-calendar__input-text::placeholder{color:#6c7781}.woocommerce-filters-date__content.is-mobile .woocommerce-calendar__input-error .components-popover__content{height:auto}.woocommerce-calendar__input-error{display:none}.is-error .woocommerce-calendar__input-text:focus+span .woocommerce-calendar__input-error{display:block;left:50%!important;position:absolute;top:auto!important}.woocommerce-calendar__input-error .components-popover__content{background-color:#606a73;color:#fff;padding:.5em;border:none}.woocommerce-calendar__input-error.components-popover .components-popover__content{min-width:100px;width:100px;text-align:center}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-bottom:before{border-bottom-color:#606a73;z-index:1;top:-6px}.woocommerce-calendar__input-error.components-popover:not(.no-arrow):not(.is-mobile).is-top:after{border-top-color:#606a73;z-index:1;top:0}.woocommerce-calendar__date-picker-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-card{margin-bottom:24px;background:#fff;border-radius:3px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);transition:box-shadow .2s cubic-bezier(.4,1,.4,1)}@media (max-width:782px){.woocommerce-card{margin-bottom:12px;width:auto}}.woocommerce-card.is-inactive{background-color:#f6f6f6;box-shadow:none}.woocommerce-card__header{padding:16px;display:-ms-grid;display:grid;align-items:center;border-top-left-radius:3px;border-top-left-radius:4px}.has-action .woocommerce-card__header{-ms-grid-columns:auto 1fr;grid-template-columns:auto 1fr}.has-menu .woocommerce-card__header{-ms-grid-columns:auto 24px;grid-template-columns:auto 24px}.has-menu.has-action .woocommerce-card__header{grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-card__header-item{-ms-grid-row-align:center}.woocommerce-card__header-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__header-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-card__action,.woocommerce-card__menu{text-align:right}.woocommerce-card__body{padding:16px}.woocommerce-card__title{margin:0;font-size:24px;font-size:1.5rem;line-height:1.2;font-weight:400}.woocommerce-card__description{font-size:16px;font-size:1rem;line-height:1.5;color:#636d75;margin-top:12px;margin-bottom:0;font-weight:400}.woocommerce-chart{margin-top:-16px;margin-bottom:24px;background:#fff;border:1px solid #ccd0d4;border-top:0}@media (max-width:782px){.woocommerce-chart{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-chart .woocommerce-chart__header{min-height:50px;border-bottom:1px solid #ccd0d4;display:flex;flex-flow:row wrap;justify-content:space-between;align-items:center;width:100%}.woocommerce-chart .woocommerce-chart__header .woocommerce-chart__title{height:18px;color:#24292d;font-size:15px;font-weight:600;line-height:18px;margin-left:16px;margin-right:16px}.woocommerce-chart .woocommerce-chart__body{display:flex;flex-direction:row;justify-content:flex-start;align-items:flex-start;width:100%}.woocommerce-chart .woocommerce-chart__body.woocommerce-chart__body-column{flex-direction:column}.woocommerce-chart .woocommerce-chart__footer{width:100%}.woocommerce-chart-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;padding:0;width:100%;display:flex;align-items:center;justify-content:center}.woocommerce-chart-placeholder:after{content:"\00a0"}.woocommerce-chart-placeholder .components-spinner{margin:0}.woocommerce-chart__interval-select{align-items:start;border-right:1px solid #ccd0d4;display:flex;flex-direction:column;justify-content:center;margin:0 0 0 auto;min-height:50px;padding:8px 16px 0}@media (max-width:960px){.woocommerce-chart__interval-select{width:100%;order:1;margin-top:-8px;margin-left:0;padding-left:8px;border-right:0;min-height:0}}#wpbody .woocommerce-chart__interval-select .components-select-control__input{font-size:13px;font-size:.8125rem;border:0;box-shadow:none}#wpbody .woocommerce-chart__interval-select .components-select-control__input:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff;color:#191e23;box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-chart__types{padding:0 8px;white-space:nowrap}.woocommerce-chart__type-button{background:transparent!important}.woocommerce-chart__type-button.components-icon-button{color:#ccd0d4}.woocommerce-chart__type-button.components-icon-button.woocommerce-chart__type-button-selected{color:#555d66}.woocommerce-chart__type-button.components-icon-button:hover{box-shadow:none!important}@media (max-width:960px){.woocommerce-summary+.woocommerce-chart .woocommerce-chart__title{display:none}.woocommerce-summary+.woocommerce-chart .woocommerce-chart__interval-select{width:auto;order:0;margin-top:0}}.woocommerce-legend.has-total{padding-bottom:50px;position:relative}.woocommerce-legend.woocommerce-legend__direction-column{border-right:1px solid #ccd0d4;min-width:320px}.woocommerce-chart__footer .woocommerce-legend.woocommerce-legend__direction-column{border-right:none}.woocommerce-legend__list{color:#24292d;display:flex;height:100%;margin:0}.woocommerce-legend__direction-column .woocommerce-legend__list{flex-direction:column;height:300px;overflow:auto}.woocommerce-chart__footer .woocommerce-legend__direction-column .woocommerce-legend__list{border-top:1px solid #ccd0d4;height:100%;max-height:none;min-height:none}.has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:250px}.woocommerce-chart__footer .has-total.woocommerce-legend__direction-column .woocommerce-legend__list{height:auto;max-height:220px;min-height:none}.woocommerce-legend__direction-row .woocommerce-legend__list{flex-direction:row}.woocommerce-legend__item>button{display:flex;justify-content:center;align-items:center;background-color:#fff;color:#555d66;cursor:pointer;display:inline-flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;width:100%;border:none;padding:0}.woocommerce-legend__item>button .woocommerce-legend__item-container{display:flex;flex-direction:row;flex-wrap:nowrap;position:relative;padding:3px 0 3px 24px;font-size:13px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.woocommerce-legend__item>button .woocommerce-legend__item-container:hover input~.woocommerce-legend__item-checkmark{background-color:#f3f4f5}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{border:1px solid #a2aab2;position:absolute;top:4px;left:0;height:16px;width:16px;background-color:#fff}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark:after{content:"";position:absolute;display:none}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked{background-color:currentColor;border-color:currentColor}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark.woocommerce-legend__item-checkmark-checked:after{display:block;left:5px;top:2px;width:3px;height:6px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}.woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-total{margin-left:auto;font-weight:700}.woocommerce-legend__item>button:focus{outline:none}.woocommerce-legend__item>button:focus .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{outline:2px solid #a2aab2}.woocommerce-legend__item>button:hover{background-color:#f8f9f9}.woocommerce-legend__direction-column .woocommerce-legend__item{margin:0;padding:0}.woocommerce-legend__direction-column .woocommerce-legend__item>button{min-height:36px;padding:0 17px;text-align:left}.woocommerce-legend__direction-column .woocommerce-legend__item:first-child{margin-top:12px}.woocommerce-legend__direction-column .woocommerce-legend__item:last-child:after{content:"";display:block;height:12px;width:100%}.woocommerce-legend__direction-row .woocommerce-legend__item{padding:0;margin:0}.woocommerce-legend__direction-row .woocommerce-legend__item>button{padding:0 17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container{height:50px;align-items:center}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-checkmark{top:17px}.woocommerce-legend__direction-row .woocommerce-legend__item>button .woocommerce-legend__item-container .woocommerce-legend__item-title{margin-right:17px}.woocommerce-legend__total{align-items:center;background:#fff;border-top:1px solid #ccd0d4;bottom:0;color:#555d66;display:flex;height:50px;justify-content:center;left:0;position:absolute;right:0;text-transform:uppercase}.woocommerce-legend__total:before{background:linear-gradient(180deg,transparent,rgba(0,0,0,.2));bottom:100%;content:"";height:20px;left:0;opacity:0;pointer-events:none;position:absolute;right:0;transition:opacity .3s}.is-scrollable .woocommerce-legend__total:before{opacity:1}.woocommerce-chart__body-row .d3-chart__container{width:calc(100% - 320px)}.d3-chart__container{position:relative;width:100%}.d3-chart__container svg{overflow:visible}.d3-chart__container .d3-chart__empty-message{align-items:center;bottom:0;color:#6c7781;display:flex;font-size:18px;font-size:1.125rem;font-weight:700;justify-content:center;left:0;line-height:1.5;margin:0 auto;max-width:50%;padding-bottom:48px;pointer-events:none;position:absolute;right:0;top:0;text-align:center;z-index:1}@media (max-width:782px){.d3-chart__container .d3-chart__empty-message{font-size:13px;font-size:.8125rem}}.d3-chart__container .d3-chart__tooltip{border:1px solid #ccd0d4;position:absolute;display:flex;min-width:324px;height:auto;background-color:#fff;text-align:left;padding:17px;box-shadow:0 3px 20px 0 rgba(18,24,30,.1),0 1px 3px 0 rgba(18,24,30,.1);flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;pointer-events:none;visibility:hidden;z-index:1}@media (max-width:600px){.d3-chart__container .d3-chart__tooltip{min-width:auto;width:calc(100% - 48px)}}.d3-chart__container .d3-chart__tooltip h4{text-align:left;line-height:18px;width:100%;text-transform:uppercase;font-size:11px;color:#6c7781;margin-top:0}.d3-chart__container .d3-chart__tooltip ul{list-style:none;margin-bottom:2px;margin-top:2px;font-size:14px}.d3-chart__container .d3-chart__tooltip ul li{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-items:center}.d3-chart__container .d3-chart__tooltip ul li.key-row{display:flex;flex-direction:row;justify-content:space-between;width:100%}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container{width:100%;min-width:100px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-color{display:inline-block;width:16px;height:16px;margin-right:8px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-container .key-key{margin-right:6px}.d3-chart__container .d3-chart__tooltip ul li.key-row .key-value{font-weight:600}.d3-chart__container .bargrouprect{shape-rendering:crispEdges}.d3-chart__container .grid .tick line{stroke:#e2e4e7;stroke-width:1;shape-rendering:crispEdges}.d3-chart__container .grid .tick:first-child line{stroke:#555d66}.d3-chart__container .grid.with-positive-ticks .tick:last-child line{opacity:0}.d3-chart__container .tick{padding-top:10px;stroke-width:1}.d3-chart__container .y-axis{text-anchor:start}.d3-chart__container .y-axis.ticktext{fill:#555d66}.d3-chart__container .axis-month .tick text,.d3-chart__container .y-axis .tick text{font-size:10px}.d3-chart__container .focus-grid line{stroke:rgba(0,0,0,.1);stroke-width:1px}.d3-chart__container .barfocus{fill:rgba(0,0,0,.1)}.d3-base{background:transparent;overflow-x:auto;overflow-y:hidden;position:relative;width:100%;height:100%}.woocommerce-count{border:1px solid;border-radius:10px;padding:0 8px;font-weight:700}.woocommerce-page .woocommerce-dropdown-button{background-color:#fff;position:relative;border:1px solid #e2e4e7;color:#555d66;border-radius:4px;padding:0 40px 0 0;width:100%}.woocommerce-page .woocommerce-dropdown-button:after{content:"";position:absolute;right:14px;top:50%;transform:translateY(-50%);width:0;height:0;border-color:#555d66 transparent transparent;border-style:solid;border-width:6px 6px 0;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-page .woocommerce-dropdown-button:after{transition:none}}.woocommerce-page .woocommerce-dropdown-button.is-open:after{transform:translateY(-50%) rotate(180deg)}.woocommerce-page .woocommerce-dropdown-button.is-open,.woocommerce-page .woocommerce-dropdown-button:active,.woocommerce-page .woocommerce-dropdown-button:hover{background-color:#f8f9f9}.woocommerce-page .woocommerce-dropdown-button.is-multi-line .woocommerce-dropdown-button__labels{flex-direction:column}.woocommerce-dropdown-button__labels{text-align:left;padding:8px 12px;min-height:48px;display:flex;align-items:center;width:100%;justify-content:space-around}@media (max-width:400px){.woocommerce-dropdown-button__labels{min-height:46px}}.woocommerce-dropdown-button__labels span{width:100%;text-align:left}.woocommerce-dropdown-button__labels span:last-child{font-size:12px;font-size:.75rem;margin:0}.woocommerce-dropdown-button__labels span:first-child{font-size:13px;font-size:.8125rem;font-weight:600}@media (max-width:400px){.woocommerce-dropdown-button__labels span:last-child{font-size:10px;font-size:.625rem}.woocommerce-dropdown-button__labels span:first-child{font-size:12px;font-size:.75rem}}.woocommerce-ellipsis-menu{text-align:center}.woocommerce-ellipsis-menu__toggle{height:24px;justify-content:center;vertical-align:middle;width:24px}.woocommerce-ellipsis-menu__toggle .dashicon{transform:rotate(90deg)}.woocommerce-ellipsis-menu__popover{text-align:left}.woocommerce-ellipsis-menu__popover:not(.is-mobile):after,.woocommerce-ellipsis-menu__popover:not(.is-mobile):before{margin-left:-16px}.woocommerce-ellipsis-menu__popover .components-popover__content{width:182px;padding:2px}.woocommerce-ellipsis-menu__popover .components-form-toggle.is-checked .components-form-toggle__track{background-color:#95588a}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__content{width:100%}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{padding:4px 12px}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item{cursor:pointer;color:#6c7781}.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__item:focus{box-shadow:inset 0 0 0 1px #6c7781,inset 0 0 0 2px #fff;outline:2px solid transparent;outline-offset:-2px}.woocommerce-ellipsis-menu__popover .components-base-control__label,.woocommerce-ellipsis-menu__popover .woocommerce-ellipsis-menu__title{color:#23282d;padding-top:8px;padding-bottom:8px;font-size:15px;font-size:.9375rem;margin-bottom:4px}.woocommerce-ellipsis-menu__popover .components-toggle-control .components-base-control__field{margin:4px 0}.woocommerce-ellipsis-menu__popover .components-base-control{margin:0}.woocommerce-empty-content{margin-bottom:16px;text-align:center}.woocommerce-empty-content .woocommerce-empty-content__illustration{max-width:100%}.woocommerce-empty-content .woocommerce-empty-content__actions .components-button+.components-button{margin-left:16px}.woocommerce-filters-advanced{margin:24px 0}.woocommerce-filters-advanced .woocommerce-card__header{padding:8px 16px}.woocommerce-filters-advanced .woocommerce-card__body{padding:0}.woocommerce-filters-advanced .components-select-control__input{height:38px;padding:0;margin:0}.woocommerce-filters-advanced .components-base-control__field{margin-bottom:0}@media (max-width:782px){.woocommerce-filters-advanced{margin:16px 0;border:1px solid #ccd0d4}}@media (max-width:400px){.woocommerce-filters-advanced{margin:12px 0}}.woocommerce-filters-advanced__title-select{width:70px;display:inline-block;margin:0 8px}.woocommerce-filters-advanced__list{margin:0}.woocommerce-filters-advanced__list-item{padding:0 16px 0 0;margin:0;display:-ms-grid;display:grid;-ms-grid-columns:1fr 40px;grid-template-columns:1fr 40px;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__list-item:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__line-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__list-item fieldset{padding:8px 8px 8px 16px}.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{width:40px;height:38px;-ms-grid-row-align:center;align-self:center}@media (max-width:400px){.woocommerce-filters-advanced__list-item .woocommerce-filters-advanced__remove{position:absolute;top:0;right:4px}}.woocommerce-filters-advanced__list-item .components-form-token-field{border-radius:4px}@media (max-width:400px){.woocommerce-filters-advanced__list-item{display:block;position:relative;padding:8px 8px 0 0}}.woocommerce-filters-advanced__add-filter{padding:12px;margin:0;color:#95588a;display:block;background-color:#f8f9f9;border-bottom:1px solid #ccd0d4}.woocommerce-filters-advanced__add-filter:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-filter div div{display:inline-block}.woocommerce-filters-advanced__add-filter .components-popover:not(.is-mobile) .components-popover__content{min-width:180px}.woocommerce-filters-advanced__fieldset{display:flex;align-items:center}.woocommerce-filters-advanced__fieldset>div{padding:0 4px}@media (max-width:782px){.woocommerce-filters-advanced__fieldset>div{width:100%;padding:4px 0}}@media (max-width:782px){.woocommerce-filters-advanced__fieldset{display:block}}.woocommerce-filters-advanced__fieldset.is-english{display:-ms-grid;display:grid;-ms-grid-columns:100px 150px 1fr;grid-template-columns:100px 150px 1fr}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:nth-child(3){-ms-grid-column:3;grid-column-start:3;-ms-grid-column-span:1;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-advanced__fieldset.is-english .woocommerce-filters-advanced__fieldset-item:first-child{display:flex;align-items:center}@media (max-width:782px){.woocommerce-filters-advanced__fieldset.is-english{display:block}}.woocommerce-filters-advanced__rule{width:150px}.woocommerce-filters-advanced__input{width:100%}.woocommerce-filters-advanced__add-filter-dropdown{display:inline-block}.woocommerce-filters-advanced__add-button{color:inherit;padding:8px}.woocommerce-filters-advanced__add-button svg{fill:currentColor;margin:0 6px 0 0}.woocommerce-filters-advanced__add-button.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#c88bbd}.woocommerce-filters-advanced__add-button:not(:disabled):not([aria-disabled=true]):focus{color:#95588a;background-color:transparent}.woocommerce-filters-advanced__controls{padding:8px 16px;display:flex;align-items:center}.woocommerce-filters-advanced__controls .components-button{margin-right:16px}.woocommerce-filters-advanced__add-dropdown{padding:8px 0}.woocommerce-filters-advanced__add-dropdown li{margin:0}.woocommerce-filters-advanced__add-dropdown .components-button{width:100%;padding:8px}.woocommerce-filters-advanced__add-dropdown .components-button:hover{background-color:#f3f4f5}.woocommerce-filters-advanced__add-dropdown .components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#edeff0;box-shadow:none}.woocommerce-filters-advanced__input-range{align-items:center;display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-filters-advanced__input-range.is-between{-ms-grid-columns:1fr 36px 1fr;grid-template-columns:1fr 36px 1fr}.woocommerce-filters-advanced__input-range input{height:38px;margin:0}.woocommerce-filters-advanced__input-range .separator{text-align:center}.woocommerce-filters-date__content.is-mobile .components-popover__header{border:none;height:0}.woocommerce-filters-date__content.is-mobile .components-popover__close{transform:translateY(22px)}.woocommerce-filters-date__content.is-mobile .components-tab-panel__tab-content{height:calc(100% - 46px);overflow:auto}.woocommerce-filters-date__tabs{height:calc(100% - 42px)}.woocommerce-filters-date__tabs .components-tab-panel__tabs{display:-ms-grid;display:grid;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;border-radius:5px;margin:0 1em 1em}.woocommerce-filters-date__tabs .components-tab-panel__tab-content{display:flex;flex-direction:column;align-items:center}.woocommerce-filters-date__tab:first-child{-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}.woocommerce-filters-date__tab:nth-child(2){-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:1;grid-row-end:2}button.woocommerce-filters-date__tab{outline:none;border:1px solid #95588a;padding:8px;margin:0;border-radius:4px 0 0 4px;color:#95588a;background-color:transparent;justify-content:center}button.woocommerce-filters-date__tab:hover{background-color:#f8f4f7;cursor:pointer}button.woocommerce-filters-date__tab:last-child{border-radius:0 4px 4px 0}button.woocommerce-filters-date__tab.is-active,button.woocommerce-filters-date__tab.is-active:focus{background-color:#95588a;color:#fff}button.woocommerce-filters-date__tab:focus{box-shadow:inset 0 -1px 0 #00435d,0 0 0 2px #bfe7f3}.woocommerce-filters-date__text{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#6c7781;width:100%;margin:0;padding:1em;background-color:#fff}.woocommerce-filters-date__content-controls{display:flex;flex-direction:column;width:100%;align-items:center;padding-bottom:1em;background-color:#fff}.woocommerce-filters-date__content-controls.is-custom{border-top:1px solid #ccd0d4}.woocommerce-filters-date__button-group{padding-top:1em;display:flex;justify-content:center;width:100%}.woocommerce-filters-date__button-group .woocommerce-filters-date__button.is-button{justify-content:center;width:40%;height:34px;margin:0 12px}.woocommerce-filters-filter__content.is-mobile .components-popover__header-title{font-size:12px;font-size:.75rem;font-weight:100;text-transform:uppercase;text-align:center;color:#555d66}.woocommerce-filters-filter__content.is-mobile .woocommerce-filters-filter__content-list-item:last-child{border-bottom:1px solid #ccd0d4}.woocommerce-filters-filter__content-list{margin:0;width:100%;min-width:100%}.woocommerce-filters-filter__content-list-item{border-bottom:1px solid #ccd0d4;margin:0}.woocommerce-filters-filter__content-list-item:last-child{border-bottom:none}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button,.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#fff}.woocommerce-filters-filter__content-list-item.is-selected .woocommerce-filters-filter__button:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;left:1em;transform:translate(50%,-50%)}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button{position:relative;display:block;width:100%;padding:1em 1em 1em 3em;background-color:#f8f9f9;text-align:left}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button{color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button:hover{background-color:#f3f4f5;color:#555d66}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button.components-button:not(:disabled):not([aria-disabled=true]):focus{background-color:#f8f9f9}.woocommerce-filters-filter__content-list-item .woocommerce-filters-filter__button .dashicon{position:absolute;left:1em;top:50%;transform:translateY(-50%)}.woocommerce-filters .components-base-control__field{margin-bottom:0}@media (max-width:400px){.woocommerce-filters{margin-left:-8px;margin-right:-8px}}.woocommerce-filters__basic-filters{display:flex;margin-bottom:24px}@media (max-width:1280px){.woocommerce-filters__basic-filters{flex-direction:column}}@media (max-width:782px){.woocommerce-filters__basic-filters{margin-bottom:16px}}.woocommerce-filters-filter{width:25%;padding:0 12px;min-height:82px;display:flex;flex-direction:column;justify-content:flex-end}.woocommerce-filters-filter:first-child{padding-left:0}.woocommerce-filters-filter:last-child{padding-right:0}@media (max-width:1440px){.woocommerce-filters-filter{width:33.3%}}@media (max-width:1280px){.woocommerce-filters-filter{width:50%;padding:0;min-height:78px}}@media (max-width:782px){.woocommerce-filters-filter{width:100%}}.woocommerce-filters-label{margin:7px 0;display:block}@media (max-width:1280px){.woocommerce-filters-label{margin:5px 0}}.woocommerce-filters-date__content .components-popover__content,.woocommerce-filters-filter__content .components-popover__content{width:320px;border:1px solid #ccd0d4;background-color:#fff}.woocommerce-filters-date__content .woocommerce-calendar__input-error .components-popover__content,.woocommerce-filters-filter__content .woocommerce-calendar__input-error .components-popover__content{background-color:#606a73}.woocommerce-filters-date__content.is-mobile .components-popover__content,.woocommerce-filters-filter__content.is-mobile .components-popover__content{width:100%;height:100%;border:none}.woocommerce-filters__compare .woocommerce-card__body{padding:0}.woocommerce-filters__compare-body{padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-filters__compare-footer{padding:16px;display:flex;align-items:center}.woocommerce-filters__compare-footer .components-button{margin-right:16px}.woocommerce-filters-filter__search .woocommerce-search__autocomplete-results{position:static}.woocommerce-filters-filter__search .woocommerce-search__inline-container{overflow:hidden}.woocommerce-filters-filter__search .woocommerce-search__inline-container:not(.is-active){border:none}.woocommerce-filters-advanced__list-item .components-base-control+.components-base-control{margin-bottom:0}.woocommerce-flag span{vertical-align:middle}.woocommerce-flag .woocommerce-flag__fallback{background:#e2e4e7;color:transparent;width:24px;height:18px;display:block;overflow:hidden}.woocommerce-gravatar{border-radius:50%}.woocommerce-order-status{display:flex;align-items:center}.woocommerce-order-status__indicator{min-width:16px;width:16px;height:16px;display:block;background:#ccd0d4;margin-right:8px;border-radius:50%;border:3px solid #e2e4e7}.woocommerce-order-status__indicator.is-processing{background:#4ab866;border-color:#93d5a4}.woocommerce-order-status__indicator.is-on-hold{background:#ffb900;border-color:#ffd566}.woocommerce-pagination{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:center;align-items:center}@media (max-width:782px){.woocommerce-pagination{flex-direction:column}}.woocommerce-pagination input{border-radius:4px}.woocommerce-pagination__page-arrows{display:flex;flex-direction:row}.woocommerce-pagination__page-arrows-buttons{display:inline-flex;align-items:baseline;border:solid #b5bfc9;border-width:1px 1px 2px;border-radius:4px;background:#f0f2f4}.woocommerce-pagination__page-arrows-buttons .components-button:not(:disabled):not([aria-disabled=true]){color:#24292d;height:30px;width:32px;justify-content:center}.woocommerce-pagination__page-arrows-buttons .components-icon-button:not(:disabled):not([aria-disabled=true]):hover{color:#6c7781}.woocommerce-pagination__page-arrows-buttons button:first-child{border-right:2px solid #d3d9de}.woocommerce-pagination__page-arrows-buttons .woocommerce-pagination__link{padding:4px}.woocommerce-pagination__page-arrows-label{margin-top:8px;margin-right:8px}.woocommerce-pagination__page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__page-picker .woocommerce-pagination__page-picker-input{margin-left:8px;width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker{margin-left:16px}@media (max-width:782px){.woocommerce-pagination__per-page-picker{margin-top:16px;margin-left:0}}.woocommerce-pagination__per-page-picker .components-base-control{margin-bottom:0}.woocommerce-pagination__per-page-picker .components-base-control__field{display:flex;flex-direction:row;align-items:baseline;margin-bottom:0}.woocommerce-pagination__per-page-picker .components-select-control__input{width:60px;height:34px;box-shadow:none}.woocommerce-pagination__per-page-picker .components-base-control__label{margin-right:8px}.woocommerce-pagination__page-picker-input.has-error,.woocommerce-pagination__page-picker-input.has-error:focus{border-color:#d94f4f;box-shadow:0 0 2px #d94f4f}.woocommerce-product-image{border-radius:50%}.woocommerce-rating{position:relative;vertical-align:middle;display:inline-block;overflow:hidden;white-space:nowrap}.woocommerce-rating .gridicon{fill:#d7dade}.woocommerce-rating .woocommerce-rating__star-outline{position:absolute;left:0;top:0;white-space:nowrap;overflow:hidden}.woocommerce-rating .woocommerce-rating__star-outline .gridicon{fill:#555d66}.woocommerce-search{position:relative;min-width:0}.woocommerce-search>div{min-width:0}.woocommerce-search .woocommerce-search__icon{position:absolute;top:10px;left:10px;fill:#a2aab2}.woocommerce-search .woocommerce-tag{max-width:100%}.woocommerce-search .woocommerce-tag .woocommerce-tag__text{max-width:calc(100% - 24px)}.woocommerce-search:not(.has-inline-tags) .woocommerce-tag{margin:8px 6px 0 0}.woocommerce-search.has-inline-tags .woocommerce-search__icon{top:50%;transform:translateY(-50%)}.woocommerce-search .woocommerce-search__inline-container{width:100%;padding:4px 2px 4px 36px;border:1px solid #ccd0d4;background-color:#fff;display:flex;align-items:center;position:relative}.woocommerce-search .woocommerce-search__inline-container.is-active{border-color:#00a0d2;box-shadow:inset 0 0 0 #00435d,0 0 1px 2px #bfe7f3}.woocommerce-search .woocommerce-search__inline-container.has-tags{padding-right:36px}.woocommerce-search .woocommerce-search__inline-container .woocommerce-search__token-list{max-width:100%;display:inline-block;padding:1px 0}.woocommerce-search .woocommerce-search__inline-input,.woocommerce-search .woocommerce-search__inline-input:focus{border:none;outline:none;box-shadow:none;padding:2px 0;line-height:20px;max-width:100%;min-width:70px;font-size:inherit;vertical-align:middle}.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input:focus[type=number]::-webkit-outer-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-inner-spin-button,.woocommerce-search .woocommerce-search__inline-input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.woocommerce-search .woocommerce-search__input{width:100%;padding:8px 12px 8px 36px;border:1px solid #ccd0d4}.woocommerce-search .woocommerce-search__autocomplete-results{display:flex;flex-direction:column;align-items:stretch;border:1px solid #ccd0d4;position:absolute;left:0;right:0;z-index:10}.woocommerce-search .woocommerce-search__autocomplete-results:empty{display:none}.woocommerce-search .woocommerce-search__autocomplete-results.is-static-results{position:static}.woocommerce-search .woocommerce-search__autocomplete-result{margin-bottom:0;display:flex;flex-direction:row;flex-grow:1;flex-shrink:0;align-items:center;padding:12px;color:#95588a;text-align:left;background:#f8f9f9;border-bottom:1px solid #e2e4e7}.woocommerce-search .woocommerce-search__autocomplete-result:last-of-type{border-bottom:none}.woocommerce-search .woocommerce-search__autocomplete-result:hover{box-shadow:none;color:#95588a;background:#f3f4f5}.woocommerce-search .woocommerce-search__autocomplete-result.is-selected,.woocommerce-search .woocommerce-search__autocomplete-result:active,.woocommerce-search .woocommerce-search__autocomplete-result:focus{color:#95588a;background:#fff;box-shadow:inset 0 0 0 1px #f3f4f5,inset 0 0 0 2px #24292d}.woocommerce-search .woocommerce-search__autocomplete-result .woocommerce-search__result-thumbnail{margin-right:12px}.woocommerce-search__result-name{text-decoration:underline}.woocommerce-search__clear{position:absolute;right:10px;top:calc(50% - 10px)}.woocommerce-search__clear>.dashicon{color:#c9c9c9}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:left}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #e2e4e7}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-left:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #e2e4e7}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto;border-top:1px solid #e2e4e7;border-bottom:1px solid #e2e4e7}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-right:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.woocommerce-search-list__list>[role=menu]{border:1px solid #e2e4e7;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:flex;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #e2e4e7!important;color:#555d66}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f8f9f9}.woocommerce-search-list__list .woocommerce-search-list__item:last-child{border-bottom:none!important}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-state{flex:0 0 16px;margin-right:8px;height:24px}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:flex;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #e2e4e7}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-right:4px;content:"— — — — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-right:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:"— "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:"— — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:"— — — "}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:"— — — — "}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#6c7781}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-right:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#191e23}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{flex:0;padding:2px 8px;border:1px solid #e2e4e7;border-radius:12px;font-size:.8em;line-height:1.4;color:#6c7781;background:#fff;white-space:nowrap}.components-panel .woocommerce-search-list{padding:0}.components-panel .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.components-panel .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-section-header{padding:13px;border-bottom:none;display:flex;justify-content:space-between}@media (max-width:782px){.woocommerce-section-header{margin-left:-16px;margin-right:-16px;margin-bottom:12px;border-left:none;border-right:none;width:auto}}.woocommerce-section-header hr{-ms-grid-row-align:center;align-self:center;flex-grow:1;height:1px;margin:0 10px}@media (max-width:782px){.woocommerce-section-header.has-interval-select{position:relative;padding-bottom:30px}.woocommerce-section-header.has-interval-select .woocommerce-chart__interval-select{position:absolute;left:0;bottom:0;padding-left:6px}}.woocommerce-section-header__actions,.woocommerce-section-header__menu{text-align:right}.woocommerce-section-header__actions{display:flex;flex-grow:1;justify-content:flex-end;align-items:center}.woocommerce-section-header__actions .components-base-control{padding-top:0;min-height:34px}.woocommerce-section-header__actions .components-base-control__field{margin-bottom:0}.woocommerce-section-header__actions .components-base-control__field select{background:transparent}.woocommerce-ellipsis-menu__toggle{padding:0}.woocommerce-section-header__menu{display:flex;flex-direction:column;justify-content:center}.woocommerce-section-header__title{margin:0 16px 0 0;padding:3px 0;font-size:18px;font-size:1.125rem;line-height:2.2;font-weight:600}.woocommerce-segmented-selection{width:100%;color:#555d66}.woocommerce-segmented-selection__container{width:100%;-ms-grid-columns:1fr 1fr;grid-template-columns:1fr 1fr;display:-ms-grid;display:grid;border-top:1px solid #ccd0d4;border-bottom:1px solid #ccd0d4;background-color:#ccd0d4}.woocommerce-segmented-selection__item:nth-child(2n){border-left:1px solid #ccd0d4;border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(odd){border-top:1px solid #ccd0d4}.woocommerce-segmented-selection__item:nth-child(-n+2){border-top:0}.woocommerce-segmented-selection__label{background-color:#f8f9f9;padding:12px 12px 12px 36px;position:relative;display:block;height:100%}.woocommerce-segmented-selection__label:active,.woocommerce-segmented-selection__label:hover{background-color:#f3f4f5}.woocommerce-segmented-selection__input{opacity:0;position:absolute;left:-9999px}.woocommerce-segmented-selection__input:active+label .woocommerce-segmented-selection__label{background-color:#f3f4f5}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label{background-color:#fff;font-weight:600}.woocommerce-segmented-selection__input:checked+label .woocommerce-segmented-selection__label:before{content:"";width:8px;height:8px;background-color:#95588a;position:absolute;top:50%;transform:translate(-20px,-50%)}.woocommerce-segmented-selection__input:focus+label .woocommerce-segmented-selection__label{box-shadow:inset 0 0 0 1px #24292d}.woocommerce-split-button{display:flex;align-items:center;padding:4px 0}.woocommerce-split-button .woocommerce-split-button__menu{padding:0}.woocommerce-split-button .woocommerce-split-button__main-action,.woocommerce-split-button .woocommerce-split-button__menu-toggle{line-height:26px;height:42px;border-radius:3px;white-space:nowrap;color:#555d66;border:1px solid #b5bcc2;background:#f3f4f5;box-shadow:inset 0 -1px 0 #b5bcc2;vertical-align:top}.woocommerce-split-button .woocommerce-split-button__main-action{padding:0 12px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;height:32px}.woocommerce-split-button .woocommerce-split-button__menu-toggle{border-top-left-radius:0;border-bottom-left-radius:0;padding:4px;height:32px;width:32px}.woocommerce-split-button .woocommerce-split-button__menu-popover.is-mobile{top:46px}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fafafa;border-color:#78848f;box-shadow:inset 0 -1px 0 #b5bcc2}.woocommerce-split-button .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{background-color:#fafafa;border:1px solid #555d66;box-shadow:inset 0 -1px 0 #6c7781,0 0 0 2px #bfe7f3}.woocommerce-split-button .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button .woocommerce-split-button__main-action.components-button .gridicon{width:18px;height:18px}.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .dashicon,.woocommerce-split-button.has-label .woocommerce-split-button__main-action.components-button .gridicon{margin-right:8px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper{width:100%;padding:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button,.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-icon-button{color:#555d66;margin-top:4px;margin-bottom:4px}.woocommerce-split-button .woocommerce-split-button__menu-wrapper .components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{background-color:#fff;color:#24292d;box-shadow:inset 0 0 0 1px #e2e4e7,inset 0 0 0 2px #fff,0 1px 1px rgba(25,30,35,.2)}.woocommerce-split-button .woocommerce-split-button__menu-item{width:100%;padding:4px;border-radius:0;outline:none;cursor:pointer}.woocommerce-split-button .woocommerce-split-button__menu-item .dashicon{margin-right:8px}.woocommerce-split-button .dashicons-arrow-down{fill:#555d66;height:20px;width:20px}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover>svg,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active>svg{background:initial}.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active,.woocommerce-split-button .woocommerce-split-button__menu-toggle.is-active:hover{border-color:#b5bcc2}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle{background:#95588a;color:#fff;border-color:#7c3f71;box-shadow:inset 0 -1px 0 #7c3f71}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):hover{color:#fff;background-color:#7c3f71;border-color:#622557;box-shadow:inset 0 -1px 0 #622557}.woocommerce-split-button.is-primary .woocommerce-split-button__main-action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus,.woocommerce-split-button.is-primary .woocommerce-split-button__menu-toggle.components-icon-button:not(:disabled):not([aria-disabled=true]):not(.is-default):focus{color:#fff;background-color:#7c3f71;box-shadow:inset 0 -1px 0 #622557,0 0 0 2px #ffd7ff;border:1px solid #622557}.woocommerce-split-button.is-primary .dashicons-arrow-down{fill:#fff}.woocommerce-stepper{background:#fff;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);display:flex;justify-content:space-around;align-items:center;margin-bottom:24px;padding-left:16px;padding-right:16px;font-size:16px}.woocommerce-stepper .woocommerce-stepper__step{display:inline-flex;align-items:center;padding:12px;font-weight:400;color:#1a1a1a;height:48px}.woocommerce-stepper .woocommerce-stepper__step svg{display:none}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner{display:block;margin-left:-8px;margin-right:4px}.woocommerce-stepper .woocommerce-stepper__step .woocommerce-spinner__circle{stroke:#005fb7}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-icon,.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-icon{background:#005fb7;color:#fff}.woocommerce-stepper .woocommerce-stepper__step.is-active{font-weight:600}.woocommerce-stepper .woocommerce-stepper__step.is-active .woocommerce-stepper__step-label{margin:0}.woocommerce-stepper .woocommerce-stepper__step.is-complete .woocommerce-stepper__step-number{display:none}.woocommerce-stepper .woocommerce-stepper__step.is-complete svg{display:inline}.woocommerce-stepper .woocommerce-stepper__step-icon{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:24px;margin-right:12px;background:#e1e2e2;color:#50575d;border-radius:50%}.woocommerce-stepper .woocommerce-stepper__step-divider{flex-grow:1;border-bottom:1px solid #e1e2e2}.woocommerce-stepper .woocommerce-stepper__step-divider:last-child{display:none}@media (max-width:782px){.woocommerce-stepper .woocommerce-stepper__step-label{display:none;padding-top:24px}.woocommerce-stepper .woocommerce-stepper__step-icon{margin-right:0}}.woocommerce-stepper.is-vertical{align-items:normal;flex-direction:column}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-divider{border-bottom:0;border-left:1px solid #e1e2e2;height:50px;margin-left:24px}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-label{display:initial}.woocommerce-stepper.is-vertical .woocommerce-stepper__step-icon{margin-right:12px}@-webkit-keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(270deg)}}@keyframes rotate{0%{transform:rotate(0deg)}to{transform:rotate(270deg)}}@-webkit-keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(135deg)}to{transform:rotate(450deg)}}@keyframes growAndShrink{0%,to{stroke-dashoffset:200}50%{stroke-dashoffset:50;transform:rotate(135deg)}to{transform:rotate(450deg)}}.woocommerce-spinner{-webkit-animation:rotate 2s linear infinite;animation:rotate 2s linear infinite;width:40px;min-width:40px;height:40px;max-height:40px}.woocommerce-spinner__circle{stroke-dasharray:200;stroke-dashoffset:0;transform-origin:center;-webkit-animation:growAndShrink 2s ease-in-out infinite;animation:growAndShrink 2s ease-in-out infinite;stroke:#1a1a1a}.woocommerce-summary{margin:16px 0;display:-ms-grid;display:grid;border-color:#ccd0d4;border-style:solid;border-width:1px 0 0 1px;background-color:#edeff0;box-shadow:inset -1px -1px 0 #ccd0d4}@media (max-width:782px){.woocommerce-summary{border-width:0}.woocommerce-summary.is-placeholder{border-top:0}.woocommerce-summary .woocommerce-summary__item-container.is-placeholder{border-top:1px solid #ccd0d4}}.woocommerce-summary .components-popover.components-popover{position:static!important;top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;margin-top:0!important;margin-left:0}.woocommerce-summary .components-popover.components-popover .components-popover__header{display:none}.woocommerce-summary .components-popover.components-popover .components-popover__content{position:static;left:auto;right:auto;margin:0;width:100%;max-width:100%!important;max-height:100%!important;box-shadow:none;border:none;transform:none}.woocommerce-summary .components-popover.components-popover .components-popover__content .woocommerce-summary__item.is-selected{display:none}.components-popover__content .woocommerce-summary{max-height:100%;margin-top:0;margin-bottom:0;overflow-y:auto;border:none}.woocommerce-summary .woocommerce-summary__item-data{display:flex;flex-wrap:wrap}.woocommerce-summary .woocommerce-summary__item-delta,.woocommerce-summary .woocommerce-summary__item-value{flex:1 0 auto}.woocommerce-summary .woocommerce-summary__item-delta{flex:0 1 auto;display:flex;flex-wrap:none}.woocommerce-summary,.woocommerce-summary.has-1-items,.woocommerce-summary.has-one-item{-ms-grid-columns:1fr;grid-template-columns:1fr}.woocommerce-summary.has-2-items{-ms-grid-columns:(1fr)[2];grid-template-columns:repeat(2,1fr)}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(2n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2) .woocommerce-summary__item,.woocommerce-summary.has-2-items .woocommerce-summary__item-container:nth-of-type(odd):nth-last-of-type(-n+2)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-3-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-3-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-4-items,.woocommerce-summary.has-7-items,.woocommerce-summary.has-8-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-4-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-7-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-8-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-5-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-5-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-5-items .woocommerce-summary__item-delta,.woocommerce-summary.has-5-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-5-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-5-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}@media (min-width:1441px){.woocommerce-summary.has-6-items{-ms-grid-columns:(1fr)[6];grid-template-columns:repeat(6,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(6n+1):nth-last-of-type(-n+6)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-delta,.woocommerce-summary.has-6-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-6-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-6-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items,.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[5];grid-template-columns:repeat(5,1fr)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n+1):nth-last-of-type(-n+5)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-9-items .woocommerce-summary__item-delta,.woocommerce-summary.has-9-items .woocommerce-summary__item-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-9-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-9-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}}@media (max-width:1440px){.woocommerce-summary.has-4-items .woocommerce-summary__item-delta,.woocommerce-summary.has-4-items .woocommerce-summary__item-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-delta,.woocommerce-summary.has-7-items .woocommerce-summary__item-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-delta,.woocommerce-summary.has-8-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-4-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items .woocommerce-summary__item-prev-value,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-4-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-7-items.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary.has-8-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-6-items,.woocommerce-summary.has-9-items{-ms-grid-columns:(1fr)[3];grid-template-columns:repeat(3,1fr)}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-6-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3) .woocommerce-summary__item,.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(3n+1):nth-last-of-type(-n+3)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-10-items{-ms-grid-columns:(1fr)[4];grid-template-columns:repeat(4,1fr)}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n) .woocommerce-summary__item{border-right-color:#ccd0d4}.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(4n+1):nth-last-of-type(-n+4)~.woocommerce-summary__item-container .woocommerce-summary__item{border-bottom-color:#ccd0d4}.woocommerce-summary.has-10-items .woocommerce-summary__item-delta,.woocommerce-summary.has-10-items .woocommerce-summary__item-value{min-width:100%}.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-label,.woocommerce-summary.has-10-items .woocommerce-summary__item-prev-value{display:block}.woocommerce-summary.has-10-items.is-placeholder .woocommerce-summary__item-prev-label{margin-right:calc(100% - 80px)}.woocommerce-summary.has-9-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item,.woocommerce-summary.has-10-items .woocommerce-summary__item-container:nth-of-type(5n) .woocommerce-summary__item{border-right-color:#e2e4e7}}@media (max-width:960px){.woocommerce-summary .woocommerce-summary__item{border-right-color:#ccd0d4}}@media (max-width:782px){.woocommerce-summary .woocommerce-summary__item-container{margin-left:-16px;margin-right:-16px;width:auto}.woocommerce-summary .woocommerce-summary__item-container .woocommerce-summary__item{border-right:none}.woocommerce-summary .components-popover.components-popover{margin-left:-16px;margin-right:-16px}.woocommerce-summary .components-popover.components-popover .woocommerce-summary__item-container{margin-left:0;margin-right:0}}.woocommerce-summary__item-container{margin-bottom:0}.woocommerce-summary__item-container:last-of-type .woocommerce-summary__item{border-bottom-color:#ccd0d4!important}.woocommerce-summary__item-container.is-dropdown-button{padding:0;list-style:none;border-right:1px solid #ccd0d4}.woocommerce-summary__item-container.is-dropdown-button .components-button{border-bottom:1px solid #ccd0d4;text-align:left;display:block}@media (max-width:782px){.woocommerce-summary__item-container.is-dropdown-button{border-right:none}}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;margin-top:2.2px;max-width:110px;width:70%}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-label:after{content:"\00a0"}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-data{justify-content:space-between}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;min-width:auto}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value:after,.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value:after{content:"\00a0"}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-value{margin-top:2.2px;max-width:60px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-delta-value{margin-top:2.2px;width:50px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-label{width:80px}.woocommerce-summary__item-container.is-placeholder .woocommerce-summary__item-prev-value{width:40px}.woocommerce-summary__item{display:flex;flex-direction:column;height:100%;padding:16px;background-color:#f8f9f9;border-bottom:1px solid #e2e4e7;border-right:1px solid #e2e4e7;line-height:1.4em;text-decoration:none}.woocommerce-summary__item:hover{background-color:#f3f4f5}.woocommerce-summary__item:active{background-color:#edeff0}.woocommerce-summary__item:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 1px 0 #6c7781!important}.woocommerce-summary__item.is-selected:focus{box-shadow:inset -1px -1px 0 #6c7781,inset 1px 0 0 #6c7781,inset 0 4px 0 #95588a!important}.is-dropdown-button .woocommerce-summary__item{position:relative;width:100%;padding-right:56px}@media (max-width:782px){.is-dropdown-button .woocommerce-summary__item{border-right:none}}.woocommerce-summary__item .woocommerce-summary__item-data{margin-top:auto}.woocommerce-summary__item .woocommerce-summary__item-label{display:block;margin-bottom:16px;font-size:11px;font-size:.6875rem;text-transform:uppercase;color:#6c7781}.woocommerce-summary__item .woocommerce-summary__item-value{margin-bottom:4px;font-size:18px;font-size:1.125rem;font-weight:500;color:#191e23}.woocommerce-summary__item .woocommerce-summary__item-delta{margin-bottom:12px;font-size:18px;font-size:1.125rem;font-weight:300;color:#555d66}.woocommerce-summary__item.is-selected{background:#fff;box-shadow:inset 0 4px 0 #95588a}.woocommerce-summary__item.is-selected .woocommerce-summary__item-value{font-weight:600}.woocommerce-summary__item.is-selected .woocommerce-summary__item-delta{font-weight:400}.woocommerce-summary__item.is-good-trend .woocommerce-summary__item-delta{color:#4ab866}.woocommerce-summary__item.is-bad-trend .woocommerce-summary__item-delta{color:#d94f4f}.woocommerce-summary__item .woocommerce-summary__item-delta-icon{vertical-align:middle;margin-right:3px;fill:currentColor}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-up{transform:rotate(45deg)}.woocommerce-summary__item .woocommerce-summary__item-delta-icon.gridicons-arrow-down{transform:rotate(-45deg)}.woocommerce-summary__item .woocommerce-summary__item-prev-label,.woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:13px;font-size:.8125rem;color:#555d66;display:inline-block}.woocommerce-summary__item .woocommerce-summary__toggle{position:absolute;top:44px;right:16px;transition:transform .2s ease}@media screen and (prefers-reduced-motion:reduce){.woocommerce-summary__item .woocommerce-summary__toggle{transition:none}}.is-dropdown-expanded .woocommerce-summary__item .woocommerce-summary__toggle{transform:rotate(-180deg)}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-label{margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-delta,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-value{font-size:13px;font-size:.8125rem;margin-bottom:0}.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-label,.components-popover__content .woocommerce-summary__item .woocommerce-summary__item-prev-value{font-size:11px;font-size:.6875rem}.woocommerce-table .woocommerce-card__body{padding:0;position:relative}.woocommerce-table .woocommerce-search{flex-grow:1}.woocommerce-table .woocommerce-card__action{justify-self:flex-end;margin:-13px 0}.woocommerce-table .woocommerce-card__menu{justify-self:flex-end}.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{align-items:center;text-align:left;display:-ms-grid;display:grid;width:100%;-ms-grid-columns:auto 1fr auto;grid-template-columns:auto 1fr auto}@media (max-width:960px){.woocommerce-table.has-compare .woocommerce-card__action,.woocommerce-table.has-search .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;grid-gap:12px;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px;margin:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__compare,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__compare{display:flex;-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:1;grid-area:2/1/3/2}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:2;grid-area:2/2/3/4;margin-right:0}.woocommerce-table.has-compare .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3;-ms-grid-column-align:end;justify-self:end;margin:-6px 0}}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-columns:1fr auto;grid-template-columns:1fr auto}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row-align:center;align-self:center;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:1;grid-column-end:2}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row-align:center;align-self:center;-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:1;grid-column-end:3}@media (max-width:960px){.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action{-ms-grid-row:1;-ms-grid-row-span:2;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:1/1/3/4;-ms-grid-columns:auto 1fr 24px;grid-template-columns:auto 1fr 24px}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-search{-ms-grid-row:2;-ms-grid-row-span:1;-ms-grid-column:1;-ms-grid-column-span:3;grid-area:2/1/3/4;margin-left:0}.woocommerce-table.has-compare.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button,.woocommerce-table.has-search.has-search:not(.has-compare) .woocommerce-card__action .woocommerce-table__download-button{-ms-grid-row:1;-ms-grid-row-span:1;-ms-grid-column:2;-ms-grid-column-span:1;grid-area:1/2/2/3}}.woocommerce-table.has-compare .woocommerce-search,.woocommerce-table.has-search .woocommerce-search{margin:0 16px}.woocommerce-table.has-compare .woocommerce-compare-button,.woocommerce-table.has-search .woocommerce-compare-button{padding:3px 12px;height:auto}.woocommerce-table.is-empty{align-items:center;background:#f8f9f9;color:#555d66;display:flex;height:calc(17px + 1.1375rem + 165px + 5.6875rem);height:calc(17px + 1.1375rem + (33px + 1.1375rem)*var(--number-of-rows));justify-content:center;padding:16px;text-align:center}.woocommerce-table button.woocommerce-table__download-button.is-link{padding:6px 12px;color:#000;text-decoration:none}.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:8px;height:24px;width:24px}@media (max-width:782px){.woocommerce-table button.woocommerce-table__download-button.is-link svg{margin-right:0}.woocommerce-table button.woocommerce-table__download-button.is-link .woocommerce-table__download-button__label{display:none}}.woocommerce-table .woocommerce-pagination{padding-top:16px;padding-bottom:16px;z-index:1;background:#fff;position:relative}.woocommerce-table__caption{font-size:24px;font-size:1.5rem;text-align:left}.woocommerce-table__table{overflow-x:auto}.woocommerce-table__table:after{content:"";position:absolute;right:0;top:0;width:41px;height:100%;background:linear-gradient(90deg,transparent,rgba(0,0,0,.2));opacity:0;pointer-events:none;transition:opacity .3s}.woocommerce-table__table.is-scrollable:after{opacity:1}.woocommerce-table__table table{border-collapse:collapse;width:100%}.woocommerce-table__table tr:focus-within,.woocommerce-table__table tr:hover{background-color:#f3f4f5}.woocommerce-table__table tr:focus-within td,.woocommerce-table__table tr:focus-within th,.woocommerce-table__table tr:hover td,.woocommerce-table__table tr:hover th{background:transparent}.woocommerce-table__header,.woocommerce-table__item{font-size:13px;font-size:.8125rem;padding:16px 24px;border-bottom:1px solid #e2e4e7;text-align:left}.woocommerce-table__header>a:only-child,.woocommerce-table__item>a:only-child{display:block}.woocommerce-table__header a:focus,.woocommerce-table__header a:hover,.woocommerce-table__item a:focus,.woocommerce-table__item a:hover{color:#622557}.woocommerce-table__header .is-placeholder,.woocommerce-table__item .is-placeholder{-webkit-animation:loading-fade 1.6s ease-in-out infinite;animation:loading-fade 1.6s ease-in-out infinite;background-color:#e2e4e7;color:transparent;display:inline-block;height:16px;max-width:120px;width:80%}.woocommerce-table__header .is-placeholder:after,.woocommerce-table__item .is-placeholder:after{content:"\00a0"}.woocommerce-table__header:not(.is-left-aligned),.woocommerce-table__item:not(.is-left-aligned){text-align:right}.woocommerce-table__header:not(.is-left-aligned) button,.woocommerce-table__item:not(.is-left-aligned) button{justify-content:flex-end}.woocommerce-table__header.is-numeric .is-placeholder,.woocommerce-table__item.is-numeric .is-placeholder{max-width:40px}.woocommerce-table__header .is-negative,.woocommerce-table__item .is-negative{color:#d94f4f;font-weight:700}.woocommerce-table__header.is-sorted,.woocommerce-table__item.is-sorted{background-color:#f8f9f9}.woocommerce-table__header.is-checkbox-column,.woocommerce-table__item.is-checkbox-column{width:33px;max-width:33px;padding-right:0;padding-left:16px}.woocommerce-table__header.is-checkbox-column+th,.woocommerce-table__item.is-checkbox-column+th{border-left:0}th.woocommerce-table__item{font-weight:400}.woocommerce-table__header{padding:8px 24px;background-color:#f8f9fa;border-bottom:1px solid #ccd0d4;font-weight:700;white-space:nowrap}.woocommerce-table__header+.woocommerce-table__header{border-left:1px solid #ccd0d4}.woocommerce-table__header.is-left-aligned.is-sortable{padding-left:16px}.woocommerce-table__header.is-left-aligned.is-sortable svg{display:inline-flex;order:1;margin-left:0}.woocommerce-table__header .components-button.is-button{height:auto;width:100%;padding:8px 24px 8px 0;vertical-align:middle;line-height:1;border:none;background:transparent;box-shadow:none!important}.woocommerce-table__header .components-button.is-button:active,.woocommerce-table__header .components-button.is-button:hover{box-shadow:none!important}.woocommerce-table__header.is-sortable{padding:0}.woocommerce-table__header.is-sortable .gridicon{visibility:hidden;margin-left:4px}.woocommerce-table__header.is-sortable .components-button:focus .gridicon,.woocommerce-table__header.is-sortable .components-button:hover .gridicon,.woocommerce-table__header.is-sortable.is-sorted .components-button .gridicon{visibility:visible}.woocommerce-table__summary{margin:0;padding:16px 0;text-align:center;z-index:1;background:#fff;position:relative}.woocommerce-table__summary-item{display:inline-block;margin-bottom:0;margin-left:8px;margin-right:8px}.woocommerce-table__summary-item .woocommerce-table__summary-label,.woocommerce-table__summary-item .woocommerce-table__summary-value{display:inline-block}.woocommerce-table__summary-item .woocommerce-table__summary-label{margin-left:4px}.woocommerce-table__summary-item .woocommerce-table__summary-value{font-weight:600}.woocommerce-tag{display:inline-flex;margin:1px 4px 1px 0;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove.components-icon-button,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#e2e4e7;transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#555d66;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 4px 0 8px;border-radius:12px 0 0 12px}.woocommerce-tag .woocommerce-tag__remove.components-icon-button{cursor:pointer;padding:0 2px;border-radius:0 12px 12px 0;color:#555d66;line-height:10px;text-indent:0}.woocommerce-tag .woocommerce-tag__remove.components-icon-button:hover{color:#32373c}.text-control-with-affixes{display:inline-flex;flex-direction:row;width:100%}.text-control-with-affixes input[type=email],.text-control-with-affixes input[type=number],.text-control-with-affixes input[type=password],.text-control-with-affixes input[type=text],.text-control-with-affixes input[type=url]{flex-grow:1;margin:0}.text-control-with-affixes input[type=email]:disabled,.text-control-with-affixes input[type=number]:disabled,.text-control-with-affixes input[type=password]:disabled,.text-control-with-affixes input[type=text]:disabled,.text-control-with-affixes input[type=url]:disabled{border-right-width:0}.text-control-with-affixes input[type=email]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=number]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=password]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=text]:disabled+.text-control-with-affixes__suffix,.text-control-with-affixes input[type=url]:disabled+.text-control-with-affixes__suffix{border-left:1px solid #e2e4e7}.text-control-with-affixes__prefix,.text-control-with-affixes__suffix{position:relative;background:#fff;border:1px solid #e2e4e7;color:#555d66;padding:7px 14px;white-space:nowrap;flex:1 0 auto;font-size:14px;line-height:1.5}.text-control-with-affixes__prefix{border-right:none}.text-control-with-affixes__prefix+input[type=email]:disabled,.text-control-with-affixes__prefix+input[type=number]:disabled,.text-control-with-affixes__prefix+input[type=password]:disabled,.text-control-with-affixes__prefix+input[type=text]:disabled,.text-control-with-affixes__prefix+input[type=url]:disabled{border-left-color:#e2e4e7;border-right-width:1px}.text-control-with-affixes__suffix{border-left:none}.woocommerce-view-more-list{padding-left:4px;margin:0 0 0 4px;vertical-align:middle}.woocommerce-view-more-list__popover{margin:0;padding:16px;text-align:left}.woocommerce-view-more-list__popover__item{display:block;margin:16px 0}.woocommerce-view-more-list__popover__item:first-child{margin-top:0}.woocommerce-view-more-list__popover__item:last-child{margin-bottom:0} +.editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-right:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wp-block-button__link{color:inherit}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block} +.wc-block-handpicked-products__selection{width:100%} +.wc-block-products-category__selection{width:100%}.wc-block-products-category__cancel-button.is-tertiary{margin:1em auto 0;display:block;text-align:center;font-size:1em} +.wc-block-featured-category.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-category .components-resizable-box__handle{z-index:10}.wc-block-featured-category .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-featured-category__selection{width:100%} +.woocommerce-product-categories__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-categories__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-categories__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%} +.wc-block-product-categories.wc-block-product-categories ul{margin-left:20px}.wc-block-product-categories svg{margin-right:1ch;fill:currentColor} +.components-toggle-button-control .components-base-control__field{flex-wrap:wrap}.components-toggle-button-control .components-toggle-button-control__label{width:100%;margin-bottom:8px;display:block}.components-toggle-button-control .components-base-control__help{margin-top:0} +.wc-block-products-by-attribute__selection{width:100%} +.woocommerce-product-attributes__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-attributes__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-attributes__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{justify-content:center}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0[aria-expanded=true]:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-search-list__item.woocommerce-product-attributes__item[disabled].depth-0:after{margin-left:0;width:auto;background:none} +.wc-block-featured-product.components-placeholder{background-color:rgba(139,139,150,.1)}.wc-block-featured-product .components-resizable-box__handle{z-index:10}.wc-block-featured-product__selection{width:100%} +.woocommerce-search-product__item .woocommerce-search-list__item-name .description{display:block}.woocommerce-search-product__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-product__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-product__item.is-not-active:active,.woocommerce-search-product__item.is-not-active:focus,.woocommerce-search-product__item.is-not-active:hover{background:#fff}.woocommerce-search-product__item.is-loading{justify-content:center}.woocommerce-search-product__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-product__item.depth-0.is-variable:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-product__item.depth-0.is-variable[aria-expanded=true]:after{background-image:url('data:image/svg+xml;utf8,')} +.wc-block-product-tag__selection{width:100%}.wc-block-product-tag__cancel-button.is-tertiary{margin:1em auto 0;display:block;text-align:center;font-size:1em} +.woocommerce-product-tags__operator .components-base-control__help{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;width:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important}.components-panel .woocommerce-product-tags__operator.components-base-control{margin-top:16px}.components-panel .woocommerce-product-tags__operator.components-base-control .components-select-control__input{margin-left:0;min-width:100%} diff --git a/build/featured-category.deps.json b/build/featured-category.deps.json new file mode 100644 index 00000000000..71968e163b8 --- /dev/null +++ b/build/featured-category.deps.json @@ -0,0 +1 @@ +["lodash","moment","react","react-dom","wp-api-fetch","wp-blocks","wp-components","wp-compose","wp-date","wp-dom","wp-editor","wp-element","wp-hooks","wp-html-entities","wp-i18n","wp-keycodes","wp-polyfill","wp-url","wp-viewport"] \ No newline at end of file diff --git a/build/featured-category.js b/build/featured-category.js new file mode 100644 index 00000000000..b65ef63d911 --- /dev/null +++ b/build/featured-category.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var n,a,i=t[0],l=t[1],s=t[2],d=0,b=[];d0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({categoryId:t,mediaId:0,mediaSrc:""})},multiple:!1}),Object(n.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),o(Object(c.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,o=this,a=this.props,i=a.attributes,l=a.isSelected,s=a.overlayColor,u=a.setAttributes,d=i.className,b=i.contentAlign,g=i.dimRatio,p=i.editMode,h=i.focalPoint,m=i.height,f=i.showDesc,w=this.state,O=w.loaded,v=w.category,y=_()("wc-block-featured-category",{"is-selected":l,"is-loading":!v&&!O,"is-not-found":!v&&O,"has-background-dim":0!==g},0===(e=g)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==b&&"has-".concat(b,"-content"),d),k=i.mediaId||function(e){return Object(E.isObject)(e.image)?e.image.id:0}(v),C=i.mediaSrc||z(this.state.category),x=v?(t=C)?{backgroundImage:"url(".concat(t,")")}:{}:{};s.color&&(x.backgroundColor=s.color),h&&(x.backgroundPosition="".concat(100*h.x,"% ").concat(100*h.y,"%"));return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(r.BlockControls,null,Object(n.createElement)(r.AlignmentToolbar,{value:b,onChange:function(e){u({contentAlign:e})}}),Object(n.createElement)(r.MediaUploadCheck,null,Object(n.createElement)(j.Toolbar,null,Object(n.createElement)(r.MediaUpload,{onSelect:function(e){u({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:k,render:function(e){var t=e.open;return Object(n.createElement)(j.IconButton,{className:"components-toolbar__control",label:Object(c.__)("Edit media"),icon:"format-image",onClick:t,disabled:!o.state.category})}})))),!i.editMode&&this.getInspectorControls(),p?this.renderEditMode():Object(n.createElement)(n.Fragment,null,v?Object(n.createElement)(j.ResizableBox,{className:y,size:{height:m},minHeight:I,enable:{bottom:!0},onResizeStop:function(e,t,o){u({height:parseInt(o.style.height)})},style:x},Object(n.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(n.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:v.name}}),f&&Object(n.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:v.description}}),Object(n.createElement)("div",{className:"wc-block-featured-category__link"},Object(n.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(c.__)("Shop now","woo-gutenberg-products-block"),url:v.permalink,align:"center"}]],templateLock:"all"})))):Object(n.createElement)(j.Placeholder,{className:"wc-block-featured-category",icon:Object(n.createElement)(S.b,null),label:Object(c.__)("Featured Category","woo-gutenberg-products-block")},O?Object(c.__)("No product category is selected.","woo-gutenberg-products-block"):Object(n.createElement)(j.Spinner,null))))}}]),t}(n.Component);P.propTypes={attributes:x.a.object.isRequired,isSelected:x.a.bool.isRequired,name:x.a.string.isRequired,setAttributes:x.a.func.isRequired,overlayColor:x.a.object,setOverlayColor:x.a.func.isRequired,debouncedSpeak:x.a.func.isRequired};var B=Object(k.compose)([Object(r.withColors)({overlayColor:"background-color"}),j.withSpokenMessages])(P);Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(c.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(S.b,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(c.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0}},edit:function(e){return Object(n.createElement)(B,e)},save:function(){return Object(n.createElement)(r.InnerBlocks.Content,null)}})},61:function(e,t){!function(){e.exports=this.wp.hooks}()},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}}); \ No newline at end of file diff --git a/build/featured-product.deps.json b/build/featured-product.deps.json new file mode 100644 index 00000000000..71968e163b8 --- /dev/null +++ b/build/featured-product.deps.json @@ -0,0 +1 @@ +["lodash","moment","react","react-dom","wp-api-fetch","wp-blocks","wp-components","wp-compose","wp-date","wp-dom","wp-editor","wp-element","wp-hooks","wp-html-entities","wp-i18n","wp-keycodes","wp-polyfill","wp-url","wp-viewport"] \ No newline at end of file diff --git a/build/featured-product.js b/build/featured-product.js new file mode 100644 index 00000000000..3e6b02b1079 --- /dev/null +++ b/build/featured-product.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var c,a,i=t[0],s=t[1],l=t[2],d=0,p=[];d$&")}var D=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?Object(c.createElement)(A.d,null):Object(c.createElement)(A.e,null)},q=function(e){function t(){var e;return s()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={products:[],product:0,variationsList:{},variationsLoading:!1,loading:!0},e.debouncedOnSearch=Object(E.debounce)(e.onSearch.bind(f()(e)),400),e.debouncedGetVariations=Object(E.debounce)(e.getVariations.bind(f()(e)),200),e.renderItem=e.renderItem.bind(f()(e)),e.onProductSelect=e.onProductSelect.bind(f()(e)),e}return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.selected;Object(H.b)({selected:t}).then(function(t){t=t.map(function(e){var t=e.variations?e.variations.length:0;return B()({},e,{parent:0,count:t})}),e.setState({products:t,loading:!1})}).catch(function(){e.setState({products:[],loading:!1})})}},{key:"componentDidUpdate",value:function(e,t){t.product!==this.state.product&&this.debouncedGetVariations()}},{key:"getVariations",value:function(){var e=this,t=this.state,n=t.product,c=t.variationsList;if(n){var o=this.state.products.find(function(e){return e.id===n});o.variations&&0!==o.variations.length&&(c[n]||this.setState({variationsLoading:!0}),O()({path:Object(R.addQueryArgs)("/wc/blocks/products/".concat(n,"/variations"),{per_page:-1})}).then(function(t){t=t.map(function(e){return B()({},e,{parent:n})}),e.setState(function(e){return{variationsList:B()({},e.variationsList,L()({},n,t)),variationsLoading:!1}})}).catch(function(){e.setState({termsLoading:!1})}))}else this.setState({variationsList:{},variationsLoading:!1})}},{key:"onSearch",value:function(e){var t=this,n=this.props.selected;Object(H.b)({selected:n,search:e}).then(function(e){t.setState({products:e,loading:!1})}).catch(function(){t.setState({products:[],loading:!1})})}},{key:"onProductSelect",value:function(e,t){var n=this;return function(){n.setState({product:t?0:e.id})}}},{key:"renderItem",value:function(e){var t=this,n=e.item,r=e.search,a=e.depth,i=void 0===a?0:a,s=e.isSelected,l=e.onSelect,u=this.state,d=u.product,p=u.variationsLoading,b=k()("woocommerce-search-product__item","woocommerce-search-list__item","depth-".concat(i),{"is-searching":r.length>0,"is-skip-level":0===i&&0!==n.parent,"is-variable":n.count>0}),h=Object.assign({},e);delete h.isSingle;var m={role:"menuitemradio"};return n.breadcrumbs.length&&(m["aria-label"]="".concat(n.breadcrumbs[0],": ").concat(n.name)),n.count&&(m["aria-expanded"]=n.id===d),n.breadcrumbs.length?(Object(E.isEmpty)(n.variation)||(n.name=n.variation),Object(c.createElement)(T.b,I()({className:b},e,m))):[Object(c.createElement)(j.MenuItem,I()({key:"product-".concat(n.id),isSelected:s},h,m,{className:b,onClick:function(){l(n)(),t.onProductSelect(n,s)()}}),Object(c.createElement)("span",{className:"woocommerce-search-list__item-state"},D(s)),Object(c.createElement)("span",{className:"woocommerce-search-list__item-label"},Object(c.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:F(n.name,r)}})),n.count?Object(c.createElement)("span",{className:"woocommerce-search-list__item-variation-count"},Object(o.sprintf)(Object(o._n)("%d variation","%d variations",n.count,"woo-gutenberg-products-block"),n.count)):null),d===n.id&&n.count>0&&p&&Object(c.createElement)("div",{key:"loading",className:"woocommerce-search-list__item woocommerce-search-product__itemdepth-1 is-loading is-not-active"},Object(c.createElement)(j.Spinner,null))]}},{key:"render",value:function(){var e=this.state,t=e.products,n=e.loading,r=e.product,a=e.variationsList,i=this.props,s=i.onChange,l=i.selected,u=a[r]||[],d=[].concat(P()(t),P()(u)),p={list:Object(o.__)("Products","woo-gutenberg-products-block"),noItems:Object(o.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(o.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(o.__)("Product search results updated.","woo-gutenberg-products-block")},b=l?[Object(E.find)(d,{id:l})]:[];return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(T.a,{className:"woocommerce-products",list:d,isLoading:n,isSingle:!0,selected:b,onChange:s,onSearch:H.d?this.debouncedOnSearch:null,messages:p,renderItem:this.renderItem,isHierarchical:!0}))}}]),t}(c.Component);q.propTypes={onChange:x.a.func.isRequired,selected:x.a.number.isRequired};var V=q;function Q(e){var t=e.images,n=void 0===t?[]:t;return n.length&&n[0].src||""}var G=wc_product_block_data.min_height;var U=function(e){function t(){var e;return s()(this,t),(e=p()(this,h()(t).apply(this,arguments))).state={product:!1,loaded:!1},e.debouncedGetProduct=Object(E.debounce)(e.getProduct.bind(f()(e)),200),e}return v()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.getProduct()}},{key:"componentDidUpdate",value:function(e){e.attributes.productId!==this.props.attributes.productId&&this.debouncedGetProduct()}},{key:"getProduct",value:function(){var e=this,t=this.props.attributes.productId;t?O()({path:"/wc/blocks/products/".concat(t)}).then(function(t){e.setState({product:t,loaded:!0})}).catch(function(){e.setState({product:!1,loaded:!0})}):this.setState({product:!1,loaded:!0})}},{key:"getInspectorControls",value:function(){var e=this.props,t=e.attributes,n=e.setAttributes,a=e.overlayColor,i=e.setOverlayColor,s=t.mediaSrc||Q(this.state.product),l=t.focalPoint,u=void 0===l?{x:.5,y:.5}:l;return Object(c.createElement)(r.InspectorControls,{key:"inspector"},Object(c.createElement)(j.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(j.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:function(){return n({showDesc:!t.showDesc})}}),Object(c.createElement)(j.ToggleControl,{label:Object(o.__)("Show price","woo-gutenberg-products-block"),checked:t.showPrice,onChange:function(){return n({showPrice:!t.showPrice})}})),Object(c.createElement)(r.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:a.color,onChange:i,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},Object(c.createElement)(j.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:function(e){return n({dimRatio:e})},min:0,max:100,step:10}),!!j.FocalPointPicker&&!!s&&Object(c.createElement)(j.FocalPointPicker,{label:Object(o.__)("Focal Point Picker"),url:s,value:u,onChange:function(e){return n({focalPoint:e})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,r=e.setAttributes;return Object(c.createElement)(j.Placeholder,{icon:"star-filled",label:Object(o.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(o.__)("Visually highlight a product or variation and encourage prompt action","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-product__selection"},Object(c.createElement)(V,{selected:t.productId||0,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e[0]?e[0].id:0;r({productId:t,mediaId:0,mediaSrc:""})}}),Object(c.createElement)(j.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),n(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e,t,n,a,i=this,s=this.props,l=s.attributes,u=s.isSelected,d=s.overlayColor,p=s.setAttributes,b=l.className,h=l.contentAlign,m=l.dimRatio,f=l.editMode,g=l.focalPoint,v=l.height,w=l.showDesc,O=l.showPrice,_=this.state,y=_.loaded,S=_.product,x=k()("wc-block-featured-product",{"is-selected":u,"is-loading":!S&&!y,"is-not-found":!S&&y,"has-background-dim":0!==m},0===(e=m)||50===e?null:"has-background-dim-".concat(10*Math.round(e/10)),"center"!==h&&"has-".concat(h,"-content"),b),C=l.mediaId||(t=S.images,(n=void 0===t?[]:t).length&&n[0].id||0),P=S?(a=l.mediaSrc||S,Object(E.isObject)(a)&&(a=Q(a)),a?{backgroundImage:"url(".concat(a,")")}:{}):{};d.color&&(P.backgroundColor=d.color),g&&(P.backgroundPosition="".concat(100*g.x,"% ").concat(100*g.y,"%"));return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(r.BlockControls,null,Object(c.createElement)(r.AlignmentToolbar,{value:h,onChange:function(e){p({contentAlign:e})}}),Object(c.createElement)(r.MediaUploadCheck,null,Object(c.createElement)(j.Toolbar,null,Object(c.createElement)(r.MediaUpload,{onSelect:function(e){p({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"],value:C,render:function(e){var t=e.open;return Object(c.createElement)(j.IconButton,{className:"components-toolbar__control",label:Object(o.__)("Edit media"),icon:"format-image",onClick:t,disabled:!i.state.product})}})))),!l.editMode&&this.getInspectorControls(),f?this.renderEditMode():Object(c.createElement)(c.Fragment,null,S?Object(c.createElement)(j.ResizableBox,{className:x,size:{height:v},minHeight:G,enable:{bottom:!0},onResizeStop:function(e,t,n){p({height:parseInt(n.style.height)})},style:P},Object(c.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:S.name}}),!Object(E.isEmpty)(S.variation)&&Object(c.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:S.variation}}),w&&Object(c.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:S.description}}),O&&Object(c.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:S.price_html}}),Object(c.createElement)("div",{className:"wc-block-featured-product__link"},Object(c.createElement)(r.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:S.permalink,align:"center"}]],templateLock:"all"})))):Object(c.createElement)(j.Placeholder,{className:"wc-block-featured-product",icon:"star-filled",label:Object(o.__)("Featured Product","woo-gutenberg-products-block")},y?Object(o.__)("No product is selected.","woo-gutenberg-products-block"):Object(c.createElement)(j.Spinner,null))))}}]),t}(c.Component);U.propTypes={attributes:x.a.object.isRequired,isSelected:x.a.bool.isRequired,name:x.a.string.isRequired,setAttributes:x.a.func.isRequired,overlayColor:x.a.object,setOverlayColor:x.a.func.isRequired,debouncedSpeak:x.a.func.isRequired};var W=Object(y.compose)([Object(r.withColors)({overlayColor:"background-color"}),j.withSpokenMessages])(U);Object(a.registerBlockType)("woocommerce/featured-product",{title:Object(o.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:"star-filled",foreground:"#96588a"},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Visually highlight a product or variation and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:wc_product_block_data.default_height},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(o.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0}},edit:function(e){return Object(c.createElement)(W,e)},save:function(){return Object(c.createElement)(r.InnerBlocks.Content,null)}})},56:function(e,t,n){"use strict";n.d(t,"d",function(){return i}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return l}),n.d(t,"b",function(){return u}),n.d(t,"a",function(){return d});var c=n(26),o=n(16),r=n.n(o),a=n(5),i=wc_product_block_data.isLargeCatalog||!1,s=wc_product_block_data.limitTags||!1,l=wc_product_block_data.hasTags||!1,u=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,o=e.search,r=[Object(c.addQueryArgs)("/wc/blocks/products",{per_page:i?100:-1,catalog_visibility:"visible",status:"publish",search:o})];return i&&n.length&&r.push(Object(c.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")})},d=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,o=e.search,r=[Object(c.addQueryArgs)("/wc/blocks/products/tags",{per_page:s?100:-1,orderby:s?"count":"name",order:s?"desc":"asc",search:o})];return s&&n.length&&r.push(Object(c.addQueryArgs)("/wc/blocks/products/tags",{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(a.uniqBy)(Object(a.flatten)(e),"id")})}},61:function(e,t){!function(){e.exports=this.wp.hooks}()},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}}); \ No newline at end of file diff --git a/build/frontend.deps.json b/build/frontend.deps.json new file mode 100644 index 00000000000..4059befe353 --- /dev/null +++ b/build/frontend.deps.json @@ -0,0 +1 @@ +["lodash","wp-components","wp-compose","wp-element","wp-i18n","wp-polyfill"] \ No newline at end of file diff --git a/build/frontend.js b/build/frontend.js new file mode 100644 index 00000000000..371df1381c8 --- /dev/null +++ b/build/frontend.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.frontend=function(e){function t(t){for(var r,i,a=t[0],l=t[1],s=t[2],h=0,d=[];h0&&void 0!==arguments[0]?arguments[0]:[],t=Object(O.groupBy)(e,"parent"),n=function e(n){return n.map(function(n){var r=t[n.term_id];return delete t[n.term_id],x()({},n,{children:r&&r.length?e(r):[]})})},r=n(t[0]||[]);return delete t[0],Object(O.forEach)(t,function(e){r.push.apply(r,k()(n(e||[])))}),r}(r):r}var N=function(e){function t(){var e;return c()(this,t),(e=l()(this,u()(t).apply(this,arguments))).select=Object(f.createRef)(),e.onNavigate=e.onNavigate.bind(d()(e)),e.renderList=e.renderList.bind(d()(e)),e.renderOptions=e.renderOptions.bind(d()(e)),e}return b()(t,e),i()(t,[{key:"onNavigate",value:function(){var e=this.props.isPreview,t=void 0!==e&&e,n=this.select.current.value;if("false"!==n){var r=wc_product_block_data.homeUrl;t||0!==n.indexOf(r)||(document.location.href=n)}}},{key:"renderList",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props.isPreview,c=void 0!==r&&r,o=this.props.attributes.hasCount,i="parent-"+e[0].term_id;return Object(f.createElement)("ul",{key:i},e.map(function(e){var r=o?Object(f.createElement)("span",null,"(",e.count,")"):null;return[Object(f.createElement)("li",{key:e.term_id},Object(f.createElement)("a",{href:c?null:e.link},e.name)," ",r," "),!!e.children&&!!e.children.length&&t.renderList(e.children,n+1)]}))}},{key:"renderOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props.attributes.hasCount;return e.map(function(e){var c=r?"(".concat(e.count,")"):null;return[Object(f.createElement)("option",{key:e.term_id,value:e.link},Object(O.repeat)("–",n)," ",e.name," ",c),!!e.children&&!!e.children.length&&t.renderOptions(e.children,n+1)]})}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.instanceId,r=t.className,c=t.isDropdown,o=C(t),i=w()("wc-block-product-categories",r,{"is-dropdown":c,"is-list":!c}),a="prod-categories-".concat(n);return Object(f.createElement)(f.Fragment,null,o.length>0?Object(f.createElement)("div",{className:i},c?Object(f.createElement)(f.Fragment,null,Object(f.createElement)("div",{className:"wc-block-product-categories__dropdown"},Object(f.createElement)("label",{className:"screen-reader-text",htmlFor:a},Object(m.__)("Select a category","woo-gutenberg-products-block")),Object(f.createElement)("select",{id:a,ref:this.select},Object(f.createElement)("option",{value:"false",hidden:!0},Object(m.__)("Select a category","woo-gutenberg-products-block")),this.renderOptions(o))),Object(f.createElement)(g.IconButton,{icon:"arrow-right-alt2",label:Object(m.__)("Go to category","woo-gutenberg-products-block"),onClick:this.onNavigate})):this.renderList(o)):Object(f.createElement)(g.Placeholder,{className:"wc-block-product-categories",icon:Object(f.createElement)(M.a,null),label:Object(m.__)("Product Categories List","woo-gutenberg-products-block")},Object(m.__)("This block shows product categories for your store. In order to preview this you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block")))}}]),t}(f.Component);N.propTypes={attributes:E.a.object.isRequired,instanceId:E.a.number,isPreview:E.a.bool};t.a=Object(y.withInstanceId)(N)},28:function(e,t){!function(){e.exports=this.wp.compose}()},296:function(e,t,n){e.exports=n(297)},297:function(e,t,n){"use strict";n.r(t);var r=n(0),c=n(5),o=n(112),i=document.querySelectorAll(".wp-block-woocommerce-product-categories");i.length&&Object(c.forEach)(i,function(e){var t=JSON.parse(JSON.stringify(e.dataset)),n={hasCount:"true"===t.hasCount,hasEmpty:"true"===t.hasEmpty,isDropdown:"true"===t.isDropdown,isHierarchical:"true"===t.isHierarchical};e.classList.remove("is-loading"),Object(r.render)(Object(r.createElement)(o.a,{attributes:n}),e)})},3:function(e,t){!function(){e.exports=this.wp.components}()},36:function(e,t,n){"use strict";var r=n(0),c=n(3),o=function(){return Object(r.createElement)(c.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fillRule:"nonzero",d:"M21.913 7.0946H2.0254c-1.1708 0-2.0984.9908-2.0205 2.16l.741 11.0724c.0714 1.0638.9552 1.8892 2.0206 1.8892h18.4054c1.0654 0 1.9492-.8254 2.0205-1.8892l.7411-11.0724c.0779-1.1692-.8497-2.16-2.0205-2.16zm-8.8006-4.6573h5.987c1.119 0 2.0255.9065 2.0255 2.0254v.934H2.8103V2.0255C2.8103.9064 3.7168 0 4.8357 0h6.2513c1.119 0 2.0254.9065 2.0254 2.0254v.4119zm-7.0589 11.619a.926.926 0 1 1 0-1.852h11.8297a.926.926 0 1 1 0 1.852H6.0535z"}))})},i=function(){return Object(r.createElement)(c.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22 7.5H2c-1.2 0-2.1 1-2 2.2l.7 11.1c.1 1.1 1 1.9 2 1.9h18.5c1.1 0 2-.8 2-1.9L24 9.6c.1-1.1-.9-2.1-2-2.1zM13.1 2.8v-.4c0-1.1-.9-2-2-2H4.8c-1.1 0-2 .9-2 2v3.4h18.4v-1c0-1.1-.9-2-2-2h-6.1z"}),Object(r.createElement)("path",{fill:"#fff",d:"M14.4 18.7L12 17.4l-2.4 1.3.5-2.6-1.9-1.9 2.6-.4 1.2-2.4 1.2 2.4 2.6.4-1.9 1.9z"}))})},a=function(){return Object(r.createElement)(c.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(r.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-10 5h-2v-2h2v2zm0-4h-2V7h2v6z"}))})},l=function(){return Object(r.createElement)(c.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},s=function(){return Object(r.createElement)(c.Icon,{icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},u=function(){return Object(r.createElement)(c.Icon,{className:"material-icon",icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M13 13v8h8v-8h-8zM3 21h8v-8H3v8zM3 3v8h8V3H3zm13.66-1.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65z"}),Object(r.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}))})},h=n(6),d=n.n(h),p=n(4),b=n.n(p),f=function(e){var t=e.size,n=void 0===t?20:t,o=e.className;return Object(r.createElement)(c.Icon,{className:d()("woo-icon",o),icon:Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",height:n,width:Math.floor(1.67*n),viewBox:"0 0 245 145"},Object(r.createElement)("path",{fill:"#96588A",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(r.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))})};f.propTypes={size:b.a.number,className:b.a.string};var m=f;n.d(t,"a",function(){return o}),n.d(t,"b",function(){return i}),n.d(t,"c",function(){return a}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"f",function(){return u}),n.d(t,"g",function(){return m})},5:function(e,t){!function(){e.exports=this.lodash}()}}); \ No newline at end of file diff --git a/build/handpicked-products.deps.json b/build/handpicked-products.deps.json new file mode 100644 index 00000000000..71968e163b8 --- /dev/null +++ b/build/handpicked-products.deps.json @@ -0,0 +1 @@ +["lodash","moment","react","react-dom","wp-api-fetch","wp-blocks","wp-components","wp-compose","wp-date","wp-dom","wp-editor","wp-element","wp-hooks","wp-html-entities","wp-i18n","wp-keycodes","wp-polyfill","wp-url","wp-viewport"] \ No newline at end of file diff --git a/build/handpicked-products.js b/build/handpicked-products.js new file mode 100644 index 00000000000..dfdfaa30161 --- /dev/null +++ b/build/handpicked-products.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var o,i,u=t[0],a=t[1],s=t[2],d=0,b=[];d0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});n({products:t})}})))}},{key:"renderEditMode",value:function(){var e=this.props,t=e.attributes,n=e.debouncedSpeak,r=e.setAttributes;return Object(o.createElement)(m.Placeholder,{icon:Object(o.createElement)(v.f,null),label:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(c.__)("Display a selection of hand-picked products in a grid","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(o.createElement)(M,{selected:t.products,onChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.map(function(e){return e.id});r({products:t})}}),Object(o.createElement)(m.Button,{isDefault:!0,onClick:function(){r({editMode:!1}),n(Object(c.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=e.name,r=e.setAttributes,i=t.editMode;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(f.BlockControls,null,Object(o.createElement)(m.Toolbar,{controls:[{icon:"edit",title:Object(c.__)("Edit"),onClick:function(){return r({editMode:!i})},isActive:i}]})),this.getInspectorControls(),i?this.renderEditMode():Object(o.createElement)(m.Disabled,null,Object(o.createElement)(f.ServerSideRender,{block:n,attributes:t})))}}]),t}(o.Component);P.propTypes={attributes:_.a.object.isRequired,name:_.a.string.isRequired,setAttributes:_.a.func.isRequired,debouncedSpeak:_.a.func.isRequired};var S=Object(m.withSpokenMessages)(P),B=n(47);Object(r.registerBlockType)("woocommerce/handpicked-products",{title:Object(c.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(v.f,null),foreground:"#96588a"},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]},alignButtons:{type:"boolean",default:!1}},deprecated:[{attributes:{align:{type:"string"},columns:{type:"number",default:wc_product_block_data.default_columns},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]}},save:Object(B.a)("woocommerce/handpicked-products")}],edit:function(e){return Object(o.createElement)(S,e)},save:function(){return null}})},56:function(e,t,n){"use strict";n.d(t,"d",function(){return u}),n.d(t,"e",function(){return a}),n.d(t,"c",function(){return s}),n.d(t,"b",function(){return l}),n.d(t,"a",function(){return d});var o=n(26),c=n(16),r=n.n(c),i=n(5),u=wc_product_block_data.isLargeCatalog||!1,a=wc_product_block_data.limitTags||!1,s=wc_product_block_data.hasTags||!1,l=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("/wc/blocks/products",{per_page:u?100:-1,catalog_visibility:"visible",status:"publish",search:c})];return u&&n.length&&r.push(Object(o.addQueryArgs)("/wc/blocks/products",{catalog_visibility:"visible",status:"publish",include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})},d=function(e){var t=e.selected,n=function(e){var t=e.selected,n=void 0===t?[]:t,c=e.search,r=[Object(o.addQueryArgs)("/wc/blocks/products/tags",{per_page:a?100:-1,orderby:a?"count":"name",order:a?"desc":"asc",search:c})];return a&&n.length&&r.push(Object(o.addQueryArgs)("/wc/blocks/products/tags",{include:n})),r}({selected:void 0===t?[]:t,search:e.search});return Promise.all(n.map(function(e){return r()({path:e})})).then(function(e){return Object(i.uniqBy)(Object(i.flatten)(e),"id")})}},61:function(e,t){!function(){e.exports=this.wp.hooks}()},62:function(e,t,n){"use strict";var o=n(0),c=n(1),r=n(3),i=n(4),u=n.n(i),a=function(e){var t=e.value,n=e.setAttributes;return Object(o.createElement)(r.SelectControl,{label:Object(c.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(c.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(c.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(c.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(c.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(c.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(c.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(c.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:function(e){return n({orderby:e})}})};a.propTypes={setAttributes:u.a.func.isRequired,value:u.a.string.isRequired},t.a=a},66:function(e,t){!function(){e.exports=this.wp.htmlEntities}()},67:function(e,t){!function(){e.exports=this.wp.date}()},71:function(e,t){!function(){e.exports=this.wp.dom}()},74:function(e,t){},75:function(e,t){},76:function(e,t){},77:function(e,t){},8:function(e,t){!function(){e.exports=this.moment}()}}); \ No newline at end of file diff --git a/build/packages.js b/build/packages.js new file mode 100644 index 00000000000..03e80598d60 --- /dev/null +++ b/build/packages.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{116:function(e,t,a){var r=a(117),n=a(138);e.exports=a(99)?function(e,t,a){return r.f(e,t,n(1,a))}:function(e,t,a){return e[t]=a,e}},117:function(e,t,a){var r=a(118),n=a(348),o=a(349),c=Object.defineProperty;t.f=a(99)?Object.defineProperty:function(e,t,a){if(r(e),t=o(t,!0),r(a),n)try{return c(e,t,a)}catch(e){}if("get"in a||"set"in a)throw TypeError("Accessors not supported!");return"value"in a&&(e[t]=a.value),e}},118:function(e,t,a){var r=a(136);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},119:function(e,t){var a={}.hasOwnProperty;e.exports=function(e,t){return a.call(e,t)}},135:function(e,t,a){var r=a(88),n=a(89),o=a(116),c=a(192),i=a(194),s=function(e,t,a){var l,u,m,d,p=e&s.F,f=e&s.G,b=e&s.S,h=e&s.P,g=e&s.B,v=f?r:b?r[t]||(r[t]={}):(r[t]||{}).prototype,O=f?n:n[t]||(n[t]={}),y=O.prototype||(O.prototype={});for(l in f&&(a=t),a)m=((u=!p&&v&&void 0!==v[l])?v:a)[l],d=g&&u?i(m,r):h&&"function"==typeof m?i(Function.call,m):m,v&&c(v,l,m,e&s.U),O[l]!=m&&o(O,l,d),h&&y[l]!=m&&(y[l]=m)};r.core=n,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,e.exports=s},136:function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},137:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},138:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},139:function(e,t){var a=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++a+r).toString(36))}},140:function(e,t,a){var r=a(89),n=a(88),o=n["__core-js_shared__"]||(n["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:a(193)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},141:function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},142:function(e,t){var a=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:a)(e)}},143:function(e,t,a){var r=a(140)("keys"),n=a(139);e.exports=function(e){return r[e]||(r[e]=n(e))}},144:function(e,t,a){var r=a(141);e.exports=function(e){return Object(r(e))}},145:function(e,t){e.exports={}},167:function(e,t,a){"use strict";var r=a(332),n=a(333),o=a(189);e.exports={formats:o,parse:n,stringify:r}},170:function(e,t,a){"use strict";var r=a(421),n=a(422),o=a(240);e.exports={formats:o,parse:n,stringify:r}},188:function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,n=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var a=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],o=0;o=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n+=r.charAt(c):i<128?n+=o[i]:i<2048?n+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?n+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(c+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(c)),n+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,a,o){if(!a)return t;if("object"!=typeof a){if(n(t))t.push(a);else{if(!t||"object"!=typeof t)return[t,a];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,a))&&(t[a]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(a);var i=t;return n(t)&&!n(a)&&(i=c(t,o)),n(t)&&n(a)?(a.forEach(function(a,n){if(r.call(t,n)){var c=t[n];c&&"object"==typeof c&&a&&"object"==typeof a?t[n]=e(c,a,o):t.push(a)}else t[n]=a}),t):Object.keys(a).reduce(function(t,n){var c=a[n];return r.call(t,n)?t[n]=e(t[n],c,o):t[n]=c,t},i)}}},189:function(e,t,a){"use strict";var r=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},190:function(e,t,a){a(347),e.exports=a(89).Object.assign},191:function(e,t,a){var r=a(136),n=a(88).document,o=r(n)&&r(n.createElement);e.exports=function(e){return o?n.createElement(e):{}}},192:function(e,t,a){var r=a(88),n=a(116),o=a(119),c=a(139)("src"),i=a(350),s=(""+i).split("toString");a(89).inspectSource=function(e){return i.call(e)},(e.exports=function(e,t,a,i){var l="function"==typeof a;l&&(o(a,"name")||n(a,"name",t)),e[t]!==a&&(l&&(o(a,c)||n(a,c,e[t]?""+e[t]:s.join(String(t)))),e===r?e[t]=a:i?e[t]?e[t]=a:n(e,t,a):(delete e[t],n(e,t,a)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[c]||i.call(this)})},193:function(e,t){e.exports=!1},194:function(e,t,a){var r=a(351);e.exports=function(e,t,a){if(r(e),void 0===t)return e;switch(a){case 1:return function(a){return e.call(t,a)};case 2:return function(a,r){return e.call(t,a,r)};case 3:return function(a,r,n){return e.call(t,a,r,n)}}return function(){return e.apply(t,arguments)}}},195:function(e,t,a){var r=a(353),n=a(200);e.exports=Object.keys||function(e){return r(e,n)}},196:function(e,t,a){var r=a(197),n=a(141);e.exports=function(e){return r(n(e))}},197:function(e,t,a){var r=a(198);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},198:function(e,t){var a={}.toString;e.exports=function(e){return a.call(e).slice(8,-1)}},199:function(e,t,a){var r=a(142),n=Math.min;e.exports=function(e){return e>0?n(r(e),9007199254740991):0}},2:function(e,t,a){e.exports=a(326)()},200:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},201:function(e,t,a){a(358),a(366),e.exports=a(89).Array.from},202:function(e,t,a){var r=a(117).f,n=a(119),o=a(83)("toStringTag");e.exports=function(e,t,a){e&&!n(e=a?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},239:function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,n=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var a=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],o=0;o=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n+=r.charAt(c):i<128?n+=o[i]:i<2048?n+=o[192|i>>6]+o[128|63&i]:i<55296||i>=57344?n+=o[224|i>>12]+o[128|i>>6&63]+o[128|63&i]:(c+=1,i=65536+((1023&i)<<10|1023&r.charCodeAt(c)),n+=o[240|i>>18]+o[128|i>>12&63]+o[128|i>>6&63]+o[128|63&i])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},merge:function e(t,a,o){if(!a)return t;if("object"!=typeof a){if(n(t))t.push(a);else{if(!t||"object"!=typeof t)return[t,a];(o&&(o.plainObjects||o.allowPrototypes)||!r.call(Object.prototype,a))&&(t[a]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(a);var i=t;return n(t)&&!n(a)&&(i=c(t,o)),n(t)&&n(a)?(a.forEach(function(a,n){if(r.call(t,n)){var c=t[n];c&&"object"==typeof c&&a&&"object"==typeof a?t[n]=e(c,a,o):t.push(a)}else t[n]=a}),t):Object.keys(a).reduce(function(t,n){var c=a[n];return r.call(t,n)?t[n]=e(t[n],c,o):t[n]=c,t},i)}}},240:function(e,t,a){"use strict";var r=String.prototype.replace,n=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,n,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},326:function(e,t,a){"use strict";var r=a(327);function n(){}function o(){}o.resetWarningCache=n,e.exports=function(){function e(e,t,a,n,o,c){if(c!==r){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var a={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:n};return a.PropTypes=a,a}},327:function(e,t,a){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},332:function(e,t,a){"use strict";var r=a(188),n=a(189),o=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},i=Array.isArray,s=Array.prototype.push,l=function(e,t){s.apply(e,i(t)?t:[t])},u=Date.prototype.toISOString,m={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,formatter:n.formatters[n.default],indices:!1,serializeDate:function(e){return u.call(e)},skipNulls:!1,strictNullHandling:!1},d=function e(t,a,n,o,c,s,u,d,p,f,b,h,g){var v=t;if("function"==typeof u?v=u(a,v):v instanceof Date?v=f(v):"comma"===n&&i(v)&&(v=v.join(",")),null===v){if(o)return s&&!h?s(a,m.encoder,g):a;v=""}if("string"==typeof v||"number"==typeof v||"boolean"==typeof v||r.isBuffer(v))return s?[b(h?a:s(a,m.encoder,g))+"="+b(s(v,m.encoder,g))]:[b(a)+"="+b(String(v))];var O,y=[];if(void 0===v)return y;if(i(u))O=u;else{var j=Object.keys(v);O=d?j.sort(d):j}for(var w=0;w0?v+g:""}},333:function(e,t,a){"use strict";var r=a(188),n=Object.prototype.hasOwnProperty,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},i=function(e,t,a){if(e){var r=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,c=/(\[[^[\]]*])/.exec(r),i=c?r.slice(0,c.index):r,s=[];if(i){if(!a.plainObjects&&n.call(Object.prototype,i)&&!a.allowPrototypes)return;s.push(i)}for(var l=0;null!==(c=o.exec(r))&&l=0;--n){var o,c=e[n];if("[]"===c&&a.parseArrays)o=[].concat(r);else{o=a.plainObjects?Object.create(null):{};var i="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,s=parseInt(i,10);a.parseArrays||""!==i?!isNaN(s)&&c!==i&&String(s)===i&&s>=0&&a.parseArrays&&s<=a.arrayLimit?(o=[])[s]=r:o[i]=r:o={0:r}}r=o}return r}(s,t,a)}};e.exports=function(e,t){var a=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new Error("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth?e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null==e)return a.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var a,i={},s=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,l=t.parameterLimit===1/0?void 0:t.parameterLimit,u=s.split(t.delimiter,l),m=-1,d=t.charset;if(t.charsetSentinel)for(a=0;a-1&&(f=f.split(",")),n.call(i,p)?i[p]=r.combine(i[p],f):i[p]=f}return i}(e,a):e,l=a.plainObjects?Object.create(null):{},u=Object.keys(s),m=0;m0&&void 0!==arguments[0]?arguments[0]:M();return Object(h.pick)(e,["period","compare","before","after","interval","type"])};function I(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return Object(h.uniq)(e.split(",").map(function(e){return parseInt(e,10)}).filter(Boolean))}function L(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:D(),a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:M(),r=P(Object(n.a)({},a,e));return"".concat(t).concat(r)}function M(){var e=S().location.search;return e.length&&Object(C.parse)(e.substring(1))||{}}function B(e){var t=L(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:D(),arguments.length>2&&void 0!==arguments[2]?arguments[2]:M());S().push(t)}var A=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.label,a=e.renderContent;if(!a)return null;return Object(p.createElement)("div",{className:"woocommerce-ellipsis-menu"},Object(p.createElement)(b.Dropdown,{contentClassName:"woocommerce-ellipsis-menu__popover",position:"bottom left",renderToggle:function(e){var a=e.onToggle,r=e.isOpen,n=k()("woocommerce-ellipsis-menu__toggle",{"is-opened":r});return Object(p.createElement)(b.IconButton,{className:n,onClick:a,icon:"ellipsis",title:t,"aria-expanded":r})},renderContent:function(e){return Object(p.createElement)(b.NavigableMenu,{className:"woocommerce-ellipsis-menu__content"},a(e))}}))}}]),t}(p.Component);A.propTypes={label:v.a.string.isRequired,renderContent:v.a.func};var V=A,K=a(48),H=Object(p.createContext)(2);function Y(e){return Object(p.createElement)(H.Consumer,null,function(t){var a="h"+Math.min(t,6);return Object(p.createElement)(a,e)})}function U(e){var t=e.component,a=e.children,r=Object(K.a)(e,["component","children"]),n=t||"div";return Object(p.createElement)(H.Consumer,null,function(e){return Object(p.createElement)(H.Provider,{value:e+1},!1===t?a:Object(p.createElement)(n,r,a))})}function z(e){return function(t,a,r){if(t[a])return t[a].type&&t[a].type===e?void 0:new Error("Invalid ".concat(a," passed to ").concat(r,". Must be ")+"`"+e.name+"`")}}U.propTypes={component:v.a.oneOfType([v.a.func,v.a.string,v.a.bool]),children:v.a.node};var Q=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.action,a=e.children,r=e.description,n=e.isInactive,o=e.menu,c=e.title,i=k()("woocommerce-card",this.props.className,{"has-menu":!!o,"has-action":!!t,"is-inactive":!!n});return Object(p.createElement)("div",{className:i},c&&Object(p.createElement)("div",{className:"woocommerce-card__header"},Object(p.createElement)("div",{className:"woocommerce-card__title-wrapper"},Object(p.createElement)(Y,{className:"woocommerce-card__title woocommerce-card__header-item"},c),r&&Object(p.createElement)(Y,{className:"woocommerce-card__description woocommerce-card__header-item"},r)),t&&Object(p.createElement)("div",{className:"woocommerce-card__action woocommerce-card__header-item"},t),o&&Object(p.createElement)("div",{className:"woocommerce-card__menu woocommerce-card__header-item"},o)),Object(p.createElement)(U,{className:"woocommerce-card__body"},a))}}]),t}(p.Component);Q.propTypes={action:v.a.node,className:v.a.string,description:v.a.oneOfType([v.a.string,v.a.node]),isInactive:v.a.bool,menu:z(V),title:v.a.oneOfType([v.a.string,v.a.node])};var W=Q,$=a(32),G=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"wcAdminLinkHandler",value:function(e){e.preventDefault(),S().push(e.target.closest("a").getAttribute("href"))}},{key:"render",value:function(){var e,t=this.props,a=t.children,r=t.href,o=t.type,c=Object(K.a)(t,["children","href","type"]);e="wp-admin"===o?function(e){return wcSettings.adminUrl+e}(r):r;var i=Object(n.a)({},c,{"data-link-type":o});return"wc-admin"===o&&(i.onClick=this.wcAdminLinkHandler),Object(p.createElement)("a",Object($.a)({href:e},i),a)}}]),t}(p.Component);G.propTypes={href:v.a.string.isRequired,type:v.a.oneOf(["wp-admin","wc-admin","external"]).isRequired},G.defaultProps={type:"wc-admin"},G.contextTypes={router:v.a.object};var J=G;function X(e){var t="";return function e(a){if(Object(h.isString)(a)||Object(h.isNumber)(a))t+=a;else if(Object(h.isArray)(a))a.forEach(e);else if(a&&a.props){var r=a.props.children;Object(h.isArray)(r)?r.forEach(e):e(r)}}(e),t}var Z=function(e){function t(e){var a,r=e.filter,n=e.config,o=e.onFilterChange;Object(i.a)(this,t),a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments));var c=n.input.options;return a.state={options:c},a.updateOptions=a.updateOptions.bind(Object(m.a)(a)),!c&&n.input.getOptions&&n.input.getOptions().then(a.updateOptions).then(function(e){if(!r.value){var t=F(n,e);o(r.key,"value",t)}}),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"updateOptions",value:function(e){return this.setState({options:e}),e}},{key:"getScreenReaderText",value:function(e,t){if(""===e.value)return"";var a=Object(h.find)(t.rules,{value:e.rule})||{},r=Object(h.find)(t.input.options,{value:e.value})||{};return X(w()({mixedString:t.labels.title,components:{filter:Object(p.createElement)(p.Fragment,null,r.label),rule:Object(p.createElement)(p.Fragment,null,a.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,o=e.isEnglish,c=this.state.options,i=r.key,s=r.rule,l=r.value,u=a.labels,m=a.rules,d=w()({mixedString:u.title,components:{title:Object(p.createElement)("span",{className:t}),rule:Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:m,value:s,onChange:Object(h.partial)(n,i,"rule"),"aria-label":u.rule}),filter:c?Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__input"),options:c,value:l,onChange:Object(h.partial)(n,r.key,"value"),"aria-label":u.filter}):Object(p.createElement)(b.Spinner,null)}}),f=this.getScreenReaderText(r,a);return Object(p.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(p.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(p.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":o})},d),f&&Object(p.createElement)("span",{className:"screen-reader-text"},f))}}]),t}(p.Component);Z.propTypes={config:v.a.shape({labels:v.a.shape({rule:v.a.string,title:v.a.string,filter:v.a.string}),rules:v.a.arrayOf(v.a.object),input:v.a.object}).isRequired,filter:v.a.shape({key:v.a.string,rule:v.a.string,value:v.a.string}).isRequired,onFilterChange:v.a.func.isRequired};var ee=Z,te=a(28),ae=a(39);function re(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,n=[],c=0;c0||e.completer.getFreeTextOptions&&r}},{key:"componentDidUpdate",value:function(e,t){var a=this.isExpanded(this.props,this.state),r=this.isExpanded(e,t);a&&!r?this.toggleKeyEvents(!0):!a&&r&&this.toggleKeyEvents(!1)}},{key:"componentWillUnmount",value:function(){this.toggleKeyEvents(!1),this.debouncedLoadOptions.cancel()}},{key:"render",value:function(){var e=this,t=this.props,a=t.children,r=t.instanceId,n=t.completer.className,o=void 0===n?"":n,c=t.staticResults,i=this.state.selectedIndex,s=this.isExpanded(this.props,this.state),l=s?this.getOptions():[],u=(l[i]||{}).key,m=void 0===u?"":u,d=s?"woocommerce-search__autocomplete-".concat(r):null,f=s?"woocommerce-search__autocomplete-".concat(r,"-").concat(m):null,h=k()("woocommerce-search__autocomplete-results",{"is-static-results":c});return Object(p.createElement)("div",{ref:this.bindNode,className:"woocommerce-search__autocomplete"},a({isExpanded:s,listBoxId:d,activeId:f,onChange:this.search}),s&&Object(p.createElement)("div",{id:d,role:"listbox",className:h},l.map(function(t,a){return Object(p.createElement)(b.Button,{key:t.key,id:"woocommerce-search__autocomplete-".concat(r,"-").concat(t.key),role:"option","aria-selected":a===i,disabled:t.isDisabled,className:k()("woocommerce-search__autocomplete-result",o,{"is-selected":a===i}),onClick:function(){return e.select(t)}},t.label)})))}}]),t}(p.Component),oe=Object(te.compose)([b.withSpokenMessages,te.withInstanceId,b.withFocusOutside])(ne),ce=a(16),ie=a.n(ce);function se(e,t){if(!t)return null;var a=e.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());return{suggestionBeforeMatch:e.substring(0,a),suggestionMatch:e.substring(a,a+t.length),suggestionAfterMatch:e.substring(a+t.length)}}function le(e){return[e.country,e.state,e.name||Object(f.__)("TAX","woocommerce-admin"),e.priority].filter(Boolean).map(function(e){return e.toString().toUpperCase().trim()}).join("-")}var ue={name:"categories",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=P({search:e,per_page:10,orderby:"count"}));return ie()({path:"/wc/v4/products/categories".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"title",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All categories with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=se(e.name,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},me=a(66),de=a(279),pe=a.n(de),fe=function(e){var t=e.code,a=e.order,r=e.className,n=e.size,o=e.hideFromScreenReader,c=k()("woocommerce-flag",r),i=t||"unknown";a&&a.shipping&&a.shipping.country?i=a.shipping.country:a&&a.billing&&a.billing.country&&(i=a.billing.country);var s={fontSize:n},l=Object(h.get)(pe.a.countryCode(i),"emoji");return Object(p.createElement)("div",{className:c,style:s,"aria-hidden":o},l&&Object(p.createElement)("span",null,l),!l&&Object(p.createElement)("span",{className:"woocommerce-flag__fallback"},"Invalid country flag"))};fe.propTypes={code:v.a.string,order:v.a.object,className:v.a.string,size:v.a.number};var be=fe,he={name:"countries",className:"woocommerce-search__country-result",isDebounced:!0,options:function(){return wcSettings.dataEndpoints.countries||[]},getSearchExpression:function(e){return"^"+e},getOptionKeywords:function(e){return[e.code,Object(me.decodeEntities)(e.name)]},getOptionLabel:function(e,t){var a=Object(me.decodeEntities)(e.name),r=se(a,t)||{};return[Object(p.createElement)(be,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",code:e.code,size:18,hideFromScreenReader:!0}),Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":a},r.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},r.suggestionMatch),r.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.code,label:Object(me.decodeEntities)(e.name)}}},ge={name:"coupons",className:"woocommerce-search__coupon-result",options:function(e){var t="";e&&(t=P({search:e,per_page:10}));return ie()({path:"/wc/v4/coupons".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.code]},getFreeTextOptions:function(e){return[{key:"code",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All coupons with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,code:e}}]},getOptionLabel:function(e,t){var a=se(e.code,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.code}}},ve={name:"customers",className:"woocommerce-search__customers-result",options:function(e){var t="";e&&(t=P({search:e,searchby:"name",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name]},getFreeTextOptions:function(e){return[{key:"name",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All customers with names that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=se(e.name,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},Oe={name:"download-ips",className:"woocommerce-search__download-ip-result",options:function(e){var t="";if(e)return t=P({match:e}),ie()({path:"/wc/v4/data/download-ips".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.user_ip_address]},getOptionLabel:function(e,t){var a=se(e.user_ip_address,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.user_ip_address},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.user_ip_address,label:e.user_ip_address}}},ye={name:"emails",className:"woocommerce-search__emails-result",options:function(e){var t="";e&&(t=P({search:e,searchby:"email",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.email]},getOptionLabel:function(e,t){var a=se(e.email,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.email},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.email}}},je={name:"orders",className:"woocommerce-search__order-result",options:function(e){var t="";if(e)return t=P({number:e,per_page:10}),ie()({path:"/wc/v4/orders".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return["#"+e.number]},getOptionLabel:function(e,t){var a=se("#"+e.number,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":"#"+e.number},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:"#"+e.number}}},we=function(e){var t=e.product,a=e.alt,r=e.width,n=e.height,o=e.className,c=Object(K.a)(e,["product","alt","width","height","className"]),i=Object(h.get)(t,["images",0])||Object(h.get)(t,["image"]),s=i&&i.src||!1,l=a||i&&i.alt||"",u=k()("woocommerce-product-image",o,{"is-placeholder":!s});return Object(p.createElement)("img",Object($.a)({className:u,src:s||wcSettings.wcAssetUrl+"images/placeholder.png",width:r,height:n,alt:l},c))};we.propTypes={width:v.a.number,height:v.a.number,className:v.a.string,product:v.a.object,alt:v.a.string},we.defaultProps={width:60,height:60,className:""};var _e=we,ke={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=P({search:e,per_page:10,orderby:"popularity"}));return ie()({path:"/wc/v4/products".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.name,e.sku]},getFreeTextOptions:function(e){return[{key:"title",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All products with titles that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=se(e.name,t)||{};return[Object(p.createElement)(_e,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.name},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.name}}},Ee={name:"taxes",className:"woocommerce-search__tax-result",options:function(e){var t="";e&&(t=P({code:e,per_page:10}));return ie()({path:"/wc/v4/taxes".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.id,le(e)]},getFreeTextOptions:function(e){return[{key:"code",label:Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name"},w()({mixedString:Object(f.__)("All taxes with codes that include {{query /}}","woocommerce-admin"),components:{query:Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},e)}})),value:{id:e,name:e}}]},getOptionLabel:function(e,t){var a=se(le(e),t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.code},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:le(e)}}},Ce={name:"usernames",className:"woocommerce-search__usernames-result",options:function(e){var t="";e&&(t=P({search:e,searchby:"username",per_page:10}));return ie()({path:"/wc/v4/customers".concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[e.username]},getOptionLabel:function(e,t){var a=se(e.username,t)||{};return[Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.username},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:e.username}}};function Ne(e){return e.attributes.reduce(function(e,t,a,r){return e+"".concat(t.option).concat(r.length===a+1?"":", ")},"")}var Se={name:"products",className:"woocommerce-search__product-result",options:function(e){var t="";e&&(t=P({search:e,per_page:10}));var a=M().products;return a&&!a.includes(",")||console.warn("Invalid product id supplied to Variations autocompleter"),ie()({path:"/wc/v4/products/".concat(a,"/variations").concat(t)})},isDebounced:!0,getOptionKeywords:function(e){return[Ne(e),e.sku]},getOptionLabel:function(e,t){var a=se(Ne(e),t)||{};return[Object(p.createElement)(_e,{key:"thumbnail",className:"woocommerce-search__result-thumbnail",product:e,width:18,height:18,alt:""}),Object(p.createElement)("span",{key:"name",className:"woocommerce-search__result-name","aria-label":e.description},a.suggestionBeforeMatch,Object(p.createElement)("strong",{className:"components-form-token-field__suggestion-match"},a.suggestionMatch),a.suggestionAfterMatch)]},getOptionCompletion:function(e){return{id:e.id,label:Ne(e)}}},xe=function(e){var t=e.id,a=e.instanceId,r=e.isVisible,n=e.label,o=e.popoverContents,c=e.remove,i=e.screenReaderLabel,s=e.setState,l=e.className;if(i=i||n,!n)return null;var u=k()("woocommerce-tag",l,{"has-remove":!!c}),m="woocommerce-tag__label-".concat(a),d=Object(p.createElement)(p.Fragment,null,Object(p.createElement)("span",{className:"screen-reader-text"},i),Object(p.createElement)("span",{"aria-hidden":"true"},n));return Object(p.createElement)("span",{className:u},o?Object(p.createElement)(b.Button,{className:"woocommerce-tag__text",id:m,onClick:function(){return s(function(){return{isVisible:!0}})},isToggled:r},d):Object(p.createElement)("span",{className:"woocommerce-tag__text",id:m},d),o&&r&&Object(p.createElement)(b.Popover,{onClose:function(){return s(function(){return{isVisible:!1}})}},o),c&&Object(p.createElement)(b.IconButton,{className:"woocommerce-tag__remove",icon:Object(p.createElement)(b.Dashicon,{icon:"dismiss",size:20}),onClick:c(t),label:Object(f.sprintf)(Object(f.__)("Remove %s","woocommerce-admin"),n),"aria-describedby":m}))};xe.propTypes={id:v.a.oneOfType([v.a.number,v.a.string]),label:v.a.string.isRequired,popoverContents:v.a.node,remove:v.a.func,screenReaderLabel:v.a.string};var Fe=Object(te.withState)({isVisible:!1})(Object(te.withInstanceId)(xe)),Te=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).state={value:"",isActive:!1},a.input=Object(p.createRef)(),a.selectResult=a.selectResult.bind(Object(m.a)(a)),a.removeAll=a.removeAll.bind(Object(m.a)(a)),a.removeResult=a.removeResult.bind(Object(m.a)(a)),a.updateSearch=a.updateSearch.bind(Object(m.a)(a)),a.onFocus=a.onFocus.bind(Object(m.a)(a)),a.onBlur=a.onBlur.bind(Object(m.a)(a)),a.onKeyDown=a.onKeyDown.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"selectResult",value:function(e){var t=this.props,a=t.selected,r=t.onChange;-1===Object(h.findIndex)(a,{id:e.id})&&(this.setState({value:""}),r([].concat(Object(o.a)(a),[e])))}},{key:"removeAll",value:function(){(0,this.props.onChange)([])}},{key:"removeResult",value:function(e){var t=this;return function(){var a=t.props,r=a.selected,n=a.onChange,c=Object(h.findIndex)(r,{id:e});n([].concat(Object(o.a)(r.slice(0,c)),Object(o.a)(r.slice(c+1))))}}},{key:"updateSearch",value:function(e){var t=this;return function(a){var r=a.target.value||"";t.setState({value:r}),e(a)}}},{key:"getAutocompleter",value:function(){switch(this.props.type){case"categories":return ue;case"countries":return he;case"coupons":return ge;case"customers":return ve;case"downloadIps":return Oe;case"emails":return ye;case"orders":return je;case"products":return ke;case"taxes":return Ee;case"usernames":return Ce;case"variations":return Se;default:return{}}}},{key:"shouldRenderTags",value:function(){return this.props.selected.some(function(e){return Boolean(e.label)})}},{key:"renderTags",value:function(){var e=this,t=this.props.selected;return this.shouldRenderTags()?Object(p.createElement)(p.Fragment,null,t.map(function(a,r){if(!a.label)return null;var n=Object(f.sprintf)(Object(f.__)("%1$s (%2$s of %3$s)","woocommerce-admin"),a.label,r+1,t.length);return Object(p.createElement)(Fe,{key:a.id,id:a.id,label:a.label,remove:e.removeResult,screenReaderLabel:n})})):null}},{key:"onFocus",value:function(e){var t=this;return function(a){t.setState({isActive:!0}),e(a)}}},{key:"onBlur",value:function(){this.setState({isActive:!1})}},{key:"onKeyDown",value:function(e){var t=this.state.value,a=this.props,r=a.selected,n=a.onChange;8===e.keyCode&&!t&&r.length&&n(Object(o.a)(r.slice(0,-1)))}},{key:"render",value:function(){var e=this,t=this.getAutocompleter(),a=this.props,r=a.allowFreeTextSearch,n=a.className,o=a.inlineTags,c=a.instanceId,i=a.placeholder,s=a.selected,l=a.showClearButton,u=a.staticResults,m=this.state,d=m.value,h=void 0===d?"":d,g=m.isActive,v={"aria-labelledby":this.props["aria-labelledby"],"aria-label":this.props["aria-label"]},O=this.shouldRenderTags(),j=t.inputType?t.inputType:"text",w=Object(p.createElement)(y.a,{className:"woocommerce-search__icon",icon:"search",size:18});return Object(p.createElement)("div",{className:k()("woocommerce-search",n,{"has-inline-tags":o})},Object(p.createElement)(oe,{allowFreeText:r,completer:t,onSelect:this.selectResult,selected:s.map(function(e){return e.id}),staticResults:u},function(t){var a=t.listBoxId,r=t.activeId,n=t.onChange;return o?Object(p.createElement)("div",{className:k()("woocommerce-search__inline-container",{"is-active":g,"has-tags":o&&O}),onClick:function(){e.input.current.focus()}},w,Object(p.createElement)("div",{className:"woocommerce-search__token-list"},e.renderTags(),Object(p.createElement)("input",Object($.a)({ref:e.input,type:j,size:(0===h.length&&i&&i.length||h.length)+1,value:h,placeholder:!O&&i||"",className:"woocommerce-search__inline-input",onChange:e.updateSearch(n),"aria-owns":a,"aria-activedescendant":r,onFocus:e.onFocus(n),onBlur:e.onBlur,onKeyDown:e.onKeyDown,"aria-describedby":O?"search-inline-input-".concat(c):null},v)),Object(p.createElement)("span",{id:"search-inline-input-".concat(c),className:"screen-reader-text"},Object(f.__)("Move backward for selected items","woocommerce-admin")))):Object(p.createElement)(p.Fragment,null,w,Object(p.createElement)("input",Object($.a)({type:"search",value:h,placeholder:i,className:"woocommerce-search__input",onChange:e.updateSearch(n),"aria-owns":a,"aria-activedescendant":r},v)))}),!o&&this.renderTags(),l&&O?Object(p.createElement)(b.Button,{className:"woocommerce-search__clear",isLink:!0,onClick:this.removeAll},Object(p.createElement)(b.Icon,{icon:"dismiss"}),Object(p.createElement)("span",{className:"screen-reader-text"},Object(f.__)("Clear all","woocommerce-admin"))):null)}}]),t}(p.Component);Te.propTypes={allowFreeTextSearch:v.a.bool,className:v.a.string,onChange:v.a.func,type:v.a.oneOf(["categories","countries","coupons","customers","downloadIps","emails","orders","products","taxes","usernames","variations"]).isRequired,placeholder:v.a.string,selected:v.a.arrayOf(v.a.shape({id:v.a.oneOfType([v.a.number,v.a.string]).isRequired,label:v.a.string})),inlineTags:v.a.bool,showClearButton:v.a.bool,staticResults:v.a.bool},Te.defaultProps={allowFreeTextSearch:!1,onChange:h.noop,selected:[],inlineTags:!1,showClearButton:!1,staticResults:!1};var Re=Object(te.withInstanceId)(Te),De=function(e){function t(e){var a,r=e.filter,n=e.config,o=e.query;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).onSearchChange=a.onSearchChange.bind(Object(m.a)(a)),a.state={selected:[]},a.updateLabels=a.updateLabels.bind(Object(m.a)(a)),r.value.length&&n.input.getLabels(r.value,o).then(a.updateLabels),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.config,r=t.filter,n=t.query,o=e.filter;if(r.value.length&&!Object(h.isEqual)(o,r)){var c=this.state.selected.map(function(e){return e.id});I(r.value).every(function(e){return!c.includes(e)})&&a.input.getLabels(r.value,n).then(this.updateLabels)}}},{key:"updateLabels",value:function(e){var t=this.state.selected.map(function(e){return e.id}),a=e.map(function(e){return e.id});Object(h.isEqual)(a.sort(),t.sort())||this.setState({selected:e})}},{key:"onSearchChange",value:function(e){this.setState({selected:e});var t=this.props,a=t.filter,r=t.onFilterChange,n=e.map(function(e){return e.id}).join(",");r(a.key,"value",n)}},{key:"getScreenReaderText",value:function(e,t){var a=this.state.selected;if(0===a.length)return"";var r=Object(h.find)(t.rules,{value:e.rule})||{},n=a.map(function(e){return e.label}).join(", ");return X(w()({mixedString:t.labels.title,components:{filter:Object(p.createElement)(p.Fragment,null,n),rule:Object(p.createElement)(p.Fragment,null,r.label)}}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,o=e.isEnglish,c=this.state.selected,i=r.key,s=r.rule,l=a.input,u=a.labels,m=a.rules,d=w()({mixedString:u.title,components:{title:Object(p.createElement)("span",{className:t}),rule:Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:m,value:s,onChange:Object(h.partial)(n,i,"rule"),"aria-label":u.rule}),filter:Object(p.createElement)(Re,{className:k()(t,"woocommerce-filters-advanced__input"),onChange:this.onSearchChange,type:l.type,placeholder:u.placeholder,selected:c,inlineTags:!0,"aria-label":u.filter})}}),f=this.getScreenReaderText(r,a);return Object(p.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(p.createElement)("legend",{className:"screen-reader-text"},u.add||""),Object(p.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":o})},d),f&&Object(p.createElement)("span",{className:"screen-reader-text"},f))}}]),t}(p.Component);De.propTypes={config:v.a.shape({labels:v.a.shape({placeholder:v.a.string,rule:v.a.string,title:v.a.string}),rules:v.a.arrayOf(v.a.object),input:v.a.object}).isRequired,filter:v.a.shape({key:v.a.string,rule:v.a.string,value:v.a.string}).isRequired,onFilterChange:v.a.func.isRequired,query:v.a.object};var Pe=De,qe=a(57),Ie=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.label,a=e.value,r=e.help,n=e.className,o=e.instanceId,c=e.onChange,i=e.prefix,s=e.suffix,l=e.type,u=Object(K.a)(e,["label","value","help","className","instanceId","onChange","prefix","suffix","type"]),m="inspector-text-control-with-affixes-".concat(o),d=[];return r&&d.push("".concat(m,"__help")),i&&d.push("".concat(m,"__prefix")),s&&d.push("".concat(m,"__suffix")),Object(p.createElement)(b.BaseControl,{label:t,id:m,help:r,className:n},Object(p.createElement)("div",{className:"text-control-with-affixes"},i&&Object(p.createElement)("span",{id:"".concat(m,"__prefix"),className:"text-control-with-affixes__prefix"},i),Object(p.createElement)("input",Object($.a)({className:"components-text-control__input",type:l,id:m,value:a,onChange:function(e){return c(e.target.value)},"aria-describedby":d.join(" ")},u)),s&&Object(p.createElement)("span",{id:"".concat(m,"__suffix"),className:"text-control-with-affixes__suffix"},s)))}}]),t}(p.Component);Ie.defaultProps={type:"text"},Ie.propTypes={label:v.a.string,help:v.a.string,type:v.a.string,value:v.a.string.isRequired,className:v.a.string,onChange:v.a.func.isRequired,prefix:v.a.node,suffix:v.a.node};var Le=Object(te.withInstanceId)(Ie),Me=a(346);function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("number"!=typeof e&&(e=parseFloat(e)),isNaN(e))return"";var a=Object(h.get)(wcSettings,["currency","decimal_separator"],"."),r=Object(h.get)(wcSettings,["currency","thousand_separator"],",");if(t=parseInt(t),isNaN(t)){var n=e.toString().split("."),o=Object(qe.a)(n,2)[1];t=o?o.length:0}return Me(e,t,a,r)}function Ae(e,t){t||(t=Object(h.get)(wcSettings,["currency","symbol"],"$"));var a=Be(e,Object(h.get)(wcSettings,["currency","precision"],2)),r=Object(h.get)(wcSettings,["currency","price_format"],"%1$s%2$s");return""===a?a:Object(f.sprintf)(r,t,a)}var Ve=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getBetweenString",value:function(){return Object(f._x)("{{rangeStart /}}{{span}} and {{/span}}{{rangeEnd /}}","Numerical range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var a=Object(h.get)(t,["input","type"],"number"),r=Object(h.find)(t.rules,{value:e.rule})||{},n=Object(h.isArray)(e.value)?e.value:[e.value],o=Object(qe.a)(n,2),c=o[0],i=o[1];if(!c||"between"===r.value&&!i)return"";"currency"===a&&(c=Ae(c),i=Ae(i));var s=c;return"between"===r.value&&(s=w()({mixedString:this.getBetweenString(),components:{rangeStart:Object(p.createElement)(p.Fragment,null,c),rangeEnd:Object(p.createElement)(p.Fragment,null,i),span:Object(p.createElement)(p.Fragment,null)}})),X(w()({mixedString:t.labels.title,components:{filter:Object(p.createElement)(p.Fragment,null,s),rule:Object(p.createElement)(p.Fragment,null,r.label)}}))}},{key:"getFormControl",value:function(e){var t=e.type,a=e.value,r=e.label,n=e.onChange;if("currency"===t){var o=Object(h.get)(wcSettings,["currency","symbol"]);return 0===Object(h.get)(wcSettings,["currency","position"]).indexOf("right")?Object(p.createElement)(Le,{suffix:Object(p.createElement)("span",{dangerouslySetInnerHTML:{__html:o}}),className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n}):Object(p.createElement)(Le,{prefix:Object(p.createElement)("span",{dangerouslySetInnerHTML:{__html:o}}),className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n})}return Object(p.createElement)(b.TextControl,{className:"woocommerce-filters-advanced__input",type:"number",value:a||"","aria-label":r,onChange:n})}},{key:"getFilterInputs",value:function(){var e=this.props,t=e.config,a=e.filter,r=e.onFilterChange,n=Object(h.get)(t,["input","type"],"number");if("between"===a.rule)return this.getRangeInput();var o=Object(h.isArray)(a.value)?a.value:[a.value],c=Object(qe.a)(o,2),i=c[0],s=c[1];Boolean(s)&&r(a.key,"value",i||s);var l="";return l="lessthan"===a.rule?Object(f._x)("%(field)s maximum amount","maximum value input","woocommerce-admin"):Object(f._x)("%(field)s minimum amount","minimum value input","woocommerce-admin"),this.getFormControl({type:n,value:i||s,label:Object(f.sprintf)(l,{field:Object(h.get)(t,["labels","add"])}),onChange:Object(h.partial)(r,a.key,"value")})}},{key:"getRangeInput",value:function(){var e=this.props,t=e.config,a=e.filter,r=e.onFilterChange,n=Object(h.get)(t,["input","type"],"number"),o=Object(h.isArray)(a.value)?a.value:[a.value],c=Object(qe.a)(o,2),i=c[0],s=c[1];return w()({mixedString:this.getBetweenString(),components:{rangeStart:this.getFormControl({type:n,value:i||"",label:Object(f.sprintf)(Object(f.__)("%(field)s range start","woocommerce-admin"),{field:Object(h.get)(t,["labels","add"])}),onChange:function(e){r(a.key,"value",[e,s])}}),rangeEnd:this.getFormControl({type:n,value:s||"",label:Object(f.sprintf)(Object(f.__)("%(field)s range end","woocommerce-admin"),{field:Object(h.get)(t,["labels","add"])}),onChange:function(e){r(a.key,"value",[i,e])}}),span:Object(p.createElement)("span",{className:"separator"})}})}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.onFilterChange,o=e.isEnglish,c=r.key,i=r.rule,s=a.labels,l=a.rules,u=w()({mixedString:s.title,components:{title:Object(p.createElement)("span",{className:t}),rule:Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:l,value:i,onChange:Object(h.partial)(n,c,"rule"),"aria-label":s.rule}),filter:Object(p.createElement)("div",{className:k()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===i})},this.getFilterInputs())}}),m=this.getScreenReaderText(r,a);return Object(p.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(p.createElement)("legend",{className:"screen-reader-text"},s.add||""),Object(p.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":o})},u),m&&Object(p.createElement)("span",{className:"screen-reader-text"},m))}}]),t}(p.Component),Ke=a(8),He=a.n(Ke),Ye="month",Ue="previous_year",ze="YYYY-MM-DD",Qe=[{value:"today",label:Object(f.__)("Today","woocommerce-admin")},{value:"yesterday",label:Object(f.__)("Yesterday","woocommerce-admin")},{value:"week",label:Object(f.__)("Week to Date","woocommerce-admin")},{value:"last_week",label:Object(f.__)("Last Week","woocommerce-admin")},{value:"month",label:Object(f.__)("Month to Date","woocommerce-admin")},{value:"last_month",label:Object(f.__)("Last Month","woocommerce-admin")},{value:"quarter",label:Object(f.__)("Quarter to Date","woocommerce-admin")},{value:"last_quarter",label:Object(f.__)("Last Quarter","woocommerce-admin")},{value:"year",label:Object(f.__)("Year to Date","woocommerce-admin")},{value:"last_year",label:Object(f.__)("Last Year","woocommerce-admin")},{value:"custom",label:Object(f.__)("Custom","woocommerce-admin")}],We=[{value:"previous_period",label:Object(f.__)("Previous Period","woocommerce-admin")},{value:"previous_year",label:Object(f.__)("Previous Year","woocommerce-admin")}];function $e(e,t){if(He.a.isMoment(t))return t.isValid()?t:null;if("string"==typeof t){var a=He()(t,[ze,e],!0);return a.isValid()?a:null}throw new Error("toMoment requires a string to be passed as an argument")}function Ge(e,t){var a=e.year()===t.year(),r=a&&e.month()===t.month(),n=a&&r&&e.isSame(t,"day"),o=Object(f.__)("MMM D, YYYY","woocommerce-admin"),c=Object(f.__)("MMM D","woocommerce-admin");if(n)return e.format(o);if(r){var i=e.date();return e.format(o).replace(i,"".concat(i," - ").concat(t.date()))}return a?"".concat(e.format(c)," - ").concat(t.format(o)):"".concat(e.format(o)," - ").concat(t.format(o))}function Je(e,t){var a,r,n=He()().startOf(e).subtract(1,e),o=n.clone().endOf(e);if("previous_period"===t)if("year"===e)r=(a=He()().startOf(e).subtract(2,e)).clone().endOf(e);else{var c=o.diff(n,"days");a=(r=n.clone().subtract(1,"days")).clone().subtract(c,"days")}else r=(a="week"===e?n.clone().subtract(1,"years").week(n.week()).startOf("week"):n.clone().subtract(1,"years")).clone().endOf(e);return{primaryStart:n,primaryEnd:o,secondaryStart:a,secondaryEnd:r}}function Xe(e,t){var a,r,n=He()().startOf(e),o=He()(),c=o.diff(n,"days");return"previous_period"===t?(a=n.clone().subtract(1,e),r=o.clone().subtract(1,e)):r=(a="week"===e?n.clone().subtract(1,"years").week(n.week()).startOf("week"):n.clone().subtract(1,"years")).clone().add(c,"days"),{primaryStart:n,primaryEnd:o,secondaryStart:a,secondaryEnd:r}}var Ze=function(e){var t=e.period,a=e.compare,r=e.after,n=e.before;return{period:t||Ye,compare:a||Ue,after:r?He()(r):null,before:n?He()(n):null}},et=function(e){var t=Ze(e),a=t.period,r=t.compare,n=t.after,o=t.before,c=function(e,t,a,r){switch(e){case"today":return Xe("day",t);case"yesterday":return Je("day",t);case"week":return Xe("week",t);case"last_week":return Je("week",t);case"month":return Xe("month",t);case"last_month":return Je("month",t);case"quarter":return Xe("quarter",t);case"last_quarter":return Je("quarter",t);case"year":return Xe("year",t);case"last_year":return Je("year",t);case"custom":var n=r.diff(a,"days");if("previous_period"===t){var o=a.clone().subtract(1,"days");return{primaryStart:a,primaryEnd:r,secondaryStart:o.clone().subtract(n,"days"),secondaryEnd:o}}return{primaryStart:a,primaryEnd:r,secondaryStart:a.clone().subtract(1,"years"),secondaryEnd:r.clone().subtract(1,"years")}}}(a,r,n,o),i=c.primaryStart,s=c.primaryEnd,l=c.secondaryStart,u=c.secondaryEnd;return{primary:{label:Object(h.find)(Qe,function(e){return e.value===a}).label,range:Ge(i,s),after:i,before:s},secondary:{label:Object(h.find)(We,function(e){return e.value===r}).label,range:Ge(l,u),after:l,before:u}}};var tt,at,rt;tt=wcSettings.l10n,at=tt.userLocale,rt=tt.weekdaysShort,"en"!==He.a.locale()&&He.a.updateLocale(at,{longDateFormat:{L:Object(f.__)("MM/DD/YYYY","woocommerce-admin"),LL:Object(f.__)("MMMM D, YYYY","woocommerce-admin"),LLL:Object(f.__)("D MMMM YYYY LT","woocommerce-admin"),LLLL:Object(f.__)("dddd, D MMMM YYYY LT","woocommerce-admin"),LT:Object(f.__)("HH:mm","woocommerce-admin")},weekdaysMin:rt});var nt={invalid:Object(f.__)("Invalid date","woocommerce-admin"),future:Object(f.__)("Select a date in the past","woocommerce-admin"),startAfterEnd:Object(f.__)("Start date must be before end date","woocommerce-admin"),endBeforeStart:Object(f.__)("Start date must be before end date","woocommerce-admin")};a(190),a(201);var ot=function(e){var t=e.disabled,a=e.value,r=e.onChange,n=e.dateFormat,o=e.label,c=e.describedBy,i=e.error,s=e.onFocus,l=e.onKeyDown,u=e.errorPosition,m=k()("woocommerce-calendar__input",{"is-empty":0===a.length,"is-error":i}),d=Object(h.uniqueId)("_woo-dates-input");return Object(p.createElement)("div",{className:m},Object(p.createElement)("input",{type:"text",className:"woocommerce-calendar__input-text",value:a,onChange:r,"aria-label":o,id:d,"aria-describedby":"".concat(d,"-message"),placeholder:n.toLowerCase(),onFocus:s,onKeyDown:l,disabled:t}),i&&Object(p.createElement)(b.Popover,{className:"woocommerce-calendar__input-error",focusOnMount:!1,position:u},i),Object(p.createElement)(b.Dashicon,{icon:"calendar"}),Object(p.createElement)("p",{className:"screen-reader-text",id:"".concat(d,"-message")},i||c))};ot.propTypes={disabled:v.a.bool,value:v.a.string,onChange:v.a.func.isRequired,dateFormat:v.a.string.isRequired,label:v.a.string.isRequired,describedBy:v.a.string.isRequired,error:v.a.string,errorPosition:v.a.string,onFocus:v.a.func,onKeyDown:v.a.func},ot.defaultProps={disabled:!1,onFocus:function(){},errorPosition:"bottom center",onKeyDown:h.noop};var ct=ot,it=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).onDateChange=a.onDateChange.bind(Object(m.a)(a)),a.onInputChange=a.onInputChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"handleKeyDown",value:function(e,t,a){var r=a.keyCode;ae.TAB===r&&e&&t()}},{key:"handleFocus",value:function(e,t){e||t()}},{key:"onDateChange",value:function(e,t){var a=this.props,r=a.onUpdate,n=a.dateFormat,o=He()(t);r({date:o,text:t?o.format(n):"",error:null}),e()}},{key:"onInputChange",value:function(e){var t=e.target.value,a=$e(this.props.dateFormat,t),r=a?null:nt.invalid;this.props.onUpdate({date:a,text:t,error:t.length>0?r:null})}},{key:"render",value:function(){var e=this,t=this.props,a=t.date,r=t.disabled,n=t.text,o=t.dateFormat,c=t.error,i=t.isInvalidDate;return Object(p.createElement)(b.Dropdown,{position:"bottom center",focusOnMount:!1,renderToggle:function(t){var a=t.isOpen,i=t.onToggle;return Object(p.createElement)(ct,{disabled:r,value:n,onChange:e.onInputChange,dateFormat:o,label:Object(f.__)("Choose a date","woocommerce-admin"),error:c,describedBy:Object(f.sprintf)(Object(f.__)("Date input describing a selected date in format %s","woocommerce-admin"),o),onFocus:Object(h.partial)(e.handleFocus,a,i),"aria-expanded":a,focusOnMount:!1,onKeyDown:Object(h.partial)(e.handleKeyDown,a,i),errorPosition:"top center"})},renderContent:function(t){var r=t.onToggle;return Object(p.createElement)(U,{component:!1},Object(p.createElement)(Y,{className:"woocommerce-calendar__date-picker-title"},Object(f.__)("select a date","woocommerce-admin")),Object(p.createElement)("div",{className:"woocommerce-calendar__react-dates is-core-datepicker"},Object(p.createElement)(b.DatePicker,{currentDate:a,onChange:Object(h.partial)(e.onDateChange,r),isInvalidDate:i})))}})}}]),t}(p.Component);it.propTypes={date:v.a.object,disabled:v.a.bool,text:v.a.string,error:v.a.string,onUpdate:v.a.func.isRequired,dateFormat:v.a.string.isRequired,isInvalidDate:v.a.func};var st=it,lt=Object(f.__)("MMM D, YYYY","woocommerce-admin"),ut=Object(f.__)("MM/DD/YYYY","woocommerce-admin"),mt=function(e){function t(e){var a,r=e.filter;Object(i.a)(this,t),a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments));var n=Array.isArray(r.value)?r.value:[null,r.value],o=Object(qe.a)(n,2),c=o[0],s=o[1],d=c?$e(ze,c):null,p=s?$e(ze,s):null;return a.state={before:p,beforeText:p?p.format(ut):"",beforeError:null,after:d,afterText:d?d.format(ut):"",afterError:null},a.onSingleDateChange=a.onSingleDateChange.bind(Object(m.a)(a)),a.onRangeDateChange=a.onRangeDateChange.bind(Object(m.a)(a)),a.onRuleChange=a.onRuleChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getBetweenString",value:function(){return Object(f._x)("{{after /}}{{span}} and {{/span}}{{before /}}","Date range inputs arranged on a single line","woocommerce-admin")}},{key:"getScreenReaderText",value:function(e,t){var a=Object(h.find)(t.rules,{value:e.rule})||{},r=this.state,n=r.before,o=r.after;if(!n||"between"===a.value&&!o)return"";var c=n.format(lt);return"between"===a.value&&(c=w()({mixedString:this.getBetweenString(),components:{after:Object(p.createElement)(p.Fragment,null,o.format(lt)),before:Object(p.createElement)(p.Fragment,null,n.format(lt)),span:Object(p.createElement)(p.Fragment,null)}})),X(w()({mixedString:t.labels.title,components:{filter:Object(p.createElement)(p.Fragment,null,c),rule:Object(p.createElement)(p.Fragment,null,a.label)}}))}},{key:"onSingleDateChange",value:function(e){var t=e.date,a=e.text,r=e.error,n=this.props,o=n.filter,c=n.onFilterChange;this.setState({before:t,beforeText:a,beforeError:r}),t&&c(o.key,"value",t.format(ze))}},{key:"onRangeDateChange",value:function(e,t){var a,r=t.date,n=t.text,o=t.error,i=this.props,s=i.filter,l=i.onFilterChange;if(this.setState((a={},Object(c.a)(a,e,r),Object(c.a)(a,e+"Text",n),Object(c.a)(a,e+"Error",o),a)),r){var u=this.state,m=u.before,d=u.after,p=null,f=null;"after"===e&&(p=r.format(ze),f=m?m.format(ze):null),"before"===e&&(p=d?d.format(ze):null,f=r.format(ze)),p&&f&&l(s.key,"value",[p,f])}}},{key:"isFutureDate",value:function(e){return He()().isBefore(He()(e),"day")}},{key:"getFilterInputs",value:function(){var e=this.props.filter,t=this.state,a=t.before,r=t.beforeText,n=t.beforeError,o=t.after,c=t.afterText,i=t.afterError;return"between"===e.rule?w()({mixedString:this.getBetweenString(),components:{after:Object(p.createElement)(st,{date:o,text:c,error:i,onUpdate:Object(h.partial)(this.onRangeDateChange,"after"),dateFormat:ut,isInvalidDate:this.isFutureDate}),before:Object(p.createElement)(st,{date:a,text:r,error:n,onUpdate:Object(h.partial)(this.onRangeDateChange,"before"),dateFormat:ut,isInvalidDate:this.isFutureDate}),span:Object(p.createElement)("span",{className:"separator"})}}):Object(p.createElement)(st,{date:a,text:r,error:n,onUpdate:this.onSingleDateChange,dateFormat:ut,isInvalidDate:this.isFutureDate})}},{key:"onRuleChange",value:function(e){var t=this.props,a=t.onFilterChange,r=t.filter,n=t.updateFilter,o=this.state.before;"between"===r.rule&&"between"!==e?n({key:r.key,rule:e,value:o?o.format(ze):void 0}):a(r.key,"rule",e)}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.config,r=e.filter,n=e.isEnglish,o=r.rule,c=a.labels,i=a.rules,s=this.getScreenReaderText(r,a),l=w()({mixedString:c.title,components:{title:Object(p.createElement)("span",{className:t}),rule:Object(p.createElement)(b.SelectControl,{className:k()(t,"woocommerce-filters-advanced__rule"),options:i,value:o,onChange:this.onRuleChange,"aria-label":c.rule}),filter:Object(p.createElement)("div",{className:k()(t,"woocommerce-filters-advanced__input-range",{"is-between":"between"===o})},this.getFilterInputs())}});return Object(p.createElement)("fieldset",{className:"woocommerce-filters-advanced__line-item",tabIndex:"0"},Object(p.createElement)("legend",{className:"screen-reader-text"},c.add||""),Object(p.createElement)("div",{className:k()("woocommerce-filters-advanced__fieldset",{"is-english":n})},l),s&&Object(p.createElement)("span",{className:"screen-reader-text"},s))}}]),t}(p.Component),dt=[{value:"all",label:Object(f.__)("All","woocommerce-admin")},{value:"any",label:Object(f.__)("Any","woocommerce-admin")}],pt=function(e){function t(e){var a,r=e.query,n=e.config;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).state={match:r.match||"all",activeFilters:x(r,n.filters)},a.filterListRef=Object(p.createRef)(),a.onMatchChange=a.onMatchChange.bind(Object(m.a)(a)),a.onFilterChange=a.onFilterChange.bind(Object(m.a)(a)),a.getAvailableFilterKeys=a.getAvailableFilterKeys.bind(Object(m.a)(a)),a.addFilter=a.addFilter.bind(Object(m.a)(a)),a.removeFilter=a.removeFilter.bind(Object(m.a)(a)),a.clearFilters=a.clearFilters.bind(Object(m.a)(a)),a.getUpdateHref=a.getUpdateHref.bind(Object(m.a)(a)),a.updateFilter=a.updateFilter.bind(Object(m.a)(a)),a.onFilter=a.onFilter.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.config,r=t.query,n=e.query;Object(h.isEqual)(n,r)||this.setState({activeFilters:x(r,a.filters)})}},{key:"onMatchChange",value:function(e){this.setState({match:e})}},{key:"onFilterChange",value:function(e,t,a){var r=this.state.activeFilters.map(function(r){return e===r.key?Object.assign({},r,Object(c.a)({},t,a)):r});this.setState({activeFilters:r})}},{key:"updateFilter",value:function(e){var t=this.state.activeFilters.map(function(t){return e.key===t.key?e:t});this.setState({activeFilters:t})}},{key:"removeFilter",value:function(e){var t=this.props.onAdvancedFilterAction,a=Object(o.a)(this.state.activeFilters),r=Object(h.findIndex)(a,function(t){return t.key===e});(t("remove",a[r]),a.splice(r,1),this.setState({activeFilters:a}),0===a.length)&&S().push(this.getUpdateHref([]))}},{key:"getTitle",value:function(){var e=this.state.match,t=this.props.config;return w()({mixedString:t.title,components:{select:Object(p.createElement)(b.SelectControl,{className:"woocommerce-filters-advanced__title-select",options:dt,value:e,onChange:this.onMatchChange,"aria-label":Object(f.__)("Choose to apply any or all filters","woocommerce-admin")})}})}},{key:"getAvailableFilterKeys",value:function(){var e=this.props.config,t=this.state.activeFilters.map(function(e){return e.key});return Object(h.difference)(Object.keys(e.filters),t)}},{key:"addFilter",value:function(e,t){var a=this,r=this.props,n=r.onAdvancedFilterAction,c=r.config.filters[e],i={key:e};Array.isArray(c.rules)&&c.rules.length&&(i.rule=c.rules[0].value),c.input&&c.input.options&&(i.value=F(c,c.input.options)),c.input&&"Search"===c.input.component&&(i.value=""),this.setState(function(e){return{activeFilters:[].concat(Object(o.a)(e.activeFilters),[i])}}),n("add",i),t(),setTimeout(function(){a.filterListRef.current.querySelector("li:last-of-type fieldset").focus()})}},{key:"clearFilters",value:function(){(0,this.props.onAdvancedFilterAction)("clear_all"),this.setState({activeFilters:[],match:"all"})}},{key:"getUpdateHref",value:function(e,t){var a=this.props,r=a.path,o=a.query,c=T(e,o,a.config.filters),i="all"===t?void 0:t;return L(Object(n.a)({},c,{match:i}),r,o)}},{key:"isEnglish",value:function(){var e=wcSettings.siteLocale;return/en-/.test(e)}},{key:"onFilter",value:function(){var e=this.props,t=e.onAdvancedFilterAction,a=e.query,r=e.config,o=this.state,c=o.activeFilters,i=o.match,s=T(c,a,r.filters);t("filter",Object(n.a)({},s,{match:i}))}},{key:"render",value:function(){var e=this,t=this.props,a=t.config,r=t.query,o=this.state,c=o.activeFilters,i=o.match,s=this.getAvailableFilterKeys(),l=this.getUpdateHref(c,i),u=window.location.hash&&(window.location.hash.substr(1)===l||0===c.length),m=this.isEnglish();return Object(p.createElement)(W,{className:"woocommerce-filters-advanced woocommerce-analytics__card",title:this.getTitle()},Object(p.createElement)("ul",{className:"woocommerce-filters-advanced__list",ref:this.filterListRef},c.map(function(t){var o=t.key,c=a.filters[o],i=c.input,s=c.labels;return Object(p.createElement)("li",{className:"woocommerce-filters-advanced__list-item",key:o},"SelectControl"===i.component&&Object(p.createElement)(ee,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[o],onFilterChange:e.onFilterChange,isEnglish:m}),"Search"===i.component&&Object(p.createElement)(Pe,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[o],onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Number"===i.component&&Object(p.createElement)(Ve,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[o],onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Currency"===i.component&&Object(p.createElement)(Ve,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:Object(n.a)({},a.filters[o],{input:{type:"currency",component:"Currency"}}),onFilterChange:e.onFilterChange,isEnglish:m,query:r}),"Date"===i.component&&Object(p.createElement)(mt,{className:"woocommerce-filters-advanced__fieldset-item",filter:t,config:a.filters[o],onFilterChange:e.onFilterChange,isEnglish:m,query:r,updateFilter:e.updateFilter}),Object(p.createElement)(b.IconButton,{className:k()("woocommerce-filters-advanced__line-item","woocommerce-filters-advanced__remove"),label:s.remove,onClick:Object(h.partial)(e.removeFilter,o),icon:Object(p.createElement)(y.a,{icon:"cross-small"})}))})),s.length>0&&Object(p.createElement)("div",{className:"woocommerce-filters-advanced__add-filter"},Object(p.createElement)(b.Dropdown,{className:"woocommerce-filters-advanced__add-filter-dropdown",position:"bottom center",renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(p.createElement)(b.IconButton,{className:"woocommerce-filters-advanced__add-button",icon:Object(p.createElement)(y.a,{icon:"add-outline"}),onClick:a,"aria-expanded":t},Object(f.__)("Add a Filter","woocommerce-admin"))},renderContent:function(t){var r=t.onClose;return Object(p.createElement)("ul",{className:"woocommerce-filters-advanced__add-dropdown"},s.map(function(t){return Object(p.createElement)("li",{key:t},Object(p.createElement)(b.Button,{onClick:Object(h.partial)(e.addFilter,t,r)},a.filters[t].labels.add))}))}})),Object(p.createElement)("div",{className:"woocommerce-filters-advanced__controls"},u&&Object(p.createElement)(b.Button,{isPrimary:!0,disabled:!0},Object(f.__)("Filter","woocommerce-admin")),!u&&Object(p.createElement)(J,{className:"components-button is-primary is-button",type:"wc-admin",href:l,onClick:this.onFilter},Object(f.__)("Filter","woocommerce-admin")),c.length>0&&Object(p.createElement)(J,{type:"wc-admin",href:this.getUpdateHref([]),onClick:this.clearFilters},Object(f.__)("Clear all filters","woocommerce-admin"))))}}]),t}(p.Component);pt.propTypes={config:v.a.shape({title:v.a.string,filters:v.a.objectOf(v.a.shape({labels:v.a.shape({add:v.a.string,remove:v.a.string,rule:v.a.string,title:v.a.string,filter:v.a.string}),rules:v.a.arrayOf(v.a.object),input:v.a.object}))}).isRequired,path:v.a.string.isRequired,query:v.a.object,onAdvancedFilterAction:v.a.func},pt.defaultProps={query:{},onAdvancedFilterAction:function(){}};var ft=pt,bt=a(168),ht=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).call(this))).state={animate:null},e.container=Object(p.createRef)(),e.onExited=e.onExited.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"onExited",value:function(){var e=this.props.onExited;e&&e(this.container.current)}},{key:"render",value:function(){var e=this.props,t=e.children,a=e.animationKey,r=e.animate,n=k()("woocommerce-slide-animation",r&&"animate-".concat(r));return Object(p.createElement)("div",{className:n,ref:this.container},Object(p.createElement)(bt.TransitionGroup,null,Object(p.createElement)(bt.CSSTransition,Object($.a)({timeout:200,classNames:"slide",key:a},this.props,{onExited:this.onExited}),function(e){return t({status:e})})))}}]),t}(p.Component);ht.propTypes={children:v.a.func.isRequired,animationKey:v.a.any.isRequired,animate:v.a.oneOf([null,"left","right"]),onExited:v.a.func};var gt=ht,vt=a(68),Ot=a(172),yt=a(169),jt=a(52),wt=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.height;return Object(p.createElement)("div",{"aria-hidden":"true",className:"woocommerce-chart-placeholder",style:{height:e}},Object(p.createElement)(b.Spinner,null))}}]),t}(p.Component);wt.propTypes={height:v.a.number},wt.defaultProps={height:0};var _t=wt,kt=a(73),Et=a(58),Ct=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).chartRef=Object(p.createRef)(),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.drawUpdatedChart()}},{key:"shouldComponentUpdate",value:function(e){return this.props.className!==e.className||!Object(h.isEqual)(this.props.data,e.data)||!Object(h.isEqual)(this.props.orderedKeys,e.orderedKeys)||this.props.drawChart!==e.drawChart||this.props.height!==e.height||this.props.chartType!==e.chartType||this.props.width!==e.width}},{key:"componentDidUpdate",value:function(){this.drawUpdatedChart()}},{key:"componentWillUnmount",value:function(){this.deleteChart()}},{key:"delayedScroll",value:function(){var e=this.props.tooltip;return Object(h.throttle)(function(){e&&e.hide()},300)}},{key:"deleteChart",value:function(){Object(Et.b)(this.chartRef.current).selectAll("svg").remove()}},{key:"drawUpdatedChart",value:function(){(0,this.props.drawChart)(this.getContainer())}},{key:"getContainer",value:function(){var e=this.props,t=e.className,a=e.height,r=e.width;this.deleteChart();var n=Object(Et.b)(this.chartRef.current).append("svg").attr("viewBox","0 0 ".concat(r," ").concat(a)).attr("height",a).attr("width",r).attr("preserveAspectRatio","xMidYMid meet");return t&&n.attr("class","".concat(t,"__viewbox")),n.append("g")}},{key:"render",value:function(){var e=this.props.className;return Object(p.createElement)("div",{className:k()("d3-base",e),ref:this.chartRef,onScroll:this.delayedScroll()})}}]),t}(p.Component);Ct.propTypes={className:v.a.string,data:v.a.array,orderedKeys:v.a.array,tooltip:v.a.object,chartType:v.a.string};var Nt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vt.a;return"function"==typeof e?e:t(e)},St=function(e){var t=new Set(e.reduce(function(e,t){return e.concat(Object.keys(t))},[]));return Object(o.a)(t).filter(function(e){return"date"!==e})},xt=a(113),Ft=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(xt.a)().domain(e.filter(function(e){return e.visible}).map(function(e){return e.key})).rangeRound([0,t.bandwidth()]).padding(a?0:.07)},Tt=function(e,t){return Object(xt.c)().domain([He()(e[0],"YYYY-MM-DD HH:mm").toDate(),He()(e[e.length-1],"YYYY-MM-DD HH:mm").toDate()]).rangeRound([0,t])},Rt=function(e){var t=function(e){var t=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return e.map(function(e){for(var r=0,n=Object.entries(e);rt&&(t=i.value),"date"!==c&&Number.isFinite(i.value)&&i.value-1?Math.round(4*n)/4:Math.ceil(n)}(a,r),o={lower:0,upper:0,step:n};return(Number.isFinite(a)||a<0)&&(o.lower=Math.floor(a/n)*n,o.lower===a&&0!==a&&(o.lower-=n)),(Number.isFinite(r)||r>0)&&(o.upper=Math.ceil(r/n)*n,o.upper===r&&0!==r&&(o.upper+=n)),o},Dt=a(86),Pt=function(e){for(var t=[],a=1;a<=Math.floor(Math.sqrt(e));a++)e%a==0&&(t.push(a),e/a!==a&&t.push(e/a));return t.sort(function(e,t){return e-t}),t},qt=function(e,t,a,r){var n,o=function(e,t){if(e<783)return 7;if(e>=783&&e<=1130)return 12;if(e>1130&&e<=1365){if("time-comparison"===t)return 16;if("item-comparison"===t)return 12}else if(e>1365){if("time-comparison"===t)return 31;if("item-comparison"===t)return 16}return 16}(t,a);return(e.length>=63&&"day"===r||e.length>=9&&"week"===r)&&(e=(n=e).filter(function(e,t){return 0===t||He()(e).toDate().getMonth()!==He()(n[t-1]).toDate().getMonth()})),e.length<=o||"hour"===r&&function(e){var t=He()(e[0]).toDate(),a=He()(e[e.length-1]).toDate();return t.getDate()===a.getDate()&&t.getMonth()===a.getMonth()&&t.getFullYear()===a.getFullYear()}(e)&&t>783?e:function(e,t){for(var a=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:new RegExp([" |,"],"g"),r=e.split(a),n=t.split(a),o=new Array,c=e.length>t.length?r:n,i=0;i=0)return[];var a=Math.ceil(-e/t);return Lt(a,e,e<-1)}(e,a)),Object(o.a)(function(e,t){if(e<=0)return[];var a=Math.ceil(e/t);return Lt(a,e,e>1)}(t,a)))},Bt=function(e,t,a,r,n,o){!function(e,t,a,r){var n=a.yScale.range()[0],o=qt(t.uniqueDates,a.xScale.range()[1],t.mode,t.interval);"line"===t.chartType&&(o=o.map(function(e){return He()(e).toDate()})),e.append("g").attr("class","axis").attr("aria-hidden","true").attr("transform","translate(0, ".concat(n,")")).call(Object(Dt.a)(a.xScale).tickValues(o).tickFormat(function(e,a){return"hour"===t.interval?r.xFormat(e instanceof Date?e:He()(e).toDate()):It(e,a,o,r.xFormat)})),e.append("g").attr("class","axis axis-month").attr("aria-hidden","true").attr("transform","translate(0, ".concat(n+14,")")).call(Object(Dt.a)(a.xScale).tickValues(o).tickFormat(function(e,t){return It(e,t,o,r.x2Format)})),e.append("g").attr("class","pipes").attr("transform","translate(0, ".concat(n,")")).call(Object(Dt.a)(a.xScale).tickValues(o).tickSize(5).tickFormat(""))}(e,t,a,r),function(e,t,a,r,n){var o=Mt(t.yScale.domain()[0],t.yScale.domain()[1],t.step),c=t.xScale.range()[1],i=n?c+r.left+r.right/2-15:-r.left/2-15,s=t.yMin>=0||t.yMax>0?" with-positive-ticks":"";e.append("g").attr("class","grid"+s).attr("transform","translate(-".concat(r.left,", 0)")).call(Object(Dt.b)(t.yScale).tickValues(o).tickSize(-c-r.left-r.right).tickFormat("")),e.append("g").attr("class","axis y-axis").attr("aria-hidden","true").attr("transform","translate("+i+", 12)").attr("text-anchor","start").call(Object(Dt.b)(t.yScale).tickValues(0===t.yMax&&0===t.yMin?[o[0]]:o).tickFormat(function(e){return e>-1&&e<1&&a.yBelow1Format?a.yBelow1Format(e):a.yFormat(e)}))}(e,a,r,n,o),e.selectAll(".domain").remove(),e.selectAll(".axis .tick line").remove()},At=a(283),Vt=function(e,t,a,r,o,c){var i,s,l=r.yScale.range()[0],u=r.xScale.range()[1],m=(i=r.xScale,s=r.yScale,Object(At.a)().x(function(e){return i(He()(e.date).toDate())}).y(function(e){return s(e.value)})),d=function(e,t){return t.map(function(t){return{key:t.key,focus:t.focus,visible:t.visible,label:t.label,values:e.map(function(e){return{date:e.date,focus:t.focus,value:Object(h.get)(e,[t.key,"value"],0),visible:t.visible}})}})}(t,a.visibleKeys),p=e.append("g").attr("class","lines").selectAll(".line-g").data(d.filter(function(e){return e.visible}).reverse()).enter().append("g").attr("class","line-g").attr("role","region").attr("aria-label",function(e){return e.label||e.key}),f=function(e,t,a,r,n){var o=a.slice().reverse();return t.map(function(a,c){var i=Object(h.first)(e.filter(function(e){return e.date===a})),s=n(He()(a).toDate()),l=n(c>=1?He()(t[c-1]).toDate():He()(t[0]).toDate()),u=c1?d:0,width:t.length>1?m:r,values:o.map(function(e){var t=e.key,r=i[t];return r?{key:t,value:r.value,date:a}:null}).filter(Boolean)}})}(t,a.uniqueDates,a.visibleKeys,u,r.xScale),b=u<=1365||a.uniqueDates.length>50?2:3;b=u<=783?1.25:b;var g=u<=1365?4:6;a.uniqueDates.length>1&&p.append("path").attr("fill","none").attr("stroke-width",b).attr("stroke-linejoin","round").attr("stroke-linecap","round").attr("stroke",function(e){return a.getColor(e.key)}).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).attr("d",function(e){return m(e.values)});u/a.uniqueDates.length>36&&p.selectAll("circle").data(function(e,t){return e.values.map(function(a){return Object(n.a)({},a,{i:t,visible:e.visible,key:e.key})})}).enter().append("circle").attr("r",g).attr("fill",function(e){return a.getColor(e.key)}).attr("stroke","#fff").attr("stroke-width",b+1).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).attr("cx",function(e){return r.xScale(He()(e.date).toDate())}).attr("cy",function(e){return r.yScale(e.value)}).attr("tabindex","0").attr("aria-label",function(e){var t=o.screenReaderFormat(e.date instanceof Date?e.date:He()(e.date).toDate());return"".concat(t," ").concat(c.valueFormat(e.value))}).on("focus",function(e,a,r){c.show(t.find(function(t){return t.date===e.date}),r[a].parentNode,Et.a.target)}).on("blur",function(){return c.hide()});var v=e.append("g").attr("class","focusspaces").selectAll(".focus").data(f).enter().append("g").attr("class","focus"),O=v.append("g").attr("class","focus-grid").attr("opacity","0");O.append("line").attr("x1",function(e){return r.xScale(He()(e.date).toDate())}).attr("y1",0).attr("x2",function(e){return r.xScale(He()(e.date).toDate())}).attr("y2",l),O.selectAll("circle").data(function(e){return e.values}).enter().append("circle").attr("r",g+2).attr("fill",function(e){return a.getColor(e.key)}).attr("stroke","#fff").attr("stroke-width",b+2).attr("cx",function(e){return r.xScale(He()(e.date).toDate())}).attr("cy",function(e){return r.yScale(e.value)}),v.append("rect").attr("class","focus-g").attr("x",function(e){return e.start}).attr("y",0).attr("width",function(e){return e.width}).attr("height",l).attr("opacity",0).on("mouseover",function(e,r,n){var o=(0===r||r===f.length-1)&&a.uniqueDates.length>1?0:.5;c.show(t.find(function(t){return t.date===e.date}),Et.a.target,n[r].parentNode,o)}).on("mouseout",function(){return c.hide()})},Kt=5,Ht=[[],[.5],[.333,.667],[.2,.5,.8],[.12,.375,.625,.88],[0,.25,.5,.75,1]],Yt=function(e,t){return function(a){var r=e.length>Kt?Kt:e.length,n=Object(h.findIndex)(e,function(e){return e.key===a}),o=n<=Kt-1?Ht[r][n]:0;return t(o)}},Ut=function(){function e(){Object(i.a)(this,e),this.ref=null,this.chart=null,this.position="",this.title="",this.labelFormat="",this.valueFormat="",this.visibleKeys="",this.getColor=null,this.margin=24}return Object(s.a)(e,[{key:"calculateXPosition",value:function(e,t,a){var r=this.ref.getBoundingClientRect(),n=this.ref.parentNode.querySelector(".d3-base").getBoundingClientRect(),o=Math.max(n.left,t.left);if("below"===this.position)return Math.max(this.margin,Math.min(e.left+.5*e.width-r.width/2-o,n.width-r.width-this.margin));var c=e.left+e.width*a+this.margin-o;return c+r.width+this.margin>n.width?Math.max(this.margin,e.left+e.width*(1-a)-r.width-this.margin-o):c}},{key:"calculateYPosition",value:function(e,t){if("below"===this.position)return t.height;var a=this.ref.getBoundingClientRect(),r=e.top+this.margin-t.top;return r+a.height+this.margin>t.height?Math.max(0,e.top-a.height-this.margin-t.top):r}},{key:"calculatePosition",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=e.getBoundingClientRect(),r=this.chart.getBoundingClientRect();return"below"===this.position&&(t=0),{x:this.calculateXPosition(a,r,t),y:this.calculateYPosition(a,r)}}},{key:"hide",value:function(){Object(Et.b)(this.chart).selectAll(".barfocus, .focus-grid").attr("opacity","0"),Object(Et.b)(this.ref).style("visibility","hidden")}},{key:"getTooltipRowLabel",value:function(e,t){return e[t.key].labelDate?this.labelFormat(He()(e[t.key].labelDate).toDate()):t.label||t.key}},{key:"show",value:function(e,t,a){var r=this,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.visibleKeys.length){Object(Et.b)(a).select(".focus-grid, .barfocus").attr("opacity","1");var o=this.calculatePosition(t,n),c=this.visibleKeys.map(function(t){return'\n\t\t\t\t\t
  • \n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t').concat(r.getTooltipRowLabel(e,t),'\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t').concat(r.valueFormat(e[t.key].value),"\n\t\t\t\t\t
  • \n\t\t\t\t")}),i=this.title?this.title:this.labelFormat(He()(e.date).toDate());Object(Et.b)(this.ref).style("left",o.x+"px").style("top",o.y+"px").style("visibility","visible").html("\n\t\t\t\t
    \n\t\t\t\t\t

    ".concat(i,"

    \n\t\t\t\t\t
      \n\t\t\t\t\t").concat(c.join(""),"\n\t\t\t\t\t
    \n\t\t\t\t
    \n\t\t\t"))}}}]),e}(),zt=function(){return"rtl"===document.documentElement.dir},Qt=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).drawChart=a.drawChart.bind(Object(m.a)(a)),a.getParams=a.getParams.bind(Object(m.a)(a)),a.tooltipRef=Object(p.createRef)(),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getFormatParams",value:function(){var e=this.props,t=e.screenReaderFormat,a=e.xFormat,r=e.x2Format,n=e.yFormat,o=e.yBelow1Format;return{screenReaderFormat:Nt(t,kt.a),xFormat:Nt(a,kt.a),x2Format:Nt(r,kt.a),yBelow1Format:Nt(o),yFormat:Nt(n)}}},{key:"getScaleParams",value:function(e){var t=this.props,a=t.data,r=t.height,n=t.orderedKeys,o=t.chartType,c=this.getMargin(),i=r-c.top-c.bottom,s=this.getWidth()-c.left-c.right,l=Rt(a),u=l.upper,m=l.lower,d=l.step,p=function(e,t,a){return Object(xt.b)().domain([Math.min(t,0),0===a&&0===t?1:Math.max(a,0)]).rangeRound([e,0])}(i,m,u);if("line"===o)return{step:d,xScale:Tt(e,s),yMax:u,yMin:m,yScale:p};var f=this.shouldBeCompact(),b=function(e,t){var a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object(xt.a)().domain(e).range([0,t]).paddingInner(a?0:.1)}(e,s,f);return{step:d,xGroupScale:Ft(n,b,f),xScale:b,yMax:u,yMin:m,yScale:p}}},{key:"getParams",value:function(e){var t=this.props,a=t.chartType,r=t.colorScheme,n=t.data,o=t.interval,c=t.mode,i=t.orderedKeys||function(e){return St(e).map(function(t){return{key:t,focus:!0,total:e.reduce(function(e,a){return e+a[t].value},0),visible:!0}}).sort(function(e,t){return t.total-e.total})}(n),s=i.filter(function(e){return e.visible}),l=i.length>Kt?s:i;return{getColor:Yt(l,r),interval:o,mode:c,chartType:a,uniqueDates:e,visibleKeys:s}}},{key:"createTooltip",value:function(e,t,a){var r=this.props,n=r.tooltipLabelFormat,o=r.tooltipPosition,c=r.tooltipTitle,i=r.tooltipValueFormat,s=new Ut;s.ref=this.tooltipRef.current,s.chart=e,s.position=o,s.title=c,s.labelFormat=Nt(n,kt.a),s.valueFormat=Nt(i),s.visibleKeys=a,s.getColor=t,this.tooltip=s}},{key:"drawChart",value:function(e){var t=this.props,a=t.data,r=t.dateParser,n=t.chartType,c=this.getMargin(),i=function(e,t){var a=Object(kt.c)(t),r=new Set(e.map(function(e){return e.date}));return Object(o.a)(r).sort(function(e,t){return a(e)-a(t)})}(a,r),s=this.getFormatParams(),l=this.getParams(i),u=this.getScaleParams(i),m=e.attr("id","chart").append("g").attr("transform","translate(".concat(c.left,", ").concat(c.top,")"));this.createTooltip(m.node(),l.getColor,l.visibleKeys),Bt(m,l,u,s,c,zt()),"line"===n&&Vt(m,a,l,u,s,this.tooltip),"bar"===n&&function(e,t,a,r,n,o){var c=r.yScale.range()[0],i=e.append("g").attr("class","bars").selectAll("g").data(t).enter().append("g").attr("transform",function(e){return"translate(".concat(r.xScale(e.date),", 0)")}).attr("class","bargroup").attr("role","region").attr("aria-label",function(e){return"item-comparison"===a.mode?n.screenReaderFormat(e.date instanceof Date?e.date:He()(e.date).toDate()):null});i.append("rect").attr("class","barfocus").attr("x",0).attr("y",0).attr("width",r.xGroupScale.range()[1]).attr("height",c).attr("opacity","0").on("mouseover",function(e,a,r){o.show(t.find(function(t){return t.date===e.date}),Et.a.target,r[a].parentNode)}).on("mouseout",function(){return o.hide()});var s=r.yScale(0);i.selectAll(".bar").data(function(e){return a.visibleKeys.map(function(t){return{key:t.key,focus:t.focus,value:Object(h.get)(e,[t.key,"value"],0),label:t.label,visible:t.visible,date:e.date}})}).enter().append("rect").attr("class","bar").attr("x",function(e){return r.xGroupScale(e.key)}).attr("y",function(e){return Math.min(s,r.yScale(e.value))}).attr("width",r.xGroupScale.bandwidth()).attr("height",function(e){return Math.abs(s-r.yScale(e.value))}).attr("fill",function(e){return a.getColor(e.key)}).attr("pointer-events","none").attr("tabindex","0").attr("aria-label",function(e){var r=e.label||e.key;if("time-comparison"===a.mode){var c=t.find(function(t){return t.date===e.date});r=n.screenReaderFormat(He()(c[e.key].labelDate).toDate())}return"".concat(r," ").concat(o.valueFormat(e.value))}).style("opacity",function(e){var t=e.focus?1:.1;return e.visible?t:0}).on("focus",function(e,a,r){var n=e.value>0?Et.a.target:Et.a.target.parentNode;o.show(t.find(function(t){return t.date===e.date}),n,r[a].parentNode)}).on("blur",function(){return o.hide()})}(m,a,l,u,s,this.tooltip)}},{key:"shouldBeCompact",value:function(){var e=this.props,t=e.data,a=e.chartType,r=e.width,n=this.getMargin();if("bar"!==a)return!1;var o=r-n.left-n.right,c=t&&t.length?Object.keys(t[0]).length-1:0;return o1&&void 0!==arguments[1]?arguments[1]:0,a=0;aKt&&l,h=a.length>Kt?m:a;return Object(p.createElement)("div",{className:k()("woocommerce-legend","woocommerce-legend__direction-".concat(c),{"has-total":b,"is-scrollable":u},this.props.className)},Object(p.createElement)("ul",{className:"woocommerce-legend__list",ref:this.listRef,onScroll:b?this.updateListScroll:null},a.map(function(e){return Object(p.createElement)("li",{className:k()("woocommerce-legend__item",{"woocommerce-legend__item-checked":e.visible}),key:e.key,id:"woocommerce-legend-".concat(s,"__item__").concat(e.key),onMouseEnter:r,onMouseLeave:r,onBlur:r,onFocus:r},Object(p.createElement)("button",{onClick:n,id:"woocommerce-legend-".concat(s,"__item-button__").concat(e.key),disabled:e.visible&&d<=1||!e.visible&&d>=Kt||!o,title:d>=Kt?Object(f.sprintf)(Object(f.__)("You may select up to %d items.","woocommerce-admin"),Kt):""},Object(p.createElement)("div",{className:"woocommerce-legend__item-container"},Object(p.createElement)("span",{className:k()("woocommerce-legend__item-checkmark",{"woocommerce-legend__item-checkmark-checked":e.visible}),style:e.visible?{color:Yt(h,t)(e.key)}:null}),Object(p.createElement)("span",{className:"woocommerce-legend__item-title"},e.label),Object(p.createElement)("span",{className:"woocommerce-legend__item-total"},Nt(i)(e.total)))))})),b&&Object(p.createElement)("div",{className:"woocommerce-legend__total"},l))}}]),t}(p.Component);$t.propTypes={className:v.a.string,colorScheme:v.a.func,data:v.a.array.isRequired,handleLegendToggle:v.a.func,handleLegendHover:v.a.func,interactive:v.a.bool,legendDirection:v.a.oneOf(["row","column"]),legendValueFormat:v.a.oneOfType([v.a.string,v.a.func]),totalLabel:v.a.string,instanceId:v.a.number},$t.defaultProps={interactive:!0,legendDirection:"row",legendValueFormat:","};var Gt=Object(te.withInstanceId)($t);var Jt=Object(h.get)(wcSettings,["currency","symbol"],""),Xt=Object(h.get)(wcSettings,["currency","position"],"left");Object(vt.b)({decimal:Object(h.get)(wcSettings,["currency","decimal_separator"],"."),thousands:Object(h.get)(wcSettings,["currency","thousand_separator"],","),grouping:[3],currency:function(e,t){switch(t){case"left_space":return[e+" ",""];case"right":return["",e];case"right_space":return[""," "+e];case"left":default:return[e,""]}}(Jt,Xt)});var Zt=function(e){function t(e){var a;Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).chartBodyRef=Object(p.createRef)();var r=a.getDataKeys();return a.state={focusedKeys:[],visibleKeys:r.slice(0,Kt),width:0},a.prevDataKeys=r.sort(),a.handleTypeToggle=a.handleTypeToggle.bind(Object(m.a)(a)),a.handleLegendToggle=a.handleLegendToggle.bind(Object(m.a)(a)),a.handleLegendHover=a.handleLegendHover.bind(Object(m.a)(a)),a.updateDimensions=a.updateDimensions.bind(Object(m.a)(a)),a.getVisibleData=Object(yt.a)(a.getVisibleData),a.getOrderedKeys=Object(yt.a)(a.getOrderedKeys),a.setInterval=a.setInterval.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getDataKeys",value:function(){var e=this.props,t=e.data,a=e.filterParam,r=e.mode,n=e.query;if("item-comparison"===r){var o=a?I(n[a]):[];return this.getOrderedKeys([],[],o).map(function(e){return e.key})}return St(t)}},{key:"componentDidUpdate",value:function(){var e=this.props.data;if(e&&e.length){var t=St(e).sort();if(!Object(h.isEqual)(t,this.prevDataKeys)){var a=this.getDataKeys();this.prevDataKeys=t,this.setState({visibleKeys:a.slice(0,Kt)})}}}},{key:"componentDidMount",value:function(){this.updateDimensions(),window.addEventListener("resize",this.updateDimensions)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateDimensions)}},{key:"getOrderedKeys",value:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=this.props,n=r.data,o=r.legendTotals,c=r.mode;if(!n||0===n.length)return[];var i=n.reduce(function(e,t){return Object.entries(t).forEach(function(t){var a=Object(qe.a)(t,2),r=a[0],n=a[1];"date"===r||e[r]||(e[r]=n.label)}),e},{}),s=Object.entries(i).map(function(a){var r=Object(qe.a)(a,2),c=r[0],i=r[1];return{focus:0===e.length||e.includes(c),key:c,label:i,total:o&&void 0!==o[c]?o[c]:n.reduce(function(e,t){return e+t[c].value},0),visible:t.includes(c)}});return"item-comparison"===c?s.sort(function(e,t){return t.total-e.total}).filter(function(e){return e.total>0||a.includes(parseInt(e.key,10))}):s}},{key:"handleTypeToggle",value:function(e){if(this.props.chartType!==e){var t=this.props;B({chartType:e},t.path,t.query)}}},{key:"handleLegendToggle",value:function(e){if(this.props.interactiveLegend){var t=e.currentTarget.id.split("_").pop(),a=this.state,r=a.focusedKeys,n=a.visibleKeys;n.includes(t)?this.setState({focusedKeys:Object(h.without)(r,t),visibleKeys:Object(h.without)(n,t)}):this.setState({focusedKeys:r.concat([t]),visibleKeys:n.concat([t])})}}},{key:"handleLegendHover",value:function(e){if("mouseleave"===e.type||"blur"===e.type)this.setState({focusedKeys:[]});else if("mouseenter"===e.type||"focus"===e.type){var t=e.currentTarget.id.split("__").pop();this.setState({focusedKeys:[t]})}}},{key:"updateDimensions",value:function(){this.setState({width:this.chartBodyRef.current.offsetWidth})}},{key:"getVisibleData",value:function(e,t){var a=t.filter(function(e){return e.visible});return e.map(function(e){var t={date:e.date};return a.forEach(function(a){t[a.key]=e[a.key]}),t})}},{key:"setInterval",value:function(e){var t=this.props;B({interval:e},t.path,t.query)}},{key:"renderIntervalSelector",value:function(){var e=this.props,t=e.interval,a=e.allowedIntervals;if(!a||a.length<1)return null;var r={hour:Object(f.__)("By hour","woocommerce-admin"),day:Object(f.__)("By day","woocommerce-admin"),week:Object(f.__)("By week","woocommerce-admin"),month:Object(f.__)("By month","woocommerce-admin"),quarter:Object(f.__)("By quarter","woocommerce-admin"),year:Object(f.__)("By year","woocommerce-admin")};return Object(p.createElement)(b.SelectControl,{className:"woocommerce-chart__interval-select",value:t,options:a.map(function(e){return{value:e,label:r[e]}}),onChange:this.setInterval})}},{key:"getChartHeight",value:function(){var e=this.props,t=e.isViewportLarge;return e.isViewportMobile?180:t?300:220}},{key:"getLegendPosition",value:function(){var e=this.props,t=e.legendPosition,a=e.mode,r=e.isViewportWide;return t||(r&&"time-comparison"===a?"top":r&&"item-comparison"===a?"side":"bottom")}},{key:"render",value:function(){var e=this.state,t=e.focusedKeys,a=e.visibleKeys,r=e.width,n=this.props,o=n.baseValue,c=n.chartType,i=n.data,s=n.dateParser,l=n.emptyMessage,u=n.filterParam,m=n.interactiveLegend,d=n.interval,g=n.isRequesting,v=n.isViewportLarge,O=n.itemsLabel,j=n.mode,w=n.query,_=n.screenReaderFormat,E=n.showHeaderControls,C=n.title,N=n.tooltipLabelFormat,S=n.tooltipValueFormat,x=n.tooltipTitle,F=n.valueType,T=n.xFormat,R=n.x2Format,D=n.yBelow1Format,P=n.yFormat,q=u?I(w[u]):[],L=this.getOrderedKeys(t,a,q),M=g?null:this.getVisibleData(i,L),B=this.getLegendPosition(),A="top"===B?"row":"column",V="side"===B?"row":"column",K=this.getChartHeight(),H=g?null:Object(p.createElement)(Gt,{colorScheme:Ot.a,data:L,handleLegendHover:this.handleLegendHover,handleLegendToggle:this.handleLegendToggle,interactive:m,legendDirection:A,legendValueFormat:S,totalLabel:Object(f.sprintf)(O,L.length)}),z=P,Q=D;if(!P)switch(F){case"average":z=",.0f";break;case"currency":z="$.3~s",Q="$.3~f";break;case"number":z=",.0f"}return Object(p.createElement)("div",{className:"woocommerce-chart"},E&&Object(p.createElement)("div",{className:"woocommerce-chart__header"},Object(p.createElement)(Y,{className:"woocommerce-chart__title"},C),"top"===B&&H,this.renderIntervalSelector(),Object(p.createElement)(b.NavigableMenu,{className:"woocommerce-chart__types",orientation:"horizontal",role:"menubar"},Object(p.createElement)(b.IconButton,{className:k()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"line"===c}),icon:Object(p.createElement)(y.a,{icon:"line-graph"}),title:Object(f.__)("Line chart","woocommerce-admin"),"aria-checked":"line"===c,role:"menuitemradio",tabIndex:"line"===c?0:-1,onClick:Object(h.partial)(this.handleTypeToggle,"line")}),Object(p.createElement)(b.IconButton,{className:k()("woocommerce-chart__type-button",{"woocommerce-chart__type-button-selected":"bar"===c}),icon:Object(p.createElement)(y.a,{icon:"stats-alt"}),title:Object(f.__)("Bar chart","woocommerce-admin"),"aria-checked":"bar"===c,role:"menuitemradio",tabIndex:"bar"===c?0:-1,onClick:Object(h.partial)(this.handleTypeToggle,"bar")}))),Object(p.createElement)(U,{component:!1},Object(p.createElement)("div",{className:k()("woocommerce-chart__body","woocommerce-chart__body-".concat(V)),ref:this.chartBodyRef},"side"===B&&H,g&&Object(p.createElement)(p.Fragment,null,Object(p.createElement)("span",{className:"screen-reader-text"},Object(f.__)("Your requested data is loading","woocommerce-admin")),Object(p.createElement)(_t,{height:K})),!g&&r>0&&Object(p.createElement)(Wt,{baseValue:o,chartType:c,colorScheme:Ot.a,data:M,dateParser:s,height:K,emptyMessage:l,interval:d,margin:{bottom:50,left:80,right:30,top:0},mode:j,orderedKeys:L,screenReaderFormat:_,tooltipLabelFormat:N,tooltipValueFormat:S,tooltipPosition:v?"over":"below",tooltipTitle:x,valueType:F,width:"row"===V?r-320:r,xFormat:T,x2Format:R,yBelow1Format:Q,yFormat:z})),"bottom"===B&&Object(p.createElement)("div",{className:"woocommerce-chart__footer"},H)))}}]),t}(p.Component);Zt.propTypes={allowedIntervals:v.a.array,baseValue:v.a.number,chartType:v.a.oneOf(["bar","line"]),data:v.a.array.isRequired,dateParser:v.a.string.isRequired,emptyMessage:v.a.string,filterParam:v.a.string,itemsLabel:v.a.string,mode:v.a.oneOf(["item-comparison","time-comparison"]),path:v.a.string,query:v.a.object,interactiveLegend:v.a.bool,interval:v.a.oneOf(["hour","day","week","month","quarter","year"]),intervalData:v.a.object,isRequesting:v.a.bool,legendPosition:v.a.oneOf(["bottom","side","top"]),legendTotals:v.a.object,screenReaderFormat:v.a.oneOfType([v.a.string,v.a.func]),showHeaderControls:v.a.bool,title:v.a.string,tooltipLabelFormat:v.a.oneOfType([v.a.string,v.a.func]),tooltipValueFormat:v.a.oneOfType([v.a.string,v.a.func]),tooltipTitle:v.a.string,valueType:v.a.string,xFormat:v.a.string,x2Format:v.a.string,yBelow1Format:v.a.string,yFormat:v.a.string},Zt.defaultProps={baseValue:0,chartType:"line",data:[],dateParser:"%Y-%m-%dT%H:%M:%S",interactiveLegend:!0,interval:"day",isRequesting:!1,mode:"time-comparison",screenReaderFormat:"%B %-d, %Y",showHeaderControls:!0,tooltipLabelFormat:"%B %-d, %Y",tooltipValueFormat:",",xFormat:"%d",x2Format:"%b %Y"};Object(jt.withViewportMatch)({isViewportMobile:"< medium",isViewportLarge:">= large",isViewportWide:">= wide"})(Zt);var ea=function(e){var t=e.count,a=e.label;return a||(a=Object(f.sprintf)(Object(f.__)("Total %d","woocommerce-admin"),t)),Object(p.createElement)("span",{className:"woocommerce-count","aria-label":a},t)};ea.propTypes={count:v.a.number.isRequired,label:v.a.string},ea.defaultProps={label:""};var ta=function(e){var t=e.className,a=e.count,r=e.children,n=e.helpText,o=e.onClick;return a<2?Object(p.createElement)(b.Tooltip,{text:n},Object(p.createElement)("span",{className:t},Object(p.createElement)(b.Button,{className:"woocommerce-compare-button",isDefault:!0,disabled:!0},r))):Object(p.createElement)(b.Button,{className:k()("woocommerce-compare-button",t),isDefault:!0,onClick:o},r)};ta.propTypes={className:v.a.string,count:v.a.number.isRequired,children:v.a.node.isRequired,helpText:v.a.string.isRequired,onClick:v.a.func.isRequired};var aa=ta,ra=function(e){function t(e){var a,r=e.getLabels,n=e.param,o=e.query;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).state={selected:[]},a.clearQuery=a.clearQuery.bind(Object(m.a)(a)),a.updateQuery=a.updateQuery.bind(Object(m.a)(a)),a.updateLabels=a.updateLabels.bind(Object(m.a)(a)),o[n]&&r(o[n],o).then(a.updateLabels),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e,t){var a=e.param,r=e.query,n=t.selected,o=this.props,c=o.getLabels,i=o.param,s=o.query,l=this.state.selected;if(a!==i||n.length>0&&0===l.length)this.clearQuery();else{var u=I(r[i]),m=I(s[i]);Object(h.isEqual)(u.sort(),m.sort())||c(s[i],s).then(this.updateLabels)}}},{key:"clearQuery",value:function(){var e=this.props,t=e.param,a=e.path,r=e.query;this.setState({selected:[]}),B(Object(c.a)({},t,void 0),a,r)}},{key:"updateLabels",value:function(e){this.setState({selected:e})}},{key:"updateQuery",value:function(){var e=this.props,t=e.param,a=e.path,r=e.query,n=this.state.selected.map(function(e){return e.id});B(Object(c.a)({},t,n.join(",")),a,r)}},{key:"render",value:function(){var e=this,t=this.props,a=t.labels,r=t.type,n=this.state.selected;return Object(p.createElement)(W,{title:a.title,className:"woocommerce-filters__compare woocommerce-analytics__card"},Object(p.createElement)("div",{className:"woocommerce-filters__compare-body"},Object(p.createElement)(Re,{type:r,selected:n,placeholder:a.placeholder,onChange:function(t){e.setState({selected:t})}})),Object(p.createElement)("div",{className:"woocommerce-filters__compare-footer"},Object(p.createElement)(aa,{count:n.length,helpText:a.helpText,onClick:this.updateQuery},a.update),n.length>0&&Object(p.createElement)(b.Button,{isLink:!0,onClick:this.clearQuery},Object(f.__)("Clear all","woocommerce-admin"))))}}]),t}(p.Component);ra.propTypes={getLabels:v.a.func.isRequired,labels:v.a.shape({placeholder:v.a.string,title:v.a.string,update:v.a.string}),param:v.a.string.isRequired,path:v.a.string.isRequired,query:v.a.object,type:v.a.string.isRequired},ra.defaultProps={labels:{},query:{}};var na=ra,oa=a(67),ca=function(e){var t=e.date,a=e.machineFormat,r=e.screenReaderFormat,n=e.visibleFormat;return Object(p.createElement)("time",{dateTime:Object(oa.format)(a,t)},Object(p.createElement)("span",{"aria-hidden":"true"},Object(oa.format)(n,t)),Object(p.createElement)("span",{className:"screen-reader-text"},Object(oa.format)(r,t)))};ca.propTypes={date:v.a.oneOfType([v.a.string,v.a.object]).isRequired,machineFormat:v.a.string,screenReaderFormat:v.a.string,visibleFormat:v.a.string},ca.defaultProps={machineFormat:"Y-m-d H:i:s",screenReaderFormat:"F j, Y",visibleFormat:"Y-m-d"};var ia=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.options,r=e.selected,n=e.onSelect,o=e.name,i=e.legend;return Object(p.createElement)("fieldset",{className:"woocommerce-segmented-selection"},Object(p.createElement)("legend",{className:"screen-reader-text"},i),Object(p.createElement)("div",{className:k()(t,"woocommerce-segmented-selection__container")},a.map(function(e){var t=e.value,a=e.label;if(!t||!a)return null;var i=Object(h.uniqueId)("".concat(t,"_"));return Object(p.createElement)("div",{className:"woocommerce-segmented-selection__item",key:t},Object(p.createElement)("input",{className:"woocommerce-segmented-selection__input",type:"radio",name:o,id:i,checked:r===t,onChange:Object(h.partial)(n,Object(c.a)({},o,t))}),Object(p.createElement)("label",{htmlFor:i},Object(p.createElement)("span",{className:"woocommerce-segmented-selection__label"},a)))})))}}]),t}(p.Component);ia.propTypes={className:v.a.string,options:v.a.arrayOf(v.a.shape({value:v.a.string.isRequired,label:v.a.string.isRequired})).isRequired,selected:v.a.string,onSelect:v.a.func.isRequired,name:v.a.string.isRequired,legend:v.a.string.isRequired};var sa=ia,la=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onSelect,a=e.compare;return Object(p.createElement)(sa,{options:We,selected:a,onSelect:t,name:"compare",legend:Object(f.__)("compare to","woocommerce-admin")})}}]),t}(p.Component);la.propTypes={onSelect:v.a.func.isRequired,compare:v.a.string};var ua=la,ma=a(280),da={calendarLabel:Object(f.__)("Calendar","woocommerce-admin"),closeDatePicker:Object(f.__)("Close","woocommerce-admin"),focusStartDate:Object(f.__)("Interact with the calendar and select start and end dates.","woocommerce-admin"),clearDate:Object(f.__)("Clear Date","woocommerce-admin"),clearDates:Object(f.__)("Clear Dates","woocommerce-admin"),jumpToPrevMonth:Object(f.__)("Move backward to switch to the previous month.","woocommerce-admin"),jumpToNextMonth:Object(f.__)("Move forward to switch to the next month.","woocommerce-admin"),enterKey:Object(f.__)("Enter key","woocommerce-admin"),leftArrowRightArrow:Object(f.__)("Right and left arrow keys","woocommerce-admin"),upArrowDownArrow:Object(f.__)("up and down arrow keys","woocommerce-admin"),pageUpPageDown:Object(f.__)("page up and page down keys","woocommerce-admin"),homeEnd:Object(f.__)("Home and end keys","woocommerce-admin"),escape:Object(f.__)("Escape key","woocommerce-admin"),questionMark:Object(f.__)("Question mark","woocommerce-admin"),selectFocusedDate:Object(f.__)("Select the date in focus.","woocommerce-admin"),moveFocusByOneDay:Object(f.__)("Move backward (left) and forward (right) by one day.","woocommerce-admin"),moveFocusByOneWeek:Object(f.__)("Move backward (up) and forward (down) by one week.","woocommerce-admin"),moveFocusByOneMonth:Object(f.__)("Switch months.","woocommerce-admin"),moveFocustoStartAndEndOfWeek:Object(f.__)("Go to the first or last day of a week.","woocommerce-admin"),returnFocusToInput:Object(f.__)("Return to the date input field.","woocommerce-admin"),keyboardNavigationInstructions:Object(f.__)("Press the down arrow key to interact with the calendar and\n select a date.","woocommerce-admin"),chooseAvailableStartDate:function(e){var t=e.date;return Object(f.sprintf)(Object(f.__)("Select %s as a start date.","woocommerce-admin"),t)},chooseAvailableEndDate:function(e){var t=e.date;return Object(f.sprintf)(Object(f.__)("Select %s as an end date.","woocommerce-admin"),t)},chooseAvailableDate:function(e){return e.date},dateIsUnavailable:function(e){var t=e.date;return Object(f.sprintf)(Object(f.__)("%s is not selectable.","woocommerce-admin"),t)},dateIsSelected:function(e){var t=e.date;return Object(f.sprintf)(Object(f.__)("Selected. %s","woocommerce-admin"),t)}},pa=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).onDatesChange=a.onDatesChange.bind(Object(m.a)(a)),a.onFocusChange=a.onFocusChange.bind(Object(m.a)(a)),a.onInputChange=a.onInputChange.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"onDatesChange",value:function(e){var t=e.startDate,a=e.endDate,r=this.props,n=r.onUpdate,o=r.shortDateFormat;n({after:t,before:a,afterText:t?t.format(o):"",beforeText:a?a.format(o):"",afterError:null,beforeError:null})}},{key:"onFocusChange",value:function(e){this.props.onUpdate({focusedInput:e||"startDate"})}},{key:"onInputChange",value:function(e,t){var a,r=t.target.value,n=this.props,o=n.after,i=function(e,t,a,r,n){var o=$e(n,t);return o?He()().isBefore(o,"day")?{date:null,error:nt.future}:"after"===e&&a&&o.isAfter(a,"day")?{date:null,error:nt.startAfterEnd}:"before"===e&&r&&o.isBefore(r,"day")?{date:null,error:nt.endBeforeStart}:{date:o}:{date:null,error:nt.invalid}}(e,r,n.before,o,n.shortDateFormat),s=i.date,l=i.error;this.props.onUpdate((a={},Object(c.a)(a,e,s),Object(c.a)(a,e+"Text",r),Object(c.a)(a,e+"Error",r.length>0?l:null),a))}},{key:"setTnitialVisibleMonth",value:function(e,t){return function(){var a=t||He()();return e?a.clone().subtract(1,"month"):a}}},{key:"render",value:function(){var e=this,t=this.props,a=t.after,r=t.before,n=t.focusedInput,o=t.afterText,c=t.beforeText,i=t.afterError,s=t.beforeError,l=t.shortDateFormat,u=t.isViewportMobile,m=t.isViewportSmall,d=t.isInvalidDate,b=u&&!m;return Object(p.createElement)("div",{className:k()("woocommerce-calendar",{"is-mobile":u})},Object(p.createElement)("div",{className:"woocommerce-calendar__inputs"},Object(p.createElement)(ct,{value:o,onChange:Object(h.partial)(this.onInputChange,"after"),dateFormat:l,label:Object(f.__)("Start Date","woocommerce-admin"),error:i,describedBy:Object(f.sprintf)(Object(f.__)("Date input describing a selected date range's start date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("startDate")}}),Object(p.createElement)("div",{className:"woocommerce-calendar__inputs-to"},Object(f.__)("to","woocommerce-admin")),Object(p.createElement)(ct,{value:c,onChange:Object(h.partial)(this.onInputChange,"before"),dateFormat:l,label:Object(f.__)("End Date","woocommerce-admin"),error:s,describedBy:Object(f.sprintf)(Object(f.__)("Date input describing a selected date range's end date in format %s","woocommerce-admin"),l),onFocus:function(){return e.onFocusChange("endDate")}})),Object(p.createElement)("div",{className:"woocommerce-calendar__react-dates"},Object(p.createElement)(ma.DayPickerRangeController,{onDatesChange:this.onDatesChange,onFocusChange:this.onFocusChange,focusedInput:n,startDate:a,endDate:r,orientation:"horizontal",numberOfMonths:b?2:1,isOutsideRange:function(e){return d&&d(e.toDate())},minimumNights:0,hideKeyboardShortcutsPanel:!0,noBorder:!0,isRTL:"rtl"===document.documentElement.dir,initialVisibleMonth:this.setTnitialVisibleMonth(b,r),phrases:da})))}}]),t}(p.Component);pa.propTypes={after:v.a.object,afterError:v.a.string,afterText:v.a.string,before:v.a.object,beforeError:v.a.string,beforeText:v.a.string,focusedInput:v.a.string,isInvalidDate:v.a.func,onUpdate:v.a.func.isRequired,shortDateFormat:v.a.string.isRequired};var fa=Object(jt.withViewportMatch)({isViewportMobile:"< medium",isViewportSmall:"< small"})(pa),ba=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.onSelect,a=e.period;return Object(p.createElement)(sa,{options:Object(h.filter)(Qe,function(e){return"custom"!==e.value}),selected:a,onSelect:t,name:"period",legend:Object(f.__)("select a preset period","woocommerce-admin")})}}]),t}(p.Component);ba.propTypes={onSelect:v.a.func.isRequired,period:v.a.string};var ha=ba,ga=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).call(this))).onTabSelect=e.onTabSelect.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"onTabSelect",value:function(e){var t=this.props,a=t.onUpdate,r=t.period;"period"===e&&"custom"===r&&a({period:"today"})}},{key:"isFutureDate",value:function(e){return He()().isBefore(He()(e),"day")}},{key:"render",value:function(){var e=this,t=this.props,a=t.period,r=t.compare,n=t.after,o=t.before,c=t.onUpdate,i=t.onClose,s=t.onSelect,l=t.isValidSelection,u=t.resetCustomValues,m=t.focusedInput,d=t.afterText,h=t.beforeText,g=t.afterError,v=t.beforeError,O=t.shortDateFormat;return Object(p.createElement)("div",null,Object(p.createElement)(Y,{className:"screen-reader-text",tabIndex:"0"},Object(f.__)("Select date range and comparison","woocommerce-admin")),Object(p.createElement)(U,{component:!1},Object(p.createElement)(Y,{className:"woocommerce-filters-date__text"},Object(f.__)("select a date range","woocommerce-admin")),Object(p.createElement)(b.TabPanel,{tabs:[{name:"period",title:Object(f.__)("Presets","woocommerce-admin"),className:"woocommerce-filters-date__tab"},{name:"custom",title:Object(f.__)("Custom","woocommerce-admin"),className:"woocommerce-filters-date__tab"}],className:"woocommerce-filters-date__tabs",activeClass:"is-active",initialTabName:"custom"===a?"custom":"period",onSelect:this.onTabSelect},function(t){return Object(p.createElement)(p.Fragment,null,"period"===t.name&&Object(p.createElement)(ha,{onSelect:c,period:a}),"custom"===t.name&&Object(p.createElement)(fa,{after:n,before:o,onUpdate:c,isInvalidDate:e.isFutureDate,focusedInput:m,afterText:d,beforeText:h,afterError:g,beforeError:v,shortDateFormat:O}),Object(p.createElement)("div",{className:k()("woocommerce-filters-date__content-controls",{"is-custom":"custom"===t.name})},Object(p.createElement)(Y,{className:"woocommerce-filters-date__text"},Object(f.__)("compare to","woocommerce-admin")),Object(p.createElement)(ua,{onSelect:c,compare:r}),Object(p.createElement)("div",{className:"woocommerce-filters-date__button-group"},"custom"===t.name&&Object(p.createElement)(b.Button,{className:"woocommerce-filters-date__button",isDefault:!0,onClick:u,disabled:!(n||o)},Object(f.__)("Reset","woocommerce-admin")),l(t.name)?Object(p.createElement)(b.Button,{className:"woocommerce-filters-date__button",onClick:s(t.name,i),isPrimary:!0},Object(f.__)("Update","woocommerce-admin")):Object(p.createElement)(b.Button,{className:"woocommerce-filters-date__button",isPrimary:!0,disabled:!0},Object(f.__)("Update","woocommerce-admin")))))})))}}]),t}(p.Component);ga.propTypes={period:v.a.string.isRequired,compare:v.a.string.isRequired,onUpdate:v.a.func.isRequired,onClose:v.a.func.isRequired,onSelect:v.a.func.isRequired,resetCustomValues:v.a.func.isRequired,focusedInput:v.a.string,afterText:v.a.string,beforeText:v.a.string,afterError:v.a.string,beforeError:v.a.string,shortDateFormat:v.a.string.isRequired};var va=ga,Oa=function(e){var t=e.labels,a=e.isOpen,r=Object(K.a)(e,["labels","isOpen"]),n=k()("woocommerce-dropdown-button",{"is-open":a,"is-multi-line":t.length>1});return Object(p.createElement)(b.Button,Object($.a)({className:n,"aria-expanded":a},r),Object(p.createElement)("div",{className:"woocommerce-dropdown-button__labels"},t.map(function(e,t){return Object(p.createElement)("span",{key:t},e)})))};Oa.propTypes={labels:v.a.array.isRequired,isOpen:v.a.bool};var ya=Oa,ja=Object(f.__)("MM/DD/YYYY","woocommerce-admin"),wa=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).state=a.getResetState(),a.dropdownRef=Object(p.createRef)(),a.update=a.update.bind(Object(m.a)(a)),a.onSelect=a.onSelect.bind(Object(m.a)(a)),a.isValidSelection=a.isValidSelection.bind(Object(m.a)(a)),a.resetCustomValues=a.resetCustomValues.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"getResetState",value:function(){var e=Ze(this.props.query),t=e.period,a=e.compare,r=e.before,n=e.after;return{period:t,compare:a,before:r,after:n,focusedInput:"startDate",afterText:n?n.format(ja):"",beforeText:r?r.format(ja):"",afterError:null,beforeError:null}}},{key:"update",value:function(e){this.setState(e)}},{key:"onSelect",value:function(e,t){var a=this,r=this.props.onRangeSelect;return function(n){var o=a.state,c=o.period,i=o.compare,s=o.after,l=o.before,u={period:"custom"===e?"custom":c,compare:i};"custom"===e?(u.after=s?s.format(ze):"",u.before=l?l.format(ze):""):(u.after=void 0,u.before=void 0),r(u),t(n)}}},{key:"getButtonLabel",value:function(){var e=et(this.props.query),t=e.primary,a=e.secondary;return["".concat(t.label," (").concat(t.range,")"),"".concat(Object(f.__)("vs.","woocommerce-admin")," ").concat(a.label," (").concat(a.range,")")]}},{key:"isValidSelection",value:function(e){var t=this.state,a=t.compare,r=t.after,n=t.before;return"custom"!==e||a&&r&&n}},{key:"resetCustomValues",value:function(){this.setState({after:null,before:null,focusedInput:"startDate",afterText:"",beforeText:"",afterError:null,beforeError:null})}},{key:"render",value:function(){var e=this,t=this.state,a=t.period,r=t.compare,n=t.after,o=t.before,c=t.focusedInput,i=t.afterText,s=t.beforeText,l=t.afterError,u=t.beforeError;return Object(p.createElement)("div",{className:"woocommerce-filters-filter"},Object(p.createElement)("span",{className:"woocommerce-filters-label"},Object(f.__)("Date Range","woocommerce-admin"),":"),Object(p.createElement)(b.Dropdown,{ref:this.dropdownRef,contentClassName:"woocommerce-filters-date__content",position:"bottom",expandOnMobile:!0,renderToggle:function(t){var a=t.isOpen,r=t.onToggle;return Object(p.createElement)(ya,{onClick:r,isOpen:a,labels:e.getButtonLabel()})},renderContent:function(t){var m=t.onClose;return Object(p.createElement)(va,{period:a,compare:r,after:n,before:o,onUpdate:e.update,onClose:m,onSelect:e.onSelect,isValidSelection:e.isValidSelection,resetCustomValues:e.resetCustomValues,focusedInput:c,afterText:i,beforeText:s,afterError:l,beforeError:u,shortDateFormat:ja})}}))}}]),t}(p.Component);wa.propTypes={onRangeSelect:v.a.func.isRequired,query:v.a.object},wa.defaultProps={query:{}};var _a=wa,ka=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.src,a=e.alt,r=Object(K.a)(e,["src","alt"]),n=t;return 0===n.indexOf("/")&&(n=n.substring(1),n=wcSettings.wcAdminAssetUrl+n),Object(p.createElement)("img",Object($.a)({src:n,alt:a||""},r))}}]),t}(p.Component);ka.propTypes={src:v.a.string.isRequired,alt:v.a.string.isRequired};var Ea=ka,Ca=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"renderIllustration",value:function(){var e=this.props,t=e.illustrationWidth,a=e.illustrationHeight,r=e.illustration;return Object(p.createElement)(Ea,{alt:"",src:r,width:t,height:a,className:"woocommerce-empty-content__illustration"})}},{key:"renderActionButtons",value:function(e){var t="secondary"===e?this.props.secondaryActionLabel:this.props.actionLabel,a="secondary"===e?this.props.secondaryActionURL:this.props.actionURL,r="secondary"===e?this.props.secondaryActionCallback:this.props.actionCallback,n="secondary"!==e;return a&&r?Object(p.createElement)(b.Button,{className:"woocommerce-empty-content__action",isPrimary:n,onClick:r,href:a},t):a?Object(p.createElement)(b.Button,{className:"woocommerce-empty-content__action",isPrimary:n,href:a},t):r?Object(p.createElement)(b.Button,{className:"woocommerce-empty-content__action",isPrimary:n,onClick:r},t):null}},{key:"renderActions",value:function(){var e=this.props,t=e.actionLabel,a=e.secondaryActionLabel;return Object(p.createElement)("div",{className:"woocommerce-empty-content__actions"},t&&this.renderActionButtons("primary"),a&&this.renderActionButtons("secondary"))}},{key:"render",value:function(){var e=this.props,t=e.className,a=e.title,r=e.message,n=e.illustration;return Object(p.createElement)("div",{className:k()("woocommerce-empty-content",t)},n&&this.renderIllustration(),a?Object(p.createElement)(Y,{className:"woocommerce-empty-content__title"},a):null,r?Object(p.createElement)("p",{className:"woocommerce-empty-content__message"},r):null,this.renderActions())}}]),t}(p.Component);Ca.propTypes={title:v.a.string.isRequired,message:v.a.string,illustration:v.a.string,illustrationHeight:v.a.number,illustrationWidth:v.a.number,actionLabel:v.a.string.isRequired,actionURL:v.a.string,actionCallback:v.a.func,secondaryActionLabel:v.a.string,secondaryActionURL:v.a.string,secondaryActionCallback:v.a.func,className:v.a.string},Ca.defaultProps={illustration:"/empty-content.svg",illustrationWidth:400};var Na=a(71),Sa=function(e){function t(e){var a;Object(i.a)(this,t);var r=(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).getFilter();if(a.state={nav:r.path||[],animate:null,selectedTag:null},a.selectSubFilter=a.selectSubFilter.bind(Object(m.a)(a)),a.getVisibleFilters=a.getVisibleFilters.bind(Object(m.a)(a)),a.updateSelectedTag=a.updateSelectedTag.bind(Object(m.a)(a)),a.onTagChange=a.onTagChange.bind(Object(m.a)(a)),a.onContentMount=a.onContentMount.bind(Object(m.a)(a)),a.goBack=a.goBack.bind(Object(m.a)(a)),r.settings&&r.settings.getLabels){var n=a.props.query,o=r.settings,c=o.param;(0,o.getLabels)(n[c],n).then(a.updateSelectedTag)}return a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=e.query,a=this.props,r=a.query,n=a.config;if(t[n.param]!==r[[n.param]]){var o=this.getFilter();if(o&&"Search"===o.component){this.setState({nav:o.path||[]});var c=o.settings,i=c.param;(0,c.getLabels)(r[i],r).then(this.updateSelectedTag)}}}},{key:"updateSelectedTag",value:function(e){this.setState({selectedTag:e[0]})}},{key:"getFilter",value:function(e){var t=this.props,a=t.config,r=t.query,n=function e(t){var a=[];return t.forEach(function(t){if(t.subFilters){a.push(Object(h.omit)(t,"subFilters"));var r=e(t.subFilters);a.push.apply(a,Object(o.a)(r))}else a.push(t)}),a}(a.filters);return e=e||r[a.param]||a.defaultValue||"all",Object(h.find)(n,{value:e})||{}}},{key:"getButtonLabel",value:function(e){if("Search"===e.component){var t=this.state.selectedTag;return[t&&t.label,Object(h.get)(e,"settings.labels.button")]}return e?[e.label]:[]}},{key:"getVisibleFilters",value:function(e,t){if(0===t.length)return e;var a=t[0],r=Object(h.find)(e,{value:a});return this.getVisibleFilters(r&&r.subFilters,t.slice(1))}},{key:"selectSubFilter",value:function(e){this.setState(function(t){return{nav:[].concat(Object(o.a)(t.nav),[e]),animate:"left"}})}},{key:"goBack",value:function(){this.setState(function(e){return{nav:e.nav.slice(0,-1),animate:"right"}})}},{key:"update",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=this.props,r=a.path,o=a.query,i=a.config,s=a.onFilterSelect,l=q(o),u=Object(n.a)(Object(c.a)({},i.param,(i.defaultValue||"all")===e?void 0:e),t);i.staticParams.forEach(function(e){u[e]=o[e]}),B(u,r,l),s(u)}},{key:"onTagChange",value:function(e,t,a,r){var n=Object(h.last)(r),o=e.value,i=e.settings.param;n?(this.update(o,Object(c.a)({},i,n.id)),t()):this.update(a.defaultValue||"all"),this.updateSelectedTag([n])}},{key:"renderButton",value:function(e,t,a){var r=this;if(e.component){var n=e.settings,o=n.type,c=n.labels,i=this.getFilter().value===e.value?this.state.selectedTag:null;return Object(p.createElement)(Re,{className:"woocommerce-filters-filter__search",type:o,placeholder:c.placeholder,selected:i?[i]:[],onChange:Object(h.partial)(this.onTagChange,e,t,a),inlineTags:!0,staticResults:!0})}var s=Object(h.partial)(this.selectSubFilter,e.value);return Object(p.createElement)(b.Button,{className:"woocommerce-filters-filter__button",onClick:e.subFilters?s:function(a){t(a),r.update(e.value,e.query||{}),r.setState({selectedTag:null})}},e.label)}},{key:"onContentMount",value:function(e){var t=this.state.nav,a=!!t.length&&this.getFilter(t[t.length-1])?1:0,r=Na.focus.tabbable.find(e)[a];setTimeout(function(){r.focus()},0)}},{key:"render",value:function(){var e=this,t=this.props.config,a=this.state,r=a.nav,n=a.animate,o=this.getVisibleFilters(t.filters,r),c=!!r.length&&this.getFilter(r[r.length-1]),i=this.getFilter();return Object(p.createElement)("div",{className:"woocommerce-filters-filter"},t.label&&Object(p.createElement)("span",{className:"woocommerce-filters-label"},t.label,":"),Object(p.createElement)(b.Dropdown,{contentClassName:"woocommerce-filters-filter__content",position:"bottom",expandOnMobile:!0,headerTitle:Object(f.__)("filter report to show:","woocommerce-admin"),renderToggle:function(t){var a=t.isOpen,r=t.onToggle;return Object(p.createElement)(ya,{onClick:r,isOpen:a,labels:e.getButtonLabel(i)})},renderContent:function(a){var s=a.onClose;return Object(p.createElement)(gt,{animationKey:r,animate:n,onExited:e.onContentMount},function(){return Object(p.createElement)("ul",{className:"woocommerce-filters-filter__content-list"},c&&Object(p.createElement)("li",{className:"woocommerce-filters-filter__content-list-item"},Object(p.createElement)(b.IconButton,{className:"woocommerce-filters-filter__button",onClick:e.goBack,icon:"arrow-left-alt2"},c.label)),o.map(function(a){return Object(p.createElement)("li",{key:a.value,className:k()("woocommerce-filters-filter__content-list-item",{"is-selected":i.value===a.value||i.path&&Object(h.includes)(i.path,a.value)})},e.renderButton(a,s,t))}))})}}))}}]),t}(p.Component);Sa.propTypes={config:v.a.shape({label:v.a.string,staticParams:v.a.array.isRequired,param:v.a.string.isRequired,defaultValue:v.a.string,showFilters:v.a.func.isRequired,filters:v.a.arrayOf(v.a.shape({chartMode:v.a.oneOf(["item-comparison","time-comparison"]),component:v.a.string,label:v.a.string,path:v.a.string,subFilters:v.a.array,value:v.a.string.isRequired}))}).isRequired,path:v.a.string.isRequired,query:v.a.object,onFilterSelect:v.a.func},Sa.defaultProps={query:{},onFilterSelect:function(){}};var xa=Sa,Fa=a(170),Ta=a(171),Ra=a.n(Ta),Da=a(281),Pa=a.n(Da),qa=function(e){var t,a,r,n,o=e.alt,c=e.title,i=e.size,s=e.user,l=e.className,u=k()("woocommerce-gravatar",l,{"is-placeholder":!s}),m=o||s&&(s.display_name||s.name)||"",d="https://www.gravatar.com/avatar/0?s="+i+"&d=mp";return s&&(t=Object(h.isString)(s)?(n=s,"https://www.gravatar.com/avatar/"+Pa.a.createHash("md5").update(n).digest("hex")):s.avatar_URLs[96],a=Ra.a.parse(t),(r=Object(Fa.parse)(a.query)).s=i,r.d="mp",a.search=Object(Fa.stringify)(r),d=Ra.a.format(a)),Object(p.createElement)("img",{alt:m,title:c,className:u,src:d,width:i,height:i})};qa.propTypes={user:v.a.oneOfType([v.a.object,v.a.string]),alt:v.a.string,title:v.a.string,size:v.a.number,className:v.a.string},qa.defaultProps={size:60};var Ia=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).onClick=e.onClick.bind(Object(m.a)(e)),e.onFocusFormToggle=e.onFocusFormToggle.bind(Object(m.a)(e)),e.onKeyDown=e.onKeyDown.bind(Object(m.a)(e)),e.container=Object(p.createRef)(),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"onClick",value:function(e){var t=this.props,a=t.isClickable,r=t.onInvoke;a&&(e.preventDefault(),r())}},{key:"onKeyDown",value:function(e){e.target.isSameNode(e.currentTarget)&&(e.keyCode!==ae.ENTER&&e.keyCode!==ae.SPACE||(e.preventDefault(),this.props.onInvoke()),e.keyCode===ae.UP&&e.preventDefault(),e.keyCode===ae.DOWN&&(e.preventDefault(),(e.target.nextSibling||e.target.parentNode.querySelector(".woocommerce-ellipsis-menu__item")).focus()))}},{key:"onFocusFormToggle",value:function(){this.container.current.focus()}},{key:"render",value:function(){var e=this.props,t=e.checked,a=e.children;return e.isCheckbox?Object(p.createElement)("div",{"aria-checked":t,ref:this.container,role:"menuitemcheckbox",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},Object(p.createElement)(b.BaseControl,{className:"components-toggle-control"},Object(p.createElement)(b.FormToggle,{"aria-hidden":"true",checked:t,onChange:this.props.onInvoke,onFocus:this.onFocusFormToggle,onClick:function(e){return e.stopPropagation()},tabIndex:"-1"}),a)):Object(p.createElement)("div",{role:"menuitem",tabIndex:"0",onKeyDown:this.onKeyDown,onClick:this.onClick,className:"woocommerce-ellipsis-menu__item"},a)}}]),t}(p.Component);Ia.propTypes={checked:v.a.bool,children:v.a.node,isCheckbox:v.a.bool,isClickable:v.a.bool,onInvoke:v.a.func.isRequired},Ia.defaultProps={isClickable:!1,isCheckbox:!1};var La=Ia,Ma=function(e){var t=e.children;return Object(p.createElement)("div",{className:"woocommerce-ellipsis-menu__title"},t)};Ma.propTypes={children:v.a.node};var Ba=Ma,Aa=function(e){var t=e.order,a=e.className,r=t.status,n=wcSettings.orderStatuses,o=k()("woocommerce-order-status",a),i=k()("woocommerce-order-status__indicator",Object(c.a)({},"is-"+r,!0)),s=n[r]||r;return Object(p.createElement)("div",{className:o},Object(p.createElement)("span",{className:i}),s)};Aa.propTypes={order:v.a.object.isRequired,className:v.a.string};var Va=[25,50,75,100],Ka=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).state={inputValue:a.props.page},a.previousPage=a.previousPage.bind(Object(m.a)(a)),a.nextPage=a.nextPage.bind(Object(m.a)(a)),a.onInputChange=a.onInputChange.bind(Object(m.a)(a)),a.onInputBlur=a.onInputBlur.bind(Object(m.a)(a)),a.perPageChange=a.perPageChange.bind(Object(m.a)(a)),a.selectInputValue=a.selectInputValue.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"previousPage",value:function(e){e.stopPropagation();var t=this.props,a=t.page,r=t.onPageChange;a-1<1||r(a-1)}},{key:"nextPage",value:function(e){e.stopPropagation();var t=this.props,a=t.page,r=t.onPageChange;a+1>this.pageCount||r(a+1)}},{key:"perPageChange",value:function(e){var t=this.props,a=t.onPerPageChange,r=t.onPageChange,n=t.total,o=t.page;a(parseInt(e));var c=Math.ceil(n/parseInt(e));o>c&&r(c)}},{key:"onInputChange",value:function(e){this.setState({inputValue:e.target.value})}},{key:"onInputBlur",value:function(e){var t=this.props,a=t.onPageChange,r=t.page,n=parseInt(e.target.value,10);n!==r&&Object(h.isFinite)(n)&&n>0&&this.pageCount&&this.pageCount>=n&&a(n)}},{key:"selectInputValue",value:function(e){e.target.select()}},{key:"renderPageArrows",value:function(){var e=this.props.page;if(this.pageCount<=1)return null;var t=k()("woocommerce-pagination__link",{"is-active":e>1}),a=k()("woocommerce-pagination__link",{"is-active":e1),onClick:this.previousPage,icon:"arrow-left-alt2",label:Object(f.__)("Previous Page","woocommerce-admin"),size:18}),Object(p.createElement)(b.IconButton,{className:a,disabled:!(ethis.pageCount,r=k()("woocommerce-pagination__page-picker-input",{"has-error":a}),n=Object(h.uniqueId)("woocommerce-pagination-page-picker-");return Object(p.createElement)("div",{className:"woocommerce-pagination__page-picker"},Object(p.createElement)("label",{htmlFor:n,className:"woocommerce-pagination__page-picker-label"},Object(f.__)("Go to page","woocommerce-admin"),Object(p.createElement)("input",{id:n,className:r,"aria-invalid":a,type:"number",onClick:this.selectInputValue,onChange:this.onInputChange,onBlur:this.onInputBlur,value:t,min:1,max:this.pageCount})))}},{key:"renderPerPagePicker",value:function(){var e=Va.map(function(e){return{value:e,label:e}});return Object(p.createElement)("div",{className:"woocommerce-pagination__per-page-picker"},Object(p.createElement)(b.SelectControl,{label:Object(f.__)("Rows per page","woocommerce-admin"),value:this.props.perPage,onChange:this.perPageChange,options:e}))}},{key:"render",value:function(){var e=this.props,t=e.total,a=e.perPage,r=e.className;this.pageCount=Math.ceil(t/a);var n=k()("woocommerce-pagination",r);return this.pageCount<=1?t>Va[0]&&Object(p.createElement)("div",{className:n},this.renderPerPagePicker())||null:Object(p.createElement)("div",{className:n},this.renderPageArrows(),this.renderPagePicker(),this.renderPerPagePicker())}}]),t}(p.Component);Ka.propTypes={page:v.a.number.isRequired,onPageChange:v.a.func,perPage:v.a.number.isRequired,onPerPageChange:v.a.func,total:v.a.number.isRequired,className:v.a.string},Ka.defaultProps={onPageChange:h.noop,onPerPageChange:h.noop};var Ha=Ka,Ya=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"stars",value:function(){for(var e=this.props,t=e.size,a=e.totalStars,r={width:t+"px",height:t+"px"},n=[],o=0;o1&&void 0!==arguments[1]?arguments[1]:e,a=Object(h.groupBy)(e,"parent"),r=Object(h.keyBy)(t,"id"),c=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!t.parent)return t.name?[t.name]:[];var a=e(r[t.parent]);return[].concat(Object(o.a)(a),[t.name])},i=function e(t){return t.map(function(t){var o=a[t.id];return delete a[t.id],Object(n.a)({},t,{breadcrumbs:c(r[t.parent]),children:o&&o.length?e(o):[]})})},s=i(a[0]||[]);return delete a[0],Object(h.forEach)(a,function(e){s.push.apply(s,Object(o.a)(i(e||[])))}),s}var Ga=function(){return Object(p.createElement)(b.Icon,{icon:Object(p.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(p.createElement)("path",{fill:"#1E8CBE",d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}))})},Ja=function(){return Object(p.createElement)(b.Icon,{icon:Object(p.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(p.createElement)("path",{fill:"#6C7781",d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}))})},Xa=function(){return Object(p.createElement)(b.Icon,{icon:Object(p.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(p.createElement)("path",{fill:"#1E8CBE",d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})},Za=function(){return Object(p.createElement)(b.Icon,{icon:Object(p.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Object(p.createElement)("path",{fill:"#6C7781",d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))})};function er(e,t){if(!t)return e;var a=new RegExp(Object(h.escapeRegExp)(t),"ig");return e.replace(a,"$&")}var tr=function(e){var t=e.countLabel,a=e.className,r=e.depth,n=void 0===r?0:r,o=e.item,c=e.isSelected,i=e.isSingle,s=e.onSelect,l=e.search,u=void 0===l?"":l,m=e.showCount,d=void 0!==m&&m,f=Object(K.a)(e,["countLabel","className","depth","item","isSelected","isSingle","onSelect","search","showCount"]),g=[a,"woocommerce-search-list__item"];g.push("depth-".concat(n)),i&&g.push("is-radio-button");var v,O=o.breadcrumbs&&o.breadcrumbs.length;return Object(p.createElement)(b.MenuItem,Object($.a)({role:i?"menuitemradio":"menuitemcheckbox",className:g.join(" "),onClick:s(o),isSelected:c},f),Object(p.createElement)("span",{className:"woocommerce-search-list__item-state"},function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?t?Object(p.createElement)(Xa,null):Object(p.createElement)(Za,null):t?Object(p.createElement)(Ga,null):Object(p.createElement)(Ja,null)}(i,c)),Object(p.createElement)("span",{className:"woocommerce-search-list__item-label"},O?Object(p.createElement)("span",{className:"woocommerce-search-list__item-prefix"},1===(v=o.breadcrumbs).length?Object(h.first)(v):2===v.length?Object(h.first)(v)+" › "+Object(h.last)(v):Object(h.first)(v)+" … "+Object(h.last)(v)):null,Object(p.createElement)("span",{className:"woocommerce-search-list__item-name",dangerouslySetInnerHTML:{__html:er(o.name,u)}})),!!d&&Object(p.createElement)("span",{className:"woocommerce-search-list__item-count"},t||o.count))};tr.propTypes={className:v.a.string,countLabel:v.a.node,depth:v.a.number,item:v.a.object,isSelected:v.a.bool,isSingle:v.a.bool,onSelect:v.a.func,search:v.a.string,showCount:v.a.bool};var ar=tr,rr={clear:Object(f.__)("Clear all selected items","woocommerce-admin"),list:Object(f.__)("Results","woocommerce-admin"),noItems:Object(f.__)("No items found.","woocommerce-admin"),noResults:Object(f.__)("No results for %s","woocommerce-admin"),search:Object(f.__)("Search for items","woocommerce-admin"),selected:function(e){return Object(f.sprintf)(Object(f._n)("%d item selected","%d items selected",e,"woocommerce-admin"),e)},updated:Object(f.__)("Search results updated.","woocommerce-admin")},nr=function(e){function t(){var e;return Object(i.a)(this,t),(e=Object(l.a)(this,Object(u.a)(t).apply(this,arguments))).onSelect=e.onSelect.bind(Object(m.a)(e)),e.onRemove=e.onRemove.bind(Object(m.a)(e)),e.onClear=e.onClear.bind(Object(m.a)(e)),e.isSelected=e.isSelected.bind(Object(m.a)(e)),e.defaultRenderItem=e.defaultRenderItem.bind(Object(m.a)(e)),e.renderList=e.renderList.bind(Object(m.a)(e)),e}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=this.props,a=t.onSearch,r=t.search;r!==e.search&&"function"==typeof a&&a(r)}},{key:"onRemove",value:function(e){var t=this.props,a=t.isSingle,r=t.onChange,n=t.selected;return function(){a&&r([]);var t=Object(h.findIndex)(n,{id:e});r([].concat(Object(o.a)(n.slice(0,t)),Object(o.a)(n.slice(t+1))))}}},{key:"onSelect",value:function(e){var t=this,a=this.props,r=a.isSingle,n=a.onChange,c=a.selected;return function(){t.isSelected(e)?t.onRemove(e.id)():n(r?[e]:[].concat(Object(o.a)(c),[e]))}}},{key:"onClear",value:function(){this.props.onChange([])}},{key:"isSelected",value:function(e){return-1!==Object(h.findIndex)(this.props.selected,{id:e.id})}},{key:"getFilteredList",value:function(e,t){var a=this.props.isHierarchical;if(!t)return a?$a(e):e;var r=Object(n.a)({},rr,this.props.messages),o=new RegExp(Object(h.escapeRegExp)(t),"i");this.props.debouncedSpeak(r.updated);var c=e.map(function(e){return!!o.test(e.name)&&e}).filter(Boolean);return a?$a(c,e):c}},{key:"defaultRenderItem",value:function(e){return Object(p.createElement)(ar,e)}},{key:"renderList",value:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.props,n=r.isSingle,o=r.search,c=this.props.renderItem||this.defaultRenderItem;return e?e.map(function(e){return Object(p.createElement)(p.Fragment,{key:e.id},c({item:e,isSelected:t.isSelected(e),onSelect:t.onSelect,isSingle:n,search:o,depth:a}),t.renderList(e.children,a+1))}):null}},{key:"renderListSection",value:function(){var e=this.props,t=e.isLoading,a=e.search,r=this.getFilteredList(this.props.list,a),o=Object(n.a)({},rr,this.props.messages);return t?Object(p.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(p.createElement)(b.Spinner,null)):r.length?Object(p.createElement)(b.MenuGroup,{label:o.list,className:"woocommerce-search-list__list"},this.renderList(r)):Object(p.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(p.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(p.createElement)(y.a,{icon:"notice-outline",role:"img","aria-hidden":"true",focusable:"false"})),Object(p.createElement)("span",{className:"woocommerce-search-list__not-found-text"},a?Object(f.sprintf)(o.noResults,a):o.noItems))}},{key:"renderSelectedSection",value:function(){var e=this,t=this.props,a=t.isLoading,r=t.isSingle,o=t.selected,c=Object(n.a)({},rr,this.props.messages);if(a||r||!o)return null;var i=o.length;return Object(p.createElement)("div",{className:"woocommerce-search-list__selected"},Object(p.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(p.createElement)("strong",null,c.selected(i)),i>0?Object(p.createElement)(b.Button,{isLink:!0,isDestructive:!0,onClick:this.onClear,"aria-label":c.clear},Object(f.__)("Clear all","woocommerce-admin")):null),o.map(function(t,a){return Object(p.createElement)(Fe,{key:a,label:t.name,id:t.id,remove:e.onRemove})}))}},{key:"render",value:function(){var e=this.props,t=e.className,a=void 0===t?"":t,r=e.search,o=e.setState,c=Object(n.a)({},rr,this.props.messages);return Object(p.createElement)("div",{className:"woocommerce-search-list ".concat(a)},this.renderSelectedSection(),Object(p.createElement)("div",{className:"woocommerce-search-list__search"},Object(p.createElement)(b.TextControl,{label:c.search,type:"search",value:r,onChange:function(e){return o({search:e})}})),this.renderListSection())}}]),t}(p.Component);nr.propTypes={className:v.a.string,isHierarchical:v.a.bool,isLoading:v.a.bool,isSingle:v.a.bool,list:v.a.arrayOf(v.a.shape({id:v.a.number,name:v.a.string})),messages:v.a.shape({clear:v.a.string,list:v.a.string,noItems:v.a.string,noResults:v.a.string,search:v.a.string,selected:v.a.func,updated:v.a.string}),onChange:v.a.func.isRequired,onSearch:v.a.func,renderItem:v.a.func,selected:v.a.array.isRequired,search:v.a.string,setState:v.a.func,debouncedSpeak:v.a.func,instanceId:v.a.number};var or=Object(te.compose)([Object(te.withState)({search:""}),b.withSpokenMessages,te.withInstanceId])(nr),cr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.children,a=e.menu,r=e.title,n=k()("woocommerce-section-header",this.props.className);return Object(p.createElement)("div",{className:n},Object(p.createElement)(Y,{className:"woocommerce-section-header__title woocommerce-section-header__header-item"},r),Object(p.createElement)("hr",{role:"presentation"}),t&&Object(p.createElement)("div",{className:"woocommerce-section-header__actions woocommerce-section-header__header-item"},t),a&&Object(p.createElement)("div",{className:"woocommerce-section-header__menu woocommerce-section-header__header-item"},a))}}]),t}(p.Component);cr.propTypes={className:v.a.string,menu:z(V),title:v.a.oneOfType([v.a.string,v.a.node]).isRequired};var ir=function(e){var t=e.isPrimary,a=e.mainIcon,r=e.mainLabel,n=e.onClick,o=e.menuLabel,c=e.controls,i=e.className;if(!c||!c.length)return null;var s=a&&b.IconButton||b.Button,l=k()("woocommerce-split-button",i,{"is-primary":t,"has-label":r});return Object(p.createElement)("div",{className:l},Object(p.createElement)(s,{icon:a,className:"woocommerce-split-button__main-action",onClick:n},r),Object(p.createElement)(b.Dropdown,{className:"woocommerce-split-button__menu",position:"bottom left",contentClassName:"woocommerce-split-button__menu-popover",expandOnMobile:!0,headerTitle:o,renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(p.createElement)(b.IconButton,{icon:t?"arrow-up":"arrow-down",className:k()("woocommerce-split-button__menu-toggle",{"is-active":t}),onClick:a,"aria-haspopup":"true","aria-expanded":t,label:o,tooltip:o})},renderContent:function(e){var t=e.onClose;return Object(p.createElement)(b.NavigableMenu,{className:"woocommerce-split-button__menu-wrapper",role:"menu","aria-label":o},c.map(function(e,a){var r=e.icon&&b.IconButton||b.Button;return Object(p.createElement)(r,{key:a,onClick:function(a){a.stopPropagation(),t(),e.onClick&&e.onClick()},className:"woocommerce-split-button__menu-item",icon:e.icon||"",role:"menuitem"},e.label)}))}}))};ir.propTypes={isPrimary:v.a.bool,mainIcon:v.a.node,mainLabel:v.a.string,onClick:v.a.func,menuLabel:v.a.string,controls:v.a.arrayOf(v.a.shape({icon:v.a.oneOfType([v.a.string,v.a.element]),label:v.a.string.isRequired,onClick:v.a.func})).isRequired,className:v.a.string},ir.defaultProps={isPrimary:!1,onClick:h.noop};var sr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props.className,t=k()("woocommerce-spinner",e);return Object(p.createElement)("svg",{className:t,viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)("circle",{className:"woocommerce-spinner__circle",fill:"none",strokeWidth:"5",strokeLinecap:"round",cx:"50",cy:"50",r:"30"}))}}]),t}(p.Component);sr.propTypes={className:v.a.string};var lr=sr,ur=function(){return Object(p.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(p.createElement)("mask",{id:"mask0","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"2",y:"3",width:"14",height:"12"},Object(p.createElement)("path",{d:"M6.59631 11.9062L3.46881 8.77875L2.40381 9.83625L6.59631 14.0287L15.5963 5.02875L14.5388 3.97125L6.59631 11.9062Z",fill:"white"})),Object(p.createElement)("g",{mask:"url(#mask0)"},Object(p.createElement)("rect",{width:"18",height:"18",fill:"white"})))},mr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.props,t=e.className,a=e.currentStep,r=e.steps,n=e.direction,o=e.isPending,c=r.findIndex(function(e){return a===e.key}),i=k()("woocommerce-stepper",t,{"is-vertical":"vertical"===n});return Object(p.createElement)("div",{className:i},r.map(function(e,t){var r=e.key,n=e.label,i=e.isComplete,s=k()("woocommerce-stepper__step",{"is-active":r===a,"is-complete":void 0!==i?i:c>t}),l=a===r&&o?Object(p.createElement)(lr,null):Object(p.createElement)("div",{className:"woocommerce-stepper__step-icon"},Object(p.createElement)("span",{className:"woocommerce-stepper__step-number"},t+1),Object(p.createElement)(ur,null));return Object(p.createElement)(p.Fragment,{key:r},Object(p.createElement)("div",{className:s},l,Object(p.createElement)("span",{className:"woocommerce-stepper__step-label"},n)),Object(p.createElement)("div",{className:"woocommerce-stepper__step-divider"}))}))}}]),t}(p.Component);mr.propTypes={className:v.a.string,currentStep:v.a.string.isRequired,steps:v.a.arrayOf(v.a.shape({key:v.a.string.isRequired,label:v.a.string.isRequired,isComplete:v.a.bool})).isRequired,direction:v.a.oneOf(["horizontal","vertical"]),isPending:v.a.bool},mr.defaultProps={direction:"horizontal",isPending:!1};function dr(e){return e<10?"has-".concat(e,"-items"):"has-10-items"}var pr=function(e){var t=e.label,a=e.orientation,r=e.itemCount,n=e.items,o=Object(h.uniqueId)("woocommerce-summary-helptext-"),i=dr(r),s=k()("woocommerce-summary",Object(c.a)({},i,"horizontal"===a));return Object(p.createElement)(b.NavigableMenu,{"aria-label":t,"aria-describedby":o,orientation:a,stopNavigationEvents:!0},Object(p.createElement)("p",{id:o,className:"screen-reader-text"},Object(f.__)("List of data points available for filtering. Use arrow keys to cycle through the list. Click a data point for a detailed report.","woocommerce-admin")),Object(p.createElement)("ul",{className:s},n))};pr.propTypes={label:v.a.string,orientation:v.a.oneOf(["vertical","horizontal"]).isRequired,items:v.a.node.isRequired,itemCount:v.a.number.isRequired};var fr=pr,br=function(e){var t=e.children,a=e.isDropdownBreakpoint,r=e.label,n=t({}),o=p.Children.count(n)||1,c=a?"vertical":"horizontal",i=Object(p.createElement)(fr,{label:r,orientation:c,itemCount:o,items:n});if(!a||o<2)return i;var s=n.find(function(e){return!!e.props.selected});return s?Object(p.createElement)(b.Dropdown,{className:"woocommerce-summary",position:"bottom",headerTitle:r,renderToggle:function(e){var t=e.isOpen,a=e.onToggle;return Object(p.cloneElement)(s,{onToggle:a,isOpen:t})},renderContent:function(e){return Object(p.createElement)(fr,{label:r,orientation:c,itemCount:o,items:t(e)})}}):i};br.propTypes={children:v.a.func.isRequired,label:v.a.string},br.defaultProps={label:Object(f.__)("Performance Indicators","woocommerce-admin")};Object(jt.withViewportMatch)({isDropdownBreakpoint:"< large"})(br);var hr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e,t=this.props.isDropdownBreakpoint,a=t?1:this.props.numberOfItems,r=dr(a),n=k()("woocommerce-summary",(e={},Object(c.a)(e,r,!t),Object(c.a)(e,"is-placeholder",!0),e)),o=Object(h.range)(a).map(function(e){return Object(p.createElement)("li",{className:"woocommerce-summary__item-container is-placeholder",key:e},Object(p.createElement)("span",{className:"woocommerce-summary__item"},Object(p.createElement)("span",{className:"woocommerce-summary__item-label"}),Object(p.createElement)("span",{className:"woocommerce-summary__item-data"},Object(p.createElement)("span",{className:"woocommerce-summary__item-value"}),Object(p.createElement)("div",{className:"woocommerce-summary__item-delta"},Object(p.createElement)("span",{className:"woocommerce-summary__item-delta-value"}))),Object(p.createElement)("span",{className:"woocommerce-summary__item-prev-label"}),Object(p.createElement)("span",{className:"woocommerce-summary__item-prev-value"})))});return Object(p.createElement)("ul",{className:n,"aria-hidden":"true"},o)}}]),t}(p.Component);hr.propTypes={numberOfItems:v.a.number.isRequired},hr.defaultProps={numberOfRows:5};Object(jt.withViewportMatch)({isDropdownBreakpoint:"< large"})(hr);var gr=function(e){var t,a=e.delta,r=e.href,n=e.isOpen,o=e.label,c=e.onToggle,i=e.prevLabel,s=e.prevValue,l=e.reverseTrend,u=e.selected,m=e.value,d=e.onLinkClickCallback,g=k()("woocommerce-summary__item-container",{"is-dropdown-button":c,"is-dropdown-expanded":n}),v=k()("woocommerce-summary__item",{"is-selected":u,"is-good-trend":l?a<0:a>0,"is-bad-trend":l?a>0:a<0}),O=a>0?"arrow-up":"arrow-down",j=a>0?Object(f.sprintf)(Object(f.__)("Up %d%% from %s","woocommerce-admin"),a,i):Object(f.sprintf)(Object(f.__)("Down %d%% from %s","woocommerce-admin"),Math.abs(a),i);a||(O="arrow-right",j=Object(f.sprintf)(Object(f.__)("No change from %s","woocommerce-admin"),i));var w={className:v,"aria-current":u?"page":null};if(c||r){var _=!!c;t=_?b.Button:J,_?(w.onClick=c,w["aria-expanded"]=n):(w.href=r,w.role="menuitem",w.onClick=d)}else t="div";return Object(p.createElement)("li",{className:g},Object(p.createElement)(t,w,Object(p.createElement)("span",{className:"woocommerce-summary__item-label"},o),Object(p.createElement)("span",{className:"woocommerce-summary__item-data"},Object(p.createElement)("span",{className:"woocommerce-summary__item-value"},Object(h.isNil)(m)?Object(f.__)("N/A","woocommerce-admin"):m),Object(p.createElement)("div",{className:"woocommerce-summary__item-delta",role:"presentation","aria-label":j},Object(p.createElement)(y.a,{className:"woocommerce-summary__item-delta-icon",icon:O,size:18}),Object(p.createElement)("span",{className:"woocommerce-summary__item-delta-value"},Object(h.isNil)(a)?Object(f.__)("N/A","woocommerce-admin"):Object(f.sprintf)(Object(f.__)("%d%%","woocommerce-admin"),a)))),Object(p.createElement)("span",{className:"woocommerce-summary__item-prev-label"},i)," ",Object(p.createElement)("span",{className:"woocommerce-summary__item-prev-value"},Object(h.isNil)(s)?Object(f.__)("N/A","woocommerce-admin"):s),c?Object(p.createElement)(y.a,{className:"woocommerce-summary__toggle",icon:"chevron-down",size:24}):null))};gr.propTypes={delta:v.a.number,href:v.a.string,isOpen:v.a.bool,label:v.a.string.isRequired,onToggle:v.a.func,prevLabel:v.a.string,prevValue:v.a.oneOfType([v.a.number,v.a.string]),reverseTrend:v.a.bool,selected:v.a.bool,value:v.a.oneOfType([v.a.number,v.a.string]),onLinkClickCallback:v.a.func},gr.defaultProps={href:"",isOpen:!1,prevLabel:Object(f.__)("Previous Period:","woocommerce-admin"),reverseTrend:!1,selected:!1,onLinkClickCallback:h.noop};var vr=function(e){function t(e){var a;return Object(i.a)(this,t),(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).state={tabIndex:null,isScrollable:!1},a.container=Object(p.createRef)(),a.sortBy=a.sortBy.bind(Object(m.a)(a)),a.updateTableShadow=a.updateTableShadow.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=this.container.current,t=e.scrollWidth>e.clientWidth;this.setState({tabIndex:t?"0":null}),this.updateTableShadow(),window.addEventListener("resize",this.updateTableShadow)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.updateTableShadow)}},{key:"sortBy",value:function(e){var t=this,a=this.props,r=a.headers,n=a.query;return function(){var a=n.orderby||Object(h.get)(Object(h.find)(r,{defaultSort:!0}),"key",!1),o=n.order||Object(h.get)(Object(h.find)(r,{key:a}),"defaultOrder","desc"),c="desc";e===a&&(c="desc"===o?"asc":"desc"),t.props.onSort(e,c)}}},{key:"updateTableShadow",value:function(){var e=this.container.current,t=e.scrollWidth-e.scrollLeft<=e.offsetWidth;this.setState({isScrollable:!t})}},{key:"render",value:function(){var e=this,t=this.props,a=t.ariaHidden,r=t.caption,n=t.classNames,o=t.headers,c=t.instanceId,i=t.query,s=t.rowHeader,l=t.rows,u=this.state,m=u.isScrollable,d=u.tabIndex,g=k()("woocommerce-table__table",n,{"is-scrollable":m}),v=i.orderby||Object(h.get)(Object(h.find)(o,{defaultSort:!0}),"key",!1),O=i.order||Object(h.get)(Object(h.find)(o,{key:v}),"defaultOrder","desc");return Object(p.createElement)("div",{className:g,ref:this.container,tabIndex:d,"aria-hidden":a,"aria-labelledby":"caption-".concat(c),role:"group",onScroll:this.updateTableShadow},Object(p.createElement)("table",null,Object(p.createElement)("caption",{id:"caption-".concat(c),className:"woocommerce-table__caption screen-reader-text"},r,"0"===d&&Object(p.createElement)("small",null,Object(f.__)("(scroll to see more)","woocommerce-admin"))),Object(p.createElement)("tbody",null,Object(p.createElement)("tr",null,o.map(function(t,a){var r=t.cellClassName,n=t.isLeftAligned,o=t.isSortable,i=t.isNumeric,s=t.key,l=t.label,u=t.screenReaderLabel,m="header-".concat(c,"-").concat(a),d={className:k()("woocommerce-table__header",r,{"is-left-aligned":n,"is-sortable":o,"is-sorted":v===s,"is-numeric":i})};o&&(d["aria-sort"]="none",v===s&&(d["aria-sort"]="asc"===O?"ascending":"descending"));var h=v===s&&"asc"!==O?Object(f.sprintf)(Object(f.__)("Sort by %s in ascending order","woocommerce-admin"),u):Object(f.sprintf)(Object(f.__)("Sort by %s in descending order","woocommerce-admin"),u),g=Object(p.createElement)(p.Fragment,null,Object(p.createElement)("span",{"aria-hidden":Boolean(u)},l),u&&Object(p.createElement)("span",{className:"screen-reader-text"},u));return Object(p.createElement)("th",Object($.a)({role:"columnheader",scope:"col",key:a},d),o?Object(p.createElement)(p.Fragment,null,Object(p.createElement)(b.IconButton,{icon:v===s&&"asc"===O?Object(p.createElement)(y.a,{size:18,icon:"chevron-up"}):Object(p.createElement)(y.a,{size:18,icon:"chevron-down"}),"aria-describedby":m,onClick:e.sortBy(s),isDefault:!0},g),Object(p.createElement)("span",{className:"screen-reader-text",id:m},h)):g)})),l.map(function(e,t){return Object(p.createElement)("tr",{key:t},e.map(function(e,t){var a=o[t],r=a.cellClassName,n=a.isLeftAligned,c=a.isNumeric,i=s===t,l=i?"th":"td",u=k()("woocommerce-table__item",r,{"is-left-aligned":n,"is-numeric":c,"is-sorted":v===o[t].key});return Object(p.createElement)(l,{scope:i?"row":null,key:t,className:u},function(e){return e.display||null}(e))}))}))))}}]),t}(p.Component);vr.propTypes={ariaHidden:v.a.bool,caption:v.a.string.isRequired,className:v.a.string,headers:v.a.arrayOf(v.a.shape({defaultSort:v.a.bool,defaultOrder:v.a.string,isLeftAligned:v.a.bool,isNumeric:v.a.bool,isSortable:v.a.bool,key:v.a.string,label:v.a.node,required:v.a.bool,screenReaderLabel:v.a.string})),onSort:v.a.func,query:v.a.object,rows:v.a.arrayOf(v.a.arrayOf(v.a.shape({display:v.a.node,value:v.a.oneOfType([v.a.string,v.a.number,v.a.bool])}))).isRequired,rowHeader:v.a.oneOfType([v.a.number,v.a.bool])},vr.defaultProps={ariaHidden:!1,headers:[],onSort:h.noop,query:{},rowHeader:0};var Or=Object(te.withInstanceId)(vr),yr=a(282);function jr(e){return Array.isArray(e)?e.map(function(e){return e.label}).join(","):[]}function wr(e){return Array.isArray(e)?e.map(function(e){return e.map(function(e){return void 0!==e.value&&null!==e.value?e.value.toString().replace(/,/g,""):""}).join(",")}).join("\n"):[]}var _r=function(){return Object(p.createElement)("svg",{role:"img","aria-hidden":"true",focusable:"false",version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 24 24"},Object(p.createElement)("path",{d:"M18,9c-0.009,0-0.017,0.002-0.025,0.003C17.72,5.646,14.922,3,11.5,3C7.91,3,5,5.91,5,9.5c0,0.524,0.069,1.031,0.186,1.519 C5.123,11.016,5.064,11,5,11c-2.209,0-4,1.791-4,4c0,1.202,0.541,2.267,1.38,3h18.593C22.196,17.089,23,15.643,23,14 C23,11.239,20.761,9,18,9z M12,16l-4-5h3V8h2v3h3L12,16z"}))},kr=function(e){function t(){return Object(i.a)(this,t),Object(l.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this,t=this.props,a=t.numberOfRows,r=Object(K.a)(t,["numberOfRows"]),n=Object(h.range)(a).map(function(){return e.props.headers.map(function(){return{display:Object(p.createElement)("span",{className:"is-placeholder"})}})});return Object(p.createElement)(Or,Object($.a)({ariaHidden:!0,classNames:"is-loading",rows:n},r))}}]),t}(p.Component);kr.propTypes={query:v.a.object,caption:v.a.string.isRequired,headers:v.a.arrayOf(v.a.shape({hiddenByDefault:v.a.bool,defaultSort:v.a.bool,isSortable:v.a.bool,key:v.a.string,label:v.a.node,required:v.a.bool})),numberOfRows:v.a.number},kr.defaultProps={numberOfRows:5};var Er=kr,Cr=function(e){var t=e.data;return Object(p.createElement)("ul",{className:"woocommerce-table__summary"},t.map(function(e,t){var a=e.label,r=e.value;return Object(p.createElement)("li",{className:"woocommerce-table__summary-item",key:t},Object(p.createElement)("span",{className:"woocommerce-table__summary-value"},r),Object(p.createElement)("span",{className:"woocommerce-table__summary-label"},a))}))};Cr.propTypes={data:v.a.array};var Nr=Cr,Sr=function(e){function t(e){var a;Object(i.a)(this,t);var r=(a=Object(l.a)(this,Object(u.a)(t).call(this,e))).props,n=r.query,o=r.compareBy,c=a.getShowCols(e.headers),s=n.filter?I(n[o]):[];return a.state={showCols:c,selectedRows:s},a.onColumnToggle=a.onColumnToggle.bind(Object(m.a)(a)),a.onClickDownload=a.onClickDownload.bind(Object(m.a)(a)),a.onCompare=a.onCompare.bind(Object(m.a)(a)),a.onPageChange=a.onPageChange.bind(Object(m.a)(a)),a.onSearch=a.onSearch.bind(Object(m.a)(a)),a.selectRow=a.selectRow.bind(Object(m.a)(a)),a.selectAllRows=a.selectAllRows.bind(Object(m.a)(a)),a}return Object(d.a)(t,e),Object(s.a)(t,[{key:"componentDidUpdate",value:function(e){var t=e.headers,a=e.query,r=this.props,n=r.compareBy,o=r.headers,c=r.onColumnsChange,i=r.query,s=this.state.showCols;if(i.filter||a.filter){var l=a.filter?I(a[n]):[],u=i.filter?I(i[n]):[];Object(h.isEqual)(l.sort(),u.sort())||this.setState({selectedRows:u})}if(Object(h.isEqual)(o,t)||this.setState({showCols:this.getShowCols(o)}),i.orderby!==a.orderby&&!s.includes(i.orderby)){var m=s.concat(i.orderby);this.setState({showCols:m}),c(m)}}},{key:"getShowCols",value:function(e){return e.map(function(e){var t=e.key;return!e.hiddenByDefault&&t}).filter(Boolean)}},{key:"getVisibleHeaders",value:function(){var e=this.props.headers,t=this.state.showCols;return e.filter(function(e){var a=e.key;return t.includes(a)})}},{key:"getVisibleRows",value:function(){var e=this.props,t=e.headers,a=e.rows,r=this.state.showCols;return a.map(function(e){return t.map(function(t,a){var n=t.key;return r.includes(n)&&e[a]}).filter(Boolean)})}},{key:"onColumnToggle",value:function(e){var t=this,a=this.props,r=a.headers,n=a.query,c=a.onQueryChange,i=a.onColumnsChange;return function(){t.setState(function(t){if(t.showCols.includes(e)){if(n.orderby===e){var a=Object(h.find)(r,{defaultSort:!0})||Object(h.first)(r)||{};c("sort")(a.key,"desc")}var s=Object(h.without)(t.showCols,e);return i(s),{showCols:s}}var l=[].concat(Object(o.a)(t.showCols),[e]);return i(l),{showCols:l}})}}},{key:"onClickDownload",value:function(){var e,t,a,r,n,o=this.props,c=o.query,i=o.onClickDownload,s=o.searchBy,l=o.title,u=Object.assign({},c);delete u.extended_info,u.search&&delete u[s],e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return[e.toLowerCase().replace(/[^a-z0-9]/g,"-"),He()().format("YYYY-MM-DD"),Object.keys(t).map(function(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"-")+"-"+decodeURIComponent(t[e]).toLowerCase().replace(/[^a-z0-9]/g,"-")}).join("_")].filter(function(e){return e.length}).join("_")+".csv"}(l,u),r=this.getVisibleHeaders(),n=this.getVisibleRows(),t=[jr(r),wr(n)].filter(function(e){return e.length}).join("\n"),a=new Blob([t],{type:"text/csv;charset=utf-8"}),Object(yr.saveAs)(a,e),i&&i()}},{key:"onCompare",value:function(){var e=this.props,t=e.compareBy,a=e.compareParam,r=e.onQueryChange,n=this.state.selectedRows;t&&r("compare")(t,a,n.join(","))}},{key:"onPageChange",value:function(){var e=this.props,t=e.onPageChange,a=e.onQueryChange;t&&t.apply(void 0,arguments),a&&a("page").apply(void 0,arguments)}},{key:"onSearch",value:function(e){var t,a=this.props,r=a.compareParam,o=a.searchBy,i=a.baseSearchQuery,s=e.map(function(e){return e.label.replace(",","%2C")});s.length?B(Object(n.a)((t={filter:void 0},Object(c.a)(t,r,void 0),Object(c.a)(t,o,void 0),t),i,{search:Object(h.uniq)(s).join(",")})):B({search:void 0})}},{key:"selectAllRows",value:function(e){var t=this.props.ids;e.target.checked?this.setState({selectedRows:t}):this.setState({selectedRows:[]})}},{key:"selectRow",value:function(e,t){var a=this.props.ids;t.target.checked?this.setState(function(t){var r=t.selectedRows;return{selectedRows:Object(h.uniq)([a[e]].concat(Object(o.a)(r)))}}):this.setState(function(t){var r=t.selectedRows,n=r.indexOf(a[e]);return{selectedRows:[].concat(Object(o.a)(r.slice(0,n)),Object(o.a)(r.slice(n+1)))}})}},{key:"getCheckbox",value:function(e){var t=this.props.ids,a=void 0===t?[]:t,r=-1!==this.state.selectedRows.indexOf(a[e]);return{display:Object(p.createElement)("input",{type:"checkbox",onChange:Object(h.partial)(this.selectRow,e),checked:r}),value:!1}}},{key:"getAllCheckbox",value:function(){var e=this.props.ids,t=void 0===e?[]:e,a=this.state.selectedRows,r=t.length>0&&t.length===a.length;return{cellClassName:"is-checkbox-column",label:Object(p.createElement)("input",{type:"checkbox",onChange:this.selectAllRows,"aria-label":Object(f.__)("Select All"),checked:r}),required:!0}}},{key:"render",value:function(){var e=this,t=this.props,a=t.compareBy,r=t.downloadable,n=t.labels,c=void 0===n?{}:n,i=t.isLoading,s=t.onClickDownload,l=t.onQueryChange,u=t.query,m=t.rowHeader,d=t.rowsPerPage,h=t.searchBy,g=t.showMenu,v=t.summary,O=t.title,y=t.totalRows,j=this.state,w=j.selectedRows,_=j.showCols,C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:M();if("object"!==Object(E.a)(e))throw new Error("Invalid parameter passed to getSearchWords, it expects an object or no parameters.");var t=e.search;if(!t)return[];if("string"!=typeof t)throw new Error("Invalid 'search' type. getSearchWords expects query's 'search' property to be a string.");return t.split(",").map(function(e){return e.replace("%2C",",")})}(u).map(function(e){return{id:e,label:e}}),N=this.props.headers,S=this.getVisibleHeaders(),x=this.getVisibleRows();a&&(x=x.map(function(t,a){return[e.getCheckbox(a)].concat(Object(o.a)(t))}),S=[this.getAllCheckbox()].concat(Object(o.a)(S)));var F=k()("woocommerce-analytics__card",{"woocommerce-table":!0,"has-compare":!!a,"has-search":!!h});return Object(p.createElement)(W,{className:F,title:O,action:[a&&Object(p.createElement)(aa,{key:"compare",className:"woocommerce-table__compare",count:w.length,helpText:c.helpText||Object(f.__)("Check at least two items below to compare","woocommerce-admin"),onClick:this.onCompare},c.compareButton||Object(f.__)("Compare","woocommerce-admin")),h&&Object(p.createElement)(Re,{allowFreeTextSearch:!0,inlineTags:!0,key:"search",onChange:this.onSearch,placeholder:c.placeholder||Object(f.__)("Search by item name","woocommerce-admin"),selected:C,showClearButton:!0,type:h}),(r||s)&&Object(p.createElement)(b.IconButton,{key:"download",className:"woocommerce-table__download-button",disabled:i,onClick:this.onClickDownload,isLink:!0},Object(p.createElement)(_r,null),Object(p.createElement)("span",{className:"woocommerce-table__download-button__label"},c.downloadButton||Object(f.__)("Download","woocommerce-admin")))],menu:g&&Object(p.createElement)(V,{label:Object(f.__)("Choose which values to display","woocommerce-admin"),renderContent:function(){return Object(p.createElement)(p.Fragment,null,Object(p.createElement)(Ba,null,Object(f.__)("Columns:","woocommerce-admin")),N.map(function(t){var a=t.key,r=t.label;return t.required?null:Object(p.createElement)(La,{checked:_.includes(a),isCheckbox:!0,isClickable:!0,key:a,onInvoke:e.onColumnToggle(a)},r)}))}})},i?Object(p.createElement)(p.Fragment,null,Object(p.createElement)("span",{className:"screen-reader-text"},Object(f.__)("Your requested data is loading","woocommerce-admin")),Object(p.createElement)(Er,{numberOfRows:d,headers:S,rowHeader:m,caption:O,query:u,onSort:l("sort")})):Object(p.createElement)(Or,{rows:x,headers:S,rowHeader:m,caption:O,query:u,onSort:l("sort")}),Object(p.createElement)(Ha,{key:parseInt(u.page)||1,page:parseInt(u.page)||1,perPage:d,total:y,onPageChange:this.onPageChange,onPerPageChange:l("per_page")}),v&&Object(p.createElement)(Nr,{data:v}))}}]),t}(p.Component);Sr.propTypes={compareBy:v.a.string,compareParam:v.a.string,headers:v.a.arrayOf(v.a.shape({hiddenByDefault:v.a.bool,defaultSort:v.a.bool,isSortable:v.a.bool,key:v.a.string,label:v.a.string,required:v.a.bool})),labels:v.a.shape({compareButton:v.a.string,downloadButton:v.a.string,helpText:v.a.string,placeholder:v.a.string}),ids:v.a.arrayOf(v.a.number),isLoading:v.a.bool,onQueryChange:v.a.func,onColumnsChange:v.a.func,downloadable:v.a.bool,onClickDownload:v.a.func,query:v.a.object,rowHeader:v.a.oneOfType([v.a.number,v.a.bool]),rows:v.a.arrayOf(v.a.arrayOf(v.a.shape({display:v.a.node,value:v.a.oneOfType([v.a.string,v.a.number,v.a.bool])}))).isRequired,rowsPerPage:v.a.number.isRequired,searchBy:v.a.string,showMenu:v.a.bool,summary:v.a.arrayOf(v.a.shape({label:v.a.node,value:v.a.oneOfType([v.a.string,v.a.number])})),title:v.a.string.isRequired,totalRows:v.a.number.isRequired,baseSearchQuery:v.a.object},Sr.defaultProps={compareParam:"filter",downloadable:!1,isLoading:!1,onQueryChange:h.noop,onColumnsChange:h.noop,query:{},rowHeader:0,rows:[],showMenu:!0,baseSearchQuery:{}};var xr=function(e){var t=e.children,a=e.numberOfRows;return Object(p.createElement)("div",{className:"woocommerce-table is-empty",style:{"--number-of-rows":a}},t)};xr.propTypes={numberOfRows:v.a.number},xr.defaultProps={numberOfRows:5};a(61);var Fr=function(e){var t=e.items;return Object(p.createElement)(Fe,{className:"woocommerce-view-more-list",label:Object(f.sprintf)(Object(f.__)("+%d more","woocommerce-admin"),t.length-1),popoverContents:Object(p.createElement)("ul",{className:"woocommerce-view-more-list__popover"},t.map(function(e,t){return Object(p.createElement)("li",{key:t,className:"woocommerce-view-more-list__popover__item"},e)}))})};Fr.propTypes={items:v.a.arrayOf(v.a.node)},Fr.defaultProps={items:[]};a.d(t,"a",function(){return or}),a.d(t,"b",function(){return ar})},347:function(e,t,a){var r=a(135);r(r.S+r.F,"Object",{assign:a(352)})},348:function(e,t,a){e.exports=!a(99)&&!a(137)(function(){return 7!=Object.defineProperty(a(191)("div"),"a",{get:function(){return 7}}).a})},349:function(e,t,a){var r=a(136);e.exports=function(e,t){if(!r(e))return e;var a,n;if(t&&"function"==typeof(a=e.toString)&&!r(n=a.call(e)))return n;if("function"==typeof(a=e.valueOf)&&!r(n=a.call(e)))return n;if(!t&&"function"==typeof(a=e.toString)&&!r(n=a.call(e)))return n;throw TypeError("Can't convert object to primitive value")}},350:function(e,t,a){e.exports=a(140)("native-function-to-string",Function.toString)},351:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},352:function(e,t,a){"use strict";var r=a(99),n=a(195),o=a(356),c=a(357),i=a(144),s=a(197),l=Object.assign;e.exports=!l||a(137)(function(){var e={},t={},a=Symbol(),r="abcdefghijklmnopqrst";return e[a]=7,r.split("").forEach(function(e){t[e]=e}),7!=l({},e)[a]||Object.keys(l({},t)).join("")!=r})?function(e,t){for(var a=i(e),l=arguments.length,u=1,m=o.f,d=c.f;l>u;)for(var p,f=s(arguments[u++]),b=m?n(f).concat(m(f)):n(f),h=b.length,g=0;h>g;)p=b[g++],r&&!d.call(f,p)||(a[p]=f[p]);return a}:l},353:function(e,t,a){var r=a(119),n=a(196),o=a(354)(!1),c=a(143)("IE_PROTO");e.exports=function(e,t){var a,i=n(e),s=0,l=[];for(a in i)a!=c&&r(i,a)&&l.push(a);for(;t.length>s;)r(i,a=t[s++])&&(~o(l,a)||l.push(a));return l}},354:function(e,t,a){var r=a(196),n=a(199),o=a(355);e.exports=function(e){return function(t,a,c){var i,s=r(t),l=n(s.length),u=o(c,l);if(e&&a!=a){for(;l>u;)if((i=s[u++])!=i)return!0}else for(;l>u;u++)if((e||u in s)&&s[u]===a)return e||u||0;return!e&&-1}}},355:function(e,t,a){var r=a(142),n=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?n(e+t,0):o(e,t)}},356:function(e,t){t.f=Object.getOwnPropertySymbols},357:function(e,t){t.f={}.propertyIsEnumerable},358:function(e,t,a){"use strict";var r=a(359)(!0);a(360)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,a=this._i;return a>=t.length?{value:void 0,done:!0}:(e=r(t,a),this._i+=e.length,{value:e,done:!1})})},359:function(e,t,a){var r=a(142),n=a(141);e.exports=function(e){return function(t,a){var o,c,i=String(n(t)),s=r(a),l=i.length;return s<0||s>=l?e?"":void 0:(o=i.charCodeAt(s))<55296||o>56319||s+1===l||(c=i.charCodeAt(s+1))<56320||c>57343?e?i.charAt(s):o:e?i.slice(s,s+2):c-56320+(o-55296<<10)+65536}}},360:function(e,t,a){"use strict";var r=a(193),n=a(135),o=a(192),c=a(116),i=a(145),s=a(361),l=a(202),u=a(365),m=a(83)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,a,f,b,h,g){s(a,t,f);var v,O,y,j=function(e){if(!d&&e in E)return E[e];switch(e){case"keys":case"values":return function(){return new a(this,e)}}return function(){return new a(this,e)}},w=t+" Iterator",_="values"==b,k=!1,E=e.prototype,C=E[m]||E["@@iterator"]||b&&E[b],N=C||j(b),S=b?_?j("entries"):N:void 0,x="Array"==t&&E.entries||C;if(x&&(y=u(x.call(new e)))!==Object.prototype&&y.next&&(l(y,w,!0),r||"function"==typeof y[m]||c(y,m,p)),_&&C&&"values"!==C.name&&(k=!0,N=function(){return C.call(this)}),r&&!g||!d&&!k&&E[m]||c(E,m,N),i[t]=N,i[w]=p,b)if(v={values:_?N:j("values"),keys:h?N:j("keys"),entries:S},g)for(O in v)O in E||o(E,O,v[O]);else n(n.P+n.F*(d||k),t,v);return v}},361:function(e,t,a){"use strict";var r=a(362),n=a(138),o=a(202),c={};a(116)(c,a(83)("iterator"),function(){return this}),e.exports=function(e,t,a){e.prototype=r(c,{next:n(1,a)}),o(e,t+" Iterator")}},362:function(e,t,a){var r=a(118),n=a(363),o=a(200),c=a(143)("IE_PROTO"),i=function(){},s=function(){var e,t=a(191)("iframe"),r=o.length;for(t.style.display="none",a(364).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("