Your IP : 216.73.216.164


Current Path : /var/www/html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/
Upload File :
Current File : /var/www/html/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/blocks-checkout.js

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=148)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wp.data},function(e,t){e.exports=window.wc.wcSettings},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 a=o.apply(null,r);a&&e.push(a)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var c in r)n.call(r,c)&&r[c]&&e.push(c);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){e.exports=window.lodash},,function(e,t){e.exports=window.wp.deprecated},function(e,t){e.exports=window.wp.primitives},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var r=n(1);const o="wc/store/cart",i={code:"cart_api_error",message:Object(r.__)("Unable to get cart data from the API.","woocommerce"),data:{status:500}}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t){e.exports=window.React},function(e,t){e.exports=window.wp.compose},function(e,t){e.exports=window.wp.isShallowEqual},,function(e,t){e.exports=window.wc.wcBlocksData},,,,function(e,t){e.exports=window.wc.wcBlocksRegistry},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.__esModule=!0,e.exports.default=e.exports},,function(e,t,n){"use strict";(function(e){var r=n(0);n(39);const o=Object(r.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,n(28))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>null===e},,,,function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,l=[],u=!1,p=-1;function m(){u&&s&&(u=!1,s.length?l=s.concat(l):p=-1,l.length&&f())}function f(){if(!u){var e=c(m);u=!0;for(var t=l.length;t;){for(s=l,l=[];++p<t;)s&&s[p].run();p=-1,t=l.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(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];l.push(new d(e,t)),1!==l.length||u||c(f)},d.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){},,,function(e,t){e.exports=window.wp.warning},function(e,t){e.exports=window.wp.dom},function(e,t){e.exports=window.wp.a11y},function(e,t,n){e.exports=function(){"use strict";function e(t){return(e="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})(t)}function t(e,n){return(t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,n)}function n(){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 r(e,o,i){return(r=n()?Reflect.construct:function(e,n,r){var o=[null];o.push.apply(o,n);var i=new(Function.bind.apply(e,o));return r&&t(i,r.prototype),i}).apply(null,arguments)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(e,void 0):void 0}}(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 i(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 a=Object.hasOwnProperty,c=Object.setPrototypeOf,s=Object.isFrozen,l=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,p=Object.freeze,m=Object.seal,f=Object.create,d="undefined"!=typeof Reflect&&Reflect,h=d.apply,b=d.construct;h||(h=function(e,t,n){return e.apply(t,n)}),p||(p=function(e){return e}),m||(m=function(e){return e}),b||(b=function(e,t){return r(e,o(t))});var g,v=_(Array.prototype.forEach),y=_(Array.prototype.pop),O=_(Array.prototype.push),w=_(String.prototype.toLowerCase),E=_(String.prototype.match),j=_(String.prototype.replace),S=_(String.prototype.indexOf),x=_(String.prototype.trim),N=_(RegExp.prototype.test),k=(g=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return b(g,t)});function _(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return h(e,t,r)}}function T(e,t,n){n=n||w,c&&c(e,null);for(var r=t.length;r--;){var o=t[r];if("string"==typeof o){var i=n(o);i!==o&&(s(t)||(t[r]=i),o=i)}e[o]=!0}return e}function C(e){var t,n=f(null);for(t in e)h(a,e,[t])&&(n[t]=e[t]);return n}function A(e,t){for(;null!==e;){var n=u(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=l(e)}return function(e){return console.warn("fallback value for",e),null}}var R=p(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),F=p(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D=p(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=p(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=p(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),I=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=p(["#text"]),U=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),B=p(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),V=p(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),H=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),z=m(/\{\{[\w\W]*|[\w\W]*\}\}/gm),W=m(/<%[\w\W]*|[\w\W]*%>/gm),G=m(/^data-[\-\w.\u00B7-\uFFFF]/),$=m(/^aria-[\-\w]+$/),K=m(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=m(/^(?:\w+script|data):/i),q=m(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=m(/^html$/i),X=function(){return"undefined"==typeof window?null:window},J=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null;n.currentScript&&n.currentScript.hasAttribute("data-tt-policy-suffix")&&(r=n.currentScript.getAttribute("data-tt-policy-suffix"));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X(),r=function(e){return t(e)};if(r.version="2.4.0",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var i=n.document,a=n.document,c=n.DocumentFragment,s=n.HTMLTemplateElement,l=n.Node,u=n.Element,m=n.NodeFilter,f=n.NamedNodeMap,d=void 0===f?n.NamedNodeMap||n.MozNamedAttrMap:f,h=n.HTMLFormElement,b=n.DOMParser,g=n.trustedTypes,_=u.prototype,Q=A(_,"cloneNode"),ee=A(_,"nextSibling"),te=A(_,"childNodes"),ne=A(_,"parentNode");if("function"==typeof s){var re=a.createElement("template");re.content&&re.content.ownerDocument&&(a=re.content.ownerDocument)}var oe=J(g,i),ie=oe?oe.createHTML(""):"",ae=a,ce=ae.implementation,se=ae.createNodeIterator,le=ae.createDocumentFragment,ue=ae.getElementsByTagName,pe=i.importNode,me={};try{me=C(a).documentMode?a.documentMode:{}}catch(e){}var fe={};r.isSupported="function"==typeof ne&&ce&&void 0!==ce.createHTMLDocument&&9!==me;var de,he,be=z,ge=W,ve=G,ye=$,Oe=Y,we=q,Ee=K,je=null,Se=T({},[].concat(o(R),o(F),o(D),o(L),o(P))),xe=null,Ne=T({},[].concat(o(U),o(B),o(V),o(H))),ke=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_e=null,Te=null,Ce=!0,Ae=!0,Re=!1,Fe=!1,De=!1,Me=!1,Le=!1,Ie=!1,Pe=!1,Ue=!1,Be=!0,Ve=!1,He="user-content-",ze=!0,We=!1,Ge={},$e=null,Ke=T({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ye=null,qe=T({},["audio","video","img","source","image","track"]),Ze=null,Xe=T({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=["application/xhtml+xml","text/html"],ot="text/html",it=null,at=a.createElement("form"),ct=function(e){return e instanceof RegExp||e instanceof Function},st=function(t){it&&it===t||(t&&"object"===e(t)||(t={}),t=C(t),de=de=-1===rt.indexOf(t.PARSER_MEDIA_TYPE)?ot:t.PARSER_MEDIA_TYPE,he="application/xhtml+xml"===de?function(e){return e}:w,je="ALLOWED_TAGS"in t?T({},t.ALLOWED_TAGS,he):Se,xe="ALLOWED_ATTR"in t?T({},t.ALLOWED_ATTR,he):Ne,Ze="ADD_URI_SAFE_ATTR"in t?T(C(Xe),t.ADD_URI_SAFE_ATTR,he):Xe,Ye="ADD_DATA_URI_TAGS"in t?T(C(qe),t.ADD_DATA_URI_TAGS,he):qe,$e="FORBID_CONTENTS"in t?T({},t.FORBID_CONTENTS,he):Ke,_e="FORBID_TAGS"in t?T({},t.FORBID_TAGS,he):{},Te="FORBID_ATTR"in t?T({},t.FORBID_ATTR,he):{},Ge="USE_PROFILES"in t&&t.USE_PROFILES,Ce=!1!==t.ALLOW_ARIA_ATTR,Ae=!1!==t.ALLOW_DATA_ATTR,Re=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Fe=t.SAFE_FOR_TEMPLATES||!1,De=t.WHOLE_DOCUMENT||!1,Ie=t.RETURN_DOM||!1,Pe=t.RETURN_DOM_FRAGMENT||!1,Ue=t.RETURN_TRUSTED_TYPE||!1,Le=t.FORCE_BODY||!1,Be=!1!==t.SANITIZE_DOM,Ve=t.SANITIZE_NAMED_PROPS||!1,ze=!1!==t.KEEP_CONTENT,We=t.IN_PLACE||!1,Ee=t.ALLOWED_URI_REGEXP||Ee,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&ct(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ct(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(ke.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fe&&(Ae=!1),Pe&&(Ie=!0),Ge&&(je=T({},o(P)),xe=[],!0===Ge.html&&(T(je,R),T(xe,U)),!0===Ge.svg&&(T(je,F),T(xe,B),T(xe,H)),!0===Ge.svgFilters&&(T(je,D),T(xe,B),T(xe,H)),!0===Ge.mathMl&&(T(je,L),T(xe,V),T(xe,H))),t.ADD_TAGS&&(je===Se&&(je=C(je)),T(je,t.ADD_TAGS,he)),t.ADD_ATTR&&(xe===Ne&&(xe=C(xe)),T(xe,t.ADD_ATTR,he)),t.ADD_URI_SAFE_ATTR&&T(Ze,t.ADD_URI_SAFE_ATTR,he),t.FORBID_CONTENTS&&($e===Ke&&($e=C($e)),T($e,t.FORBID_CONTENTS,he)),ze&&(je["#text"]=!0),De&&T(je,["html","head","body"]),je.table&&(T(je,["tbody"]),delete _e.tbody),p&&p(t),it=t)},lt=T({},["mi","mo","mn","ms","mtext"]),ut=T({},["foreignobject","desc","title","annotation-xml"]),pt=T({},["title","style","font","a","script"]),mt=T({},F);T(mt,D),T(mt,M);var ft=T({},L);T(ft,I);var dt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=w(e.tagName),r=w(t.tagName);return e.namespaceURI===Qe?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===r||lt[r]):Boolean(mt[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Qe?"math"===n&&ut[r]:Boolean(ft[n]):e.namespaceURI===et&&!(t.namespaceURI===Qe&&!ut[r])&&!(t.namespaceURI===Je&&!lt[r])&&!ft[n]&&(pt[n]||!mt[n])},ht=function(e){O(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ie}catch(t){e.remove()}}},bt=function(e,t){try{O(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){O(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!xe[e])if(Ie||Pe)try{ht(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},gt=function(e){var t,n;if(Le)e="<remove></remove>"+e;else{var r=E(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===de&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=oe?oe.createHTML(e):e;if(tt===et)try{t=(new b).parseFromString(o,de)}catch(e){}if(!t||!t.documentElement){t=ce.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":o}catch(e){}}var i=t.body||t.documentElement;return e&&n&&i.insertBefore(a.createTextNode(n),i.childNodes[0]||null),tt===et?ue.call(t,De?"html":"body")[0]:De?t.documentElement:i},vt=function(e){return se.call(e.ownerDocument||e,e,m.SHOW_ELEMENT|m.SHOW_COMMENT|m.SHOW_TEXT,null,!1)},yt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},Ot=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},wt=function(e,t,n){fe[e]&&v(fe[e],(function(e){e.call(r,t,n,it)}))},Et=function(e){var t;if(wt("beforeSanitizeElements",e,null),yt(e))return ht(e),!0;if(N(/[\u0080-\uFFFF]/,e.nodeName))return ht(e),!0;var n=he(e.nodeName);if(wt("uponSanitizeElement",e,{tagName:n,allowedTags:je}),e.hasChildNodes()&&!Ot(e.firstElementChild)&&(!Ot(e.content)||!Ot(e.content.firstElementChild))&&N(/<[/\w]/g,e.innerHTML)&&N(/<[/\w]/g,e.textContent))return ht(e),!0;if("select"===n&&N(/<template/i,e.innerHTML))return ht(e),!0;if(!je[n]||_e[n]){if(!_e[n]&&St(n)){if(ke.tagNameCheck instanceof RegExp&&N(ke.tagNameCheck,n))return!1;if(ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))return!1}if(ze&&!$e[n]){var o=ne(e)||e.parentNode,i=te(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(Q(i[a],!0),ee(e))}return ht(e),!0}return e instanceof u&&!dt(e)?(ht(e),!0):"noscript"!==n&&"noembed"!==n||!N(/<\/no(script|embed)/i,e.innerHTML)?(Fe&&3===e.nodeType&&(t=e.textContent,t=j(t,be," "),t=j(t,ge," "),e.textContent!==t&&(O(r.removed,{element:e.cloneNode()}),e.textContent=t)),wt("afterSanitizeElements",e,null),!1):(ht(e),!0)},jt=function(e,t,n){if(Be&&("id"===t||"name"===t)&&(n in a||n in at))return!1;if(Ae&&!Te[t]&&N(ve,t));else if(Ce&&N(ye,t));else if(!xe[t]||Te[t]){if(!(St(e)&&(ke.tagNameCheck instanceof RegExp&&N(ke.tagNameCheck,e)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(e))&&(ke.attributeNameCheck instanceof RegExp&&N(ke.attributeNameCheck,t)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(t))||"is"===t&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&N(ke.tagNameCheck,n)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(n))))return!1}else if(Ze[t]);else if(N(Ee,j(n,we,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!Ye[e])if(Re&&!N(Oe,j(n,we,"")));else if(n)return!1;return!0},St=function(e){return e.indexOf("-")>0},xt=function(t){var n,o,i,a;wt("beforeSanitizeAttributes",t,null);var c=t.attributes;if(c){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:xe};for(a=c.length;a--;){var l=n=c[a],u=l.name,p=l.namespaceURI;if(o="value"===u?n.value:x(n.value),i=he(u),s.attrName=i,s.attrValue=o,s.keepAttr=!0,s.forceKeepAttr=void 0,wt("uponSanitizeAttribute",t,s),o=s.attrValue,!s.forceKeepAttr&&(bt(u,t),s.keepAttr))if(N(/\/>/i,o))bt(u,t);else{Fe&&(o=j(o,be," "),o=j(o,ge," "));var m=he(t.nodeName);if(jt(m,i,o)){if(!Ve||"id"!==i&&"name"!==i||(bt(u,t),o=He+o),oe&&"object"===e(g)&&"function"==typeof g.getAttributeType)if(p);else switch(g.getAttributeType(m,i)){case"TrustedHTML":o=oe.createHTML(o);break;case"TrustedScriptURL":o=oe.createScriptURL(o)}try{p?t.setAttributeNS(p,u,o):t.setAttribute(u,o),y(r.removed)}catch(e){}}}}wt("afterSanitizeAttributes",t,null)}},Nt=function e(t){var n,r=vt(t);for(wt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)wt("uponSanitizeShadowNode",n,null),Et(n)||(n.content instanceof c&&e(n.content),xt(n));wt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(t){var o,a,s,u,p,m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((nt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Ot(t)){if("function"!=typeof t.toString)throw k("toString is not a function");if("string"!=typeof(t=t.toString()))throw k("dirty is not a string, aborting")}if(!r.isSupported){if("object"===e(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof t)return n.toStaticHTML(t);if(Ot(t))return n.toStaticHTML(t.outerHTML)}return t}if(Me||st(m),r.removed=[],"string"==typeof t&&(We=!1),We){if(t.nodeName){var f=he(t.nodeName);if(!je[f]||_e[f])throw k("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)1===(a=(o=gt("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?o=a:o.appendChild(a);else{if(!Ie&&!Fe&&!De&&-1===t.indexOf("<"))return oe&&Ue?oe.createHTML(t):t;if(!(o=gt(t)))return Ie?null:Ue?ie:""}o&&Le&&ht(o.firstChild);for(var d=vt(We?t:o);s=d.nextNode();)3===s.nodeType&&s===u||Et(s)||(s.content instanceof c&&Nt(s.content),xt(s),u=s);if(u=null,We)return t;if(Ie){if(Pe)for(p=le.call(o.ownerDocument);o.firstChild;)p.appendChild(o.firstChild);else p=o;return xe.shadowroot&&(p=pe.call(i,p,!0)),p}var h=De?o.outerHTML:o.innerHTML;return De&&je["!doctype"]&&o.ownerDocument&&o.ownerDocument.doctype&&o.ownerDocument.doctype.name&&N(Z,o.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+o.ownerDocument.doctype.name+">\n"+h),Fe&&(h=j(h,be," "),h=j(h,ge," ")),oe&&Ue?oe.createHTML(h):h},r.setConfig=function(e){st(e),Me=!0},r.clearConfig=function(){it=null,Me=!1},r.isValidAttribute=function(e,t,n){it||st({});var r=he(e),o=he(t);return jt(r,o,n)},r.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],O(fe[e],t))},r.removeHook=function(e){if(fe[e])return y(fe[e])},r.removeHooks=function(e){fe[e]&&(fe[e]=[])},r.removeAllHooks=function(){fe={}},r}()}()},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>"string"==typeof e},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(24);const o=e=>!Object(r.a)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return o(e)&&t in e}},,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,function(e,t,n){"use strict";n.r(t),n.d(t,"TotalsItem",(function(){return N})),n.d(t,"Subtotal",(function(){return T})),n.d(t,"TotalsTaxes",(function(){return C})),n.d(t,"TotalsFees",(function(){return A})),n.d(t,"TotalsWrapper",(function(){return R})),n.d(t,"ExperimentalOrderMeta",(function(){return me})),n.d(t,"ExperimentalDiscountsMeta",(function(){return he})),n.d(t,"ExperimentalOrderShippingPackages",(function(){return ve})),n.d(t,"Panel",(function(){return Ee})),n.d(t,"Button",(function(){return qe})),n.d(t,"Label",(function(){return Ze})),n.d(t,"StoreNoticesContainer",(function(){return ct})),n.d(t,"CheckboxControl",(function(){return lt})),n.d(t,"ValidatedTextInput",(function(){return ht})),n.d(t,"TextInput",(function(){return mt})),n.d(t,"ValidationInputError",(function(){return dt})),n.d(t,"mustContain",(function(){return bt})),n.d(t,"extensionCartUpdate",(function(){return vt})),n.d(t,"hasValidFills",(function(){return ce})),n.d(t,"useSlot",(function(){return se})),n.d(t,"createSlotFill",(function(){return le})),n.d(t,"__experimentalRegisterCheckoutFilters",(function(){return jt})),n.d(t,"__experimentalApplyCheckoutFilter",(function(){return kt})),n.d(t,"hasInnerBlocks",(function(){return Ct})),n.d(t,"getRegisteredBlocks",(function(){return At})),n.d(t,"registerCheckoutBlock",(function(){return Ft})),n.d(t,"innerBlockAreas",(function(){return _t})),n.d(t,"SlotFillProvider",(function(){return te}));var r=n(0),o=n(4),i=n.n(o),a=n(9),c=n.n(a),s=n(12),l=n.n(s);function u(){}function p(e){return!!(e||"").match(/\d/)}function m(e){return null==e}function f(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function d(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split(".");return{beforeDecimal:o[0],afterDecimal:o[1]||"",hasNagation:n,addNegation:r}}function h(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function b(e,t){return Array(t+1).join(e)}function g(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 v(e,t,n){return Math.min(Math.max(e,t),n)}function y(e){return Math.max(e.selectionStart,e.selectionEnd)}var O={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:u,onChange:u,onKeyDown:u,onMouseUp:u,onFocus:u,onBlur:u,isAllowed:function(){return!0}},w=function(e){function t(t){e.call(this,t);var n=t.defaultValue;this.validateProps();var r=this.formatValueProp(n);this.state={value:r,numAsString:this.removeFormatting(r),mounted:!1},this.selectionBeforeInput={selectionStart:0,selectionEnd:0},this.onChange=this.onChange.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.componentDidMount=function(){this.setState({mounted:!0})},t.prototype.componentDidUpdate=function(e){this.updateValueIfRequired(e)},t.prototype.componentWillUnmount=function(){clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout)},t.prototype.updateValueIfRequired=function(e){var t=this.props,n=this.state,r=this.focusedElm,o=n.value,i=n.numAsString;if(void 0===i&&(i=""),e!==t){this.validateProps();var a=this.formatNumString(i),c=m(t.value)?a:this.formatValueProp(),s=this.removeFormatting(c),l=parseFloat(s),u=parseFloat(i);(isNaN(l)&&isNaN(u)||l===u)&&a===o&&(null!==r||c===o)||this.updateValue({formattedValue:c,numAsString:s,input:r,source:"prop",event:null})}},t.prototype.getFloatString=function(e){void 0===e&&(e="");var t=this.props.decimalScale,n=this.getSeparators().decimalSeparator,r=this.getNumberRegex(!0),o="-"===e[0];o&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var i=(e=(e.match(r)||[]).join("").replace(n,".")).indexOf(".");return-1!==i&&(e=e.substring(0,i)+"."+e.substring(i+1,e.length).replace(new RegExp(f(n),"g"),"")),o&&(e="-"+e),e},t.prototype.getNumberRegex=function(e,t){var n=this.props,r=n.format,o=n.decimalScale,i=n.customNumerals,a=this.getSeparators().decimalSeparator;return new RegExp("[0-9"+(i?i.join(""):"")+"]"+(!a||0===o||t||r?"":"|"+f(a)),e?"g":void 0)},t.prototype.getSeparators=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}},t.prototype.getMaskAtIndex=function(e){var t=this.props.mask;return void 0===t&&(t=" "),"string"==typeof t?t:t[e]||" "},t.prototype.getValueObject=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},t.prototype.validateProps=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: "+r+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n          decimalSeparator: '+n+" (default value for decimalSeparator is .)\n       ");if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n          Mask "+e+" should not contain numeric character;\n        ")},t.prototype.setPatchedCaretPosition=function(e,t,n){g(e,t),this.caretPositionTimeout=setTimeout((function(){e.value===n&&g(e,t)}),0)},t.prototype.correctCaretPosition=function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,a=r.format;if(""===e)return 0;if(t=v(t,0,e.length),!a){var c="-"===e[0];return v(t,o.length+(c?1:0),e.length-i.length)}if("function"==typeof a)return t;if("#"===a[t]&&p(e[t]))return t;if("#"===a[t-1]&&p(e[t-1]))return t;var s=a.indexOf("#");t=v(t,s,a.lastIndexOf("#")+1);for(var l=a.substring(t,a.length).indexOf("#"),u=t,m=t+(-1===l?0:l);u>s&&("#"!==a[u]||!p(e[u]));)u-=1;return!p(e[m])||"left"===n&&t!==s||t-u<m-t?p(e[u])?u+1:u:m},t.prototype.getCaretPosition=function(e,t,n){var r,o,i=this.props.format,a=this.state.value,c=this.getNumberRegex(!0),s=(e.match(c)||[]).join(""),l=(t.match(c)||[]).join("");for(r=0,o=0;o<n;o++){var u=e[o]||"",p=t[r]||"";if((u.match(c)||u===p)&&("0"!==u||!p.match(c)||"0"===p||s.length===l.length)){for(;u!==t[r]&&r<t.length;)r++;r++}}return"string"!=typeof i||a||(r=t.length),this.correctCaretPosition(t,r)},t.prototype.removePrefixAndSuffix=function(e){var t=this.props,n=t.format,r=t.prefix,o=t.suffix;if(!n&&e){var i="-"===e[0];i&&(e=e.substring(1,e.length));var a=(e=r&&0===e.indexOf(r)?e.substring(r.length,e.length):e).lastIndexOf(o);e=o&&-1!==a&&a===e.length-o.length?e.substring(0,a):e,i&&(e="-"+e)}return e},t.prototype.removePatternFormatting=function(e){for(var t=this.props.format.split("#").filter((function(e){return""!==e})),n=0,r="",o=0,i=t.length;o<=i;o++){var a=t[o]||"",c=o===i?e.length:e.indexOf(a,n);if(-1===c){r=e;break}r+=e.substring(n,c),n=c+a.length}return(r.match(this.getNumberRegex(!0))||[]).join("")},t.prototype.removeFormatting=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(this.getNumberRegex(!0))||[]).join(""):(e=this.removePrefixAndSuffix(e),e=this.getFloatString(e)),e):e},t.prototype.formatWithPattern=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("")},t.prototype.formatAsNumber=function(e){var t=this.props,n=t.decimalScale,r=t.fixedDecimalScale,o=t.prefix,i=t.suffix,a=t.allowNegative,c=t.thousandsGroupStyle,s=this.getSeparators(),l=s.thousandSeparator,u=s.decimalSeparator,p=-1!==e.indexOf(".")||n&&r,m=d(e,a),f=m.beforeDecimal,b=m.afterDecimal,g=m.addNegation;return void 0!==n&&(b=h(b,n,r)),l&&(f=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)}(f,l,c)),o&&(f=o+f),i&&(b+=i),g&&(f="-"+f),f+(p&&u||"")+b},t.prototype.formatNumString=function(e){void 0===e&&(e="");var t=this.props,n=t.format,r=t.allowEmptyFormatting,o=t.customNumerals,i=e;if(o&&10===o.length){var a=new RegExp("["+o.join("")+"]","g");i=e.replace(a,(function(e){return o.indexOf(e).toString()}))}return""!==e||r?"-"!==e||n?"string"==typeof n?this.formatWithPattern(i):"function"==typeof n?n(i):this.formatAsNumber(i):"-":""},t.prototype.formatValueProp=function(e){var t=this.props,n=t.format,r=t.decimalScale,o=t.fixedDecimalScale,i=t.allowEmptyFormatting,a=this.props,c=a.value,s=a.isNumericString,l=!(c=m(c)?e:c)&&0!==c;return l&&i&&(c=""),l&&!i?"":("number"==typeof c&&(c=function(e){var t="-"===(e+="")[0]?"-":"";t&&(e=e.substring(1));var n=e.split(/[eE]/g),r=n[0],o=n[1];if(!(o=Number(o)))return t+r;var i=1+o,a=(r=r.replace(".","")).length;return i<0?r="0."+b("0",Math.abs(i))+r:i>=a?r+=b("0",i-a):r=(r.substring(0,i)||"0")+"."+r.substring(i),t+r}(c),s=!0),"Infinity"===c&&s&&(c=""),s&&!n&&"number"==typeof r&&(c=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=d(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNagation,s=parseFloat("0."+(a||"0")),l=(a.length<=t?"0."+a:s.toFixed(t)).split(".");return(c?"-":"")+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}),l[0])+(r?".":"")+h(l[1]||"",Math.min(t,a.length),n)}(c,r,o)),s?this.formatNumString(c):this.formatInput(c))},t.prototype.formatNegation=function(e){void 0===e&&(e="");var 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},t.prototype.formatInput=function(e){return void 0===e&&(e=""),this.props.format||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)},t.prototype.isCharacterAFormat=function(e,t){var n=this.props,r=n.format,o=n.prefix,i=n.suffix,a=n.decimalScale,c=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e<o.length||e>=t.length-i.length||a&&c&&t[e]===s))},t.prototype.correctInputValue=function(e,t,n){var r=this,o=this.props,i=o.format,a=o.allowNegative,c=o.prefix,s=o.suffix,l=o.decimalScale,u=this.getSeparators(),p=u.allowedDecimalSeparators,m=u.decimalSeparator,f=this.state.numAsString||"",h=this.selectionBeforeInput,b=h.selectionStart,g=h.selectionEnd,v=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),y=v.start,O=v.end;if(!i&&y===O&&-1!==p.indexOf(n[b])){var w=0===l?"":m;return n.substr(0,b)+w+n.substr(b+1,n.length)}var E=i?0:c.length,j=t.length-(i?0:s.length);if(n.length>t.length||!n.length||y===O||0===b&&g===t.length||0===y&&O===t.length||b===E&&g===j)return n;var S=t.substr(y,O-y);if([].concat(S).find((function(e,n){return r.isCharacterAFormat(n+y,t)}))){var x=t.substr(y),N={},k=[];[].concat(x).forEach((function(e,n){r.isCharacterAFormat(n+y,t)?N[n]=e:n>S.length-1&&k.push(e)})),Object.keys(N).forEach((function(e){k.length>e?k.splice(e,0,N[e]):k.push(N[e])})),n=t.substr(0,y)+k.join("")}if(!i){var _=this.removeFormatting(n),T=d(_,a),C=T.beforeDecimal,A=T.afterDecimal,R=T.addNegation,F=e<n.indexOf(m)+1;if(_.length<f.length&&F&&""===C&&!parseFloat(A))return R?"-":""}return n},t.prototype.updateValue=function(e){var t=e.formattedValue,n=e.input,r=e.setCaretPosition;void 0===r&&(r=!0);var o=e.source,i=e.event,a=e.numAsString,c=e.caretPos,s=this.props.onValueChange,l=this.state.value;if(n){if(void 0===c&&r){var u=e.inputValue||n.value,p=y(n);n.value=t,c=this.getCaretPosition(u,t,p)}n.value=t,r&&this.setPatchedCaretPosition(n,c,t)}void 0===a&&(a=this.removeFormatting(t)),t!==l&&(this.setState({value:t,numAsString:a}),s(this.getValueObject(t,a),{event:i,source:o}))},t.prototype.onChange=function(e){var t=e.target,n=t.value,r=this.state,o=this.props,i=o.isAllowed,a=r.value||"",c=y(t);n=this.correctInputValue(c,a,n);var s=this.formatInput(n)||"",l=this.removeFormatting(s),u=i(this.getValueObject(s,l));u||(s=a),this.updateValue({formattedValue:s,numAsString:l,inputValue:n,input:t,event:e,source:"event"}),u&&o.onChange(e)},t.prototype.onBlur=function(e){var t=this.props,n=this.state,r=t.format,o=t.onBlur,i=t.allowLeadingZeros,a=n.numAsString,c=n.value;if(this.focusedElm=null,clearTimeout(this.focusTimeout),clearTimeout(this.caretPositionTimeout),!r){isNaN(parseFloat(a))&&(a=""),i||(a=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",o=n[1]||"";return(t?"-":"")+r+(o?"."+o:"")}(a));var s=this.formatNumString(a);if(s!==c)return this.updateValue({formattedValue:s,numAsString:a,input:e.target,setCaretPosition:!1,event:e,source:"event"}),void o(e)}o(e)},t.prototype.onKeyDown=function(e){var t,n=e.target,r=e.key,o=n.selectionStart,i=n.selectionEnd,a=n.value;void 0===a&&(a="");var c=this.props,s=c.decimalScale,l=c.fixedDecimalScale,u=c.prefix,p=c.suffix,m=c.format,f=c.onKeyDown,d=void 0!==s&&l,h=this.getNumberRegex(!1,d),b=new RegExp("-"),g="string"==typeof m;if(this.selectionBeforeInput={selectionStart:o,selectionEnd:i},"ArrowLeft"===r||"Backspace"===r?t=o-1:"ArrowRight"===r?t=o+1:"Delete"===r&&(t=o),void 0!==t&&o===i){var v=t,y=g?m.indexOf("#"):u.length,O=g?m.lastIndexOf("#")+1:a.length-p.length;if("ArrowLeft"===r||"ArrowRight"===r){var w="ArrowLeft"===r?"left":"right";v=this.correctCaretPosition(a,t,w)}else if("Delete"!==r||h.test(a[t])||b.test(a[t])){if("Backspace"===r&&!h.test(a[t]))if(o<=y+1&&"-"===a[0]&&void 0===m){var E=a.substring(1);this.updateValue({formattedValue:E,caretPos:v,input:n,event:e,source:"event"})}else if(!b.test(a[t])){for(;!h.test(a[v-1])&&v>y;)v--;v=this.correctCaretPosition(a,v,"left")}}else for(;!h.test(a[v])&&v<O;)v++;(v!==t||t<y||t>O)&&(e.preventDefault(),this.setPatchedCaretPosition(n,v,a)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,v,a),f(e)}else f(e)},t.prototype.onMouseUp=function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,o=t.value;if(void 0===o&&(o=""),n===r){var i=this.correctCaretPosition(o,n);i!==n&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)},t.prototype.onFocus=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;void 0===i&&(i="");var a=t.correctCaretPosition(i,r);a===r||0===r&&o===i.length||t.setPatchedCaretPosition(n,a,i),t.props.onFocus(e)}),0)},t.prototype.render=function(){var e=this.props,t=e.type,n=e.displayType,r=e.customInput,o=e.renderText,i=e.getInputRef,a=e.format,c=(e.thousandSeparator,e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle,e.decimalScale,e.fixedDecimalScale,e.prefix,e.suffix,e.removeFormatting,e.mask,e.defaultValue,e.isNumericString,e.allowNegative,e.allowEmptyFormatting,e.allowLeadingZeros,e.onValueChange,e.isAllowed,e.customNumerals,e.onChange,e.onKeyDown,e.onMouseUp,e.onFocus,e.onBlur,e.value,function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&-1===t.indexOf(r)&&(n[r]=e[r]);return n}(e,["type","displayType","customInput","renderText","getInputRef","format","thousandSeparator","decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","decimalScale","fixedDecimalScale","prefix","suffix","removeFormatting","mask","defaultValue","isNumericString","allowNegative","allowEmptyFormatting","allowLeadingZeros","onValueChange","isAllowed","customNumerals","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value"])),s=this.state,u=s.value,p=s.mounted&&function(e){return e||"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(a)?"numeric":void 0,m=Object.assign({inputMode:p},c,{type:t,value:u,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===n)return o?o(u,c)||null:l.a.createElement("span",Object.assign({},c,{ref:i}),u);if(r){var f=r;return l.a.createElement(f,Object.assign({},m,{ref:i}))}return l.a.createElement("input",Object.assign({},m,{ref:i}))},t}(l.a.Component);w.defaultProps=O;var E=w;n(139);const j=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});var S=e=>{let{className:t,value:n,currency:o,onValueChange:a,displayType:s="text",...l}=e;const u="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(u))return null;const p=u/10**o.minorUnit;if(!Number.isFinite(p))return null;const m=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),f={...l,...j(o),value:void 0,currency:void 0,onValueChange:void 0},d=a?e=>{const t=+e.value*10**o.minorUnit;a(t)}:()=>{};return Object(r.createElement)(E,c()({className:m,displayType:s},f,{value:p,onValueChange:d}))};n(138);const x=e=>{let{value:t,currency:n}=e;return Object(r.isValidElement)(t)?Object(r.createElement)("div",{className:"wc-block-components-totals-item__value"},t):Number.isFinite(t)?Object(r.createElement)(S,{className:"wc-block-components-totals-item__value",currency:n||{},value:t}):null};var N=e=>{let{className:t,currency:n,label:o,value:a,description:c}=e;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)(x,{value:a,currency:n}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},c))},k=n(1),_=n(3),T=e=>{let{currency:t,values:n,className:o}=e;const{total_items:i,total_items_tax:a}=n,c=parseInt(i,10),s=parseInt(a,10);return Object(r.createElement)(N,{className:o,currency:t,label:Object(k.__)("Subtotal","woocommerce"),value:Object(_.getSetting)("displayCartPricesIncludingTax",!1)?c+s:c})},C=e=>{let{currency:t,values:n,className:o,showRateAfterTaxName:a}=e;const{total_tax:c,tax_lines:s}=n;if(!Object(_.getSetting)("taxesEnabled",!0)&&parseInt(c,10)<=0)return null;const l=Object(_.getSetting)("displayItemizedTaxes",!1),u=l&&s.length>0?Object(r.createElement)(r.Fragment,null,s.map((e,n)=>{let{name:c,rate:s,price:l}=e;const u=`${c}${a?" "+s:""}`;return Object(r.createElement)(N,{key:"tax-line-"+n,className:i()("wc-block-components-totals-taxes",o),currency:t,label:u,value:parseInt(l,10)})})," "):null;return l?u:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(N,{className:i()("wc-block-components-totals-taxes",o),currency:t,label:Object(k.__)("Taxes","woocommerce"),value:parseInt(c,10),description:null}))},A=e=>{let{currency:t,cartFees:n,className:o}=e;return Object(r.createElement)(r.Fragment,null,n.map((e,n)=>{let{id:a,name:c,totals:s}=e;const l=parseInt(s.total,10);if(!l)return null;const u=parseInt(s.total_tax,10);return Object(r.createElement)(N,{key:a||`${n}-${c}`,className:i()("wc-block-components-totals-fees",o),currency:t,label:c||Object(k.__)("Fee","woocommerce"),value:Object(_.getSetting)("displayCartPricesIncludingTax",!1)?l+u:l})}))};n(140);var R=e=>{let{children:t,slotWrapper:n=!1,className:o}=e;return s.Children.count(t)?Object(r.createElement)("div",{className:i()(o,"wc-block-components-totals-wrapper",{"slot-wrapper":n})},t):null},F=n(7),D=n.n(F),M=n(8),L=n(23);function I(e){const t=Object(r.useContext)(L.a),n=t.slots[e]||{},o=t.fills[e],i=Object(r.useMemo)(()=>o||[],[o]);return{...n,updateSlot:Object(r.useCallback)(n=>{t.updateSlot(e,n)},[e,t.updateSlot]),unregisterSlot:Object(r.useCallback)(n=>{t.unregisterSlot(e,n)},[e,t.unregisterSlot]),fills:i,registerFill:Object(r.useCallback)(n=>{t.registerFill(e,n)},[e,t.registerFill]),unregisterFill:Object(r.useCallback)(n=>{t.unregisterFill(e,n)},[e,t.unregisterFill])}}var P=n(11),U=n(5),B=Object(r.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function V({name:e,children:t,registerFill:n,unregisterFill:o}){const i=(e=>{const{getSlot:t,subscribe:n}=Object(r.useContext)(B),[o,i]=Object(r.useState)(t(e));return Object(r.useEffect)(()=>(i(t(e)),n(()=>{i(t(e))})),[e]),o})(e),a=Object(r.useRef)({name:e,children:t});return Object(r.useLayoutEffect)(()=>(n(e,a.current),()=>o(e,a.current)),[]),Object(r.useLayoutEffect)(()=>{a.current.children=t,i&&i.forceUpdate()},[t]),Object(r.useLayoutEffect)(()=>{e!==a.current.name&&(o(a.current.name,a.current),a.current.name=e,n(e,a.current))},[e]),i&&i.node?(Object(U.isFunction)(t)&&(t=t(i.props.fillProps)),Object(r.createPortal)(t,i.node)):null}var H=e=>Object(r.createElement)(B.Consumer,null,({registerFill:t,unregisterFill:n})=>Object(r.createElement)(V,Object(P.a)({},e,{registerFill:t,unregisterFill:n})));class z extends r.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:n,registerSlot:r}=this.props;e.name!==t&&(n(e.name),r(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:n={},getFills:o}=this.props,i=Object(U.map)(o(t,this),e=>{const t=Object(U.isFunction)(e.children)?e.children(n):e.children;return r.Children.map(t,(e,t)=>{if(!e||Object(U.isString)(e))return e;const n=e.key||t;return Object(r.cloneElement)(e,{key:n})})}).filter(Object(U.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(U.isFunction)(e)?e(i):i)}}var W=e=>Object(r.createElement)(B.Consumer,null,({registerSlot:t,unregisterSlot:n,getFills:o})=>Object(r.createElement)(z,Object(P.a)({},e,{registerSlot:t,unregisterSlot:n,getFills:o})));function G(){const[,e]=Object(r.useState)({}),t=Object(r.useRef)(!0);return Object(r.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function $({name:e,children:t}){const n=I(e),o=Object(r.useRef)({rerender:G()});return Object(r.useEffect)(()=>(n.registerFill(o),()=>{n.unregisterFill(o)}),[n.registerFill,n.unregisterFill]),n.ref&&n.ref.current?("function"==typeof t&&(t=t(n.fillProps)),Object(r.createPortal)(t,n.ref.current)):null}var K=n(13),Y=Object(r.forwardRef)((function({name:e,fillProps:t={},as:n="div",...o},i){const a=Object(r.useContext)(L.a),c=Object(r.useRef)();return Object(r.useLayoutEffect)(()=>(a.registerSlot(e,c,t),()=>{a.unregisterSlot(e,c)}),[a.registerSlot,a.unregisterSlot,e]),Object(r.useLayoutEffect)(()=>{a.updateSlot(e,t)}),Object(r.createElement)(n,Object(P.a)({ref:Object(K.useMergeRefs)([i,c])},o))})),q=n(14),Z=n.n(q);function X({children:e}){const t=function(){const[e,t]=Object(r.useState)({}),[n,o]=Object(r.useState)({}),i=Object(r.useCallback)((e,n,r)=>{t(t=>{const o=t[e]||{};return{...t,[e]:{...o,ref:n||o.ref,fillProps:r||o.fillProps||{}}}})},[]),a=Object(r.useCallback)((e,n)=>{t(t=>{const{[e]:r,...o}=t;return(null==r?void 0:r.ref)===n?o:t})},[]),c=Object(r.useCallback)((t,r)=>{const o=e[t];if(o&&!Z()(o.fillProps,r)){o.fillProps=r;const e=n[t];e&&e.map(e=>e.current.rerender())}},[e,n]),s=Object(r.useCallback)((e,t)=>{o(n=>({...n,[e]:[...n[e]||[],t]}))},[]),l=Object(r.useCallback)((e,t)=>{o(n=>n[e]?{...n,[e]:n[e].filter(e=>e!==t)}:n)},[]);return Object(r.useMemo)(()=>({slots:e,fills:n,registerSlot:i,updateSlot:c,unregisterSlot:a,registerFill:s,unregisterFill:l}),[e,n,i,c,a,s,l])}();return Object(r.createElement)(L.a.Provider,{value:t},e)}class J extends r.Component{constructor(){super(...arguments),this.registerSlot=this.registerSlot.bind(this),this.registerFill=this.registerFill.bind(this),this.unregisterSlot=this.unregisterSlot.bind(this),this.unregisterFill=this.unregisterFill.bind(this),this.getSlot=this.getSlot.bind(this),this.getFills=this.getFills.bind(this),this.hasFills=this.hasFills.bind(this),this.subscribe=this.subscribe.bind(this),this.slots={},this.fills={},this.listeners=[],this.contextValue={registerSlot:this.registerSlot,unregisterSlot:this.unregisterSlot,registerFill:this.registerFill,unregisterFill:this.unregisterFill,getSlot:this.getSlot,getFills:this.getFills,hasFills:this.hasFills,subscribe:this.subscribe}}registerSlot(e,t){const n=this.slots[e];this.slots[e]=t,this.triggerListeners(),this.forceUpdateSlot(e),n&&n.forceUpdate()}registerFill(e,t){this.fills[e]=[...this.fills[e]||[],t],this.forceUpdateSlot(e)}unregisterSlot(e,t){this.slots[e]===t&&(delete this.slots[e],this.triggerListeners())}unregisterFill(e,t){this.fills[e]=Object(U.without)(this.fills[e],t),this.forceUpdateSlot(e)}getSlot(e){return this.slots[e]}getFills(e,t){return this.slots[e]!==t?[]:this.fills[e]}hasFills(e){return this.fills[e]&&!!this.fills[e].length}forceUpdateSlot(e){const t=this.getSlot(e);t&&t.forceUpdate()}triggerListeners(){this.listeners.forEach(e=>e())}subscribe(e){return this.listeners.push(e),()=>{this.listeners=Object(U.without)(this.listeners,e)}}render(){return Object(r.createElement)(B.Provider,{value:this.contextValue},this.props.children)}}function Q(e){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(H,e),Object(r.createElement)($,e))}const ee=Object(r.forwardRef)(({bubblesVirtually:e,...t},n)=>e?Object(r.createElement)(Y,Object(P.a)({},t,{ref:n})):Object(r.createElement)(W,t));function te({children:e,...t}){return Object(r.createElement)(J,t,Object(r.createElement)(X,null,e))}function ne(e){const t=t=>Object(r.createElement)(Q,Object(P.a)({name:e},t));t.displayName=e+"Fill";const n=t=>Object(r.createElement)(ee,Object(P.a)({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}var re=n(21),oe=n.n(re);class ie extends s.Component{constructor(){super(...arguments),oe()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(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}}render(){const{renderError:e}=this.props,{errorMessage:t,hasError:n}=this.state;return n?"function"==typeof e?e(t):Object(r.createElement)("p",null,t):this.props.children}}var ae=ie;const ce=e=>Array.isArray(e)&&e.filter(Boolean).length>0;let se;se=I;const le=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{Fill:n,Slot:o}=ne(e),i=e=>{let{children:o}=e;return Object(r.createElement)(n,null,e=>r.Children.map(o,n=>Object(r.createElement)(ae,{renderError:_.CURRENT_USER_IS_ADMIN?t:()=>null},Object(r.cloneElement)(n,e))))},a=e=>Object(r.createElement)(o,c()({},e,{bubblesVirtually:!0}));return{Fill:i,Slot:a}},{Fill:ue,Slot:pe}=le("__experimentalOrderMeta");ue.Slot=e=>{let{className:t,extensions:n,cart:o,context:a}=e;const{fills:c}=se("__experimentalOrderMeta");return ce(c)&&Object(r.createElement)(R,{slotWrapper:!0},Object(r.createElement)(pe,{className:i()(t,"wc-block-components-order-meta"),fillProps:{extensions:n,cart:o,context:a}}))};var me=ue;const{Fill:fe,Slot:de}=le("__experimentalDiscountsMeta");fe.Slot=e=>{let{className:t,extensions:n,cart:o,context:a}=e;const{fills:c}=se("__experimentalDiscountsMeta");return ce(c)&&Object(r.createElement)(R,{slotWrapper:!0},Object(r.createElement)(de,{className:i()(t,"wc-block-components-discounts-meta"),fillProps:{extensions:n,cart:o,context:a}}))};var he=fe;const{Fill:be,Slot:ge}=le("__experimentalOrderShippingPackages");be.Slot=e=>{let{className:t,collapsible:n,noResultsMessage:o,renderOption:a,extensions:c,cart:s,components:l,context:u,shippingRates:p}=e;const{fills:m}=se("__experimentalOrderShippingPackages"),f=m.length>1||(null==p?void 0:p.length)>1;return Object(r.createElement)(ge,{className:i()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:n,collapse:f,showItems:f,noResultsMessage:o,renderOption:a,extensions:c,cart:s,components:l,context:u}})};var ve=be,ye=function(e){let{icon:t,size:n=24,...o}=e;return Object(r.cloneElement)(t,{width:n,height:n,...o})},Oe=Object(r.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(M.Path,{d:"M6.5 12.4L12 8l5.5 4.4-.9 1.2L12 10l-4.5 3.6-1-1.2z"})),we=Object(r.createElement)(M.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(M.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"}));n(141);var Ee=e=>{let{children:t,className:n,initialOpen:o=!1,hasBorder:a=!1,title:c,titleTag:s="div"}=e;const[l,u]=Object(r.useState)(o);return Object(r.createElement)("div",{className:i()(n,"wc-block-components-panel",{"has-border":a})},Object(r.createElement)(s,null,Object(r.createElement)("button",{"aria-expanded":l,className:"wc-block-components-panel__button",onClick:()=>u(!l)},Object(r.createElement)(ye,{"aria-hidden":"true",className:"wc-block-components-panel__button-icon",icon:l?Oe:we}),c)),l&&Object(r.createElement)("div",{className:"wc-block-components-panel__content"},t))},je=n(40),Se=Object(r.createElement)(M.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(M.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 xe(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const i=o.getBoundingClientRect();return new r.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let Ne=0;function ke(e){const t=document.scrollingElement||document.body;e&&(Ne=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=Ne)}let _e=0;function Te(){return Object(r.useEffect)(()=>(0===_e&&ke(!0),++_e,()=>{1===_e&&ke(!1),--_e}),[]),null}function Ce(e){return"appear"===e?"top":"left"}function Ae(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:i}=(a=t).ownerDocument.defaultView.getComputedStyle(a);var a;const c=n?parseInt(n,10):0,s=r?parseInt(r,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+c,width:e.width-l-u,height:e.height-c-s,left:e.left+l,right:e.right-u,top:e.top+c,bottom:e.bottom-s}}function Re(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Fe(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function De(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const Me=Object(r.forwardRef)(({headerTitle:e,onClose:t,children:n,className:o,noArrow:a=!0,isAlternate:c,position:s="bottom right",range:l,focusOnMount:u="firstElement",anchorRef:p,shouldAnchorIncludePadding:m,anchorRect:f,getAnchorRect:d,expandOnMobile:h,animate:b=!0,onClickOutside:g,onFocusOutside:v,__unstableStickyBoundaryElement:y,__unstableSlotName:O="Popover",__unstableObserveElement:w,__unstableBoundaryParent:E,__unstableForcePosition:j,__unstableForceXAlignment:S,...x},N)=>{const _=Object(r.useRef)(null),T=Object(r.useRef)(null),C=Object(r.useRef)(),A=Object(K.useViewportMatch)("medium","<"),[R,F]=Object(r.useState)(),M=I(O),L=h&&A,[U,B]=Object(K.useResizeObserver)();a=L||a,Object(r.useLayoutEffect)(()=>{if(L)return De(C.current,"is-without-arrow",a),De(C.current,"is-alternate",c),Re(C.current,"data-x-axis"),Re(C.current,"data-y-axis"),Fe(C.current,"top"),Fe(C.current,"left"),Fe(T.current,"maxHeight"),void Fe(T.current,"maxWidth");const e=()=>{if(!C.current||!T.current)return;let e=function(e,t,n,r=!1,o,i){if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return xe(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return xe(Object(je.getRectangleFromRange)(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=xe(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:Ae(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),c=xe(new window.DOMRect(n.left,n.top,n.width,a.bottom-n.top),e.ownerDocument,i);return o?c:Ae(c,r)}if(!e.current)return;const{parentNode:a}=e.current,c=a.getBoundingClientRect();return o?c:Ae(c,a)}(_,f,d,p,m,C.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=C.current;let r,o=0;if(t&&t!==n.body){const n=t.getBoundingClientRect();o=n.top,e=new window.DOMRect(e.left-n.left,e.top-n.top,e.width,e.height)}var i;E&&(r=null===(i=C.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const l=B.height?B:T.current.getBoundingClientRect(),{popoverTop:u,popoverLeft:h,xAxis:b,yAxis:g,contentHeight:v,contentWidth:O}=function(e,t,n="top",r,o,i,a,c,s){const[l,u="center",p]=n.split(" "),m=function(e,t,n,r,o,i,a,c){const{height:s}=t;if(o){const t=o.getBoundingClientRect().top+s-a;if(e.top<=t)return{yAxis:n,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===r?l=e.bottom:"top"===r&&(l=e.top);const u={popoverTop:l,contentHeight:(l-s/2>0?s/2:l)+(l+s/2>window.innerHeight?window.innerHeight-l:s/2)},p={popoverTop:e.top,contentHeight:e.top-10-s>0?s:e.top-10},m={popoverTop:e.bottom,contentHeight:e.bottom+10+s>window.innerHeight?window.innerHeight-10-e.bottom:s};let f,d=n,h=null;if(!o&&!c)if("middle"===n&&u.contentHeight===s)d="middle";else if("top"===n&&p.contentHeight===s)d="top";else if("bottom"===n&&m.contentHeight===s)d="bottom";else{d=p.contentHeight>m.contentHeight?"top":"bottom";const e="top"===d?p.contentHeight:m.contentHeight;h=e!==s?e:null}return f="middle"===d?u.popoverTop:"top"===d?p.popoverTop:m.popoverTop,{yAxis:d,popoverTop:f,contentHeight:h}}(e,t,l,p,r,0,i,c);return{...function(e,t,n,r,o,i,a,c,s){const{width:l}=t;"left"===n&&Object(k.isRTL)()?n="right":"right"===n&&Object(k.isRTL)()&&(n="left"),"left"===r&&Object(k.isRTL)()?r="right":"right"===r&&Object(k.isRTL)()&&(r="left");const u=Math.round(e.left+e.width/2),p={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let m=e.left;"right"===r?m=e.right:"middle"===i||s||(m=u);let f=e.right;"left"===r?f=e.left:"middle"===i||s||(f=u);const d={popoverLeft:m,contentWidth:m-l>0?l:m},h={popoverLeft:f,contentWidth:f+l>window.innerWidth?window.innerWidth-f:l};let b,g=n,v=null;if(!o&&!c)if("center"===n&&p.contentWidth===l)g="center";else if("left"===n&&d.contentWidth===l)g="left";else if("right"===n&&h.contentWidth===l)g="right";else{g=d.contentWidth>h.contentWidth?"left":"right";const e="left"===g?d.contentWidth:h.contentWidth;l>window.innerWidth&&(v=window.innerWidth),e!==l&&(g="center",p.popoverLeft=window.innerWidth/2)}if(b="center"===g?p.popoverLeft:"left"===g?d.popoverLeft:h.popoverLeft,a){const e=a.getBoundingClientRect();b=Math.min(b,e.right-l),Object(k.isRTL)()||(b=Math.max(b,0))}return{xAxis:g,popoverLeft:b,contentWidth:v}}(e,t,u,p,r,m.yAxis,a,c,s),...m}}(e,l,s,y,C.current,o,r,j,S);"number"==typeof u&&"number"==typeof h&&(Fe(C.current,"top",u+"px"),Fe(C.current,"left",h+"px")),De(C.current,"is-without-arrow",a||"center"===b&&"middle"===g),De(C.current,"is-alternate",c),Re(C.current,"data-x-axis",b),Re(C.current,"data-y-axis",g),Fe(T.current,"maxHeight","number"==typeof v?v+"px":""),Fe(T.current,"maxWidth","number"==typeof O?O+"px":""),F(({left:"right",right:"left"}[b]||"center")+" "+({top:"bottom",bottom:"top"}[g]||"middle"))};e();const{ownerDocument:t}=C.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const i=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",i),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const l=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(p);let u;return l&&l!==t&&(l.defaultView.addEventListener("resize",e),l.defaultView.addEventListener("scroll",e,!0)),w&&(u=new n.MutationObserver(e),u.observe(w,{attributes:!0})),()=>{n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",i),n.cancelAnimationFrame(o),l&&l!==t&&(l.defaultView.removeEventListener("resize",e),l.defaultView.removeEventListener("scroll",e,!0)),u&&u.disconnect()}},[L,f,d,p,m,s,B,y,w,E]);const V=(e,n)=>{if("focus-outside"===e&&v)v(n);else if("focus-outside"===e&&g){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>n.relatedTarget}),D()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),g(e)}else t&&t()},[H,z]=Object(K.__experimentalUseDialog)({focusOnMount:u,__unstableOnClose:V,onClose:V}),W=Object(K.useMergeRefs)([C,H,N]),G=Boolean(b&&R)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:n=Ce(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return i()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?i()("components-animate__slide-in","is-from-"+n):void 0}({type:"appear",origin:R});let $=Object(r.createElement)("div",Object(P.a)({className:i()("components-popover",o,G,{"is-expanded":L,"is-without-arrow":a,"is-alternate":c})},x,{ref:W},z,{tabIndex:"-1"}),L&&Object(r.createElement)(Te,null),L&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},e),Object(r.createElement)(Ke,{className:"components-popover__close",icon:Se,onClick:t})),Object(r.createElement)("div",{ref:T,className:"components-popover__content"},Object(r.createElement)("div",{style:{position:"relative"}},U,n)));return M.ref&&($=Object(r.createElement)(Q,{name:O},$)),p||f?$:Object(r.createElement)("span",{ref:_},$)});Me.Slot=Object(r.forwardRef)((function({name:e="Popover"},t){return Object(r.createElement)(ee,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var Le=Me,Ie=function({shortcut:e,className:t}){if(!e)return null;let n,o;return Object(U.isString)(e)&&(n=e),Object(U.isObject)(e)&&(n=e.display,o=e.ariaLabel),Object(r.createElement)("span",{className:t,"aria-label":o},n)};const Pe=Object(r.createElement)("div",{className:"event-catcher"}),Ue=({eventHandlers:e,child:t,childrenWithPopover:n})=>Object(r.cloneElement)(Object(r.createElement)("span",{className:"disabled-element-wrapper"},Object(r.cloneElement)(Pe,e),Object(r.cloneElement)(t,{children:n}),","),e),Be=({child:e,eventHandlers:t,childrenWithPopover:n})=>Object(r.cloneElement)(e,{...t,children:n}),Ve=(e,t,n)=>{if(1!==r.Children.count(e))return;const o=r.Children.only(e);"function"==typeof o.props[t]&&o.props[t](n)};var He=function({children:e,position:t,text:n,shortcut:o}){const[i,a]=Object(r.useState)(!1),[c,s]=Object(r.useState)(!1),l=Object(K.useDebounce)(s,700),u=t=>{Ve(e,"onMouseDown",t),document.addEventListener("mouseup",f),a(!0)},p=t=>{Ve(e,"onMouseUp",t),document.removeEventListener("mouseup",f),a(!1)},m=e=>"mouseUp"===e?p:"mouseDown"===e?u:void 0,f=m("mouseUp"),d=(t,n)=>r=>{if(Ve(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&i)return;l.cancel();const o=Object(U.includes)(["focus","mouseenter"],r.type);o!==c&&(n?l(o):s(o))},h=()=>{l.cancel(),document.removeEventListener("mouseup",f)};if(Object(r.useEffect)(()=>h,[]),1!==r.Children.count(e))return e;const b={onMouseEnter:d("onMouseEnter",!0),onMouseLeave:d("onMouseLeave"),onClick:d("onClick"),onFocus:d("onFocus"),onBlur:d("onBlur"),onMouseDown:m("mouseDown")},g=r.Children.only(e),{children:v,disabled:y}=g.props;return(y?Ue:Be)({child:g,eventHandlers:b,childrenWithPopover:(({grandchildren:e,isOver:t,position:n,text:o,shortcut:i})=>Object(r.concatChildren)(e,t&&Object(r.createElement)(Le,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,Object(r.createElement)(Ie,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:c,position:t,text:n,shortcut:o})})},ze=function({icon:e,className:t,...n}){const o=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(r.createElement)("span",Object(P.a)({className:o},n))},We=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return Object(r.createElement)(ze,Object(P.a)({icon:e},n));if(Object(r.isValidElement)(e)&&ze===e.type)return Object(r.cloneElement)(e,{...n});if("function"==typeof e)return e.prototype instanceof r.Component?Object(r.createElement)(e,{size:t,...n}):e({size:t,...n});if(e&&("svg"===e.type||e.type===M.SVG)){const o={width:t,height:t,...e.props,...n};return Object(r.createElement)(M.SVG,o)}return Object(r.isValidElement)(e)?Object(r.cloneElement)(e,{size:t,...n}):e},Ge=Object(r.forwardRef)((function({as:e="div",className:t,...n},o){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(r.createElement)(e,t)}({as:e,className:i()("components-visually-hidden",t),...n,ref:o})}));const $e=["onMouseDown","onClick"];var Ke=Object(r.forwardRef)((function(e,t){const{href:n,target:o,isSmall:a,isPressed:c,isBusy:s,isDestructive:l,className:u,disabled:p,icon:m,iconPosition:f="left",iconSize:d,showTooltip:h,tooltipPosition:b,shortcut:g,label:v,children:y,text:O,variant:w,__experimentalIsFocusable:E,describedBy:j,...S}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,variant:i,...a}){let c=i;var s,l,u,p,m;return t&&(null!==(s=c)&&void 0!==s||(c="primary")),r&&(null!==(l=c)&&void 0!==l||(c="tertiary")),n&&(null!==(u=c)&&void 0!==u||(c="secondary")),e&&(D()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=c)&&void 0!==p||(c="secondary")),o&&(null!==(m=c)&&void 0!==m||(c="link")),{...a,variant:c}}(e),x=i()("components-button",u,{"is-secondary":"secondary"===w,"is-primary":"primary"===w,"is-small":a,"is-tertiary":"tertiary"===w,"is-pressed":c,"is-busy":s,"is-link":"link"===w,"is-destructive":l,"has-text":!!m&&!!y,"has-icon":!!m}),N=p&&!E,k=void 0===n||N?"button":"a",_="a"===k?{href:n,target:o}:{type:"button",disabled:N,"aria-pressed":c};if(p&&E){_["aria-disabled"]=!0;for(const e of $e)S[e]=e=>{e.stopPropagation(),e.preventDefault()}}const T=!N&&(h&&v||g||!!v&&(!y||Object(U.isArray)(y)&&!y.length)&&!1!==h),C=j?Object(U.uniqueId)():null,A=S["aria-describedby"]||C,R=Object(r.createElement)(k,Object(P.a)({},_,S,{className:x,"aria-label":S["aria-label"]||v,"aria-describedby":A,ref:t}),m&&"left"===f&&Object(r.createElement)(We,{icon:m,size:d}),O&&Object(r.createElement)(r.Fragment,null,O),m&&"right"===f&&Object(r.createElement)(We,{icon:m,size:d}),y);return T?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(He,{text:j||v,shortcut:g,position:b},R),j&&Object(r.createElement)(Ge,null,Object(r.createElement)("span",{id:C},j))):Object(r.createElement)(r.Fragment,null,R,j&&Object(r.createElement)(Ge,null,Object(r.createElement)("span",{id:C},j)))}));n(143);var Ye=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"});n(142);var qe=e=>{let{className:t,showSpinner:n=!1,children:o,variant:a="contained",...s}=e;const l=i()("wc-block-components-button",t,a,{"wc-block-components-button--loading":n});return Object(r.createElement)(Ke,c()({className:l},s),n&&Object(r.createElement)(Ye,null),Object(r.createElement)("span",{className:"wc-block-components-button__text"},o))},Ze=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:a,wrapperProps:c={}}=e;const s=null!=n,l=null!=o;return!s&&l?(t=a||"span",c={...c,className:i()(c.className,"screen-reader-text")},Object(r.createElement)(t,c,o)):(t=a||r.Fragment,s&&l&&n!==o?Object(r.createElement)(t,c,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,c,n))},Xe=n(41);function Je(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}var Qe=function({className:e,status:t="info",children:n,spokenMessage:o=n,onRemove:a=U.noop,isDismissible:c=!0,actions:s=[],politeness:l=Je(t),__unstableHTML:u,onDismiss:p=U.noop}){!function(e,t){const n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)(()=>{n&&Object(Xe.speak)(n,t)},[n,t])}(o,l);const m=i()(e,"components-notice","is-"+t,{"is-dismissible":c});return u&&(n=Object(r.createElement)(r.RawHTML,null,n)),Object(r.createElement)("div",{className:m},Object(r.createElement)("div",{className:"components-notice__content"},n,Object(r.createElement)("div",{className:"components-notice__actions"},s.map(({className:e,label:t,isPrimary:n,variant:o,noDefaultClasses:a=!1,onClick:c,url:s},l)=>{let u=o;return"primary"===o||a||(u=s?"link":"secondary"),void 0===u&&n&&(u="primary"),Object(r.createElement)(Ke,{key:l,href:s,variant:u,onClick:s?void 0:c,className:i()("components-notice__action",e)},t)}))),c&&Object(r.createElement)(Ke,{className:"components-notice__dismiss",icon:Se,label:Object(k.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),p(),a()},showTooltip:!1}))},et=n(42),tt=n.n(et);const nt=["a","b","em","i","strong","p","br"],rt=["target","href","rel","name","download"];var ot=n(2),it=n(16);n(144);const at=e=>{let{status:t="default"}=e;switch(t){case"error":return"woocommerce-error";case"success":return"woocommerce-message";case"info":case"warning":return"woocommerce-info"}return""};var ct=e=>{let{className:t,context:n="default",additionalNotices:o=[]}=e;const a=Object(ot.useSelect)(e=>e(it.PAYMENT_STORE_KEY).isExpressPaymentMethodActive()),{notices:s}=Object(ot.useSelect)(e=>({notices:e("core/notices").getNotices(n)})),{removeNotice:l}=Object(ot.useDispatch)("core/notices"),u=s.filter(e=>"snackbar"!==e.type).concat(o);if(!u.length)return null;const p=i()(t,"wc-block-components-notices");return a?null:Object(r.createElement)("div",{className:p},u.map(e=>Object(r.createElement)(Qe,c()({key:"store-notice-"+e.id},e,{className:i()("wc-block-components-notices__notice",at(e)),onRemove:()=>{e.isDismissible&&l(e.id,n)}}),((e,t)=>{const n=nt,r=rt;return tt.a.sanitize(e,{ALLOWED_TAGS:n,ALLOWED_ATTR:r})})(e.content))))};n(145);const st=e=>{let{className:t,label:n,id:o,onChange:a,children:s,hasError:l=!1,checked:u=!1,disabled:p=!1,...m}=e;const f=Object(K.useInstanceId)(st),d=o||"checkbox-control-"+f;return Object(r.createElement)("div",{className:i()("wc-block-components-checkbox",{"has-error":l},t)},Object(r.createElement)("label",{htmlFor:d},Object(r.createElement)("input",c()({id:d,className:"wc-block-components-checkbox__input",type:"checkbox",onChange:e=>a(e.target.checked),"aria-invalid":!0===l,checked:u,disabled:p},m)),Object(r.createElement)("svg",{className:"wc-block-components-checkbox__mark","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20"},Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"})),n&&Object(r.createElement)("span",{className:"wc-block-components-checkbox__label"},n),s))};var lt=st,ut=n(134),pt=n(135);n(36);var mt=Object(s.forwardRef)((e,t)=>{let{className:n,id:o,type:a="text",ariaLabel:s,ariaDescribedBy:l,label:u,screenReaderLabel:p,disabled:m,help:f,autoCapitalize:d="off",autoComplete:h="off",value:b="",onChange:g,required:v=!1,onBlur:y=(()=>{}),feedback:O,...w}=e;const[E,j]=Object(r.useState)(!1);return Object(r.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":E||b})},Object(r.createElement)("input",c()({type:a,id:o,value:b,ref:t,autoCapitalize:d,autoComplete:h,onChange:e=>{g(e.target.value)},onFocus:()=>j(!0),onBlur:e=>{y(e.target.value),j(!1)},"aria-label":s||u,disabled:m,"aria-describedby":f&&!l?o+"__help":l,required:v},w)),Object(r.createElement)(Ze,{label:u,screenReaderLabel:p||u,wrapperElement:"label",wrapperProps:{htmlFor:o},htmlFor:o}),!!f&&Object(r.createElement)("p",{id:o+"__help",className:"wc-block-components-text-input__help"},f),O)});n(146);const ft=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{validationError:i,validationErrorId:a}=Object(ot.useSelect)(e=>{const t=e(it.VALIDATION_STORE_KEY);return{validationError:t.getValidationError(n),validationErrorId:t.getValidationErrorId(o)}});if(!t||"string"!=typeof t){if(null==i||!i.message||null!=i&&i.hidden)return null;t=i.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:a},t))};var dt=ft;var ht=Object(K.withInstanceId)(e=>{let{className:t,instanceId:n,id:o,ariaDescribedBy:a,errorId:l,focusOnMount:u=!1,onChange:p,showError:m=!0,errorMessage:f="",value:d="",...h}=e;const[b,g]=Object(s.useState)(!0),v=Object(s.useRef)(null),{setValidationErrors:y,hideValidationError:O,clearValidationError:w}=Object(ot.useDispatch)(it.VALIDATION_STORE_KEY),E=void 0!==o?o:"textinput-"+n,j=void 0!==l?l:E,{validationError:S,validationErrorId:x}=Object(ot.useSelect)(e=>{const t=e(it.VALIDATION_STORE_KEY);return{validationError:t.getValidationError(j),validationErrorId:t.getValidationErrorId(j)}}),N=Object(s.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=v.current||null;if(!t)return;t.value=t.value.trim();const n=t.checkValidity();if(n)w(j);else{const n={[j]:{message:t.validationMessage||Object(k.__)("Invalid value.","woocommerce"),hidden:e}};y(n)}}),[w,j,y]);Object(s.useEffect)(()=>{var e;b&&u&&(null===(e=v.current)||void 0===e||e.focus()),g(!1)},[u,b,g]),Object(s.useEffect)(()=>{var e,t;(null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==v.current&&N(!0)},[d,N]),Object(s.useEffect)(()=>()=>{w(j)},[w,j]),Object(ut.a)(f)&&""!==f&&Object(pt.a)(f)&&(S.message=f);const _=(null==S?void 0:S.message)&&!(null!=S&&S.hidden),T=m&&_&&x?x:a;return Object(r.createElement)(mt,c()({className:i()(t,{"has-error":_}),"aria-invalid":!0===_,id:E,onBlur:()=>{N(!1)},feedback:m&&Object(r.createElement)(ft,{errorMessage:f,propertyName:j}),ref:v,onChange:e=>{O(j),p(e)},ariaDescribedBy:T,value:d},h))});const bt=(e,t)=>{if(!e.includes(t))throw Error(Object(k.sprintf)(
/* translators: %1$s value passed to filter, %2$s : value that must be included. */
Object(k.__)('Returned value must include %1$s, you passed "%2$s"',"woocommerce"),t,e));return!0};var gt=n(10);const vt=e=>{const{applyExtensionCartUpdate:t}=Object(ot.dispatch)(gt.b);return t(e)};var yt=n(24);const Ot=()=>!0;let wt={};const Et={},jt=(e,t)=>{Object.keys(t).includes("couponName")&&D()("snackbarNotices",{alternative:"snackbarNoticeVisibility",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4417"}),Object.keys(t).includes("couponName")&&D()("couponName",{alternative:"coupons",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/bb921d21f42e21f38df2b1c87b48e07aa4cb0538/docs/extensibility/available-filters.md#coupons"}),wt={...wt,[e]:t}},St={},xt=(e,t,n,r)=>{St[e]={arg:t,extensions:n,defaultValue:r}},Nt=(e,t)=>!(!Object(yt.a)(e)||!Object(yt.a)(t))||Object(pt.a)(e)&&Object(pt.a)(t)&&Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every(n=>Object(pt.b)(t,n)&&Z()(e[n],t[n])),kt=e=>{let{filterName:t,defaultValue:n,extensions:o=null,arg:i=null,validation:a=Ot}=e;return Object(r.useMemo)(()=>{if(!((e,t,n,r)=>{const o=St[e];if(!o)return xt(e,t,n,r),!0;const{arg:i={},extensions:a={},defaultValue:c=null}=o;return Nt(t,i)?!(r===c&&Nt(n,a)||(xt(e,t,n,r),0)):(xt(e,t,n,r),!0)})(t,i,o,n)&&void 0!==Et[t])return Et[t];const e=(e=>Object.keys(wt).map(t=>wt[t][e]).filter(Boolean))(t);let r=n;return e.forEach(e=>{try{const t=e(r,o||{},i);if(typeof t!=typeof r)throw new Error(Object(k.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(k.__)("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"),typeof r,typeof t));r=a(t)?t:r}catch(e){if(_.CURRENT_USER_IS_ADMIN)throw e;console.error(e)}}),Et[t]=r,r},[i,n,o,t,a])};let _t;!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",e.EMPTY_CART="woocommerce/empty-cart-block",e.FILLED_CART="woocommerce/filled-cart-block",e.CART_ITEMS="woocommerce/cart-items-block",e.CART_CROSS_SELLS="woocommerce/cart-cross-sells-block",e.CART_TOTALS="woocommerce/cart-totals-block",e.MINI_CART="woocommerce/mini-cart-contents",e.EMPTY_MINI_CART="woocommerce/empty-mini-cart-contents-block",e.FILLED_MINI_CART="woocommerce/filled-mini-cart-contents-block",e.MINI_CART_ITEMS="woocommerce/mini-cart-items-block",e.CART_ORDER_SUMMARY="woocommerce/cart-order-summary-block",e.CHECKOUT_ORDER_SUMMARY="woocommerce/checkout-order-summary-block"}(_t||(_t={}));const Tt={},Ct=e=>Object.values(_t).includes(e),At=e=>Ct(e)?Object.values(Tt).filter(t=>{let{metadata:n}=t;return((null==n?void 0:n.parent)||[]).includes(e)}):[];var Rt=n(20);const Ft=e=>{var t,n,r,o;((e,t,n)=>{if(!Object(pt.a)(e))return;const r=typeof e.metadata;if("object"!==r)throw new Error(`Incorrect value for the metadata argument when registering a block component. It was a ${r}, but must be a object.`)})(e),(e=>{if(((e,t,n)=>{const r=typeof t;if("string"!==r)throw new Error(`Incorrect value for the blockName argument when registering a checkout block. It was a ${r}, but must be a string.`)})(0,e),!e)throw new Error("Value for the blockName argument must not be empty.")})(e.metadata.name),(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 ${typeof e}, but must be a string or array of strings.`);if("string"==typeof e&&!Ct(e))throw new Error("When registering a checkout block, the parent must be a valid inner block area.");if(Array.isArray(e)&&!e.some(e=>Ct(e)))throw new Error("When registering a checkout block, the parent must be a valid inner block area.")})(e.metadata.parent),((e,t)=>{const n=e.component;if(n){if("function"==typeof n)return;if(Object(pt.a)(n)&&n.$$typeof&&n.$$typeof===Symbol.for("react.lazy"))return}throw new Error("Incorrect value for the component argument when registering a block component. Component must be a valid React Element or Lazy callback.")})(e),Object(Rt.registerBlockComponent)({blockName:e.metadata.name,component:e.component}),Tt[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)}}}]);