5 lines
77 KiB
JavaScript
5 lines
77 KiB
JavaScript
this.wc=this.wc||{},this.wc.blocksCheckout=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=160)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.i18n},,function(e,t){e.exports=window.lodash},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var c=o.apply(null,r);c&&e.push(c)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var a in r)n.call(r,a)&&r[a]&&e.push(a);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=n=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=n=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),n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wc.wcSettings},,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,n){var r=n(20),o=n(21),i=n(18),c=n(22);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||c()},e.exports.default=e.exports,e.exports.__esModule=!0},,function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return c}));var r=n(2),o="wc/store/cart",i={code:"cart_api_error",message:Object(r.__)("Unable to get cart data from the API.",'woocommerce'),data:{status:500}},c="wc-blocks_cart_update_timestamp"},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,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,n){var r=n(19);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},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 n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},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 n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],_n=!0,c=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){c=!0,o=e}finally{try{_n||null==n.return||n.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){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){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=window.wp.dom},,function(e,t,n){var r=n(152);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(o=0;o<c.length;o++)n=c[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";(function(e){var r=n(0),o=(n(43),Object(r.createContext)({slots:{},fills:{},registerSlot:function(){void 0!==e&&e.env},updateSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){}}));t.a=o}).call(this,n(31))},,,function(e,t){var n,r,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(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:c}catch(e){r=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(r===clearTimeout)return clearTimeout(e);if((r===c||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new m(e,t)),1!==s.length||l||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){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 n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,n(t)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},,,,,,,function(e,t){e.exports=window.wp.warning},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t,n){var r=n(155);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(6).default,o=n(34);e.exports=function(e,t){return!t||"object"!==r(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 n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){},function(e,t){},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t),n.d(t,"TotalsItem",(function(){return V})),n.d(t,"Subtotal",(function(){return H})),n.d(t,"TotalsTaxes",(function(){return z})),n.d(t,"TotalsFees",(function(){return K})),n.d(t,"mustContain",(function(){return $})),n.d(t,"returnTrue",(function(){return G})),n.d(t,"extensionCartUpdate",(function(){return Z})),n.d(t,"hasValidFills",(function(){return ot})),n.d(t,"useSlot",(function(){return nt})),n.d(t,"createSlotFill",(function(){return it})),n.d(t,"__experimentalRegisterCheckoutFilters",(function(){return lt})),n.d(t,"__experimentalApplyCheckoutFilter",(function(){return ft})),n.d(t,"TotalsWrapper",(function(){return pt})),n.d(t,"hasInnerBlocks",(function(){return mt})),n.d(t,"getRegisteredBlocks",(function(){return ht})),n.d(t,"registerCheckoutBlock",(function(){return gt})),n.d(t,"innerBlockAreas",(function(){return ut})),n.d(t,"ExperimentalOrderMeta",(function(){return jt})),n.d(t,"ExperimentalDiscountsMeta",(function(){return kt})),n.d(t,"ExperimentalOrderShippingPackages",(function(){return Ct})),n.d(t,"Panel",(function(){return Bt})),n.d(t,"SlotFillProvider",(function(){return Ne})),n.d(t,"Button",(function(){return Pn})),n.d(t,"Label",(function(){return Tn}));var r=n(0),o=n(5),i=n.n(o),c=n(15),a=n.n(c),u=n(1),s=n.n(u),l=n(27),f=n.n(l),p=n(17),d=n.n(p);function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function 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,n,r,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 n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:O,resetWarningCache:y};return n.PropTypes=n,n}()}(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],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),i=o[0],c=o[1]||"";return{beforeDecimal:i,afterDecimal:c,hasNagation:n,addNegation:r}}function P(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function _(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function F(e,t,n){return Math.min(Math.max(e,t),n)}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})])},D={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}},N=function(e){function t(e){var n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n=!(r=b(t).call(this,e))||"object"!=typeof r&&"function"!=typeof r?g(this):r;var o=e.defaultValue;n.validateProps();var i=n.formatValueProp(o);return n.state={value:i,numAsString:n.removeFormatting(i)},n.selectionBeforeInput={selectionStart:0,selectionEnd:0},n.onChange=n.onChange.bind(g(n)),n.onKeyDown=n.onKeyDown.bind(g(n)),n.onMouseUp=n.onMouseUp.bind(g(n)),n.onFocus=n.onFocus.bind(g(n)),n.onBlur=n.onBlur.bind(g(n)),n}var n,r;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),n=t,(r=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,i=n.numAsString,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!==r||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:r})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,n=this.getSeparators(),r=n.decimalSeparator,o=this.getNumberRegex(!0),i="-"===e[0];i&&(e=e.replace("-","")),r&&0===t&&(e=e.split(r)[0]);var c=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==c&&(e="".concat(e.substring(0,c),".").concat(e.substring(c+1,e.length).replace(new RegExp(E(r),"g"),""))),i&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var n=this.props,r=n.format,o=n.decimalScale,i=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!i||0===o||t||r?"":"|"+E(i)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,n=t.thousandSeparator,r=t.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[e,"."]),{decimalSeparator:e,thousandSeparator:n,allowedDecimalSeparators:r}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,n=void 0===t?" ":t;return"string"==typeof n?n:n[e]||" "}},{key:"getValueObject",value:function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),n=t.decimalSeparator,r=t.thousandSeparator;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(r,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(n," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,n){_(e,t),setTimeout((function(){e.value===n&&_(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,c=r.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"===n&&t!==u||t-l<f-t?S(e[l])?l+1:l:f}},{key:"getCaretPosition",value:function(e,t,n){var r,o,i=this.props.format,c=this.state.value,a=this.getNumberRegex(!0),u=(e.match(a)||[]).join(""),s=(t.match(a)||[]).join("");for(r=0,o=0;o<n;o++){var l=e[o]||"",f=t[r]||"";if((l.match(a)||l===f)&&("0"!==l||!f.match(a)||"0"===f||u.length===s.length)){for(;l!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof i||c||(r=t.length),this.correctCaretPosition(t,r)}},{key:"removePrefixAndSuffix",value:function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var c=(e=r&&0===e.indexOf(r)?e.substring(r.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})),n=0,r="",o=0,i=t.length;o<=i;o++){var c=t[o]||"",a=o===i?e.length:e.indexOf(c,n);if(-1===a){r=e;break}r+=e.substring(n,a),n=a+c.length}return(r.match(/\d/g)||[]).join("")}},{key:"removeFormatting",value:function(e){var t=this.props,n=t.format,r=t.removeFormatting;return e?(n?e="string"==typeof n?this.removePatternFormatting(e):"function"==typeof r?r(e):(e.match(/\d/g)||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e}},{key:"formatWithPattern",value:function(e){for(var t=this.props.format,n=0,r=t.split(""),o=0,i=t.length;o<i;o++)"#"===t[o]&&(r[o]=e[n]||this.getMaskAtIndex(n),n+=1);return r.join("")}},{key:"formatAsNumber",value:function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,i=t.suffix,c=t.allowNegative,a=t.thousandsGroupStyle,u=this.getSeparators(),s=u.thousandSeparator,l=u.decimalSeparator,f=-1!==e.indexOf(".")||n&&r,p=k(e,c),d=p.beforeDecimal,m=p.afterDecimal,h=p.addNegation;return void 0!==n&&(m=P(m,n,r)),s&&(d=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;case"thousand":default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),o=e.search(/[1-9]/);return o=-1===o?e.length:o,e.substring(0,o)+e.substring(o,e.length).replace(r,"$1"+t)}(d,s,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,n=t.format,r=t.allowEmptyFormatting,o=e;return""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(o):"function"==typeof n?n(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,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&&!n&&"number"==typeof r&&(a=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-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,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=P(u[1]||"",Math.min(t,c.length),n),f=r?".":"";return"".concat(a?"-":"").concat(s).concat(f).concat(l)}(a,r,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,n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),o=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),o&&!i&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,c=n.decimalScale,a=n.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-i.length||c&&a&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;r<t;r++)if(this.isCharacterAFormat(r,n))return!0;return!1}},{key:"correctInputValue",value:function(e,t,n){var r=this.props,o=r.format,i=r.allowNegative,c=r.prefix,a=r.suffix,u=r.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 n=0,r=0,o=e.length,i=t.length;e[n]===t[n]&&n<o;)n++;for(;e[o-1-r]===t[i-1-r]&&i-r>n&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),v=b.start,g=b.end;if(!o&&v===g&&-1!==l.indexOf(n[m])){var y=0===u?"":f;return n.substr(0,m)+y+n.substr(m+1,n.length)}var O=o?0:c.length,w=t.length-(o?0:a.length);if(n.length>t.length||!n.length||v===g||0===m&&h===t.length||m===O&&h===w)return n;if(this.checkIfFormatGotDeleted(v,g,t)&&(n=t),!o){var j=this.removeFormatting(n),S=k(j,i),x=S.beforeDecimal,E=S.afterDecimal,P=S.addNegation,_=e<n.indexOf(f)+1;if(j.length<p.length&&_&&""===x&&!parseFloat(E))return P?"-":""}return n}},{key:"updateValue",value:function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition,o=void 0===r||r,i=e.numAsString,c=e.caretPos,a=this.props.onValueChange,u=this.state.value;if(n)if(o){if(!c){var s=e.inputValue||n.value,l=C(n);n.value=t,c=this.getCaretPosition(s,t,l)}this.setPatchedCaretPosition(n,c,t)}else n.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,n=t.value,r=this.state,o=this.props,i=o.isAllowed,c=r.value||"",a=C(t);n=this.correctInputValue(a,c,n);var u=this.formatInput(n)||"",s=this.removeFormatting(u);i(this.getValueObject(u,s))||(u=c),this.updateValue({formattedValue:u,numAsString:s,inputValue:n,input:t}),o.onChange(e)}},{key:"onBlur",value:function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,i=t.allowLeadingZeros,c=n.numAsString,a=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),!r){isNaN(parseFloat(c))&&(c=""),i||(c=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return"".concat(t?"-":"").concat(r).concat(o?".".concat(o):"")}(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,n=e.target,r=e.key,o=n.selectionStart,i=n.selectionEnd,c=n.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"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(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"===r||"ArrowRight"===r){var j="ArrowLeft"===r?"left":"right";y=this.correctCaretPosition(a,t,j)}else if("Delete"!==r||b.test(a[t])||v.test(a[t])){if("Backspace"===r&&!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:n})}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(n,y,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,a),m(e)}else m(e)}},{key:"onMouseUp",value:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value,i=void 0===o?"":o;if(n===r){var c=this.correctCaretPosition(i,n);c!==n&&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 n=e.target,r=n.selectionStart,o=n.selectionEnd,i=n.value,c=void 0===i?"":i,a=t.correctCaretPosition(c,r);a===r||0===r&&o===c.length||t.setPatchedCaretPosition(n,a,c),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,i=r.displayType,c=r.customInput,a=r.renderText,u=r.getInputRef,s=r.format,l=this.state.value,f=(e=this.props,t=T,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),p=h({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(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(n.prototype,r),t}(d.a.Component);N.propTypes=T,N.defaultProps=D;var R=N,M=(n(153),["className","value","currency","onValueChange","displayType"]);function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=function(e){var t=e.className,n=e.value,o=e.currency,c=e.onValueChange,u=e.displayType,s=void 0===u?"text":u,l=f()(e,M),p="string"==typeof n?parseInt(n,10):n;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=A(A(A({},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(r.createElement)(R,a()({className:m,displayType:s},h,{value:d,onValueChange:b}))},L=(n(151),function(e){var t=e.value,n=e.currency;return Object(r.isValidElement)(t)?Object(r.createElement)("div",{className:"wc-block-components-totals-item__value"},t):Number.isFinite(t)?Object(r.createElement)(B,{className:"wc-block-components-totals-item__value",currency:n||{},value:t}):null}),V=function(e){var t=e.className,n=e.currency,o=e.label,c=e.value,a=e.description;return Object(r.createElement)("div",{className:i()("wc-block-components-totals-item",t)},Object(r.createElement)("span",{className:"wc-block-components-totals-item__label"},o),Object(r.createElement)(L,{value:c,currency:n}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},a))},U=n(2),W=n(7),H=function(e){var t=e.currency,n=e.values,o=e.className,i=n.total_items,c=n.total_items_tax,a=parseInt(i,10),u=parseInt(c,10);return Object(r.createElement)(V,{className:o,currency:t,label:Object(U.__)("Subtotal",'woocommerce'),value:Object(W.getSetting)("displayCartPricesIncludingTax",!1)?a+u:a})},z=(n(154),function(e){var t=e.currency,n=e.values,o=e.className,c=e.showRateAfterTaxName,a=n.total_tax,u=n.tax_lines;if(!Object(W.getSetting)("taxesEnabled",!0)&&parseInt(a,10)<=0)return null;var s=Object(W.getSetting)("displayItemizedTaxes",!1),l=s&&u.length>0?Object(r.createElement)("div",{className:i()("wc-block-components-totals-taxes",o)},u.map((function(e,n){var o=e.name,i=e.rate,a=e.price,u="".concat(o).concat(c?" ".concat(i):"");return Object(r.createElement)(V,{key:"tax-line-".concat(n),className:"wc-block-components-totals-taxes__grouped-rate",currency:t,label:u,value:parseInt(a,10)})}))," "):null;return s?l:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(V,{className:i()("wc-block-components-totals-taxes",o),currency:t,label:Object(U.__)("Taxes",'woocommerce'),value:parseInt(a,10),description:null}))}),K=function(e){var t=e.currency,n=e.cartFees,o=e.className;return Object(r.createElement)(r.Fragment,null,n.map((function(e,n){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(r.createElement)(V,{key:c||"".concat(n,"-").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})})))},$=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},G=function(){return!0},q=n(10),Y=n(14),Z=function(e){return(0,Object(q.dispatch)(Y.c).applyExtensionCartUpdate)(e)},J=n(9),Q=n.n(J),X=n(11);function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var te=n(28);function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oe(e){var t=Object(r.useContext)(te.a),n=t.slots[e]||{},o=t.fills[e],i=Object(r.useMemo)((function(){return o||[]}),[o]),c=Object(r.useCallback)((function(n){t.updateSlot(e,n)}),[e,t.updateSlot]),a=Object(r.useCallback)((function(n){t.unregisterSlot(e,n)}),[e,t.unregisterSlot]),u=Object(r.useCallback)((function(n){t.registerFill(e,n)}),[e,t.registerFill]),s=Object(r.useCallback)((function(n){t.unregisterFill(e,n)}),[e,t.unregisterFill]);return re(re({},n),{},{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 n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ce(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function se(e,t,n){return t&&ue(e.prototype,t),n&&ue(e,n),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,n){return(pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fe(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}var de=n(44);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=n(6),be=n.n(he);function ve(e,t){return!t||"object"!==be()(t)&&"function"!=typeof t?le(e):t}var ge=n(4);function ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oe(e,t){if(e){if("string"==typeof e)return ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ye(e,t):void 0}}function we(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],_n=!0,c=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);_n=!0);}catch(e){c=!0,o=e}finally{try{_n||null==n.return||n.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=n(45),Ee=n.n(xe);function ke(e){var t=function(e,t){if("object"!==Se(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==Se(r))return r;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 n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fe(e){var t,n,o,i,c,a,u,s,l,f,p,d=e.children,m=(t=we(Object(r.useState)({}),2),n=t[0],o=t[1],i=we(Object(r.useState)({}),2),c=i[0],a=i[1],u=Object(r.useCallback)((function(e,t,n){o((function(r){var o=r[e]||{};return _e(_e({},r),{},ee({},e,_e(_e({},o),{},{ref:t||o.ref,fillProps:n||o.fillProps||{}})))}))}),[]),s=Object(r.useCallback)((function(e,t){o((function(n){var r=n[e],o=ce(n,[e].map(ke));return(null==r?void 0:r.ref)===t?o:n}))}),[]),l=Object(r.useCallback)((function(e,t){var r=n[e];if(r&&!Ee()(r.fillProps,t)){r.fillProps=t;var o=c[e];o&&o.map((function(e){return e.current.rerender()}))}}),[n,c]),f=Object(r.useCallback)((function(e,t){a((function(n){return _e(_e({},n),{},ee({},e,[].concat(je(n[e]||[]),[t])))}))}),[]),p=Object(r.useCallback)((function(e,t){a((function(n){return n[e]?_e(_e({},n),{},ee({},e,n[e].filter((function(e){return e!==t})))):n}))}),[]),Object(r.useMemo)((function(){return{slots:n,fills:c,registerSlot:u,updateSlot:l,unregisterSlot:s,registerFill:f,unregisterFill:p}}),[n,c,u,l,s,f,p]));return Object(r.createElement)(te.a.Provider,{value:m},d)}var Ce=Object(r.createContext)({registerSlot:function(){},unregisterSlot:function(){},registerFill:function(){},unregisterFill:function(){},getSlot:function(){},getFills:function(){},subscribe:function(){}}),Te=Ce.Provider,De=Ce.Consumer,Ne=function(e){me(i,e);var t,n,o=(t=i,n=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,r=fe(t);if(n){var o=fe(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.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 n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}},{key:"registerFill",value:function(e,t){this.fills[e]=[].concat(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(r.createElement)(Te,{value:this.contextValue},Object(r.createElement)(Fe,null,this.props.children))}}]),i}(r.Component);var Re=function(e){me(i,e);var t,n,o=(t=i,n=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,r=fe(t);if(n){var o=fe(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.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,n=t.name,r=t.unregisterSlot,o=t.registerSlot;e.name!==n&&(r(e.name),o(n,this))}},{key:"bindNode",value:function(e){this.node=e}},{key:"forceUpdate",value:function(){this.isUnmounted||pe(fe(i.prototype),"forceUpdate",this).call(this)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.name,o=e.fillProps,i=void 0===o?{}:o,c=e.getFills,a=Object(ge.map)(c(n,this),(function(e){var t=e.occurrence,n=Object(ge.isFunction)(e.children)?e.children(i):e.children;return r.Children.map(n,(function(e,n){if(!e||Object(ge.isString)(e))return e;var o="".concat(t,"---").concat(e.key||n);return Object(r.cloneElement)(e,{key:o})}))})).filter(Object(ge.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(ge.isFunction)(t)?t(a):a)}}]),i}(r.Component),Me=function(e){return Object(r.createElement)(De,null,(function(t){var n=t.registerSlot,o=t.unregisterSlot,i=t.getFills;return Object(r.createElement)(Re,ie({},e,{registerSlot:n,unregisterSlot:o,getFills:i}))}))},Ie=0;function Ae(e){var t=e.name,n=e.children,o=e.registerFill,i=e.unregisterFill,c=function(e){var t=Object(r.useContext)(Ce),n=t.getSlot,o=t.subscribe,i=we(Object(r.useState)(n(e)),2),c=i[0],a=i[1];return Object(r.useEffect)((function(){return a(n(e)),o((function(){a(n(e))}))}),[e]),c}(t),a=Object(r.useRef)({name:t,children:n});return a.current.occurrence||(a.current.occurrence=++Ie),Object(r.useLayoutEffect)((function(){return o(t,a.current),function(){return i(t,a.current)}}),[]),Object(r.useLayoutEffect)((function(){a.current.children=n,c&&c.forceUpdate()}),[n]),Object(r.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)(n)&&(n=n(c.props.fillProps)),Object(r.createPortal)(n,c.node)):null}var Be=function(e){return Object(r.createElement)(De,null,(function(t){var n=t.registerFill,o=t.unregisterFill;return Object(r.createElement)(Ae,ie({},e,{registerFill:n,unregisterFill:o}))}))};function Le(e){var t=e.name,n=e.fillProps,o=void 0===n?{}:n,i=e.as,c=void 0===i?"div":i,a=ce(e,["name","fillProps","as"]),u=Object(r.useContext)(te.a),s=Object(r.useRef)();return Object(r.useLayoutEffect)((function(){return u.registerSlot(t,s,o),function(){u.unregisterSlot(t,s)}}),[u.registerSlot,u.unregisterSlot,t]),Object(r.useLayoutEffect)((function(){u.updateSlot(t,o)})),Object(r.createElement)(c,ie({ref:s},a))}function Ve(e){var t,n=e.name,o=e.children,i=oe(n),c=Object(r.useRef)({rerender:(t=we(Object(r.useState)({}),2)[1],function(){return t({})})});return Object(r.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(r.createPortal)(o,i.ref.current)):null}function Ue(e){var t=e.bubblesVirtually,n=ce(e,["bubblesVirtually"]);return t?Object(r.createElement)(Le,n):Object(r.createElement)(Me,n)}function We(e){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Be,e),Object(r.createElement)(Ve,e))}function He(e){var t=function(t){return Object(r.createElement)(We,ie({name:e},t))};t.displayName=e+"Fill";var n=function(t){return Object(r.createElement)(Ue,ie({name:e},t))};return n.displayName=e+"Slot",{Fill:t,Slot:n}}var ze=n(23),Ke=n.n(ze),$e=n(24),Ge=n.n($e),qe=n(34),Ye=n.n(qe),Ze=n(46),Je=n.n(Ze),Qe=n(47),Xe=n.n(Qe),et=n(36),tt=n.n(et);var nt,rt=function(e){Je()(i,e);var t,n,o=(t=i,n=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,r=tt()(t);if(n){var o=tt()(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Xe()(this,e)});function i(){var e;Ke()(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e=o.call.apply(o,[this].concat(n)),s()(Ye()(e),"state",{errorMessage:"",hasError:!1}),e}return Ge()(i,[{key:"render",value:function(){var e=this.props.renderError,t=this.state,n=t.errorMessage;return t.hasError?"function"==typeof e?e(n):Object(r.createElement)("p",null,n):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("strong",null,e.status),": "+e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}}]),i}(p.Component),ot=function(e){return Array.isArray(e)&&e.filter(Boolean).length>0};nt=oe;var it=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=He(e),o=n.Fill,i=n.Slot,c=function(e){var n=e.children;return Object(r.createElement)(o,null,(function(e){return r.Children.map(n,(function(n){return Object(r.createElement)(rt,{renderError:W.CURRENT_USER_IS_ADMIN?t:function(){return null}},Object(r.cloneElement)(n,e))}))}))},u=function(e){return Object(r.createElement)(i,a()({},e,{bubblesVirtually:!0}))};return{Fill:c,Slot:u}};function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}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,n=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?G:u;return Object(r.useMemo)((function(){var e=function(e){return Object.keys(st).map((function(t){return st[t][e]})).filter(Boolean)}(t),r=n;return e.forEach((function(e){try{var t=e(r,i||{},a);if(be()(t)!==be()(r))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()(r),be()(t)));r=s(t)?t:r}catch(e){if(W.CURRENT_USER_IS_ADMIN)throw e;console.error(e)}})),r}),[t,n,i,a,s])},pt=(n(156),function(e){var t=e.children,n=e.slotWrapper,o=void 0!==n&&n;return p.Children.count(t)?Object(r.createElement)("div",{className:"wc-block-components-totals-wrapper".concat(o?" slot-wrapper":"")},t):null});!function(e){e.CHECKOUT="woocommerce/checkout",e.CHECKOUT_FIELDS="woocommerce/checkout-fields-block",e.CHECKOUT_TOTALS="woocommerce/checkout-totals-block",e.CONTACT_INFORMATION="woocommerce/checkout-contact-information-block",e.SHIPPING_ADDRESS="woocommerce/checkout-shipping-address-block",e.BILLING_ADDRESS="woocommerce/checkout-billing-address-block",e.SHIPPING_METHODS="woocommerce/checkout-shipping-methods-block",e.PAYMENT_METHODS="woocommerce/checkout-payment-methods-block",e.CART="woocommerce/cart-i2",e.EMPTY_CART="woocommerce/empty-cart-block",e.FILLED_CART="woocommerce/filled-cart-block",e.CART_ITEMS="woocommerce/cart-items-block",e.CART_TOTALS="woocommerce/cart-totals-block"}(ut||(ut={}));var dt={},mt=function(e){return Object.values(ut).includes(e)},ht=function(e){return mt(e)?Object.values(dt).filter((function(t){var n=t.metadata;return((null==n?void 0:n.parent)||[]).includes(e)})):[]},bt=n(48),vt=function(e){return!function(e){return null===e}(e)&&e instanceof Object&&e.constructor===Object},gt=function(e){var t,n,r,o;!function(e,t,n){if(vt(e)){var r=be()(e.metadata);if("object"!==r)throw new Error("Incorrect value for the ".concat("metadata"," argument when registering a block component. It was a ").concat(r,", but must be a ").concat("object","."))}}(e),function(e){if(function(e,t,n){var r=be()(t);if("string"!==r)throw new Error("Incorrect value for the ".concat("blockName"," argument when registering a checkout block. It was a ").concat(r,", but must be a ").concat("string","."))}(0,e),!e)throw new Error("Value for the blockName argument must not be empty.")}(e.metadata.name),function(e){if("string"!=typeof e&&!Array.isArray(e))throw new Error("Incorrect value for the parent argument when registering a checkout block. It was a ".concat(be()(e),", but must be a string or array of strings."));if("string"==typeof e&&!mt(e))throw new Error("When registering a checkout block, the parent must be a valid inner block area.");if(Array.isArray(e)&&!e.some((function(e){return mt(e)})))throw new Error("When registering a checkout block, the parent must be a valid inner block area.")}(e.metadata.parent),function(e,t){var n=e.component;if(n){if("function"==typeof n)return;if(vt(n)&&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."))}(e),Object(bt.registerBlockComponent)({blockName:e.metadata.name,component:e.component}),dt[e.metadata.name]={blockName:e.metadata.name,metadata:e.metadata,component:e.component,force:!(null===(t=e.metadata)||void 0===t||null===(n=t.attributes)||void 0===n||null===(r=n.lock)||void 0===r||null===(o=r.default)||void 0===o||!o.remove)}},yt=it("__experimentalOrderMeta"),Ot=yt.Fill,wt=yt.Slot;Ot.Slot=function(e){var t=e.className,n=e.extensions,o=e.cart,c=nt("__experimentalOrderMeta").fills;return ot(c)&&Object(r.createElement)(pt,{slotWrapper:!0},Object(r.createElement)(wt,{className:i()(t,"wc-block-components-order-meta"),fillProps:{extensions:n,cart:o}}))};var jt=Ot,St=it("__experimentalDiscountsMeta"),xt=St.Fill,Et=St.Slot;xt.Slot=function(e){var t=e.className,n=e.extensions,o=e.cart,c=nt("__experimentalDiscountsMeta").fills;return ot(c)&&Object(r.createElement)(pt,{slotWrapper:!0},Object(r.createElement)(Et,{className:i()(t,"wc-block-components-discounts-meta"),fillProps:{extensions:n,cart:o}}))};var kt=xt,Pt=it("__experimentalOrderShippingPackages"),_t=Pt.Fill,Ft=Pt.Slot;_t.Slot=function(e){var t=e.className,n=e.collapsible,o=e.noResultsMessage,c=e.renderOption,a=e.extensions,u=e.cart,s=e.components,l=nt("__experimentalOrderShippingPackages").fills.length>1;return Object(r.createElement)(Ft,{className:i()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:n,collapse:l,showItems:l,noResultsMessage:o,renderOption:c,extensions:a,cart:u,components:s}})};var Ct=_t,Tt=n(12),Dt=n.n(Tt),Nt=["srcElement","size"];function Rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Mt=function(e){var t=e.srcElement,n=e.size,o=void 0===n?24:n,i=f()(e,Nt);return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:o,height:o},i)):null},It=Object(r.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M12 8l-6 5.4 1 1.2 5-4.6 5 4.6 1-1.2z"})),At=Object(r.createElement)(X.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("path",{d:"M17 9.4L12 14 7 9.4l-1 1.2 6 5.4 6-5.4z"})),Bt=(n(157),function(e){var t=e.children,n=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(r.useState)(c),d=Dt()(p,2),m=d[0],h=d[1];return Object(r.createElement)("div",{className:i()(n,"wc-block-components-panel",{"has-border":u})},Object(r.createElement)(f,null,Object(r.createElement)("button",{"aria-expanded":m,className:"wc-block-components-panel__button",onClick:function(){return h(!m)}},Object(r.createElement)(Mt,{"aria-hidden":"true",className:"wc-block-components-panel__button-icon",srcElement:m?It:At}),s)),m&&Object(r.createElement)("div",{className:"wc-block-components-panel__content"},t))}),Lt=n(25),Vt=n(33),Ut=n(16),Wt=Object(r.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.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 Ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kt(e,t,n,r,o,i,c){var a=t.width,u="rtl"===document.documentElement.dir;"left"===n&&u?n="right":"right"===n&&u&&(n="left"),"left"===r&&u?r="right":"right"===r&&u&&(r="left");var s=Math.round(e.left+e.width/2),l={popoverLeft:s,contentWidth:(s-a/2>0?a/2:s)+(s+a/2>window.innerWidth?window.innerWidth-s:a/2)},f=e.left;"right"===r?f=e.right:"middle"!==i&&(f=s);var p=e.right;"left"===r?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=n,v=null;if(!o)if("center"===n&&l.contentWidth===a)b="center";else if("left"===n&&m.contentWidth===a)b="left";else if("right"===n&&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 $t(e,t,n,r,o,i,c){var a=t.height;if(o){var u=(Object(Lt.getScrollContainer)(i)||document.body).getBoundingClientRect().top+a-c;if(e.top<=u)return{yAxis:n,popoverTop:Math.min(e.bottom,u)}}var s=e.top+e.height/2;"bottom"===r?s=e.bottom:"top"===r&&(s=e.top);var l={popoverTop:s,contentHeight:(s-a/2>0?a/2:s)+(s+a/2>window.innerHeight?window.innerHeight-s:a/2)},f={popoverTop:e.top,contentHeight:e.top-10-a>0?a:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+a>window.innerHeight?window.innerHeight-10-e.bottom:a},d=n,m=null;if(!o)if("middle"===n&&l.contentHeight===a)d="middle";else if("top"===n&&f.contentHeight===a)d="top";else if("bottom"===n&&p.contentHeight===a)d="bottom";else{var 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 Gt=Object(r.createContext)({focusHistory:[]}),qt=Gt.Provider,Yt=Gt.Consumer;qt.displayName="FocusReturnProvider",Yt.displayName="FocusReturnConsumer",r.Component;var Zt=Object(Ut.createHigherOrderComponent)((function e(t){if((o=t)instanceof r.Component||"function"==typeof o){var n=t;return e({})(n)}var o,i=t.onFocusReturn,c=void 0===i?ge.stubTrue:i;return function(e){var t=function(t){me(a,t);var n,o,i=(n=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(n);if(o){var r=fe(this).constructor;e=Reflect.construct(t,arguments,r)}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,n=this.ownFocusedElements;if(t&&!1!==c())for(var r,o=[].concat(je(ge.without.apply(void 0,[this.props.focus.focusHistory].concat(je(n)))),[e]);r=o.pop();)if(document.body.contains(r))return void r.focus()}},{key:"render",value:function(){return Object(r.createElement)("div",{onFocus:this.setIsFocusedTrue,onBlur:this.setIsFocusedFalse},Object(r.createElement)(e,this.props.childProps))}}]),a}(r.Component);return function(e){return Object(r.createElement)(Yt,null,(function(n){return Object(r.createElement)(t,{childProps:e,focus:n})}))}}}),"withFocusReturn");var Jt=Object(Ut.createHigherOrderComponent)((function(e){return function(t){me(c,t);var n,o,i=(n=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(n);if(o){var r=fe(this).constructor;e=Reflect.construct(t,arguments,r)}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(r.createRef)(),e.handleTabBehaviour=e.handleTabBehaviour.bind(le(e)),e}return se(c,[{key:"handleTabBehaviour",value:function(e){if(e.keyCode===Vt.TAB){var t=Lt.focus.tabbable.find(this.focusContainRef.current);if(t.length){var n=t[0],r=t[t.length-1];e.shiftKey&&e.target===n?(e.preventDefault(),r.focus()):(e.shiftKey||e.target!==r)&&t.includes(e.target)||(e.preventDefault(),n.focus())}}}},{key:"render",value:function(){return Object(r.createElement)("div",{onKeyDown:this.handleTabBehaviour,ref:this.focusContainRef,tabIndex:"-1"},Object(r.createElement)(e,this.props))}}]),c}(r.Component)}),"withConstrainedTabbing");var Qt=["button","submit"];var Xt=Object(Ut.createHigherOrderComponent)((function(e){return function(t){me(c,t);var n,o,i=(n=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(n);if(o){var r=fe(this).constructor;e=Reflect.construct(t,arguments,r)}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,n=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)(Qt,e.type)}return!1}(n)&&(this.preventBlurCheck=!0)}},{key:"render",value:function(){return Object(r.createElement)("div",{onFocus:this.cancelBlurCheck,onMouseDown:this.normalizeButtonFocus,onMouseUp:this.normalizeButtonFocus,onTouchStart:this.normalizeButtonFocus,onTouchEnd:this.normalizeButtonFocus,onBlur:this.queueBlurCheck},Object(r.createElement)(e,ie({ref:this.bindNode},this.props)))}}]),c}(r.Component)}),"withFocusOutside")(function(e){me(o,e);var t,n,r=(t=o,n=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,r=fe(t);if(n){var o=fe(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return ve(this,e)});function o(){return ae(this,o),r.apply(this,arguments)}return se(o,[{key:"handleFocusOutside",value:function(e){this.props.onFocusOutside(e)}},{key:"render",value:function(){return this.props.children}}]),o}(r.Component));function en(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fe(e);if(t){var o=fe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ve(this,n)}}var tn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.htmlDocument,n=void 0===t?document:t,o=e.className,i=void 0===o?"lockscroll":o,c=0,a=0;function u(e){var t=n.scrollingElement||n.body;e&&(a=t.scrollTop);var r=e?"add":"remove";t.classList[r](i),n.documentElement.classList[r](i),e||(t.scrollTop=a)}function s(){0===c&&u(!0),++c}function l(){1===c&&u(!1),--c}return function(e){me(n,e);var t=en(n);function n(){return ae(this,n),t.apply(this,arguments)}return se(n,[{key:"componentDidMount",value:function(){s()}},{key:"componentWillUnmount",value:function(){l()}},{key:"render",value:function(){return null}}]),n}(r.Component)}();function nn(e){e.stopPropagation()}var rn=Object(r.forwardRef)((function(e,t){var n=e.children,o=ce(e,["children"]);return Object(r.createElement)("div",ie({},o,{ref:t,onMouseDown:nn}),n)}));function on(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?on(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):on(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function an(e){var t=e.type,n=e.origin,r=void 0===n?function(e){return"appear"===e?"top":"left"}(t):n;if("appear"===t){var o,c=we(r.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-"+r):"loading"===t?i()("components-animate__loading"):void 0}function un(e){var t=e.type,n=e.options,r=void 0===n?{}:n;return(0,e.children)({className:an(cn({type:t},r))})}var sn=Jt(Zt((function(e){return e.children})));function ln(e,t){var n,r=(n=t).ownerDocument.defaultView.getComputedStyle(n),o=r.paddingTop,i=r.paddingBottom,c=r.paddingLeft,a=r.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 fn(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function pn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==n&&(e.style[t]=n)}function dn(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}var mn=function(e){var t=e.headerTitle,n=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(r.useRef)(null),T=Object(r.useRef)(null),D=Object(r.useRef)(),N=Object(Ut.useViewportMatch)("medium","<"),R=we(Object(r.useState)(),2),M=R[0],I=R[1],A=oe(k),B=y&&N,L=we(Object(Ut.useResizeObserver)(),2),V=L[0],U=L[1];s=B||s,Object(r.useLayoutEffect)((function(){if(B)return dn(D.current,"is-without-arrow",s),dn(D.current,"is-alternate",l),fn(D.current,"data-x-axis"),fn(D.current,"data-y-axis"),pn(D.current,"top"),pn(D.current,"left"),pn(T.current,"maxHeight"),void pn(T.current,"maxWidth");var e=function(){if(D.current&&T.current){var e=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0;if(t)return t;if(n){if(!e.current)return;return n(e.current)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if(r instanceof window.Range)return Object(Lt.getRectangleFromRange)(r);if(r instanceof window.Element){var i=r.getBoundingClientRect();return o?i:ln(i,r)}var c=r.top,a=r.bottom,u=c.getBoundingClientRect(),s=a.getBoundingClientRect(),l=new window.DOMRect(u.left,u.top,u.width,s.bottom-u.top);return o?l:ln(l,r)}if(e.current){var f=e.current.parentNode,p=f.getBoundingClientRect();return o?p:ln(p,f)}}(C,v,g,h,b);if(e){var t,n,r=D.current,o=r.offsetParent,i=r.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===(n=D.current.closest(".popover-slot"))||void 0===n?void 0:n.parentNode);var u=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,a=n.split(" "),u=we(a,3),s=u[0],l=u[1],f=void 0===l?"center":l,p=u[2],d=$t(e,t,s,p,r,o,i),m=Kt(e,t,f,p,r,d.yAxis,c);return zt(zt({},m),d)}(e,U.height?U:T.current.getBoundingClientRect(),p,x,D.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&&(pn(D.current,"top",f+"px"),pn(D.current,"left",d+"px")),dn(D.current,"is-without-arrow",s||"center"===m&&"middle"===y),dn(D.current,"is-alternate",l),fn(D.current,"data-x-axis",m),fn(D.current,"data-y-axis",y),pn(T.current,"maxHeight","number"==typeof O?O+"px":""),pn(T.current,"maxWidth","number"==typeof w?w+"px":""),I(({left:"right",right:"left"}[m]||"center")+" "+({top:"bottom",bottom:"top"}[y]||"middle"))}}};e();var t,n,r=window.setInterval(e,500),o=function(){window.cancelAnimationFrame(t),t=window.requestAnimationFrame(e)};return window.addEventListener("click",o),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),P&&(n=new window.MutationObserver(e)).observe(P,{attributes:!0}),function(){window.clearInterval(r),window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0),window.removeEventListener("click",o),window.cancelAnimationFrame(t),n&&n.disconnect()}}),[B,v,g,h,b,p,U,x,P,_]),function(e,t){Object(r.useEffect)((function(){var n=setTimeout((function(){if(e&&t.current)if("firstElement"!==e)"container"===e&&t.current.focus();else{var n=Lt.focus.tabbable.find(t.current)[0];n?n.focus():t.current.focus()}}),0);return function(){return clearTimeout(n)}}),[])}(m,T);var W=function(e){e.keyCode===Vt.ESCAPE&&n&&(e.stopPropagation(),n()),o&&o(e)},H=Object(r.createElement)(Xt,{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 n&&n()}},Object(r.createElement)(un,{type:w&&M?"appear":null,options:{origin:M}},(function(e){var o=e.className;return Object(r.createElement)(rn,ie({className:i()("components-popover",a,o,{"is-expanded":B,"is-without-arrow":s,"is-alternate":l})},F,{onKeyDown:W,ref:D}),B&&Object(r.createElement)(tn,null),B&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},t),Object(r.createElement)(xn,{className:"components-popover__close",icon:Wt,onClick:n})),Object(r.createElement)("div",{ref:T,className:"components-popover__content",tabIndex:"-1"},Object(r.createElement)("div",{style:{position:"relative"}},V,c)))})));return m&&(H=Object(r.createElement)(sn,null,H)),A.ref&&(H=Object(r.createElement)(We,{name:k},H)),h||v?H:Object(r.createElement)("span",{ref:C},H)};mn.Slot=function(e){var t=e.name,n=void 0===t?"Popover":t;return Object(r.createElement)(Ue,{bubblesVirtually:!0,name:n,className:"popover-slot"})};var hn=mn,bn=function(e){var t,n,o=e.shortcut,i=e.className;return o?(Object(ge.isString)(o)&&(t=o),Object(ge.isObject)(o)&&(t=o.display,n=o.ariaLabel),Object(r.createElement)("span",{className:i,"aria-label":n},t)):null};var vn=function(e){me(i,e);var t,n,o=(t=i,n=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,r=fe(t);if(n){var o=fe(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.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 n=this.props.children;if(1===r.Children.count(n)){var o=r.Children.only(n);"function"==typeof o.props[e]&&o.props[e](t)}}},{key:"createToggleIsOver",value:function(e,t){var n=this;return function(r){if(n.emitToChild(e,r),!(r.currentTarget.disabled||"focus"===r.type&&n.isInMouseDown)){n.delayedSetIsOver.cancel();var o=Object(ge.includes)(["focus","mouseenter"],r.type);o!==n.state.isOver&&(t?n.delayedSetIsOver(o):n.setState({isOver:o}))}}}},{key:"createSetIsMouseDown",value:function(e){var t=this;return function(n){t.emitToChild(e?"onMouseDown":"onMouseUp",n),document[e?"addEventListener":"removeEventListener"]("mouseup",t.cancelIsMouseDown),t.isInMouseDown=e}}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.position,o=e.text,i=e.shortcut;if(1!==r.Children.count(t))return t;var c=r.Children.only(t),a=this.state.isOver;return Object(r.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(r.concatChildren)(c.props.children,a&&Object(r.createElement)(hn,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,Object(r.createElement)(bn,{className:"components-tooltip__shortcut",shortcut:i})))})}}]),i}(r.Component),gn=function(e){var t=e.icon,n=e.className,o=ce(e,["icon","className"]),i=["dashicon","dashicons","dashicons-"+t,n].filter(Boolean).join(" ");return Object(r.createElement)("span",ie({className:i},o))};function yn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wn=function(e){var t=e.icon,n=void 0===t?null:t,o=e.size,i=ce(e,["icon","size"]);if("string"==typeof n)return Object(r.createElement)(gn,ie({icon:n},i));if(n&&gn===n.type)return Object(r.cloneElement)(n,On({},i));var c=o||24;if("function"==typeof n)return n.prototype instanceof r.Component?Object(r.createElement)(n,On({size:c},i)):n(On({size:c},i));if(n&&("svg"===n.type||n.type===X.SVG)){var a=On(On({width:c,height:c},n.props),i);return Object(r.createElement)(X.SVG,a)}return Object(r.isValidElement)(n)?Object(r.cloneElement)(n,On({size:c},i)):n};function jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Sn=["onMouseDown","onClick"],xn=Object(r.forwardRef)((function(e,t){var n=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===n||P?"button":"a",F="a"===_?{href:n,target:o}:{type:"button",disabled:P,"aria-pressed":s};if(b&&x){F["aria-disabled"]=!0;var C,T=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return jn(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jn(e,void 0):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,c=!0,a=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){a=!0,i=e},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw i}}}}(Sn);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 D=!P&&(y&&j||w||!!j&&(!S||Object(ge.isArray)(S)&&!S.length)&&!1!==y),N=Object(r.createElement)(_,ie({},F,E,{className:k,"aria-label":E["aria-label"]||j,ref:t}),v&&Object(r.createElement)(wn,{icon:v,size:g}),S);return D?Object(r.createElement)(vn,{text:j,shortcut:w,position:O},N):N})),En=(n(159),function(){return Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}),kn=(n(158),["className","showSpinner","children"]),Pn=function(e){var t=e.className,n=e.showSpinner,o=void 0!==n&&n,c=e.children,u=f()(e,kn),s=i()("wc-block-components-button",t,{"wc-block-components-button--loading":o});return Object(r.createElement)(xn,a()({className:s},u),o&&Object(r.createElement)(En,null),Object(r.createElement)("span",{className:"wc-block-components-button__text"},c))};function Fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fn(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tn=function(e){var t,n=e.label,o=e.screenReaderLabel,c=e.wrapperElement,a=e.wrapperProps,u=void 0===a?{}:a,s=null!=n,l=null!=o;return!s&&l?(t=c||"span",u=Cn(Cn({},u),{},{className:i()(u.className,"screen-reader-text")}),Object(r.createElement)(t,u,o)):(t=c||r.Fragment,s&&l&&n!==o?Object(r.createElement)(t,u,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,u,n))}}]); |