| 12345 |
- this.wc=this.wc||{},this.wc.blocksCheckout=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}return 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=161)}([function(e,t){e.exports=window.wp.element},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},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},,function(e,t){e.exports=window.lodash},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 i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var c=o.apply(null,n);c&&e.push(c)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);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)}()},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},,function(e,t){e.exports=window.wp.deprecated},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wp.primitives},,function(e,t,r){"use strict";r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c}));var n=r(2),o="wc/store/cart",i={code:"cart_api_error",message:Object(n.__)("Unable to get cart data from the API.",'woocommerce'),data:{status:500}},c="wc-blocks_cart_update_timestamp"},function(e,t,r){var n=r(26),o=r(27),i=r(19),c=r(28);e.exports=function(e,t){return n(e)||o(e,t)||i(e,t)||c()},e.exports.default=e.exports,e.exports.__esModule=!0},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},function(e,t,r){var n=r(33),o=r(34),i=r(19),c=r(35);e.exports=function(e){return n(e)||o(e)||i(e)||c()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.React},function(e,t,r){var n=r(20);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},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},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},function(e,t){e.exports=window.wp.dom},,function(e,t,r){var n=r(153);e.exports=function(e,t){if(null==e)return{};var r,o,i=n(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)r=c[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){"use strict";(function(e){var n=r(0),o=(r(46),Object(n.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,r(30))},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},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,i=[],_n=!0,c=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);_n=!0);}catch(e){c=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(c)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0},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},,function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=a(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===c||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new m(e,t)),1!==s.length||l||a(d)},m.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},,function(e,t){e.exports=window.wp.keycodes},function(e,t,r){var n=r(20);e.exports=function(e){if(Array.isArray(e))return n(e)},e.exports.default=e.exports,e.exports.__esModule=!0},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},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},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},,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},function(e,t){e.exports=window.wp.blocks},,,,,,,function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.d(t,"a",(function(){return n}))},function(e,t){e.exports=window.wp.isShallowEqual},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},function(e,t,r){var n=r(156);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},function(e,t,r){var n=r(7).default,o=r(36);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},function(e,t){e.exports=window.wc.wcBlocksRegistry},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){},function(e,t){},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},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,r){"use strict";r.r(t),r.d(t,"TotalsItem",(function(){return V})),r.d(t,"Subtotal",(function(){return z})),r.d(t,"TotalsTaxes",(function(){return H})),r.d(t,"TotalsFees",(function(){return G})),r.d(t,"mustContain",(function(){return K})),r.d(t,"returnTrue",(function(){return $})),r.d(t,"extensionCartUpdate",(function(){return Y})),r.d(t,"hasValidFills",(function(){return ot})),r.d(t,"useSlot",(function(){return rt})),r.d(t,"createSlotFill",(function(){return it})),r.d(t,"__experimentalRegisterCheckoutFilters",(function(){return lt})),r.d(t,"__experimentalApplyCheckoutFilter",(function(){return ft})),r.d(t,"TotalsWrapper",(function(){return pt})),r.d(t,"getRegisteredBlocks",(function(){return xt})),r.d(t,"registerCheckoutBlock",(function(){return Et})),r.d(t,"ExperimentalOrderMeta",(function(){return Ft})),r.d(t,"ExperimentalDiscountsMeta",(function(){return Dt})),r.d(t,"ExperimentalOrderShippingPackages",(function(){return It})),r.d(t,"Panel",(function(){return Gt})),r.d(t,"SlotFillProvider",(function(){return De})),r.d(t,"Button",(function(){return Dr})),r.d(t,"Label",(function(){return Ar}));var n=r(0),o=r(6),i=r.n(o),c=r(15),a=r.n(c),u=r(1),s=r.n(u),l=r(24),f=r.n(l),p=r(18),d=r.n(p);function m(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 h(){return(h=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 b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(){}function O(){}O.resetWarningCache=y;var w=function(e,t){return function(e){e.exports=function(){function e(e,t,r,n,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){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:O,resetWarningCache:y};return r.PropTypes=r,r}()}(t={exports:{}}),t.exports}();function j(){}function S(e){return!!(e||"").match(/\d/)}function x(e){return null==e}function E(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function k(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split("."),i=o[0],c=o[1]||"";return{beforeDecimal:i,afterDecimal:c,hasNagation:r,addNegation:n}}function P(e,t,r){for(var n="",o=r?"0":"",i=0;i<=t-1;i++)n+=e[i]||o;return n}function _(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 F(e,t,r){return Math.min(Math.max(e,t),r)}function C(e){return Math.max(e.selectionStart,e.selectionEnd)}var T={thousandSeparator:w.oneOfType([w.string,w.oneOf([!0])]),decimalSeparator:w.string,allowedDecimalSeparators:w.arrayOf(w.string),thousandsGroupStyle:w.oneOf(["thousand","lakh","wan"]),decimalScale:w.number,fixedDecimalScale:w.bool,displayType:w.oneOf(["input","text"]),prefix:w.string,suffix:w.string,format:w.oneOfType([w.string,w.func]),removeFormatting:w.func,mask:w.oneOfType([w.string,w.arrayOf(w.string)]),value:w.oneOfType([w.number,w.string]),defaultValue:w.oneOfType([w.number,w.string]),isNumericString:w.bool,customInput:w.elementType,allowNegative:w.bool,allowEmptyFormatting:w.bool,allowLeadingZeros:w.bool,onValueChange:w.func,onKeyDown:w.func,onMouseUp:w.func,onChange:w.func,onFocus:w.func,onBlur:w.func,type:w.oneOf(["text","tel","password"]),isAllowed:w.func,renderText:w.func,getInputRef:w.oneOfType([w.func,w.shape({current:w.any})])},R={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:j,onChange:j,onKeyDown:j,onMouseUp:j,onFocus:j,onBlur:j,isAllowed:function(){return!0}},D=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=b(t).call(this,e))||"object"!=typeof n&&"function"!=typeof n?g(this):n;var o=e.defaultValue;r.validateProps();var i=r.formatValueProp(o);return r.state={value:i,numAsString:r.removeFormatting(i)},r.selectionBeforeInput={selectionStart:0,selectionEnd:0},r.onChange=r.onChange.bind(g(r)),r.onKeyDown=r.onKeyDown.bind(g(r)),r.onMouseUp=r.onMouseUp.bind(g(r)),r.onFocus=r.onFocus.bind(g(r)),r.onBlur=r.onBlur.bind(g(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&&v(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,i=r.numAsString,c=void 0===i?"":i;if(e!==t){this.validateProps();var a=this.formatNumString(c),u=x(t.value)?a:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),f=parseFloat(c);(isNaN(l)&&isNaN(f)||l===f)&&a===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),i="-"===e[0];i&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var c=(e=(e.match(o)||[]).join("").replace(n,".")).indexOf(".");return-1!==c&&(e="".concat(e.substring(0,c),".").concat(e.substring(c+1,e.length).replace(new RegExp(E(n),"g"),""))),i&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var r=this.props,n=r.format,o=r.decimalScale,i=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!i||0===o||t||n?"":"|"+E(i)),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){_(e,t),setTimeout((function(){e.value===r&&_(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,r){var n=this.props,o=n.prefix,i=n.suffix,c=n.format;if(""===e)return 0;if(t=F(t,0,e.length),!c){var a="-"===e[0];return F(t,o.length+(a?1:0),e.length-i.length)}if("function"==typeof c)return t;if("#"===c[t]&&S(e[t]))return t;if("#"===c[t-1]&&S(e[t-1]))return t;var u=c.indexOf("#");t=F(t,u,c.lastIndexOf("#")+1);for(var s=c.substring(t,c.length).indexOf("#"),l=t,f=t+(-1===s?0:s);l>u&&("#"!==c[l]||!S(e[l]));)l-=1;return!S(e[f])||"left"===r&&t!==u||t-l<f-t?S(e[l])?l+1:l:f}},{key:"getCaretPosition",value:function(e,t,r){var n,o,i=this.props.format,c=this.state.value,a=this.getNumberRegex(!0),u=(e.match(a)||[]).join(""),s=(t.match(a)||[]).join("");for(n=0,o=0;o<r;o++){var l=e[o]||"",f=t[n]||"";if((l.match(a)||l===f)&&("0"!==l||!f.match(a)||"0"===f||u.length===s.length)){for(;l!==t[n]&&n<t.length;)n++;n++}}return"string"!=typeof i||c||(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 i="-"===e[0];i&&(e=e.substring(1,e.length));var c=(e=n&&0===e.indexOf(n)?e.substring(n.length,e.length):e).lastIndexOf(o);e=o&&-1!==c&&c===e.length-o.length?e.substring(0,c):e,i&&(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,i=t.length;o<=i;o++){var c=t[o]||"",a=o===i?e.length:e.indexOf(c,r);if(-1===a){n=e;break}n+=e.substring(r,a),r=a+c.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,i=t.length;o<i;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,i=t.suffix,c=t.allowNegative,a=t.thousandsGroupStyle,u=this.getSeparators(),s=u.thousandSeparator,l=u.decimalSeparator,f=-1!==e.indexOf(".")||r&&n,p=k(e,c),d=p.beforeDecimal,m=p.afterDecimal,h=p.addNegation;return void 0!==r&&(m=P(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,a)),o&&(d=o+d),i&&(m+=i),h&&(d="-"+d),d+(f&&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,i=t.allowEmptyFormatting,c=this.props,a=c.value,u=c.isNumericString,s=!(a=x(a)?e:a)&&0!==a;return s&&i&&(a=""),s&&!i?"":("number"==typeof a&&(a=a.toString(),u=!0),"Infinity"===a&&u&&(a=""),u&&!r&&"number"==typeof n&&(a=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,o=k(e),i=o.beforeDecimal,c=o.afterDecimal,a=o.hasNagation,u=parseFloat("0.".concat(c||"0")).toFixed(t).split("."),s=i.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=P(u[1]||"",Math.min(t,c.length),r),f=n?".":"";return"".concat(a?"-":"").concat(s).concat(f).concat(l)}(a,n,o)),u?this.formatNumString(a):this.formatInput(a))}},{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),i=n.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var r=this.props,n=r.format,o=r.prefix,i=r.suffix,c=r.decimalScale,a=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e<o.length||e>=t.length-i.length||c&&a&&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,i=n.allowNegative,c=n.prefix,a=n.suffix,u=n.decimalScale,s=this.getSeparators(),l=s.allowedDecimalSeparators,f=s.decimalSeparator,p=this.state.numAsString||"",d=this.selectionBeforeInput,m=d.selectionStart,h=d.selectionEnd,b=function(e,t){for(var r=0,n=0,o=e.length,i=t.length;e[r]===t[r]&&r<o;)r++;for(;e[o-1-n]===t[i-1-n]&&i-n>r&&o-n>r;)n++;return{start:r,end:o-n}}(t,r),v=b.start,g=b.end;if(!o&&v===g&&-1!==l.indexOf(r[m])){var y=0===u?"":f;return r.substr(0,m)+y+r.substr(m+1,r.length)}var O=o?0:c.length,w=t.length-(o?0:a.length);if(r.length>t.length||!r.length||v===g||0===m&&h===t.length||m===O&&h===w)return r;if(this.checkIfFormatGotDeleted(v,g,t)&&(r=t),!o){var j=this.removeFormatting(r),S=k(j,i),x=S.beforeDecimal,E=S.afterDecimal,P=S.addNegation,_=e<r.indexOf(f)+1;if(j.length<p.length&&_&&""===x&&!parseFloat(E))return P?"-":""}return r}},{key:"updateValue",value:function(e){var t=e.formattedValue,r=e.input,n=e.setCaretPosition,o=void 0===n||n,i=e.numAsString,c=e.caretPos,a=this.props.onValueChange,u=this.state.value;if(r)if(o){if(!c){var s=e.inputValue||r.value,l=C(r);r.value=t,c=this.getCaretPosition(s,t,l)}this.setPatchedCaretPosition(r,c,t)}else r.value=t;void 0===i&&(i=this.removeFormatting(t)),t!==u&&(this.setState({value:t,numAsString:i}),a(this.getValueObject(t,i)))}},{key:"onChange",value:function(e){var t=e.target,r=t.value,n=this.state,o=this.props,i=o.isAllowed,c=n.value||"",a=C(t);r=this.correctInputValue(a,c,r);var u=this.formatInput(r)||"",s=this.removeFormatting(u);i(this.getValueObject(u,s))||(u=c),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,i=t.allowLeadingZeros,c=r.numAsString,a=r.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!n){isNaN(parseFloat(c))&&(c=""),i||(c=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):"")}(c));var u=this.formatNumString(c);if(u!==a)return this.updateValue({formattedValue:u,numAsString:c,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,i=r.selectionEnd,c=r.value,a=void 0===c?"":c,u=this.props,s=u.decimalScale,l=u.fixedDecimalScale,f=u.prefix,p=u.suffix,d=u.format,m=u.onKeyDown,h=void 0!==s&&l,b=this.getNumberRegex(!1,h),v=new RegExp("-"),g="string"==typeof d;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===n||"Backspace"===n?t=o-1:"ArrowRight"===n?t=o+1:"Delete"===n&&(t=o),void 0!==t&&o===i){var y=t,O=g?d.indexOf("#"):f.length,w=g?d.lastIndexOf("#")+1:a.length-p.length;if("ArrowLeft"===n||"ArrowRight"===n){var j="ArrowLeft"===n?"left":"right";y=this.correctCaretPosition(a,t,j)}else if("Delete"!==n||b.test(a[t])||v.test(a[t])){if("Backspace"===n&&!b.test(a[t]))if(o<=O+1&&"-"===a[0]&&void 0===d){var S=a.substring(1);this.updateValue({formattedValue:S,caretPos:y,input:r})}else if(!v.test(a[t])){for(;!b.test(a[y-1])&&y>O;)y--;y=this.correctCaretPosition(a,y,"left")}}else for(;!b.test(a[y])&&y<w;)y++;(y!==t||t<O||t>w)&&(e.preventDefault(),this.setPatchedCaretPosition(r,y,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,y,a),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,o=t.value,i=void 0===o?"":o;if(r===n){var c=this.correctCaretPosition(i,r);c!==r&&this.setPatchedCaretPosition(t,c,i)}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,i=r.value,c=void 0===i?"":i,a=t.correctCaretPosition(c,n);a===n||0===n&&o===c.length||t.setPatchedCaretPosition(r,a,c),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,r,n=this.props,o=n.type,i=n.displayType,c=n.customInput,a=n.renderText,u=n.getInputRef,s=n.format,l=this.state.value,f=(e=this.props,t=T,r={},Object.keys(e).forEach((function(n){t[n]||(r[n]=e[n])})),r),p=h({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(s)?"numeric":void 0},f,{type:o,value:l,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return a?a(l)||null:d.a.createElement("span",h({},f,{ref:u}),l);if(c){var m=c;return d.a.createElement(m,h({},p,{ref:u}))}return d.a.createElement("input",h({},p,{ref:u}))}}])&&m(r.prototype,n),t}(d.a.Component);D.propTypes=T,D.defaultProps=R;var N=D,M=(r(154),["className","value","currency","onValueChange","displayType"]);function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var B=function(e){var t=e.className,r=e.value,o=e.currency,c=e.onValueChange,u=e.displayType,s=void 0===u?"text":u,l=f()(e,M),p="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(p))return null;var d=p/Math.pow(10,o.minorUnit);if(!Number.isFinite(d))return null;var m=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),h=I(I(I({},l),function(e){return{thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0}}(o)),{},{value:void 0,currency:void 0,onValueChange:void 0}),b=c?function(e){var t=e.value*Math.pow(10,o.minorUnit);c(t)}:function(){};return Object(n.createElement)(N,a()({className:m,displayType:s},h,{value:d,onValueChange:b}))},L=(r(152),function(e){var t=e.value,r=e.currency;return Object(n.isValidElement)(t)?Object(n.createElement)("div",{className:"wc-block-components-totals-item__value"},t):Number.isFinite(t)?Object(n.createElement)(B,{className:"wc-block-components-totals-item__value",currency:r||{},value:t}):null}),V=function(e){var t=e.className,r=e.currency,o=e.label,c=e.value,a=e.description;return Object(n.createElement)("div",{className:i()("wc-block-components-totals-item",t)},Object(n.createElement)("span",{className:"wc-block-components-totals-item__label"},o),Object(n.createElement)(L,{value:c,currency:r}),Object(n.createElement)("div",{className:"wc-block-components-totals-item__description"},a))},U=r(2),W=r(3),z=function(e){var t=e.currency,r=e.values,o=e.className,i=r.total_items,c=r.total_items_tax,a=parseInt(i,10),u=parseInt(c,10);return Object(n.createElement)(V,{className:o,currency:t,label:Object(U.__)("Subtotal",'woocommerce'),value:Object(W.getSetting)("displayCartPricesIncludingTax",!1)?a+u:a})},H=(r(155),function(e){var t=e.currency,r=e.values,o=e.className,c=e.showRateAfterTaxName,a=r.total_tax,u=r.tax_lines;if(!Object(W.getSetting)("taxesEnabled",!0))return null;var s=Object(W.getSetting)("displayItemizedTaxes",!1),l=s&&u.length>0?Object(n.createElement)("div",{className:i()("wc-block-components-totals-taxes",o)},u.map((function(e,r){var o=e.name,i=e.rate,a=e.price,u="".concat(o).concat(c?" ".concat(i):"");return Object(n.createElement)(V,{key:"tax-line-".concat(r),className:"wc-block-components-totals-taxes__grouped-rate",currency:t,label:u,value:parseInt(a,10)})}))," "):null;return s?l:Object(n.createElement)(n.Fragment,null,Object(n.createElement)(V,{className:i()("wc-block-components-totals-taxes",o),currency:t,label:Object(U.__)("Taxes",'woocommerce'),value:parseInt(a,10),description:null}))}),G=function(e){var t=e.currency,r=e.cartFees,o=e.className;return Object(n.createElement)(n.Fragment,null,r.map((function(e,r){var c=e.id,a=e.name,u=e.totals,s=parseInt(u.total,10);if(!s)return null;var l=parseInt(u.total_tax,10);return Object(n.createElement)(V,{key:c||"".concat(r,"-").concat(a),className:i()("wc-block-components-totals-fees",o),currency:t,label:a||Object(U.__)("Fee",'woocommerce'),value:Object(W.getSetting)("displayCartPricesIncludingTax",!1)?s+l:s})})))},K=function(e,t){if(!e.includes(t))throw Error(Object(U.sprintf)(
- /* translators: %1$s value passed to filter, %2$s : value that must be included. */
- Object(U.__)('Returned value must include %1$s, you passed "%2$s"','woocommerce'),e,t));return!0},$=function(){return!0},q=r(10),Z=r(13),Y=function(e){return(0,Object(q.dispatch)(Z.c).applyExtensionCartUpdate)(e)},J=r(9),Q=r.n(J),X=r(11);function ee(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var te=r(25);function re(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ne(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?re(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):re(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function oe(e){var t=Object(n.useContext)(te.a),r=t.slots[e]||{},o=t.fills[e],i=Object(n.useMemo)((function(){return o||[]}),[o]),c=Object(n.useCallback)((function(r){t.updateSlot(e,r)}),[e,t.updateSlot]),a=Object(n.useCallback)((function(r){t.unregisterSlot(e,r)}),[e,t.unregisterSlot]),u=Object(n.useCallback)((function(r){t.registerFill(e,r)}),[e,t.registerFill]),s=Object(n.useCallback)((function(r){t.unregisterFill(e,r)}),[e,t.unregisterFill]);return ne(ne({},r),{},{updateSlot:c,unregisterSlot:a,fills:i,registerFill:u,unregisterFill:s})}function ie(){return(ie=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 ce(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ue(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 se(e,t,r){return t&&ue(e.prototype,t),r&&ue(e,r),e}function le(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fe(e){return(fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pe(e,t,r){return(pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fe(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}})(e,t,r||e)}var de=r(47);function me(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&&Object(de.a)(e,t)}var he=r(7),be=r.n(he);function ve(e,t){return!t||"object"!==be()(t)&&"function"!=typeof t?le(e):t}var ge=r(5);function ye(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}function Oe(e,t){if(e){if("string"==typeof e)return ye(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)?ye(e,t):void 0}}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],_n=!0,c=!1;try{for(r=r.call(e);!(_n=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);_n=!0);}catch(e){c=!0,o=e}finally{try{_n||null==r.return||r.return()}finally{if(c)throw o}}return i}}(e,t)||Oe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e){return function(e){if(Array.isArray(e))return ye(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Oe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Se(e){return(Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var xe=r(48),Ee=r.n(xe);function ke(e){var t=function(e,t){if("object"!==Se(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Se(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Se(t)?t:String(t)}function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _e(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fe(e){var t,r,o,i,c,a,u,s,l,f,p,d=e.children,m=(t=we(Object(n.useState)({}),2),r=t[0],o=t[1],i=we(Object(n.useState)({}),2),c=i[0],a=i[1],u=Object(n.useCallback)((function(e,t,r){o((function(n){var o=n[e]||{};return _e(_e({},n),{},ee({},e,_e(_e({},o),{},{ref:t||o.ref,fillProps:r||o.fillProps||{}})))}))}),[]),s=Object(n.useCallback)((function(e,t){o((function(r){var n=r[e],o=ce(r,[e].map(ke));return(null==n?void 0:n.ref)===t?o:r}))}),[]),l=Object(n.useCallback)((function(e,t){var n=r[e];if(n&&!Ee()(n.fillProps,t)){n.fillProps=t;var o=c[e];o&&o.map((function(e){return e.current.rerender()}))}}),[r,c]),f=Object(n.useCallback)((function(e,t){a((function(r){return _e(_e({},r),{},ee({},e,[].concat(je(r[e]||[]),[t])))}))}),[]),p=Object(n.useCallback)((function(e,t){a((function(r){return r[e]?_e(_e({},r),{},ee({},e,r[e].filter((function(e){return e!==t})))):r}))}),[]),Object(n.useMemo)((function(){return{slots:r,fills:c,registerSlot:u,updateSlot:l,unregisterSlot:s,registerFill:f,unregisterFill:p}}),[r,c,u,l,s,f,p]));return Object(n.createElement)(te.a.Provider,{value:m},d)}var Ce=Object(n.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),Te=Ce.Provider,Re=Ce.Consumer,De=function(e){me(i,e);var t,r,o=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=fe(t);if(r){var o=fe(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ve(this,e)});function i(){var e;return ae(this,i),(e=o.apply(this,arguments)).registerSlot=e.registerSlot.bind(le(e)),e.registerFill=e.registerFill.bind(le(e)),e.unregisterSlot=e.unregisterSlot.bind(le(e)),e.unregisterFill=e.unregisterFill.bind(le(e)),e.getSlot=e.getSlot.bind(le(e)),e.getFills=e.getFills.bind(le(e)),e.hasFills=e.hasFills.bind(le(e)),e.subscribe=e.subscribe.bind(le(e)),e.slots={},e.fills={},e.listeners=[],e.contextValue={registerSlot:e.registerSlot,unregisterSlot:e.unregisterSlot,registerFill:e.registerFill,unregisterFill:e.unregisterFill,getSlot:e.getSlot,getFills:e.getFills,hasFills:e.hasFills,subscribe:e.subscribe},e}return se(i,[{key:"registerSlot",value:function(e,t){var r=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),r&&r.forceUpdate()}},{key:"registerFill",value:function(e,t){this.fills[e]=[].concat(je(this.fills[e]||[]),[t]),this.forceUpdateSlot(e)}},{key:"unregisterSlot",value:function(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}},{key:"unregisterFill",value:function(e,t){this.fills[e]=Object(ge.without)(this.fills[e],t),this.resetFillOccurrence(e),this.forceUpdateSlot(e)}},{key:"getSlot",value:function(e){return this.slots[e]}},{key:"getFills",value:function(e,t){return this.slots[e]!==t?[]:Object(ge.sortBy)(this.fills[e],"occurrence")}},{key:"hasFills",value:function(e){return this.fills[e]&&!!this.fills[e].length}},{key:"resetFillOccurrence",value:function(e){Object(ge.forEach)(this.fills[e],(function(e){e.occurrence=void 0}))}},{key:"forceUpdateSlot",value:function(e){var t=this.getSlot(e);t&&t.forceUpdate()}},{key:"triggerListeners",value:function(){this.listeners.forEach((function(e){return e()}))}},{key:"subscribe",value:function(e){var t=this;return this.listeners.push(e),function(){t.listeners=Object(ge.without)(t.listeners,e)}}},{key:"render",value:function(){return Object(n.createElement)(Te,{value:this.contextValue},Object(n.createElement)(Fe,null,this.props.children))}}]),i}(n.Component);var Ne=function(e){me(i,e);var t,r,o=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=fe(t);if(r){var o=fe(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ve(this,e)});function i(){var e;return ae(this,i),(e=o.apply(this,arguments)).isUnmounted=!1,e.bindNode=e.bindNode.bind(le(e)),e}return se(i,[{key:"componentDidMount",value:function(){(0,this.props.registerSlot)(this.props.name,this)}},{key:"componentWillUnmount",value:function(){var e=this.props.unregisterSlot;this.isUnmounted=!0,e(this.props.name,this)}},{key:"componentDidUpdate",value:function(e){var t=this.props,r=t.name,n=t.unregisterSlot,o=t.registerSlot;e.name!==r&&(n(e.name),o(r,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||pe(fe(i.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.name,o=e.fillProps,i=void 0===o?{}:o,c=e.getFills,a=Object(ge.map)(c(r,this),(function(e){var t=e.occurrence,r=Object(ge.isFunction)(e.children)?e.children(i):e.children;return n.Children.map(r,(function(e,r){if(!e||Object(ge.isString)(e))return e;var o="".concat(t,"---").concat(e.key||r);return Object(n.cloneElement)(e,{key:o})}))})).filter(Object(ge.negate)(n.isEmptyElement));return Object(n.createElement)(n.Fragment,null,Object(ge.isFunction)(t)?t(a):a)}}]),i}(n.Component),Me=function(e){return Object(n.createElement)(Re,null,(function(t){var r=t.registerSlot,o=t.unregisterSlot,i=t.getFills;return Object(n.createElement)(Ne,ie({},e,{registerSlot:r,unregisterSlot:o,getFills:i}))}))},Ae=0;function Ie(e){var t=e.name,r=e.children,o=e.registerFill,i=e.unregisterFill,c=function(e){var t=Object(n.useContext)(Ce),r=t.getSlot,o=t.subscribe,i=we(Object(n.useState)(r(e)),2),c=i[0],a=i[1];return Object(n.useEffect)((function(){return a(r(e)),o((function(){a(r(e))}))}),[e]),c}(t),a=Object(n.useRef)({name:t,children:r});return a.current.occurrence||(a.current.occurrence=++Ae),Object(n.useLayoutEffect)((function(){return o(t,a.current),function(){return i(t,a.current)}}),[]),Object(n.useLayoutEffect)((function(){a.current.children=r,c&&c.forceUpdate()}),[r]),Object(n.useLayoutEffect)((function(){t!==a.current.name&&(i(a.current.name,a.current),a.current.name=t,o(t,a.current))}),[t]),c&&c.node?(Object(ge.isFunction)(r)&&(r=r(c.props.fillProps)),Object(n.createPortal)(r,c.node)):null}var Be=function(e){return Object(n.createElement)(Re,null,(function(t){var r=t.registerFill,o=t.unregisterFill;return Object(n.createElement)(Ie,ie({},e,{registerFill:r,unregisterFill:o}))}))};function Le(e){var t=e.name,r=e.fillProps,o=void 0===r?{}:r,i=e.as,c=void 0===i?"div":i,a=ce(e,["name","fillProps","as"]),u=Object(n.useContext)(te.a),s=Object(n.useRef)();return Object(n.useLayoutEffect)((function(){return u.registerSlot(t,s,o),function(){u.unregisterSlot(t,s)}}),[u.registerSlot,u.unregisterSlot,t]),Object(n.useLayoutEffect)((function(){u.updateSlot(t,o)})),Object(n.createElement)(c,ie({ref:s},a))}function Ve(e){var t,r=e.name,o=e.children,i=oe(r),c=Object(n.useRef)({rerender:(t=we(Object(n.useState)({}),2)[1],function(){return t({})})});return Object(n.useEffect)((function(){return i.registerFill(c),function(){i.unregisterFill(c)}}),[i.registerFill,i.unregisterFill]),i.ref&&i.ref.current?("function"==typeof o&&(o=o(i.fillProps)),Object(n.createPortal)(o,i.ref.current)):null}function Ue(e){var t=e.bubblesVirtually,r=ce(e,["bubblesVirtually"]);return t?Object(n.createElement)(Le,r):Object(n.createElement)(Me,r)}function We(e){return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(Be,e),Object(n.createElement)(Ve,e))}function ze(e){var t=function(t){return Object(n.createElement)(We,ie({name:e},t))};t.displayName=e+"Fill";var r=function(t){return Object(n.createElement)(Ue,ie({name:e},t))};return r.displayName=e+"Slot",{Fill:t,Slot:r}}var He=r(21),Ge=r.n(He),Ke=r(49),$e=r.n(Ke),qe=r(36),Ze=r.n(qe),Ye=r(50),Je=r.n(Ye),Qe=r(51),Xe=r.n(Qe),et=r(38),tt=r.n(et);var rt,nt=function(e){Je()(i,e);var t,r,o=(t=i,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=tt()(t);if(r){var o=tt()(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return Xe()(this,e)});function i(){var e;Ge()(this,i);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e=o.call.apply(o,[this].concat(r)),s()(Ze()(e),"state",{errorMessage:"",hasError:!1}),e}return $e()(i,[{key:"render",value:function(){var e=this.props.renderError,t=this.state,r=t.errorMessage;return t.hasError?"function"==typeof e?e(r):Object(n.createElement)("p",null,r):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("strong",null,e.status),": "+e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),i}(p.Component),ot=function(e){return Array.isArray(e)&&e.filter(Boolean).length>0};rt=oe;var it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=ze(e),o=r.Fill,i=r.Slot,c=function(e){var r=e.children;return Object(n.createElement)(o,null,(function(e){return n.Children.map(r,(function(r){return Object(n.createElement)(nt,{renderError:W.CURRENT_USER_IS_ADMIN?t:function(){return null}},Object(n.cloneElement)(r,e))}))}))},u=function(e){return Object(n.createElement)(i,a()({},e,{bubblesVirtually:!0}))};return{Fill:c,Slot:u}};function ct(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function at(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ct(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ut,st={},lt=function(e,t){Object.keys(t).includes("couponName")&&Q()("snackbarNotices",{alternative:"snackbarNoticeVisibility",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4417"}),Object.keys(t).includes("couponName")&&Q()("couponName",{alternative:"coupons",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/bb921d21f42e21f38df2b1c87b48e07aa4cb0538/docs/extensibility/available-filters.md#coupons"}),st=at(at({},st),{},s()({},e,t))},ft=function(e){var t=e.filterName,r=e.defaultValue,o=e.extensions,i=void 0===o?null:o,c=e.arg,a=void 0===c?null:c,u=e.validation,s=void 0===u?$:u;return Object(n.useMemo)((function(){var e=function(e){return Object.keys(st).map((function(t){return st[t][e]})).filter(Boolean)}(t),n=r;return e.forEach((function(e){try{var t=e(n,i||{},a);if(be()(t)!==be()(n))throw new Error(Object(U.sprintf)(
- /* translators: %1$s is the type of the variable passed to the filter function, %2$s is the type of the value returned by the filter function. */
- Object(U.__)("The type returned by checkout filters must be the same as the type they receive. The function received %1$s but returned %2$s.",'woocommerce'),be()(n),be()(t)));n=s(t)?t:n}catch(e){if(W.CURRENT_USER_IS_ADMIN)throw e;console.error(e)}})),n}),[t,r,i,a,s])},pt=(r(157),function(e){var t=e.children,r=e.slotWrapper,o=void 0!==r&&r;return p.Children.count(t)?Object(n.createElement)("div",{className:"wc-block-components-totals-wrapper".concat(o?" slot-wrapper":"")},t):null}),dt=r(16),mt=r.n(dt),ht=r(52),bt=Object(W.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),vt=(bt.pluginUrl,bt.pluginUrl,bt.buildPhase),gt=(null===(ut=W.STORE_PAGES.shop)||void 0===ut||ut.permalink,W.STORE_PAGES.checkout.id,W.STORE_PAGES.checkout.permalink,W.STORE_PAGES.privacy.permalink,W.STORE_PAGES.privacy.title,W.STORE_PAGES.terms.permalink,W.STORE_PAGES.terms.title,W.STORE_PAGES.cart.id,W.STORE_PAGES.cart.permalink,W.STORE_PAGES.myaccount.permalink?W.STORE_PAGES.myaccount.permalink:Object(W.getSetting)("wpLoginUrl","/wp-login.php"),Object(W.getSetting)("shippingCountries",{}),Object(W.getSetting)("allowedCountries",{}),Object(W.getSetting)("shippingStates",{}),Object(W.getSetting)("allowedStates",{}),r(39));function yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ot(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yt(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wt={fields:[],totals:[],contactInformation:["core/paragraph"],shippingAddress:["core/paragraph"],billingAddress:["core/paragraph"],shippingMethods:["core/paragraph"],paymentMethods:["core/paragraph"]},jt=function(e){if(!wt.hasOwnProperty(e))throw new Error('Incorrect value for the "area" argument. It was a '.concat(e,", but must be one of ").concat(Object.keys(wt).join(", "),"."))},St=function(e,t,r){var n=be()(e[t]);if("array"===r){if(!Array.isArray(e[t]))throw new Error("Incorrect value for the ".concat(t," argument when registering a checkout block component. It was a ").concat(n,", but must be an array."))}else if(n!==r)throw new Error("Incorrect value for the ".concat(t," argument when registering a checkout block component. It was a ").concat(n,", but must be a ").concat(r,"."))},xt=function(e){return jt(e),mt()(wt[e])},Et=function(e,t){var r,n;(function(e){if(function(e,t,r){var n=be()(t);if("string"!==n)throw new Error("Incorrect value for the ".concat("blockName"," argument when registering a checkout block. It was a ").concat(n,", but must be a ").concat("string","."))}(0,e),!e)throw new Error("Value for the blockName argument must not be empty.")})(e),St(t,"areas","array"),function(e,t){var r,n=e.component;if(n){if("function"==typeof n)return;if(!function(e){return null===e}(r=n)&&"object"===be()(r)&&n.$$typeof&&n.$$typeof===Symbol.for("react.lazy"))return}throw new Error("Incorrect value for the ".concat("component"," argument when registering a block component. Component must be a valid React Element or Lazy callback."))}(t),null!=t&&t.configuration&&(St(t,"configuration","object"),r=e,n=Ot(Ot({},t.configuration),{},{category:"woocommerce"}),vt>2&&Object(gt.registerBlockType)(r,n)),t.areas.forEach((function(t){return function(e,t){jt(e),wt=Ot(Ot({},wt),{},s()({},e,[].concat(mt()(wt[e]),[t])))}(t,e)})),Object(ht.registerBlockComponent)({blockName:e,component:t.component})},kt=it("__experimentalOrderMeta"),Pt=kt.Fill,_t=kt.Slot;Pt.Slot=function(e){var t=e.className,r=e.extensions,o=e.cart,c=rt("__experimentalOrderMeta").fills;return ot(c)&&Object(n.createElement)(pt,{slotWrapper:!0},Object(n.createElement)(_t,{className:i()(t,"wc-block-components-order-meta"),fillProps:{extensions:r,cart:o}}))};var Ft=Pt,Ct=it("__experimentalDiscountsMeta"),Tt=Ct.Fill,Rt=Ct.Slot;Tt.Slot=function(e){var t=e.className,r=e.extensions,o=e.cart,c=rt("__experimentalDiscountsMeta").fills;return ot(c)&&Object(n.createElement)(pt,{slotWrapper:!0},Object(n.createElement)(Rt,{className:i()(t,"wc-block-components-discounts-meta"),fillProps:{extensions:r,cart:o}}))};var Dt=Tt,Nt=it("__experimentalOrderShippingPackages"),Mt=Nt.Fill,At=Nt.Slot;Mt.Slot=function(e){var t=e.className,r=e.collapsible,o=e.noResultsMessage,c=e.renderOption,a=e.extensions,u=e.cart,s=e.components,l=rt("__experimentalOrderShippingPackages").fills.length>1;return Object(n.createElement)(At,{className:i()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:r,collapse:l,showItems:l,noResultsMessage:o,renderOption:c,extensions:a,cart:u,components:s}})};var It=Mt,Bt=r(14),Lt=r.n(Bt),Vt=["srcElement","size"];function Ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}var Wt=function(e){var t=e.srcElement,r=e.size,o=void 0===r?24:r,i=f()(e,Vt);return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ut(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ut(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({width:o,height:o},i)):null},zt=Object(n.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{d:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.6 1-1.2z"})),Ht=Object(n.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)("path",{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),Gt=(r(158),function(e){var t=e.children,r=e.className,o=e.initialOpen,c=void 0!==o&&o,a=e.hasBorder,u=void 0!==a&&a,s=e.title,l=e.titleTag,f=void 0===l?"div":l,p=Object(n.useState)(c),d=Lt()(p,2),m=d[0],h=d[1];return Object(n.createElement)("div",{className:i()(r,"wc-block-components-panel",{"has-border":u})},Object(n.createElement)(f,null,Object(n.createElement)("button",{"aria-expanded":m,className:"wc-block-components-panel__button",onClick:function(){return h(!m)}},Object(n.createElement)(Wt,{"aria-hidden":"true",className:"wc-block-components-panel__button-icon",srcElement:m?zt:Ht}),s)),m&&Object(n.createElement)("div",{className:"wc-block-components-panel__content"},t))}),Kt=r(22),$t=r(32),qt=r(17),Zt=Object(n.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(X.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"}));function Yt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Qt(e,t,r,n,o,i,c){var a=t.width,u="rtl"===document.documentElement.dir;"left"===r&&u?r="right":"right"===r&&u&&(r="left"),"left"===n&&u?n="right":"right"===n&&u&&(n="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-a/2>0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===n?f=e.right:"middle"!==i&&(f=s);var p=e.right;"left"===n?p=e.left:"middle"!==i&&(p=s);var d,m={popoverLeft:f,contentWidth:f-a>0?a:f},h={popoverLeft:p,contentWidth:p+a>window.innerWidth?window.innerWidth-p:a},b=r,v=null;if(!o)if("center"===r&&l.contentWidth===a)b="center";else if("left"===r&&m.contentWidth===a)b="left";else if("right"===r&&h.contentWidth===a)b="right";else{var g="left"==(b=m.contentWidth>h.contentWidth?"left":"right")?m.contentWidth:h.contentWidth;v=g!==a?g:null}if(d="center"===b?l.popoverLeft:"left"===b?m.popoverLeft:h.popoverLeft,c){var y=c.getBoundingClientRect();d=Math.min(d,y.right-a)}return{xAxis:b,popoverLeft:d,contentWidth:v}}function Xt(e,t,r,n,o,i,c){var a=t.height;if(o){var u=(Object(Kt.getScrollContainer)(i)||document.body).getBoundingClientRect().top+a-c;if(e.top<=u)return{yAxis:r,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===n?s=e.bottom:"top"===n&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=r,m=null;if(!o)if("middle"===r&&l.contentHeight===a)d="middle";else if("top"===r&&f.contentHeight===a)d="top";else if("bottom"===r&&p.contentHeight===a)d="bottom";else{var h="top"==(d=f.contentHeight>p.contentHeight?"top":"bottom")?f.contentHeight:p.contentHeight;m=h!==a?h:null}return{yAxis:d,popoverTop:"middle"===d?l.popoverTop:"top"===d?f.popoverTop:p.popoverTop,contentHeight:m}}var er=Object(n.createContext)({focusHistory:[]}),tr=er.Provider,rr=er.Consumer;tr.displayName="FocusReturnProvider",rr.displayName="FocusReturnConsumer",n.Component;var nr=Object(qt.createHigherOrderComponent)((function e(t){if((o=t)instanceof n.Component||"function"==typeof o){var r=t;return e({})(r)}var o,i=t.onFocusReturn,c=void 0===i?ge.stubTrue:i;return function(e){var t=function(t){me(a,t);var r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fe(r);if(o){var n=fe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ve(this,e)});function a(){var e;return ae(this,a),(e=i.apply(this,arguments)).ownFocusedElements=new Set,e.activeElementOnMount=document.activeElement,e.setIsFocusedFalse=function(){return e.isFocused=!1},e.setIsFocusedTrue=function(t){e.ownFocusedElements.add(t.target),e.isFocused=!0},e}return se(a,[{key:"componentWillUnmount",value:function(){var e=this.activeElementOnMount,t=this.isFocused,r=this.ownFocusedElements;if(t&&!1!==c())for(var n,o=[].concat(je(ge.without.apply(void 0,[this.props.focus.focusHistory].concat(je(r)))),[e]);n=o.pop();)if(document.body.contains(n))return void n.focus()}},{key:"render",value:function(){return Object(n.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(n.createElement)(e,this.props.childProps))}}]),a}(n.Component);return function(e){return Object(n.createElement)(rr,null,(function(r){return Object(n.createElement)(t,{childProps:e,focus:r})}))}}}),"withFocusReturn");var or=Object(qt.createHigherOrderComponent)((function(e){return function(t){me(c,t);var r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fe(r);if(o){var n=fe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ve(this,e)});function c(){var e;return ae(this,c),(e=i.apply(this,arguments)).focusContainRef=Object(n.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(le(e)),e}return se(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===$t.TAB){var t=Kt.focus.tabbable.find(this.focusContainRef.current);if(t.length){var r=t[0],n=t[t.length-1];e.shiftKey&&e.target===r?(e.preventDefault(),n.focus()):(e.shiftKey||e.target!==n)&&t.includes(e.target)||(e.preventDefault(),r.focus())}}}},{key:"render",value:function(){return Object(n.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(n.createElement)(e,this.props))}}]),c}(n.Component)}),"withConstrainedTabbing");var ir=["button","submit"];var cr=Object(qt.createHigherOrderComponent)((function(e){return function(t){me(c,t);var r,o,i=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fe(r);if(o){var n=fe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ve(this,e)});function c(){var e;return ae(this,c),(e=i.apply(this,arguments)).bindNode=e.bindNode.bind(le(e)),e.cancelBlurCheck=e.cancelBlurCheck.bind(le(e)),e.queueBlurCheck=e.queueBlurCheck.bind(le(e)),e.normalizeButtonFocus=e.normalizeButtonFocus.bind(le(e)),e}return se(c,[{key:"componentWillUnmount",value:function(){this.cancelBlurCheck()}},{key:"bindNode",value:function(e){e?this.node=e:(delete this.node,this.cancelBlurCheck())}},{key:"queueBlurCheck",value:function(e){var t=this;e.persist(),this.preventBlurCheck||(this.blurCheckTimeout=setTimeout((function(){document.hasFocus()?"function"==typeof t.node.handleFocusOutside&&t.node.handleFocusOutside(e):e.preventDefault()}),0))}},{key:"cancelBlurCheck",value:function(){clearTimeout(this.blurCheckTimeout)}},{key:"normalizeButtonFocus",value:function(e){var t=e.type,r=e.target;Object(ge.includes)(["mouseup","touchend"],t)?this.preventBlurCheck=!1:function(e){switch(e.nodeName){case"A":case"BUTTON":return!0;case"INPUT":return Object(ge.includes)(ir,e.type)}return!1}(r)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(n.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(n.createElement)(e,ie({ref:this.bindNode},this.props)))}}]),c}(n.Component)}),"withFocusOutside")(function(e){me(o,e);var t,r,n=(t=o,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=fe(t);if(r){var o=fe(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ve(this,e)});function o(){return ae(this,o),n.apply(this,arguments)}return se(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(n.Component));function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=fe(e);if(t){var o=fe(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ve(this,r)}}var ur=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,r=void 0===t?document:t,o=e.className,i=void 0===o?"lockscroll":o,c=0,a=0;function u(e){var t=r.scrollingElement||r.body;e&&(a=t.scrollTop);var n=e?"add":"remove";t.classList[n](i),r.documentElement.classList[n](i),e||(t.scrollTop=a)}function s(){0===c&&u(!0),++c}function l(){1===c&&u(!1),--c}return function(e){me(r,e);var t=ar(r);function r(){return ae(this,r),t.apply(this,arguments)}return se(r,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),r}(n.Component)}();function sr(e){e.stopPropagation()}var lr=Object(n.forwardRef)((function(e,t){var r=e.children,o=ce(e,["children"]);return Object(n.createElement)("div",ie({},o,{ref:t,onMouseDown:sr}),r)}));function fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fr(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function dr(e){var t=e.type,r=e.origin,n=void 0===r?function(e){return"appear"===e?"top":"left"}(t):r;if("appear"===t){var o,c=we(n.split(" "),2),a=c[0],u=c[1],s=void 0===u?"center":u;return i()("components-animate__appear",(ee(o={},"is-from-"+s,"center"!==s),ee(o,"is-from-"+a,"middle"!==a),o))}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+n):"loading"===t?i()("components-animate__loading"):void 0}function mr(e){var t=e.type,r=e.options,n=void 0===r?{}:r;return(0,e.children)({className:dr(pr({type:t},n))})}var hr=or(nr((function(e){return e.children})));function br(e,t){var r,n=(r=t).ownerDocument.defaultView.getComputedStyle(r),o=n.paddingTop,i=n.paddingBottom,c=n.paddingLeft,a=n.paddingRight,u=o?parseInt(o,10):0,s=i?parseInt(i,10):0,l=c?parseInt(c,10):0,f=a?parseInt(a,10):0;return{x:e.left+l,y:e.top+u,width:e.width-l-f,height:e.height-u-s,left:e.left+l,right:e.right-f,top:e.top+u,bottom:e.bottom-s}}function vr(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function gr(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==r&&(e.style[t]=r)}function yr(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var Or=function(e){var t=e.headerTitle,r=e.onClose,o=e.onKeyDown,c=e.children,a=e.className,u=e.noArrow,s=void 0===u||u,l=e.isAlternate,f=e.position,p=void 0===f?"bottom right":f,d=(e.range,e.focusOnMount),m=void 0===d?"firstElement":d,h=e.anchorRef,b=e.shouldAnchorIncludePadding,v=e.anchorRect,g=e.getAnchorRect,y=e.expandOnMobile,O=e.animate,w=void 0===O||O,j=e.onClickOutside,S=e.onFocusOutside,x=e.__unstableSticky,E=e.__unstableSlotName,k=void 0===E?"Popover":E,P=e.__unstableObserveElement,_=e.__unstableBoundaryParent,F=ce(e,["headerTitle","onClose","onKeyDown","children","className","noArrow","isAlternate","position","range","focusOnMount","anchorRef","shouldAnchorIncludePadding","anchorRect","getAnchorRect","expandOnMobile","animate","onClickOutside","onFocusOutside","__unstableSticky","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent"]),C=Object(n.useRef)(null),T=Object(n.useRef)(null),R=Object(n.useRef)(),D=Object(qt.useViewportMatch)("medium","<"),N=we(Object(n.useState)(),2),M=N[0],A=N[1],I=oe(k),B=y&&D,L=we(Object(qt.useResizeObserver)(),2),V=L[0],U=L[1];s=B||s,Object(n.useLayoutEffect)((function(){if(B)return yr(R.current,"is-without-arrow",s),yr(R.current,"is-alternate",l),vr(R.current,"data-x-axis"),vr(R.current,"data-y-axis"),gr(R.current,"top"),gr(R.current,"left"),gr(T.current,"maxHeight"),void gr(T.current,"maxWidth");var e=function(){if(R.current&&T.current){var e=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(r){if(!e.current)return;return r(e.current)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if(n instanceof window.Range)return Object(Kt.getRectangleFromRange)(n);if(n instanceof window.Element){var i=n.getBoundingClientRect();return o?i:br(i,n)}var c=n.top,a=n.bottom,u=c.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:br(l,n)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:br(p,f)}}(C,v,g,h,b);if(e){var t,r,n=R.current,o=n.offsetParent,i=n.ownerDocument,c=0;if(o&&o!==i.body){var a=o.getBoundingClientRect();c=a.top,e=new window.DOMRect(e.left-a.left,e.top-a.top,e.width,e.height)}_&&(t=null===(r=R.current.closest(".popover-slot"))||void 0===r?void 0:r.parentNode);var u=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,a=r.split(" "),u=we(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=Xt(e,t,s,p,n,o,i),m=Qt(e,t,f,p,n,d.yAxis,c);return Jt(Jt({},m),d)}(e,U.height?U:T.current.getBoundingClientRect(),p,x,R.current,c,t),f=u.popoverTop,d=u.popoverLeft,m=u.xAxis,y=u.yAxis,O=u.contentHeight,w=u.contentWidth;"number"==typeof f&&"number"==typeof d&&(gr(R.current,"top",f+"px"),gr(R.current,"left",d+"px")),yr(R.current,"is-without-arrow",s||"center"===m&&"middle"===y),yr(R.current,"is-alternate",l),vr(R.current,"data-x-axis",m),vr(R.current,"data-y-axis",y),gr(T.current,"maxHeight","number"==typeof O?O+"px":""),gr(T.current,"maxWidth","number"==typeof w?w+"px":""),A(({left:"right",right:"left"}[m]||"center")+" "+({top:"bottom",bottom:"top"}[y]||"middle"))}}};e();var t,r,n=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),P&&(r=new window.MutationObserver(e)).observe(P,{attributes:!0}),function(){window.clearInterval(n),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),r&&r.disconnect()}}),[B,v,g,h,b,p,U,x,P,_]),function(e,t){Object(n.useEffect)((function(){var r=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var r=Kt.focus.tabbable.find(t.current)[0];r?r.focus():t.current.focus()}}),0);return function(){return clearTimeout(r)}}),[])}(m,T);var W=function(e){e.keyCode===$t.ESCAPE&&r&&(e.stopPropagation(),r()),o&&o(e)},z=Object(n.createElement)(cr,{onFocusOutside:function(e){if(S)S(e);else if(j){var t;try{t=new window.MouseEvent("click")}catch(e){(t=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null)}Object.defineProperty(t,"target",{get:function(){return e.relatedTarget}}),Q()("Popover onClickOutside prop",{alternative:"onFocusOutside"}),j(t)}else r&&r()}},Object(n.createElement)(mr,{type:w&&M?"appear":null,options:{origin:M}},(function(e){var o=e.className;return Object(n.createElement)(lr,ie({className:i()("components-popover",a,o,{"is-expanded":B,"is-without-arrow":s,"is-alternate":l})},F,{onKeyDown:W,ref:R}),B&&Object(n.createElement)(ur,null),B&&Object(n.createElement)("div",{className:"components-popover__header"},Object(n.createElement)("span",{className:"components-popover__header-title"},t),Object(n.createElement)(Cr,{className:"components-popover__close",icon:Zt,onClick:r})),Object(n.createElement)("div",{ref:T,className:"components-popover__content",tabIndex:"-1"},Object(n.createElement)("div",{style:{position:"relative"}},V,c)))})));return m&&(z=Object(n.createElement)(hr,null,z)),I.ref&&(z=Object(n.createElement)(We,{name:k},z)),h||v?z:Object(n.createElement)("span",{ref:C},z)};Or.Slot=function(e){var t=e.name,r=void 0===t?"Popover":t;return Object(n.createElement)(Ue,{bubblesVirtually:!0,name:r,className:"popover-slot"})};var wr=Or,jr=function(e){var t,r,o=e.shortcut,i=e.className;return o?(Object(ge.isString)(o)&&(t=o),Object(ge.isObject)(o)&&(t=o.display,r=o.ariaLabel),Object(n.createElement)("span",{className:i,"aria-label":r},t)):null};var Sr=function(e){me(i,e);var t,r,o=(t=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=fe(t);if(r){var o=fe(this).constructor;e=Reflect.construct(n,arguments,o)}else e=n.apply(this,arguments);return ve(this,e)});function i(){var e;return ae(this,i),(e=o.apply(this,arguments)).delayedSetIsOver=Object(ge.debounce)((function(t){return e.setState({isOver:t})}),700),e.cancelIsMouseDown=e.createSetIsMouseDown(!1),e.isInMouseDown=!1,e.state={isOver:!1},e}return se(i,[{key:"componentWillUnmount",value:function(){this.delayedSetIsOver.cancel(),document.removeEventListener("mouseup",this.cancelIsMouseDown)}},{key:"emitToChild",value:function(e,t){var r=this.props.children;if(1===n.Children.count(r)){var o=n.Children.only(r);"function"==typeof o.props[e]&&o.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var r=this;return function(n){if(r.emitToChild(e,n),!(n.currentTarget.disabled||"focus"===n.type&&r.isInMouseDown)){r.delayedSetIsOver.cancel();var o=Object(ge.includes)(["focus","mouseenter"],n.type);o!==r.state.isOver&&(t?r.delayedSetIsOver(o):r.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(r){t.emitToChild(e?"onMouseDown":"onMouseUp",r),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.position,o=e.text,i=e.shortcut;if(1!==n.Children.count(t))return t;var c=n.Children.only(t),a=this.state.isOver;return Object(n.cloneElement)(c,{onMouseEnter:this.createToggleIsOver("onMouseEnter",!0),onMouseLeave:this.createToggleIsOver("onMouseLeave"),onClick:this.createToggleIsOver("onClick"),onFocus:this.createToggleIsOver("onFocus"),onBlur:this.createToggleIsOver("onBlur"),onMouseDown:this.createSetIsMouseDown(!0),children:Object(n.concatChildren)(c.props.children,a&&Object(n.createElement)(wr,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,Object(n.createElement)(jr,{className:"components-tooltip__shortcut",shortcut:i})))})}}]),i}(n.Component),xr=function(e){var t=e.icon,r=e.className,o=ce(e,["icon","className"]),i=["dashicon","dashicons","dashicons-"+t,r].filter(Boolean).join(" ");return Object(n.createElement)("span",ie({className:i},o))};function Er(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 kr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Er(Object(r),!0).forEach((function(t){ee(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Er(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Pr=function(e){var t=e.icon,r=void 0===t?null:t,o=e.size,i=ce(e,["icon","size"]);if("string"==typeof r)return Object(n.createElement)(xr,ie({icon:r},i));if(r&&xr===r.type)return Object(n.cloneElement)(r,kr({},i));var c=o||24;if("function"==typeof r)return r.prototype instanceof n.Component?Object(n.createElement)(r,kr({size:c},i)):r(kr({size:c},i));if(r&&("svg"===r.type||r.type===X.SVG)){var a=kr(kr({width:c,height:c},r.props),i);return Object(n.createElement)(X.SVG,a)}return Object(n.isValidElement)(r)?Object(n.cloneElement)(r,kr({size:c},i)):r};function _r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Fr=["onMouseDown","onClick"],Cr=Object(n.forwardRef)((function(e,t){var r=e.href,o=e.target,c=e.isPrimary,a=e.isSmall,u=e.isTertiary,s=e.isPressed,l=e.isBusy,f=e.isDefault,p=e.isSecondary,d=e.isLink,m=e.isDestructive,h=e.className,b=e.disabled,v=e.icon,g=e.iconSize,y=e.showTooltip,O=e.tooltipPosition,w=e.shortcut,j=e.label,S=e.children,x=e.__experimentalIsFocusable,E=ce(e,["href","target","isPrimary","isSmall","isTertiary","isPressed","isBusy","isDefault","isSecondary","isLink","isDestructive","className","disabled","icon","iconSize","showTooltip","tooltipPosition","shortcut","label","children","__experimentalIsFocusable"]);f&&Q()("Button isDefault prop",{alternative:"isSecondary"});var k=i()("components-button",h,{"is-secondary":f||p,"is-primary":c,"is-small":a,"is-tertiary":u,"is-pressed":s,"is-busy":l,"is-link":d,"is-destructive":m,"has-text":!!v&&!!S,"has-icon":!!v}),P=b&&!x,_=void 0===r||P?"button":"a",F="a"===_?{href:r,target:o}:{type:"button",disabled:P,"aria-pressed":s};if(b&&x){F["aria-disabled"]=!0;var C,T=function(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return _r(e,void 0);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)?_r(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==r.return||r.return()}finally{if(a)throw i}}}}(Fr);try{for(T.s();!(C=T.n()).done;)E[C.value]=function(e){e.stopPropagation(),e.preventDefault()}}catch(e){T.e(e)}finally{T.f()}}var R=!P&&(y&&j||w||!!j&&(!S||Object(ge.isArray)(S)&&!S.length)&&!1!==y),D=Object(n.createElement)(_,ie({},F,E,{className:k,"aria-label":E["aria-label"]||j,ref:t}),v&&Object(n.createElement)(Pr,{icon:v,size:g}),S);return R?Object(n.createElement)(Sr,{text:j,shortcut:w,position:O},D):D})),Tr=(r(160),function(){return Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}),Rr=(r(159),["className","showSpinner","children"]),Dr=function(e){var t=e.className,r=e.showSpinner,o=void 0!==r&&r,c=e.children,u=f()(e,Rr),s=i()("wc-block-components-button",t,{"wc-block-components-button--loading":o});return Object(n.createElement)(Cr,a()({className:s},u),o&&Object(n.createElement)(Tr,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},c))};function Nr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Mr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nr(Object(r),!0).forEach((function(t){s()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ar=function(e){var t,r=e.label,o=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,u=void 0===a?{}:a,s=null!=r,l=null!=o;return!s&&l?(t=c||"span",u=Mr(Mr({},u),{},{className:i()(u.className,"screen-reader-text")}),Object(n.createElement)(t,u,o)):(t=c||n.Fragment,s&&l&&r!==o?Object(n.createElement)(t,u,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,u,r))}}]);
|