woocommerce/packages/woocommerce-blocks/build/price-filter-frontend.js

1 line
47 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=288)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t,r){e.exports=r(79)()},100:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(5),o=r.n(n),a=r(0),i=function(){var e=Object(a.useState)(),t=o()(e,2)[1];return Object(a.useCallback)((function(e){t((function(){throw e}))}),[])}},107:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(14),o=r.n(n),a=r(4),i=r.n(a),c=r(0),u=r(44);function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p=[".wp-block-woocommerce-cart"],f=function(e){var t=e.Block,r=e.containers,n=e.getProps,a=void 0===n?function(){return{}}:n,i=e.getErrorBoundaryProps,s=void 0===i?function(){return{}}:i;0!==r.length&&Array.prototype.forEach.call(r,(function(e,r){var n=a(e,r),i=s(e,r),p=l(l({},e.dataset),n.attributes||{});e.classList.remove("is-loading"),Object(c.render)(React.createElement(u.a,i,React.createElement(c.Suspense,{fallback:React.createElement("div",{className:"wc-block-placeholder"})},React.createElement(t,o()({},n,{attributes:p})))),e)}))},d=function(e){var t,r,n,o,a,i,c,u=document.body.querySelectorAll(p.join(","));t=l(l({},e),{},{wrappers:u}),r=t.Block,n=t.getProps,o=t.getErrorBoundaryProps,a=t.selector,i=t.wrappers,c=document.body.querySelectorAll(a),i.length>0&&Array.prototype.filter.call(c,(function(e){return!function(e,t){return Array.prototype.some.call(t,(function(t){return t.contains(e)&&!t.isSameNode(e)}))}(e,i)})),f({Block:r,containers:c,getProps:n,getErrorBoundaryProps:o}),Array.prototype.forEach.call(u,(function(t){t.addEventListener("wc-blocks_render_blocks_frontend",(function(){var r,n,o,a,i,c;n=(r=l(l({},e),{},{wrapper:t})).Block,o=r.getProps,a=r.getErrorBoundaryProps,i=r.selector,c=r.wrapper.querySelectorAll(i),f({Block:n,containers:c,getProps:o,getErrorBoundaryProps:a})}))}))}},11:function(e,t){e.exports=window.wp.data},115:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),o=r(82);function a(e,t){return e===t}function i(e,t,r){var i=r&&r.equalityFn?r.equalityFn:a,c=Object(n.useState)(e),u=c[0],s=c[1],l=Object(o.a)(Object(n.useCallback)((function(e){return s(e)}),[]),t,r),p=l[0],f=l[1],d=l[2],m=Object(n.useRef)(e);return Object(n.useEffect)((function(){i(m.current,e)||(p(e),m.current=e)}),[e,p,i]),[u,f,d]}},120:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(8),o=r(11),a=r(0),i=r(53),c=r(100),u=function(e){var t=e.namespace,r=e.resourceName,u=e.resourceValues,s=void 0===u?[]:u,l=e.query,p=void 0===l?{}:l,f=e.shouldSelect,d=void 0===f||f;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");var m=Object(a.useRef)({results:[],isLoading:!0}),b=Object(i.a)(p),g=Object(i.a)(s),h=Object(c.a)(),v=Object(o.useSelect)((function(e){if(!d)return null;var o=e(n.COLLECTIONS_STORE_KEY),a=[t,r,b,g],i=o.getCollectionError.apply(o,a);return i&&h(i),{results:o.getCollection.apply(o,a),isLoading:!o.hasFinishedResolution("getCollection",a)}}),[t,r,g,b,d]);return null!==v&&(m.current=v),m.current}},126:function(e,t,r){"use strict";var n=r(3),o=r.n(n);function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(){}function p(){}p.resetWarningCache=l;var f=function(e,t){return function(e){e.exports=function(){function e(e,t,r,n,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){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 r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:p,resetWarningCache:l};return r.PropTypes=r,r}()}(t={exports:{}}),t.exports}();function d(){}function m(e){return!!(e||"").match(/\d/)}function b(e){return null==e}function g(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function h(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split("."),a=o[0],i=o[1]||"";return{beforeDecimal:a,afterDecimal:i,hasNagation:r,addNegation:n}}function v(e,t,r){for(var n="",o=r?"0":"",a=0;a<=t-1;a++)n+=e[a]||o;return n}function y(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function O(e,t,r){return Math.min(Math.max(e,t),r)}function x(e){return Math.max(e.selectionStart,e.selectionEnd)}var _={thousandSeparator:f.oneOfType([f.string,f.oneOf([!0])]),decimalSeparator:f.string,allowedDecimalSeparators:f.arrayOf(f.string),thousandsGroupStyle:f.oneOf(["thousand","lakh","wan"]),decimalScale:f.number,fixedDecimalScale:f.bool,displayType:f.oneOf(["input","text"]),prefix:f.string,suffix:f.string,format:f.oneOfType([f.string,f.func]),removeFormatting:f.func,mask:f.oneOfType([f.string,f.arrayOf(f.string)]),value:f.oneOfType([f.number,f.string]),defaultValue:f.oneOfType([f.number,f.string]),isNumericString:f.bool,customInput:f.elementType,allowNegative:f.bool,allowEmptyFormatting:f.bool,allowLeadingZeros:f.bool,onValueChange:f.func,onKeyDown:f.func,onMouseUp:f.func,onChange:f.func,onFocus:f.func,onBlur:f.func,type:f.oneOf(["text","tel","password"]),isAllowed:f.func,renderText:f.func,getInputRef:f.oneOfType([f.func,f.shape({current:f.any})])},w={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:d,onChange:d,onKeyDown:d,onMouseUp:d,onFocus:d,onBlur:d,isAllowed:function(){return!0}},j=function(e){function t(e){var r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=!(n=c(t).call(this,e))||"object"!=typeof n&&"function"!=typeof n?s(this):n;var o=e.defaultValue;r.validateProps();var a=r.formatValueProp(o);return r.state={value:a,numAsString:r.removeFormatting(a)},r.selectionBeforeInput={selectionStart:0,selectionEnd:0},r.onChange=r.onChange.bind(s(r)),r.onKeyDown=r.onKeyDown.bind(s(r)),r.onMouseUp=r.onMouseUp.bind(s(r)),r.onFocus=r.onFocus.bind(s(r)),r.onBlur=r.onBlur.bind(s(r)),r}var r,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),r=t,(n=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,r=this.state,n=this.focusedElm,o=r.value,a=r.numAsString,i=void 0===a?"":a;if(e!==t){this.validateProps();var c=this.formatNumString(i),u=b(t.value)?c:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),p=parseFloat(i);(isNaN(l)&&isNaN(p)||l===p)&&c===o&&(null!==n||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:n})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,r=this.getSeparators(),n=r.decimalSeparator,o=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var i=(e=(e.match(o)||[]).join("").replace(n,".")).indexOf(".");return-1!==i&&(e="".concat(e.substring(0,i),".").concat(e.substring(i+1,e.length).replace(new RegExp(g(n),"g"),""))),a&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var r=this.props,n=r.format,o=r.decimalScale,a=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!a||0===o||t||n?"":"|"+g(a)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,r=t.thousandSeparator,n=t.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:n}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,r=void 0===t?" ":t;return"string"==typeof r?r:r[e]||" "}},{key:"getValueObject",value:function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),r=t.decimalSeparator,n=t.thousandSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(n,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(r," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,r){y(e,t),setTimeout((function(){e.value===r&&y(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,r){var n=this.props,o=n.prefix,a=n.suffix,i=n.format;if(""===e)return 0;if(t=O(t,0,e.length),!i){var c="-"===e[0];return O(t,o.length+(c?1:0),e.length-a.length)}if("function"==typeof i)return t;if("#"===i[t]&&m(e[t]))return t;if("#"===i[t-1]&&m(e[t-1]))return t;var u=i.indexOf("#");t=O(t,u,i.lastIndexOf("#")+1);for(var s=i.substring(t,i.length).indexOf("#"),l=t,p=t+(-1===s?0:s);l>u&&("#"!==i[l]||!m(e[l]));)l-=1;return!m(e[p])||"left"===r&&t!==u||t-l<p-t?m(e[l])?l+1:l:p}},{key:"getCaretPosition",value:function(e,t,r){var n,o,a=this.props.format,i=this.state.value,c=this.getNumberRegex(!0),u=(e.match(c)||[]).join(""),s=(t.match(c)||[]).join("");for(n=0,o=0;o<r;o++){var l=e[o]||"",p=t[n]||"";if((l.match(c)||l===p)&&("0"!==l||!p.match(c)||"0"===p||u.length===s.length)){for(;l!==t[n]&&n<t.length;)n++;n++}}return"string"!=typeof a||i||(n=t.length),this.correctCaretPosition(t,n)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,r=t.format,n=t.prefix,o=t.suffix;if(!r&&e){var a="-"===e[0];a&&(e=e.substring(1,e.length));var i=(e=n&&0===e.indexOf(n)?e.substring(n.length,e.length):e).lastIndexOf(o);e=o&&-1!==i&&i===e.length-o.length?e.substring(0,i):e,a&&(e="-"+e)}return e}},{key:"removePatternFormatting",value:function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),r=0,n="",o=0,a=t.length;o<=a;o++){var i=t[o]||"",c=o===a?e.length:e.indexOf(i,r);if(-1===c){n=e;break}n+=e.substring(r,c),r=c+i.length}return(n.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,r=t.format,n=t.removeFormatting;return e?(r?e="string"==typeof r?this.removePatternFormatting(e):"function"==typeof n?n(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,r=0,n=t.split(""),o=0,a=t.length;o<a;o++)"#"===t[o]&&(n[o]=e[r]||this.getMaskAtIndex(r),r+=1);return n.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,r=t.decimalScale,n=t.fixedDecimalScale,o=t.prefix,a=t.suffix,i=t.allowNegative,c=t.thousandsGroupStyle,u=this.getSeparators(),s=u.thousandSeparator,l=u.decimalSeparator,p=-1!==e.indexOf(".")||r&&n,f=h(e,i),d=f.beforeDecimal,m=f.afterDecimal,b=f.addNegation;return void 0!==r&&(m=v(m,r,n)),s&&(d=function(e,t,r){var n=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(r),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(n,"$1"+t)}(d,s,c)),o&&(d=o+d),a&&(m+=a),b&&(d="-"+d),d+(p&&l||"")+m}},{key:"formatNumString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,r=t.format,n=t.allowEmptyFormatting,o=e;return""!==e||n?"-"!==e||r?"string"==typeof r?this.formatWithPattern(o):"function"==typeof r?r(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,r=t.format,n=t.decimalScale,o=t.fixedDecimalScale,a=t.allowEmptyFormatting,i=this.props,c=i.value,u=i.isNumericString,s=!(c=b(c)?e:c)&&0!==c;return s&&a&&(c=""),s&&!a?"":("number"==typeof c&&(c=c.toString(),u=!0),"Infinity"===c&&u&&(c=""),u&&!r&&"number"==typeof n&&(c=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,o=h(e),a=o.beforeDecimal,i=o.afterDecimal,c=o.hasNagation,u=parseFloat("0.".concat(i||"0")).toFixed(t).split("."),s=a.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=v(u[1]||"",Math.min(t,i.length),r),p=n?".":"";return"".concat(c?"-":"").concat(s).concat(p).concat(l)}(c,n,o)),u?this.formatNumString(c):this.formatInput(c))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),a=n.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var r=this.props,n=r.format,o=r.prefix,a=r.suffix,i=r.decimalScale,c=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e<o.length||e>=t.length-a.length||i&&c&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,r){for(var n=e;n<t;n++)if(this.isCharacterAFormat(n,r))return!0;return!1}},{key:"correctInputValue",value:function(e,t,r){var n=this.props,o=n.format,a=n.allowNegative,i=n.prefix,c=n.suffix,u=n.decimalScale,s=this.getSeparators(),l=s.allowedDecimalSeparators,p=s.decimalSeparator,f=this.state.numAsString||"",d=this.selectionBeforeInput,m=d.selectionStart,b=d.selectionEnd,g=function(e,t){for(var r=0,n=0,o=e.length,a=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[a-1-n]&&a-n>r&&o-n>r;)n++;return{start:r,end:o-n}}(t,r),v=g.start,y=g.end;if(!o&&v===y&&-1!==l.indexOf(r[m])){var O=0===u?"":p;return r.substr(0,m)+O+r.substr(m+1,r.length)}var x=o?0:i.length,_=t.length-(o?0:c.length);if(r.length>t.length||!r.length||v===y||0===m&&b===t.length||m===x&&b===_)return r;if(this.checkIfFormatGotDeleted(v,y,t)&&(r=t),!o){var w=this.removeFormatting(r),j=h(w,a),S=j.beforeDecimal,k=j.afterDecimal,E=j.addNegation,P=e<r.indexOf(p)+1;if(w.length<f.length&&P&&""===S&&!parseFloat(k))return E?"-":""}return r}},{key:"updateValue",value:function(e){var t=e.formattedValue,r=e.input,n=e.setCaretPosition,o=void 0===n||n,a=e.numAsString,i=e.caretPos,c=this.props.onValueChange,u=this.state.value;if(r)if(o){if(!i){var s=e.inputValue||r.value,l=x(r);r.value=t,i=this.getCaretPosition(s,t,l)}this.setPatchedCaretPosition(r,i,t)}else r.value=t;void 0===a&&(a=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:a}),c(this.getValueObject(t,a)))}},{key:"onChange",value:function(e){var t=e.target,r=t.value,n=this.state,o=this.props,a=o.isAllowed,i=n.value||"",c=x(t);r=this.correctInputValue(c,i,r);var u=this.formatInput(r)||"",s=this.removeFormatting(u);a(this.getValueObject(u,s))||(u=i),this.updateValue({formattedValue:u,numAsString:s,inputValue:r,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,r=this.state,n=t.format,o=t.onBlur,a=t.allowLeadingZeros,i=r.numAsString,c=r.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!n){isNaN(parseFloat(i))&&(i=""),a||(i=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var r=e.split("."),n=r[0].replace(/^0+/,"")||"0",o=r[1]||"";return"".concat(t?"-":"").concat(n).concat(o?".".concat(o):"")}(i));var u=this.formatNumString(i);if(u!==c)return this.updateValue({formattedValue:u,numAsString:i,input:e.target,setCaretPosition:!1}),void o(e)}o(e)}},{key:"onKeyDown",value:function(e){var t,r=e.target,n=e.key,o=r.selectionStart,a=r.selectionEnd,i=r.value,c=void 0===i?"":i,u=this.props,s=u.decimalScale,l=u.fixedDecimalScale,p=u.prefix,f=u.suffix,d=u.format,m=u.onKeyDown,b=void 0!==s&&l,g=this.getNumberRegex(!1,b),h=new RegExp("-"),v="string"==typeof d;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:a},"ArrowLeft"===n||"Backspace"===n?t=o-1:"ArrowRight"===n?t=o+1:"Delete"===n&&(t=o),void 0!==t&&o===a){var y=t,O=v?d.indexOf("#"):p.length,x=v?d.lastIndexOf("#")+1:c.length-f.length;if("ArrowLeft"===n||"ArrowRight"===n){var _="ArrowLeft"===n?"left":"right";y=this.correctCaretPosition(c,t,_)}else if("Delete"!==n||g.test(c[t])||h.test(c[t])){if("Backspace"===n&&!g.test(c[t]))if(o<=O+1&&"-"===c[0]&&void 0===d){var w=c.substring(1);this.updateValue({formattedValue:w,caretPos:y,input:r})}else if(!h.test(c[t])){for(;!g.test(c[y-1])&&y>O;)y--;y=this.correctCaretPosition(c,y,"left")}}else for(;!g.test(c[y])&&y<x;)y++;(y!==t||t<O||t>x)&&(e.preventDefault(),this.setPatchedCaretPosition(r,y,c)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,y,c),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,o=t.value,a=void 0===o?"":o;if(r===n){var i=this.correctCaretPosition(a,r);i!==r&&this.setPatchedCaretPosition(t,i,a)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,o=r.selectionEnd,a=r.value,i=void 0===a?"":a,c=t.correctCaretPosition(i,n);c===n||0===n&&o===i.length||t.setPatchedCaretPosition(r,c,i),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,r,n=this.props,a=n.type,c=n.displayType,u=n.customInput,s=n.renderText,l=n.getInputRef,p=n.format,f=this.state.value,d=(e=this.props,t=_,r={},Object.keys(e).forEach((function(n){t[n]||(r[n]=e[n])})),r),m=i({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(p)?"numeric":void 0},d,{type:a,value:f,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===c)return s?s(f)||null:o.a.createElement("span",i({},d,{ref:l}),f);if(u){var b=u;return o.a.createElement(b,i({},m,{ref:l}))}return o.a.createElement("input",i({},m,{ref:l}))}}])&&a(r.prototype,n),t}(o.a.Component);j.propTypes=_,j.defaultProps=w,t.a=j},128:function(e,t,r){"use strict";var n=r(0),o=r(8),a=r(11),i=r(83);t.a=function(e){return function(t){var r;return r=Object(n.useRef)(i.n.restApiRoutes||{}),Object(a.useSelect)((function(e,t){if(r.current){var n=e(o.SCHEMA_STORE_KEY),a=n.isResolving,i=n.hasFinishedResolution,c=t.dispatch(o.SCHEMA_STORE_KEY),u=c.receiveRoutes,s=c.startResolution,l=c.finishResolution;Object.keys(r.current).forEach((function(e){var t=r.current[e];a("getRoutes",[e])||i("getRoutes",[e])||(s("getRoutes",[e]),u(t,[e]),l("getRoutes",[e]))}))}}),[]),React.createElement(e,t)}}},133:function(e,t,r){"use strict";var n=r(1),o=(r(10),r(6)),a=r.n(o),i=r(51),c=(r(154),function(e){var t=e.className,r=e.disabled,o=e.label,c=void 0===o?Object(n.__)("Go",'woocommerce'):o,u=e.onClick,s=e.screenReaderLabel,l=void 0===s?Object(n.__)("Apply filter",'woocommerce'):s;return React.createElement("button",{type:"submit",className:a()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:r,onClick:u},React.createElement(i.a,{label:c,screenReaderLabel:l}))});c.defaultProps={disabled:!1},t.a=c},14:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,r.apply(this,arguments)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},147:function(e,t){},154:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},21:function(e,t){function r(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=r=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},223:function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r(4),o=r.n(n),a=r(46),i=r.n(a),c=r(21),u=r.n(c),s=r(5),l=r.n(s),p=r(0),f=r(115),d=r(7),m=r(53),b=r(90),g=r(120),h=r(64);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O=function(e){var t=e.queryAttribute,r=e.queryPrices,n=e.queryStock,o=e.queryState,a=Object(h.a)();a="".concat(a,"-collection-data");var c=Object(b.a)(a),s=l()(c,1)[0],v=Object(b.b)("calculate_attribute_counts",[],a),O=l()(v,2),x=O[0],_=O[1],w=Object(b.b)("calculate_price_range",null,a),j=l()(w,2),S=j[0],k=j[1],E=Object(b.b)("calculate_stock_status_counts",null,a),P=l()(E,2),R=P[0],N=P[1],T=Object(m.a)(t||{}),C=Object(m.a)(r),F=Object(m.a)(n);Object(p.useEffect)((function(){"object"===u()(T)&&Object.keys(T).length&&(x.find((function(e){return e.taxonomy===T.taxonomy}))||_([].concat(i()(x),[T])))}),[T,x,_]),Object(p.useEffect)((function(){S!==C&&void 0!==C&&k(C)}),[C,k,S]),Object(p.useEffect)((function(){R!==F&&void 0!==F&&N(F)}),[F,N,R]);var M=Object(p.useState)(!1),A=l()(M,2),D=A[0],I=A[1],U=Object(f.a)(D,200),V=l()(U,1)[0];D||I(!0);var B=Object(p.useMemo)((function(){return function(e){var t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(d.sortBy)(e.calculate_attribute_counts.map((function(e){return{taxonomy:e.taxonomy,query_type:e.queryType}})),["taxonomy","query_type"])),t}(s)}),[s]);return Object(g.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:y(y({},o),{},{page:void 0,per_page:void 0,orderby:void 0,order:void 0},B),shouldSelect:V})}},23:function(e,t,r){var n=r(77);e.exports=function(e,t){if(null==e)return{};var r,o,a=n(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a},e.exports.default=e.exports,e.exports.__esModule=!0},25:function(e,t){e.exports=window.wp.isShallowEqual},288:function(e,t,r){e.exports=r(317)},289:function(e,t){},29:function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},3:function(e,t){e.exports=window.React},30:function(e,t){function r(t){return e.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,r(t)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},317:function(e,t,r){"use strict";r.r(t);var n=r(128),o=r(107),a=r(5),i=r.n(a),c=r(99),u=r(90),s=r(223),l=r(0),p=r(1),f=(r(10),r(6)),d=r.n(f),m=r(69),b=r(49),g=(r(289),function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=parseInt(e[0],10),i=parseInt(e[1],10);return Number.isFinite(a)||(a=t||0),Number.isFinite(i)||(i=r||n),Number.isFinite(t)&&t>a&&(a=t),Number.isFinite(r)&&r<=a&&(a=r-n),Number.isFinite(t)&&t>=i&&(i=t+n),Number.isFinite(r)&&r<i&&(i=r),!o&&a>=i&&(a=i-n),o&&i<=a&&(i=a+n),[a,i]}),h=r(133),v=function(e){var t=e.minPrice,r=e.maxPrice,n=e.minConstraint,o=e.maxConstraint,a=e.onChange,c=void 0===a?function(){}:a,u=e.step,s=e.currency,f=e.showInputFields,v=void 0===f||f,y=e.showFilterButton,O=void 0!==y&&y,x=e.isLoading,_=void 0!==x&&x,w=e.onSubmit,j=void 0===w?function(){}:w,S=Object(l.useRef)(),k=Object(l.useRef)(),E=u||10*Math.pow(10,s.minorUnit),P=Object(l.useState)(t),R=i()(P,2),N=R[0],T=R[1],C=Object(l.useState)(r),F=i()(C,2),M=F[0],A=F[1];Object(l.useEffect)((function(){T(t)}),[t]),Object(l.useEffect)((function(){A(r)}),[r]);var D=Object(l.useMemo)((function(){return isFinite(n)&&isFinite(o)}),[n,o]),I=Object(l.useMemo)((function(){return isFinite(t)&&isFinite(r)&&D?{"--low":Math.round((t-n)/(o-n)*100)-.5+"%","--high":Math.round((r-n)/(o-n)*100)+.5+"%"}:{"--low":"0%","--high":"100%"}}),[t,r,n,o,D]),U=Object(l.useCallback)((function(e){if(!_&&D){var t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=S.current.offsetWidth,a=S.current.value,i=k.current.offsetWidth,c=k.current.value,u=n*(a/o),s=i*(c/o);Math.abs(r-u)>Math.abs(r-s)?(S.current.style.zIndex=20,k.current.style.zIndex=21):(S.current.style.zIndex=21,k.current.style.zIndex=20)}}),[_,o,D]),V=Object(l.useCallback)((function(e){var a=e.target.classList.contains("wc-block-price-filter__range-input--min"),i=e.target.value,u=a?[Math.round(i/E)*E,r]:[t,Math.round(i/E)*E],s=g(u,n,o,E,a);c([parseInt(s[0],10),parseInt(s[1],10)])}),[c,t,r,n,o,E]),B=Object(l.useCallback)((function(e){if(!(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))){var t=e.target.classList.contains("wc-block-price-filter__amount--min"),r=g([N,M],null,null,E,t);c([parseInt(r[0],10),parseInt(r[1],10)])}}),[c,E,N,M]),L=d()("wc-block-price-filter","wc-block-components-price-slider",v&&"wc-block-price-filter--has-input-fields",v&&"wc-block-components-price-slider--has-input-fields",O&&"wc-block-price-filter--has-filter-button",O&&"wc-block-components-price-slider--has-filter-button",_&&"is-loading",!D&&"is-disabled"),q=Object(b.b)(S.current)?S.current.ownerDocument.activeElement:void 0,G=q&&q===S.current?E:1,K=q&&q===k.current?E:1,W=N/Math.pow(10,s.minorUnit),Y=M/Math.pow(10,s.minorUnit);return React.createElement("div",{className:L},React.createElement("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:U,onFocus:U},D&&React.createElement("div",{"aria-hidden":v},React.createElement("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:I}),React.createElement("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":Object(p.__)("Filter products by minimum price",'woocommerce'),"aria-valuetext":W,value:Number.isFinite(t)?t:n,onChange:V,step:G,min:n,max:o,ref:S,disabled:_,tabIndex:v?"-1":"0"}),React.createElement("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":Object(p.__)("Filter products by maximum price",'woocommerce'),"aria-valuetext":Y,value:Number.isFinite(r)?r:o,onChange:V,step:K,min:n,max:o,ref:k,disabled:_,tabIndex:v?"-1":"0"}))),React.createElement("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},v&&React.createElement(React.Fragment,null,React.createElement(m.a,{currency:s,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--min wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--min","aria-label":Object(p.__)("Filter products by minimum price",'woocommerce'),onValueChange:function(e){e!==N&&T(e)},onBlur:B,disabled:_||!D,value:N}),React.createElement(m.a,{currency:s,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--max wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--max","aria-label":Object(p.__)("Filter products by maximum price",'woocommerce'),onValueChange:function(e){e!==M&&A(e)},onBlur:B,disabled:_||!D,value:M})),!v&&!_&&Number.isFinite(t)&&Number.isFinite(r)&&React.createElement("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(p.__)("Price",'woocommerce'),":  ",React.createElement(m.a,{currency:s,value:t}),"  ",React.createElement(m.a,{currency:s,value:r})),O&&React.createElement(h.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:_||!D,onClick:j,screenReaderLabel:Object(p.__)("Apply price filter",'woocommerce')})))},y=r(82),O=r(58),x=function(e,t,r){var n,o=10*Math.pow(10,t);"ROUND_UP"===r?n=isNaN(e)?null:Math.ceil(parseFloat(e,10)/o)*o:"ROUND_DOWN"===r&&(n=isNaN(e)?null:Math.floor(parseFloat(e,10)/o)*o);var a=Object(c.a)(n,Number.isFinite);return Number.isFinite(n)?n:a};Object(o.a)({selector:".wp-block-woocommerce-price-filter",Block:Object(n.a)((function(e){var t=e.attributes,r=e.isEditor,n=void 0!==r&&r,o=Object(u.b)("min_price",null),a=i()(o,2),p=a[0],f=a[1],d=Object(u.b)("max_price",null),m=i()(d,2),b=m[0],g=m[1],h=Object(u.a)(),_=i()(h,1)[0],w=Object(s.a)({queryPrices:!0,queryState:_}),j=w.results,S=w.isLoading,k=Object(l.useState)(),E=i()(k,2),P=E[0],R=E[1],N=Object(l.useState)(),T=i()(N,2),C=T[0],F=T[1],M=Object(O.getCurrencyFromPriceResponse)(j.price_range),A=function(e){var t=e.maxPrice,r=e.minorUnit;return{minConstraint:x(e.minPrice,r,"ROUND_DOWN"),maxConstraint:x(t,r,"ROUND_UP")}}({minPrice:j.price_range?j.price_range.min_price:void 0,maxPrice:j.price_range?j.price_range.max_price:void 0,minorUnit:M.minorUnit}),D=A.minConstraint,I=A.maxConstraint,U=Object(l.useCallback)((function(e,t){f(e===D?void 0:e),g(t===I?void 0:t)}),[D,I,f,g]),V=Object(y.a)(U,500),B=i()(V,1)[0],L=Object(l.useCallback)((function(e){e[0]!==P&&R(e[0]),e[1]!==C&&F(e[1])}),[P,C,R,F]);Object(l.useEffect)((function(){t.showFilterButton||B(P,C)}),[P,C,t.showFilterButton,B]);var q=Object(c.a)(p),G=Object(c.a)(b),K=Object(c.a)(D),W=Object(c.a)(I);if(Object(l.useEffect)((function(){(!Number.isFinite(P)||p!==q&&p!==P||D!==K&&D!==P)&&R(Number.isFinite(p)?p:D),(!Number.isFinite(C)||b!==G&&b!==C||I!==W&&I!==C)&&F(Number.isFinite(b)?b:I)}),[P,C,p,b,D,I,K,W,q,G]),!S&&(null===D||null===I||D===I))return null;var Y="h".concat(t.headingLevel);return React.createElement(React.Fragment,null,!n&&t.heading&&React.createElement(Y,{className:"wc-block-price-filter__title"},t.heading),React.createElement("div",{className:"wc-block-price-slider"},React.createElement(v,{minConstraint:D,maxConstraint:I,minPrice:P,maxPrice:C,currency:M,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:L,onSubmit:function(){return U(P,C)},isLoading:S})))})),getProps:function(e){return{attributes:{showInputFields:"true"===e.dataset.showinputfields,showFilterButton:"true"===e.dataset.showfilterbutton}}}})},4:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},40:function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},41:function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0},42:function(e,t,r){var n=r(71);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},43:function(e,t,r){var n=r(21).default,o=r(29);e.exports=function(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?o(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},44:function(e,t,r){"use strict";var n=r(40),o=r.n(n),a=r(41),i=r.n(a),c=r(29),u=r.n(c),s=r(42),l=r.n(s),p=r(43),f=r.n(p),d=r(30),m=r.n(d),b=r(4),g=r.n(b),h=(r(10),r(3)),v=r(1),y=r(83),O=function(e){var t=e.imageUrl,r=void 0===t?"".concat(y.l,"/block-error.svg"):t,n=e.header,o=void 0===n?Object(v.__)("Oops!",'woocommerce'):n,a=e.text,i=void 0===a?Object(v.__)("There was an error loading the content.",'woocommerce'):a,c=e.errorMessage,u=e.errorMessagePrefix,s=void 0===u?Object(v.__)("Error:",'woocommerce'):u,l=e.button;return React.createElement("div",{className:"wc-block-error wc-block-components-error"},r&&React.createElement("img",{className:"wc-block-error__image wc-block-components-error__image",src:r,alt:""}),React.createElement("div",{className:"wc-block-error__content wc-block-components-error__content"},o&&React.createElement("p",{className:"wc-block-error__header wc-block-components-error__header"},o),i&&React.createElement("p",{className:"wc-block-error__text wc-block-components-error__text"},i),c&&React.createElement("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",c),l&&React.createElement("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(81);var x=function(e){l()(a,e);var t,r,n=(t=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=m()(t);if(r){var o=m()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return f()(this,e)});function a(){var e;o()(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e=n.call.apply(n,[this].concat(r)),g()(u()(e),"state",{errorMessage:"",hasError:!1}),e}return i()(a,[{key:"render",value:function(){var e=this.props,t=e.header,r=e.imageUrl,n=e.showErrorMessage,o=e.text,a=e.errorMessagePrefix,i=e.renderError,c=e.button,u=this.state,s=u.errorMessage;return u.hasError?"function"==typeof i?i({errorMessage:s}):React.createElement(O,{errorMessage:n?s:null,header:t,imageUrl:r,text:o,errorMessagePrefix:a,button:c}):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:React.createElement(React.Fragment,null,React.createElement("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),a}(h.Component);x.defaultProps={showErrorMessage:!0},t.a=x},46:function(e,t,r){var n=r(94),o=r(95),a=r(67),i=r(96);e.exports=function(e){return n(e)||o(e)||a(e)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},49:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return a})),r.d(t,"d",(function(){return i}));var n=function(e){return"number"==typeof e},o=function(e){return"string"==typeof e},a=function(e){return!function(e){return null===e}(e)&&e instanceof Object&&e.constructor===Object};function i(e,t){return a(e)&&t in e}},5:function(e,t,r){var n=r(84),o=r(85),a=r(67),i=r(86);e.exports=function(e,t){return n(e)||o(e,t)||a(e,t)||i()},e.exports.default=e.exports,e.exports.__esModule=!0},51:function(e,t,r){"use strict";var n=r(4),o=r.n(n),a=r(0),i=r(6),c=r.n(i);function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){o()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t,r=e.label,n=e.screenReaderLabel,o=e.wrapperElement,i=e.wrapperProps,u=void 0===i?{}:i,l=null!=r,p=null!=n;return!l&&p?(t=o||"span",u=s(s({},u),{},{className:c()(u.className,"screen-reader-text")}),React.createElement(t,u,n)):(t=o||a.Fragment,l&&p&&r!==n?React.createElement(t,u,React.createElement("span",{"aria-hidden":"true"},r),React.createElement("span",{className:"screen-reader-text"},n)):React.createElement(t,u,r))}},53:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(25),a=r.n(o);function i(e){var t=Object(n.useRef)(e);return a()(e,t.current)||(t.current=e),t.current}},58:function(e,t){e.exports=window.wc.priceFormat},6:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===a)if(n.toString===Object.prototype.toString)for(var c in n)r.call(n,c)&&n[c]&&e.push(c);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},64:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=Object(n.createContext)("page"),a=function(){return Object(n.useContext)(o)};o.Provider},67:function(e,t,r){var n=r(68);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},68:function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.default=e.exports,e.exports.__esModule=!0},69:function(e,t,r){"use strict";var n=r(14),o=r.n(n),a=r(4),i=r.n(a),c=r(23),u=r.n(c),s=r(126),l=r(6),p=r.n(l),f=(r(147),["className","value","currency","onValueChange","displayType"]);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach((function(t){i()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}t.a=function(e){var t=e.className,r=e.value,n=e.currency,a=e.onValueChange,i=e.displayType,c=void 0===i?"text":i,l=u()(e,f),d="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(d))return null;var b=d/Math.pow(10,n.minorUnit);if(!Number.isFinite(b))return null;var g=p()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),h=m(m(m({},l),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(n)),{},{value:void 0,currency:void 0,onValueChange:void 0}),v=a?function(e){var t=e.value*Math.pow(10,n.minorUnit);a(t)}:function(){};return React.createElement(s.a,o()({className:g,displayType:c},h,{value:b,onValueChange:v}))}},7:function(e,t){e.exports=window.lodash},71:function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},77:function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},79:function(e,t,r){"use strict";var n=r(80);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,i){if(i!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},8:function(e,t){e.exports=window.wc.wcBlocksData},80:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},81:function(e,t){},82:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){void 0===r&&(r={});var o=r.maxWait,a=Object(n.useRef)(null),i=Object(n.useRef)([]),c=r.leading,u=void 0===r.trailing||r.trailing,s=Object(n.useRef)(!1),l=Object(n.useRef)(null),p=Object(n.useRef)(!1),f=Object(n.useRef)(e);f.current=e;var d=Object(n.useCallback)((function(){clearTimeout(l.current),clearTimeout(a.current),a.current=null,i.current=[],l.current=null,s.current=!1}),[]);Object(n.useEffect)((function(){return p.current=!1,function(){p.current=!0}}),[]);var m=Object(n.useCallback)((function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];i.current=e,clearTimeout(l.current),s.current&&(s.current=!1),l.current||!c||s.current||(f.current.apply(f,e),s.current=!0),l.current=setTimeout((function(){var t=!0;c&&s.current&&(t=!1),d(),!p.current&&u&&t&&f.current.apply(f,e)}),t),o&&!a.current&&u&&(a.current=setTimeout((function(){var e=i.current;d(),p.current||f.current.apply(null,e)}),o))}),[o,t,d,c,u]),b=Object(n.useCallback)((function(){l.current&&(f.current.apply(null,i.current),d())}),[d]);return[m,d,b]}},83:function(e,t,r){"use strict";r.d(t,"n",(function(){return a})),r.d(t,"l",(function(){return i})),r.d(t,"k",(function(){return c})),r.d(t,"m",(function(){return u})),r.d(t,"i",(function(){return s})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return p})),r.d(t,"j",(function(){return f})),r.d(t,"c",(function(){return d})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return b})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return v}));var n,o=r(2),a=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=a.pluginUrl+"images/",c=a.pluginUrl+"build/",u=a.buildPhase,s=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),p=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),d=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},84:function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},85:function(e,t){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],_n=!0,i=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(i)throw o}}return a}},e.exports.default=e.exports,e.exports.__esModule=!0},86:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},90:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return m})),r.d(t,"c",(function(){return b}));var n=r(5),o=r.n(n),a=r(8),i=r(11),c=r(0),u=r(25),s=r.n(u),l=r(53),p=r(99),f=r(64),d=function(e){var t=Object(f.a)();e=e||t;var r=Object(i.useSelect)((function(t){return t(a.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0)}),[e]),n=Object(i.useDispatch)(a.QUERY_STATE_STORE_KEY).setValueForQueryContext;return[r,Object(c.useCallback)((function(t){n(e,t)}),[e,n])]},m=function(e,t,r){var n=Object(f.a)();r=r||n;var o=Object(i.useSelect)((function(n){return n(a.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t)}),[r,e]),u=Object(i.useDispatch)(a.QUERY_STATE_STORE_KEY).setQueryValue;return[o,Object(c.useCallback)((function(t){u(r,e,t)}),[r,e,u])]},b=function(e,t){var r=Object(f.a)(),n=d(t=t||r),a=o()(n,2),i=a[0],u=a[1],m=Object(l.a)(i),b=Object(l.a)(e),g=Object(p.a)(b),h=Object(c.useRef)(!1);return Object(c.useEffect)((function(){s()(g,b)||(u(Object.assign({},m,b)),h.current=!0)}),[m,b,g,u]),h.current?[i,u]:[e,u]}},94:function(e,t,r){var n=r(68);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},95:function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0},96:function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},99:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){var r=Object(n.useRef)();return Object(n.useEffect)((function(){r.current===e||t&&!t(e,r.current)||(r.current=e)}),[e,t]),r.current}}});