diff --git a/build/active-filters-frontend.asset.php b/build/active-filters-frontend.asset.php new file mode 100644 index 00000000000..e0a7ff604c8 --- /dev/null +++ b/build/active-filters-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'a2ec44a9ee506f719157cba6d3710f9c'); \ No newline at end of file diff --git a/build/active-filters-frontend.js b/build/active-filters-frontend.js new file mode 100644 index 00000000000..1674a3172bd --- /dev/null +++ b/build/active-filters-frontend.js @@ -0,0 +1,13 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=187)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{const r=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;var n;return r.id&&e.push(r),e},[]),o=e=>{if(e)return c.find(t=>t.id===e)},s=e=>{if(e)return c.find(t=>t.taxonomy===e)}},105:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));var n=r(5);const c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const o=e.filter(e=>e.attribute===r.taxonomy),s=o.length?o[0]:null;if(!(s&&s.slug&&Array.isArray(s.slug)&&s.slug.includes(c)))return;const a=s.slug.filter(e=>e!==c),l=e.filter(e=>e.attribute!==r.taxonomy);a.length>0&&(s.slug=a.sort(),l.push(s)),t(Object(n.sortBy)(l,"attribute"))},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},r=arguments.length>2?arguments[2]:void 0,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const s=e.filter(e=>e.attribute!==r.taxonomy);0===c.length?t(s):(s.push({attribute:r.taxonomy,operator:o,slug:c.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(n.sortBy)(s,"attribute")))}},11:function(e,t){e.exports=window.wp.isShallowEqual},112:function(e,t){},15:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},16:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),s=r(3),a=r(1),l=r(66),i=e=>{let{imageUrl:t=l.l+"/block-error.svg",header:r=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:c,errorMessagePrefix:s=Object(a.__)("Error:","woo-gutenberg-products-block"),button:i}=e;return Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),c&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",c),i&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},i)))};r(37);class u extends s.Component{constructor(){super(...arguments),c()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:c,renderError:s,button:a}=this.props,{errorMessage:l,hasError:u}=this.state;return u?"function"==typeof s?s({errorMessage:l}):Object(o.createElement)(i,{errorMessage:r?l:null,header:e,imageUrl:t,text:n,errorMessagePrefix:c,button:a}):this.props.children}}t.a=u},163:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(0),s=r(24);const a=Object(o.createElement)(e=>{let{className:t,size:r,...n}=e;return Object(o.createElement)(s.SVG,c()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:r,height:r},n),Object(o.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},168:function(e,t,r){"use strict";var n=r(10),c=r.n(n),o=r(0),s=r(4),a=r.n(s),l=r(1),i=r(98),u=r(163);r(112);var b=e=>{let{text:t,screenReaderText:r="",element:n="li",className:s="",radius:l="small",children:i=null,...u}=e;const b=n,p=a()(s,"wc-block-components-chip","wc-block-components-chip--radius-"+l),d=Boolean(r&&r!==t);return Object(o.createElement)(b,c()({className:p},u),Object(o.createElement)("span",{"aria-hidden":d,className:"wc-block-components-chip__text"},t),d&&Object(o.createElement)("span",{className:"screen-reader-text"},r),i)};t.a=e=>{let{ariaLabel:t="",className:r="",disabled:n=!1,onRemove:s=(()=>{}),removeOnAnyClick:p=!1,text:d,screenReaderText:m="",...f}=e;const g=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:d;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:n,onClick:s,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||s()}},j=p?O:{},_=p?{"aria-hidden":!0}:O;return Object(o.createElement)(b,c()({},f,j,{className:a()(r,"is-removable"),element:p?"button":f.element,screenReaderText:m,text:d}),Object(o.createElement)(g,c()({className:"wc-block-components-chip__remove"},_),Object(o.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},17:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(0),c=r(11),o=r.n(c);function s(e){const t=Object(n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},187:function(e,t,r){e.exports=r(208)},188:function(e,t){},19:function(e,t){e.exports=window.wp.htmlEntities},2:function(e,t){e.exports=window.wc.wcSettings},208:function(e,t,r){"use strict";r.r(t);var n=r(53),c=r(0),o=r(1),s=r(39),a=r(2),l=r(4),i=r.n(l),u=(r(8),r(21)),b=(r(188),r(104)),p=r(40),d=r(168);const m=(e,t)=>Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(p.formatPrice)(e),Object(p.formatPrice)(t)):Number.isFinite(e)?Object(o.sprintf)( +/* translators: %s min price */ +Object(o.__)("From %s","woo-gutenberg-products-block"),Object(p.formatPrice)(e)):Object(o.sprintf)( +/* translators: %s max price */ +Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(p.formatPrice)(t)),f=e=>{let{type:t,name:r,prefix:n,removeCallback:s=(()=>{}),showLabel:a=!0,displayStyle:l}=e;const i=n?Object(c.createElement)(c.Fragment,null,n," ",r):r,b=Object(o.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),r);return Object(c.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+r},a&&Object(c.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===l?Object(c.createElement)(d.a,{element:"span",text:i,onRemove:s,radius:"large",ariaLabel:b}):Object(c.createElement)("span",{className:"wc-block-active-filters__list-item-name"},i,Object(c.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:s},Object(c.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("ellipse",{cx:"8",cy:"8",rx:"8",ry:"8",transform:"rotate(-180 8 8)",fill:"currentColor",fillOpacity:"0.7"}),Object(c.createElement)("rect",{x:"10.636",y:"3.94983",width:"2",height:"9.9466",transform:"rotate(45 10.636 3.94983)",fill:"white"}),Object(c.createElement)("rect",{x:"12.0503",y:"11.0209",width:"2",height:"9.9466",transform:"rotate(135 12.0503 11.0209)",fill:"white"})),Object(c.createElement)(u.a,{screenReaderLabel:b}))))};var g=r(64),O=r(19),j=r(105),_=e=>{let{attributeObject:t={},slugs:r=[],operator:n="in",displayStyle:a}=e;const{results:l,isLoading:i}=Object(g.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[t.id]}),[u,b]=Object(s.b)("attributes",[]);if(i)return null;const p=t.label;return Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-active-filters__list-item-type"},p,":"),Object(c.createElement)("ul",null,r.map((e,r)=>{const s=l.find(t=>t.slug===e);if(!s)return null;let i="";return r>0&&"and"===n&&(i=Object(c.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),f({type:p,name:Object(O.decodeEntities)(s.name||e),prefix:i,removeCallback:()=>{Object(j.a)(u,b,t,e)},showLabel:!1,displayStyle:a})})))};Object(n.a)({selector:".wp-block-woocommerce-active-filters",Block:e=>{let{attributes:t,isEditor:r=!1}=e;const[n,l]=Object(s.b)("attributes",[]),[p,d]=Object(s.b)("stock_status",[]),[g,O]=Object(s.b)("min_price"),[j,y]=Object(s.b)("max_price"),w=Object(a.getSetting)("stockStatusOptions",[]),E=Object(c.useMemo)(()=>{if(p.length>0)return p.map(e=>f({type:Object(o.__)("Stock Status","woo-gutenberg-products-block"),name:w[e],removeCallback:()=>{const t=p.filter(t=>t!==e);d(t)},displayStyle:t.displayStyle}))},[w,p,d,t.displayStyle]),h=Object(c.useMemo)(()=>Number.isFinite(g)||Number.isFinite(j)?f({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:m(g,j),removeCallback:()=>{O(void 0),y(void 0)},displayStyle:t.displayStyle}):null,[g,j,t.displayStyle,O,y]),v=Object(c.useMemo)(()=>n.map(e=>{const r=Object(b.b)(e.attribute);return Object(c.createElement)(_,{attributeObject:r,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}),[n,t.displayStyle]);if(!(n.length>0||p.length>0||Number.isFinite(g)||Number.isFinite(j)||r))return null;const k="h"+t.headingLevel,S=i()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(c.createElement)(c.Fragment,null,!r&&t.heading&&Object(c.createElement)(k,{className:"wc-block-active-filters__title"},t.heading),Object(c.createElement)("div",{className:"wc-block-active-filters"},Object(c.createElement)("ul",{className:S},r?Object(c.createElement)(c.Fragment,null,f({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),f({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(c.createElement)(c.Fragment,null,h,E,v)),Object(c.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:()=>{O(void 0),y(void 0),l([]),d([])}},Object(c.createElement)(u.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},getProps:e=>({attributes:{displayStyle:e.dataset.displayStyle,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3},isEditor:!1})})},21:function(e,t,r){"use strict";var n=r(0),c=r(4),o=r.n(c);t.a=e=>{let t,{label:r,screenReaderLabel:c,wrapperElement:s,wrapperProps:a={}}=e;const l=null!=r,i=null!=c;return!l&&i?(t=s||"span",a={...a,className:o()(a.className,"screen-reader-text")},Object(n.createElement)(t,a,c)):(t=s||n.Fragment,l&&i&&r!==c?Object(n.createElement)(t,a,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},c)):Object(n.createElement)(t,a,r))}},24:function(e,t){e.exports=window.wp.primitives},25:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const c=Object(n.createContext)("page"),o=()=>Object(n.useContext)(c);c.Provider},3:function(e,t){e.exports=window.React},37:function(e,t){},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return d}));var n=r(6),c=r(9),o=r(0),s=r(11),a=r.n(s),l=r(17),i=r(62),u=r(25);const b=e=>{const t=Object(u.a)();e=e||t;const r=Object(c.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:s}=Object(c.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(o.useCallback)(t=>{s(e,t)},[e,s])]},p=(e,t,r)=>{const s=Object(u.a)();r=r||s;const a=Object(c.useSelect)(c=>c(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:l}=Object(c.useDispatch)(n.QUERY_STATE_STORE_KEY);return[a,Object(o.useCallback)(t=>{l(r,e,t)},[r,e,l])]},d=(e,t)=>{const r=Object(u.a)();t=t||r;const[n,c]=b(t),s=Object(l.a)(n),p=Object(l.a)(e),d=Object(i.a)(p),m=Object(o.useRef)(!1);return Object(o.useEffect)(()=>{a()(d,p)||(c(Object.assign({},s,p)),m.current=!0)},[s,p,d,c]),m.current?[n,c]:[e,c]}},4:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:a=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const l=n(e,r),i=a(e,r),u={...e.dataset,...l.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:a={},errorBoundaryProps:l={}}=e;Object(o.render)(Object(o.createElement)(s.a,l,Object(o.createElement)(o.Suspense,{fallback:Object(o.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(o.createElement)(t,c()({},a,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:l,attributes:u,errorBoundaryProps:i})})},i=e=>{const t=document.body.querySelectorAll(a.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:c,selector:o}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:c,wrappers:o}=e;const s=document.body.querySelectorAll(c);o&&o.length>0&&Array.prototype.filter.call(s,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,o)),l({Block:t,containers:s,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:c,selector:o,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:c,wrapper:o}=e;const s=o.querySelectorAll(c);l({Block:t,containers:s,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},54:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);const c=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},6:function(e,t){e.exports=window.wc.wcBlocksData},62:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3);function c(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},64:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(6),c=r(9),o=r(0),s=r(17),a=r(54);const l=e=>{const{namespace:t,resourceName:r,resourceValues:l=[],query:i={},shouldSelect:u=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),p=Object(s.a)(i),d=Object(s.a)(l),m=Object(a.a)(),f=Object(c.useSelect)(e=>{if(!u)return null;const c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,p,d],s=c.getCollectionError(...o);return s&&m(s),{results:c.getCollection(...o),isLoading:!c.hasFinishedResolution("getCollection",o)}},[t,r,d,p,u]);return null!==f&&(b.current=f),b.current}},66:function(e,t,r){"use strict";r.d(t,"n",(function(){return o})),r.d(t,"l",(function(){return s})),r.d(t,"k",(function(){return a})),r.d(t,"m",(function(){return l})),r.d(t,"i",(function(){return i})),r.d(t,"d",(function(){return u})),r.d(t,"f",(function(){return b})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return d})),r.d(t,"e",(function(){return m})),r.d(t,"g",(function(){return f})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return O})),r.d(t,"b",(function(){return j}));var n,c=r(2);const o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),s=o.pluginUrl+"images/",a=o.pluginUrl+"build/",l=o.buildPhase,i=null===(n=c.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=(c.STORE_PAGES.checkout.id,c.STORE_PAGES.checkout.permalink),b=c.STORE_PAGES.privacy.permalink,p=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),d=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id,c.STORE_PAGES.cart.permalink),m=c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),f=Object(c.getSetting)("shippingCountries",{}),g=Object(c.getSetting)("allowedCountries",{}),O=Object(c.getSetting)("shippingStates",{}),j=Object(c.getSetting)("allowedStates",{})},8:function(e,t,r){e.exports=r(42)()},9:function(e,t){e.exports=window.wp.data},98:function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{srcElement:t,size:r=24,...c}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:r,height:r,...c}):null}}}); \ No newline at end of file diff --git a/build/active-filters.asset.php b/build/active-filters.asset.php new file mode 100644 index 00000000000..b6eb4597bda --- /dev/null +++ b/build/active-filters.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '1e2d52517ac3daa4dc6167fd1f75dc5e'); \ No newline at end of file diff --git a/build/active-filters.js b/build/active-filters.js new file mode 100644 index 00000000000..c7bf4022e92 --- /dev/null +++ b/build/active-filters.js @@ -0,0 +1,17 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["active-filters"]=function(e){function t(t){for(var n,o,a=t[0],s=t[1],i=t[2],b=0,p=[];b{let{className:t,headingLevel:c,onChange:l,heading:a,instanceId:s}=e;const i="h"+c;return Object(n.createElement)(i,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+s},Object(o.__)("Block title","woo-gutenberg-products-block")),Object(n.createElement)(r.PlainText,{id:"block-title-"+s,className:"wc-block-editor-components-title",value:a,onChange:l}))})},108:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(8);function r(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},113:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(16),r=c(13),l=c(0),o=c(40),a=c(93);const s=e=>{const{namespace:t,resourceName:c,resourceValues:s=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(l.useRef)({results:[],isLoading:!0}),p=Object(o.a)(i),m=Object(o.a)(s),d=Object(a.a)(),h=Object(r.useSelect)(e=>{if(!u)return null;const r=e(n.COLLECTIONS_STORE_KEY),l=[t,c,p,m],o=r.getCollectionError(...l);return o&&d(o),{results:r.getCollection(...l),isLoading:!r.hasFinishedResolution("getCollection",l)}},[t,c,m,p,u]);return null!==h&&(b.current=h),b.current}},12:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.data},14:function(e,t){e.exports=window.wp.htmlEntities},143:function(e,t){},144:function(e,t){},16:function(e,t){e.exports=window.wc.wcBlocksData},175:function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return o}));var n=c(2);const r=Object(n.getSetting)("attributes",[]).reduce((e,t)=>{const c=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;var n;return c.id&&e.push(c),e},[]),l=e=>{if(e)return r.find(t=>t.id===e)},o=e=>{if(e)return r.find(t=>t.taxonomy===e)}},176:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return l}));var n=c(6);const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const l=e.filter(e=>e.attribute===c.taxonomy),o=l.length?l[0]:null;if(!(o&&o.slug&&Array.isArray(o.slug)&&o.slug.includes(r)))return;const a=o.slug.filter(e=>e!==r),s=e.filter(e=>e.attribute!==c.taxonomy);a.length>0&&(o.slug=a.sort(),s.push(o)),t(Object(n.sortBy)(s,"attribute"))},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const o=e.filter(e=>e.attribute!==c.taxonomy);0===r.length?t(o):(o.push({attribute:c.taxonomy,operator:l,slug:r.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(n.sortBy)(o,"attribute")))}},18:function(e,t){e.exports=window.wp.primitives},185:function(e,t,c){"use strict";var n=c(5),r=c.n(n),l=c(0),o=c(4),a=c.n(o),s=c(1),i=c(43),u=c(208);c(144);var b=e=>{let{text:t,screenReaderText:c="",element:n="li",className:o="",radius:s="small",children:i=null,...u}=e;const b=n,p=a()(o,"wc-block-components-chip","wc-block-components-chip--radius-"+s),m=Boolean(c&&c!==t);return Object(l.createElement)(b,r()({className:p},u),Object(l.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(l.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:n=!1,onRemove:o=(()=>{}),removeOnAnyClick:p=!1,text:m,screenReaderText:d="",...h}=e;const O=p?"span":"button";if(!t){const e=d&&"string"==typeof d?d:m;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const g={"aria-label":t,disabled:n,onClick:o,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||o()}},j=p?g:{},v=p?{"aria-hidden":!0}:g;return Object(l.createElement)(b,r()({},h,j,{className:a()(c,"is-removable"),element:p?"button":h.element,screenReaderText:d,text:m}),Object(l.createElement)(O,r()({className:"wc-block-components-chip__remove"},v),Object(l.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},2:function(e,t){e.exports=window.wc.wcSettings},208:function(e,t,c){"use strict";var n=c(5),r=c.n(n),l=c(0),o=c(18);const a=Object(l.createElement)(e=>{let{className:t,size:c,...n}=e;return Object(l.createElement)(o.SVG,r()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},n),Object(l.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},26:function(e,t){e.exports=window.wp.isShallowEqual},3:function(e,t){e.exports=window.wp.components},30:function(e,t,c){"use strict";var n=c(0),r=c(4),l=c.n(r);t.a=e=>{let t,{label:c,screenReaderLabel:r,wrapperElement:o,wrapperProps:a={}}=e;const s=null!=c,i=null!=r;return!s&&i?(t=o||"span",a={...a,className:l()(a.className,"screen-reader-text")},Object(n.createElement)(t,a,r)):(t=o||n.Fragment,s&&i&&c!==r?Object(n.createElement)(t,a,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},r)):Object(n.createElement)(t,a,c))}},35:function(e,t){e.exports=window.wc.priceFormat},376:function(e,t,c){e.exports=c(442)},377:function(e,t){},40:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0),r=c(26),l=c.n(r);function o(e){const t=Object(n.useRef)(e);return l()(e,t.current)||(t.current=e),t.current}},43:function(e,t,c){"use strict";var n=c(0);t.a=function(e){let{srcElement:t,size:c=24,...r}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:c,height:c,...r}):null}},442:function(e,t,c){"use strict";c.r(t);var n=c(5),r=c.n(n),l=c(0),o=c(1),a=c(12),s=c(43),i=c(18),u=Object(l.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(l.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(l.createElement)("path",{d:"M17 6H7c-3.31 0-6 2.69-6 6s2.69 6 6 6h10c3.31 0 6-2.69 6-6s-2.69-6-6-6zm0 10H7c-2.21 0-4-1.79-4-4s1.79-4 4-4h10c2.21 0 4 1.79 4 4s-1.79 4-4 4zm0-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"})),b=c(4),p=c.n(b),m=c(7),d=c(3),h=c(89),O=c(106),g=c(55),j=c(71),v=c(2),f=(c(10),c(30)),w=(c(377),c(175)),_=c(35),y=c(185);const E=(e,t)=>Number.isFinite(e)&&Number.isFinite(t)?Object(o.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(o.__)("Between %1$s and %2$s","woo-gutenberg-products-block"),Object(_.formatPrice)(e),Object(_.formatPrice)(t)):Number.isFinite(e)?Object(o.sprintf)( +/* translators: %s min price */ +Object(o.__)("From %s","woo-gutenberg-products-block"),Object(_.formatPrice)(e)):Object(o.sprintf)( +/* translators: %s max price */ +Object(o.__)("Up to %s","woo-gutenberg-products-block"),Object(_.formatPrice)(t)),k=e=>{let{type:t,name:c,prefix:n,removeCallback:r=(()=>{}),showLabel:a=!0,displayStyle:s}=e;const i=n?Object(l.createElement)(l.Fragment,null,n," ",c):c,u=Object(o.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(o.__)("Remove %s filter","woo-gutenberg-products-block"),c);return Object(l.createElement)("li",{className:"wc-block-active-filters__list-item",key:t+":"+c},a&&Object(l.createElement)("span",{className:"wc-block-active-filters__list-item-type"},t+": "),"chips"===s?Object(l.createElement)(y.a,{element:"span",text:i,onRemove:r,radius:"large",ariaLabel:u}):Object(l.createElement)("span",{className:"wc-block-active-filters__list-item-name"},i,Object(l.createElement)("button",{className:"wc-block-active-filters__list-item-remove",onClick:r},Object(l.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(l.createElement)("ellipse",{cx:"8",cy:"8",rx:"8",ry:"8",transform:"rotate(-180 8 8)",fill:"currentColor",fillOpacity:"0.7"}),Object(l.createElement)("rect",{x:"10.636",y:"3.94983",width:"2",height:"9.9466",transform:"rotate(45 10.636 3.94983)",fill:"white"}),Object(l.createElement)("rect",{x:"12.0503",y:"11.0209",width:"2",height:"9.9466",transform:"rotate(135 12.0503 11.0209)",fill:"white"})),Object(l.createElement)(f.a,{screenReaderLabel:u}))))};var x=c(113),S=c(14),C=c(176),N=e=>{let{attributeObject:t={},slugs:c=[],operator:n="in",displayStyle:r}=e;const{results:a,isLoading:s}=Object(x.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[t.id]}),[i,u]=Object(j.b)("attributes",[]);if(s)return null;const b=t.label;return Object(l.createElement)("li",null,Object(l.createElement)("span",{className:"wc-block-active-filters__list-item-type"},b,":"),Object(l.createElement)("ul",null,c.map((e,c)=>{const s=a.find(t=>t.slug===e);if(!s)return null;let p="";return c>0&&"and"===n&&(p=Object(l.createElement)("span",{className:"wc-block-active-filters__list-item-operator"},Object(o.__)("and","woo-gutenberg-products-block"))),k({type:b,name:Object(S.decodeEntities)(s.name||e),prefix:p,removeCallback:()=>{Object(C.a)(i,u,t,e)},showLabel:!1,displayStyle:r})})))},L=e=>{let{attributes:t,isEditor:c=!1}=e;const[n,r]=Object(j.b)("attributes",[]),[a,s]=Object(j.b)("stock_status",[]),[i,u]=Object(j.b)("min_price"),[b,m]=Object(j.b)("max_price"),d=Object(v.getSetting)("stockStatusOptions",[]),h=Object(l.useMemo)(()=>{if(a.length>0)return a.map(e=>k({type:Object(o.__)("Stock Status","woo-gutenberg-products-block"),name:d[e],removeCallback:()=>{const t=a.filter(t=>t!==e);s(t)},displayStyle:t.displayStyle}))},[d,a,s,t.displayStyle]),O=Object(l.useMemo)(()=>Number.isFinite(i)||Number.isFinite(b)?k({type:Object(o.__)("Price","woo-gutenberg-products-block"),name:E(i,b),removeCallback:()=>{u(void 0),m(void 0)},displayStyle:t.displayStyle}):null,[i,b,t.displayStyle,u,m]),g=Object(l.useMemo)(()=>n.map(e=>{const c=Object(w.b)(e.attribute);return Object(l.createElement)(N,{attributeObject:c,displayStyle:t.displayStyle,slugs:e.slug,key:e.attribute,operator:e.operator})}),[n,t.displayStyle]);if(!(n.length>0||a.length>0||Number.isFinite(i)||Number.isFinite(b)||c))return null;const _="h"+t.headingLevel,y=p()("wc-block-active-filters__list",{"wc-block-active-filters__list--chips":"chips"===t.displayStyle});return Object(l.createElement)(l.Fragment,null,!c&&t.heading&&Object(l.createElement)(_,{className:"wc-block-active-filters__title"},t.heading),Object(l.createElement)("div",{className:"wc-block-active-filters"},Object(l.createElement)("ul",{className:y},c?Object(l.createElement)(l.Fragment,null,k({type:Object(o.__)("Size","woo-gutenberg-products-block"),name:Object(o.__)("Small","woo-gutenberg-products-block"),displayStyle:t.displayStyle}),k({type:Object(o.__)("Color","woo-gutenberg-products-block"),name:Object(o.__)("Blue","woo-gutenberg-products-block"),displayStyle:t.displayStyle})):Object(l.createElement)(l.Fragment,null,O,h,g)),Object(l.createElement)("button",{className:"wc-block-active-filters__clear-all",onClick:()=>{u(void 0),m(void 0),r([]),s([])}},Object(l.createElement)(f.a,{label:Object(o.__)("Clear All","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Clear All Filters","woo-gutenberg-products-block")}))))},V=Object(d.withSpokenMessages)(e=>{let{attributes:t,setAttributes:c}=e;const{className:n,displayStyle:r,heading:a,headingLevel:s}=t,i=Object(m.useBlockProps)({className:n});return Object(l.createElement)("div",i,Object(l.createElement)(m.InspectorControls,{key:"inspector"},Object(l.createElement)(d.PanelBody,{title:Object(o.__)("Block Settings","woo-gutenberg-products-block")},Object(l.createElement)(g.a,{label:Object(o.__)("Display Style","woo-gutenberg-products-block"),value:r,options:[{label:Object(o.__)("List","woo-gutenberg-products-block"),value:"list"},{ +/* translators: "Chips" is a tag-like display style for chosen attributes. */ +label:Object(o.__)("Chips","woo-gutenberg-products-block"),value:"chips"}],onChange:e=>c({displayStyle:e})}),Object(l.createElement)("p",null,Object(o.__)("Heading Level","woo-gutenberg-products-block")),Object(l.createElement)(h.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:s,onChange:e=>c({headingLevel:e})}))),Object(l.createElement)(O.a,{className:"wc-block-active-filters__title",headingLevel:s,heading:a,onChange:e=>c({heading:e})}),Object(l.createElement)(d.Disabled,null,Object(l.createElement)(L,{attributes:t,isEditor:!0})))});Object(a.registerBlockType)("woocommerce/active-filters",{apiVersion:2,title:Object(o.__)("Active Product Filters","woo-gutenberg-products-block"),icon:{src:Object(l.createElement)(s.a,{srcElement:u,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Show the currently active product filters. Works in combination with the All Products and filters blocks.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1,color:{text:!0,background:!1}},example:{attributes:{}},attributes:{displayStyle:{type:"string",default:"list"},heading:{type:"string",default:Object(o.__)("Active filters","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:V,save(e){let{attributes:t}=e;const{className:c,displayStyle:n,heading:o,headingLevel:a}=t,s={"data-display-style":n,"data-heading":o,"data-heading-level":a};return Object(l.createElement)("div",r()({},m.useBlockProps.save({className:p()("is-loading",c)}),s),Object(l.createElement)("span",{"aria-hidden":!0,className:"wc-block-active-product-filters__placeholder"}))}})},48:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(0);const r=Object(n.createContext)("page"),l=()=>Object(n.useContext)(r);r.Provider},55:function(e,t,c){"use strict";var n=c(5),r=c.n(n),l=c(0),o=c(6),a=c(4),s=c.n(a),i=c(3),u=c(9);c(82);class b extends l.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:c,className:n,help:a,options:u,value:b}=this.props,p="inspector-toggle-button-control-"+c;let m;return a&&(m=Object(o.isFunction)(a)?a(t):a),Object(l.createElement)(i.BaseControl,{id:p,help:m,className:s()("components-toggle-button-control",n)},Object(l.createElement)("label",{id:p+"__label",htmlFor:p,className:"components-toggle-button-control__label"},e),Object(l.createElement)(i.ButtonGroup,{"aria-labelledby":p+"__label"},u.map((t,c)=>{const n={};return b===t.value?(n.isPrimary=!0,n["aria-pressed"]=!0):(n.isSecondary=!0,n["aria-pressed"]=!1),Object(l.createElement)(i.Button,r()({key:`${t.label}-${t.value}-${c}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},n),t.label)})))}}t.a=Object(u.withInstanceId)(b)},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},71:function(e,t,c){"use strict";c.d(t,"a",(function(){return b})),c.d(t,"b",(function(){return p})),c.d(t,"c",(function(){return m}));var n=c(16),r=c(13),l=c(0),o=c(26),a=c.n(o),s=c(40),i=c(108),u=c(48);const b=e=>{const t=Object(u.a)();e=e||t;const c=Object(r.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:o}=Object(r.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(l.useCallback)(t=>{o(e,t)},[e,o])]},p=(e,t,c)=>{const o=Object(u.a)();c=c||o;const a=Object(r.useSelect)(r=>r(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:s}=Object(r.useDispatch)(n.QUERY_STATE_STORE_KEY);return[a,Object(l.useCallback)(t=>{s(c,e,t)},[c,e,s])]},m=(e,t)=>{const c=Object(u.a)();t=t||c;const[n,r]=b(t),o=Object(s.a)(n),p=Object(s.a)(e),m=Object(i.a)(p),d=Object(l.useRef)(!1);return Object(l.useEffect)(()=>{a()(m,p)||(r(Object.assign({},o,p)),d.current=!0)},[o,p,m,r]),d.current?[n,r]:[e,r]}},8:function(e,t){e.exports=window.React},82:function(e,t){},89:function(e,t,c){"use strict";var n=c(0),r=c(6),l=c(1),o=c(3);function a(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(n.createElement)(o.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(o.Path,{d:c[t]})):null}class s extends n.Component{createLevelControl(e,t,c){const r=e===t;return{icon:Object(n.createElement)(a,{level:e}),title:Object(l.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(l.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:r,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:l,onChange:s}=this.props;return Object(n.createElement)(o.ToolbarGroup,{isCollapsed:e,icon:Object(n.createElement)(a,{level:l}),controls:Object(r.range)(t,c).map(e=>this.createLevelControl(e,l,s))})}}t.a=s},9:function(e,t){e.exports=window.wp.compose},93:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const r=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}}}); \ No newline at end of file diff --git a/build/all-products-frontend.asset.php b/build/all-products-frontend.asset.php new file mode 100644 index 00000000000..7bb7258bfe9 --- /dev/null +++ b/build/all-products-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '38dbfcd8e7d05e0f542df8494252fd85'); \ No newline at end of file diff --git a/build/all-products-frontend.js b/build/all-products-frontend.js new file mode 100644 index 00000000000..1faf9585598 --- /dev/null +++ b/build/all-products-frontend.js @@ -0,0 +1,11 @@ +!function(e){function t(t){for(var n,o,c=t[0],i=t[1],s=0,l=[];s{let{imageUrl:t=a.l+"/block-error.svg",header:n=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},n&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},n),r&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),l&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};n(37);class u extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,text:r,errorMessagePrefix:o,renderError:i,button:s}=this.props,{errorMessage:a,hasError:u}=this.state;return u?"function"==typeof i?i({errorMessage:a}):Object(c.createElement)(l,{errorMessage:n?a:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:s}):this.props.children}}t.a=u},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0),o=n(11),c=n.n(o);function i(e){const t=Object(r.useRef)(e);return c()(e,t.current)||(t.current=e),t.current}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);n(9);const o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(r.useContext)(o)},function(e,t){e.exports=window.wp.htmlEntities},,function(e,t,n){"use strict";var r=n(0),o=n(4),c=n.n(o);t.a=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:i,wrapperProps:s={}}=e;const a=null!=n,l=null!=o;return!a&&l?(t=i||"span",s={...s,className:c()(s.className,"screen-reader-text")},Object(r.createElement)(t,s,o)):(t=i||r.Fragment,a&&l&&n!==o?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},n),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,s,n))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n(5),o=n(0),c=n(6),i=n(9),s=n(19),a=n(70),l=n(109),u=n(18),d=n(67);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(i.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},b=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),b),[])},f={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},g={...f,email:""},h={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},E=e=>Object(a.a)(Object.entries(e).map(e=>{let[t,n]=e;return[t,Object(s.decodeEntities)(n)]})),O={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:h,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:g,shippingAddress:f,shippingRates:c.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:n}=Object(u.a)(),s=null==n?void 0:n.previewCart,{shouldSelect:a}=e,d=Object(o.useRef)();m();const p=Object(i.useSelect)((e,n)=>{let{dispatch:r}=n;if(!a)return O;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:g,shippingAddress:f,extensions:c.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),i=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),b=o.isCustomerDataUpdating(),{receiveCart:m}=r(c.CART_STORE_KEY),h=E(i.billingAddress),w=i.needsShipping?E(i.shippingAddress):h,j=i.fees.length>0?i.fees.map(e=>E(e)):c.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:j,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(l.a)(h),shippingAddress:Object(l.a)(w),extensions:i.extensions,shippingRates:i.shippingRates,shippingRatesLoading:b,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:m}},[a]);return d.current&&Object(r.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wp.a11y},function(e,t){e.exports=window.wp.primitives},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);const o=Object(r.createContext)("page"),c=()=>Object(r.useContext)(o);o.Provider},function(e,t,n){"use strict";(function(e){var r=n(0);n(45);const o=Object(r.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,n(65))},function(e,t){e.exports=window.wp.apiFetch},,,function(e,t){e.exports=window.wp.deprecated},,,,function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return i})),n.d(t,"a",(function(){return s}));const r=e=>"number"==typeof e,o=e=>"string"==typeof e,c=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return c(e)&&t in e}const s=e=>"boolean"==typeof e},,function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(48),o=n(0),c=n(22);const i=()=>{const e=Object(c.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...n,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return b}));var r=n(6),o=n(9),c=n(0),i=n(11),s=n.n(i),a=n(17),l=n(62),u=n(25);const d=e=>{const t=Object(u.a)();e=e||t;const n=Object(o.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:i}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[n,Object(c.useCallback)(t=>{i(e,t)},[e,i])]},p=(e,t,n)=>{const i=Object(u.a)();n=n||i;const s=Object(o.useSelect)(o=>o(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t),[n,e]),{setQueryValue:a}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[s,Object(c.useCallback)(t=>{a(n,e,t)},[n,e,a])]},b=(e,t)=>{const n=Object(u.a)();t=t||n;const[r,o]=d(t),i=Object(a.a)(r),p=Object(a.a)(e),b=Object(l.a)(p),m=Object(c.useRef)(!1);return Object(c.useEffect)(()=>{s()(b,p)||(o(Object.assign({},i,p)),m.current=!0)},[i,p,b,o]),m.current?[r,o]:[e,o]}},function(e,t){e.exports=window.wc.priceFormat},,function(e,t,n){"use strict";var r=n(43);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var s=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 s.name="Invariant Violation",s}}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:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(e,t){e.exports=window.wp.warning},function(e,t,n){"use strict";var r=n(7),o=n(0),c=n(24),i=function({icon:e,className:t,...n}){const c=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(r.a)({className:c},n))};t.a=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return Object(o.createElement)(i,Object(r.a)({icon:e},n));if(Object(o.isValidElement)(e)&&i===e.type)return Object(o.cloneElement)(e,{...n});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...n}):e({size:t,...n});if(e&&("svg"===e.type||e.type===c.SVG)){const r={width:t,height:t,...e.props,...n};return Object(o.createElement)(c.SVG,r)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...n}):e}},function(e,t,n){"use strict";var r=n(4),o=n.n(r),c=n(0);t.a=Object(c.forwardRef)((function({as:e="div",className:t,...n},r){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(c.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...n,ref:r})}))},function(e,t){e.exports=window.wp.hooks},function(e,t){e.exports=window.wc.wcBlocksSharedContext},function(e,t,n){"use strict";var r=n(2),o=n(1),c=n(35);const i=Object(r.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.b)(e.priority)&&(t.index=e.priority),Object(c.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},a=Object.entries(i).map(e=>{let[t,n]=e;return[t,Object.entries(n).map(e=>{let[t,n]=e;return[t,s(n)]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{});t.a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=n&&void 0!==a[n]?a[n]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(10),o=n.n(r),c=n(0),i=n(16);const s=[".wp-block-woocommerce-cart"],a=e=>{let{Block:t,containers:n,getProps:r=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==n.length&&Array.prototype.forEach.call(n,(e,n)=>{const a=r(e,n),l=s(e,n),u={...e.dataset,...a.attributes||{}};(e=>{let{Block:t,container:n,attributes:r={},props:s={},errorBoundaryProps:a={}}=e;Object(c.render)(Object(c.createElement)(i.a,a,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(c.createElement)(t,o()({},s,{attributes:r})))),n,()=>{n.classList&&n.classList.remove("is-loading")})})({Block:t,container:e,props:a,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:n,getProps:r,getErrorBoundaryProps:o,selector:c}=e;(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrappers:c}=e;const i=document.body.querySelectorAll(o);c&&c.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),a({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})})({Block:n,getProps:r,getErrorBoundaryProps:o,selector:c,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrapper:c}=e;const i=c.querySelectorAll(o);a({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})})({...e,wrapper:t})})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,n){"use strict";var r=n(7),o=n(0),c=n(4),i=n.n(c),s=n(5),a=n(30),l=n.n(a),u=n(12),d=n(60),p=n(90),b=n(1);function m(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const c=o.getBoundingClientRect();return new r.DOMRect(e.left+c.left,e.top+c.top,e.width,e.height)}let f=0;function g(e){const t=document.scrollingElement||document.body;e&&(f=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=f)}let h=0;function E(){return Object(o.useEffect)(()=>(0===h&&g(!0),++h,()=>{1===h&&g(!1),--h}),[]),null}var O=n(26);function w(e){const t=Object(o.useContext)(O.a),n=t.slots[e]||{},r=t.fills[e],c=Object(o.useMemo)(()=>r||[],[r]);return{...n,updateSlot:Object(o.useCallback)(n=>{t.updateSlot(e,n)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(n=>{t.unregisterSlot(e,n)},[e,t.unregisterSlot]),fills:c,registerFill:Object(o.useCallback)(n=>{t.registerFill(e,n)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(n=>{t.unregisterFill(e,n)},[e,t.unregisterFill])}}var j=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function y({name:e,children:t,registerFill:n,unregisterFill:r}){const c=(e=>{const{getSlot:t,subscribe:n}=Object(o.useContext)(j),[r,c]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(c(t(e)),n(()=>{c(t(e))})),[e]),r})(e),i=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(n(e,i.current),()=>r(e,i.current)),[]),Object(o.useLayoutEffect)(()=>{i.current.children=t,c&&c.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==i.current.name&&(r(i.current.name,i.current),i.current.name=e,n(e,i.current))},[e]),c&&c.node?(Object(s.isFunction)(t)&&(t=t(c.props.fillProps)),Object(o.createPortal)(t,c.node)):null}var v=e=>Object(o.createElement)(j.Consumer,null,({registerFill:t,unregisterFill:n})=>Object(o.createElement)(y,Object(r.a)({},e,{registerFill:t,unregisterFill:n})));class _ extends o.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:r}=this.props,c=Object(s.map)(r(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(n):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const n=e.key||t;return Object(o.cloneElement)(e,{key:n})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(c):c)}}var x=e=>Object(o.createElement)(j.Consumer,null,({registerSlot:t,unregisterSlot:n,getFills:c})=>Object(o.createElement)(_,Object(r.a)({},e,{registerSlot:t,unregisterSlot:n,getFills:c})));function k(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const n=w(e),r=Object(o.useRef)({rerender:k()});return Object(o.useEffect)(()=>(n.registerFill(r),()=>{n.unregisterFill(r)}),[n.registerFill,n.unregisterFill]),n.ref&&n.ref.current?("function"==typeof t&&(t=t(n.fillProps)),Object(o.createPortal)(t,n.ref.current)):null}var S=Object(o.forwardRef)((function({name:e,fillProps:t={},as:n="div",...c},i){const s=Object(o.useContext)(O.a),a=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,a,t),()=>{s.unregisterSlot(e,a)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(n,Object(r.a)({ref:Object(u.useMergeRefs)([i,a])},c))}));function N(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(v,e),Object(o.createElement)(C,e))}n(11),o.Component;const P=Object(o.forwardRef)(({bubblesVirtually:e,...t},n)=>e?Object(o.createElement)(S,Object(r.a)({},t,{ref:n})):Object(o.createElement)(x,t));function R(e){return"appear"===e?"top":"left"}function T(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:c}=(i=t).ownerDocument.defaultView.getComputedStyle(i);var i;const s=n?parseInt(n,10):0,a=r?parseInt(r,10):0,l=o?parseInt(o,10):0,u=c?parseInt(c,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-a,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-a}}function L(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function A(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function B(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const M=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:n,className:c,noArrow:s=!0,isAlternate:a,position:f="bottom right",range:g,focusOnMount:h="firstElement",anchorRef:O,shouldAnchorIncludePadding:j,anchorRect:y,getAnchorRect:v,expandOnMobile:_,animate:x=!0,onClickOutside:k,onFocusOutside:C,__unstableStickyBoundaryElement:S,__unstableSlotName:P="Popover",__unstableObserveElement:M,__unstableBoundaryParent:F,__unstableForcePosition:I,__unstableForceXAlignment:D,...V},W)=>{const z=Object(o.useRef)(null),H=Object(o.useRef)(null),U=Object(o.useRef)(),Y=Object(u.useViewportMatch)("medium","<"),[q,Q]=Object(o.useState)(),K=w(P),X=_&&Y,[J,Z]=Object(u.useResizeObserver)();s=X||s,Object(o.useLayoutEffect)(()=>{if(X)return B(U.current,"is-without-arrow",s),B(U.current,"is-alternate",a),L(U.current,"data-x-axis"),L(U.current,"data-y-axis"),A(U.current,"top"),A(U.current,"left"),A(H.current,"maxHeight"),void A(H.current,"maxWidth");const e=()=>{if(!U.current||!H.current)return;let e=function(e,t,n,r=!1,o,c){if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,c)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return m(Object(d.getRectangleFromRange)(r),r.endContainer.ownerDocument,c);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=m(r.getBoundingClientRect(),r.ownerDocument,c);return o?e:T(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=m(new window.DOMRect(n.left,n.top,n.width,i.bottom-n.top),e.ownerDocument,c);return o?s:T(s,r)}if(!e.current)return;const{parentNode:i}=e.current,s=i.getBoundingClientRect();return o?s:T(s,i)}(z,y,v,O,j,U.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=U.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 c;F&&(r=null===(c=U.current.closest(".popover-slot"))||void 0===c?void 0:c.parentNode);const i=Z.height?Z:H.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:g,contentHeight:h,contentWidth:E}=function(e,t,n="top",r,o,c,i,s,a){const[l,u="center",d]=n.split(" "),p=function(e,t,n,r,o,c,i,s){const{height:a}=t;if(o){const t=o.getBoundingClientRect().top+a-i;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-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={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};let b,m=n,f=null;if(!o&&!s)if("middle"===n&&u.contentHeight===a)m="middle";else if("top"===n&&d.contentHeight===a)m="top";else if("bottom"===n&&p.contentHeight===a)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;f=e!==a?e:null}return b="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:b,contentHeight:f}}(e,t,l,d,r,0,c,s);return{...function(e,t,n,r,o,c,i,s,a){const{width:l}=t;"left"===n&&Object(b.isRTL)()?n="right":"right"===n&&Object(b.isRTL)()&&(n="left"),"left"===r&&Object(b.isRTL)()?r="right":"right"===r&&Object(b.isRTL)()&&(r="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===r?p=e.right:"middle"===c||a||(p=u);let m=e.right;"left"===r?m=e.left:"middle"===c||a||(m=u);const f={popoverLeft:p,contentWidth:p-l>0?l:p},g={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let h,E=n,O=null;if(!o&&!s)if("center"===n&&d.contentWidth===l)E="center";else if("left"===n&&f.contentWidth===l)E="left";else if("right"===n&&g.contentWidth===l)E="right";else{E=f.contentWidth>g.contentWidth?"left":"right";const e="left"===E?f.contentWidth:g.contentWidth;l>window.innerWidth&&(O=window.innerWidth),e!==l&&(E="center",d.popoverLeft=window.innerWidth/2)}if(h="center"===E?d.popoverLeft:"left"===E?f.popoverLeft:g.popoverLeft,i){const e=i.getBoundingClientRect();h=Math.min(h,e.right-l),Object(b.isRTL)()||(h=Math.max(h,0))}return{xAxis:E,popoverLeft:h,contentWidth:O}}(e,t,u,d,r,p.yAxis,i,s,a),...p}}(e,i,f,S,U.current,o,r,I,D);"number"==typeof l&&"number"==typeof u&&(A(U.current,"top",l+"px"),A(U.current,"left",u+"px")),B(U.current,"is-without-arrow",s||"center"===p&&"middle"===g),B(U.current,"is-alternate",a),L(U.current,"data-x-axis",p),L(U.current,"data-y-axis",g),A(H.current,"maxHeight","number"==typeof h?h+"px":""),A(H.current,"maxWidth","number"==typeof E?E+"px":""),Q(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[g]||"middle"))};e();const{ownerDocument:t}=U.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const c=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",c),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const i=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(O);let l;return i&&i!==t&&(i.defaultView.addEventListener("resize",e),i.defaultView.addEventListener("scroll",e,!0)),M&&(l=new n.MutationObserver(e),l.observe(M,{attributes:!0})),()=>{n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",c),n.cancelAnimationFrame(o),i&&i!==t&&(i.defaultView.removeEventListener("resize",e),i.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[X,y,v,O,j,f,Z,S,M,F]);const $=(e,n)=>{if("focus-outside"===e&&C)C(n);else if("focus-outside"===e&&k){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>n.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),k(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:h,__unstableOnClose:$,onClose:$}),ne=Object(u.useMergeRefs)([U,ee,W]),re=Boolean(x&&q)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:n=R(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:q});let oe=Object(o.createElement)("div",Object(r.a)({className:i()("components-popover",c,re,{"is-expanded":X,"is-without-arrow":s,"is-alternate":a})},V,{ref:ne},te,{tabIndex:"-1"}),X&&Object(o.createElement)(E,null),X&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(G,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:H,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,n)));return K.ref&&(oe=Object(o.createElement)(N,{name:P},oe)),O||y?oe:Object(o.createElement)("span",{ref:z},oe)});M.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(P,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var F=M,I=function({shortcut:e,className:t}){if(!e)return null;let n,r;return Object(s.isString)(e)&&(n=e),Object(s.isObject)(e)&&(n=e.display,r=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":r},n)};const D=Object(o.createElement)("div",{className:"event-catcher"}),V=({eventHandlers:e,child:t,childrenWithPopover:n})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(D,e),Object(o.cloneElement)(t,{children:n}),","),e),W=({child:e,eventHandlers:t,childrenWithPopover:n})=>Object(o.cloneElement)(e,{...t,children:n}),z=(e,t,n)=>{if(1!==o.Children.count(e))return;const r=o.Children.only(e);"function"==typeof r.props[t]&&r.props[t](n)};var H=function({children:e,position:t,text:n,shortcut:r}){const[c,i]=Object(o.useState)(!1),[a,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{z(e,"onMouseDown",t),document.addEventListener("mouseup",f),i(!0)},b=t=>{z(e,"onMouseUp",t),document.removeEventListener("mouseup",f),i(!1)},m=e=>"mouseUp"===e?b:"mouseDown"===e?p:void 0,f=m("mouseUp"),g=(t,n)=>r=>{if(z(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&c)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],r.type);o!==a&&(n?d(o):l(o))},h=()=>{d.cancel(),document.removeEventListener("mouseup",f)};if(Object(o.useEffect)(()=>h,[]),1!==o.Children.count(e))return e;const E={onMouseEnter:g("onMouseEnter",!0),onMouseLeave:g("onMouseLeave"),onClick:g("onClick"),onFocus:g("onFocus"),onBlur:g("onBlur"),onMouseDown:m("mouseDown")},O=o.Children.only(e),{children:w,disabled:j}=O.props;return(j?V:W)({child:O,eventHandlers:E,childrenWithPopover:(({grandchildren:e,isOver:t,position:n,text:r,shortcut:c})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(F,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(o.createElement)(I,{className:"components-tooltip__shortcut",shortcut:c}))))({grandchildren:w,isOver:a,position:t,text:n,shortcut:r})})},U=n(46),Y=n(47);const q=["onMouseDown","onClick"];var G=t.a=Object(o.forwardRef)((function(e,t){const{href:n,target:c,isSmall:a,isPressed:u,isBusy:d,isDestructive:p,className:b,disabled:m,icon:f,iconPosition:g="left",iconSize:h,showTooltip:E,tooltipPosition:O,shortcut:w,label:j,children:y,text:v,variant:_,__experimentalIsFocusable:x,describedBy:k,...C}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,variant:c,...i}){let s=c;var a,u,d,p,b;return t&&(null!==(a=s)&&void 0!==a||(s="primary")),r&&(null!==(u=s)&&void 0!==u||(s="tertiary")),n&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(b=s)&&void 0!==b||(s="link")),{...i,variant:s}}(e),S=i()("components-button",b,{"is-secondary":"secondary"===_,"is-primary":"primary"===_,"is-small":a,"is-tertiary":"tertiary"===_,"is-pressed":u,"is-busy":d,"is-link":"link"===_,"is-destructive":p,"has-text":!!f&&!!y,"has-icon":!!f}),N=m&&!x,P=void 0===n||N?"button":"a",R="a"===P?{href:n,target:c}:{type:"button",disabled:N,"aria-pressed":u};if(m&&x){R["aria-disabled"]=!0;for(const e of q)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const T=!N&&(E&&j||w||!!j&&(!y||Object(s.isArray)(y)&&!y.length)&&!1!==E),L=k?Object(s.uniqueId)():null,A=C["aria-describedby"]||L,B=Object(o.createElement)(P,Object(r.a)({},R,C,{className:S,"aria-label":C["aria-label"]||j,"aria-describedby":A,ref:t}),f&&"left"===g&&Object(o.createElement)(U.a,{icon:f,size:h}),v&&Object(o.createElement)(o.Fragment,null,v),f&&"right"===g&&Object(o.createElement)(U.a,{icon:f,size:h}),y);return T?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(H,{text:k||j,shortcut:w,position:O},B),k&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:L},k))):Object(o.createElement)(o.Fragment,null,B,k&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:L},k)))}))},,,,function(e,t){e.exports=window.wp.dom},,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),o=n(9),c=n(0),i=n(17),s=n(54);const a=e=>{const{namespace:t,resourceName:n,resourceValues:a=[],query:l={},shouldSelect:u=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(c.useRef)({results:[],isLoading:!0}),p=Object(i.a)(l),b=Object(i.a)(a),m=Object(s.a)(),f=Object(o.useSelect)(e=>{if(!u)return null;const o=e(r.COLLECTIONS_STORE_KEY),c=[t,n,p,b],i=o.getCollectionError(...c);return i&&m(i),{results:o.getCollection(...c),isLoading:!o.hasFinishedResolution("getCollection",c)}},[t,n,b,p,u]);return null!==f&&(d.current=f),d.current}},function(e,t){var n,r,o=e.exports={};function c(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===c||!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:c}catch(e){n=c}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var a,l=[],u=!1,d=-1;function p(){u&&a&&(u=!1,a.length?l=a.concat(l):d=-1,l.length&&b())}function b(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(a=l,l=[];++d1)for(var n=1;n{let{bubbles:n=!1,cancelable:o=!1,element:c,detail:i={}}=t;if(!r)return;c||(c=document.body);const s=new r(e,{bubbles:n,cancelable:o,detail:i});c.dispatchEvent(s)};let c;const i=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})},function(e,t,n){"use strict";var r=n(10),o=n.n(r),c=n(0);n(101);const i=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const n=Object(c.useRef)(null);return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:n,"aria-hidden":!0}),Object(c.createElement)(e,o()({},t,{scrollToTop:e=>{null!==n.current&&((e,t)=>{const{focusableSelector:n}=t||{};window&&Number.isFinite(window.innerHeight)&&(n?((e,t)=>{var n;const r=(null===(n=e.parentElement)||void 0===n?void 0:n.querySelectorAll(t))||[];if(r.length){const e=r[0];i(e),null==e||e.focus()}else i(e)})(e,n):i(e))})(n.current,e)}})))}},,,function(e,t){},,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return g}));var r=n(0),o=(n(8),n(9)),c=n(38),i=n(18),s=n(10),a=n.n(s),l=n(4),u=n.n(l),d=n(116);n(74);const p=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 b=e=>{let{className:t,notices:n,removeNotice:o}=e;const c=n.filter(e=>"snackbar"!==e.type);if(!c.length)return null;const i=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:i},c.map(e=>Object(r.createElement)(d.a,a()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,n)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),f=()=>Object(r.useContext)(m),g=e=>{let{children:t,className:n="",createNoticeContainer:s=!0,context:a="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(r.useState)(!1),{dispatchStoreEvent:f}=Object(c.a)(),{isEditor:g}=Object(i.a)(),h=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...n,context:n.context||a}),f("store-notice-create",{status:e,content:t,options:n})}),[l,f,a]),E=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;u(e,t)}),[u,a]),{notices:O}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(a)}),[a]),w={notices:O,createNotice:h,removeNotice:E,context:a,setIsSuppressed:p},j=d?null:Object(r.createElement)(b,{className:n,notices:w.notices,removeNotice:w.removeNotice,isEditor:g});return Object(r.createElement)(m.Provider,{value:w},s&&j,t)}},,,function(e,t,n){"use strict";var r=n(0),o=n(24);const c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},,,,,,,,function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null}},,,function(e,t){},,function(e,t,n){"use strict";var r=n(0),o=(n(8),n(4)),c=n.n(o),i=n(21),s=n(12);n(115),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:n,label:o,onChange:s,options:a,screenReaderLabel:l,readOnly:u,value:d}=e;const p="wc-block-components-sort-select__select-"+n;return Object(r.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(r.createElement)(i.a,{label:o,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:p}}),Object(r.createElement)("select",{id:p,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,readOnly:u,value:d},a.map(e=>Object(r.createElement)("option",{key:e.key,value:e.key},e.label))))})},,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return a}));var r=n(2),o=n(50),c=n(34);const i=e=>{let{country:t="",state:n="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:n.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(c.isEmail)(t)?t.trim():""},a=e=>{const t=Object.keys(r.defaultAddressFields),n=Object(o.a)(t,{},e.country),c=Object.assign({},e);return n.forEach(t=>{let{key:n="",hidden:r=!1}=t;r&&((e,t)=>e in t)(n,e)&&(c[n]="")}),c}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},function(e,t){},function(e,t,n){"use strict";var r=n(0),o=n(5),c=n(4),i=n.n(c),s=n(1),a=n(23),l=n(90),u=n(56);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:n,spokenMessage:c=n,onRemove:p=o.noop,isDismissible:b=!0,actions:m=[],politeness:f=d(t),__unstableHTML:g,onDismiss:h=o.noop}){!function(e,t){const n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)(()=>{n&&Object(a.speak)(n,t)},[n,t])}(c,f);const E=i()(e,"components-notice","is-"+t,{"is-dismissible":b});return g&&(n=Object(r.createElement)(r.RawHTML,null,n)),Object(r.createElement)("div",{className:E},Object(r.createElement)("div",{className:"components-notice__content"},n,Object(r.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:n,variant:o,noDefaultClasses:c=!1,onClick:s,url:a},l)=>{let d=o;return"primary"===o||c||(d=a?"link":"secondary"),void 0===d&&n&&(d="primary"),Object(r.createElement)(u.a,{key:l,href:a,variant:d,onClick:a?void 0:s,className:i()("components-notice__action",e)},t)}))),b&&Object(r.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),h(),p()},showTooltip:!1}))}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(14),o=n(0),c=n(66);n.p=c.k,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([n.e(1),n.e(11)]).then(n.bind(null,362)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>n.e(10).then(n.bind(null,395)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>n.e(18).then(n.bind(null,396)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>n.e(12).then(n.bind(null,363)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>n.e(8).then(n.bind(null,364)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>n.e(16).then(n.bind(null,365)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>n.e(13).then(n.bind(null,285)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>n.e(14).then(n.bind(null,366)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>n.e(9).then(n.bind(null,367)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>n.e(17).then(n.bind(null,368)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>n.e(15).then(n.bind(null,369)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([n.e(0),n.e(49),n.e(7)]).then(n.bind(null,382)))});const i=e=>Object(r.getRegisteredBlockComponents)(e)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.blocks},,,,,,,,,function(e,t,n){e.exports=n(199)},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(0),o=n(87),c=n(53),i=n(3),s=(n(8),n(1)),a=n(5),l=n(4),u=n.n(l),d=n(21);n(178);const p=e=>{let{currentPage:t,displayFirstAndLastPages:n,displayNextAndPreviousArrows:o,pagesToDisplay:c,onPageChange:i,totalPages:a}=e,{minIndex:l,maxIndex:p}=((e,t,n)=>{if(n<=2)return{minIndex:null,maxIndex:null};const r=e-1,o=Math.max(Math.floor(t-r/2),2),c=Math.min(Math.ceil(t+(r-(t-o))),n-1);return{minIndex:Math.max(Math.floor(t-(r-(c-t))),2),maxIndex:c}})(c,t,a);const b=n&&Boolean(1!==l),m=n&&Boolean(p!==a),f=n&&Boolean(l>3),g=n&&Boolean(pi(t-1),title:Object(s.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(r.createElement)(d.a,{label:"←",screenReaderLabel:Object(s.__)("Previous page","woo-gutenberg-products-block")})),b&&Object(r.createElement)("button",{className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:()=>i(1),disabled:1===t},Object(r.createElement)(d.a,{label:1,screenReaderLabel:Object(s.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(s.__)("Page %d","woo-gutenberg-products-block"),1)})),f&&Object(r.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),h.map(e=>Object(r.createElement)("button",{key:e,className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:()=>i(e),disabled:t===e},Object(r.createElement)(d.a,{label:e,screenReaderLabel:Object(s.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(s.__)("Page %d","woo-gutenberg-products-block"),e)}))),g&&Object(r.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(s.__)("…","woo-gutenberg-products-block")),m&&Object(r.createElement)("button",{className:u()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===a,"wc-block-components-pagination__page--active":t===a}),onClick:()=>i(a),disabled:t===a},Object(r.createElement)(d.a,{label:a,screenReaderLabel:Object(s.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(s.__)("Page %d","woo-gutenberg-products-block"),a)})),o&&Object(r.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>i(t+1),title:Object(s.__)("Next page","woo-gutenberg-products-block"),disabled:t>=a},Object(r.createElement)(d.a,{label:"→",screenReaderLabel:Object(s.__)("Next page","woo-gutenberg-products-block")})))};p.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var b=p,m=n(62),f=n(39),g=n(64),h=n(6),E=n(9),O=n(17);var w=n(38),j=n(71),y=n(49),v=n(23),_=n(98),x=n(24),k=Object(r.createElement)(x.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"})),C=()=>{const{parentClassName:e}=Object(y.useInnerBlockLayoutContext)();return Object(r.createElement)("div",{className:e+"__no-products"},Object(r.createElement)(_.a,{className:e+"__no-products-image",alt:"",srcElement:k,size:100}),Object(r.createElement)("strong",{className:e+"__no-products-title"},Object(s.__)("No products","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:e+"__no-products-description"},Object(s.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},S=Object(r.createElement)(x.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"})),N=e=>{let{resetCallback:t=(()=>{})}=e;const{parentClassName:n}=Object(y.useInnerBlockLayoutContext)();return Object(r.createElement)("div",{className:n+"__no-products"},Object(r.createElement)(_.a,{className:n+"__no-products-image",alt:"",srcElement:S,size:100}),Object(r.createElement)("strong",{className:n+"__no-products-title"},Object(s.__)("No products found","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:n+"__no-products-description"},Object(s.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(r.createElement)("button",{onClick:t},Object(s.__)("Reset Search","woo-gutenberg-products-block")))},P=n(103);n(177);var R=e=>{let{onChange:t,readOnly:n,value:o}=e;return Object(r.createElement)(P.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",name:"orderby",onChange:t,options:[{key:"menu_order",label:Object(s.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(s.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(s.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(s.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(s.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(s.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:n,screenReaderLabel:Object(s.__)("Order products by","woo-gutenberg-products-block"),value:o})},T=n(12),L=n(10),A=n.n(L),B=n(125);const M=(e,t,n,o)=>{if(!n)return;const c=Object(B.a)(e);return n.map((n,i)=>{let[s,a={}]=n,l=[];a.children&&a.children.length>0&&(l=M(e,t,a.children,o));const u=c[s];if(!u)return null;const d=t.id||0,p=["layout",s,i,o,d];return Object(r.createElement)(r.Suspense,{key:p.join("_"),fallback:Object(r.createElement)("div",{className:"wc-block-placeholder"})},Object(r.createElement)(u,A()({},a,{children:l,product:t})))})};var F=Object(T.withInstanceId)(e=>{let{product:t,attributes:n,instanceId:o}=e;const{layoutConfig:c}=n,{parentClassName:i,parentName:s}=Object(y.useInnerBlockLayoutContext)(),a=0===Object.keys(t).length,l=u()(i+"__product","wc-block-layout",{"is-loading":a});return Object(r.createElement)("li",{className:l,"aria-hidden":a},M(s,t,c,o))});n(176);const I=function(e){let{totalQuery:t,totalProducts:n}=e,{totalQuery:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!Object(a.isEqual)(t,r)&&Number.isFinite(n)};var D=Object(j.a)(e=>{let{attributes:t,currentPage:n,onPageChange:o,onSortChange:c,sortValue:i,scrollToTop:l}=e;const[d,p]=Object(f.b)("attributes",[]),[j,_]=Object(f.b)("stock_status",[]),[x,k]=Object(f.b)("min_price"),[S,P]=Object(f.b)("max_price"),[T]=Object(f.c)((e=>{let{sortValue:t,currentPage:n,attributes:r}=e;const{columns:o,rows:c}=r;return{...(e=>{switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}})(t),catalog_visibility:"catalog",per_page:o*c,page:n}})({attributes:t,sortValue:i,currentPage:n})),{products:L,totalProducts:A,productsLoading:B}=(e=>{const t={namespace:"/wc/store",resourceName:"products"},{results:n,isLoading:r}=Object(g.a)({...t,query:e}),{value:o}=((e,t)=>{const{namespace:n,resourceName:r,resourceValues:o=[],query:c={}}=t;if(!n||!r)throw new Error("The options object must have valid values for the namespace and the resource name properties.");const i=Object(O.a)(c),s=Object(O.a)(o),{value:a,isLoading:l=!0}=Object(E.useSelect)(e=>{const t=e(h.COLLECTIONS_STORE_KEY),o=["x-wp-total",n,r,i,s];return{value:t.getCollectionHeader(...o),isLoading:t.hasFinishedResolution("getCollectionHeader",o)}},["x-wp-total",n,r,s,i]);return{value:a,isLoading:l}})(0,{...t,query:e});return{products:n,totalProducts:parseInt(o,10),productsLoading:r}})(T),{parentClassName:M,parentName:D}=Object(y.useInnerBlockLayoutContext)(),V=(e=>{const{order:t,orderby:n,page:r,per_page:o,...c}=e;return c||{}})(T),{dispatchStoreEvent:W}=Object(w.a)(),z=Object(m.a)({totalQuery:V,totalProducts:A},I);Object(r.useEffect)(()=>{W("product-list-render",{products:L,listName:D})},[L,D,W]),Object(r.useEffect)(()=>{Object(a.isEqual)(V,null==z?void 0:z.totalQuery)||(o(1),null!=z&&z.totalQuery&&(e=>{Number.isFinite(e)&&(0===e?Object(v.speak)(Object(s.__)("No products found","woo-gutenberg-products-block")):Object(v.speak)(Object(s.sprintf)( +/* translators: %s is an integer higher than 0 (1, 2, 3...) */ +Object(s._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))})(A))},[null==z?void 0:z.totalQuery,A,o,V]);const{contentVisibility:H}=t,U=t.columns*t.rows,Y=!Number.isFinite(A)&&Number.isFinite(null==z?void 0:z.totalProducts)&&Object(a.isEqual)(V,null==z?void 0:z.totalQuery)?Math.ceil(z.totalProducts/U):Math.ceil(A/U),q=L.length?L:Array.from({length:U}),G=0!==L.length||B,Q=d.length>0||j.length>0||Number.isFinite(x)||Number.isFinite(S);return Object(r.createElement)("div",{className:(()=>{const{columns:e,rows:n,alignButtons:r,align:o}=t,c=void 0!==o?"align"+o:"";return u()(M,c,"has-"+e+"-columns",{"has-multiple-rows":n>1,"has-aligned-buttons":r})})()},H.orderBy&&G&&Object(r.createElement)(R,{onChange:c,value:i}),!G&&Q&&Object(r.createElement)(N,{resetCallback:()=>{p([]),_([]),k(null),P(null)}}),!G&&!Q&&Object(r.createElement)(C,null),G&&Object(r.createElement)("ul",{className:M+"__products"},q.map((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return Object(r.createElement)(F,{key:e.id||n,attributes:t,product:e})}))),Y>1&&Object(r.createElement)(b,{currentPage:n,onPageChange:e=>{l({focusableSelector:"a, button"}),o(e)},totalPages:Y}))}),V=e=>{let{attributes:t}=e;const[n,o]=Object(r.useState)(1),[c,i]=Object(r.useState)(t.orderby);return Object(r.useEffect)(()=>{i(t.orderby)},[t.orderby]),Object(r.createElement)(D,{attributes:t,currentPage:n,onPageChange:e=>{o(e)},onSortChange:e=>{const t=e.target.value;i(t),o(1)},sortValue:c})};const W=Object(r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(r.createElement)("title",null,"Grid Block Preview"),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(r.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(r.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}));class z extends i.Component{render(){const{attributes:e,urlParameterSuffix:t}=this.props;return e.isPreview?W:Object(r.createElement)(y.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(r.createElement)(V,{attributes:e,urlParameterSuffix:t}))}}var H=z;Object(c.a)({selector:".wp-block-woocommerce-all-products",Block:e=>Object(r.createElement)(o.a,{context:"wc/all-products"},Object(r.createElement)(H,e)),getProps:e=>({attributes:JSON.parse(e.dataset.attributes)})})}]); \ No newline at end of file diff --git a/build/all-products.asset.php b/build/all-products.asset.php new file mode 100644 index 00000000000..c38545c9a6c --- /dev/null +++ b/build/all-products.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '4cef5e52331e08259c617ba8c4494405'); \ No newline at end of file diff --git a/build/all-products.js b/build/all-products.js new file mode 100644 index 00000000000..1f63b4a2450 --- /dev/null +++ b/build/all-products.js @@ -0,0 +1,34 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-products"]=function(e){function t(t){for(var o,a,s=t[0],l=t[1],i=t[2],d=0,b=[];dObject(n.sprintf)( +/* translators: Number of items selected from list. */ +Object(n._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Search results updated.","woo-gutenberg-products-block")},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(r.groupBy)(e,"parent"),o=Object(r.keyBy)(t,"id"),n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=n(o[e.parent]);return[...t,e.name]},a=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:n(o[e.parent]),children:t&&t.length?a(t):[]}}),s=a(c[0]||[]);return delete c[0],Object(r.forEach)(c,e=>{s.push(...a(e||[]))}),s},l=(e,t,c)=>{if(!t)return c?s(e):e;const o=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),r=e.map(e=>!!o.test(e.name)&&e).filter(Boolean);return c?s(r,e):r},i=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(o.createElement)(o.Fragment,{key:c},Object(o.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},function(e,t){e.exports=window.wp.primitives},,,,,,,function(e,t,c){"use strict";c.d(t,"o",(function(){return n})),c.d(t,"m",(function(){return a})),c.d(t,"l",(function(){return s})),c.d(t,"n",(function(){return l})),c.d(t,"j",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return b})),c.d(t,"k",(function(){return p})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"h",(function(){return O})),c.d(t,"a",(function(){return h})),c.d(t,"i",(function(){return j})),c.d(t,"b",(function(){return E}));var o,r=c(2);const n=Object(r.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=n.pluginUrl+"images/",s=n.pluginUrl+"build/",l=n.buildPhase,i=null===(o=r.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,u=r.STORE_PAGES.checkout.id,d=r.STORE_PAGES.checkout.permalink,b=r.STORE_PAGES.privacy.permalink,p=(r.STORE_PAGES.privacy.title,r.STORE_PAGES.terms.permalink),m=(r.STORE_PAGES.terms.title,r.STORE_PAGES.cart.id),g=r.STORE_PAGES.cart.permalink,O=(r.STORE_PAGES.myaccount.permalink?r.STORE_PAGES.myaccount.permalink:Object(r.getSetting)("wpLoginUrl","/wp-login.php"),Object(r.getSetting)("shippingCountries",{})),h=Object(r.getSetting)("allowedCountries",{}),j=Object(r.getSetting)("shippingStates",{}),E=Object(r.getSetting)("allowedStates",{})},function(e,t){e.exports=window.wp.isShallowEqual},function(e,t,c){"use strict";c.d(t,"h",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return p})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return g})),c.d(t,"g",(function(){return O})),c.d(t,"a",(function(){return h}));var o=c(15),r=c(11),n=c.n(r),a=c(6),s=c(2),l=c(25);const i=e=>{let{selected:t=[],search:c="",queryArgs:r={}}=e;const s=(e=>{let{selected:t=[],search:c="",queryArgs:r={}}=e;const n=l.o.productCount>100,a={per_page:n?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},s=[Object(o.addQueryArgs)("/wc/store/products",{...a,...r})];return n&&t.length&&s.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:c,queryArgs:r});return Promise.all(s.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),p=e=>{let{selected:t=[],search:c}=e;const r=(e=>{let{selected:t=[],search:c}=e;const r=Object(s.getSetting)("limitTags",!1),n=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:r?100:0,orderby:r?"count":"name",order:r?"desc":"asc",search:c})];return r&&t.length&&n.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:c});return Promise.all(r.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},m=e=>n()({path:Object(o.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/products/categories/"+e}),O=e=>n()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));var o=c(1);const r=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t){e.exports=window.wc.wcBlocksSharedContext},function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r);t.a=e=>{let t,{label:c,screenReaderLabel:r,wrapperElement:a,wrapperProps:s={}}=e;const l=null!=c,i=null!=r;return!l&&i?(t=a||"span",s={...s,className:n()(s.className,"screen-reader-text")},Object(o.createElement)(t,s,r)):(t=a||o.Fragment,l&&i&&c!==r?Object(o.createElement)(t,s,Object(o.createElement)("span",{"aria-hidden":"true"},c),Object(o.createElement)("span",{className:"screen-reader-text"},r)):Object(o.createElement)(t,s,c))}},function(e,t){e.exports=window.wp.escapeHtml},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(31);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(o.createElement)("span",null,Object(r.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===c?Object(o.createElement)("span",null,Object(r.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(r.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var o=c(5),r=c.n(o),n=c(0),a=c(17);const s=e=>{let{countLabel:t,className:c,depth:o=0,controlId:s="",item:l,isSelected:i,isSingle:u,onSelect:d,search:b="",...p}=e;const m=null!=t&&void 0!==l.count&&null!==l.count,g=[c,"woocommerce-search-list__item"];g.push("depth-"+o),u&&g.push("is-radio-button"),m&&g.push("has-count");const O=l.breadcrumbs&&l.breadcrumbs.length,h=p.name||"search-list-item-"+s,j=`${h}-${l.id}`;return Object(n.createElement)("label",{htmlFor:j,className:g.join(" ")},u?Object(n.createElement)("input",r()({type:"radio",id:j,name:h,value:l.value,onChange:d(l),checked:i,className:"woocommerce-search-list__item-input"},p)):Object(n.createElement)("input",r()({type:"checkbox",id:j,name:h,value:l.value,onChange:d(l),checked:i,className:"woocommerce-search-list__item-input"},p)),Object(n.createElement)("span",{className:"woocommerce-search-list__item-label"},O?Object(n.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(a.b)(l.breadcrumbs)):null,Object(n.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(a.d)(l.name,b))),!!m&&Object(n.createElement)("span",{className:"woocommerce-search-list__item-count"},t||l.count))};t.b=s},function(e,t){e.exports=window.wc.priceFormat},function(e,t,c){"use strict";c.d(t,"a",(function(){return w}));var o=c(6),r=c(0),n=c(16),a=c(13),s=c(14),l=c(149),i=c(248),u=c(49),d=c(247);const b=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(n.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(r.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",b),document.body.addEventListener("wc-blocks_removed_from_cart",b),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",b),document.body.removeEventListener("wc-blocks_removed_from_cart",b)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},O={...g,email:""},h={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:n.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},j=e=>Object(l.a)(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(s.decodeEntities)(c)]})),E={cartCoupons:n.EMPTY_CART_COUPONS,cartItems:n.EMPTY_CART_ITEMS,cartFees:n.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:h,cartIsLoading:!0,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:O,shippingAddress:g,shippingRates:n.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:n.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:n.EMPTY_EXTENSIONS},w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(u.b)(),s=null==c?void 0:c.previewCart,{shouldSelect:l}=e,d=Object(r.useRef)();m();const b=Object(a.useSelect)((e,c)=>{let{dispatch:o}=c;if(!l)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:O,shippingAddress:g,extensions:n.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const r=e(n.CART_STORE_KEY),a=r.getCartData(),u=r.getCartErrors(),d=r.getCartTotals(),b=!r.hasFinishedResolution("getCartData"),p=r.isCustomerDataUpdating(),{receiveCart:m}=o(n.CART_STORE_KEY),h=j(a.billingAddress),w=a.needsShipping?j(a.shippingAddress):h,_=a.fees.length>0?a.fees.map(e=>j(e)):n.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):n.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:_,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:b,cartErrors:u,billingAddress:Object(i.a)(h),shippingAddress:Object(i.a)(w),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:p,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}},[l]);return d.current&&Object(o.isEqual)(d.current,b)||(d.current=b),d.current}},,,function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var o=c(0),r=c(26),n=c.n(r);function a(e){const t=Object(o.useRef)(e);return n()(e,t.current)||(t.current=e),t.current}},function(e,t,c){"use strict";var o=c(5),r=c.n(o),n=c(0),a=c(132),s=c(4),l=c.n(s);c(138);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:o,onValueChange:s,displayType:u="text",...d}=e;const b="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(b))return null;const p=b/10**o.minorUnit;if(!Number.isFinite(p))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...i(o),value:void 0,currency:void 0,onValueChange:void 0},O=s?e=>{const t=+e.value*10**o.minorUnit;s(t)}:()=>{};return Object(n.createElement)(a.a,r()({className:m,displayType:u},g,{value:p,onValueChange:O}))}},,function(e,t,c){"use strict";var o=c(0);t.a=function(e){let{srcElement:t,size:c=24,...r}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:c,height:c,...r}):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return i})),c.d(t,"c",(function(){return d}));var o=c(85);let r,n;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(r||(r={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(n||(n={}));const a=(e,t)=>Object(o.b)(e)&&"type"in e&&e.type===t,s=e=>a(e,r.SUCCESS),l=e=>a(e,r.ERROR),i=e=>a(e,r.FAIL),u=e=>!Object(o.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:r,noticeContexts:n,shouldRetry:u,isSuccessResponse:s,isErrorResponse:l,isFailResponse:i})},,function(e,t){e.exports=window.wp.a11y},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(0),r=c(128);const n=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:n}=Object(r.b)(),a=Object(o.useRef)(e);Object(o.useEffect)(()=>{a.current=e},[e]);const s=Object(o.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),l=Object(o.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...s,...l,setIsSuppressed:n}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(0);const r=Object(o.createContext)("page"),n=()=>Object(o.useContext)(r);r.Provider},function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var o=c(0),r=c(13);const n=Object(o.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),a=()=>Object(o.useContext)(n),s=e=>{let{children:t,currentPostId:c=0,currentView:a="",previewData:s={}}=e;const l=Object(r.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),i=Object(o.useCallback)(e=>e in s?s[e]:{},[s]),u={isEditor:!0,currentPostId:l,currentView:a,previewData:s,getPreviewData:i};return Object(o.createElement)(n.Provider,{value:u},t)}},,,,,function(e,t){e.exports=window.wc.wcBlocksSharedHocs},function(e,t,c){"use strict";var o=c(5),r=c.n(o),n=c(0),a=c(6),s=c(4),l=c.n(s),i=c(3),u=c(9);c(82);class d extends n.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:c,className:o,help:s,options:u,value:d}=this.props,b="inspector-toggle-button-control-"+c;let p;return s&&(p=Object(a.isFunction)(s)?s(t):s),Object(n.createElement)(i.BaseControl,{id:b,help:p,className:l()("components-toggle-button-control",o)},Object(n.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(n.createElement)(i.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((t,c)=>{const o={};return d===t.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(n.createElement)(i.Button,r()({key:`${t.label}-${t.value}-${c}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},o),t.label)})))}}t.a=Object(u.withInstanceId)(d)},,,,function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(6),a=(c(10),c(3));t.a=e=>{let{columns:t,rows:c,setAttributes:s,alignButtons:l,minColumns:i=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.RangeControl,{label:Object(r.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,i,u);s({columns:Number.isNaN(t)?"":t})},min:i,max:u}),Object(o.createElement)(a.RangeControl,{label:Object(r.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(n.clamp)(e,d,b);s({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(o.createElement)(a.ToggleControl,{label:Object(r.__)("Align Last Block","woo-gutenberg-products-block"),help:l?Object(r.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(r.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:l,onChange:()=>s({alignButtons:!l})}))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var o=c(61),r=c(0),n=c(36);const a=()=>{const e=Object(n.a)(),t=Object(r.useRef)(e);return Object(r.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(r.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(o.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t){e.exports=window.wp.hooks},,,,function(e,t){e.exports=window.wp.deprecated},,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return d})),c.d(t,"b",(function(){return b})),c.d(t,"c",(function(){return p}));var o=c(16),r=c(13),n=c(0),a=c(26),s=c.n(a),l=c(40),i=c(108),u=c(48);const d=e=>{const t=Object(u.a)();e=e||t;const c=Object(r.useSelect)(t=>t(o.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:a}=Object(r.useDispatch)(o.QUERY_STATE_STORE_KEY);return[c,Object(n.useCallback)(t=>{a(e,t)},[e,a])]},b=(e,t,c)=>{const a=Object(u.a)();c=c||a;const s=Object(r.useSelect)(r=>r(o.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:l}=Object(r.useDispatch)(o.QUERY_STATE_STORE_KEY);return[s,Object(n.useCallback)(t=>{l(c,e,t)},[c,e,l])]},p=(e,t)=>{const c=Object(u.a)();t=t||c;const[o,r]=d(t),a=Object(l.a)(o),b=Object(l.a)(e),p=Object(i.a)(b),m=Object(n.useRef)(!1);return Object(n.useEffect)(()=>{s()(p,b)||(r(Object.assign({},a,b)),m.current=!0)},[a,b,p,r]),m.current?[o,r]:[e,r]}},,function(e,t){e.exports=window.wp.autop},,,function(e,t,c){"use strict";var o=c(5),r=c.n(o),n=c(0),a=c(137),s=c(4),l=c.n(s),i=c(99);c(158),t.a=e=>{let{className:t,showSpinner:c=!1,children:o,...s}=e;const u=l()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(n.createElement)(a.a,r()({className:u},s),c&&Object(n.createElement)(i.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},o))}},function(e,t,c){"use strict";c.d(t,"c",(function(){return n})),c.d(t,"d",(function(){return a})),c.d(t,"a",(function(){return s})),c.d(t,"b",(function(){return l}));var o=c(12),r=c(25);const n=(e,t)=>{if(r.n>2)return Object(o.registerBlockType)(e,t)},a=(e,t)=>{if(r.n>1)return Object(o.registerBlockType)(e,t)},s=()=>r.n>2,l=()=>r.n>1},,,function(e,t){e.exports=window.wp.dom},,function(e,t){},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"c",(function(){return r})),c.d(t,"b",(function(){return n})),c.d(t,"d",(function(){return a}));const o=e=>"number"==typeof e,r=e=>"string"==typeof e,n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function a(e,t){return n(e)&&t in e}},function(e,t,c){"use strict";c.d(t,"a",(function(){return v}));var o=c(5),r=c.n(o),n=c(0),a=c(1),s=c(3),l=c(478),i=c(480),u=c(4),d=c.n(u),b=c(9),p=c(17),m=c(34),g=c(479),O=c(14);const h=e=>{let{id:t,label:c,popoverContents:o,remove:r,screenReaderLabel:i,className:u=""}=e;const[p,m]=Object(n.useState)(!1),j=Object(b.useInstanceId)(h);if(i=i||c,!c)return null;c=Object(O.decodeEntities)(c);const E=d()("woocommerce-tag",u,{"has-remove":!!r}),w="woocommerce-tag__label-"+j,_=Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},i),Object(n.createElement)("span",{"aria-hidden":"true"},c));return Object(n.createElement)("span",{className:E},o?Object(n.createElement)(s.Button,{className:"woocommerce-tag__text",id:w,onClick:()=>m(!0)},_):Object(n.createElement)("span",{className:"woocommerce-tag__text",id:w},_),o&&p&&Object(n.createElement)(s.Popover,{onClose:()=>m(!1)},o),r&&Object(n.createElement)(s.Button,{className:"woocommerce-tag__remove",onClick:r(t),label:Object(a.sprintf)(// Translators: %s label. +Object(a.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":w},Object(n.createElement)(l.a,{icon:g.a,size:20,className:"clear-icon"})))};var j=h;const E=e=>Object(n.createElement)(m.b,e),w=e=>{const{list:t,selected:c,renderItem:o,depth:a=0,onSelect:s,instanceId:l,isSingle:i,search:u}=e;return t?Object(n.createElement)(n.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(n.createElement)(n.Fragment,{key:t.id},Object(n.createElement)("li",null,o({item:t,isSelected:d,onSelect:s,isSingle:i,search:u,depth:a,controlId:l})),Object(n.createElement)(w,r()({},e,{list:t.children,depth:a+1})))})):null},_=e=>{let{isLoading:t,isSingle:c,selected:o,messages:r,onChange:l,onRemove:i}=e;if(t||c||!o)return null;const u=o.length;return Object(n.createElement)("div",{className:"woocommerce-search-list__selected"},Object(n.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(n.createElement)("strong",null,r.selected(u)),u>0?Object(n.createElement)(s.Button,{isLink:!0,isDestructive:!0,onClick:()=>l([]),"aria-label":r.clear},Object(a.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(n.createElement)("ul",null,o.map((e,t)=>Object(n.createElement)("li",{key:t},Object(n.createElement)(j,{label:e.name,id:e.id,remove:i})))):null)},f=e=>{let{filteredList:t,search:c,onSelect:o,instanceId:r,...s}=e;const{messages:u,renderItem:d,selected:b,isSingle:p}=s,m=d||E;return 0===t.length?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(n.createElement)(l.a,{icon:i.a})),Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(a.sprintf)(u.noResults,c):u.noItems)):Object(n.createElement)("ul",{className:"woocommerce-search-list__list"},Object(n.createElement)(w,{list:t,selected:b,renderItem:m,onSelect:o,instanceId:r,isSingle:p,search:c}))},v=e=>{const{className:t="",isCompact:c,isHierarchical:o,isLoading:a,isSingle:l,list:i,messages:u=p.a,onChange:m,onSearch:g,selected:O,debouncedSpeak:h}=e,[j,E]=Object(n.useState)(""),w=Object(b.useInstanceId)(v),k=Object(n.useMemo)(()=>({...p.a,...u}),[u]),y=Object(n.useMemo)(()=>Object(p.c)(i,j,o),[i,j,o]);Object(n.useEffect)(()=>{h&&h(k.updated)},[h,k]),Object(n.useEffect)(()=>{"function"==typeof g&&g(j)},[j,g]);const C=Object(n.useCallback)(e=>()=>{l&&m([]);const t=O.findIndex(t=>{let{id:c}=t;return c===e});m([...O.slice(0,t),...O.slice(t+1)])},[l,O,m]),S=Object(n.useCallback)(e=>()=>{-1===O.findIndex(t=>{let{id:c}=t;return c===e.id})?m(l?[e]:[...O,e]):C(e.id)()},[l,C,m,O]);return Object(n.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(n.createElement)(_,r()({},e,{onRemove:C,messages:k})),Object(n.createElement)("div",{className:"woocommerce-search-list__search"},Object(n.createElement)(s.TextControl,{label:k.search,type:"search",value:j,onChange:e=>E(e)})),a?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(n.createElement)(s.Spinner,null)):Object(n.createElement)(f,r()({},e,{search:j,filteredList:y,messages:k,onSelect:S,instanceId:w})))};Object(s.withSpokenMessages)(v)},,function(e,t,c){"use strict";var o=c(5),r=c.n(o),n=c(0),a=c(34),s=c(3),l=c(4),i=c.n(l);t.a=e=>{let{className:t,item:c,isSelected:o,isLoading:l,onSelect:u,disabled:d,...b}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(a.a,r()({},b,{key:c.id,className:t,isSelected:o,item:c,onSelect:u,isSingle:!0,disabled:d})),o&&l&&Object(n.createElement)("div",{key:"loading",className:i()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(n.createElement)(s.Spinner,null)))}},function(e,t,c){"use strict";var o=c(0),r=c(6),n=c(1),a=c(3);function s(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(o.createElement)(a.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(o.createElement)(a.Path,{d:c[t]})):null}class l extends o.Component{createLevelControl(e,t,c){const r=e===t;return{icon:Object(o.createElement)(s,{level:e}),title:Object(n.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(n.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:r,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:n,onChange:l}=this.props;return Object(o.createElement)(a.ToolbarGroup,{isCollapsed:e,icon:Object(o.createElement)(s,{level:n}),controls:Object(r.range)(t,c).map(e=>this.createLevelControl(e,n,l))})}}t.a=l},,function(e,t){e.exports=window.wp.warning},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(43),a=c(120),s=c(2),l=c(7),i=c(29);t.a=e=>{const t=(Object(i.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(o.createElement)(l.InspectorControls,null,Object(o.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(o.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(o.createElement)("a",{href:`${s.ADMIN_URL}post.php?post=${t}&action=edit`,target:"_blank",rel:"noopener noreferrer"},Object(r.__)("Edit this product's details","woo-gutenberg-products-block"),Object(o.createElement)(n.a,{srcElement:a.a,size:16}))),Object(o.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(r.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(0);const r=()=>{const[,e]=Object(o.useState)();return Object(o.useCallback)(t=>{e(()=>{throw t})},[])}},,,,,function(e,t,c){"use strict";var o=c(2),r=c(1),n=c(85);const a=Object(o.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(r.sprintf)( +/* translators: %s Field label. */ +Object(r.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(n.a)(e.priority)&&(t.index=e.priority),Object(n.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(a).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,s(c)]}).reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{})]}).reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const r=c&&void 0!==l[c]?l[c]:{};return e.map(e=>({key:e,...o.defaultAddressFields[e]||{},...r[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var o=c(0);c(159),t.a=()=>Object(o.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},function(e,t){e.exports=window.wp.wordcount},function(e,t,c){"use strict";var o=c(5),r=c.n(o),n=c(0),a=c(1),s=c(6),l=(c(10),c(34)),i=c(86),u=c(9),d=Object(u.createHigherOrderComponent)(e=>{class t extends n.Component{render(){const{selected:t}=this.props,c=null==t;return Object(n.createElement)(e,r()({},this.props,{selected:c?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),b=c(191),p=c(24),m=c.n(p),g=c(26),O=c.n(g),h=c(27),j=c(28),E=Object(u.createHigherOrderComponent)(e=>{class t extends n.Component{constructor(){super(...arguments),m()(this,"state",{error:null,loading:!1,variations:{}}),m()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:c}=this.state;if(t)return;const o=this.getExpandedProduct();if(!o||c[o])return;const r=e.find(e=>e.id===o);r.variations&&0!==r.variations.length?(this.setState({loading:!0}),Object(h.g)(o).then(e=>{const t=e.map(e=>({...e,parent:o}));this.setState({variations:{...this.state.variations,[o]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(j.a)(e);this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:c,showVariations:o}=this.props;o&&(!O()(e.selected,c)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:c}=t;return c===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:c}=this.props;if(!c)return null;let o=t&&t.length?t[0]:null;return o?this.prevSelectedItem=o:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(o=this.prevSelectedItem)),!e&&o?this.isProductId(o)?o:this.findParentProduct(o):null}render(){const{error:t,isLoading:c}=this.props,{error:o,loading:a,variations:s}=this.state;return Object(n.createElement)(e,r()({},this.props,{error:o||t,expandedProduct:this.getExpandedProduct(),isLoading:c,variations:s,variationsLoading:a}))}}return m()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),w=c(32),_=c(4),f=c.n(_),v=c(88);c(140);const k={list:Object(a.__)("Products","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(a.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(a.__)("Product search results updated.","woo-gutenberg-products-block")},y=e=>{let{expandedProduct:t,error:c,instanceId:o,isCompact:u,isLoading:d,onChange:b,onSearch:p,products:m,renderItem:g,selected:O,showVariations:h,variations:j,variationsLoading:E}=e;if(c)return Object(n.createElement)(w.a,{error:c});const _=[...m,...j&&j[t]?j[t]:[]];return Object(n.createElement)(i.a,{className:"woocommerce-products",list:_,isCompact:u,isLoading:d,isSingle:!0,selected:_.filter(e=>{let{id:t}=e;return O.includes(t)}),onChange:b,renderItem:g||(h?e=>{const{item:t,search:c,depth:i=0,isSelected:u,onSelect:b}=e,p=t.variations&&Array.isArray(t.variations)?t.variations.length:0,m=f()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+i,"has-count",{"is-searching":c.length>0,"is-skip-level":0===i&&0!==t.parent,"is-variable":p>0});if(!t.breadcrumbs.length)return Object(n.createElement)(v.a,r()({},e,{className:f()(m,{"is-selected":u}),isSelected:u,item:t,onSelect:()=>()=>{b(t)()},isLoading:d||E,countLabel:t.variations.length>0?Object(a.sprintf)( +/* translators: %1$d is the number of variations of a product product. */ +Object(a.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+o,"aria-label":Object(a.sprintf)( +/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ +Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const g=Object(s.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(n.createElement)(l.a,r()({},g,{className:m,name:"variations-"+o}))}:null),onSearch:p,messages:k,isHierarchical:!0})};y.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=d(Object(b.a)(E(Object(u.withInstanceId)(y))))},function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=n},,function(e,t,c){"use strict";var o=c(0),r=(c(10),c(4)),n=c.n(r),a=c(30),s=c(9);c(142),t.a=Object(s.withInstanceId)(e=>{let{className:t,instanceId:c,label:r,onChange:s,options:l,screenReaderLabel:i,readOnly:u,value:d}=e;const b="wc-block-components-sort-select__select-"+c;return Object(o.createElement)("div",{className:n()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(a.a,{label:r,screenReaderLabel:i,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(o.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,readOnly:u,value:d},l.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(41),a=c(4),s=c.n(a),l=c(35);c(156);const i=e=>{let{currency:t,maxPrice:c,minPrice:a,priceClassName:i,priceStyle:u={}}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(r.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(a),Object(l.formatPrice)(c))),Object(o.createElement)("span",{"aria-hidden":!0},Object(o.createElement)(n.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:a,style:u})," — ",Object(o.createElement)(n.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:a,regularPrice:l,priceClassName:i,priceStyle:u,price:d}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Previous price:","woo-gutenberg-products-block")),Object(o.createElement)(n.a,{currency:t,renderText:e=>Object(o.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:a},e),value:l}),Object(o.createElement)("span",{className:"screen-reader-text"},Object(r.__)("Discounted price:","woo-gutenberg-products-block")),Object(o.createElement)(n.a,{currency:t,renderText:e=>Object(o.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:r,format:a="",maxPrice:l,minPrice:d,price:b,priceClassName:p,priceStyle:m,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}=e;const j=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("")||(a="",console.error("Price formats need to include the `` tag."));const E=g&&b!==g;let w=Object(o.createElement)("span",{className:s()("wc-block-components-product-price__value",p)});return E?w=Object(o.createElement)(u,{currency:r,price:b,priceClassName:p,priceStyle:m,regularPrice:g,regularPriceClassName:O,regularPriceStyle:h}):void 0!==d&&void 0!==l?w=Object(o.createElement)(i,{currency:r,maxPrice:l,minPrice:d,priceClassName:p,priceStyle:m}):b&&(w=Object(o.createElement)(n.a,{className:s()("wc-block-components-product-price__value",p),currency:r,value:b,style:m})),Object(o.createElement)("span",{className:j},Object(o.createInterpolateElement)(a,{price:w}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));var o=c(6);let r;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(r||(r={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(o.uniqueId)(),type:r.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:r.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:o,callback:n,priority:s}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case r.ADD_EVENT_CALLBACK:return l.set(o,{priority:s,callback:n}),{...e,[c]:l};case r.REMOVE_EVENT_CALLBACK:return l.delete(o),{...e,[c]:l}}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(8);function r(e,t){const c=Object(o.useRef)();return Object(o.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var o=c(0),r=c(6),n=c(26),a=c.n(n);const s=Object(o.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(o.useContext)(s),i=e=>{let{children:t}=e;const[c,n]=Object(o.useState)({}),l=Object(o.useCallback)(e=>c[e],[c]),i=Object(o.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(o.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...o}=t;return o})},[]),d=Object(o.useCallback)(()=>{n({})},[]),b=Object(o.useCallback)(e=>{e&&n(t=>(e=Object(r.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),p=Object(o.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const o={...c[e],...t};return a()(c[e],o)?c:{...c,[e]:o}})},[]),m={getValidationError:l,setValidationErrors:b,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(o.useCallback)(e=>{p(e,{hidden:!0})},[p]),showValidationError:Object(o.useCallback)(e=>{p(e,{hidden:!1})},[p]),showAllValidationErrors:Object(o.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(o.createElement)(s.Provider,{value:m},t)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var o=c(16),r=c(13),n=c(0),a=c(40),s=c(93);const l=e=>{const{namespace:t,resourceName:c,resourceValues:l=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(n.useRef)({results:[],isLoading:!0}),b=Object(a.a)(i),p=Object(a.a)(l),m=Object(s.a)(),g=Object(r.useSelect)(e=>{if(!u)return null;const r=e(o.COLLECTIONS_STORE_KEY),n=[t,c,b,p],a=r.getCollectionError(...n);return a&&m(a),{results:r.getCollection(...n),isLoading:!r.hasFinishedResolution("getCollection",n)}},[t,c,p,b,u]);return null!==g&&(d.current=g),d.current}},,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(o.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(o.createElement)("g",{mask:"url(#external-mask)"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=n},,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(0);const r=Object(o.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 230 250",style:{width:"100%"}},Object(o.createElement)("title",null,"Grid Block Preview"),Object(o.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:".779",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(o.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(o.createElement)("rect",{width:"65.374",height:"65.374",x:".162",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"47.266",height:"5.148",x:"9.216",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(o.createElement)("rect",{width:"62.8",height:"15",x:"1.565",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(o.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:".779",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(o.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(o.createElement)("rect",{width:"65.374",height:"65.374",x:"82.478",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"47.266",height:"5.148",x:"91.532",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(o.createElement)("rect",{width:"62.8",height:"15",x:"83.882",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(o.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:".779",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"76.153",fill:"#E1E3E6",rx:"2.574"}),Object(o.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"101.448",fill:"#E1E3E6",rx:"5"}),Object(o.createElement)("rect",{width:"65.374",height:"65.374",x:"164.788",y:"136.277",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"47.266",height:"5.148",x:"173.843",y:"211.651",fill:"#E1E3E6",rx:"2.574"}),Object(o.createElement)("rect",{width:"62.8",height:"15",x:"166.192",y:"236.946",fill:"#E1E3E6",rx:"5"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"86.301",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"13.283",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"21.498",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"29.713",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"37.927",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"46.238",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"95.599",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"103.814",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"112.029",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"120.243",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"128.554",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"177.909",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"186.124",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"194.339",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"202.553",y:"221.798",fill:"#E1E3E6",rx:"3"}),Object(o.createElement)("rect",{width:"6.177",height:"6.177",x:"210.864",y:"221.798",fill:"#E1E3E6",rx:"3"}))},function(e,t,c){"use strict";var o=c(5),r=c.n(o),n=c(0),a=c(14),s=c(4),l=c.n(s);c(155),t.a=e=>{let{className:t="",disabled:c=!1,name:o,permalink:s="",rel:i,style:u,onClick:d,...b}=e;const p=l()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",r()({className:p},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(o)}}))}return Object(n.createElement)("a",r()({className:p,href:s,rel:i},b,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(o)},style:u}))}},function(e,t,c){"use strict";c.d(t,"b",(function(){return g})),c.d(t,"a",(function(){return O}));var o=c(0),r=(c(10),c(13)),n=c(60),a=c(49),s=c(5),l=c.n(s),i=c(4),u=c.n(i),d=c(481);c(157);const b=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 p=e=>{let{className:t,notices:c,removeNotice:r}=e;const n=c.filter(e=>"snackbar"!==e.type);if(!n.length)return null;const a=u()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:a},n.map(e=>Object(o.createElement)(d.a,l()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",b(e)),onRemove:()=>{e.isDismissible&&r(e.id)}}),e.content)))};const m=Object(o.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),g=()=>Object(o.useContext)(m),O=e=>{let{children:t,className:c="",createNoticeContainer:s=!0,context:l="wc/core"}=e;const{createNotice:i,removeNotice:u}=Object(r.useDispatch)("core/notices"),[d,b]=Object(o.useState)(!1),{dispatchStoreEvent:g}=Object(n.a)(),{isEditor:O}=Object(a.b)(),h=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(e,t,{...c,context:c.context||l}),g("store-notice-create",{status:e,content:t,options:c})}),[i,g,l]),j=Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;u(e,t)}),[u,l]),{notices:E}=Object(r.useSelect)(e=>({notices:e("core/notices").getNotices(l)}),[l]),w={notices:E,createNotice:h,removeNotice:j,context:l,setIsSuppressed:b},_=d?null:Object(o.createElement)(p,{className:c,notices:w.notices,removeNotice:w.removeNotice,isEditor:O});return Object(o.createElement)(m.Provider,{value:w},s&&_,t)}},function(e,t,c){"use strict";var o=c(0),r=c(100),n=c(73);const a=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const o=s(e),r=o.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(r,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const r=s(e),a=r.slice(0,t);if(c)return Object(n.autop)(l(a,o));const i=a.match(/([\s]+)/g),u=i?i.length:0,d=r.slice(0,t+u);return Object(n.autop)(l(d,o))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:l=""}=e;const d=Object(o.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const o=Object(n.autop)(e),s=Object(r.count)(o,c);if(s<=t)return o;const l=a(o),d=Object(r.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(o.createElement)(o.RawHTML,{className:l},d)}},,,,,,,,,function(e,t){},,function(e,t){},,function(e,t){},,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));const o=e=>e.reduce((e,t)=>{let[c,o]=t;return e[c]=o,e},{})},,,,,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";var o=c(5),r=c.n(o),n=c(0),a=c(25),s=c(27),l=c(116),i=c(28);t.a=e=>t=>{let{selected:c,...o}=t;const[u,d]=Object(n.useState)(!0),[b,p]=Object(n.useState)(null),[m,g]=Object(n.useState)([]),O=a.o.productCount>100,h=async e=>{const t=await Object(i.a)(e);p(t),d(!1)},j=Object(n.useRef)(c);Object(n.useEffect)(()=>{Object(s.h)({selected:j.current}).then(e=>{g(e),d(!1)}).catch(h)},[j]);const E=Object(l.a)(e=>{Object(s.h)({selected:c,search:e}).then(e=>{g(e),d(!1)}).catch(h)},400),w=Object(n.useCallback)(e=>{d(!0),E(e)},[d,E]);return Object(n.createElement)(e,r()({},o,{selected:c,error:b,products:m,isLoading:u,onSearch:O?w:null}))}},function(e,t,c){"use strict";c.r(t);var o=c(0),r=(c(10),c(1)),n=c(4),a=c.n(n),s=c(30),l=c(29),i=c(54);c(298),t.default=Object(i.withProductDataContext)(e=>{let{className:t,align:c}=e;const{parentClassName:n}=Object(l.useInnerBlockLayoutContext)(),{product:i}=Object(l.useProductDataContext)();if(!i.id||!i.on_sale)return null;const u="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(o.createElement)("div",{className:a()("wc-block-components-product-sale-badge",t,u,{[n+"__product-onsale"]:n})},Object(o.createElement)(s.a,{label:Object(r.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(r.__)("Product on sale","woo-gutenberg-products-block")}))})},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(0),r=(c(10),c(112));c(160);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(r.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(o.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(o.createElement)("p",{id:s(n)},t))}},,,,,,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=n},function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=n},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){},function(e,t,c){"use strict";var o=c(77);let r={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(o.b)()&&(r={...r,align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}),t.a=r},function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),a=c(29),s=c(7),l=c(77),i=c(54),u=c(127),d=c(60);c(297);const b=e=>{let{children:t,headingLevel:c,elementType:r="h"+c,...n}=e;return Object(o.createElement)(r,n,t)};t.a=Object(i.withProductDataContext)(e=>{var t,c,r,i;let{className:p,headingLevel:m=2,showProductLink:g=!0,align:O,textColor:h,fontSize:j,style:E}=e;const{parentClassName:w}=Object(a.useInnerBlockLayoutContext)(),{product:_}=Object(a.useProductDataContext)(),{dispatchStoreEvent:f}=Object(d.a)(),v=Object(s.getColorClassName)("color",h),k=Object(s.getFontSizeClass)(j),y=n()("wp-block-woocommerce-product-title",{"has-text-color":h||(null==E||null===(t=E.color)||void 0===t?void 0:t.text)||(null==E?void 0:E.color),"has-font-size":j||(null==E||null===(c=E.typography)||void 0===c?void 0:c.fontSize)||(null==E?void 0:E.fontSize),[v]:v,[k]:k}),C={fontSize:(null==E?void 0:E.fontSize)||(null==E||null===(r=E.typography)||void 0===r?void 0:r.fontSize),color:(null==E||null===(i=E.color)||void 0===i?void 0:i.text)||(null==E?void 0:E.color)};return _.id?Object(o.createElement)(b,{headingLevel:m,className:n()(p,"wc-block-components-product-title",{[w+"__product-title"]:w,["wc-block-components-product-title--align-"+O]:O&&Object(l.b)()})},Object(o.createElement)(u.a,{className:n()({[y]:Object(l.b)()}),disabled:!g,name:_.name,permalink:_.permalink,rel:g?"nofollow":"",onClick:()=>{f("product-view-link",{product:_})},style:Object(l.b)()?C:{}})):Object(o.createElement)(b,{headingLevel:m,className:n()(p,"wc-block-components-product-title",{[w+"__product-title"]:w,["wc-block-components-product-title--align-"+O]:O&&Object(l.b)(),[y]:Object(l.b)()})})})},function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));const o=window.CustomEvent||null,r=(e,t)=>{let{bubbles:c=!1,cancelable:r=!1,element:n,detail:a={}}=t;if(!o)return;n||(n=document.body);const s=new o(e,{bubbles:c,cancelable:r,detail:a});n.dispatchEvent(s)};let n;const a=()=>{n&&clearTimeout(n),n=setTimeout(()=>{r("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{r(t,{bubbles:c,cancelable:o})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"c",(function(){return s})),c.d(t,"a",(function(){return l}));var o=c(2),r=c(98),n=c(15);const a=e=>{let{country:t="",state:c="",city:o="",postcode:r=""}=e;return{country:t.trim(),state:c.trim(),city:o.trim(),postcode:r?r.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(n.isEmail)(t)?t.trim():""},l=e=>{const t=Object.keys(o.defaultAddressFields),c=Object(r.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:o=!1}=t;o&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},function(e,t,c){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},function(e,t,c){"use strict";var o=c(5),r=c.n(o),n=c(0),a=(c(10),c(1)),s=c(4),l=c.n(s),i=c(2),u=c(29),d=c(54),b=c(60),p=c(192);c(299);const m=()=>Object(n.createElement)("img",{src:i.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),g=e=>{let{image:t,onLoad:c,loaded:o,showFullSize:a,fallbackAlt:s}=e;const{thumbnail:l,src:i,srcset:u,sizes:d,alt:b}=t||{},p={alt:b||s,onLoad:c,hidden:!o,src:l,...a&&{src:i,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,p.src&&Object(n.createElement)("img",r()({"data-testid":"product-image"},p)),!o&&Object(n.createElement)(m,null))};t.a=Object(d.withProductDataContext)(e=>{let{className:t,imageSizing:c="full-size",showProductLink:o=!0,showSaleBadge:r,saleBadgeAlign:s="right"}=e;const{parentClassName:i}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[O,h]=Object(n.useState)(!1),{dispatchStoreEvent:j}=Object(b.a)();if(!d.id)return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",{[i+"__product-image"]:i})},Object(n.createElement)(m,null));const E=!!d.images.length,w=E?d.images[0]:null,_=o?"a":n.Fragment,f=Object(a.sprintf)( +/* translators: %s is referring to the product name */ +Object(a.__)("Link to %s","woo-gutenberg-products-block"),d.name),v={href:d.permalink,rel:"nofollow",...!E&&{"aria-label":f},onClick:()=>{j("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:l()(t,"wc-block-components-product-image",{[i+"__product-image"]:i})},Object(n.createElement)(_,o&&v,!!r&&Object(n.createElement)(p.default,{align:s,product:d}),Object(n.createElement)(g,{fallbackAlt:d.name,image:w,onLoad:()=>h(!0),loaded:O,showFullSize:"cropped"!==c})))})},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(107);const r=(e,t)=>function(c){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=o.a.addEventCallback(e,c,r);return t(n),()=>{t(o.a.removeEventCallback(e,n.id))}}},function(e,t,c){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},function(e,t,c){"use strict";var o=c(0),r=(c(10),c(4)),n=c.n(r),a=c(1),s=c(40),l=c(471);const i={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},u={status:i.PRISTINE,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},d={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:b,SET_IDLE:p,SET_DISABLED:m,SET_PROCESSING:g,SET_BEFORE_PROCESSING:O,SET_AFTER_PROCESSING:h,SET_PROCESSING_RESPONSE:j,SET_HAS_ERROR:E,SET_NO_ERROR:w,SET_QUANTITY:_,SET_REQUEST_PARAMS:f}=d,v=()=>({type:p}),k=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?E:w;return{type:t}},{SET_PRISTINE:y,SET_IDLE:C,SET_DISABLED:S,SET_PROCESSING:x,SET_BEFORE_PROCESSING:N,SET_AFTER_PROCESSING:P,SET_PROCESSING_RESPONSE:T,SET_HAS_ERROR:R,SET_NO_ERROR:I,SET_QUANTITY:A,SET_REQUEST_PARAMS:B}=d,{PRISTINE:L,IDLE:V,DISABLED:z,PROCESSING:D,BEFORE_PROCESSING:F,AFTER_PROCESSING:M}=i,H=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,{quantity:c,type:o,data:r}=arguments.length>1?arguments[1]:void 0;switch(o){case y:e=u;break;case C:e=t.status!==V?{...t,status:V}:t;break;case S:e=t.status!==z?{...t,status:z}:t;break;case A:e=c!==t.quantity?{...t,quantity:c}:t;break;case B:e={...t,requestParams:{...t.requestParams,...r}};break;case T:e={...t,processingResponse:r};break;case x:e=t.status!==D?{...t,status:D,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case N:e=t.status!==F?{...t,status:F,hasError:!1}:t;break;case P:e=t.status!==M?{...t,status:M}:t;break;case R:e=t.hasError?t:{...t,hasError:!0},e=t.status===D||t.status===F?{...e,status:V}:e;break;case I:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&o!==y&&e.status===L&&(e.status=V),e};var G=c(107),q=c(251);const Q=e=>({onAddToCartAfterProcessingWithSuccess:Object(q.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(q.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(q.a)("add_to_cart_before_processing",e)});var Y=c(254),U=c(112),W=c(47),$=c(44);const K=Object(o.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),J=()=>Object(o.useContext)(K),X=e=>{let{children:t,product:c,showFormElements:r}=e;const[n,d]=Object(o.useReducer)(H,u),[p,E]=Object(o.useReducer)(G.b,{}),w=Object(s.a)(p),{addErrorNotice:y,removeNotices:C}=Object(W.a)(),{setValidationErrors:S}=Object(U.b)(),{isSuccessResponse:x,isErrorResponse:N,isFailResponse:P}=Object($.c)(),T=Object(o.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:Q(E).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:Q(E).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:Q(E).onAddToCartBeforeProcessing}),[E]),R=Object(o.useMemo)(()=>({resetForm:()=>{d({type:b})},submitForm:()=>{d({type:O})},setQuantity:e=>{d((e=>({type:_,quantity:e}))(e))},setHasError:e=>{d(k(e))},setRequestParams:e=>{d((e=>({type:f,data:e}))(e))},setAfterProcessing:e=>{d({type:j,data:e}),d({type:h})}}),[]);Object(o.useEffect)(()=>{const e=n.status,t=!c.id||!Object(l.a)(c);e!==i.DISABLED||t?e!==i.DISABLED&&t&&d({type:m}):d(v())},[n.status,c,d]),Object(o.useEffect)(()=>{n.status===i.BEFORE_PROCESSING&&(C("error"),Object(Y.a)(w,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;t&&y(t),c&&S(c)}),d(v())):d({type:g})}))},[n.status,S,y,C,d,w]),Object(o.useEffect)(()=>{if(n.status===i.AFTER_PROCESSING){const e={processingResponse:n.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:c,messageContext:o}=e;(N(e)||P(e))&&c&&(t=!0,y(c,o?{context:o}:void 0))}),t};if(n.hasError)return void Object(Y.b)(w,"add_to_cart_after_processing_with_error",e).then(c=>{if(!t(c)){var o;const t=(null===(o=e.processingResponse)||void 0===o?void 0:o.message)||Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");y(t,{id:"add-to-cart"})}d(v())});Object(Y.b)(w,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?d(k(!0)):d(v())})}},[n.status,n.hasError,n.processingResponse,R,y,N,P,x,w]);const I=Object(l.b)(c),A={product:c,productType:c.type||"simple",productIsPurchasable:Object(l.a)(c),productHasOptions:c.has_options||!1,supportsFormElements:I,showFormElements:r&&I,quantity:n.quantity,minQuantity:1,maxQuantity:c.quantity_limit||99,requestParams:n.requestParams,isIdle:n.status===i.IDLE,isDisabled:n.status===i.DISABLED,isProcessing:n.status===i.PROCESSING,isBeforeProcessing:n.status===i.BEFORE_PROCESSING,isAfterProcessing:n.status===i.AFTER_PROCESSING,hasError:n.hasError,eventRegistration:T,dispatchActions:R};return Object(o.createElement)(K.Provider,{value:A},t)};var Z=c(11),ee=c.n(Z),te=c(14),ce=c(36),oe=()=>{const{dispatchActions:e,product:t,quantity:c,eventRegistration:r,hasError:n,isProcessing:s,requestParams:l}=J(),{hasValidationErrors:i,showAllValidationErrors:u}=Object(U.b)(),{addErrorNotice:d,removeNotice:b}=Object(W.a)(),{receiveCart:p}=Object(ce.a)(),[m,g]=Object(o.useState)(!1),O=!n&&s,h=Object(o.useCallback)(()=>!i||(u(),{type:"error"}),[i,u]);Object(o.useEffect)(()=>{const e=r.onAddToCartBeforeProcessing(h,0);return()=>{e()}},[r,h]);const j=Object(o.useCallback)(()=>{g(!0),b("add-to-cart");const o={id:t.id||0,quantity:c,...l};ee()({path:"/wc/store/cart/add-item",method:"POST",data:o,cache:"no-store",parse:!1}).then(t=>{ee.a.setNonce(t.headers),t.json().then((function(c){t.ok?p(c):(c.body&&c.body.message?d(Object(te.decodeEntities)(c.body.message),{id:"add-to-cart"}):d(Object(a.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),e.setHasError()),e.setAfterProcessing(c),g(!1)}))}).catch(t=>{t.json().then((function(t){var c;null!==(c=t.data)&&void 0!==c&&c.cart&&p(t.data.cart),e.setHasError(),e.setAfterProcessing(t),g(!1)}))})},[t,d,b,p,e,c,l]);return Object(o.useEffect)(()=>{O&&!m&&j()},[O,j,m]),null};const re=e=>{let{children:t,product:c,showFormElements:r}=e;return Object(o.createElement)(U.a,null,Object(o.createElement)(X,{product:c,showFormElements:r},t,Object(o.createElement)(oe,null)))};var ne=c(29),ae=c(6),se=c(54),le=(c(244),c(76)),ie=c(43),ue=c(308),de=c(60),be=c(355);const pe=e=>{let{className:t,href:c,text:r,onClick:n}=e;return Object(o.createElement)(le.a,{className:t,href:c,onClick:n,rel:"nofollow"},r)},me=e=>{let{className:t,quantityInCart:c,isProcessing:r,isDisabled:n,isDone:s,onClick:l}=e;return Object(o.createElement)(le.a,{className:t,disabled:n,showSpinner:r,onClick:l},s&&c>0?Object(a.sprintf)( +/* translators: %s number of products in cart. */ +Object(a._n)("%d in cart","%d in cart",c,"woo-gutenberg-products-block"),c):Object(a.__)("Add to cart","woo-gutenberg-products-block"),!!s&&Object(o.createElement)(ie.a,{srcElement:ue.a,alt:Object(a.__)("Done","woo-gutenberg-products-block")}))};var ge=()=>{const{showFormElements:e,productIsPurchasable:t,productHasOptions:c,product:r,productType:n,isDisabled:s,isProcessing:l,eventRegistration:i,hasError:u,dispatchActions:d}=J(),{parentName:b}=Object(ne.useInnerBlockLayoutContext)(),{dispatchStoreEvent:p}=Object(de.a)(),{cartQuantity:m}=Object(be.a)(r.id||0),[g,O]=Object(o.useState)(!1),h=r.add_to_cart||{url:"",text:""};return Object(o.useEffect)(()=>{const e=i.onAddToCartAfterProcessingWithSuccess(()=>(u||O(!0),!0),0);return()=>{e()}},[i,u]),(e||!c&&"simple"===n)&&t?Object(o.createElement)(me,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:m,isDisabled:s,isProcessing:l,isDone:g,onClick:()=>{d.submitForm(),p("cart-add-item",{product:r,listName:b})}}):Object(o.createElement)(pe,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(a.__)("View Product","woo-gutenberg-products-block"),onClick:()=>{p("product-view-link",{product:r,listName:b})}})},Oe=e=>{let{disabled:t,min:c,max:r,value:n,onChange:a}=e;return Object(o.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:n,min:c,max:r,hidden:1===r,disabled:t,onChange:e=>{a(e.target.value)}})},he=e=>{let{reason:t=Object(a.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block")}=e;return Object(o.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},t)},je=()=>{const{product:e,quantity:t,minQuantity:c,maxQuantity:r,dispatchActions:n,isDisabled:s}=J();return e.id&&!e.is_purchasable?Object(o.createElement)(he,null):e.id&&!e.is_in_stock?Object(o.createElement)(he,{reason:Object(a.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(Oe,{value:t,min:c,max:r,disabled:s,onChange:n.setQuantity}),Object(o.createElement)(ge,null))},Ee=(c(307),c(492)),we=c(8),_e=c(193);const fe={value:"",label:Object(a.__)("Select an option","woo-gutenberg-products-block")};var ve=e=>{let{attributeName:t,options:c=[],value:r="",onChange:s=(()=>{}),errorMessage:l=Object(a.__)("Please select a value.","woo-gutenberg-products-block")}=e;const{getValidationError:i,setValidationErrors:u,clearValidationError:d}=Object(U.b)(),b=t,p=i(b)||{};return Object(we.useEffect)(()=>{r?d(b):u({[b]:{message:l,hidden:!0}})},[r,b,l,d,u]),Object(we.useEffect)(()=>()=>{d(b)},[b,d]),Object(o.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(o.createElement)(Ee.a,{label:Object(te.decodeEntities)(t),value:r||"",options:[fe,...c],onChange:s,required:!0,className:n()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":p.message&&!p.hidden})}),Object(o.createElement)(_e.a,{propertyName:b,elementId:b}))},ke=c(85);const ye=(e,t,c)=>{const o=Object.values(t).map(e=>{let{id:t}=e;return t});if(Object.values(c).every(e=>""===e))return o;const r=Object.keys(e);return o.filter(e=>r.every(o=>{const r=c[o]||"",n=t["id:"+e].attributes[o];return""===r||null===n||n===r}))};var Ce=e=>{let{attributes:t,variationAttributes:c,setRequestParams:r}=e;const n=Object(s.a)(t),a=Object(s.a)(c),[l,i]=Object(o.useState)(0),[u,d]=Object(o.useState)({}),[b,p]=Object(o.useState)(!1),m=Object(o.useMemo)(()=>((e,t,c)=>{const o={},r=Object.keys(e),n=Object.values(c).filter(Boolean).length>0;return r.forEach(r=>{const a=e[r],s={...c,[r]:null},l=n?ye(e,t,s):null,i=null!==l?l.map(e=>t["id:"+e].attributes[r]):null;o[r]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map(e=>{let{name:c,slug:o}=e;return null===t||t.includes(null)||t.includes(o)?{value:o,label:Object(te.decodeEntities)(c)}:null}).filter(Boolean)}(a.terms,i)}),o})(n,a,u),[u,n,a]);return Object(o.useEffect)(()=>{if(!b){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ke.b)(e))return{};const t=Object.keys(e),c={};return 0===t.length||t.forEach(t=>{const o=e[t],r=o.terms.filter(e=>e.default);var n;r.length>0&&(c[o.name]=null===(n=r[0])||void 0===n?void 0:n.slug)}),c}(t);e&&d({...e}),p(!0)}},[u,t,b]),Object(o.useEffect)(()=>{Object.values(u).filter(e=>""!==e).length===Object.keys(n).length?i(((e,t,c)=>ye(e,t,c)[0]||0)(n,a,u)):l>0&&i(0)},[u,l,n,a]),Object(o.useEffect)(()=>{r({id:l,variation:Object.keys(u).map(e=>({attribute:e,value:u[e]}))})},[r,l,u]),Object(o.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(n).map(e=>Object(o.createElement)(ve,{key:e,attributeName:e,options:m[e],value:u[e],onChange:t=>{d({...u,[e]:t})}})))},Se=e=>{let{product:t,dispatchers:c}=e;const r=(e=>e?Object(ae.keyBy)(Object.values(e).filter(e=>{let{has_variations:t}=e;return t}),"name"):{})(t.attributes),n=(e=>{if(!e)return{};const t={};return e.forEach(e=>{let{id:c,attributes:o}=e;t["id:"+c]={id:c,attributes:o.reduce((e,t)=>{let{name:c,value:o}=t;return e[c]=o,e},{})}}),t})(t.variations);return 0===Object.keys(r).length||0===n.length?null:Object(o.createElement)(Ce,{attributes:r,variationAttributes:n,setRequestParams:c.setRequestParams})},xe=()=>{const{product:e,quantity:t,minQuantity:c,maxQuantity:r,dispatchActions:n,isDisabled:s}=J();return e.id&&!e.is_purchasable?Object(o.createElement)(he,null):e.id&&!e.is_in_stock?Object(o.createElement)(he,{reason:Object(a.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(Se,{product:e,dispatchers:n}),Object(o.createElement)(Oe,{value:t,min:c,max:r,disabled:s,onChange:n.setQuantity}),Object(o.createElement)(ge,null))},Ne=()=>Object(o.createElement)(ge,null),Pe=c(483),Te=()=>Object(o.createElement)(Pe.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element."),Re=()=>Object(o.createElement)(Te,null);const Ie=()=>{const{showFormElements:e,productType:t}=J();return e?"variable"===t?Object(o.createElement)(xe,null):"grouped"===t?Object(o.createElement)(Re,null):"external"===t?Object(o.createElement)(Ne,null):"simple"===t||"variation"===t?Object(o.createElement)(je,null):null:Object(o.createElement)(ge,null)};t.a=Object(se.withProductDataContext)(e=>{let{className:t,showFormElements:c}=e;const{product:r}=Object(ne.useProductDataContext)(),a=n()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(ae.isEmpty)(r)});return Object(o.createElement)(re,{product:r,showFormElements:c},Object(o.createElement)("div",{className:a},Object(o.createElement)(Ie,null)))})},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));const o=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var r=c(44);const n=async(e,t,c)=>{const r=o(e,t),n=[];for(const e of r)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},a=async(e,t,c)=>{const n=[],a=o(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(r.a)(t)||Object(r.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},,,,,function(e,t,c){"use strict";c.r(t);var o=c(0),r=(c(10),c(4)),n=c.n(r),a=c(105),s=c(35),l=c(29),i=c(7),u=c(77),d=c(54);t.default=Object(d.withProductDataContext)(e=>{var t,c;let{className:r,align:d,fontSize:b,customFontSize:p,saleFontSize:m,customSaleFontSize:g,color:O,customColor:h,saleColor:j,customSaleColor:E}=e;const{parentClassName:w}=Object(l.useInnerBlockLayoutContext)(),{product:_}=Object(l.useProductDataContext)(),f=n()(r,{[w+"__product-price"]:w});if(!_.id)return Object(o.createElement)(a.a,{align:d,className:f});const v=Object(i.getColorClassName)("color",O),k=Object(i.getFontSizeClass)(b),y=Object(i.getColorClassName)("color",j),C=Object(i.getFontSizeClass)(m),S=n()({"has-text-color":O||h,"has-font-size":b||p,[v]:v,[k]:k}),x=n()({"has-text-color":j||E,"has-font-size":m||g,[y]:y,[C]:C}),N={color:h,fontSize:p},P={color:E,fontSize:g},T=_.prices,R=Object(s.getCurrencyFromPriceResponse)(T),I=T.price!==T.regular_price,A=I?n()({[w+"__product-price__value"]:w,[x]:Object(u.b)()}):n()({[w+"__product-price__value"]:w,[S]:Object(u.b)()}),B=I?P:N;return Object(o.createElement)(a.a,{align:d,className:f,currency:R,price:T.price,priceClassName:A,priceStyle:Object(u.b)()?B:{},minPrice:null==T||null===(t=T.price_range)||void 0===t?void 0:t.min_amount,maxPrice:null==T||null===(c=T.price_range)||void 0===c?void 0:c.max_amount,regularPrice:T.regular_price,regularPriceClassName:n()({[w+"__product-price__regular"]:w,[S]:Object(u.b)()}),regularPriceStyle:Object(u.b)()?N:{}})})},function(e,t,c){"use strict";c.r(t);var o=c(0),r=(c(10),c(1)),n=c(4),a=c.n(n),s=c(29),l=c(54);c(300);t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),l=(e=>{const t=parseFloat(e.average_rating);return Number.isFinite(t)&&t>0?t:0})(n);if(!l)return null;const i={width:l/5*100+"%"},u=Object(r.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(r.__)("Rated %f out of 5","woo-gutenberg-products-block"),l);return Object(o.createElement)("div",{className:a()(t,"wc-block-components-product-rating",{[c+"__product-rating"]:c})},Object(o.createElement)("div",{className:a()("wc-block-components-product-rating__stars",c+"__product-rating__stars"),role:"img","aria-label":u},Object(o.createElement)("span",{style:i},u)))})},function(e,t,c){"use strict";c.r(t);var o=c(5),r=c.n(o),n=c(0),a=(c(10),c(4)),s=c.n(a),l=c(1),i=c(60),u=c(355),d=c(14),b=c(29),p=c(54);c(301);const m=e=>{let{product:t}=e;const{id:c,permalink:o,add_to_cart:a,has_options:b,is_purchasable:p,is_in_stock:m}=t,{dispatchStoreEvent:g}=Object(i.a)(),{cartQuantity:O,addingToCart:h,addToCart:j}=Object(u.a)(c),E=Number.isFinite(O)&&O>0,w=!b&&p&&m,_=Object(d.decodeEntities)((null==a?void 0:a.description)||""),f=E?Object(l.sprintf)( +/* translators: %s number of products in cart. */ +Object(l._n)("%d in cart","%d in cart",O,"woo-gutenberg-products-block"),O):Object(d.decodeEntities)((null==a?void 0:a.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),v=w?"button":"a",k={};return w?k.onClick=()=>{j(),g("cart-add-item",{product:t})}:(k.href=o,k.rel="nofollow",k.onClick=()=>{g("product-view-link",{product:t})}),Object(n.createElement)(v,r()({"aria-label":_,className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:h,added:E}),disabled:h},k),f)},g=()=>Object(n.createElement)("button",{className:s()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0});t.default=Object(p.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(b.useInnerBlockLayoutContext)(),{product:o}=Object(b.useProductDataContext)();return Object(n.createElement)("div",{className:s()(t,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},o.id?Object(n.createElement)(m,{product:o}):Object(n.createElement)(g,null))})},function(e,t,c){"use strict";c.r(t);var o=c(0),r=(c(10),c(4)),n=c.n(r),a=c(129),s=c(25),l=c(29),i=c(54);c(302),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(l.useInnerBlockLayoutContext)(),{product:r}=Object(l.useProductDataContext)();if(!r)return Object(o.createElement)("div",{className:n()(t,"wc-block-components-product-summary",{[c+"__product-summary"]:c})});const i=r.short_description?r.short_description:r.description;return i?Object(o.createElement)(a.a,{className:n()(t,"wc-block-components-product-summary",{[c+"__product-summary"]:c}),source:i,maxLength:150,countType:s.o.wordCountType||"words"}):null})},function(e,t,c){"use strict";c.r(t);var o=c(0),r=c(1),n=(c(10),c(4)),a=c.n(n),s=c(29),l=c(54);c(303),t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)(),l=n.sku;return l?Object(o.createElement)("div",{className:a()(t,"wc-block-components-product-sku",{[c+"__product-sku"]:c})},Object(r.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,l)):null})},function(e,t,c){"use strict";c.r(t);var o=c(0),r=c(1),n=c(4),a=c.n(n),s=c(29),l=c(6),i=c(54);c(304),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();return Object(l.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:a()(t,"wc-block-components-product-category-list",{[c+"__product-category-list"]:c})},Object(r.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map(e=>{let{name:t,link:c,slug:r}=e;return Object(o.createElement)("li",{key:"category-list-item-"+r},Object(o.createElement)("a",{href:c},t))})))})},function(e,t,c){"use strict";c.r(t);var o=c(0),r=c(1),n=(c(10),c(4)),a=c.n(n),s=c(29),l=c(6),i=c(54);c(305),t.default=Object(i.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();return Object(l.isEmpty)(n.tags)?null:Object(o.createElement)("div",{className:a()(t,"wc-block-components-product-tag-list",{[c+"__product-tag-list"]:c})},Object(r.__)("Tags:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.tags).map(e=>{let{name:t,link:c,slug:r}=e;return Object(o.createElement)("li",{key:"tag-list-item-"+r},Object(o.createElement)("a",{href:c},t))})))})},function(e,t,c){"use strict";c.r(t);var o=c(0),r=c(1),n=(c(10),c(4)),a=c.n(n),s=c(29),l=c(54);c(306);t.default=Object(l.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:n}=Object(s.useProductDataContext)();if(!n.id||!n.is_purchasable)return null;const l=!!n.is_in_stock,i=n.low_stock_remaining,u=n.is_on_backorder;return Object(o.createElement)("div",{className:a()(t,"wc-block-components-product-stock-indicator",{[c+"__stock-indicator"]:c,"wc-block-components-product-stock-indicator--in-stock":l,"wc-block-components-product-stock-indicator--out-of-stock":!l,"wc-block-components-product-stock-indicator--low-stock":!!i,"wc-block-components-product-stock-indicator--available-on-backorder":!!u})},i?(e=>Object(r.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(r.__)("%d left in stock","woo-gutenberg-products-block"),e))(i):((e,t)=>t?Object(r.__)("Available on backorder","woo-gutenberg-products-block"):e?Object(r.__)("In Stock","woo-gutenberg-products-block"):Object(r.__)("Out of Stock","woo-gutenberg-products-block"))(l,u))})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,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){},function(e,t){},function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},,,,,,,,,,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=n},,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(o.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(o.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=n},,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=n},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(1),r=c(25);const n=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(o.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'$7.99',images:[{id:1,src:r.m+"previews/pennant.jpg",thumbnail:r.m+"previews/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(o.__)("Add to cart","woo-gutenberg-products-block"),description:Object(o.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},,,,,function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}));t.a=n},,,,,,,function(e,t,c){e.exports=c(434)},function(e,t){},function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var o=c(0),r=c(13),n=c(16),a=c(14),s=c(36),l=c(47);const i=(e,t)=>{const c=e.find(e=>{let{id:c}=e;return c===t});return c?c.quantity:0},u=e=>{const{addItemToCart:t}=Object(r.useDispatch)(n.CART_STORE_KEY),{cartItems:c,cartIsLoading:u}=Object(s.a)(),{addErrorNotice:d,removeNotice:b}=Object(l.a)(),[p,m]=Object(o.useState)(!1),g=Object(o.useRef)(i(c,e));return Object(o.useEffect)(()=>{const t=i(c,e);t!==g.current&&(g.current=t)},[c,e]),{cartQuantity:Number.isFinite(g.current)?g.current:0,addingToCart:p,cartIsLoading:u,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return m(!0),t(e,c).then(()=>{b("add-to-cart")}).catch(e=>{d(Object(a.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{m(!1)})}}}},function(e,t,c){"use strict";var o=c(0),r=c(18);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h12c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(o.createElement)("path",{fill:"currentColor",d:"M12 6H4V4.75h8zM12 9H4V7.75h8zM10 12H4v-1.25h6z"})));t.a=n},,,function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.r(t),c.d(t,"blockSettings",(function(){return It}));var o=c(5),r=c.n(o),n=c(0),a=c(1),s=c(7),l=c(12),i=c(43),u=c(18),d=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"})),b=c(77),p=c(4),m=c.n(p),g={category:"woocommerce-product-elements",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],icon:{src:Object(n.createElement)(i.a,{srcElement:d,className:"wc-block-editor-components-block-icon"})},supports:{html:!1},parent:Object(b.a)()?void 0:["@woocommerce/all-products","@woocommerce/single-product"],save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",{className:m()("is-loading",t.className)})},deprecated:[{attributes:{},save:()=>null}]},O=c(245),h=c(3),j=c(9),E=c(89),w=c(246),_=c(101);c(354);var f=function(e){let{className:t="",...c}=e;const o=m()("wc-block-text-toolbar-button",t);return Object(n.createElement)(h.Button,r()({className:o},c))},v=c(29);c(353);var k=e=>t=>c=>{const o=Object(v.useProductDataContext)(),{attributes:r,setAttributes:l}=c,{productId:i}=r,[u,d]=Object(n.useState)(!i);return o.hasContext?Object(n.createElement)(t,c):Object(n.createElement)(n.Fragment,null,u?Object(n.createElement)(h.Placeholder,{icon:e.icon||"",label:e.label||"",className:"wc-atomic-blocks-product"},!!e.description&&Object(n.createElement)("div",null,e.description),Object(n.createElement)("div",{className:"wc-atomic-blocks-product__selection"},Object(n.createElement)(_.a,{selected:i||0,showVariations:!0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];l({productId:e[0]?e[0].id:0})}}),Object(n.createElement)(h.Button,{isSecondary:!0,disabled:!i,onClick:()=>{d(!1)}},Object(a.__)("Done","woo-gutenberg-products-block")))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(h.ToolbarGroup,null,Object(n.createElement)(f,{onClick:()=>d(!0)},Object(a.__)("Switch product…","woo-gutenberg-products-block")))),Object(n.createElement)(t,c)))},y=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M17 3H7a2 2 0 00-2 2v16l7-3 7 3V5a2 2 0 00-2-2z"}));const C=Object(a.__)("Product Title","woo-gutenberg-products-block"),S=Object(n.createElement)(i.a,{srcElement:y,className:"wc-block-editor-components-block-icon"}),x=Object(a.__)("Display the title of a product.","woo-gutenberg-products-block"),N=e=>{let{attributes:t,setAttributes:c}=e;const o=Object(s.useBlockProps)(),{headingLevel:r,showProductLink:l,align:i}=t;return Object(n.createElement)("div",o,Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(E.a,{isCollapsed:!0,minLevel:1,maxLevel:7,selectedLevel:r,onChange:e=>c({headingLevel:e})}),Object(b.b)()&&Object(n.createElement)(s.AlignmentToolbar,{value:i,onChange:e=>{c({align:e})}})),Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(a.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:l,onChange:()=>c({showProductLink:!l})}))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(w.a,t)))};var P=Object(b.b)()?Object(j.compose)([k({icon:S,label:C,description:Object(a.__)("Choose a product to display its title.","woo-gutenberg-products-block")})])(N):N;const T={...g,apiVersion:2,title:C,description:x,icon:{src:S},attributes:O.a,edit:P,supports:Object(b.b)()?{html:!1,color:{background:!1},typography:{fontSize:!0}}:g.supports};Object(l.registerBlockType)("woocommerce/product-title",T);var R=c(259),I=c(205);const A=Object(a.__)("Product Price","woo-gutenberg-products-block"),B=Object(n.createElement)(i.a,{srcElement:I.a,className:"wc-block-editor-components-block-icon"}),L=Object(a.__)("Display the price of a product.","woo-gutenberg-products-block"),V=e=>{let{fontSize:t,setFontSize:c,color:o,setColor:r,colorLabel:l}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.FontSizePicker,{value:t.size,onChange:c}),Object(n.createElement)(h.BaseControl,{label:l},Object(n.createElement)(s.ColorPalette,{value:o.color,onChange:r,label:Object(a.__)("Color","woo-gutenberg-products-block")})))},z=e=>{let{fontSize:t,saleFontSize:c,setFontSize:o,setSaleFontSize:r,color:l,saleColor:i,setColor:u,setSaleColor:d,attributes:p,setAttributes:m}=e;const{align:g}=p;return Object(n.createElement)(n.Fragment,null,Object(b.b)()&&Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(s.AlignmentToolbar,{value:g,onChange:e=>{m({align:e})}})),Object(n.createElement)(s.InspectorControls,null,Object(b.b)()&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Price","woo-gutenberg-products-block")},Object(n.createElement)(V,{color:l,setColor:u,fontSize:t,setFontSize:o,colorLabel:Object(a.__)("Color","woo-gutenberg-products-block")})),Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Sale price","woo-gutenberg-products-block")},Object(n.createElement)(V,{color:i,setColor:d,fontSize:c,setFontSize:r,colorLabel:Object(a.__)("Color","woo-gutenberg-products-block")})))),Object(n.createElement)(R.default,p))};var D=Object(b.b)()?Object(j.compose)([Object(s.withFontSizes)("fontSize"),Object(s.withFontSizes)("saleFontSize"),Object(s.withFontSizes)("originalFontSize"),Object(s.withColors)("color",{textColor:"color"}),Object(s.withColors)("saleColor",{textColor:"saleColor"}),Object(s.withColors)("originalColor",{textColor:"originalColor"}),k({icon:B,label:A,description:Object(a.__)("Choose a product to display its price.","woo-gutenberg-products-block")})])(z):z;let F={productId:{type:"number",default:0}};Object(b.b)()&&(F={...F,align:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"},saleFontSize:{type:"string"},customSaleFontSize:{type:"number"},color:{type:"string"},saleColor:{type:"string"},customColor:{type:"string"},customSaleColor:{type:"string"}});const M={title:A,description:L,icon:{src:B},attributes:F,edit:D};Object(l.registerBlockType)("woocommerce/product-price",{...g,...M});var H=c(249),G=c(55),q=c(2),Q=c(250),Y=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"}));const U=Object(a.__)("Product Image","woo-gutenberg-products-block"),W=Object(n.createElement)(i.a,{srcElement:Y,className:"wc-block-editor-components-block-icon"}),$=Object(a.__)("Display the main product image","woo-gutenberg-products-block");var K=k({icon:W,label:U,description:Object(a.__)("Choose a product to display its image.","woo-gutenberg-products-block")})(e=>{let{attributes:t,setAttributes:c}=e;const{showProductLink:o,imageSizing:r,showSaleBadge:l,saleBadgeAlign:i}=t;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Link to Product Page","woo-gutenberg-products-block"),help:Object(a.__)("Links the image to the single product listing.","woo-gutenberg-products-block"),checked:o,onChange:()=>c({showProductLink:!o})}),Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Show On-Sale Badge","woo-gutenberg-products-block"),help:Object(a.__)('Overlay a "sale" badge if the product is on-sale.',"woo-gutenberg-products-block"),checked:l,onChange:()=>c({showSaleBadge:!l})}),l&&Object(n.createElement)(G.a,{label:Object(a.__)("Sale Badge Alignment","woo-gutenberg-products-block"),value:i,options:[{label:Object(a.__)("Left","woo-gutenberg-products-block"),value:"left"},{label:Object(a.__)("Center","woo-gutenberg-products-block"),value:"center"},{label:Object(a.__)("Right","woo-gutenberg-products-block"),value:"right"}],onChange:e=>c({saleBadgeAlign:e})}),Object(n.createElement)(G.a,{label:Object(a.__)("Image Sizing","woo-gutenberg-products-block"),help:Object(n.createInterpolateElement)(Object(a.__)("Product image cropping can be modified in the Customizer.","woo-gutenberg-products-block"),{a:Object(n.createElement)("a",{href:Object(q.getAdminLink)("customize.php")+"?autofocus[panel]=woocommerce&autofocus[section]=woocommerce_product_images",target:"_blank",rel:"noopener noreferrer"})}),value:r,options:[{label:Object(a.__)("Full Size","woo-gutenberg-products-block"),value:"full-size"},{label:Object(a.__)("Cropped","woo-gutenberg-products-block"),value:"cropped"}],onChange:e=>c({imageSizing:e})}))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Q.a,t)))});const J={title:U,description:$,icon:{src:W},attributes:H.a,edit:K};Object(l.registerBlockType)("woocommerce/product-image",{...g,...J});var X=c(260),Z=c(339);const ee=Object(a.__)("Product Rating","woo-gutenberg-products-block"),te=Object(n.createElement)(i.a,{srcElement:Z.a,className:"wc-block-editor-components-block-icon"}),ce={title:ee,description:Object(a.__)("Display the average rating of a product.","woo-gutenberg-products-block"),icon:{src:te},attributes:{productId:{type:"number",default:0}},edit:k({icon:te,label:ee,description:Object(a.__)("Choose a product to display its rating.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(X.default,t)})};Object(l.registerBlockType)("woocommerce/product-rating",{...g,...ce});var oe=c(261),re=c(206);const ne=Object(a.__)("Add to Cart Button","woo-gutenberg-products-block"),ae=Object(n.createElement)(i.a,{srcElement:re.a,className:"wc-block-editor-components-block-icon"}),se={title:ne,description:Object(a.__)("Display a call to action button which either adds the product to the cart, or links to the product page.","woo-gutenberg-products-block"),icon:{src:ae},attributes:{productId:{type:"number",default:0}},edit:k({icon:ae,label:ne,description:Object(a.__)("Choose a product to display its add to cart button.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(h.Disabled,null,Object(n.createElement)(oe.default,t))})};Object(l.registerBlockType)("woocommerce/product-button",{...g,...se});var le=c(262),ie=c(356);const ue=Object(a.__)("Product Summary","woo-gutenberg-products-block"),de=Object(n.createElement)(i.a,{srcElement:ie.a,className:"wc-block-editor-components-block-icon"}),be={title:ue,description:Object(a.__)("Display a short description about a product.","woo-gutenberg-products-block"),icon:{src:de},attributes:{productId:{type:"number",default:0}},edit:k({icon:de,label:ue,description:Object(a.__)("Choose a product to display its short description.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(le.default,t)})};Object(l.registerBlockType)("woocommerce/product-summary",{...g,...be});var pe=c(192),me=c(331);const ge=Object(a.__)("On-Sale Badge","woo-gutenberg-products-block"),Oe=Object(n.createElement)(i.a,{srcElement:me.a,className:"wc-block-editor-components-block-icon"}),he={title:ge,description:Object(a.__)("Displays an on-sale badge if the product is on-sale.","woo-gutenberg-products-block"),icon:{src:Oe},supports:{html:!1},attributes:{productId:{type:"number",default:0}},edit:k({icon:Oe,label:ge,description:Object(a.__)("Choose a product to display its sale-badge.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(pe.default,t)})};Object(l.registerBlockType)("woocommerce/product-sale-badge",{...g,...he});var je=c(92),Ee=c(263),we=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M2 6h2v12H2V6m3 0h1v12H5V6m2 0h3v12H7V6m4 0h1v12h-1V6m3 0h2v12h-2V6m3 0h3v12h-3V6m4 0h1v12h-1V6z"}));const _e=Object(a.__)("Product SKU","woo-gutenberg-products-block"),fe=Object(n.createElement)(i.a,{srcElement:we,className:"wc-block-editor-components-block-icon"}),ve={title:_e,description:Object(a.__)("Display the SKU of a product.","woo-gutenberg-products-block"),icon:{src:fe},attributes:{productId:{type:"number",default:0}},edit:k({icon:fe,label:_e,description:Object(a.__)("Choose a product to display its SKU.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(Ee.default,t))})};Object(b.c)("woocommerce/product-sku",{...g,...ve});var ke=c(264),ye=c(324);const Ce=Object(a.__)("Product Category List","woo-gutenberg-products-block"),Se=Object(n.createElement)(i.a,{srcElement:ye.a,className:"wc-block-editor-components-block-icon"}),xe=Object(a.__)("Display a list of categories belonging to a product.","woo-gutenberg-products-block");var Ne=k({icon:Se,label:Ce,description:Object(a.__)("Choose a product to display its categories.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(ke.default,t)))});const Pe={...g,title:Ce,description:xe,icon:{src:Se},attributes:{productId:{type:"number",default:0}},edit:Ne};Object(b.c)("woocommerce/product-category-list",Pe);var Te=c(265);const Re=Object(a.__)("Product Tag List","woo-gutenberg-products-block"),Ie=Object(n.createElement)(i.a,{srcElement:me.a,className:"wc-block-editor-components-block-icon"}),Ae={title:Re,description:Object(a.__)("Display a list of tags belonging to a product.","woo-gutenberg-products-block"),icon:{src:Ie},attributes:{productId:{type:"number",default:0}},edit:k({icon:Ie,label:Re,description:Object(a.__)("Choose a product to display its tags.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Te.default,t)))})};Object(b.c)("woocommerce/product-tag-list",{...g,...Ae});var Be=c(266),Le=Object(n.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("g",{fillRule:"evenodd"},Object(n.createElement)("path",{d:"M0 0h24v24H0z",fill:"none"}),Object(n.createElement)("path",{fillRule:"nonzero",d:"M20.5 5.2l-1.4-1.7C19 3.3 18.5 3 18 3H6c-.5 0-.9.2-1.2.5L3.5 5.3A2 2 0 003 6.5V19c0 1.1.9 2 2 2h14a2 2 0 002-2V6.5c0-.5-.2-1-.5-1.3zM6.2 5h11.6l.8 1H5.4l.8-1zM5 19V8h14v11H5z"})));const Ve=Object(a.__)("Product Stock Indicator","woo-gutenberg-products-block"),ze=Object(n.createElement)(i.a,{srcElement:Le,className:"wc-block-editor-components-block-icon"}),De={title:Ve,description:Object(a.__)("Display product stock status.","woo-gutenberg-products-block"),icon:{src:ze},attributes:{productId:{type:"number",default:0}},edit:k({icon:ze,label:Ve,description:Object(a.__)("Choose a product to display its stock.","woo-gutenberg-products-block")})(e=>{let{attributes:t}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(je.a,null),Object(n.createElement)(Be.default,t))})};Object(b.c)("woocommerce/product-stock-indicator",{...g,...De});var Fe=c(471),Me=(c(244),c(253));const He=Object(a.__)("Add to Cart","woo-gutenberg-products-block"),Ge=Object(n.createElement)(i.a,{srcElement:re.a,className:"wc-block-editor-components-block-icon"}),qe={title:He,description:Object(a.__)("Displays an add to cart button. Optionally displays other add to cart form elements.","woo-gutenberg-products-block"),icon:{src:Ge},edit:k({icon:Ge,label:He,description:Object(a.__)("Choose a product to display its add to cart form.","woo-gutenberg-products-block")})(e=>{let{attributes:t,setAttributes:c}=e;const{product:o}=Object(v.useProductDataContext)(),{className:r,showFormElements:l}=t;return Object(n.createElement)("div",{className:m()(r,"wc-block-components-product-add-to-cart")},Object(n.createElement)(je.a,{productId:o.id}),Object(n.createElement)(s.InspectorControls,null,Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Layout","woo-gutenberg-products-block")},Object(Fe.b)(o)?Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Display form elements","woo-gutenberg-products-block"),help:Object(a.__)("Depending on product type, allow customers to select a quantity, variations etc.","woo-gutenberg-products-block"),checked:l,onChange:()=>c({showFormElements:!l})}):Object(n.createElement)(h.Notice,{className:"wc-block-components-product-add-to-cart-notice",isDismissible:!1,status:"info"},Object(a.__)("This product does not support the block based add to cart form. A link to the product page will be shown instead.","woo-gutenberg-products-block")))),Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Me.a,t)))}),attributes:c(252).a};Object(b.c)("woocommerce/product-add-to-cart",{...g,...qe});var Qe=c(24),Ye=c.n(Qe),Ue=c(13),We=(c(10),c(59)),$e=c(462),Ke=c(340),Je=c(25);const Xe=(e,t)=>{const{className:c,contentVisibility:o}=t;return m()(e,c,{"has-image":o&&o.image,"has-title":o&&o.title,"has-rating":o&&o.rating,"has-price":o&&o.price,"has-button":o&&o.button})};var Ze=c(120);const et=[["woocommerce/product-image"],["woocommerce/product-title"],["woocommerce/product-price"],["woocommerce/product-rating"],["woocommerce/product-button"]],tt=e=>e&&0!==e.length?e.map(e=>[e.name,{...e.attributes,product:void 0,children:e.innerBlocks.length>0?tt(e.innerBlocks):[]}]):[];var ct=c(8),ot=c(6),rt=c(30);c(362);const nt=e=>{let{currentPage:t,displayFirstAndLastPages:c,displayNextAndPreviousArrows:o,pagesToDisplay:r,onPageChange:s,totalPages:l}=e,{minIndex:i,maxIndex:u}=((e,t,c)=>{if(c<=2)return{minIndex:null,maxIndex:null};const o=e-1,r=Math.max(Math.floor(t-o/2),2),n=Math.min(Math.ceil(t+(o-(t-r))),c-1);return{minIndex:Math.max(Math.floor(t-(o-(n-t))),2),maxIndex:n}})(r,t,l);const d=c&&Boolean(1!==i),b=c&&Boolean(u!==l),p=c&&Boolean(i>3),g=c&&Boolean(us(t-1),title:Object(a.__)("Previous page","woo-gutenberg-products-block"),disabled:t<=1},Object(n.createElement)(rt.a,{label:"←",screenReaderLabel:Object(a.__)("Previous page","woo-gutenberg-products-block")})),d&&Object(n.createElement)("button",{className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":1===t,"wc-block-components-pagination__page--active":1===t}),onClick:()=>s(1),disabled:1===t},Object(n.createElement)(rt.a,{label:1,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),1)})),p&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…","woo-gutenberg-products-block")),O.map(e=>Object(n.createElement)("button",{key:e,className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===e,"wc-block-components-pagination__page--active":t===e}),onClick:t===e?null:()=>s(e),disabled:t===e},Object(n.createElement)(rt.a,{label:e,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),e)}))),g&&Object(n.createElement)("span",{className:"wc-block-pagination-ellipsis wc-block-components-pagination__ellipsis","aria-hidden":"true"},Object(a.__)("…","woo-gutenberg-products-block")),b&&Object(n.createElement)("button",{className:m()("wc-block-pagination-page","wc-block-components-pagination__page",{"wc-block-pagination-page--active":t===l,"wc-block-components-pagination__page--active":t===l}),onClick:()=>s(l),disabled:t===l},Object(n.createElement)(rt.a,{label:l,screenReaderLabel:Object(a.sprintf)( +/* translators: %d is the page number (1, 2, 3...). */ +Object(a.__)("Page %d","woo-gutenberg-products-block"),l)})),o&&Object(n.createElement)("button",{className:"wc-block-pagination-page wc-block-components-pagination__page wc-block-components-pagination-page--arrow",onClick:()=>s(t+1),title:Object(a.__)("Next page","woo-gutenberg-products-block"),disabled:t>=l},Object(n.createElement)(rt.a,{label:"→",screenReaderLabel:Object(a.__)("Next page","woo-gutenberg-products-block")})))};nt.defaultProps={displayFirstAndLastPages:!0,displayNextAndPreviousArrows:!0,pagesToDisplay:3};var at=nt,st=c(108),lt=c(71),it=c(113),ut=c(16),dt=c(40);var bt=c(60);c(363);const pt=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};var mt=c(46),gt=c(102),Ot=()=>{const{parentClassName:e}=Object(v.useInnerBlockLayoutContext)();return Object(n.createElement)("div",{className:e+"__no-products"},Object(n.createElement)(i.a,{className:e+"__no-products-image",alt:"",srcElement:gt.a,size:100}),Object(n.createElement)("strong",{className:e+"__no-products-title"},Object(a.__)("No products","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:e+"__no-products-description"},Object(a.__)("There are currently no products available to display.","woo-gutenberg-products-block")))},ht=c(345),jt=e=>{let{resetCallback:t=(()=>{})}=e;const{parentClassName:c}=Object(v.useInnerBlockLayoutContext)();return Object(n.createElement)("div",{className:c+"__no-products"},Object(n.createElement)(i.a,{className:c+"__no-products-image",alt:"",srcElement:ht.a,size:100}),Object(n.createElement)("strong",{className:c+"__no-products-title"},Object(a.__)("No products found","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:c+"__no-products-description"},Object(a.__)("We were unable to find any results based on your search.","woo-gutenberg-products-block")),Object(n.createElement)("button",{onClick:t},Object(a.__)("Reset Search","woo-gutenberg-products-block")))},Et=c(104);c(361);var wt=e=>{let{onChange:t,readOnly:c,value:o}=e;return Object(n.createElement)(Et.a,{className:"wc-block-product-sort-select wc-block-components-product-sort-select",name:"orderby",onChange:t,options:[{key:"menu_order",label:Object(a.__)("Default sorting","woo-gutenberg-products-block")},{key:"popularity",label:Object(a.__)("Popularity","woo-gutenberg-products-block")},{key:"rating",label:Object(a.__)("Average rating","woo-gutenberg-products-block")},{key:"date",label:Object(a.__)("Latest","woo-gutenberg-products-block")},{key:"price",label:Object(a.__)("Price: low to high","woo-gutenberg-products-block")},{key:"price-desc",label:Object(a.__)("Price: high to low","woo-gutenberg-products-block")}],readOnly:c,screenReaderLabel:Object(a.__)("Order products by","woo-gutenberg-products-block"),value:o})};const _t=(e,t,c,o)=>{if(!c)return;const a=Object($e.a)(e);return c.map((c,s)=>{let[l,i={}]=c,u=[];i.children&&i.children.length>0&&(u=_t(e,t,i.children,o));const d=a[l];if(!d)return null;const b=t.id||0,p=["layout",l,s,o,b];return Object(n.createElement)(n.Suspense,{key:p.join("_"),fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(d,r()({},i,{children:u,product:t})))})};var ft=Object(j.withInstanceId)(e=>{let{product:t,attributes:c,instanceId:o}=e;const{layoutConfig:r}=c,{parentClassName:a,parentName:s}=Object(v.useInnerBlockLayoutContext)(),l=0===Object.keys(t).length,i=m()(a+"__product","wc-block-layout",{"is-loading":l});return Object(n.createElement)("li",{className:i,"aria-hidden":l},_t(s,t,r,o))});c(360);const vt=function(e){let{totalQuery:t,totalProducts:c}=e,{totalQuery:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!Object(ot.isEqual)(t,o)&&Number.isFinite(c)};var kt,yt=(kt=e=>{let{attributes:t,currentPage:c,onPageChange:o,onSortChange:r,sortValue:s,scrollToTop:l}=e;const[i,u]=Object(lt.b)("attributes",[]),[d,b]=Object(lt.b)("stock_status",[]),[p,g]=Object(lt.b)("min_price"),[O,h]=Object(lt.b)("max_price"),[j]=Object(lt.c)((e=>{let{sortValue:t,currentPage:c,attributes:o}=e;const{columns:r,rows:n}=o;return{...(e=>{switch(e){case"menu_order":case"popularity":case"rating":case"price":return{orderby:e,order:"asc"};case"price-desc":return{orderby:"price",order:"desc"};case"date":return{orderby:"date",order:"desc"}}})(t),catalog_visibility:"catalog",per_page:r*n,page:c}})({attributes:t,sortValue:s,currentPage:c})),{products:E,totalProducts:w,productsLoading:_}=(e=>{const t={namespace:"/wc/store",resourceName:"products"},{results:c,isLoading:o}=Object(it.a)({...t,query:e}),{value:r}=((e,t)=>{const{namespace:c,resourceName:o,resourceValues:r=[],query:n={}}=t;if(!c||!o)throw new Error("The options object must have valid values for the namespace and the resource name properties.");const a=Object(dt.a)(n),s=Object(dt.a)(r),{value:l,isLoading:i=!0}=Object(Ue.useSelect)(e=>{const t=e(ut.COLLECTIONS_STORE_KEY),r=["x-wp-total",c,o,a,s];return{value:t.getCollectionHeader(...r),isLoading:t.hasFinishedResolution("getCollectionHeader",r)}},["x-wp-total",c,o,s,a]);return{value:l,isLoading:i}})(0,{...t,query:e});return{products:c,totalProducts:parseInt(r,10),productsLoading:o}})(j),{parentClassName:f,parentName:k}=Object(v.useInnerBlockLayoutContext)(),y=(e=>{const{order:t,orderby:c,page:o,per_page:r,...n}=e;return n||{}})(j),{dispatchStoreEvent:C}=Object(bt.a)(),S=Object(st.a)({totalQuery:y,totalProducts:w},vt);Object(n.useEffect)(()=>{C("product-list-render",{products:E,listName:k})},[E,k,C]),Object(n.useEffect)(()=>{Object(ot.isEqual)(y,null==S?void 0:S.totalQuery)||(o(1),null!=S&&S.totalQuery&&(e=>{Number.isFinite(e)&&(0===e?Object(mt.speak)(Object(a.__)("No products found","woo-gutenberg-products-block")):Object(mt.speak)(Object(a.sprintf)( +/* translators: %s is an integer higher than 0 (1, 2, 3...) */ +Object(a._n)("%d product found","%d products found",e,"woo-gutenberg-products-block"),e)))})(w))},[null==S?void 0:S.totalQuery,w,o,y]);const{contentVisibility:x}=t,N=t.columns*t.rows,P=!Number.isFinite(w)&&Number.isFinite(null==S?void 0:S.totalProducts)&&Object(ot.isEqual)(y,null==S?void 0:S.totalQuery)?Math.ceil(S.totalProducts/N):Math.ceil(w/N),T=E.length?E:Array.from({length:N}),R=0!==E.length||_,I=i.length>0||d.length>0||Number.isFinite(p)||Number.isFinite(O);return Object(n.createElement)("div",{className:(()=>{const{columns:e,rows:c,alignButtons:o,align:r}=t,n=void 0!==r?"align"+r:"";return m()(f,n,"has-"+e+"-columns",{"has-multiple-rows":c>1,"has-aligned-buttons":o})})()},x.orderBy&&R&&Object(n.createElement)(wt,{onChange:r,value:s}),!R&&I&&Object(n.createElement)(jt,{resetCallback:()=>{u([]),b([]),g(null),h(null)}}),!R&&!I&&Object(n.createElement)(Ot,null),R&&Object(n.createElement)("ul",{className:f+"__products"},T.map((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;return Object(n.createElement)(ft,{key:e.id||c,attributes:t,product:e})}))),P>1&&Object(n.createElement)(at,{currentPage:c,onPageChange:e=>{l({focusableSelector:"a, button"}),o(e)},totalPages:P}))},e=>{const t=Object(n.useRef)(null);return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:t,"aria-hidden":!0}),Object(n.createElement)(kt,r()({},e,{scrollToTop:e=>{null!==t.current&&((e,t)=>{const{focusableSelector:c}=t||{};window&&Number.isFinite(window.innerHeight)&&(c?((e,t)=>{var c;const o=(null===(c=e.parentElement)||void 0===c?void 0:c.querySelectorAll(t))||[];if(o.length){const e=o[0];pt(e),null==e||e.focus()}else pt(e)})(e,c):pt(e))})(t.current,e)}})))}),Ct=e=>{let{attributes:t}=e;const[c,o]=Object(n.useState)(1),[r,a]=Object(n.useState)(t.orderby);return Object(n.useEffect)(()=>{a(t.orderby)},[t.orderby]),Object(n.createElement)(yt,{attributes:t,currentPage:c,onPageChange:e=>{o(e)},onSortChange:e=>{const t=e.target.value;a(t),o(1)},sortValue:r})},St=c(126);class xt extends ct.Component{render(){const{attributes:e,urlParameterSuffix:t}=this.props;return e.isPreview?St.a:Object(n.createElement)(v.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(n.createElement)(Ct,{attributes:e,urlParameterSuffix:t}))}}var Nt=xt;c(359);class Pt extends n.Component{constructor(){super(...arguments),Ye()(this,"state",{isEditing:!1,innerBlocks:[]}),Ye()(this,"blockMap",Object($e.a)("woocommerce/all-products")),Ye()(this,"componentDidMount",()=>{const{block:e}=this.props;this.setState({innerBlocks:e.innerBlocks})}),Ye()(this,"getTitle",()=>Object(a.__)("All Products","woo-gutenberg-products-block")),Ye()(this,"getIcon",()=>Object(n.createElement)(i.a,{srcElement:d})),Ye()(this,"togglePreview",()=>{const{debouncedSpeak:e}=this.props;this.setState({isEditing:!this.state.isEditing}),this.state.isEditing||e(Object(a.__)("Showing All Products block preview.","woo-gutenberg-products-block"))}),Ye()(this,"getInspectorControls",()=>{const{attributes:e,setAttributes:t}=this.props,{columns:c,rows:o,alignButtons:r}=e;return Object(n.createElement)(s.InspectorControls,{key:"inspector"},Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Layout Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(We.a,{columns:c,rows:o,alignButtons:r,setAttributes:t,minColumns:Object(q.getSetting)("min_columns",1),maxColumns:Object(q.getSetting)("max_columns",6),minRows:Object(q.getSetting)("min_rows",1),maxRows:Object(q.getSetting)("max_rows",6)})),Object(n.createElement)(h.PanelBody,{title:Object(a.__)("Content Settings","woo-gutenberg-products-block")},((e,t)=>{const{contentVisibility:c}=e;return Object(n.createElement)(h.ToggleControl,{label:Object(a.__)("Show Sorting Dropdown","woo-gutenberg-products-block"),checked:c.orderBy,onChange:()=>t({contentVisibility:{...c,orderBy:!c.orderBy}})})})(e,t),((e,t)=>Object(n.createElement)(h.SelectControl,{label:Object(a.__)("Order Products By","woo-gutenberg-products-block"),value:e.orderby,options:[{label:Object(a.__)("Default sorting (menu order)","woo-gutenberg-products-block"),value:"menu_order"},{label:Object(a.__)("Popularity","woo-gutenberg-products-block"),value:"popularity"},{label:Object(a.__)("Average rating","woo-gutenberg-products-block"),value:"rating"},{label:Object(a.__)("Latest","woo-gutenberg-products-block"),value:"date"},{label:Object(a.__)("Price: low to high","woo-gutenberg-products-block"),value:"price"},{label:Object(a.__)("Price: high to low","woo-gutenberg-products-block"),value:"price-desc"}],onChange:e=>t({orderby:e})}))(e,t)))}),Ye()(this,"getBlockControls",()=>{const{isEditing:e}=this.state;return Object(n.createElement)(s.BlockControls,null,Object(n.createElement)(h.ToolbarGroup,{controls:[{icon:"edit",title:Object(a.__)("Edit inner product layout","woo-gutenberg-products-block"),onClick:()=>this.togglePreview(),isActive:e}]}))}),Ye()(this,"renderEditMode",()=>{const e={template:this.props.attributes.layoutConfig,templateLock:!1,allowedBlocks:Object.keys(this.blockMap)};return 0!==this.props.attributes.layoutConfig.length&&(e.renderAppender=!1),Object(n.createElement)(h.Placeholder,{icon:this.getIcon(),label:this.getTitle()},Object(a.__)("Display all products from your store as a grid.","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-all-products-grid-item-template"},Object(n.createElement)(h.Tip,null,Object(a.__)("Edit the blocks inside the preview below to change the content displayed for each product within the product grid.","woo-gutenberg-products-block")),Object(n.createElement)(v.InnerBlockLayoutContextProvider,{parentName:"woocommerce/all-products",parentClassName:"wc-block-grid"},Object(n.createElement)("div",{className:"wc-block-grid wc-block-layout has-1-columns"},Object(n.createElement)("ul",{className:"wc-block-grid__products"},Object(n.createElement)("li",{className:"wc-block-grid__product"},Object(n.createElement)(v.ProductDataContextProvider,{product:Ke.a[0]},Object(n.createElement)(s.InnerBlocks,e)))))),Object(n.createElement)("div",{className:"wc-block-all-products__actions"},Object(n.createElement)(h.Button,{className:"wc-block-all-products__done-button",isPrimary:!0,onClick:()=>{const{block:e,setAttributes:t}=this.props;t({layoutConfig:tt(e.innerBlocks)}),this.setState({innerBlocks:e.innerBlocks}),this.togglePreview()}},Object(a.__)("Done","woo-gutenberg-products-block")),Object(n.createElement)(h.Button,{className:"wc-block-all-products__cancel-button",isTertiary:!0,onClick:()=>{const{block:e,replaceInnerBlocks:t}=this.props,{innerBlocks:c}=this.state;t(e.clientId,c,!1),this.togglePreview()}},Object(a.__)("Cancel","woo-gutenberg-products-block")),Object(n.createElement)(h.Button,{className:"wc-block-all-products__reset-button",icon:Object(n.createElement)(i.a,{srcElement:d}),label:Object(a.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:()=>{const{block:e,replaceInnerBlocks:t}=this.props,c=[];et.map(e=>{let[t,o]=e;return c.push(Object(l.createBlock)(t,o)),!0}),t(e.clientId,c,!1),this.setState({innerBlocks:e.innerBlocks})}},Object(a.__)("Reset Layout","woo-gutenberg-products-block")))))}),Ye()(this,"renderViewMode",()=>{const{attributes:e}=this.props,{layoutConfig:t}=e,c=t&&0!==t.length,o=this.getTitle(),r=this.getIcon();return c?Object(n.createElement)(h.Disabled,null,Object(n.createElement)(Nt,{attributes:e})):((e,t)=>Object(n.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(a.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")))(o,r)}),Ye()(this,"render",()=>{const{attributes:e}=this.props,{isEditing:t}=this.state,c=this.getTitle(),o=this.getIcon();return 0===Je.o.productCount?((e,t)=>Object(n.createElement)(h.Placeholder,{className:"wc-block-products",icon:t,label:e},Object(n.createElement)("p",null,Object(a.__)("You haven't published any products to list here yet.","woo-gutenberg-products-block")),Object(n.createElement)(h.Button,{className:"wc-block-products__add-product-button",isSecondary:!0,href:q.ADMIN_URL+"post-new.php?post_type=product"},Object(a.__)("Add new product","woo-gutenberg-products-block")+" ",Object(n.createElement)(i.a,{srcElement:Ze.a})),Object(n.createElement)(h.Button,{className:"wc-block-products__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(a.__)("Learn more","woo-gutenberg-products-block"))))(c,o):Object(n.createElement)("div",{className:Xe("wc-block-all-products",e)},this.getBlockControls(),this.getInspectorControls(),t?this.renderEditMode():this.renderViewMode())})}}var Tt=Object(j.compose)(h.withSpokenMessages,Object(Ue.withSelect)((e,t)=>{let{clientId:c}=t;const{getBlock:o}=e("core/block-editor");return{block:o(c)}}),Object(Ue.withDispatch)(e=>{const{replaceInnerBlocks:t}=e("core/block-editor");return{replaceInnerBlocks:t}}))(Pt);const Rt={columns:Object(q.getSetting)("default_columns",3),rows:Object(q.getSetting)("default_rows",3),alignButtons:!1,contentVisibility:{orderBy:!0},orderby:"date",layoutConfig:et,isPreview:!1},It={title:Object(a.__)("All Products","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(i.a,{srcElement:d,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Display products from your store in a grid layout.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number"},rows:{type:"number"},alignButtons:{type:"boolean"},contentVisibility:{type:"object"},orderby:{type:"string"},layoutConfig:{type:"array"},isPreview:{type:"boolean",default:!1}},defaults:Rt,edit:e=>Object(n.createElement)(Tt,e),save(e){let{attributes:t}=e;const c={};Object.keys(t).sort().forEach(e=>{c[e]=t[e]});const o={"data-attributes":JSON.stringify(c)};return Object(n.createElement)("div",r()({className:Xe("wc-block-all-products",t)},o),Object(n.createElement)(s.InnerBlocks.Content,null))}};Object(l.registerBlockType)("woocommerce/all-products",{...It,deprecated:[{attributes:Object.assign({},It.attributes,{rows:{type:"number",default:1}}),save(e){let{attributes:t}=e;const c={"data-attributes":JSON.stringify(t)};return Object(n.createElement)("div",r()({className:Xe("wc-block-all-products",t)},c),Object(n.createElement)(s.InnerBlocks.Content,null))}}]})},,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var o=c(39),r=c(0),n=c(25);c.p=n.l,Object(o.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(r.lazy)(()=>Promise.all([c.e(0),c.e(11)]).then(c.bind(null,259)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(r.lazy)(()=>Promise.all([c.e(1),c.e(3),c.e(10)]).then(c.bind(null,495)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(r.lazy)(()=>Promise.all([c.e(1),c.e(17)]).then(c.bind(null,496)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(r.lazy)(()=>c.e(12).then(c.bind(null,260)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(r.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(8)]).then(c.bind(null,261)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(r.lazy)(()=>c.e(15).then(c.bind(null,262)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(r.lazy)(()=>c.e(3).then(c.bind(null,192)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(r.lazy)(()=>c.e(13).then(c.bind(null,263)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(r.lazy)(()=>c.e(9).then(c.bind(null,264)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(r.lazy)(()=>c.e(16).then(c.bind(null,265)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(r.lazy)(()=>c.e(14).then(c.bind(null,266)))}),Object(o.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(r.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(7)]).then(c.bind(null,497)))});const a=e=>Object(o.getRegisteredBlockComponents)(e)},,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return r}));const o=e=>e.is_purchasable||!1,r=e=>["simple","variable"].includes(e.type||"simple")}]); \ No newline at end of file diff --git a/build/all-reviews.asset.php b/build/all-reviews.asset.php new file mode 100644 index 00000000000..299bd96e763 --- /dev/null +++ b/build/all-reviews.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '62701e54ce392bb9d6c44d16c9b9956a'); \ No newline at end of file diff --git a/build/all-reviews.js b/build/all-reviews.js new file mode 100644 index 00000000000..7da3ad6436d --- /dev/null +++ b/build/all-reviews.js @@ -0,0 +1,7 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["all-reviews"]=function(e){function t(t){for(var o,a,s=t[0],i=t[1],l=t[2],u=0,b=[];u{let{className:t,instanceId:r,label:n,onChange:s,options:i,screenReaderLabel:l,readOnly:d,value:u}=e;const b="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(a.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(o.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,readOnly:d,value:u},i.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},11:function(e,t){e.exports=window.wp.apiFetch},110:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(25);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`

${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`

${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:null,verified:!1}]}}},12:function(e,t){e.exports=window.wp.blocks},130:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},131:function(e,t,r){"use strict";var o=r(5),n=r.n(o),c=r(0),a=r(7),s=(r(141),r(53));t.a=e=>{let{attributes:t}=e;return Object(c.createElement)("div",n()({},a.useBlockProps.save({className:Object(s.a)(t)}),Object(s.b)(t)))}},134:function(e,t,r){"use strict";var o=r(0),n=r(1),c=(r(10),r(6)),a=r(3),s=r(7),i=r(8),l=r(2),d=r(69),u=r(30);r(167);const b=e=>{let{onClick:t,label:r,screenReaderLabel:n}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(u.a,{label:r,screenReaderLabel:n})))};b.defaultProps={label:Object(n.__)("Load more","woo-gutenberg-products-block")};var w=b,m=r(104);r(164);var p=e=>{let{onChange:t,readOnly:r,value:c}=e;return Object(o.createElement)(m.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(n.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(n.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(n.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(n.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(n.__)("Order reviews by","woo-gutenberg-products-block"),value:c})},g=r(4),h=r.n(g),v=r(24),O=r.n(v),_=r(151),j=r.n(_);const f=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const o=j()(e,{suffix:r,limit:t});return o.html},k=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e),y=(e,t,r,o)=>{const n=((e,t,r)=>{let o={start:0,middle:0,end:e.length};for(;o.start<=o.end;)o.middle=Math.floor((o.start+o.end)/2),t.innerHTML=f(e,o.middle),o=k(o,t.clientHeight,r);return o.middle})(e,t,r);return f(e,n-o.length,o)},E={className:"read-more-content",ellipsis:"…",lessText:Object(n.__)("Read less","woo-gutenberg-products-block"),maxLines:3,moreText:Object(n.__)("Read more","woo-gutenberg-products-block")};class R extends i.Component{constructor(e){super(e),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=Object(i.createRef)(),this.reviewSummary=Object(i.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const r=(this.reviewSummary.current.clientHeight+1)*e+1,o=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:o}),o&&this.setState({summary:y(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:n}=this.props,c=e?r:n;if(c)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:n,isExpanded:c}=this.state;return t?!1===n?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!c||null===n)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:r}}),(c||null===n)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}O()(R,"defaultProps",E);var C=R;r(166);var S=e=>{let{attributes:t,review:r={}}=e;const{imageType:c,showReviewDate:a,showReviewerName:s,showReviewImage:i,showReviewRating:l,showReviewContent:d,showProductName:u}=t,{rating:b}=r,w=!Object.keys(r).length>0,m=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:h()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":w,"wc-block-components-review-list-item__item--has-image":i}),"aria-hidden":w},(u||a||s||i||m)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},i&&function(e,t,r){var c,a;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(c=e.product_image)||void 0===c?void 0:c.alt)||"",src:(null===(a=e.product_image)||void 0===a?void 0:a.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(n.__)("Verified buyer","woo-gutenberg-products-block")},Object(n.__)("Verified buyer","woo-gutenberg-products-block")))}(r,c,w),(u||s||m||a)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},m&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},c=Object(n.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(n.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(o.createElement)("span",{style:r},c)))}(r),u&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),s&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),a&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),d&&function(e){return Object(o.createElement)(C,{maxLines:10,moreText:Object(n.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(n.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(165);var P=e=>{let{attributes:t,reviews:r}=e;const n=Object(l.getSetting)("showAvatars",!0),c=Object(l.getSetting)("reviewRatingsEnabled",!0),a=(n||"product"===t.imageType)&&t.showReviewImage,s=c&&t.showReviewRating,i={...t,showReviewImage:a,showReviewRating:s};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(S,{attributes:i}):r.map((e,t)=>Object(o.createElement)(S,{key:e.id||t,attributes:i,review:e})))},N=r(5),T=r.n(N),L=r(26),x=r.n(L),A=r(53),M=r(28);class I extends i.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:c,reviews:s,totalReviews:i}=this.props;if(t)return Object(o.createElement)(d.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===s.length&&!r)return Object(o.createElement)(c,{attributes:e});const u=Object(l.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(a.Disabled,null,e.showOrderby&&u&&Object(o.createElement)(p,{readOnly:!0,value:e.orderby}),Object(o.createElement)(P,{attributes:e,reviews:s}),e.showLoadMore&&i>s.length&&Object(o.createElement)(w,{screenReaderLabel:Object(n.__)("Load more reviews","woo-gutenberg-products-block")}))}}var D=(e=>{class t extends i.Component{constructor(){super(...arguments),O()(this,"isPreview",!!this.props.attributes.previewReviews),O()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),O()(this,"isMounted",!1),O()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),O()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(M.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,o=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(o).fill({}))}),Object(A.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:o}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:o,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:n,reviews:c,totalReviews:a}=this.state;return Object(o.createElement)(e,T()({},this.props,{error:r,isLoading:n,reviews:c.slice(0,t),totalReviews:a}))}}O()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(I);t.a=e=>{let{attributes:t,icon:r,name:i,noReviewsPlaceholder:l}=e;const{categoryIds:d,productId:u,reviewsOnPageLoad:b,showProductName:w,showReviewDate:m,showReviewerName:p,showReviewContent:g,showReviewImage:h,showReviewRating:v}=t,{order:O,orderby:_}=Object(A.d)(t.orderby),j=!(g||v||m||p||h||w),f=Object(s.useBlockProps)({className:Object(A.a)(t)});return j?Object(o.createElement)(a.Placeholder,{icon:r,label:i},Object(n.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(o.createElement)("div",f,Object(o.createElement)(D,{attributes:t,categoryIds:d,delayFunction:e=>Object(c.debounce)(e,400),noReviewsPlaceholder:l,orderby:_,order:O,productId:u,reviewsToDisplay:b}))}},141:function(e,t){},142:function(e,t){},164:function(e,t){},165:function(e,t){},166:function(e,t){},167:function(e,t){},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return s})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return w})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return p})),r.d(t,"h",(function(){return g})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return O}));var o,n=r(2);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=c.pluginUrl+"images/",s=c.pluginUrl+"build/",i=c.buildPhase,l=null===(o=n.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,d=n.STORE_PAGES.checkout.id,u=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,w=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),m=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),p=n.STORE_PAGES.cart.permalink,g=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),h=Object(n.getSetting)("allowedCountries",{}),v=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},26:function(e,t){e.exports=window.wp.isShallowEqual},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var o=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,r){"use strict";var o=r(0),n=r(4),c=r.n(n);t.a=e=>{let t,{label:r,screenReaderLabel:n,wrapperElement:a,wrapperProps:s={}}=e;const i=null!=r,l=null!=n;return!i&&l?(t=a||"span",s={...s,className:c()(s.className,"screen-reader-text")},Object(o.createElement)(t,s,n)):(t=a||o.Fragment,i&&l&&r!==n?Object(o.createElement)(t,s,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,s,r))}},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(31);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},341:function(e,t,r){e.exports=r(447)},43:function(e,t,r){"use strict";var o=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:r,height:r,...n}):null}},447:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(1),c=r(12),a=r(43),s=r(18),i=Object(o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M15 4v7H5.17l-.59.59-.58.58V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"})),l=(r(141),r(7)),d=r(3),u=(r(10),r(134)),b=()=>Object(o.createElement)(d.Placeholder,{className:"wc-block-all-reviews",icon:Object(o.createElement)(a.a,{srcElement:i,className:"block-editor-block-icon"}),label:Object(n.__)("All Reviews","woo-gutenberg-products-block")},Object(n.__)("This block shows a list of all product reviews. Your store does not have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block")),w=r(94),m=r(130),p=r(131),g=r(110);Object(c.registerBlockType)("woocommerce/all-reviews",{apiVersion:2,title:Object(n.__)("All Reviews","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:i,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Show a list of all product reviews.","woo-gutenberg-products-block"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...g.a,attributes:{...g.a.attributes,showProductName:!0}},attributes:{...m.a,showProductName:{type:"boolean",default:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:r}=e;return"woocommerce_recent_reviews"===t&&!(null==r||!r.raw)},transform:e=>{let{instance:t}=e;return Object(c.createBlock)("woocommerce/all-reviews",{reviewsOnPageLoad:t.raw.number,imageType:"product",showLoadMore:!1,showOrderby:!1,showReviewDate:!1,showReviewContent:!1})}}]},edit:e=>{let{attributes:t,setAttributes:r}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(l.InspectorControls,{key:"inspector"},Object(o.createElement)(d.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(d.ToggleControl,{label:Object(n.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:()=>r({showProductName:!t.showProductName})}),Object(w.b)(t,r)),Object(o.createElement)(d.PanelBody,{title:Object(n.__)("List Settings","woo-gutenberg-products-block")},Object(w.c)(t,r))),Object(o.createElement)(u.a,{attributes:t,icon:Object(o.createElement)(a.a,{icon:i,className:"block-editor-block-icon"}),name:Object(n.__)("All Reviews","woo-gutenberg-products-block"),noReviewsPlaceholder:b}))},save:p.a})},53:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var o=r(11),n=r.n(o),c=r(4),a=r.n(c),s=r(2);const i=e=>{if(Object(s.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=e=>n()({path:"/wc/store/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),d=e=>{const{className:t,categoryIds:r,productId:o,showReviewDate:n,showReviewerName:c,showReviewContent:s,showProductName:i,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return o&&(u="wc-block-reviews-by-product"),Array.isArray(r)&&(u="wc-block-reviews-by-category"),a()(u,t,{"has-image":l,"has-name":c,"has-date":n,"has-rating":d,"has-content":s,"has-product-name":i})},u=e=>{const{categoryIds:t,imageType:r,orderby:o,productId:n,reviewsOnPageLoad:c,reviewsOnLoadMore:a,showLoadMore:s,showOrderby:i}=e,l={"data-image-type":r,"data-orderby":o,"data-reviews-on-page-load":c,"data-reviews-on-load-more":a,"data-show-load-more":s,"data-show-orderby":i};return n&&(l["data-product-id"]=n),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},55:function(e,t,r){"use strict";var o=r(5),n=r.n(o),c=r(0),a=r(6),s=r(4),i=r.n(s),l=r(3),d=r(9);r(82);class u extends c.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:r,className:o,help:s,options:d,value:u}=this.props,b="inspector-toggle-button-control-"+r;let w;return s&&(w=Object(a.isFunction)(s)?s(t):s),Object(c.createElement)(l.BaseControl,{id:b,help:w,className:i()("components-toggle-button-control",o)},Object(c.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(c.createElement)(l.ButtonGroup,{"aria-labelledby":b+"__label"},d.map((t,r)=>{const o={};return u===t.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(c.createElement)(l.Button,n()({key:`${t.label}-${t.value}-${r}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},o),t.label)})))}}t.a=Object(d.withInstanceId)(u)},6:function(e,t){e.exports=window.lodash},69:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(43),a=r(102),s=r(4),i=r.n(s),l=r(3),d=r(32);r(103),t.a=e=>{let{className:t,error:r,isLoading:s=!1,onRetry:u}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(c.a,{srcElement:a.a}),label:Object(n.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(o.createElement)(d.a,{error:r}),u&&Object(o.createElement)(o.Fragment,null,s?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:u},Object(n.__)("Retry","woo-gutenberg-products-block"))))}},7:function(e,t){e.exports=window.wp.blockEditor},8:function(e,t){e.exports=window.React},82:function(e,t){},9:function(e,t){e.exports=window.wp.compose},94:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return u}));var o=r(0),n=r(1),c=r(3),a=r(7),s=r(2),i=r(55);const l=(e,t,r)=>Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(c.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),d=(e,t)=>{const r=Object(s.getSetting)("showAvatars",!0),a=Object(s.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!a&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your store settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(n.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:e=>t({imageType:e})}),"reviewer"===e.imageType&&!r&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},u=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(c.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))}}); \ No newline at end of file diff --git a/build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js b/build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js new file mode 100644 index 00000000000..234a28cdaa6 --- /dev/null +++ b/build/atomic-block-components/add-to-cart--atomic-block-components/button--atomic-block-components/image---a7e2bb9b.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],{149:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},247:function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return i}));const n=window.CustomEvent||null,c=(e,t)=>{let{bubbles:r=!1,cancelable:c=!1,element:o,detail:s={}}=t;if(!n)return;o||(o=document.body);const i=new n(e,{bubbles:r,cancelable:c,detail:s});o.dispatchEvent(i)};let o;const s=()=>{o&&clearTimeout(o),o=setTimeout(()=>{c("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const o=()=>{c(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,o),()=>jQuery(document).off(e,o)}},248:function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return a}));var n=r(2),c=r(98),o=r(15);const s=e=>{let{country:t="",state:r="",city:n="",postcode:c=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:c?c.replace(" ","").toUpperCase():""}},i=e=>{let{email:t=""}=e;return Object(o.isEmail)(t)?t.trim():""},a=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(c.a)(t,{},e.country),o=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(o[r]="")}),o}},36:function(e,t,r){"use strict";r.d(t,"a",(function(){return w}));var n=r(6),c=r(0),o=r(16),s=r(13),i=r(14),a=r(149),u=r(248),d=r(49),l=r(247);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(s.dispatch)(o.CART_STORE_KEY).invalidateResolutionForStore()},_=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},b=()=>{Object(c.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(l.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(l.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),_),[])},m={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},f={...m,email:""},E={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:o.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},h=e=>Object(a.a)(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(i.decodeEntities)(r)]})),g={cartCoupons:o.EMPTY_CART_COUPONS,cartItems:o.EMPTY_CART_ITEMS,cartFees:o.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:E,cartIsLoading:!0,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:f,shippingAddress:m,shippingRates:o.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:o.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:o.EMPTY_EXTENSIONS},w=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(d.b)(),i=null==r?void 0:r.previewCart,{shouldSelect:a}=e,l=Object(c.useRef)();b();const p=Object(s.useSelect)((e,r)=>{let{dispatch:n}=r;if(!a)return g;if(t)return{cartCoupons:i.coupons,cartItems:i.items,cartFees:i.fees,cartItemsCount:i.items_count,cartItemsWeight:i.items_weight,cartNeedsPayment:i.needs_payment,cartNeedsShipping:i.needs_shipping,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:i.totals,cartIsLoading:!1,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:f,shippingAddress:m,extensions:o.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const c=e(o.CART_STORE_KEY),s=c.getCartData(),d=c.getCartErrors(),l=c.getCartTotals(),p=!c.hasFinishedResolution("getCartData"),_=c.isCustomerDataUpdating(),{receiveCart:b}=n(o.CART_STORE_KEY),E=h(s.billingAddress),w=s.needsShipping?h(s.shippingAddress):E,C=s.fees.length>0?s.fees.map(e=>h(e)):o.EMPTY_CART_FEES;return{cartCoupons:s.coupons.length>0?s.coupons.map(e=>({...e,label:e.code})):o.EMPTY_CART_COUPONS,cartItems:s.items,cartFees:C,cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors,cartTotals:l,cartIsLoading:p,cartErrors:d,billingAddress:Object(u.a)(E),shippingAddress:Object(u.a)(w),extensions:s.extensions,shippingRates:s.shippingRates,shippingRatesLoading:_,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements,receiveCart:b}},[a]);return l.current&&Object(n.isEqual)(l.current,p)||(l.current=p),l.current}},49:function(e,t,r){"use strict";r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return i}));var n=r(0),c=r(13);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(n.useContext)(o),i=e=>{let{children:t,currentPostId:r=0,currentView:s="",previewData:i={}}=e;const a=Object(c.useSelect)(e=>r||e("core/editor").getCurrentPostId(),[r]),u=Object(n.useCallback)(e=>e in i?i[e]:{},[i]),d={isEditor:!0,currentPostId:a,currentView:s,previewData:i,getPreviewData:u};return Object(n.createElement)(o.Provider,{value:d},t)}},60:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(61),c=r(0),o=r(36);const s=()=>{const e=Object(o.a)(),t=Object(c.useRef)(e);return Object(c.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(c.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(c.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},85:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"c",(function(){return c})),r.d(t,"b",(function(){return o})),r.d(t,"d",(function(){return s}));const n=e=>"number"==typeof e,c=e=>"string"==typeof e,o=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function s(e,t){return o(e)&&t in e}},98:function(e,t,r){"use strict";var n=r(2),c=r(1),o=r(85);const s=Object(n.getSetting)("countryLocale",{}),i=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(c.sprintf)( +/* translators: %s Field label. */ +Object(c.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(o.a)(e.priority)&&(t.index=e.priority),Object(o.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},a=Object.entries(s).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,i(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const c=r&&void 0!==a[r]?a[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...c[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/add-to-cart--atomic-block-components/button.js b/build/atomic-block-components/add-to-cart--atomic-block-components/button.js new file mode 100644 index 00000000000..b083699c0c2 --- /dev/null +++ b/build/atomic-block-components/add-to-cart--atomic-block-components/button.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{128:function(e,t,c){"use strict";c.d(t,"b",(function(){return v})),c.d(t,"a",(function(){return N}));var o=c(0),n=(c(10),c(13)),s=c(60),r=c(49),i=c(5),a=c.n(i),u=c(4),l=c.n(u),d=c(481);c(157);const m=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 b=e=>{let{className:t,notices:c,removeNotice:n}=e;const s=c.filter(e=>"snackbar"!==e.type);if(!s.length)return null;const r=l()(t,"wc-block-components-notices");return Object(o.createElement)("div",{className:r},s.map(e=>Object(o.createElement)(d.a,a()({key:"store-notice-"+e.id},e,{className:l()("wc-block-components-notices__notice",m(e)),onRemove:()=>{e.isDismissible&&n(e.id)}}),e.content)))};const f=Object(o.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),v=()=>Object(o.useContext)(f),N=e=>{let{children:t,className:c="",createNoticeContainer:i=!0,context:a="wc/core"}=e;const{createNotice:u,removeNotice:l}=Object(n.useDispatch)("core/notices"),[d,m]=Object(o.useState)(!1),{dispatchStoreEvent:v}=Object(s.a)(),{isEditor:N}=Object(r.b)(),O=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};u(e,t,{...c,context:c.context||a}),v("store-notice-create",{status:e,content:t,options:c})}),[u,v,a]),j=Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;l(e,t)}),[l,a]),{notices:p}=Object(n.useSelect)(e=>({notices:e("core/notices").getNotices(a)}),[a]),h={notices:p,createNotice:O,removeNotice:j,context:a,setIsSuppressed:m},g=d?null:Object(o.createElement)(b,{className:c,notices:h.notices,removeNotice:h.removeNotice,isEditor:N});return Object(o.createElement)(f.Provider,{value:h},i&&g,t)}},157:function(e,t){},355:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var o=c(0),n=c(13),s=c(16),r=c(14),i=c(36),a=c(47);const u=(e,t)=>{const c=e.find(e=>{let{id:c}=e;return c===t});return c?c.quantity:0},l=e=>{const{addItemToCart:t}=Object(n.useDispatch)(s.CART_STORE_KEY),{cartItems:c,cartIsLoading:l}=Object(i.a)(),{addErrorNotice:d,removeNotice:m}=Object(a.a)(),[b,f]=Object(o.useState)(!1),v=Object(o.useRef)(u(c,e));return Object(o.useEffect)(()=>{const t=u(c,e);t!==v.current&&(v.current=t)},[c,e]),{cartQuantity:Number.isFinite(v.current)?v.current:0,addingToCart:b,cartIsLoading:l,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return f(!0),t(e,c).then(()=>{m("add-to-cart")}).catch(e=>{d(Object(r.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{f(!1)})}}}},47:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var o=c(0),n=c(128);const s=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:s}=Object(n.b)(),r=Object(o.useRef)(e);Object(o.useEffect)(()=>{r.current=e},[e]);const i=Object(o.useMemo)(()=>({hasNoticesOfType:e=>r.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;r.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),a=Object(o.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...i,...a,setIsSuppressed:s}}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/add-to-cart-frontend.js b/build/atomic-block-components/add-to-cart-frontend.js new file mode 100644 index 00000000000..61ed9b4d155 --- /dev/null +++ b/build/atomic-block-components/add-to-cart-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{130:function(e,t,r){"use strict";var s=r(0);r(157),t.a=()=>Object(s.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},157:function(e,t){},160:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return u}));var s=r(0),c=r(5),n=r(11),a=r.n(n);const o=Object(s.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(s.useContext)(o),u=e=>{let{children:t}=e;const[r,n]=Object(s.useState)({}),i=Object(s.useCallback)(e=>r[e],[r]),u=Object(s.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),l=Object(s.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:r,...s}=t;return s})},[]),d=Object(s.useCallback)(()=>{n({})},[]),b=Object(s.useCallback)(e=>{e&&n(t=>(e=Object(c.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&a()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),E=Object(s.useCallback)((e,t)=>{n(r=>{if(!r.hasOwnProperty(e))return r;const s={...r[e],...t};return a()(r[e],s)?r:{...r,[e]:s}})},[]),p={getValidationError:i,setValidationErrors:b,clearValidationError:l,clearAllValidationErrors:d,hideValidationError:Object(s.useCallback)(e=>{E(e,{hidden:!0})},[E]),showValidationError:Object(s.useCallback)(e=>{E(e,{hidden:!1})},[E]),showAllValidationErrors:Object(s.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:u};return Object(s.createElement)(o.Provider,{value:p},t)}},169:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var s=r(89);const c=(e,t)=>function(r){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=s.a.addEventCallback(e,r,c);return t(n),()=>{t(s.a.removeEventCallback(e,n.id))}}},17:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var s=r(0),c=r(11),n=r.n(c);function a(e){const t=Object(s.useRef)(e);return n()(e,t.current)||(t.current=e),t.current}},170:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));const s=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var c=r(29);const n=async(e,t,r)=>{const c=s(e,t),n=[];for(const e of c)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},a=async(e,t,r)=>{const n=[],a=s(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(c.a)(t)||Object(c.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},221:function(e,t){},227:function(e,t,r){"use strict";var s=r(10),c=r.n(s),n=r(0),a=r(56),o=r(4),i=r.n(o),u=r(130);r(230),t.a=e=>{let{className:t,showSpinner:r=!1,children:s,...o}=e;const l=i()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return Object(n.createElement)(a.a,c()({className:l},o),r&&Object(n.createElement)(u.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},s))}},230:function(e,t){},235:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var s=r(0),c=(r(8),r(160));r(221);const n=e=>{let{errorMessage:t="",propertyName:r="",elementId:n=""}=e;const{getValidationError:a,getValidationErrorId:o}=Object(c.b)();if(!t||"string"!=typeof t){const e=a(r)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(s.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(s.createElement)("p",{id:o(n)},t))}},29:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return d}));var s=r(35);let c,n;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(c||(c={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(n||(n={}));const a=(e,t)=>Object(s.c)(e)&&"type"in e&&e.type===t,o=e=>a(e,c.SUCCESS),i=e=>a(e,c.ERROR),u=e=>a(e,c.FAIL),l=e=>!Object(s.c)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:c,noticeContexts:n,shouldRetry:l,isSuccessResponse:o,isErrorResponse:i,isFailResponse:u})},316:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var s=r(0),c=r(9),n=r(6),a=r(19),o=r(22),i=r(32);const u=(e,t)=>{const r=e.find(e=>{let{id:r}=e;return r===t});return r?r.quantity:0},l=e=>{const{addItemToCart:t}=Object(c.useDispatch)(n.CART_STORE_KEY),{cartItems:r,cartIsLoading:l}=Object(o.a)(),{addErrorNotice:d,removeNotice:b}=Object(i.a)(),[E,p]=Object(s.useState)(!1),m=Object(s.useRef)(u(r,e));return Object(s.useEffect)(()=>{const t=u(r,e);t!==m.current&&(m.current=t)},[r,e]),{cartQuantity:Number.isFinite(m.current)?m.current:0,addingToCart:E,cartIsLoading:l,addToCart:function(){let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return p(!0),t(e,r).then(()=>{b("add-to-cart")}).catch(e=>{d(Object(a.decodeEntities)(e.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{p(!1)})}}}},32:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var s=r(0),c=r(87);const n=()=>{const{notices:e,createNotice:t,removeNotice:r,setIsSuppressed:n}=Object(c.b)(),a=Object(s.useRef)(e);Object(s.useEffect)(()=>{a.current=e},[e]);const o=Object(s.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||r(t.id)})},removeNotice:r}),[r]),i=Object(s.useMemo)(()=>({addDefaultNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...r})},addErrorNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...r})},addWarningNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...r})},addInfoNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...r})},addSuccessNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...r})}}),[t]);return{notices:e,...o,...i,setIsSuppressed:n}}},322:function(e,t){},323:function(e,t,r){"use strict";var s=r(0),c=r(24);const n=Object(s.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(s.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(s.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},324:function(e,t){},382:function(e,t,r){"use strict";r.r(t);var s=r(110),c=r(0),n=(r(8),r(4)),a=r.n(n),o=r(1),i=r(17);const u=e=>e.is_purchasable||!1,l={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},d={status:l.PRISTINE,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},b={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:E,SET_IDLE:p,SET_DISABLED:m,SET_PROCESSING:O,SET_BEFORE_PROCESSING:h,SET_AFTER_PROCESSING:f,SET_PROCESSING_RESPONSE:j,SET_HAS_ERROR:_,SET_NO_ERROR:g,SET_QUANTITY:S,SET_REQUEST_PARAMS:v}=b,y=()=>({type:p}),R=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?_:g;return{type:t}},{SET_PRISTINE:C,SET_IDLE:P,SET_DISABLED:T,SET_PROCESSING:A,SET_BEFORE_PROCESSING:k,SET_AFTER_PROCESSING:N,SET_PROCESSING_RESPONSE:w,SET_HAS_ERROR:I,SET_NO_ERROR:D,SET_QUANTITY:F,SET_REQUEST_PARAMS:V}=b,{PRISTINE:B,IDLE:L,DISABLED:q,PROCESSING:x,BEFORE_PROCESSING:G,AFTER_PROCESSING:M}=l,Q=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d,{quantity:r,type:s,data:c}=arguments.length>1?arguments[1]:void 0;switch(s){case C:e=d;break;case P:e=t.status!==L?{...t,status:L}:t;break;case T:e=t.status!==q?{...t,status:q}:t;break;case F:e=r!==t.quantity?{...t,quantity:r}:t;break;case V:e={...t,requestParams:{...t.requestParams,...c}};break;case w:e={...t,processingResponse:c};break;case A:e=t.status!==x?{...t,status:x,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case k:e=t.status!==G?{...t,status:G,hasError:!1}:t;break;case N:e=t.status!==M?{...t,status:M}:t;break;case I:e=t.hasError?t:{...t,hasError:!0},e=t.status===x||t.status===G?{...e,status:L}:e;break;case D:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&s!==C&&e.status===B&&(e.status=L),e};var W=r(89),H=r(169);const U=e=>({onAddToCartAfterProcessingWithSuccess:Object(H.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(H.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(H.a)("add_to_cart_before_processing",e)});var K=r(170),Y=r(160),z=r(32),J=r(29);const X=Object(c.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),Z=()=>Object(c.useContext)(X),$=e=>{let{children:t,product:r,showFormElements:s}=e;const[n,a]=Object(c.useReducer)(Q,d),[b,p]=Object(c.useReducer)(W.b,{}),_=Object(i.a)(b),{addErrorNotice:g,removeNotices:C}=Object(z.a)(),{setValidationErrors:P}=Object(Y.b)(),{isSuccessResponse:T,isErrorResponse:A,isFailResponse:k}=Object(J.c)(),N=Object(c.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:U(p).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:U(p).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:U(p).onAddToCartBeforeProcessing}),[p]),w=Object(c.useMemo)(()=>({resetForm:()=>{a({type:E})},submitForm:()=>{a({type:h})},setQuantity:e=>{a((e=>({type:S,quantity:e}))(e))},setHasError:e=>{a(R(e))},setRequestParams:e=>{a((e=>({type:v,data:e}))(e))},setAfterProcessing:e=>{a({type:j,data:e}),a({type:f})}}),[]);Object(c.useEffect)(()=>{const e=n.status,t=!r.id||!u(r);e!==l.DISABLED||t?e!==l.DISABLED&&t&&a({type:m}):a(y())},[n.status,r,a]),Object(c.useEffect)(()=>{n.status===l.BEFORE_PROCESSING&&(C("error"),Object(K.a)(_,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;t&&g(t),r&&P(r)}),a(y())):a({type:O})}))},[n.status,P,g,C,a,_]),Object(c.useEffect)(()=>{if(n.status===l.AFTER_PROCESSING){const e={processingResponse:n.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:r,messageContext:s}=e;(A(e)||k(e))&&r&&(t=!0,g(r,s?{context:s}:void 0))}),t};if(n.hasError)return void Object(K.b)(_,"add_to_cart_after_processing_with_error",e).then(r=>{if(!t(r)){var s;const t=(null===(s=e.processingResponse)||void 0===s?void 0:s.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");g(t,{id:"add-to-cart"})}a(y())});Object(K.b)(_,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?a(R(!0)):a(y())})}},[n.status,n.hasError,n.processingResponse,w,g,A,k,T,_]);const I=(e=>["simple","variable"].includes(e.type||"simple"))(r),D={product:r,productType:r.type||"simple",productIsPurchasable:u(r),productHasOptions:r.has_options||!1,supportsFormElements:I,showFormElements:s&&I,quantity:n.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:n.requestParams,isIdle:n.status===l.IDLE,isDisabled:n.status===l.DISABLED,isProcessing:n.status===l.PROCESSING,isBeforeProcessing:n.status===l.BEFORE_PROCESSING,isAfterProcessing:n.status===l.AFTER_PROCESSING,hasError:n.hasError,eventRegistration:N,dispatchActions:w};return Object(c.createElement)(X.Provider,{value:D},t)};var ee=r(27),te=r.n(ee),re=r(19),se=r(22),ce=()=>{const{dispatchActions:e,product:t,quantity:r,eventRegistration:s,hasError:n,isProcessing:a,requestParams:i}=Z(),{hasValidationErrors:u,showAllValidationErrors:l}=Object(Y.b)(),{addErrorNotice:d,removeNotice:b}=Object(z.a)(),{receiveCart:E}=Object(se.a)(),[p,m]=Object(c.useState)(!1),O=!n&&a,h=Object(c.useCallback)(()=>!u||(l(),{type:"error"}),[u,l]);Object(c.useEffect)(()=>{const e=s.onAddToCartBeforeProcessing(h,0);return()=>{e()}},[s,h]);const f=Object(c.useCallback)(()=>{m(!0),b("add-to-cart");const s={id:t.id||0,quantity:r,...i};te()({path:"/wc/store/cart/add-item",method:"POST",data:s,cache:"no-store",parse:!1}).then(t=>{te.a.setNonce(t.headers),t.json().then((function(r){t.ok?E(r):(r.body&&r.body.message?d(Object(re.decodeEntities)(r.body.message),{id:"add-to-cart"}):d(Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),e.setHasError()),e.setAfterProcessing(r),m(!1)}))}).catch(t=>{t.json().then((function(t){var r;null!==(r=t.data)&&void 0!==r&&r.cart&&E(t.data.cart),e.setHasError(),e.setAfterProcessing(t),m(!1)}))})},[t,d,b,E,e,r,i]);return Object(c.useEffect)(()=>{O&&!p&&f()},[O,f,p]),null};const ne=e=>{let{children:t,product:r,showFormElements:s}=e;return Object(c.createElement)(Y.a,null,Object(c.createElement)($,{product:r,showFormElements:s},t,Object(c.createElement)(ce,null)))};var ae=r(49),oe=r(5),ie=(r(322),r(227)),ue=r(98),le=r(323),de=r(38),be=r(316);const Ee=e=>{let{className:t,href:r,text:s,onClick:n}=e;return Object(c.createElement)(ie.a,{className:t,href:r,onClick:n,rel:"nofollow"},s)},pe=e=>{let{className:t,quantityInCart:r,isProcessing:s,isDisabled:n,isDone:a,onClick:i}=e;return Object(c.createElement)(ie.a,{className:t,disabled:n,showSpinner:s,onClick:i},a&&r>0?Object(o.sprintf)( +/* translators: %s number of products in cart. */ +Object(o._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(o.__)("Add to cart","woo-gutenberg-products-block"),!!a&&Object(c.createElement)(ue.a,{srcElement:le.a,alt:Object(o.__)("Done","woo-gutenberg-products-block")}))};var me=()=>{const{showFormElements:e,productIsPurchasable:t,productHasOptions:r,product:s,productType:n,isDisabled:a,isProcessing:i,eventRegistration:u,hasError:l,dispatchActions:d}=Z(),{parentName:b}=Object(ae.useInnerBlockLayoutContext)(),{dispatchStoreEvent:E}=Object(de.a)(),{cartQuantity:p}=Object(be.a)(s.id||0),[m,O]=Object(c.useState)(!1),h=s.add_to_cart||{url:"",text:""};return Object(c.useEffect)(()=>{const e=u.onAddToCartAfterProcessingWithSuccess(()=>(l||O(!0),!0),0);return()=>{e()}},[u,l]),(e||!r&&"simple"===n)&&t?Object(c.createElement)(pe,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:a,isProcessing:i,isDone:m,onClick:()=>{d.submitForm(),E("cart-add-item",{product:s,listName:b})}}):Object(c.createElement)(Ee,{className:"wc-block-components-product-add-to-cart-button",href:h.url,text:h.text||Object(o.__)("View Product","woo-gutenberg-products-block"),onClick:()=>{E("product-view-link",{product:s,listName:b})}})},Oe=e=>{let{disabled:t,min:r,max:s,value:n,onChange:a}=e;return Object(c.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:n,min:r,max:s,hidden:1===s,disabled:t,onChange:e=>{a(e.target.value)}})},he=e=>{let{reason:t=Object(o.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block")}=e;return Object(c.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},t)},fe=()=>{const{product:e,quantity:t,minQuantity:r,maxQuantity:s,dispatchActions:n,isDisabled:a}=Z();return e.id&&!e.is_purchasable?Object(c.createElement)(he,null):e.id&&!e.is_in_stock?Object(c.createElement)(he,{reason:Object(o.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Oe,{value:t,min:r,max:s,disabled:a,onChange:n.setQuantity}),Object(c.createElement)(me,null))},je=(r(324),r(383)),_e=r(3),ge=r(235);const Se={value:"",label:Object(o.__)("Select an option","woo-gutenberg-products-block")};var ve=e=>{let{attributeName:t,options:r=[],value:s="",onChange:n=(()=>{}),errorMessage:i=Object(o.__)("Please select a value.","woo-gutenberg-products-block")}=e;const{getValidationError:u,setValidationErrors:l,clearValidationError:d}=Object(Y.b)(),b=t,E=u(b)||{};return Object(_e.useEffect)(()=>{s?d(b):l({[b]:{message:i,hidden:!0}})},[s,b,i,d,l]),Object(_e.useEffect)(()=>()=>{d(b)},[b,d]),Object(c.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(c.createElement)(je.a,{label:Object(re.decodeEntities)(t),value:s||"",options:[Se,...r],onChange:n,required:!0,className:a()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":E.message&&!E.hidden})}),Object(c.createElement)(ge.a,{propertyName:b,elementId:b}))},ye=r(35);const Re=(e,t,r)=>{const s=Object.values(t).map(e=>{let{id:t}=e;return t});if(Object.values(r).every(e=>""===e))return s;const c=Object.keys(e);return s.filter(e=>c.every(s=>{const c=r[s]||"",n=t["id:"+e].attributes[s];return""===c||null===n||n===c}))};var Ce=e=>{let{attributes:t,variationAttributes:r,setRequestParams:s}=e;const n=Object(i.a)(t),a=Object(i.a)(r),[o,u]=Object(c.useState)(0),[l,d]=Object(c.useState)({}),[b,E]=Object(c.useState)(!1),p=Object(c.useMemo)(()=>((e,t,r)=>{const s={},c=Object.keys(e),n=Object.values(r).filter(Boolean).length>0;return c.forEach(c=>{const a=e[c],o={...r,[c]:null},i=n?Re(e,t,o):null,u=null!==i?i.map(e=>t["id:"+e].attributes[c]):null;s[c]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map(e=>{let{name:r,slug:s}=e;return null===t||t.includes(null)||t.includes(s)?{value:s,label:Object(re.decodeEntities)(r)}:null}).filter(Boolean)}(a.terms,u)}),s})(n,a,l),[l,n,a]);return Object(c.useEffect)(()=>{if(!b){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ye.c)(e))return{};const t=Object.keys(e),r={};return 0===t.length||t.forEach(t=>{const s=e[t],c=s.terms.filter(e=>e.default);var n;c.length>0&&(r[s.name]=null===(n=c[0])||void 0===n?void 0:n.slug)}),r}(t);e&&d({...e}),E(!0)}},[l,t,b]),Object(c.useEffect)(()=>{Object.values(l).filter(e=>""!==e).length===Object.keys(n).length?u(((e,t,r)=>Re(e,t,r)[0]||0)(n,a,l)):o>0&&u(0)},[l,o,n,a]),Object(c.useEffect)(()=>{s({id:o,variation:Object.keys(l).map(e=>({attribute:e,value:l[e]}))})},[s,o,l]),Object(c.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(n).map(e=>Object(c.createElement)(ve,{key:e,attributeName:e,options:p[e],value:l[e],onChange:t=>{d({...l,[e]:t})}})))},Pe=e=>{let{product:t,dispatchers:r}=e;const s=(e=>e?Object(oe.keyBy)(Object.values(e).filter(e=>{let{has_variations:t}=e;return t}),"name"):{})(t.attributes),n=(e=>{if(!e)return{};const t={};return e.forEach(e=>{let{id:r,attributes:s}=e;t["id:"+r]={id:r,attributes:s.reduce((e,t)=>{let{name:r,value:s}=t;return e[r]=s,e},{})}}),t})(t.variations);return 0===Object.keys(s).length||0===n.length?null:Object(c.createElement)(Ce,{attributes:s,variationAttributes:n,setRequestParams:r.setRequestParams})},Te=()=>{const{product:e,quantity:t,minQuantity:r,maxQuantity:s,dispatchActions:n,isDisabled:a}=Z();return e.id&&!e.is_purchasable?Object(c.createElement)(he,null):e.id&&!e.is_in_stock?Object(c.createElement)(he,{reason:Object(o.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(Pe,{product:e,dispatchers:n}),Object(c.createElement)(Oe,{value:t,min:r,max:s,disabled:a,onChange:n.setQuantity}),Object(c.createElement)(me,null))},Ae=()=>Object(c.createElement)(me,null),ke=r(294),Ne=()=>Object(c.createElement)(ke.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element."),we=()=>Object(c.createElement)(Ne,null);const Ie=()=>{const{showFormElements:e,productType:t}=Z();return e?"variable"===t?Object(c.createElement)(Te,null):"grouped"===t?Object(c.createElement)(we,null):"external"===t?Object(c.createElement)(Ae,null):"simple"===t||"variation"===t?Object(c.createElement)(fe,null):null:Object(c.createElement)(me,null)};var De=Object(s.withProductDataContext)(e=>{let{className:t,showFormElements:r}=e;const{product:s}=Object(ae.useProductDataContext)(),n=a()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(oe.isEmpty)(s)});return Object(c.createElement)(ne,{product:s,showFormElements:r},Object(c.createElement)("div",{className:n},Object(c.createElement)(Ie,null)))});t.default=Object(s.withFilteredAttributes)({showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}})(De)},89:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return o}));var s=r(5);let c;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(c||(c={}));const n={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(s.uniqueId)(),type:c.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:c.REMOVE_EVENT_CALLBACK,eventType:e})},a={},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:r,id:s,callback:n,priority:o}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case c.ADD_EVENT_CALLBACK:return i.set(s,{priority:o,callback:n}),{...e,[r]:i};case c.REMOVE_EVENT_CALLBACK:return i.delete(s),{...e,[r]:i}}}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/add-to-cart.js b/build/atomic-block-components/add-to-cart.js new file mode 100644 index 00000000000..56fd966e7df --- /dev/null +++ b/build/atomic-block-components/add-to-cart.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[7],{107:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o}));var s=r(6);let n;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(n||(n={}));const a={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(s.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e})},c={},o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,eventType:r,id:s,callback:a,priority:o}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case n.ADD_EVENT_CALLBACK:return i.set(s,{priority:o,callback:a}),{...e,[r]:i};case n.REMOVE_EVENT_CALLBACK:return i.delete(s),{...e,[r]:i}}}},112:function(e,t,r){"use strict";r.d(t,"b",(function(){return i})),r.d(t,"a",(function(){return l}));var s=r(0),n=r(6),a=r(26),c=r.n(a);const o=Object(s.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(s.useContext)(o),l=e=>{let{children:t}=e;const[r,a]=Object(s.useState)({}),i=Object(s.useCallback)(e=>r[e],[r]),l=Object(s.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(s.useCallback)(e=>{a(t=>{if(!t[e])return t;const{[e]:r,...s}=t;return s})},[]),d=Object(s.useCallback)(()=>{a({})},[]),b=Object(s.useCallback)(e=>{e&&a(t=>(e=Object(n.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&c()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),E=Object(s.useCallback)((e,t)=>{a(r=>{if(!r.hasOwnProperty(e))return r;const s={...r[e],...t};return c()(r[e],s)?r:{...r,[e]:s}})},[]),p={getValidationError:i,setValidationErrors:b,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(s.useCallback)(e=>{E(e,{hidden:!0})},[E]),showValidationError:Object(s.useCallback)(e=>{E(e,{hidden:!1})},[E]),showAllValidationErrors:Object(s.useCallback)(()=>{a(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(s.createElement)(o.Provider,{value:p},t)}},158:function(e,t){},159:function(e,t){},160:function(e,t){},193:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var s=r(0),n=(r(10),r(112));r(160);const a=e=>{let{errorMessage:t="",propertyName:r="",elementId:a=""}=e;const{getValidationError:c,getValidationErrorId:o}=Object(n.b)();if(!t||"string"!=typeof t){const e=c(r)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(s.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(s.createElement)("p",{id:o(a)},t))}},244:function(e,t){},251:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var s=r(107);const n=(e,t)=>function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const a=s.a.addEventCallback(e,r,n);return t(a),()=>{t(s.a.removeEventCallback(e,a.id))}}},252:function(e,t,r){"use strict";t.a={showFormElements:{type:"boolean",default:!1},productId:{type:"number",default:0}}},253:function(e,t,r){"use strict";var s=r(0),n=(r(10),r(4)),a=r.n(n),c=r(1),o=r(40),i=r(471);const l={PRISTINE:"pristine",IDLE:"idle",DISABLED:"disabled",PROCESSING:"processing",BEFORE_PROCESSING:"before_processing",AFTER_PROCESSING:"after_processing"},u={status:l.PRISTINE,hasError:!1,quantity:1,processingResponse:null,requestParams:{}},d={SET_PRISTINE:"set_pristine",SET_IDLE:"set_idle",SET_DISABLED:"set_disabled",SET_PROCESSING:"set_processing",SET_BEFORE_PROCESSING:"set_before_processing",SET_AFTER_PROCESSING:"set_after_processing",SET_PROCESSING_RESPONSE:"set_processing_response",SET_HAS_ERROR:"set_has_error",SET_NO_ERROR:"set_no_error",SET_QUANTITY:"set_quantity",SET_REQUEST_PARAMS:"set_request_params"},{SET_PRISTINE:b,SET_IDLE:E,SET_DISABLED:p,SET_PROCESSING:m,SET_BEFORE_PROCESSING:O,SET_AFTER_PROCESSING:_,SET_PROCESSING_RESPONSE:h,SET_HAS_ERROR:j,SET_NO_ERROR:f,SET_QUANTITY:S,SET_REQUEST_PARAMS:g}=d,y=()=>({type:E}),v=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=e?j:f;return{type:t}},{SET_PRISTINE:R,SET_IDLE:P,SET_DISABLED:C,SET_PROCESSING:A,SET_BEFORE_PROCESSING:k,SET_AFTER_PROCESSING:T,SET_PROCESSING_RESPONSE:w,SET_HAS_ERROR:N,SET_NO_ERROR:I,SET_QUANTITY:D,SET_REQUEST_PARAMS:F}=d,{PRISTINE:V,IDLE:B,DISABLED:q,PROCESSING:L,BEFORE_PROCESSING:x,AFTER_PROCESSING:G}=l,Q=function(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u,{quantity:r,type:s,data:n}=arguments.length>1?arguments[1]:void 0;switch(s){case R:e=u;break;case P:e=t.status!==B?{...t,status:B}:t;break;case C:e=t.status!==q?{...t,status:q}:t;break;case D:e=r!==t.quantity?{...t,quantity:r}:t;break;case F:e={...t,requestParams:{...t.requestParams,...n}};break;case w:e={...t,processingResponse:n};break;case A:e=t.status!==L?{...t,status:L,hasError:!1}:t,e=!1===e.hasError?e:{...e,hasError:!1};break;case k:e=t.status!==x?{...t,status:x,hasError:!1}:t;break;case T:e=t.status!==G?{...t,status:G}:t;break;case N:e=t.hasError?t:{...t,hasError:!0},e=t.status===L||t.status===x?{...e,status:B}:e;break;case I:e=t.hasError?{...t,hasError:!1}:t}return e!==t&&s!==R&&e.status===V&&(e.status=B),e};var M=r(107),H=r(251);const W=e=>({onAddToCartAfterProcessingWithSuccess:Object(H.a)("add_to_cart_after_processing_with_success",e),onAddToCartProcessingWithError:Object(H.a)("add_to_cart_after_processing_with_error",e),onAddToCartBeforeProcessing:Object(H.a)("add_to_cart_before_processing",e)});var U=r(254),K=r(112),Y=r(47),z=r(44);const J=Object(s.createContext)({product:{},productType:"simple",productIsPurchasable:!0,productHasOptions:!1,supportsFormElements:!0,showFormElements:!1,quantity:0,minQuantity:1,maxQuantity:99,requestParams:{},isIdle:!1,isDisabled:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,eventRegistration:{onAddToCartAfterProcessingWithSuccess:e=>{},onAddToCartAfterProcessingWithError:e=>{},onAddToCartBeforeProcessing:e=>{}},dispatchActions:{resetForm:()=>{},submitForm:()=>{},setQuantity:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},setRequestParams:e=>{}}}),X=()=>Object(s.useContext)(J),Z=e=>{let{children:t,product:r,showFormElements:n}=e;const[a,d]=Object(s.useReducer)(Q,u),[E,j]=Object(s.useReducer)(M.b,{}),f=Object(o.a)(E),{addErrorNotice:R,removeNotices:P}=Object(Y.a)(),{setValidationErrors:C}=Object(K.b)(),{isSuccessResponse:A,isErrorResponse:k,isFailResponse:T}=Object(z.c)(),w=Object(s.useMemo)(()=>({onAddToCartAfterProcessingWithSuccess:W(j).onAddToCartAfterProcessingWithSuccess,onAddToCartAfterProcessingWithError:W(j).onAddToCartAfterProcessingWithError,onAddToCartBeforeProcessing:W(j).onAddToCartBeforeProcessing}),[j]),N=Object(s.useMemo)(()=>({resetForm:()=>{d({type:b})},submitForm:()=>{d({type:O})},setQuantity:e=>{d((e=>({type:S,quantity:e}))(e))},setHasError:e=>{d(v(e))},setRequestParams:e=>{d((e=>({type:g,data:e}))(e))},setAfterProcessing:e=>{d({type:h,data:e}),d({type:_})}}),[]);Object(s.useEffect)(()=>{const e=a.status,t=!r.id||!Object(i.a)(r);e!==l.DISABLED||t?e!==l.DISABLED&&t&&d({type:p}):d(y())},[a.status,r,d]),Object(s.useEffect)(()=>{a.status===l.BEFORE_PROCESSING&&(P("error"),Object(U.a)(f,"add_to_cart_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;t&&R(t),r&&C(r)}),d(y())):d({type:m})}))},[a.status,C,R,P,d,f]),Object(s.useEffect)(()=>{if(a.status===l.AFTER_PROCESSING){const e={processingResponse:a.processingResponse},t=e=>{let t=!1;return e.forEach(e=>{const{message:r,messageContext:s}=e;(k(e)||T(e))&&r&&(t=!0,R(r,s?{context:s}:void 0))}),t};if(a.hasError)return void Object(U.b)(f,"add_to_cart_after_processing_with_error",e).then(r=>{if(!t(r)){var s;const t=(null===(s=e.processingResponse)||void 0===s?void 0:s.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");R(t,{id:"add-to-cart"})}d(y())});Object(U.b)(f,"add_to_cart_after_processing_with_success",e).then(e=>{t(e)?d(v(!0)):d(y())})}},[a.status,a.hasError,a.processingResponse,N,R,k,T,A,f]);const I=Object(i.b)(r),D={product:r,productType:r.type||"simple",productIsPurchasable:Object(i.a)(r),productHasOptions:r.has_options||!1,supportsFormElements:I,showFormElements:n&&I,quantity:a.quantity,minQuantity:1,maxQuantity:r.quantity_limit||99,requestParams:a.requestParams,isIdle:a.status===l.IDLE,isDisabled:a.status===l.DISABLED,isProcessing:a.status===l.PROCESSING,isBeforeProcessing:a.status===l.BEFORE_PROCESSING,isAfterProcessing:a.status===l.AFTER_PROCESSING,hasError:a.hasError,eventRegistration:w,dispatchActions:N};return Object(s.createElement)(J.Provider,{value:D},t)};var $=r(11),ee=r.n($),te=r(14),re=r(36),se=()=>{const{dispatchActions:e,product:t,quantity:r,eventRegistration:n,hasError:a,isProcessing:o,requestParams:i}=X(),{hasValidationErrors:l,showAllValidationErrors:u}=Object(K.b)(),{addErrorNotice:d,removeNotice:b}=Object(Y.a)(),{receiveCart:E}=Object(re.a)(),[p,m]=Object(s.useState)(!1),O=!a&&o,_=Object(s.useCallback)(()=>!l||(u(),{type:"error"}),[l,u]);Object(s.useEffect)(()=>{const e=n.onAddToCartBeforeProcessing(_,0);return()=>{e()}},[n,_]);const h=Object(s.useCallback)(()=>{m(!0),b("add-to-cart");const s={id:t.id||0,quantity:r,...i};ee()({path:"/wc/store/cart/add-item",method:"POST",data:s,cache:"no-store",parse:!1}).then(t=>{ee.a.setNonce(t.headers),t.json().then((function(r){t.ok?E(r):(r.body&&r.body.message?d(Object(te.decodeEntities)(r.body.message),{id:"add-to-cart"}):d(Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block"),{id:"add-to-cart"}),e.setHasError()),e.setAfterProcessing(r),m(!1)}))}).catch(t=>{t.json().then((function(t){var r;null!==(r=t.data)&&void 0!==r&&r.cart&&E(t.data.cart),e.setHasError(),e.setAfterProcessing(t),m(!1)}))})},[t,d,b,E,e,r,i]);return Object(s.useEffect)(()=>{O&&!p&&h()},[O,h,p]),null};const ne=e=>{let{children:t,product:r,showFormElements:n}=e;return Object(s.createElement)(K.a,null,Object(s.createElement)(Z,{product:r,showFormElements:n},t,Object(s.createElement)(se,null)))};var ae=r(29),ce=r(6),oe=r(54),ie=(r(244),r(76)),le=r(43),ue=r(308),de=r(60),be=r(355);const Ee=e=>{let{className:t,href:r,text:n,onClick:a}=e;return Object(s.createElement)(ie.a,{className:t,href:r,onClick:a,rel:"nofollow"},n)},pe=e=>{let{className:t,quantityInCart:r,isProcessing:n,isDisabled:a,isDone:o,onClick:i}=e;return Object(s.createElement)(ie.a,{className:t,disabled:a,showSpinner:n,onClick:i},o&&r>0?Object(c.sprintf)( +/* translators: %s number of products in cart. */ +Object(c._n)("%d in cart","%d in cart",r,"woo-gutenberg-products-block"),r):Object(c.__)("Add to cart","woo-gutenberg-products-block"),!!o&&Object(s.createElement)(le.a,{srcElement:ue.a,alt:Object(c.__)("Done","woo-gutenberg-products-block")}))};var me=()=>{const{showFormElements:e,productIsPurchasable:t,productHasOptions:r,product:n,productType:a,isDisabled:o,isProcessing:i,eventRegistration:l,hasError:u,dispatchActions:d}=X(),{parentName:b}=Object(ae.useInnerBlockLayoutContext)(),{dispatchStoreEvent:E}=Object(de.a)(),{cartQuantity:p}=Object(be.a)(n.id||0),[m,O]=Object(s.useState)(!1),_=n.add_to_cart||{url:"",text:""};return Object(s.useEffect)(()=>{const e=l.onAddToCartAfterProcessingWithSuccess(()=>(u||O(!0),!0),0);return()=>{e()}},[l,u]),(e||!r&&"simple"===a)&&t?Object(s.createElement)(pe,{className:"wc-block-components-product-add-to-cart-button",quantityInCart:p,isDisabled:o,isProcessing:i,isDone:m,onClick:()=>{d.submitForm(),E("cart-add-item",{product:n,listName:b})}}):Object(s.createElement)(Ee,{className:"wc-block-components-product-add-to-cart-button",href:_.url,text:_.text||Object(c.__)("View Product","woo-gutenberg-products-block"),onClick:()=>{E("product-view-link",{product:n,listName:b})}})},Oe=e=>{let{disabled:t,min:r,max:n,value:a,onChange:c}=e;return Object(s.createElement)("input",{className:"wc-block-components-product-add-to-cart-quantity",type:"number",value:a,min:r,max:n,hidden:1===n,disabled:t,onChange:e=>{c(e.target.value)}})},_e=e=>{let{reason:t=Object(c.__)("Sorry, this product cannot be purchased.","woo-gutenberg-products-block")}=e;return Object(s.createElement)("div",{className:"wc-block-components-product-add-to-cart-unavailable"},t)},he=()=>{const{product:e,quantity:t,minQuantity:r,maxQuantity:n,dispatchActions:a,isDisabled:o}=X();return e.id&&!e.is_purchasable?Object(s.createElement)(_e,null):e.id&&!e.is_in_stock?Object(s.createElement)(_e,{reason:Object(c.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(s.createElement)(s.Fragment,null,Object(s.createElement)(Oe,{value:t,min:r,max:n,disabled:o,onChange:a.setQuantity}),Object(s.createElement)(me,null))},je=(r(307),r(492)),fe=r(8),Se=r(193);const ge={value:"",label:Object(c.__)("Select an option","woo-gutenberg-products-block")};var ye=e=>{let{attributeName:t,options:r=[],value:n="",onChange:o=(()=>{}),errorMessage:i=Object(c.__)("Please select a value.","woo-gutenberg-products-block")}=e;const{getValidationError:l,setValidationErrors:u,clearValidationError:d}=Object(K.b)(),b=t,E=l(b)||{};return Object(fe.useEffect)(()=>{n?d(b):u({[b]:{message:i,hidden:!0}})},[n,b,i,d,u]),Object(fe.useEffect)(()=>()=>{d(b)},[b,d]),Object(s.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker__container"},Object(s.createElement)(je.a,{label:Object(te.decodeEntities)(t),value:n||"",options:[ge,...r],onChange:o,required:!0,className:a()("wc-block-components-product-add-to-cart-attribute-picker__select",{"has-error":E.message&&!E.hidden})}),Object(s.createElement)(Se.a,{propertyName:b,elementId:b}))},ve=r(85);const Re=(e,t,r)=>{const s=Object.values(t).map(e=>{let{id:t}=e;return t});if(Object.values(r).every(e=>""===e))return s;const n=Object.keys(e);return s.filter(e=>n.every(s=>{const n=r[s]||"",a=t["id:"+e].attributes[s];return""===n||null===a||a===n}))};var Pe=e=>{let{attributes:t,variationAttributes:r,setRequestParams:n}=e;const a=Object(o.a)(t),c=Object(o.a)(r),[i,l]=Object(s.useState)(0),[u,d]=Object(s.useState)({}),[b,E]=Object(s.useState)(!1),p=Object(s.useMemo)(()=>((e,t,r)=>{const s={},n=Object.keys(e),a=Object.values(r).filter(Boolean).length>0;return n.forEach(n=>{const c=e[n],o={...r,[n]:null},i=a?Re(e,t,o):null,l=null!==i?i.map(e=>t["id:"+e].attributes[n]):null;s[n]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).map(e=>{let{name:r,slug:s}=e;return null===t||t.includes(null)||t.includes(s)?{value:s,label:Object(te.decodeEntities)(r)}:null}).filter(Boolean)}(c.terms,l)}),s})(a,c,u),[u,a,c]);return Object(s.useEffect)(()=>{if(!b){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Object(ve.b)(e))return{};const t=Object.keys(e),r={};return 0===t.length||t.forEach(t=>{const s=e[t],n=s.terms.filter(e=>e.default);var a;n.length>0&&(r[s.name]=null===(a=n[0])||void 0===a?void 0:a.slug)}),r}(t);e&&d({...e}),E(!0)}},[u,t,b]),Object(s.useEffect)(()=>{Object.values(u).filter(e=>""!==e).length===Object.keys(a).length?l(((e,t,r)=>Re(e,t,r)[0]||0)(a,c,u)):i>0&&l(0)},[u,i,a,c]),Object(s.useEffect)(()=>{n({id:i,variation:Object.keys(u).map(e=>({attribute:e,value:u[e]}))})},[n,i,u]),Object(s.createElement)("div",{className:"wc-block-components-product-add-to-cart-attribute-picker"},Object.keys(a).map(e=>Object(s.createElement)(ye,{key:e,attributeName:e,options:p[e],value:u[e],onChange:t=>{d({...u,[e]:t})}})))},Ce=e=>{let{product:t,dispatchers:r}=e;const n=(e=>e?Object(ce.keyBy)(Object.values(e).filter(e=>{let{has_variations:t}=e;return t}),"name"):{})(t.attributes),a=(e=>{if(!e)return{};const t={};return e.forEach(e=>{let{id:r,attributes:s}=e;t["id:"+r]={id:r,attributes:s.reduce((e,t)=>{let{name:r,value:s}=t;return e[r]=s,e},{})}}),t})(t.variations);return 0===Object.keys(n).length||0===a.length?null:Object(s.createElement)(Pe,{attributes:n,variationAttributes:a,setRequestParams:r.setRequestParams})},Ae=()=>{const{product:e,quantity:t,minQuantity:r,maxQuantity:n,dispatchActions:a,isDisabled:o}=X();return e.id&&!e.is_purchasable?Object(s.createElement)(_e,null):e.id&&!e.is_in_stock?Object(s.createElement)(_e,{reason:Object(c.__)("This product is currently out of stock and cannot be purchased.","woo-gutenberg-products-block")}):Object(s.createElement)(s.Fragment,null,Object(s.createElement)(Ce,{product:e,dispatchers:a}),Object(s.createElement)(Oe,{value:t,min:r,max:n,disabled:o,onChange:a.setQuantity}),Object(s.createElement)(me,null))},ke=()=>Object(s.createElement)(me,null),Te=r(483),we=()=>Object(s.createElement)(Te.a,{className:"wc-block-components-product-add-to-cart-group-list"},"This is a placeholder for the grouped products form element."),Ne=()=>Object(s.createElement)(we,null);const Ie=()=>{const{showFormElements:e,productType:t}=X();return e?"variable"===t?Object(s.createElement)(Ae,null):"grouped"===t?Object(s.createElement)(Ne,null):"external"===t?Object(s.createElement)(ke,null):"simple"===t||"variation"===t?Object(s.createElement)(he,null):null:Object(s.createElement)(me,null)};t.a=Object(oe.withProductDataContext)(e=>{let{className:t,showFormElements:r}=e;const{product:n}=Object(ae.useProductDataContext)(),c=a()(t,"wc-block-components-product-add-to-cart",{"wc-block-components-product-add-to-cart--placeholder":Object(ce.isEmpty)(n)});return Object(s.createElement)(ne,{product:n,showFormElements:r},Object(s.createElement)("div",{className:c},Object(s.createElement)(Ie,null)))})},254:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return c}));const s=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var n=r(44);const a=async(e,t,r)=>{const n=s(e,t),a=[];for(const e of n)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&a.push(t)}catch(e){console.error(e)}return!a.length||a},c=async(e,t,r)=>{const a=[],c=s(e,t);for(const e of c)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(n.a)(t)||Object(n.b)(t))return a.push(t),a;a.push(t)}catch(e){return console.error(e),a.push({type:"error"}),a}return a}},307:function(e,t){},308:function(e,t,r){"use strict";var s=r(0),n=r(18);const a=Object(s.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(s.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(s.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},40:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var s=r(0),n=r(26),a=r.n(n);function c(e){const t=Object(s.useRef)(e);return a()(e,t.current)||(t.current=e),t.current}},44:function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var s=r(85);let n,a;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(n||(n={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(a||(a={}));const c=(e,t)=>Object(s.b)(e)&&"type"in e&&e.type===t,o=e=>c(e,n.SUCCESS),i=e=>c(e,n.ERROR),l=e=>c(e,n.FAIL),u=e=>!Object(s.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:n,noticeContexts:a,shouldRetry:u,isSuccessResponse:o,isErrorResponse:i,isFailResponse:l})},471:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return n}));const s=e=>e.is_purchasable||!1,n=e=>["simple","variable"].includes(e.type||"simple")},497:function(e,t,r){"use strict";r.r(t);var s=r(54),n=r(253),a=r(252);t.default=Object(s.withFilteredAttributes)(a.a)(n.a)},76:function(e,t,r){"use strict";var s=r(5),n=r.n(s),a=r(0),c=r(137),o=r(4),i=r.n(o),l=r(99);r(158),t.a=e=>{let{className:t,showSpinner:r=!1,children:s,...o}=e;const u=i()("wc-block-components-button",t,{"wc-block-components-button--loading":r});return Object(a.createElement)(c.a,n()({className:u},o),r&&Object(a.createElement)(l.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},s))}},99:function(e,t,r){"use strict";var s=r(0);r(159),t.a=()=>Object(s.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/button-frontend.js b/build/atomic-block-components/button-frontend.js new file mode 100644 index 00000000000..a240ade5fab --- /dev/null +++ b/build/atomic-block-components/button-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{315:function(t,e){},316:function(t,e,c){"use strict";c.d(e,"a",(function(){return u}));var o=c(0),n=c(9),r=c(6),a=c(19),d=c(22),i=c(32);const s=(t,e)=>{const c=t.find(t=>{let{id:c}=t;return c===e});return c?c.quantity:0},u=t=>{const{addItemToCart:e}=Object(n.useDispatch)(r.CART_STORE_KEY),{cartItems:c,cartIsLoading:u}=Object(d.a)(),{addErrorNotice:l,removeNotice:b}=Object(i.a)(),[p,f]=Object(o.useState)(!1),m=Object(o.useRef)(s(c,t));return Object(o.useEffect)(()=>{const e=s(c,t);e!==m.current&&(m.current=e)},[c,t]),{cartQuantity:Number.isFinite(m.current)?m.current:0,addingToCart:p,cartIsLoading:u,addToCart:function(){let c=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return f(!0),e(t,c).then(()=>{b("add-to-cart")}).catch(t=>{l(Object(a.decodeEntities)(t.message),{context:"wc/all-products",id:"add-to-cart",isDismissible:!0})}).finally(()=>{f(!1)})}}}},32:function(t,e,c){"use strict";c.d(e,"a",(function(){return r}));var o=c(0),n=c(87);const r=()=>{const{notices:t,createNotice:e,removeNotice:c,setIsSuppressed:r}=Object(n.b)(),a=Object(o.useRef)(t);Object(o.useEffect)(()=>{a.current=t},[t]);const d=Object(o.useMemo)(()=>({hasNoticesOfType:t=>a.current.some(e=>e.type===t),removeNotices:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(e=>{null!==t&&e.status!==t||c(e.id)})},removeNotice:c}),[c]),i=Object(o.useMemo)(()=>({addDefaultNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("default",t,{...c})},addErrorNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("error",t,{...c})},addWarningNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("warning",t,{...c})},addInfoNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("info",t,{...c})},addSuccessNotice:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e("success",t,{...c})}}),[e]);return{notices:t,...d,...i,setIsSuppressed:r}}},364:function(t,e,c){"use strict";c.r(e);var o=c(10),n=c.n(o),r=c(0),a=(c(8),c(4)),d=c.n(a),i=c(1),s=c(38),u=c(316),l=c(19),b=c(49),p=c(110);c(315);const f=t=>{let{product:e}=t;const{id:c,permalink:o,add_to_cart:a,has_options:b,is_purchasable:p,is_in_stock:f}=e,{dispatchStoreEvent:m}=Object(s.a)(),{cartQuantity:O,addingToCart:_,addToCart:j}=Object(u.a)(c),k=Number.isFinite(O)&&O>0,w=!b&&p&&f,g=Object(l.decodeEntities)((null==a?void 0:a.description)||""),h=k?Object(i.sprintf)( +/* translators: %s number of products in cart. */ +Object(i._n)("%d in cart","%d in cart",O,"woo-gutenberg-products-block"),O):Object(l.decodeEntities)((null==a?void 0:a.text)||Object(i.__)("Add to cart","woo-gutenberg-products-block")),v=w?"button":"a",N={};return w?N.onClick=()=>{j(),m("cart-add-item",{product:e})}:(N.href=o,N.rel="nofollow",N.onClick=()=>{m("product-view-link",{product:e})}),Object(r.createElement)(v,n()({"aria-label":g,className:d()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:_,added:k}),disabled:_},N),h)},m=()=>Object(r.createElement)("button",{className:d()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0});e.default=Object(p.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(b.useInnerBlockLayoutContext)(),{product:o}=Object(b.useProductDataContext)();return Object(r.createElement)("div",{className:d()(e,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},o.id?Object(r.createElement)(f,{product:o}):Object(r.createElement)(m,null))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/button.js b/build/atomic-block-components/button.js new file mode 100644 index 00000000000..3f8d02b6676 --- /dev/null +++ b/build/atomic-block-components/button.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[8],{261:function(t,o,c){"use strict";c.r(o);var e=c(5),n=c.n(e),a=c(0),d=(c(10),c(4)),r=c.n(d),l=c(1),b=c(60),u=c(355),i=c(14),s=c(29),p=c(54);c(301);const _=t=>{let{product:o}=t;const{id:c,permalink:e,add_to_cart:d,has_options:s,is_purchasable:p,is_in_stock:_}=o,{dispatchStoreEvent:k}=Object(b.a)(),{cartQuantity:w,addingToCart:m,addToCart:j}=Object(u.a)(c),O=Number.isFinite(w)&&w>0,C=!s&&p&&_,E=Object(i.decodeEntities)((null==d?void 0:d.description)||""),h=O?Object(l.sprintf)( +/* translators: %s number of products in cart. */ +Object(l._n)("%d in cart","%d in cart",w,"woo-gutenberg-products-block"),w):Object(i.decodeEntities)((null==d?void 0:d.text)||Object(l.__)("Add to cart","woo-gutenberg-products-block")),f=C?"button":"a",g={};return C?g.onClick=()=>{j(),k("cart-add-item",{product:o})}:(g.href=e,g.rel="nofollow",g.onClick=()=>{k("product-view-link",{product:o})}),Object(a.createElement)(f,n()({"aria-label":E,className:r()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button",{loading:m,added:O}),disabled:m},g),h)},k=()=>Object(a.createElement)("button",{className:r()("wp-block-button__link","add_to_cart_button","wc-block-components-product-button__button","wc-block-components-product-button__button--placeholder"),disabled:!0});o.default=Object(p.withProductDataContext)(t=>{let{className:o}=t;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:e}=Object(s.useProductDataContext)();return Object(a.createElement)("div",{className:r()(o,"wp-block-button","wc-block-components-product-button",{[c+"__product-add-to-cart"]:c})},e.id?Object(a.createElement)(_,{product:e}):Object(a.createElement)(k,null))})},301:function(t,o){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/category-list-frontend.js b/build/atomic-block-components/category-list-frontend.js new file mode 100644 index 00000000000..39ae75324a7 --- /dev/null +++ b/build/atomic-block-components/category-list-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{319:function(e,t){},367:function(e,t,c){"use strict";c.r(t);var o=c(0),a=c(1),n=c(4),l=c.n(n),r=c(49),s=c(5),u=c(110);c(319),t.default=Object(u.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(r.useInnerBlockLayoutContext)(),{product:n}=Object(r.useProductDataContext)();return Object(s.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:l()(t,"wc-block-components-product-category-list",{[c+"__product-category-list"]:c})},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map(e=>{let{name:t,link:c,slug:a}=e;return Object(o.createElement)("li",{key:"category-list-item-"+a},Object(o.createElement)("a",{href:c},t))})))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/category-list.js b/build/atomic-block-components/category-list.js new file mode 100644 index 00000000000..f5618988bc4 --- /dev/null +++ b/build/atomic-block-components/category-list.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[9],{264:function(e,t,c){"use strict";c.r(t);var o=c(0),a=c(1),n=c(4),l=c.n(n),r=c(29),s=c(6),u=c(54);c(304),t.default=Object(u.withProductDataContext)(e=>{let{className:t}=e;const{parentClassName:c}=Object(r.useInnerBlockLayoutContext)(),{product:n}=Object(r.useProductDataContext)();return Object(s.isEmpty)(n.categories)?null:Object(o.createElement)("div",{className:l()(t,"wc-block-components-product-category-list",{[c+"__product-category-list"]:c})},Object(a.__)("Categories:","woo-gutenberg-products-block")," ",Object(o.createElement)("ul",null,Object.values(n.categories).map(e=>{let{name:t,link:c,slug:a}=e;return Object(o.createElement)("li",{key:"category-list-item-"+a},Object(o.createElement)("a",{href:c},t))})))})},304:function(e,t){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/image-frontend.js b/build/atomic-block-components/image-frontend.js new file mode 100644 index 00000000000..3a039f82579 --- /dev/null +++ b/build/atomic-block-components/image-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10,13],{21:function(e,t,a){"use strict";var c=a(0),n=a(4),l=a.n(n);t.a=e=>{let t,{label:a,screenReaderLabel:n,wrapperElement:r,wrapperProps:o={}}=e;const s=null!=a,i=null!=n;return!s&&i?(t=r||"span",o={...o,className:l()(o.className,"screen-reader-text")},Object(c.createElement)(t,o,n)):(t=r||c.Fragment,s&&i&&a!==n?Object(c.createElement)(t,o,Object(c.createElement)("span",{"aria-hidden":"true"},a),Object(c.createElement)("span",{className:"screen-reader-text"},n)):Object(c.createElement)(t,o,a))}},267:function(e,t){},285:function(e,t,a){"use strict";a.r(t);var c=a(0),n=(a(8),a(1)),l=a(4),r=a.n(l),o=a(21),s=a(49),i=a(110);a(267),t.default=Object(i.withProductDataContext)(e=>{let{className:t,align:a}=e;const{parentClassName:l}=Object(s.useInnerBlockLayoutContext)(),{product:i}=Object(s.useProductDataContext)();if(!i.id||!i.on_sale)return null;const u="string"==typeof a?"wc-block-components-product-sale-badge--align-"+a:"";return Object(c.createElement)("div",{className:r()("wc-block-components-product-sale-badge",t,u,{[l+"__product-onsale"]:l})},Object(c.createElement)(o.a,{label:Object(n.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Product on sale","woo-gutenberg-products-block")}))})},312:function(e,t){},395:function(e,t,a){"use strict";a.r(t);var c=a(110),n=a(10),l=a.n(n),r=a(0),o=(a(8),a(1)),s=a(4),i=a.n(s),u=a(2),d=a(49),b=a(38),m=a(285);a(312);const p=()=>Object(r.createElement)("img",{src:u.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),g=e=>{let{image:t,onLoad:a,loaded:c,showFullSize:n,fallbackAlt:o}=e;const{thumbnail:s,src:i,srcset:u,sizes:d,alt:b}=t||{},m={alt:b||o,onLoad:a,hidden:!c,src:s,...n&&{src:i,srcSet:u,sizes:d}};return Object(r.createElement)(r.Fragment,null,m.src&&Object(r.createElement)("img",l()({"data-testid":"product-image"},m)),!c&&Object(r.createElement)(p,null))};var O=Object(c.withProductDataContext)(e=>{let{className:t,imageSizing:a="full-size",showProductLink:c=!0,showSaleBadge:n,saleBadgeAlign:l="right"}=e;const{parentClassName:s}=Object(d.useInnerBlockLayoutContext)(),{product:u}=Object(d.useProductDataContext)(),[O,j]=Object(r.useState)(!1),{dispatchStoreEvent:w}=Object(b.a)();if(!u.id)return Object(r.createElement)("div",{className:i()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",{[s+"__product-image"]:s})},Object(r.createElement)(p,null));const f=!!u.images.length,h=f?u.images[0]:null,k=c?"a":r.Fragment,E=Object(o.sprintf)( +/* translators: %s is referring to the product name */ +Object(o.__)("Link to %s","woo-gutenberg-products-block"),u.name),_={href:u.permalink,rel:"nofollow",...!f&&{"aria-label":E},onClick:()=>{w("product-view-link",{product:u})}};return Object(r.createElement)("div",{className:i()(t,"wc-block-components-product-image",{[s+"__product-image"]:s})},Object(r.createElement)(k,c&&_,!!n&&Object(r.createElement)(m.default,{align:l,product:u}),Object(r.createElement)(g,{fallbackAlt:u.name,image:h,onLoad:()=>j(!0),loaded:O,showFullSize:"cropped"!==a})))});t.default=Object(c.withFilteredAttributes)({showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}})(O)}}]); \ No newline at end of file diff --git a/build/atomic-block-components/image.js b/build/atomic-block-components/image.js new file mode 100644 index 00000000000..f71d596ef7d --- /dev/null +++ b/build/atomic-block-components/image.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[10],{249:function(e,t,a){"use strict";t.a={showProductLink:{type:"boolean",default:!0},showSaleBadge:{type:"boolean",default:!0},saleBadgeAlign:{type:"string",default:"right"},imageSizing:{type:"string",default:"full-size"},productId:{type:"number",default:0}}},250:function(e,t,a){"use strict";var c=a(5),l=a.n(c),n=a(0),o=(a(10),a(1)),r=a(4),i=a.n(r),s=a(2),u=a(29),d=a(54),m=a(60),b=a(192);a(299);const g=()=>Object(n.createElement)("img",{src:s.PLACEHOLDER_IMG_SRC,alt:"",width:500,height:500}),p=e=>{let{image:t,onLoad:a,loaded:c,showFullSize:o,fallbackAlt:r}=e;const{thumbnail:i,src:s,srcset:u,sizes:d,alt:m}=t||{},b={alt:m||r,onLoad:a,hidden:!c,src:i,...o&&{src:s,srcSet:u,sizes:d}};return Object(n.createElement)(n.Fragment,null,b.src&&Object(n.createElement)("img",l()({"data-testid":"product-image"},b)),!c&&Object(n.createElement)(g,null))};t.a=Object(d.withProductDataContext)(e=>{let{className:t,imageSizing:a="full-size",showProductLink:c=!0,showSaleBadge:l,saleBadgeAlign:r="right"}=e;const{parentClassName:s}=Object(u.useInnerBlockLayoutContext)(),{product:d}=Object(u.useProductDataContext)(),[w,h]=Object(n.useState)(!1),{dispatchStoreEvent:f}=Object(m.a)();if(!d.id)return Object(n.createElement)("div",{className:i()(t,"wc-block-components-product-image","wc-block-components-product-image--placeholder",{[s+"__product-image"]:s})},Object(n.createElement)(g,null));const O=!!d.images.length,j=O?d.images[0]:null,k=c?"a":n.Fragment,E=Object(o.sprintf)( +/* translators: %s is referring to the product name */ +Object(o.__)("Link to %s","woo-gutenberg-products-block"),d.name),S={href:d.permalink,rel:"nofollow",...!O&&{"aria-label":E},onClick:()=>{f("product-view-link",{product:d})}};return Object(n.createElement)("div",{className:i()(t,"wc-block-components-product-image",{[s+"__product-image"]:s})},Object(n.createElement)(k,c&&S,!!l&&Object(n.createElement)(b.default,{align:r,product:d}),Object(n.createElement)(p,{fallbackAlt:d.name,image:j,onLoad:()=>h(!0),loaded:w,showFullSize:"cropped"!==a})))})},299:function(e,t){},495:function(e,t,a){"use strict";a.r(t);var c=a(54),l=a(250),n=a(249);t.default=Object(c.withFilteredAttributes)(n.a)(l.a)}}]); \ No newline at end of file diff --git a/build/atomic-block-components/price-frontend.js b/build/atomic-block-components/price-frontend.js new file mode 100644 index 00000000000..ddb89d7a91f --- /dev/null +++ b/build/atomic-block-components/price-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{159:function(e,c){},245:function(e,c,r){"use strict";var t=r(0),a=r(1),n=r(96),l=r(4),o=r.n(l),i=r(40);r(246);const s=e=>{let{currency:c,maxPrice:r,minPrice:l,priceClassName:s,priceStyle:u={}}=e;return Object(t.createElement)(t.Fragment,null,Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(l),Object(i.formatPrice)(r))),Object(t.createElement)("span",{"aria-hidden":!0},Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:c,value:l,style:u})," — ",Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:c,value:r,style:u})))},u=e=>{let{currency:c,regularPriceClassName:r,regularPriceStyle:l,regularPrice:i,priceClassName:s,priceStyle:u,price:m}=e;return Object(t.createElement)(t.Fragment,null,Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(t.createElement)(n.a,{currency:c,renderText:e=>Object(t.createElement)("del",{className:o()("wc-block-components-product-price__regular",r),style:l},e),value:i}),Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(t.createElement)(n.a,{currency:c,renderText:e=>Object(t.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",s),style:u},e),value:m}))};c.a=e=>{let{align:c,className:r,currency:a,format:l="",maxPrice:i,minPrice:m,price:p,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:j,regularPriceStyle:O}=e;const _=o()(r,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+c]:c});l.includes("")||(l="",console.error("Price formats need to include the `` tag."));const y=g&&p!==g;let N=Object(t.createElement)("span",{className:o()("wc-block-components-product-price__value",b)});return y?N=Object(t.createElement)(u,{currency:a,price:p,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:j,regularPriceStyle:O}):void 0!==m&&void 0!==i?N=Object(t.createElement)(s,{currency:a,maxPrice:i,minPrice:m,priceClassName:b,priceStyle:d}):p&&(N=Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",b),currency:a,value:p,style:d})),Object(t.createElement)("span",{className:_},Object(t.createInterpolateElement)(l,{price:N}))}},246:function(e,c){},311:function(e,c,r){"use strict";r.d(c,"a",(function(){return a})),r(166);var t=r(66);const a=()=>t.m>1},362:function(e,c,r){"use strict";r.r(c);var t=r(0),a=(r(8),r(4)),n=r.n(a),l=r(245),o=r(40),i=r(49),s=r(165),u=r(311),m=r(110);c.default=Object(m.withProductDataContext)(e=>{var c,r;let{className:a,align:m,fontSize:p,customFontSize:b,saleFontSize:d,customSaleFontSize:g,color:j,customColor:O,saleColor:_,customSaleColor:y}=e;const{parentClassName:N}=Object(i.useInnerBlockLayoutContext)(),{product:f}=Object(i.useProductDataContext)(),v=n()(a,{[N+"__product-price"]:N});if(!f.id)return Object(t.createElement)(l.a,{align:m,className:v});const P=Object(s.getColorClassName)("color",j),C=Object(s.getFontSizeClass)(p),S=Object(s.getColorClassName)("color",_),w=Object(s.getFontSizeClass)(d),x=n()({"has-text-color":j||O,"has-font-size":p||b,[P]:P,[C]:C}),E=n()({"has-text-color":_||y,"has-font-size":d||g,[S]:S,[w]:w}),k={color:O,fontSize:b},h={color:y,fontSize:g},z=f.prices,F=Object(o.getCurrencyFromPriceResponse)(z),D=z.price!==z.regular_price,T=D?n()({[N+"__product-price__value"]:N,[E]:Object(u.a)()}):n()({[N+"__product-price__value"]:N,[x]:Object(u.a)()}),B=D?h:k;return Object(t.createElement)(l.a,{align:m,className:v,currency:F,price:z.price,priceClassName:T,priceStyle:Object(u.a)()?B:{},minPrice:null==z||null===(c=z.price_range)||void 0===c?void 0:c.min_amount,maxPrice:null==z||null===(r=z.price_range)||void 0===r?void 0:r.max_amount,regularPrice:z.regular_price,regularPriceClassName:n()({[N+"__product-price__regular"]:N,[x]:Object(u.a)()}),regularPriceStyle:Object(u.a)()?k:{}})})},96:function(e,c,r){"use strict";var t=r(10),a=r.n(t),n=r(0),l=r(131),o=r(4),i=r.n(o);r(159);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});c.a=e=>{let{className:c,value:r,currency:t,onValueChange:o,displayType:u="text",...m}=e;const p="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(p))return null;const b=p/10**t.minorUnit;if(!Number.isFinite(b))return null;const d=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),g={...m,...s(t),value:void 0,currency:void 0,onValueChange:void 0},j=o?e=>{const c=+e.value*10**t.minorUnit;o(c)}:()=>{};return Object(n.createElement)(l.a,a()({className:d,displayType:u},g,{value:b,onValueChange:j}))}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/price.js b/build/atomic-block-components/price.js new file mode 100644 index 00000000000..9cbd46ddddf --- /dev/null +++ b/build/atomic-block-components/price.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[11],{105:function(e,c,r){"use strict";var t=r(0),a=r(1),n=r(41),l=r(4),o=r.n(l),i=r(35);r(156);const s=e=>{let{currency:c,maxPrice:r,minPrice:l,priceClassName:s,priceStyle:u={}}=e;return Object(t.createElement)(t.Fragment,null,Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(l),Object(i.formatPrice)(r))),Object(t.createElement)("span",{"aria-hidden":!0},Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:c,value:l,style:u})," — ",Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:c,value:r,style:u})))},u=e=>{let{currency:c,regularPriceClassName:r,regularPriceStyle:l,regularPrice:i,priceClassName:s,priceStyle:u,price:m}=e;return Object(t.createElement)(t.Fragment,null,Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(t.createElement)(n.a,{currency:c,renderText:e=>Object(t.createElement)("del",{className:o()("wc-block-components-product-price__regular",r),style:l},e),value:i}),Object(t.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(t.createElement)(n.a,{currency:c,renderText:e=>Object(t.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",s),style:u},e),value:m}))};c.a=e=>{let{align:c,className:r,currency:a,format:l="",maxPrice:i,minPrice:m,price:p,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:j,regularPriceStyle:O}=e;const _=o()(r,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+c]:c});l.includes("")||(l="",console.error("Price formats need to include the `` tag."));const y=g&&p!==g;let N=Object(t.createElement)("span",{className:o()("wc-block-components-product-price__value",b)});return y?N=Object(t.createElement)(u,{currency:a,price:p,priceClassName:b,priceStyle:d,regularPrice:g,regularPriceClassName:j,regularPriceStyle:O}):void 0!==m&&void 0!==i?N=Object(t.createElement)(s,{currency:a,maxPrice:i,minPrice:m,priceClassName:b,priceStyle:d}):p&&(N=Object(t.createElement)(n.a,{className:o()("wc-block-components-product-price__value",b),currency:a,value:p,style:d})),Object(t.createElement)("span",{className:_},Object(t.createInterpolateElement)(l,{price:N}))}},138:function(e,c){},156:function(e,c){},259:function(e,c,r){"use strict";r.r(c);var t=r(0),a=(r(10),r(4)),n=r.n(a),l=r(105),o=r(35),i=r(29),s=r(7),u=r(77),m=r(54);c.default=Object(m.withProductDataContext)(e=>{var c,r;let{className:a,align:m,fontSize:p,customFontSize:b,saleFontSize:d,customSaleFontSize:g,color:j,customColor:O,saleColor:_,customSaleColor:y}=e;const{parentClassName:N}=Object(i.useInnerBlockLayoutContext)(),{product:v}=Object(i.useProductDataContext)(),f=n()(a,{[N+"__product-price"]:N});if(!v.id)return Object(t.createElement)(l.a,{align:m,className:f});const P=Object(s.getColorClassName)("color",j),C=Object(s.getFontSizeClass)(p),S=Object(s.getColorClassName)("color",_),w=Object(s.getFontSizeClass)(d),x=n()({"has-text-color":j||O,"has-font-size":p||b,[P]:P,[C]:C}),E=n()({"has-text-color":_||y,"has-font-size":d||g,[S]:S,[w]:w}),k={color:O,fontSize:b},h={color:y,fontSize:g},z=v.prices,F=Object(o.getCurrencyFromPriceResponse)(z),D=z.price!==z.regular_price,T=D?n()({[N+"__product-price__value"]:N,[E]:Object(u.b)()}):n()({[N+"__product-price__value"]:N,[x]:Object(u.b)()}),B=D?h:k;return Object(t.createElement)(l.a,{align:m,className:f,currency:F,price:z.price,priceClassName:T,priceStyle:Object(u.b)()?B:{},minPrice:null==z||null===(c=z.price_range)||void 0===c?void 0:c.min_amount,maxPrice:null==z||null===(r=z.price_range)||void 0===r?void 0:r.max_amount,regularPrice:z.regular_price,regularPriceClassName:n()({[N+"__product-price__regular"]:N,[x]:Object(u.b)()}),regularPriceStyle:Object(u.b)()?k:{}})})},41:function(e,c,r){"use strict";var t=r(5),a=r.n(t),n=r(0),l=r(132),o=r(4),i=r.n(o);r(138);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});c.a=e=>{let{className:c,value:r,currency:t,onValueChange:o,displayType:u="text",...m}=e;const p="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(p))return null;const b=p/10**t.minorUnit;if(!Number.isFinite(b))return null;const d=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",c),g={...m,...s(t),value:void 0,currency:void 0,onValueChange:void 0},j=o?e=>{const c=+e.value*10**t.minorUnit;o(c)}:()=>{};return Object(n.createElement)(l.a,a()({className:d,displayType:u},g,{value:b,onValueChange:j}))}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/rating-frontend.js b/build/atomic-block-components/rating-frontend.js new file mode 100644 index 00000000000..edcbe76f54b --- /dev/null +++ b/build/atomic-block-components/rating-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{314:function(t,e){},363:function(t,e,c){"use strict";c.r(e);var n=c(0),a=(c(8),c(1)),o=c(4),r=c.n(o),s=c(49),u=c(110);c(314);e.default=Object(u.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:o}=Object(s.useProductDataContext)(),u=(t=>{const e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0})(o);if(!u)return null;const l={width:u/5*100+"%"},i=Object(a.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),u);return Object(n.createElement)("div",{className:r()(e,"wc-block-components-product-rating",{[c+"__product-rating"]:c})},Object(n.createElement)("div",{className:r()("wc-block-components-product-rating__stars",c+"__product-rating__stars"),role:"img","aria-label":i},Object(n.createElement)("span",{style:l},i)))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/rating.js b/build/atomic-block-components/rating.js new file mode 100644 index 00000000000..eb616be1c2e --- /dev/null +++ b/build/atomic-block-components/rating.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[12],{260:function(t,e,c){"use strict";c.r(e);var n=c(0),a=(c(10),c(1)),o=c(4),r=c.n(o),s=c(29),u=c(54);c(300);e.default=Object(u.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(s.useInnerBlockLayoutContext)(),{product:o}=Object(s.useProductDataContext)(),u=(t=>{const e=parseFloat(t.average_rating);return Number.isFinite(e)&&e>0?e:0})(o);if(!u)return null;const l={width:u/5*100+"%"},i=Object(a.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(a.__)("Rated %f out of 5","woo-gutenberg-products-block"),u);return Object(n.createElement)("div",{className:r()(e,"wc-block-components-product-rating",{[c+"__product-rating"]:c})},Object(n.createElement)("div",{className:r()("wc-block-components-product-rating__stars",c+"__product-rating__stars"),role:"img","aria-label":i},Object(n.createElement)("span",{style:l},i)))})},300:function(t,e){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/sale-badge-frontend.js b/build/atomic-block-components/sale-badge-frontend.js new file mode 100644 index 00000000000..8ed7f49badc --- /dev/null +++ b/build/atomic-block-components/sale-badge-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{21:function(e,t,c){"use strict";var a=c(0),n=c(4),r=c.n(n);t.a=e=>{let t,{label:c,screenReaderLabel:n,wrapperElement:l,wrapperProps:s={}}=e;const o=null!=c,u=null!=n;return!o&&u?(t=l||"span",s={...s,className:r()(s.className,"screen-reader-text")},Object(a.createElement)(t,s,n)):(t=l||a.Fragment,o&&u&&c!==n?Object(a.createElement)(t,s,Object(a.createElement)("span",{"aria-hidden":"true"},c),Object(a.createElement)("span",{className:"screen-reader-text"},n)):Object(a.createElement)(t,s,c))}},267:function(e,t){},285:function(e,t,c){"use strict";c.r(t);var a=c(0),n=(c(8),c(1)),r=c(4),l=c.n(r),s=c(21),o=c(49),u=c(110);c(267),t.default=Object(u.withProductDataContext)(e=>{let{className:t,align:c}=e;const{parentClassName:r}=Object(o.useInnerBlockLayoutContext)(),{product:u}=Object(o.useProductDataContext)();if(!u.id||!u.on_sale)return null;const b="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,b,{[r+"__product-onsale"]:r})},Object(a.createElement)(s.a,{label:Object(n.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Product on sale","woo-gutenberg-products-block")}))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/sale-badge.js b/build/atomic-block-components/sale-badge.js new file mode 100644 index 00000000000..a702a25a337 --- /dev/null +++ b/build/atomic-block-components/sale-badge.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{192:function(e,t,c){"use strict";c.r(t);var a=c(0),n=(c(10),c(1)),r=c(4),l=c.n(r),s=c(30),o=c(29),u=c(54);c(298),t.default=Object(u.withProductDataContext)(e=>{let{className:t,align:c}=e;const{parentClassName:r}=Object(o.useInnerBlockLayoutContext)(),{product:u}=Object(o.useProductDataContext)();if(!u.id||!u.on_sale)return null;const b="string"==typeof c?"wc-block-components-product-sale-badge--align-"+c:"";return Object(a.createElement)("div",{className:l()("wc-block-components-product-sale-badge",t,b,{[r+"__product-onsale"]:r})},Object(a.createElement)(s.a,{label:Object(n.__)("Sale","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Product on sale","woo-gutenberg-products-block")}))})},298:function(e,t){},30:function(e,t,c){"use strict";var a=c(0),n=c(4),r=c.n(n);t.a=e=>{let t,{label:c,screenReaderLabel:n,wrapperElement:l,wrapperProps:s={}}=e;const o=null!=c,u=null!=n;return!o&&u?(t=l||"span",s={...s,className:r()(s.className,"screen-reader-text")},Object(a.createElement)(t,s,n)):(t=l||a.Fragment,o&&u&&c!==n?Object(a.createElement)(t,s,Object(a.createElement)("span",{"aria-hidden":"true"},c),Object(a.createElement)("span",{className:"screen-reader-text"},n)):Object(a.createElement)(t,s,c))}}}]); \ No newline at end of file diff --git a/build/atomic-block-components/sku-frontend.js b/build/atomic-block-components/sku-frontend.js new file mode 100644 index 00000000000..9800e029691 --- /dev/null +++ b/build/atomic-block-components/sku-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{318:function(t,e){},366:function(t,e,c){"use strict";c.r(e);var o=c(0),n=c(1),s=(c(8),c(4)),u=c.n(s),a=c(49),r=c(110);c(318),e.default=Object(r.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(a.useInnerBlockLayoutContext)(),{product:s}=Object(a.useProductDataContext)(),r=s.sku;return r?Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-sku",{[c+"__product-sku"]:c})},Object(n.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,r)):null})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/sku.js b/build/atomic-block-components/sku.js new file mode 100644 index 00000000000..f0f576979d3 --- /dev/null +++ b/build/atomic-block-components/sku.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[13],{263:function(t,e,c){"use strict";c.r(e);var o=c(0),n=c(1),s=(c(10),c(4)),u=c.n(s),a=c(29),r=c(54);c(303),e.default=Object(r.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(a.useInnerBlockLayoutContext)(),{product:s}=Object(a.useProductDataContext)(),r=s.sku;return r?Object(o.createElement)("div",{className:u()(e,"wc-block-components-product-sku",{[c+"__product-sku"]:c})},Object(n.__)("SKU:","woo-gutenberg-products-block")," ",Object(o.createElement)("strong",null,r)):null})},303:function(t,e){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/stock-indicator-frontend.js b/build/atomic-block-components/stock-indicator-frontend.js new file mode 100644 index 00000000000..8afe822d87a --- /dev/null +++ b/build/atomic-block-components/stock-indicator-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{321:function(o,c){},369:function(o,c,t){"use strict";t.r(c);var e=t(0),n=t(1),s=(t(8),t(4)),r=t.n(s),a=t(49),i=t(110);t(321);c.default=Object(i.withProductDataContext)(o=>{let{className:c}=o;const{parentClassName:t}=Object(a.useInnerBlockLayoutContext)(),{product:s}=Object(a.useProductDataContext)();if(!s.id||!s.is_purchasable)return null;const i=!!s.is_in_stock,k=s.low_stock_remaining,b=s.is_on_backorder;return Object(e.createElement)("div",{className:r()(c,"wc-block-components-product-stock-indicator",{[t+"__stock-indicator"]:t,"wc-block-components-product-stock-indicator--in-stock":i,"wc-block-components-product-stock-indicator--out-of-stock":!i,"wc-block-components-product-stock-indicator--low-stock":!!k,"wc-block-components-product-stock-indicator--available-on-backorder":!!b})},k?(o=>Object(n.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(n.__)("%d left in stock","woo-gutenberg-products-block"),o))(k):((o,c)=>c?Object(n.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(n.__)("In Stock","woo-gutenberg-products-block"):Object(n.__)("Out of Stock","woo-gutenberg-products-block"))(i,b))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/stock-indicator.js b/build/atomic-block-components/stock-indicator.js new file mode 100644 index 00000000000..5345784d320 --- /dev/null +++ b/build/atomic-block-components/stock-indicator.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[14],{266:function(o,c,t){"use strict";t.r(c);var e=t(0),n=t(1),s=(t(10),t(4)),r=t.n(s),a=t(29),i=t(54);t(306);c.default=Object(i.withProductDataContext)(o=>{let{className:c}=o;const{parentClassName:t}=Object(a.useInnerBlockLayoutContext)(),{product:s}=Object(a.useProductDataContext)();if(!s.id||!s.is_purchasable)return null;const i=!!s.is_in_stock,k=s.low_stock_remaining,b=s.is_on_backorder;return Object(e.createElement)("div",{className:r()(c,"wc-block-components-product-stock-indicator",{[t+"__stock-indicator"]:t,"wc-block-components-product-stock-indicator--in-stock":i,"wc-block-components-product-stock-indicator--out-of-stock":!i,"wc-block-components-product-stock-indicator--low-stock":!!k,"wc-block-components-product-stock-indicator--available-on-backorder":!!b})},k?(o=>Object(n.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(n.__)("%d left in stock","woo-gutenberg-products-block"),o))(k):((o,c)=>c?Object(n.__)("Available on backorder","woo-gutenberg-products-block"):o?Object(n.__)("In Stock","woo-gutenberg-products-block"):Object(n.__)("Out of Stock","woo-gutenberg-products-block"))(i,b))})},306:function(o,c){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/summary-frontend.js b/build/atomic-block-components/summary-frontend.js new file mode 100644 index 00000000000..7f9e8346d3b --- /dev/null +++ b/build/atomic-block-components/summary-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{258:function(t,e,c){"use strict";var n=c(0),o=c(113),s=c(114);const r=t=>{const e=t.indexOf("

");return-1===e?t:t.substr(0,e+4)},u=t=>t.replace(/<\/?[a-z][^>]*?>/gi,""),a=(t,e)=>t.replace(/[\s|\.\,]+$/i,"")+e,l=function(t,e){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const n=u(t),o=n.split(" ").splice(0,e).join(" ");return Object(s.autop)(a(o,c))},i=function(t,e){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=u(t),r=o.slice(0,e);if(c)return Object(s.autop)(a(r,n));const l=r.match(/([\s]+)/g),i=l?l.length:0,p=o.slice(0,e+i);return Object(s.autop)(a(p,n))};e.a=t=>{let{source:e,maxLength:c=15,countType:u="words",className:a=""}=t;const p=Object(n.useMemo)(()=>function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const n=Object(s.autop)(t),u=Object(o.count)(n,c);if(u<=e)return n;const a=r(n),p=Object(o.count)(a,c);return p<=e?a:"words"===c?l(a,e):i(a,e,"characters_including_spaces"===c)}(e,c,u),[e,c,u]);return Object(n.createElement)(n.RawHTML,{className:a},p)}},317:function(t,e){},365:function(t,e,c){"use strict";c.r(e);var n=c(0),o=(c(8),c(4)),s=c.n(o),r=c(258),u=c(66),a=c(49),l=c(110);c(317),e.default=Object(l.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(a.useInnerBlockLayoutContext)(),{product:o}=Object(a.useProductDataContext)();if(!o)return Object(n.createElement)("div",{className:s()(e,"wc-block-components-product-summary",{[c+"__product-summary"]:c})});const l=o.short_description?o.short_description:o.description;return l?Object(n.createElement)(r.a,{className:s()(e,"wc-block-components-product-summary",{[c+"__product-summary"]:c}),source:l,maxLength:150,countType:u.n.wordCountType||"words"}):null})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/summary.js b/build/atomic-block-components/summary.js new file mode 100644 index 00000000000..ec164f65f08 --- /dev/null +++ b/build/atomic-block-components/summary.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[15],{129:function(t,e,c){"use strict";var n=c(0),o=c(100),s=c(73);const r=t=>{const e=t.indexOf("

");return-1===e?t:t.substr(0,e+4)},u=t=>t.replace(/<\/?[a-z][^>]*?>/gi,""),a=(t,e)=>t.replace(/[\s|\.\,]+$/i,"")+e,l=function(t,e){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const n=u(t),o=n.split(" ").splice(0,e).join(" ");return Object(s.autop)(a(o,c))},i=function(t,e){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=u(t),r=o.slice(0,e);if(c)return Object(s.autop)(a(r,n));const l=r.match(/([\s]+)/g),i=l?l.length:0,p=o.slice(0,e+i);return Object(s.autop)(a(p,n))};e.a=t=>{let{source:e,maxLength:c=15,countType:u="words",className:a=""}=t;const p=Object(n.useMemo)(()=>function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const n=Object(s.autop)(t),u=Object(o.count)(n,c);if(u<=e)return n;const a=r(n),p=Object(o.count)(a,c);return p<=e?a:"words"===c?l(a,e):i(a,e,"characters_including_spaces"===c)}(e,c,u),[e,c,u]);return Object(n.createElement)(n.RawHTML,{className:a},p)}},262:function(t,e,c){"use strict";c.r(e);var n=c(0),o=(c(10),c(4)),s=c.n(o),r=c(129),u=c(25),a=c(29),l=c(54);c(302),e.default=Object(l.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(a.useInnerBlockLayoutContext)(),{product:o}=Object(a.useProductDataContext)();if(!o)return Object(n.createElement)("div",{className:s()(e,"wc-block-components-product-summary",{[c+"__product-summary"]:c})});const l=o.short_description?o.short_description:o.description;return l?Object(n.createElement)(r.a,{className:s()(e,"wc-block-components-product-summary",{[c+"__product-summary"]:c}),source:l,maxLength:150,countType:u.o.wordCountType||"words"}):null})},302:function(t,e){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/tag-list-frontend.js b/build/atomic-block-components/tag-list-frontend.js new file mode 100644 index 00000000000..90bed40ad4f --- /dev/null +++ b/build/atomic-block-components/tag-list-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{320:function(t,e){},368:function(t,e,c){"use strict";c.r(e);var a=c(0),n=c(1),l=(c(8),c(4)),s=c.n(l),o=c(49),u=c(5),r=c(110);c(320),e.default=Object(r.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(o.useInnerBlockLayoutContext)(),{product:l}=Object(o.useProductDataContext)();return Object(u.isEmpty)(l.tags)?null:Object(a.createElement)("div",{className:s()(e,"wc-block-components-product-tag-list",{[c+"__product-tag-list"]:c})},Object(n.__)("Tags:","woo-gutenberg-products-block")," ",Object(a.createElement)("ul",null,Object.values(l.tags).map(t=>{let{name:e,link:c,slug:n}=t;return Object(a.createElement)("li",{key:"tag-list-item-"+n},Object(a.createElement)("a",{href:c},e))})))})}}]); \ No newline at end of file diff --git a/build/atomic-block-components/tag-list.js b/build/atomic-block-components/tag-list.js new file mode 100644 index 00000000000..0b63d42dc46 --- /dev/null +++ b/build/atomic-block-components/tag-list.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[16],{265:function(t,e,c){"use strict";c.r(e);var a=c(0),n=c(1),l=(c(10),c(4)),s=c.n(l),o=c(29),u=c(6),r=c(54);c(305),e.default=Object(r.withProductDataContext)(t=>{let{className:e}=t;const{parentClassName:c}=Object(o.useInnerBlockLayoutContext)(),{product:l}=Object(o.useProductDataContext)();return Object(u.isEmpty)(l.tags)?null:Object(a.createElement)("div",{className:s()(e,"wc-block-components-product-tag-list",{[c+"__product-tag-list"]:c})},Object(n.__)("Tags:","woo-gutenberg-products-block")," ",Object(a.createElement)("ul",null,Object.values(l.tags).map(t=>{let{name:e,link:c,slug:n}=t;return Object(a.createElement)("li",{key:"tag-list-item-"+n},Object(a.createElement)("a",{href:c},e))})))})},305:function(t,e){}}]); \ No newline at end of file diff --git a/build/atomic-block-components/title-frontend.js b/build/atomic-block-components/title-frontend.js new file mode 100644 index 00000000000..a2f868f5326 --- /dev/null +++ b/build/atomic-block-components/title-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[18],{247:function(e,t,o){"use strict";var n=o(10),l=o.n(n),c=o(0),a=o(19),r=o(4),i=o.n(r);o(248),t.a=e=>{let{className:t="",disabled:o=!1,name:n,permalink:r="",rel:s,style:u,onClick:d,...p}=e;const m=i()("wc-block-components-product-name",t);if(o){const e=p;return Object(c.createElement)("span",l()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(n)}}))}return Object(c.createElement)("a",l()({className:m,href:r,rel:s},p,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(n)},style:u}))}},248:function(e,t){},311:function(e,t,o){"use strict";o.d(t,"a",(function(){return l})),o(166);var n=o(66);const l=()=>n.m>1},313:function(e,t){},396:function(e,t,o){"use strict";o.r(t);var n=o(110),l=o(0),c=o(4),a=o.n(c),r=o(49),i=o(165),s=o(311),u=o(247),d=o(38);o(313);const p=e=>{let{children:t,headingLevel:o,elementType:n="h"+o,...c}=e;return Object(l.createElement)(n,c,t)};var m=Object(n.withProductDataContext)(e=>{var t,o,n,c;let{className:m,headingLevel:b=2,showProductLink:v=!0,align:f,textColor:j,fontSize:O,style:h}=e;const{parentClassName:y}=Object(r.useInnerBlockLayoutContext)(),{product:g}=Object(r.useProductDataContext)(),{dispatchStoreEvent:k}=Object(d.a)(),w=Object(i.getColorClassName)("color",j),S=Object(i.getFontSizeClass)(O),C=a()("wp-block-woocommerce-product-title",{"has-text-color":j||(null==h||null===(t=h.color)||void 0===t?void 0:t.text)||(null==h?void 0:h.color),"has-font-size":O||(null==h||null===(o=h.typography)||void 0===o?void 0:o.fontSize)||(null==h?void 0:h.fontSize),[w]:w,[S]:S}),z={fontSize:(null==h?void 0:h.fontSize)||(null==h||null===(n=h.typography)||void 0===n?void 0:n.fontSize),color:(null==h||null===(c=h.color)||void 0===c?void 0:c.text)||(null==h?void 0:h.color)};return g.id?Object(l.createElement)(p,{headingLevel:b,className:a()(m,"wc-block-components-product-title",{[y+"__product-title"]:y,["wc-block-components-product-title--align-"+f]:f&&Object(s.a)()})},Object(l.createElement)(u.a,{className:a()({[C]:Object(s.a)()}),disabled:!v,name:g.name,permalink:g.permalink,rel:v?"nofollow":"",onClick:()=>{k("product-view-link",{product:g})},style:Object(s.a)()?z:{}})):Object(l.createElement)(p,{headingLevel:b,className:a()(m,"wc-block-components-product-title",{[y+"__product-title"]:y,["wc-block-components-product-title--align-"+f]:f&&Object(s.a)(),[C]:Object(s.a)()})})});let b={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(s.a)()&&(b={...b,align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}});var v=b;t.default=Object(n.withFilteredAttributes)(v)(m)}}]); \ No newline at end of file diff --git a/build/atomic-block-components/title.js b/build/atomic-block-components/title.js new file mode 100644 index 00000000000..bfb62fd4b9a --- /dev/null +++ b/build/atomic-block-components/title.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[17],{127:function(e,t,o){"use strict";var n=o(5),l=o.n(n),c=o(0),r=o(14),a=o(4),i=o.n(a);o(155),t.a=e=>{let{className:t="",disabled:o=!1,name:n,permalink:a="",rel:s,style:u,onClick:d,...b}=e;const p=i()("wc-block-components-product-name",t);if(o){const e=b;return Object(c.createElement)("span",l()({className:p},e,{dangerouslySetInnerHTML:{__html:Object(r.decodeEntities)(n)}}))}return Object(c.createElement)("a",l()({className:p,href:a,rel:s},b,{dangerouslySetInnerHTML:{__html:Object(r.decodeEntities)(n)},style:u}))}},155:function(e,t){},245:function(e,t,o){"use strict";var n=o(77);let l={headingLevel:{type:"number",default:2},showProductLink:{type:"boolean",default:!0},productId:{type:"number",default:0}};Object(n.b)()&&(l={...l,align:{type:"string"},color:{type:"string"},customColor:{type:"string"},fontSize:{type:"string"},customFontSize:{type:"number"}}),t.a=l},246:function(e,t,o){"use strict";var n=o(0),l=o(4),c=o.n(l),r=o(29),a=o(7),i=o(77),s=o(54),u=o(127),d=o(60);o(297);const b=e=>{let{children:t,headingLevel:o,elementType:l="h"+o,...c}=e;return Object(n.createElement)(l,c,t)};t.a=Object(s.withProductDataContext)(e=>{var t,o,l,s;let{className:p,headingLevel:m=2,showProductLink:v=!0,align:f,textColor:j,fontSize:O,style:h}=e;const{parentClassName:y}=Object(r.useInnerBlockLayoutContext)(),{product:g}=Object(r.useProductDataContext)(),{dispatchStoreEvent:k}=Object(d.a)(),w=Object(a.getColorClassName)("color",j),S=Object(a.getFontSizeClass)(O),C=c()("wp-block-woocommerce-product-title",{"has-text-color":j||(null==h||null===(t=h.color)||void 0===t?void 0:t.text)||(null==h?void 0:h.color),"has-font-size":O||(null==h||null===(o=h.typography)||void 0===o?void 0:o.fontSize)||(null==h?void 0:h.fontSize),[w]:w,[S]:S}),z={fontSize:(null==h?void 0:h.fontSize)||(null==h||null===(l=h.typography)||void 0===l?void 0:l.fontSize),color:(null==h||null===(s=h.color)||void 0===s?void 0:s.text)||(null==h?void 0:h.color)};return g.id?Object(n.createElement)(b,{headingLevel:m,className:c()(p,"wc-block-components-product-title",{[y+"__product-title"]:y,["wc-block-components-product-title--align-"+f]:f&&Object(i.b)()})},Object(n.createElement)(u.a,{className:c()({[C]:Object(i.b)()}),disabled:!v,name:g.name,permalink:g.permalink,rel:v?"nofollow":"",onClick:()=>{k("product-view-link",{product:g})},style:Object(i.b)()?z:{}})):Object(n.createElement)(b,{headingLevel:m,className:c()(p,"wc-block-components-product-title",{[y+"__product-title"]:y,["wc-block-components-product-title--align-"+f]:f&&Object(i.b)(),[C]:Object(i.b)()})})})},297:function(e,t){},496:function(e,t,o){"use strict";o.r(t);var n=o(54),l=o(246),c=o(245);t.default=Object(n.withFilteredAttributes)(c.a)(l.a)}}]); \ No newline at end of file diff --git a/build/attribute-filter-frontend.asset.php b/build/attribute-filter-frontend.asset.php new file mode 100644 index 00000000000..851f02fba91 --- /dev/null +++ b/build/attribute-filter-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'd613864df58673e6f57e20d24abde3a6'); \ No newline at end of file diff --git a/build/attribute-filter-frontend.js b/build/attribute-filter-frontend.js new file mode 100644 index 00000000000..3b5cb7c1a82 --- /dev/null +++ b/build/attribute-filter-frontend.js @@ -0,0 +1,29 @@ +!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}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=181)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t){e.exports=window.React},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t{let{imageUrl:t=s.l+"/block-error.svg",header:n=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(c.__)("Error:","woo-gutenberg-products-block"),button:u}=e;return Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},n&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},n),r&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),u&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},u)))};n(37);class l extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,text:r,errorMessagePrefix:o,renderError:a,button:c}=this.props,{errorMessage:s,hasError:l}=this.state;return l?"function"==typeof a?a({errorMessage:s}):Object(i.createElement)(u,{errorMessage:n?s:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:c}):this.props.children}}t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n(11),i=n.n(o);function a(e){const t=Object(r.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},,function(e,t){e.exports=window.wp.htmlEntities},,function(e,t,n){"use strict";var r=n(0),o=n(4),i=n.n(o);t.a=e=>{let t,{label:n,screenReaderLabel:o,wrapperElement:a,wrapperProps:c={}}=e;const s=null!=n,u=null!=o;return!s&&u?(t=a||"span",c={...c,className:i()(c.className,"screen-reader-text")},Object(r.createElement)(t,c,o)):(t=a||r.Fragment,s&&u&&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))}},,function(e,t){e.exports=window.wp.a11y},function(e,t){e.exports=window.wp.primitives},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(0);const o=Object(r.createContext)("page"),i=()=>Object(r.useContext)(o);o.Provider},,,,,,,,,,,,function(e,t){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return p})),n.d(t,"c",(function(){return f}));var r=n(6),o=n(9),i=n(0),a=n(11),c=n.n(a),s=n(17),u=n(62),l=n(25);const d=e=>{const t=Object(l.a)();e=e||t;const n=Object(o.useSelect)(t=>t(r.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:a}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[n,Object(i.useCallback)(t=>{a(e,t)},[e,a])]},p=(e,t,n)=>{const a=Object(l.a)();n=n||a;const c=Object(o.useSelect)(o=>o(r.QUERY_STATE_STORE_KEY).getValueForQueryKey(n,e,t),[n,e]),{setQueryValue:s}=Object(o.useDispatch)(r.QUERY_STATE_STORE_KEY);return[c,Object(i.useCallback)(t=>{s(n,e,t)},[n,e,s])]},f=(e,t)=>{const n=Object(l.a)();t=t||n;const[r,o]=d(t),a=Object(s.a)(r),p=Object(s.a)(e),f=Object(u.a)(p),m=Object(i.useRef)(!1);return Object(i.useEffect)(()=>{c()(f,p)||(o(Object.assign({},a,p)),m.current=!0)},[a,p,f,o]),m.current?[r,o]:[e,o]}},,,function(e,t,n){"use strict";var r=n(43);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){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:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t,n){var o=this,i=Object(r.useRef)(null),a=Object(r.useRef)(0),c=Object(r.useRef)(null),s=Object(r.useRef)([]),u=Object(r.useRef)(),l=Object(r.useRef)(),d=Object(r.useRef)(e),p=Object(r.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,g="maxWait"in n,h=g?Math.max(+n.maxWait||0,t):null;return Object(r.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(r.useMemo)((function(){var e=function(e){var t=s.current,n=u.current;return s.current=u.current=null,a.current=e,l.current=d.current.apply(n,t)},n=function(e,t){f&&cancelAnimationFrame(c.current),c.current=f?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!p.current)return!1;var n=e-i.current,r=e-a.current;return!i.current||n>=t||n<0||g&&r>=h},v=function(t){return c.current=null,b&&s.current?e(t):(s.current=u.current=null,l.current)},y=function(){var e=Date.now();if(r(e))return v(e);if(p.current){var o=e-i.current,c=e-a.current,s=t-o,u=g?Math.min(s,h-c):s;n(y,u)}},O=function(){for(var d=[],f=0;f{let{Block:t,containers:n,getProps:r=(()=>({})),getErrorBoundaryProps:c=(()=>({}))}=e;0!==n.length&&Array.prototype.forEach.call(n,(e,n)=>{const s=r(e,n),u=c(e,n),l={...e.dataset,...s.attributes||{}};(e=>{let{Block:t,container:n,attributes:r={},props:c={},errorBoundaryProps:s={}}=e;Object(i.render)(Object(i.createElement)(a.a,s,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},c,{attributes:r})))),n,()=>{n.classList&&n.classList.remove("is-loading")})})({Block:t,container:e,props:s,attributes:l,errorBoundaryProps:u})})},u=e=>{const t=document.body.querySelectorAll(c.join(",")),{Block:n,getProps:r,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrappers:i}=e;const a=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),s({Block:t,containers:a,getProps:n,getErrorBoundaryProps:r})})({Block:n,getProps:r,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrapper:i}=e;const a=i.querySelectorAll(o);s({Block:t,containers:a,getProps:n,getErrorBoundaryProps:r})})({...e,wrapper:t})})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(21);n(117),t.a=e=>{let{name:t,count:n}=e;return Object(r.createElement)(r.Fragment,null,t,Number.isFinite(n)&&Object(r.createElement)(i.a,{label:n,screenReaderLabel:Object(o.sprintf)( +/* translators: %s number of products. */ +Object(o._n)("%s product","%s products",n,"woo-gutenberg-products-block"),n),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3);function o(e,t){const n=Object(r.useRef)();return Object(r.useEffect)(()=>{n.current===e||t&&!t(e,n.current)||(n.current=e)},[e,t]),n.current}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),o=n(9),i=n(0),a=n(17),c=n(54);const s=e=>{const{namespace:t,resourceName:n,resourceValues:s=[],query:u={},shouldSelect:l=!0}=e;if(!t||!n)throw new Error("The options object must have valid values for the namespace and the resource properties.");const d=Object(i.useRef)({results:[],isLoading:!0}),p=Object(a.a)(u),f=Object(a.a)(s),m=Object(c.a)(),b=Object(o.useSelect)(e=>{if(!l)return null;const o=e(r.COLLECTIONS_STORE_KEY),i=[t,n,p,f],a=o.getCollectionError(...i);return a&&m(a),{results:o.getCollection(...i),isLoading:!o.hasFinishedResolution("getCollection",i)}},[t,n,f,p,l]);return null!==b&&(d.current=b),d.current}},,function(e,t,n){"use strict";n.d(t,"n",(function(){return i})),n.d(t,"l",(function(){return a})),n.d(t,"k",(function(){return c})),n.d(t,"m",(function(){return s})),n.d(t,"i",(function(){return u})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return d})),n.d(t,"j",(function(){return p})),n.d(t,"c",(function(){return f})),n.d(t,"e",(function(){return m})),n.d(t,"g",(function(){return b})),n.d(t,"a",(function(){return g})),n.d(t,"h",(function(){return h})),n.d(t,"b",(function(){return v}));var r,o=n(2);const i=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=i.pluginUrl+"images/",c=i.pluginUrl+"build/",s=i.buildPhase,u=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),d=o.STORE_PAGES.privacy.permalink,p=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),f=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),m=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},,,,,,function(e,t,n){"use strict";var r=n(0),o=n(1),i=(n(8),n(4)),a=n.n(i),c=n(21);n(102);const s=e=>{let{className:t,disabled:n,label: +/* translators: Submit button text for filters. */ +i=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(r.createElement)("button",{type:"submit",className:a()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:n,onClick:s},Object(r.createElement)(c.a,{label:i,screenReaderLabel:u}))};s.defaultProps={disabled:!1},t.a=s},,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),o=n(52);function i(e,t){return e===t}function a(e){return"function"==typeof e?function(){return e}:e}function c(e,t,n){var c=n&&n.equalityFn||i,s=function(e){var t=Object(r.useState)(a(e)),n=t[0],o=t[1];return[n,Object(r.useCallback)((function(e){return o(a(e))}),[])]}(e),u=s[0],l=s[1],d=Object(o.a)(Object(r.useCallback)((function(e){return l(e)}),[l]),t,n),p=Object(r.useRef)(e);return c(p.current,e)||(d(e),p.current=e),[u,d]}},function(e,t){e.exports=window.wp.components},,,function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null}},,,,function(e,t){},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(2);const o=Object(r.getSetting)("attributes",[]).reduce((e,t)=>{const n=(r=t)&&r.attribute_name?{id:parseInt(r.attribute_id,10),name:r.attribute_name,taxonomy:"pa_"+r.attribute_name,label:r.attribute_label}:null;var r;return n.id&&e.push(n),e},[]),i=e=>{if(e)return o.find(t=>t.id===e)},a=e=>{if(e)return o.find(t=>t.taxonomy===e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i}));var r=n(5);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const i=e.filter(e=>e.attribute===n.taxonomy),a=i.length?i[0]:null;if(!(a&&a.slug&&Array.isArray(a.slug)&&a.slug.includes(o)))return;const c=a.slug.filter(e=>e!==o),s=e.filter(e=>e.attribute!==n.taxonomy);c.length>0&&(a.slug=c.sort(),s.push(a)),t(Object(r.sortBy)(s,"attribute"))},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const a=e.filter(e=>e.attribute!==n.taxonomy);0===o.length?t(a):(a.push({attribute:n.taxonomy,operator:i,slug:o.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(r.sortBy)(a,"attribute")))}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(4),a=n.n(i);n(118),t.a=e=>{let{className:t,onChange:n=(()=>{}),options:i=[],checked:c=[],isLoading:s=!1,isDisabled:u=!1,limit:l=10}=e;const[d,p]=Object(r.useState)(!1),f=Object(r.useMemo)(()=>[...Array(5)].map((e,t)=>Object(r.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),m=Object(r.useMemo)(()=>{const e=i.length-l;return!d&&Object(r.createElement)("li",{key:"show-more",className:"show-more"},Object(r.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)( +/* translators: %s is referring the remaining count of options */ +Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)( +/* translators: %s number of options to reveal. */ +Object(o._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[i,l,d]),b=Object(r.useMemo)(()=>d&&Object(r.createElement)("li",{key:"show-less",className:"show-less"},Object(r.createElement)("button",{onClick:()=>{p(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woo-gutenberg-products-block")},Object(o.__)("Show less","woo-gutenberg-products-block"))),[d]),g=Object(r.useMemo)(()=>{const e=i.length>l+5;return Object(r.createElement)(r.Fragment,null,i.map((t,o)=>Object(r.createElement)(r.Fragment,{key:t.value},Object(r.createElement)("li",e&&!d&&o>=l&&{hidden:!0},Object(r.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{n(e.target.value)},checked:c.includes(t.value),disabled:u}),Object(r.createElement)("label",{htmlFor:t.value},t.label)),e&&o===l-1&&m)),e&&b)},[i,n,c,d,l,b,m,u]),h=a()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":s},t);return Object(r.createElement)("ul",{className:h},s?f:g)}},,,,,,function(e,t){},,,,,function(e,t){},function(e,t){},,,,,,,,function(e,t,n){"use strict";e.exports=n(184)},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(0),o=n(94),i=n(5),a=n(17),c=n(39),s=n(64),u=n(25);const l=e=>{let{queryAttribute:t,queryPrices:n,queryStock:l,queryState:d}=e,p=Object(u.a)();p+="-collection-data";const[f]=Object(c.a)(p),[m,b]=Object(c.b)("calculate_attribute_counts",[],p),[g,h]=Object(c.b)("calculate_price_range",null,p),[v,y]=Object(c.b)("calculate_stock_status_counts",null,p),O=Object(a.a)(t||{}),w=Object(a.a)(n),j=Object(a.a)(l);Object(r.useEffect)(()=>{"object"==typeof O&&Object.keys(O).length&&(m.find(e=>e.taxonomy===O.taxonomy)||b([...m,O]))},[O,m,b]),Object(r.useEffect)(()=>{g!==w&&void 0!==w&&h(w)},[w,h,g]),Object(r.useEffect)(()=>{v!==j&&void 0!==j&&y(j)},[j,y,v]);const[E,I]=Object(r.useState)(!1),[_]=Object(o.a)(E,200);E||I(!0);const S=Object(r.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(i.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:n}=e;return{taxonomy:t,query_type:n}}),["taxonomy","query_type"])),t})(f),[f]);return Object(s.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...d,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...S},shouldSelect:_})}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(10),o=n.n(r),i=n(0),a=n(24);const c=Object(i.createElement)(e=>{let{className:t,size:n,...r}=e;return Object(i.createElement)(a.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},r),Object(i.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=c},,,,,function(e,t,n){"use strict";var r=n(10),o=n.n(r),i=n(0),a=n(4),c=n.n(a),s=n(1),u=n(98),l=n(163);n(112);var d=e=>{let{text:t,screenReaderText:n="",element:r="li",className:a="",radius:s="small",children:u=null,...l}=e;const d=r,p=c()(a,"wc-block-components-chip","wc-block-components-chip--radius-"+s),f=Boolean(n&&n!==t);return Object(i.createElement)(d,o()({className:p},l),Object(i.createElement)("span",{"aria-hidden":f,className:"wc-block-components-chip__text"},t),f&&Object(i.createElement)("span",{className:"screen-reader-text"},n),u)};t.a=e=>{let{ariaLabel:t="",className:n="",disabled:r=!1,onRemove:a=(()=>{}),removeOnAnyClick:p=!1,text:f,screenReaderText:m="",...b}=e;const g=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:f;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const h={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},v=p?h:{},y=p?{"aria-hidden":!0}:h;return Object(i.createElement)(d,o()({},b,v,{className:c()(n,"is-removable"),element:p?"button":b.element,screenReaderText:m,text:f}),Object(i.createElement)(g,o()({className:"wc-block-components-chip__remove"},y),Object(i.createElement)(u.a,{className:"wc-block-components-chip__remove-icon",srcElement:l.a,size:16})))}},,,,,,,,,,,,,function(e,t,n){e.exports=n(200)},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=60103,o=60106,i=60107,a=60108,c=60114,s=60109,u=60110,l=60112,d=60113,p=60120,f=60115,m=60116,b=60121,g=60122,h=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var O=Symbol.for;r=O("react.element"),o=O("react.portal"),i=O("react.fragment"),a=O("react.strict_mode"),c=O("react.profiler"),s=O("react.provider"),u=O("react.context"),l=O("react.forward_ref"),d=O("react.suspense"),p=O("react.suspense_list"),f=O("react.memo"),m=O("react.lazy"),b=O("react.block"),g=O("react.server.block"),h=O("react.fundamental"),v=O("react.debug_trace_mode"),y=O("react.legacy_hidden")}function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case c:case a:case d:case p:return e;default:switch(e=e&&e.$$typeof){case u:case l:case m:case f:case s:return e;default:return t}}case o:return t}}}var j=s,E=r,I=l,_=i,S=m,k=f,x=o,C=c,P=a,R=d;t.ContextConsumer=u,t.ContextProvider=j,t.Element=E,t.ForwardRef=I,t.Fragment=_,t.Lazy=S,t.Memo=k,t.Portal=x,t.Profiler=C,t.StrictMode=P,t.Suspense=R,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===l},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===f},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===c},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===d},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===v||e===a||e===d||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===s||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===b||e[0]===g)},t.typeOf=w},,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(53),o=n(0),i=n(1),a=n(23),c=n(17),s=n(62),u=n(39),l=n(64),d=n(133),p=n(106),f=n(8),m=n.n(f),b=n(4),g=n.n(b);function h(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}var v=n(7);function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var w=n(3);function j(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function E(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function I(e,t){if(e.clientHeightt||i>e&&a=t&&c>=n?i-e-r:a>t&&cn?a-t+o:0}n(126);var S=function(){return(S=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&E>=0&&w<=f&&O<=p&&y>=A&&w<=N&&E>=H&&O<=D)return x;var B=getComputedStyle(P),L=parseInt(B.borderLeftWidth,10),V=parseInt(B.borderTopWidth,10),F=parseInt(B.borderRightWidth,10),K=parseInt(B.borderBottomWidth,10),q=0,U=0,$="offsetWidth"in P?P.offsetWidth-P.clientWidth-L-F:0,W="offsetHeight"in P?P.offsetHeight-P.clientHeight-V-K:0;if(u===P)q="start"===o?S:"end"===o?S-f:"nearest"===o?_(b,b+f,f,V,K,b+S,b+S+h,h):S-f/2,U="start"===i?k:"center"===i?k-p/2:"end"===i?k-p:_(m,m+p,p,L,F,m+k,m+k+v,v),q=Math.max(0,q+b),U=Math.max(0,U+m);else{q="start"===o?S-A-V:"end"===o?S-N+K+W:"nearest"===o?_(A,N,T,V,K+W,S,S+h,h):S-(A+T/2)+W/2,U="start"===i?k-H-L:"center"===i?k-(H+M/2)+$/2:"end"===i?k-D+F+$:_(H,D,M,L,F+$,k,k+v,v);var G=P.scrollLeft,Y=P.scrollTop;S+=Y-(q=Math.max(0,Math.min(Y+q,P.scrollHeight-T+W))),k+=G-(U=Math.max(0,Math.min(G+U,P.scrollWidth-M+$)))}x.push({el:P,top:q,left:U})}return x}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function R(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function T(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a1?n-1:0),o=1;o=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function F(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var c=K(e,a,n,r,o);return-1===c?t>=n?-1:t:c}function K(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a=0;c--)if(!r(c).hasAttribute("disabled"))return c;return o?e>0?K(1,0,n,r,!1):K(-1,n-1,n,r,!1):-1}function q(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(R(t,e,n)||r&&R(t,n.document.activeElement,n))}))}var U=T((function(e){W(e).textContent=""}),500);function $(e,t){var n=W(t);e&&(n.textContent=e,U(t))}function W(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var G=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),Y=["refKey","ref"],z=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],Q=["onKeyDown","onBlur","onChange","onInput","onChangeText"],X=["refKey","ref"],J=["onMouseMove","onMouseDown","onClick","onPress","index","item"],Z=function(){var e=function(e){var t,n;function r(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+String(k++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=B(t),n.internalSetState(Object(v.a)({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=B(t),n.internalSetState(Object(v.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,o,i={},a="function"==typeof e;return!a&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,Object(v.a)({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var c=a?e(t):e;c=n.props.stateReducer(t,c),r=c.hasOwnProperty("selectedItem");var s={},u={};return r&&c.selectedItem!==t.selectedItem&&(o=c.selectedItem),c.type=c.type||0,Object.keys(c).forEach((function(e){t[e]!==c[e]&&(i[e]=c[e]),"type"!==e&&(u[e]=c[e],L(n.props,e)||(s[e]=c[e]))})),a&&c.hasOwnProperty("inputValue")&&n.props.onInputValueChange(c.inputValue,Object(v.a)({},n.getStateAndHelpers(),c)),s}),(function(){x(t)(),Object.keys(i).length>1&&n.props.onStateChange(i,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==o&&n.props.onChange(o,n.getStateAndHelpers()),n.props.onUserAction(i,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,c=o.ref,s=h(o,Y),u=(void 0===t?{}:t).suppressRefError,l=void 0!==u&&u;n.getRootProps.called=!0,n.getRootProps.refKey=a,n.getRootProps.suppressRefError=l;var d=n.getState().isOpen;return Object(v.a)(((r={})[a]=A(c,n.rootRef),r.role="combobox",r["aria-expanded"]=d,r["aria-haspopup"]="listbox",r["aria-owns"]=d?n.menuId:null,r["aria-labelledby"]=n.labelId,r),s)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=F(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=F(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(Object(v.a)({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=Object(v.a)({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=Object(v.a)({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=K(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=K(-1,r-1,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,r=t.onClick;t.onPress;var o=t.onKeyDown,i=t.onKeyUp,a=t.onBlur,c=h(t,z),s=n.getState().isOpen,u={onClick:M(r,n.buttonHandleClick),onKeyDown:M(o,n.buttonHandleKeyDown),onKeyUp:M(i,n.buttonHandleKeyUp),onBlur:M(a,n.buttonHandleBlur)},l=c.disabled?{}:u;return Object(v.a)({type:"button",role:"button","aria-label":s?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},l,c)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=V(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(y(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return Object(v.a)({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,r=t.onKeyDown,o=t.onBlur,i=t.onChange,a=t.onInput;t.onChangeText;var c,s=h(t,Q),u={},l=n.getState(),d=l.inputValue,p=l.isOpen,f=l.highlightedIndex;return s.disabled||((c={}).onChange=M(i,a,n.inputHandleChange),c.onKeyDown=M(r,n.inputHandleKeyDown),c.onBlur=M(o,n.inputHandleBlur),u=c),Object(v.a)({"aria-autocomplete":"list","aria-activedescendant":p&&"number"==typeof f&&f>=0?n.getItemId(f):null,"aria-controls":p?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:d,id:n.inputId},u,s)},n.inputHandleKeyDown=function(e){var t=V(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(y(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var r,o=void 0===e?{}:e,i=o.refKey,a=void 0===i?"ref":i,c=o.ref,s=h(o,X),u=(void 0===t?{}:t).suppressRefError,l=void 0!==u&&u;return n.getMenuProps.called=!0,n.getMenuProps.refKey=a,n.getMenuProps.suppressRefError=l,Object(v.a)(((r={})[a]=A(c,n.menuRef),r.role="listbox",r["aria-labelledby"]=s&&s["aria-label"]?null:n.labelId,r.id=n.menuId,r),s)},n.getItemProps=function(e){var t,r=void 0===e?{}:e,o=r.onMouseMove,i=r.onMouseDown,a=r.onClick;r.onPress;var c=r.index,s=r.item,u=void 0===s?void 0:s,l=h(r,J);void 0===c?(n.items.push(u),c=n.items.indexOf(u)):n.items[c]=u;var d=a,p=((t={onMouseMove:M(o,(function(){c!==n.getState().highlightedIndex&&(n.setHighlightedIndex(c,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:M(i,(function(e){e.preventDefault()}))}).onClick=M(d,(function(){n.selectItemAtIndex(c,{type:9})})),t),f=l.disabled?{onMouseDown:p.onMouseDown}:p;return Object(v.a)({id:n.getItemId(c),role:"option","aria-selected":n.getState().highlightedIndex===c},f,l)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=B(e),n.internalSetState((function(t){var r=t.selectedItem;return Object(v.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=B(e),n.internalSetState((function(t){var r=t.isOpen;return Object(v.a)({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),x(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=T((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),o=n.props.getA11yStatusMessage(Object(v.a)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,$(o,n.props.environment.document)}),200);var r=n.props,o=r.defaultHighlightedIndex,i=r.initialHighlightedIndex,a=void 0===i?o:i,c=r.defaultIsOpen,s=r.initialIsOpen,u=void 0===s?c:s,l=r.initialInputValue,d=void 0===l?"":l,p=r.initialSelectedItem,f=void 0===p?null:p,m=n.getState({highlightedIndex:a,isOpen:u,inputValue:d,selectedItem:f});return null!=m.selectedItem&&void 0===n.props.initialInputValue&&(m.inputValue=n.props.itemToString(m.selectedItem)),n.state=m,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,O(t,n);var o=r.prototype;return o.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},o.getState=function(e){return void 0===e&&(e=this.state),t=e,n=this.props,Object.keys(t).reduce((function(e,r){return e[r]=L(n,r)?n[r]:t[r],e}),{});var t,n},o.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},o.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},o.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},o.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=F(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},o.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,c=this.getRootProps,s=this.getToggleButtonProps,u=this.getLabelProps,l=this.getMenuProps,d=this.getInputProps,p=this.getItemProps,f=this.openMenu,m=this.closeMenu,b=this.toggleMenu,g=this.selectItem,h=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,O=this.clearSelection,w=this.clearItems;return{getRootProps:c,getToggleButtonProps:s,getLabelProps:u,getMenuProps:l,getInputProps:d,getItemProps:p,reset:this.reset,openMenu:f,closeMenu:m,toggleMenu:b,selectItem:g,selectItemAtIndex:h,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:O,clearItems:w,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},o.componentDidMount=function(){var e=this,t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!q(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=q(t.target,[e._rootNode,e._menuNode],e.props.environment,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},a=this.props.environment;a.addEventListener("mousedown",t),a.addEventListener("mouseup",n),a.addEventListener("touchstart",r),a.addEventListener("touchmove",o),a.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),a.removeEventListener("mousedown",t),a.removeEventListener("mouseup",n),a.removeEventListener("touchstart",r),a.removeEventListener("touchmove",o),a.removeEventListener("touchend",i)}},o.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},o.componentDidUpdate=function(e,t){L(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},o.componentWillUnmount=function(){this.cleanup()},o.render=function(){var e=N(this.props.children,C);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=N(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:function(e){return"string"==typeof e.type}(t)?Object(w.cloneElement)(t,this.getRootProps(function(e){return e.props}(t))):void 0:null},r}(w.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:D,itemToString:function(e){return null==e?"":String(e)},onStateChange:C,onInputValueChange:C,onUserAction:C,onChange:C,onSelect:C,onOuterClick:C,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:P},e.stateChangeTypes=G,e}();T((function(e,t){$(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?w.useLayoutEffect:w.useEffect;var ee={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:P,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};m.a.array.isRequired,m.a.func,m.a.func,m.a.func,m.a.bool,m.a.number,m.a.number,m.a.number,m.a.bool,m.a.bool,m.a.bool,m.a.any,m.a.any,m.a.any,m.a.string,m.a.string,m.a.string,m.a.func,m.a.string,m.a.func,m.a.func,m.a.func,m.a.func,m.a.func,m.a.shape({addEventListener:m.a.func,removeEventListener:m.a.func,document:m.a.shape({getElementById:m.a.func,activeElement:m.a.any,body:m.a.any})}),S(S({},ee),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),m.a.array.isRequired,m.a.func,m.a.func,m.a.func,m.a.bool,m.a.number,m.a.number,m.a.number,m.a.bool,m.a.bool,m.a.bool,m.a.any,m.a.any,m.a.any,m.a.string,m.a.string,m.a.string,m.a.string,m.a.string,m.a.string,m.a.func,m.a.string,m.a.string,m.a.func,m.a.func,m.a.func,m.a.func,m.a.func,m.a.func,m.a.shape({addEventListener:m.a.func,removeEventListener:m.a.func,document:m.a.shape({getElementById:m.a.func,activeElement:m.a.any,body:m.a.any})}),Object(v.a)({},ee,{getA11yStatusMessage:D,circularNavigation:!0}),m.a.array,m.a.array,m.a.array,m.a.func,m.a.func,m.a.func,m.a.number,m.a.number,m.a.number,m.a.func,m.a.func,m.a.string,m.a.string,m.a.shape({addEventListener:m.a.func,removeEventListener:m.a.func,document:m.a.shape({getElementById:m.a.func,activeElement:m.a.any,body:m.a.any})});var te=e=>{let{checked:t,getInputProps:n,inputRef:r,isDisabled:i,onFocus:a,onRemoveItem:c,placeholder:s,tabIndex:u,value:l}=e;return Object(o.createElement)("input",n({ref:r,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:i,onFocus:a,onKeyDown(e){"Backspace"===e.key&&!l&&t.length>0&&c(t[t.length-1])},placeholder:s,tabIndex:u}))},ne=e=>{let{children:t,onClick:n}=e;return Object(o.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:n},t)},re=e=>{let{checked:t,getItemProps:n,getMenuProps:r,highlightedIndex:a,options:c}=e;return Object(o.createElement)("ul",r({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),c.map((e,r)=>{const c=t.includes(e.value);return Object(o.createElement)("li",n({key:e.value,className:g()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":c,"is-highlighted":a===r}),index:r,item:e.value,"aria-label":c?Object(i.sprintf)( +/* translators: %s is referring to the filter option being removed. */ +Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)}))},oe=n(168),ie=e=>{let{onRemoveItem:t,option:n}=e;return Object(o.createElement)(oe.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:()=>{t(n.value)},ariaLabel:Object(i.sprintf)( +/* translators: %s is referring to the filter option being removed. */ +Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),n.name),text:n.label,radius:"large"})},ae=n(98),ce=n(163),se=e=>{let{onClick:t,onRemoveItem:n,option:r}=e;const a=Object(o.useRef)(null);return Object(o.useEffect)(()=>{a.current.focus()},[a]),Object(o.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(o.createElement)("button",{ref:a,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:e=>{e.stopPropagation(),t(r.value)},"aria-label":Object(i.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(i.__)("Replace current %s filter","woo-gutenberg-products-block"),r.name)},r.label),Object(o.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:()=>{n(r.value)},onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||n(r.value)},"aria-label":Object(i.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(i.__)("Remove %s filter","woo-gutenberg-products-block"),r.name)},Object(o.createElement)(ae.a,{srcElement:ce.a,size:16})))};n(183);var ue=e=>{let{attributeLabel:t="",className:n,checked:r=[],inputLabel:a="",isDisabled:c=!1,isLoading:s=!1,multiple:u=!1,onChange:l=(()=>{}),options:d=[]}=e;const p=Object(o.useRef)(null),f=g()(n,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":c,"is-loading":s}),m=Object(o.useCallback)((e,t)=>{switch(t.type){case Z.stateChangeTypes.keyDownEnter:case Z.stateChangeTypes.clickItem:return{...t,highlightedIndex:e.highlightedIndex,isOpen:u,inputValue:""};case Z.stateChangeTypes.blurInput:case Z.stateChangeTypes.mouseUp:return{...t,inputValue:e.inputValue};default:return t}},[u]);return Object(o.createElement)(Z,{onChange:l,selectedItem:null,stateReducer:m},e=>{let{getInputProps:n,getItemProps:s,getLabelProps:m,getMenuProps:b,highlightedIndex:h,inputValue:v,isOpen:y,openMenu:O}=e;return Object(o.createElement)("div",{className:g()(f,{"is-multiple":u,"is-single":!u,"has-checked":r.length>0,"is-open":y})},Object(o.createElement)("label",m({className:"screen-reader-text"}),a),Object(o.createElement)(ne,{isOpen:y,onClick:()=>p.current.focus()},r.map(e=>{const t=d.find(t=>t.value===e),n=e=>{l(e),p.current.focus()};return u?Object(o.createElement)(ie,{key:e,onRemoveItem:n,option:t}):Object(o.createElement)(se,{key:e,onClick:()=>p.current.focus(),onRemoveItem:n,option:t})}),Object(o.createElement)(te,{checked:r,getInputProps:n,inputRef:p,isDisabled:c,onFocus:O,onRemoveItem:e=>{l(e),p.current.focus()},placeholder:r.length>0&&u?null:Object(i.sprintf)( +/* translators: %s attribute name. */ +Object(i.__)("Any %s","woo-gutenberg-products-block"),t),tabIndex:!u&&r.length>0?"-1":"0",value:v})),y&&!c&&Object(o.createElement)(re,{checked:r,getItemProps:s,getMenuProps:b,highlightedIndex:h,options:d.filter(e=>!v||e.value.startsWith(v))}))})},le=n(55),de=n(72),pe=n(11),fe=n.n(pe),me=n(19),be=n(95),ge=n(104),he=n(105);const ve=[{value:"preview-1",name:"Blue",label:Object(o.createElement)(le.a,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(o.createElement)(le.a,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(o.createElement)(le.a,{name:"Red",count:2})}],ye={id:0,name:"preview",taxonomy:"preview",label:"Preview"};n(182);Object(r.a)({selector:".wp-block-woocommerce-attribute-filter",Block:e=>{let{attributes:t,isEditor:n=!1}=e;const r=t.isPreview&&!t.attributeId?ye:Object(ge.a)(t.attributeId),[f,m]=Object(o.useState)([]),[b,g]=Object(o.useState)(t.isPreview&&!t.attributeId?ve:[]),[h]=Object(u.a)(),[v,y]=Object(u.b)("attributes",[]),{results:O,isLoading:w}=Object(l.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[(null==r?void 0:r.id)||0],shouldSelect:t.attributeId>0}),j="dropdown"!==t.displayStyle&&"and"===t.queryType,{results:E,isLoading:I}=Object(d.a)({queryAttribute:{taxonomy:null==r?void 0:r.taxonomy,queryType:t.queryType},queryState:{...h,attributes:j?h.attributes:null}}),_=Object(o.useCallback)(e=>E.attribute_counts?E.attribute_counts.find(t=>{let{term:n}=t;return n===e}):null,[E]);Object(o.useEffect)(()=>{if(w||I)return;const e=O.map(e=>{const n=_(e.id);if(!(n||f.includes(e.slug)||(i=e.slug,null!=h&&h.attributes&&h.attributes.some(e=>{let{attribute:t,slug:n=[]}=e;return t===r.taxonomy&&n.includes(i)}))))return null;var i;const a=n?n.count:0;return{value:e.slug,name:Object(me.decodeEntities)(e.name),label:Object(o.createElement)(le.a,{name:Object(me.decodeEntities)(e.name),count:t.showCounts?a:null})}}).filter(Boolean);g(e)},[null==r?void 0:r.taxonomy,O,w,t.showCounts,I,_,f,h.attributes]);const S=Object(o.useCallback)(e=>O.reduce((t,n)=>(e.includes(n.slug)&&t.push(n),t),[]),[O]),k=Object(o.useCallback)(e=>{n||Object(he.b)(v,y,r,S(e),"or"===t.queryType?"in":"and")},[n,v,y,r,S,t.queryType]),x=Object(o.useMemo)(()=>v.filter(e=>{let{attribute:t}=e;return t===(null==r?void 0:r.taxonomy)}).flatMap(e=>{let{slug:t}=e;return t}),[v,null==r?void 0:r.taxonomy]),C=Object(c.a)(x),P=Object(s.a)(C);Object(o.useEffect)(()=>{fe()(P,C)||fe()(f,C)||(m(C),t.showFilterButton||k(C))},[f,C,P,k,t.showFilterButton]);const R="dropdown"!==t.displayStyle||"or"===t.queryType,T=Object(o.useCallback)(e=>{const n=e=>{const{name:t}=b.find(t=>t.value===e);return t},r=e=>{let{filterAdded:t,filterRemoved:r}=e;const o=t?n(t):null,c=r?n(r):null;o&&c?Object(a.speak)(Object(i.sprintf)( +/* translators: %1$s and %2$s are attribute terms (for example: 'red', 'blue', 'large'...). */ +Object(i.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,c)):o?Object(a.speak)(Object(i.sprintf)( +/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */ +Object(i.__)("%s filter added.","woo-gutenberg-products-block"),o)):c&&Object(a.speak)(Object(i.sprintf)( +/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */ +Object(i.__)("%s filter removed.","woo-gutenberg-products-block"),c))},o=f.includes(e);let c;R?(c=f.filter(t=>t!==e),o?r({filterRemoved:e}):(c.push(e),c.sort(),r({filterAdded:e}))):(c=o?[]:[e],r({filterAdded:o?null:e,filterRemoved:1===f.length?f[0]:null})),m(c),t.showFilterButton||k(c)},[f,b,R,k,t.showFilterButton]);if(!r)return n?Object(o.createElement)(be.Notice,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(i.__)("Please select an attribute to use this filter!","woo-gutenberg-products-block"))):null;if(0===b.length&&!w)return n?Object(o.createElement)(be.Notice,{status:"warning",isDismissible:!1},Object(o.createElement)("p",null,Object(i.__)("The selected attribute does not have any term assigned to products.","woo-gutenberg-products-block"))):null;const M="h"+t.headingLevel,A=!t.isPreview&&w,D=!t.isPreview&&I;return Object(o.createElement)(o.Fragment,null,!n&&t.heading&&b.length>0&&Object(o.createElement)(M,{className:"wc-block-attribute-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-attribute-filter style-"+t.displayStyle},"dropdown"===t.displayStyle?Object(o.createElement)(ue,{attributeLabel:r.label,checked:f,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:A,multiple:R,onChange:T,options:b}):Object(o.createElement)(p.a,{className:"wc-block-attribute-filter-list",options:b,checked:f,onChange:T,isLoading:A,isDisabled:D}),t.showFilterButton&&Object(o.createElement)(de.a,{className:"wc-block-attribute-filter__button",disabled:A||D,onClick:()=>k(f)})))},getProps:e=>({isEditor:!1,attributes:{attributeId:parseInt(e.dataset.attributeId||0,10),showCounts:"true"===e.dataset.showCounts,queryType:e.dataset.queryType,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,displayStyle:e.dataset.displayStyle,showFilterButton:"true"===e.dataset.showFilterButton}})})}]); \ No newline at end of file diff --git a/build/attribute-filter.asset.php b/build/attribute-filter.asset.php new file mode 100644 index 00000000000..3cfc748c97a --- /dev/null +++ b/build/attribute-filter.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'be215eb669cf100a8355355cafd27e43'); \ No newline at end of file diff --git a/build/attribute-filter.js b/build/attribute-filter.js new file mode 100644 index 00000000000..4d54479d1ee --- /dev/null +++ b/build/attribute-filter.js @@ -0,0 +1,40 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["attribute-filter"]=function(e){function t(t){for(var n,l,a=t[0],s=t[1],i=t[2],b=0,d=[];b{let{className:t,headingLevel:c,onChange:r,heading:a,instanceId:s}=e;const i="h"+c;return Object(n.createElement)(i,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+s},Object(l.__)("Block title","woo-gutenberg-products-block")),Object(n.createElement)(o.PlainText,{id:"block-title-"+s,className:"wc-block-editor-components-title",value:a,onChange:r}))})},108:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(8);function o(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},113:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(16),o=c(13),r=c(0),l=c(40),a=c(93);const s=e=>{const{namespace:t,resourceName:c,resourceValues:s=[],query:i={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(r.useRef)({results:[],isLoading:!0}),d=Object(l.a)(i),m=Object(l.a)(s),p=Object(a.a)(),g=Object(o.useSelect)(e=>{if(!u)return null;const o=e(n.COLLECTIONS_STORE_KEY),r=[t,c,d,m],l=o.getCollectionError(...r);return l&&p(l),{results:o.getCollection(...r),isLoading:!o.hasFinishedResolution("getCollection",r)}},[t,c,m,d,u]);return null!==g&&(b.current=g),b.current}},12:function(e,t){e.exports=window.wp.blocks},120:function(e,t,c){"use strict";var n=c(0),o=c(18);const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=r},13:function(e,t){e.exports=window.wp.data},133:function(e,t,c){"use strict";var n=c(0),o=c(1),r=(c(10),c(4)),l=c.n(r),a=c(30);c(169);const s=e=>{let{className:t,disabled:c,label: +/* translators: Submit button text for filters. */ +r=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:s,screenReaderLabel:i=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:l()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:c,onClick:s},Object(n.createElement)(a.a,{label:r,screenReaderLabel:i}))};s.defaultProps={disabled:!1},t.a=s},14:function(e,t){e.exports=window.wp.htmlEntities},143:function(e,t){},144:function(e,t){},16:function(e,t){e.exports=window.wc.wcBlocksData},169:function(e,t){},17:function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"c",(function(){return s})),c.d(t,"d",(function(){return i})),c.d(t,"b",(function(){return u}));var n=c(0),o=c(6),r=c(1);const l={clear:Object(r.__)("Clear all selected items","woo-gutenberg-products-block"),noItems:Object(r.__)("No items found.","woo-gutenberg-products-block"), +/* Translators: %s search term */ +noResults:Object(r.__)("No results for %s","woo-gutenberg-products-block"),search:Object(r.__)("Search for items","woo-gutenberg-products-block"),selected:e=>Object(r.sprintf)( +/* translators: Number of items selected from list. */ +Object(r._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(r.__)("Search results updated.","woo-gutenberg-products-block")},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(o.groupBy)(e,"parent"),n=Object(o.keyBy)(t,"id"),r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=r(n[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:r(n[e.parent]),children:t&&t.length?l(t):[]}}),a=l(c[0]||[]);return delete c[0],Object(o.forEach)(c,e=>{a.push(...l(e||[]))}),a},s=(e,t,c)=>{if(!t)return c?a(e):e;const n=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),o=e.map(e=>!!n.test(e.name)&&e).filter(Boolean);return c?a(o,e):o},i=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(n.createElement)(n.Fragment,{key:c},Object(n.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},175:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return l}));var n=c(2);const o=Object(n.getSetting)("attributes",[]).reduce((e,t)=>{const c=(n=t)&&n.attribute_name?{id:parseInt(n.attribute_id,10),name:n.attribute_name,taxonomy:"pa_"+n.attribute_name,label:n.attribute_label}:null;var n;return c.id&&e.push(c),e},[]),r=e=>{if(e)return o.find(t=>t.id===e)},l=e=>{if(e)return o.find(t=>t.taxonomy===e)}},176:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return r}));var n=c(6);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"";const r=e.filter(e=>e.attribute===c.taxonomy),l=r.length?r[0]:null;if(!(l&&l.slug&&Array.isArray(l.slug)&&l.slug.includes(o)))return;const a=l.slug.filter(e=>e!==o),s=e.filter(e=>e.attribute!==c.taxonomy);a.length>0&&(l.slug=a.sort(),s.push(l)),t(Object(n.sortBy)(s,"attribute"))},r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},c=arguments.length>2?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"in";const l=e.filter(e=>e.attribute!==c.taxonomy);0===o.length?t(l):(l.push({attribute:c.taxonomy,operator:r,slug:o.map(e=>{let{slug:t}=e;return t}).sort()}),t(Object(n.sortBy)(l,"attribute")))}},177:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(4),l=c.n(r);c(209),t.a=e=>{let{className:t,onChange:c=(()=>{}),options:r=[],checked:a=[],isLoading:s=!1,isDisabled:i=!1,limit:u=10}=e;const[b,d]=Object(n.useState)(!1),m=Object(n.useMemo)(()=>[...Array(5)].map((e,t)=>Object(n.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),p=Object(n.useMemo)(()=>{const e=r.length-u;return!b&&Object(n.createElement)("li",{key:"show-more",className:"show-more"},Object(n.createElement)("button",{onClick:()=>{d(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)( +/* translators: %s is referring the remaining count of options */ +Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)( +/* translators: %s number of options to reveal. */ +Object(o._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[r,u,b]),g=Object(n.useMemo)(()=>b&&Object(n.createElement)("li",{key:"show-less",className:"show-less"},Object(n.createElement)("button",{onClick:()=>{d(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woo-gutenberg-products-block")},Object(o.__)("Show less","woo-gutenberg-products-block"))),[b]),O=Object(n.useMemo)(()=>{const e=r.length>u+5;return Object(n.createElement)(n.Fragment,null,r.map((t,o)=>Object(n.createElement)(n.Fragment,{key:t.value},Object(n.createElement)("li",e&&!b&&o>=u&&{hidden:!0},Object(n.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{c(e.target.value)},checked:a.includes(t.value),disabled:i}),Object(n.createElement)("label",{htmlFor:t.value},t.label)),e&&o===u-1&&p)),e&&g)},[r,c,a,b,u,g,p,i]),h=l()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":s},t);return Object(n.createElement)("ul",{className:h},s?m:O)}},18:function(e,t){e.exports=window.wp.primitives},185:function(e,t,c){"use strict";var n=c(5),o=c.n(n),r=c(0),l=c(4),a=c.n(l),s=c(1),i=c(43),u=c(208);c(144);var b=e=>{let{text:t,screenReaderText:c="",element:n="li",className:l="",radius:s="small",children:i=null,...u}=e;const b=n,d=a()(l,"wc-block-components-chip","wc-block-components-chip--radius-"+s),m=Boolean(c&&c!==t);return Object(r.createElement)(b,o()({className:d},u),Object(r.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(r.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:n=!1,onRemove:l=(()=>{}),removeOnAnyClick:d=!1,text:m,screenReaderText:p="",...g}=e;const O=d?"span":"button";if(!t){const e=p&&"string"==typeof p?p:m;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(s.__)("Remove","woo-gutenberg-products-block"):Object(s.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(s.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const h={"aria-label":t,disabled:n,onClick:l,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||l()}},j=d?h:{},w=d?{"aria-hidden":!0}:h;return Object(r.createElement)(b,o()({},g,j,{className:a()(c,"is-removable"),element:d?"button":g.element,screenReaderText:p,text:m}),Object(r.createElement)(O,o()({className:"wc-block-components-chip__remove"},w),Object(r.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},2:function(e,t){e.exports=window.wc.wcSettings},207:function(e,t){},208:function(e,t,c){"use strict";var n=c(5),o=c.n(n),r=c(0),l=c(18);const a=Object(r.createElement)(e=>{let{className:t,size:c,...n}=e;return Object(r.createElement)(l.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},n),Object(r.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},209:function(e,t){},26:function(e,t){e.exports=window.wp.isShallowEqual},267:function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var n=c(0),o=c(243),r=c(6),l=c(40),a=c(71),s=c(113),i=c(48);const u=e=>{let{queryAttribute:t,queryPrices:c,queryStock:u,queryState:b}=e,d=Object(i.a)();d+="-collection-data";const[m]=Object(a.a)(d),[p,g]=Object(a.b)("calculate_attribute_counts",[],d),[O,h]=Object(a.b)("calculate_price_range",null,d),[j,w]=Object(a.b)("calculate_stock_status_counts",null,d),_=Object(l.a)(t||{}),f=Object(l.a)(c),v=Object(l.a)(u);Object(n.useEffect)(()=>{"object"==typeof _&&Object.keys(_).length&&(p.find(e=>e.taxonomy===_.taxonomy)||g([...p,_]))},[_,p,g]),Object(n.useEffect)(()=>{O!==f&&void 0!==f&&h(f)},[f,h,O]),Object(n.useEffect)(()=>{j!==v&&void 0!==v&&w(v)},[v,w,j]);const[k,E]=Object(n.useState)(!1),[y]=Object(o.a)(k,200);k||E(!0);const C=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(r.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:c}=e;return{taxonomy:t,query_type:c}}),["taxonomy","query_type"])),t})(m),[m]);return Object(s.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...C},shouldSelect:y})}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,c){"use strict";var n=c(0),o=c(4),r=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:l,wrapperProps:a={}}=e;const s=null!=c,i=null!=o;return!s&&i?(t=l||"span",a={...a,className:r()(a.className,"screen-reader-text")},Object(n.createElement)(t,a,o)):(t=l||n.Fragment,s&&i&&c!==o?Object(n.createElement)(t,a,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,a,c))}},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(5),o=c.n(n),r=c(0),l=c(17);const a=e=>{let{countLabel:t,className:c,depth:n=0,controlId:a="",item:s,isSelected:i,isSingle:u,onSelect:b,search:d="",...m}=e;const p=null!=t&&void 0!==s.count&&null!==s.count,g=[c,"woocommerce-search-list__item"];g.push("depth-"+n),u&&g.push("is-radio-button"),p&&g.push("has-count");const O=s.breadcrumbs&&s.breadcrumbs.length,h=m.name||"search-list-item-"+a,j=`${h}-${s.id}`;return Object(r.createElement)("label",{htmlFor:j,className:g.join(" ")},u?Object(r.createElement)("input",o()({type:"radio",id:j,name:h,value:s.value,onChange:b(s),checked:i,className:"woocommerce-search-list__item-input"},m)):Object(r.createElement)("input",o()({type:"checkbox",id:j,name:h,value:s.value,onChange:b(s),checked:i,className:"woocommerce-search-list__item-input"},m)),Object(r.createElement)("span",{className:"woocommerce-search-list__item-label"},O?Object(r.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(s.breadcrumbs)):null,Object(r.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(s.name,d))),!!p&&Object(r.createElement)("span",{className:"woocommerce-search-list__item-count"},t||s.count))};t.b=a},367:function(e,t,c){e.exports=c(437)},368:function(e,t,c){"use strict";var n=c(0),o=c(18);const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"}));t.a=r},369:function(e,t){},370:function(e,t){},371:function(e,t){},40:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(0),o=c(26),r=c.n(o);function l(e){const t=Object(n.useRef)(e);return r()(e,t.current)||(t.current=e),t.current}},43:function(e,t,c){"use strict";var n=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:c,height:c,...o}):null}},437:function(e,t,c){"use strict";c.r(t);var n=c(5),o=c.n(n),r=c(0),l=c(1),a=c(12),s=c(43),i=c(368),u=c(4),b=c.n(u),d=c(7),m=c(3),p=c(120),g=c(86),O=c(6),h=c(2),j=c(89),w=c(106),_=c(55),f=c(46),v=c(40),k=c(108),E=c(71),y=c(113),C=c(267),x=c(177),S=(c(10),c(154)),N=e=>{let{checked:t,getInputProps:c,inputRef:n,isDisabled:o,onFocus:l,onRemoveItem:a,placeholder:s,tabIndex:i,value:u}=e;return Object(r.createElement)("input",c({ref:n,className:"wc-block-dropdown-selector__input wc-block-components-dropdown-selector__input",disabled:o,onFocus:l,onKeyDown(e){"Backspace"===e.key&&!u&&t.length>0&&a(t[t.length-1])},placeholder:s,tabIndex:i}))},I=e=>{let{children:t,onClick:c}=e;return Object(r.createElement)("div",{className:"wc-block-dropdown-selector__input-wrapper wc-block-components-dropdown-selector__input-wrapper",onClick:c},t)},P=e=>{let{checked:t,getItemProps:c,getMenuProps:n,highlightedIndex:o,options:a}=e;return Object(r.createElement)("ul",n({className:"wc-block-dropdown-selector__list wc-block-components-dropdown-selector__list"}),a.map((e,n)=>{const a=t.includes(e.value);return Object(r.createElement)("li",c({key:e.value,className:b()("wc-block-dropdown-selector__list-item","wc-block-components-dropdown-selector__list-item",{"is-selected":a,"is-highlighted":o===n}),index:n,item:e.value,"aria-label":a?Object(l.sprintf)( +/* translators: %s is referring to the filter option being removed. */ +Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),e.name):null}),e.label)}))},R=c(185),L=e=>{let{onRemoveItem:t,option:c}=e;return Object(r.createElement)(R.a,{className:"wc-block-dropdown-selector__selected-chip wc-block-components-dropdown-selector__selected-chip",removeOnAnyClick:!0,onRemove:()=>{t(c.value)},ariaLabel:Object(l.sprintf)( +/* translators: %s is referring to the filter option being removed. */ +Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),c.name),text:c.label,radius:"large"})},B=c(208),T=e=>{let{onClick:t,onRemoveItem:c,option:n}=e;const o=Object(r.useRef)(null);return Object(r.useEffect)(()=>{o.current.focus()},[o]),Object(r.createElement)("div",{className:"wc-block-dropdown-selector__selected-value wc-block-components-dropdown-selector__selected-value"},Object(r.createElement)("button",{ref:o,className:"wc-block-dropdown-selector__selected-value__label wc-block-components-dropdown-selector__selected-value__label",onClick:e=>{e.stopPropagation(),t(n.value)},"aria-label":Object(l.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(l.__)("Replace current %s filter","woo-gutenberg-products-block"),n.name)},n.label),Object(r.createElement)("button",{className:"wc-block-dropdown-selector__selected-value__remove wc-block-components-dropdown-selector__selected-value__remove",onClick:()=>{c(n.value)},onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||c(n.value)},"aria-label":Object(l.sprintf)( +/* translators: %s attribute value used in the filter. For example: yellow, green, small, large. */ +Object(l.__)("Remove %s filter","woo-gutenberg-products-block"),n.name)},Object(r.createElement)(s.a,{srcElement:B.a,size:16})))};c(371);var F=e=>{let{attributeLabel:t="",className:c,checked:n=[],inputLabel:o="",isDisabled:a=!1,isLoading:s=!1,multiple:i=!1,onChange:u=(()=>{}),options:d=[]}=e;const m=Object(r.useRef)(null),p=b()(c,"wc-block-dropdown-selector","wc-block-components-dropdown-selector",{"is-disabled":a,"is-loading":s}),g=Object(r.useCallback)((e,t)=>{switch(t.type){case S.a.stateChangeTypes.keyDownEnter:case S.a.stateChangeTypes.clickItem:return{...t,highlightedIndex:e.highlightedIndex,isOpen:i,inputValue:""};case S.a.stateChangeTypes.blurInput:case S.a.stateChangeTypes.mouseUp:return{...t,inputValue:e.inputValue};default:return t}},[i]);return Object(r.createElement)(S.a,{onChange:u,selectedItem:null,stateReducer:g},e=>{let{getInputProps:c,getItemProps:s,getLabelProps:g,getMenuProps:O,highlightedIndex:h,inputValue:j,isOpen:w,openMenu:_}=e;return Object(r.createElement)("div",{className:b()(p,{"is-multiple":i,"is-single":!i,"has-checked":n.length>0,"is-open":w})},Object(r.createElement)("label",g({className:"screen-reader-text"}),o),Object(r.createElement)(I,{isOpen:w,onClick:()=>m.current.focus()},n.map(e=>{const t=d.find(t=>t.value===e),c=e=>{u(e),m.current.focus()};return i?Object(r.createElement)(L,{key:e,onRemoveItem:c,option:t}):Object(r.createElement)(T,{key:e,onClick:()=>m.current.focus(),onRemoveItem:c,option:t})}),Object(r.createElement)(N,{checked:n,getInputProps:c,inputRef:m,isDisabled:a,onFocus:_,onRemoveItem:e=>{u(e),m.current.focus()},placeholder:n.length>0&&i?null:Object(l.sprintf)( +/* translators: %s attribute name. */ +Object(l.__)("Any %s","woo-gutenberg-products-block"),t),tabIndex:!i&&n.length>0?"-1":"0",value:j})),w&&!a&&Object(r.createElement)(P,{checked:n,getItemProps:s,getMenuProps:O,highlightedIndex:h,options:d.filter(e=>!j||e.value.startsWith(j))}))})},M=c(95),V=c(133),A=c(26),H=c.n(A),z=c(14),q=c(175),D=c(176);const G=[{value:"preview-1",name:"Blue",label:Object(r.createElement)(M.a,{name:"Blue",count:3})},{value:"preview-2",name:"Green",label:Object(r.createElement)(M.a,{name:"Green",count:3})},{value:"preview-3",name:"Red",label:Object(r.createElement)(M.a,{name:"Red",count:2})}],Y={id:0,name:"preview",taxonomy:"preview",label:"Preview"};c(370);var $=e=>{let{attributes:t,isEditor:c=!1}=e;const n=t.isPreview&&!t.attributeId?Y:Object(q.a)(t.attributeId),[o,a]=Object(r.useState)([]),[s,i]=Object(r.useState)(t.isPreview&&!t.attributeId?G:[]),[u]=Object(E.a)(),[b,d]=Object(E.b)("attributes",[]),{results:p,isLoading:g}=Object(y.a)({namespace:"/wc/store",resourceName:"products/attributes/terms",resourceValues:[(null==n?void 0:n.id)||0],shouldSelect:t.attributeId>0}),O="dropdown"!==t.displayStyle&&"and"===t.queryType,{results:h,isLoading:j}=Object(C.a)({queryAttribute:{taxonomy:null==n?void 0:n.taxonomy,queryType:t.queryType},queryState:{...u,attributes:O?u.attributes:null}}),w=Object(r.useCallback)(e=>h.attribute_counts?h.attribute_counts.find(t=>{let{term:c}=t;return c===e}):null,[h]);Object(r.useEffect)(()=>{if(g||j)return;const e=p.map(e=>{const c=w(e.id);if(!(c||o.includes(e.slug)||(l=e.slug,null!=u&&u.attributes&&u.attributes.some(e=>{let{attribute:t,slug:c=[]}=e;return t===n.taxonomy&&c.includes(l)}))))return null;var l;const a=c?c.count:0;return{value:e.slug,name:Object(z.decodeEntities)(e.name),label:Object(r.createElement)(M.a,{name:Object(z.decodeEntities)(e.name),count:t.showCounts?a:null})}}).filter(Boolean);i(e)},[null==n?void 0:n.taxonomy,p,g,t.showCounts,j,w,o,u.attributes]);const _=Object(r.useCallback)(e=>p.reduce((t,c)=>(e.includes(c.slug)&&t.push(c),t),[]),[p]),S=Object(r.useCallback)(e=>{c||Object(D.b)(b,d,n,_(e),"or"===t.queryType?"in":"and")},[c,b,d,n,_,t.queryType]),N=Object(r.useMemo)(()=>b.filter(e=>{let{attribute:t}=e;return t===(null==n?void 0:n.taxonomy)}).flatMap(e=>{let{slug:t}=e;return t}),[b,null==n?void 0:n.taxonomy]),I=Object(v.a)(N),P=Object(k.a)(I);Object(r.useEffect)(()=>{H()(P,I)||H()(o,I)||(a(I),t.showFilterButton||S(I))},[o,I,P,S,t.showFilterButton]);const R="dropdown"!==t.displayStyle||"or"===t.queryType,L=Object(r.useCallback)(e=>{const c=e=>{const{name:t}=s.find(t=>t.value===e);return t},n=e=>{let{filterAdded:t,filterRemoved:n}=e;const o=t?c(t):null,r=n?c(n):null;o&&r?Object(f.speak)(Object(l.sprintf)( +/* translators: %1$s and %2$s are attribute terms (for example: 'red', 'blue', 'large'...). */ +Object(l.__)("%1$s filter replaced with %2$s.","woo-gutenberg-products-block"),o,r)):o?Object(f.speak)(Object(l.sprintf)( +/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */ +Object(l.__)("%s filter added.","woo-gutenberg-products-block"),o)):r&&Object(f.speak)(Object(l.sprintf)( +/* translators: %s attribute term (for example: 'red', 'blue', 'large'...) */ +Object(l.__)("%s filter removed.","woo-gutenberg-products-block"),r))},r=o.includes(e);let i;R?(i=o.filter(t=>t!==e),r?n({filterRemoved:e}):(i.push(e),i.sort(),n({filterAdded:e}))):(i=r?[]:[e],n({filterAdded:r?null:e,filterRemoved:1===o.length?o[0]:null})),a(i),t.showFilterButton||S(i)},[o,s,R,S,t.showFilterButton]);if(!n)return c?Object(r.createElement)(m.Notice,{status:"warning",isDismissible:!1},Object(r.createElement)("p",null,Object(l.__)("Please select an attribute to use this filter!","woo-gutenberg-products-block"))):null;if(0===s.length&&!g)return c?Object(r.createElement)(m.Notice,{status:"warning",isDismissible:!1},Object(r.createElement)("p",null,Object(l.__)("The selected attribute does not have any term assigned to products.","woo-gutenberg-products-block"))):null;const B="h"+t.headingLevel,T=!t.isPreview&&g,A=!t.isPreview&&j;return Object(r.createElement)(r.Fragment,null,!c&&t.heading&&s.length>0&&Object(r.createElement)(B,{className:"wc-block-attribute-filter__title"},t.heading),Object(r.createElement)("div",{className:"wc-block-attribute-filter style-"+t.displayStyle},"dropdown"===t.displayStyle?Object(r.createElement)(F,{attributeLabel:n.label,checked:o,className:"wc-block-attribute-filter-dropdown",inputLabel:t.heading,isLoading:T,multiple:R,onChange:L,options:s}):Object(r.createElement)(x.a,{className:"wc-block-attribute-filter-list",options:s,checked:o,onChange:L,isLoading:T,isDisabled:A}),t.showFilterButton&&Object(r.createElement)(V.a,{className:"wc-block-attribute-filter__button",disabled:T||A,onClick:()=>S(o)})))};c(369);const K=Object(h.getSetting)("attributes",[]);var Q=Object(m.withSpokenMessages)(e=>{let{attributes:t,setAttributes:c,debouncedSpeak:n}=e;const{attributeId:o,className:a,displayStyle:u,heading:f,headingLevel:v,isPreview:k,queryType:E,showCounts:y,showFilterButton:C}=t,[x,S]=Object(r.useState)(!o&&!k),N=e=>{if(!e||!e.length)return;const t=e[0].id,n=K.find(e=>e.attribute_id===t.toString());if(!n||o===t)return;const r=n.attribute_label;c({attributeId:t,heading:Object(l.sprintf)( +/* translators: %s attribute name. */ +Object(l.__)("Filter by %s","woo-gutenberg-products-block"),r)})},I=e=>{let{isCompact:t}=e;const c={clear:Object(l.__)("Clear selected attribute","woo-gutenberg-products-block"),list:Object(l.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(l.__)("Search for a product attribute:","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)( +/* translators: %d is the number of attributes selected. */ +Object(l._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Product attribute search results updated.","woo-gutenberg-products-block")},n=Object(O.sortBy)(Object(O.toArray)(Object(O.mapValues)(K,e=>({id:parseInt(e.attribute_id,10),name:e.attribute_label}))),"name");return Object(r.createElement)(g.a,{className:"woocommerce-product-attributes",list:n,selected:n.filter(e=>{let{id:t}=e;return t===o}),onChange:N,messages:c,isSingle:!0,isCompact:t})};return 0===Object.keys(K).length?Object(r.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(r.createElement)(s.a,{srcElement:i.a}),label:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(l.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(r.createElement)("p",null,Object(l.__)("Attributes are needed for filtering your products. You haven't created any attributes yet.","woo-gutenberg-products-block")),Object(r.createElement)(m.Button,{className:"wc-block-attribute-filter__add-attribute-button",isSecondary:!0,href:Object(h.getAdminLink)("edit.php?post_type=product&page=product_attributes")},Object(l.__)("Add new attribute","woo-gutenberg-products-block")+" ",Object(r.createElement)(s.a,{srcElement:p.a})),Object(r.createElement)(m.Button,{className:"wc-block-attribute-filter__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-product-taxonomies/"},Object(l.__)("Learn more","woo-gutenberg-products-block"))):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(d.BlockControls,null,Object(r.createElement)(m.ToolbarGroup,{controls:[{icon:"edit",title:Object(l.__)("Edit","woo-gutenberg-products-block"),onClick:()=>S(!x),isActive:x}]})),Object(r.createElement)(d.InspectorControls,{key:"inspector"},Object(r.createElement)(m.PanelBody,{title:Object(l.__)("Content","woo-gutenberg-products-block")},Object(r.createElement)(m.ToggleControl,{label:Object(l.__)("Product count","woo-gutenberg-products-block"),help:y?Object(l.__)("Product count is visible.","woo-gutenberg-products-block"):Object(l.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:y,onChange:()=>c({showCounts:!y})}),Object(r.createElement)("p",null,Object(l.__)("Heading Level","woo-gutenberg-products-block")),Object(r.createElement)(j.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:v,onChange:e=>c({headingLevel:e})})),Object(r.createElement)(m.PanelBody,{title:Object(l.__)("Block Settings","woo-gutenberg-products-block")},Object(r.createElement)(_.a,{label:Object(l.__)("Query Type","woo-gutenberg-products-block"),help:"and"===E?Object(l.__)("Products that have all of the selected attributes will be shown.","woo-gutenberg-products-block"):Object(l.__)("Products that have any of the selected attributes will be shown.","woo-gutenberg-products-block"),value:E,options:[{label:Object(l.__)("And","woo-gutenberg-products-block"),value:"and"},{label:Object(l.__)("Or","woo-gutenberg-products-block"),value:"or"}],onChange:e=>c({queryType:e})}),Object(r.createElement)(_.a,{label:Object(l.__)("Display Style","woo-gutenberg-products-block"),value:u,options:[{label:Object(l.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(l.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:e=>c({displayStyle:e})}),Object(r.createElement)(m.ToggleControl,{label:Object(l.__)("Filter button","woo-gutenberg-products-block"),help:C?Object(l.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(l.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:C,onChange:e=>c({showFilterButton:e})})),Object(r.createElement)(m.PanelBody,{title:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),initialOpen:!1},I({isCompact:!0}))),x?Object(r.createElement)(m.Placeholder,{className:"wc-block-attribute-filter",icon:Object(r.createElement)(s.a,{srcElement:i.a}),label:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),instructions:Object(l.__)("Display a list of filters based on a chosen attribute.","woo-gutenberg-products-block")},Object(r.createElement)("div",{className:"wc-block-attribute-filter__selection"},I({isCompact:!1}),Object(r.createElement)(m.Button,{isPrimary:!0,onClick:()=>{S(!1),n(Object(l.__)("Showing Filter Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(l.__)("Done","woo-gutenberg-products-block")))):Object(r.createElement)("div",{className:b()(a,"wc-block-attribute-filter")},Object(r.createElement)(w.a,{className:"wc-block-attribute-filter__title",headingLevel:v,heading:f,onChange:e=>c({heading:e})}),Object(r.createElement)(m.Disabled,null,Object(r.createElement)($,{attributes:t,isEditor:!0}))))});Object(a.registerBlockType)("woocommerce/attribute-filter",{title:Object(l.__)("Filter Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(s.a,{srcElement:i.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(l.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(l.__)("Allow customers to filter the grid by product attribute, such as color. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1},example:{attributes:{isPreview:!0}},attributes:{attributeId:{type:"number",default:0},showCounts:{type:"boolean",default:!0},queryType:{type:"string",default:"or"},heading:{type:"string",default:Object(l.__)("Filter by attribute","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},displayStyle:{type:"string",default:"list"},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:Q,save(e){let{attributes:t}=e;const{className:c,showCounts:n,queryType:l,attributeId:a,heading:s,headingLevel:i,displayStyle:u,showFilterButton:d}=t,m={"data-attribute-id":a,"data-show-counts":n,"data-query-type":l,"data-heading":s,"data-heading-level":i};return"list"!==u&&(m["data-display-style"]=u),d&&(m["data-show-filter-button"]=d),Object(r.createElement)("div",o()({className:b()("is-loading",c)},m),Object(r.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-attribute-filter__placeholder"}))}})},46:function(e,t){e.exports=window.wp.a11y},48:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const o=Object(n.createContext)("page"),r=()=>Object(n.useContext)(o);o.Provider},55:function(e,t,c){"use strict";var n=c(5),o=c.n(n),r=c(0),l=c(6),a=c(4),s=c.n(a),i=c(3),u=c(9);c(82);class b extends r.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:c,className:n,help:a,options:u,value:b}=this.props,d="inspector-toggle-button-control-"+c;let m;return a&&(m=Object(l.isFunction)(a)?a(t):a),Object(r.createElement)(i.BaseControl,{id:d,help:m,className:s()("components-toggle-button-control",n)},Object(r.createElement)("label",{id:d+"__label",htmlFor:d,className:"components-toggle-button-control__label"},e),Object(r.createElement)(i.ButtonGroup,{"aria-labelledby":d+"__label"},u.map((t,c)=>{const n={};return b===t.value?(n.isPrimary=!0,n["aria-pressed"]=!0):(n.isSecondary=!0,n["aria-pressed"]=!1),Object(r.createElement)(i.Button,o()({key:`${t.label}-${t.value}-${c}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},n),t.label)})))}}t.a=Object(u.withInstanceId)(b)},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},71:function(e,t,c){"use strict";c.d(t,"a",(function(){return b})),c.d(t,"b",(function(){return d})),c.d(t,"c",(function(){return m}));var n=c(16),o=c(13),r=c(0),l=c(26),a=c.n(l),s=c(40),i=c(108),u=c(48);const b=e=>{const t=Object(u.a)();e=e||t;const c=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:l}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(r.useCallback)(t=>{l(e,t)},[e,l])]},d=(e,t,c)=>{const l=Object(u.a)();c=c||l;const a=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[a,Object(r.useCallback)(t=>{s(c,e,t)},[c,e,s])]},m=(e,t)=>{const c=Object(u.a)();t=t||c;const[n,o]=b(t),l=Object(s.a)(n),d=Object(s.a)(e),m=Object(i.a)(d),p=Object(r.useRef)(!1);return Object(r.useEffect)(()=>{a()(m,d)||(o(Object.assign({},l,d)),p.current=!0)},[l,d,m,o]),p.current?[n,o]:[e,o]}},8:function(e,t){e.exports=window.React},82:function(e,t){},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var n=c(5),o=c.n(n),r=c(0),l=c(1),a=c(3),s=c(478),i=c(480),u=c(4),b=c.n(u),d=c(9),m=c(17),p=c(34),g=c(479),O=c(14);const h=e=>{let{id:t,label:c,popoverContents:n,remove:o,screenReaderLabel:i,className:u=""}=e;const[m,p]=Object(r.useState)(!1),j=Object(d.useInstanceId)(h);if(i=i||c,!c)return null;c=Object(O.decodeEntities)(c);const w=b()("woocommerce-tag",u,{"has-remove":!!o}),_="woocommerce-tag__label-"+j,f=Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},i),Object(r.createElement)("span",{"aria-hidden":"true"},c));return Object(r.createElement)("span",{className:w},n?Object(r.createElement)(a.Button,{className:"woocommerce-tag__text",id:_,onClick:()=>p(!0)},f):Object(r.createElement)("span",{className:"woocommerce-tag__text",id:_},f),n&&m&&Object(r.createElement)(a.Popover,{onClose:()=>p(!1)},n),o&&Object(r.createElement)(a.Button,{className:"woocommerce-tag__remove",onClick:o(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":_},Object(r.createElement)(s.a,{icon:g.a,size:20,className:"clear-icon"})))};var j=h;const w=e=>Object(r.createElement)(p.b,e),_=e=>{const{list:t,selected:c,renderItem:n,depth:l=0,onSelect:a,instanceId:s,isSingle:i,search:u}=e;return t?Object(r.createElement)(r.Fragment,null,t.map(t=>{const b=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(r.createElement)(r.Fragment,{key:t.id},Object(r.createElement)("li",null,n({item:t,isSelected:b,onSelect:a,isSingle:i,search:u,depth:l,controlId:s})),Object(r.createElement)(_,o()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:n,messages:o,onChange:s,onRemove:i}=e;if(t||c||!n)return null;const u=n.length;return Object(r.createElement)("div",{className:"woocommerce-search-list__selected"},Object(r.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(r.createElement)("strong",null,o.selected(u)),u>0?Object(r.createElement)(a.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":o.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(r.createElement)("ul",null,n.map((e,t)=>Object(r.createElement)("li",{key:t},Object(r.createElement)(j,{label:e.name,id:e.id,remove:i})))):null)},v=e=>{let{filteredList:t,search:c,onSelect:n,instanceId:o,...a}=e;const{messages:u,renderItem:b,selected:d,isSingle:m}=a,p=b||w;return 0===t.length?Object(r.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(r.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(r.createElement)(s.a,{icon:i.a})),Object(r.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(r.createElement)("ul",{className:"woocommerce-search-list__list"},Object(r.createElement)(_,{list:t,selected:d,renderItem:p,onSelect:n,instanceId:o,isSingle:m,search:c}))},k=e=>{const{className:t="",isCompact:c,isHierarchical:n,isLoading:l,isSingle:s,list:i,messages:u=m.a,onChange:p,onSearch:g,selected:O,debouncedSpeak:h}=e,[j,w]=Object(r.useState)(""),_=Object(d.useInstanceId)(k),E=Object(r.useMemo)(()=>({...m.a,...u}),[u]),y=Object(r.useMemo)(()=>Object(m.c)(i,j,n),[i,j,n]);Object(r.useEffect)(()=>{h&&h(E.updated)},[h,E]),Object(r.useEffect)(()=>{"function"==typeof g&&g(j)},[j,g]);const C=Object(r.useCallback)(e=>()=>{s&&p([]);const t=O.findIndex(t=>{let{id:c}=t;return c===e});p([...O.slice(0,t),...O.slice(t+1)])},[s,O,p]),x=Object(r.useCallback)(e=>()=>{-1===O.findIndex(t=>{let{id:c}=t;return c===e.id})?p(s?[e]:[...O,e]):C(e.id)()},[s,C,p,O]);return Object(r.createElement)("div",{className:b()("woocommerce-search-list",t,{"is-compact":c})},Object(r.createElement)(f,o()({},e,{onRemove:C,messages:E})),Object(r.createElement)("div",{className:"woocommerce-search-list__search"},Object(r.createElement)(a.TextControl,{label:E.search,type:"search",value:j,onChange:e=>w(e)})),l?Object(r.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(r.createElement)(a.Spinner,null)):Object(r.createElement)(v,o()({},e,{search:j,filteredList:y,messages:E,onSelect:x,instanceId:_})))};Object(a.withSpokenMessages)(k)},89:function(e,t,c){"use strict";var n=c(0),o=c(6),r=c(1),l=c(3);function a(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(n.createElement)(l.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(l.Path,{d:c[t]})):null}class s extends n.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(n.createElement)(a,{level:e}),title:Object(r.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(r.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:r,onChange:s}=this.props;return Object(n.createElement)(l.ToolbarGroup,{isCollapsed:e,icon:Object(n.createElement)(a,{level:r}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,r,s))})}}t.a=s},9:function(e,t){e.exports=window.wp.compose},93:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},95:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(30);c(207),t.a=e=>{let{name:t,count:c}=e;return Object(n.createElement)(n.Fragment,null,t,Number.isFinite(c)&&Object(n.createElement)(r.a,{label:c,screenReaderLabel:Object(o.sprintf)( +/* translators: %s number of products. */ +Object(o._n)("%s product","%s products",c,"woo-gutenberg-products-block"),c),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}}}); \ No newline at end of file diff --git a/build/blocks-checkout.asset.php b/build/blocks-checkout.asset.php new file mode 100644 index 00000000000..293807e6815 --- /dev/null +++ b/build/blocks-checkout.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-registry', 'wc-settings', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-warning'), 'version' => '80463f9d4e89f8bd03242d22690c976b'); \ No newline at end of file diff --git a/build/blocks-checkout.js b/build/blocks-checkout.js new file mode 100644 index 00000000000..0fedf280839 --- /dev/null +++ b/build/blocks-checkout.js @@ -0,0 +1,5 @@ +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=135)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNagation:n,addNegation:r}}function E(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function S(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 x(e,t,n){return Math.min(Math.max(e,t),n)}function k(e){return Math.max(e.selectionStart,e.selectionEnd)}var _={thousandSeparator:g.oneOfType([g.string,g.oneOf([!0])]),decimalSeparator:g.string,allowedDecimalSeparators:g.arrayOf(g.string),thousandsGroupStyle:g.oneOf(["thousand","lakh","wan"]),decimalScale:g.number,fixedDecimalScale:g.bool,displayType:g.oneOf(["input","text"]),prefix:g.string,suffix:g.string,format:g.oneOfType([g.string,g.func]),removeFormatting:g.func,mask:g.oneOfType([g.string,g.arrayOf(g.string)]),value:g.oneOfType([g.number,g.string]),defaultValue:g.oneOfType([g.number,g.string]),isNumericString:g.bool,customInput:g.elementType,allowNegative:g.bool,allowEmptyFormatting:g.bool,allowLeadingZeros:g.bool,onValueChange:g.func,onKeyDown:g.func,onMouseUp:g.func,onChange:g.func,onFocus:g.func,onBlur:g.func,type:g.oneOf(["text","tel","password"]),isAllowed:g.func,renderText:g.func,getInputRef:g.oneOfType([g.func,g.shape({current:g.any})])},N={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:v,onChange:v,onKeyDown:v,onMouseUp:v,onFocus:v,onBlur:v,isAllowed:function(){return!0}},F=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=f(t).call(this,e))||"object"!=typeof r&&"function"!=typeof r?d(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(d(n)),n.onKeyDown=n.onKeyDown.bind(d(n)),n.onMouseUp=n.onMouseUp.bind(d(n)),n.onFocus=n.onFocus.bind(d(n)),n.onBlur=n.onBlur.bind(d(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&&m(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,a=void 0===i?"":i;if(e!==t){this.validateProps();var c=this.formatNumString(a),s=w(t.value)?c:this.formatValueProp(),l=this.removeFormatting(s),u=parseFloat(l),p=parseFloat(a);(isNaN(u)&&isNaN(p)||u===p)&&c===o&&(null!==r||s===o)||this.updateValue({formattedValue:s,numAsString:l,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 a=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(e="".concat(e.substring(0,a),".").concat(e.substring(a+1,e.length).replace(new RegExp(y(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?"":"|"+y(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){S(e,t),setTimeout((function(){e.value===n&&S(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,a=r.format;if(""===e)return 0;if(t=x(t,0,e.length),!a){var c="-"===e[0];return x(t,o.length+(c?1:0),e.length-i.length)}if("function"==typeof a)return t;if("#"===a[t]&&O(e[t]))return t;if("#"===a[t-1]&&O(e[t-1]))return t;var s=a.indexOf("#");t=x(t,s,a.lastIndexOf("#")+1);for(var l=a.substring(t,a.length).indexOf("#"),u=t,p=t+(-1===l?0:l);u>s&&("#"!==a[u]||!O(e[u]));)u-=1;return!O(e[p])||"left"===n&&t!==s||t-u0&&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,a=this.props,c=a.value,s=a.isNumericString,l=!(c=w(c)?e:c)&&0!==c;return l&&i&&(c=""),l&&!i?"":("number"==typeof c&&(c=c.toString(),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=j(e),i=o.beforeDecimal,a=o.afterDecimal,c=o.hasNagation,s=parseFloat("0.".concat(a||"0")).toFixed(t).split("."),l=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}),s[0]),u=E(s[1]||"",Math.min(t,a.length),n),p=r?".":"";return"".concat(c?"-":"").concat(l).concat(p).concat(u)}(c,r,o)),s?this.formatNumString(c):this.formatInput(c))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,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,a=n.decimalScale,c=n.fixedDecimalScale,s=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-i.length||a&&c&&t[e]===s))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;rn&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),g=b.start,v=b.end;if(!o&&g===v&&-1!==u.indexOf(n[d])){var O=0===s?"":p;return n.substr(0,d)+O+n.substr(d+1,n.length)}var w=o?0:a.length,y=t.length-(o?0:c.length);if(n.length>t.length||!n.length||g===v||0===d&&h===t.length||d===w&&h===y)return n;if(this.checkIfFormatGotDeleted(g,v,t)&&(n=t),!o){var E=this.removeFormatting(n),S=j(E,i),x=S.beforeDecimal,k=S.afterDecimal,_=S.addNegation,N=ew;)O--;O=this.correctCaretPosition(c,O,"left")}}else for(;!b.test(c[O])&&Oy)&&(e.preventDefault(),this.setPatchedCaretPosition(n,O,c)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,O,c),d(e)}else d(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 a=this.correctCaretPosition(i,n);a!==n&&this.setPatchedCaretPosition(t,a,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,a=void 0===i?"":i,c=t.correctCaretPosition(a,r);c===r||0===r&&o===a.length||t.setPatchedCaretPosition(n,c,a),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,o=r.type,i=r.displayType,a=r.customInput,c=r.renderText,s=r.getInputRef,u=r.format,f=this.state.value,m=(e=this.props,t=_,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),d=p({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(u)?"numeric":void 0},m,{type:o,value:f,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return c?c(f)||null:l.a.createElement("span",p({},m,{ref:s}),f);if(a){var h=a;return l.a.createElement(h,p({},d,{ref:s}))}return l.a.createElement("input",p({},d,{ref:s}))}}])&&u(n.prototype,r),t}(l.a.Component);F.propTypes=_,F.defaultProps=N;var C=F;n(128);const T=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});var P=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 f=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),m={...l,...T(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)(C,c()({className:f,displayType:s},m,{value:p,onValueChange:d}))};n(127);const R=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)(P,{className:"wc-block-components-totals-item__value",currency:n||{},value:t}):null};var I=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)(R,{value:a,currency:n}),Object(r.createElement)("div",{className:"wc-block-components-totals-item__description"},c))},D=n(1),M=n(4),A=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)(I,{className:o,currency:t,label:Object(D.__)("Subtotal","woo-gutenberg-products-block"),value:Object(M.getSetting)("displayCartPricesIncludingTax",!1)?c+s:c})};n(129);var L=e=>{let{currency:t,values:n,className:o,showRateAfterTaxName:a}=e;const{total_tax:c,tax_lines:s}=n;if(!Object(M.getSetting)("taxesEnabled",!0)&&parseInt(c,10)<=0)return null;const l=Object(M.getSetting)("displayItemizedTaxes",!1),u=l&&s.length>0?Object(r.createElement)("div",{className:i()("wc-block-components-totals-taxes",o)},s.map((e,n)=>{let{name:o,rate:i,price:c}=e;const s=`${o}${a?" "+i:""}`;return Object(r.createElement)(I,{key:"tax-line-"+n,className:"wc-block-components-totals-taxes__grouped-rate",currency:t,label:s,value:parseInt(c,10)})})," "):null;return l?u:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(I,{className:i()("wc-block-components-totals-taxes",o),currency:t,label:Object(D.__)("Taxes","woo-gutenberg-products-block"),value:parseInt(c,10),description:null}))},V=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)(I,{key:a||`${n}-${c}`,className:i()("wc-block-components-totals-fees",o),currency:t,label:c||Object(D.__)("Fee","woo-gutenberg-products-block"),value:Object(M.getSetting)("displayCartPricesIncludingTax",!1)?l+u:l})}))};n(130);var B=e=>{let{children:t,slotWrapper:n=!1}=e;return s.Children.count(t)?Object(r.createElement)("div",{className:"wc-block-components-totals-wrapper"+(n?" slot-wrapper":"")},t):null},U=n(6),W=n.n(U),H=n(9),z=n(17);function $(e){const t=Object(r.useContext)(z.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 G=n(7),K=n(3),q=Object(r.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function Y({name:e,children:t,registerFill:n,unregisterFill:o}){const i=(e=>{const{getSlot:t,subscribe:n}=Object(r.useContext)(q),[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(K.isFunction)(t)&&(t=t(i.props.fillProps)),Object(r.createPortal)(t,i.node)):null}var Z=e=>Object(r.createElement)(q.Consumer,null,({registerFill:t,unregisterFill:n})=>Object(r.createElement)(Y,Object(G.a)({},e,{registerFill:t,unregisterFill:n})));class X 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(K.map)(o(t,this),e=>{const t=Object(K.isFunction)(e.children)?e.children(n):e.children;return r.Children.map(t,(e,t)=>{if(!e||Object(K.isString)(e))return e;const n=e.key||t;return Object(r.cloneElement)(e,{key:n})})}).filter(Object(K.negate)(r.isEmptyElement));return Object(r.createElement)(r.Fragment,null,Object(K.isFunction)(e)?e(i):i)}}var J=e=>Object(r.createElement)(q.Consumer,null,({registerSlot:t,unregisterSlot:n,getFills:o})=>Object(r.createElement)(X,Object(G.a)({},e,{registerSlot:t,unregisterSlot:n,getFills:o})));function Q(){const[,e]=Object(r.useState)({}),t=Object(r.useRef)(!0);return Object(r.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function ee({name:e,children:t}){const n=$(e),o=Object(r.useRef)({rerender:Q()});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 te=n(13),ne=Object(r.forwardRef)((function({name:e,fillProps:t={},as:n="div",...o},i){const a=Object(r.useContext)(z.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(G.a)({ref:Object(te.useMergeRefs)([i,c])},o))})),re=n(30),oe=n.n(re);function ie({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&&!oe()(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)(z.a.Provider,{value:t},e)}class ae 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(K.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(K.without)(this.listeners,e)}}render(){return Object(r.createElement)(q.Provider,{value:this.contextValue},this.props.children)}}function ce(e){return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Z,e),Object(r.createElement)(ee,e))}const se=Object(r.forwardRef)(({bubblesVirtually:e,...t},n)=>e?Object(r.createElement)(ne,Object(G.a)({},t,{ref:n})):Object(r.createElement)(J,t));function le({children:e,...t}){return Object(r.createElement)(ae,t,Object(r.createElement)(ie,null,e))}function ue(e){const t=t=>Object(r.createElement)(ce,Object(G.a)({name:e},t));t.displayName=e+"Fill";const n=t=>Object(r.createElement)(se,Object(G.a)({name:e},t));return n.displayName=e+"Slot",n.__unstableName=e,{Fill:t,Slot:n}}var pe=n(15),fe=n.n(pe);class me extends s.Component{constructor(){super(...arguments),fe()(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 de=me;const he=e=>Array.isArray(e)&&e.filter(Boolean).length>0;let be;be=$;const ge=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const{Fill:n,Slot:o}=ue(e),i=e=>{let{children:o}=e;return Object(r.createElement)(n,null,e=>r.Children.map(o,n=>Object(r.createElement)(de,{renderError:M.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:ve,Slot:Oe}=ge("__experimentalOrderMeta");ve.Slot=e=>{let{className:t,extensions:n,cart:o}=e;const{fills:a}=be("__experimentalOrderMeta");return he(a)&&Object(r.createElement)(B,{slotWrapper:!0},Object(r.createElement)(Oe,{className:i()(t,"wc-block-components-order-meta"),fillProps:{extensions:n,cart:o}}))};var we=ve;const{Fill:ye,Slot:je}=ge("__experimentalDiscountsMeta");ye.Slot=e=>{let{className:t,extensions:n,cart:o}=e;const{fills:a}=be("__experimentalDiscountsMeta");return he(a)&&Object(r.createElement)(B,{slotWrapper:!0},Object(r.createElement)(je,{className:i()(t,"wc-block-components-discounts-meta"),fillProps:{extensions:n,cart:o}}))};var Ee=ye;const{Fill:Se,Slot:xe}=ge("__experimentalOrderShippingPackages");Se.Slot=e=>{let{className:t,collapsible:n,noResultsMessage:o,renderOption:a,extensions:c,cart:s,components:l}=e;const{fills:u}=be("__experimentalOrderShippingPackages"),p=u.length>1;return Object(r.createElement)(xe,{className:i()("wc-block-components-shipping-rates-control",t),fillProps:{collapsible:n,collapse:p,showItems:p,noResultsMessage:o,renderOption:a,extensions:c,cart:s,components:l}})};var ke=Se,_e=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null},Ne=Object(r.createElement)(H.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"})),Fe=Object(r.createElement)(H.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"}));n(131);var Ce=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)(_e,{"aria-hidden":"true",className:"wc-block-components-panel__button-icon",srcElement:l?Ne:Fe}),c)),l&&Object(r.createElement)("div",{className:"wc-block-components-panel__content"},t))},Te=n(31),Pe=Object(r.createElement)(H.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(H.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 Re(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 Ie=0;function De(e){const t=document.scrollingElement||document.body;e&&(Ie=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=Ie)}let Me=0;function Ae(){return Object(r.useEffect)(()=>(0===Me&&De(!0),++Me,()=>{1===Me&&De(!1),--Me}),[]),null}function Le(e){return"appear"===e?"top":"left"}function Ve(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 Be(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function Ue(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function We(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const He=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:f,anchorRect:m,getAnchorRect:d,expandOnMobile:h,animate:b=!0,onClickOutside:g,onFocusOutside:v,__unstableStickyBoundaryElement:O,__unstableSlotName:w="Popover",__unstableObserveElement:y,__unstableBoundaryParent:j,__unstableForcePosition:E,__unstableForceXAlignment:S,...x},k)=>{const _=Object(r.useRef)(null),N=Object(r.useRef)(null),F=Object(r.useRef)(),C=Object(te.useViewportMatch)("medium","<"),[T,P]=Object(r.useState)(),R=$(w),I=h&&C,[M,A]=Object(te.useResizeObserver)();a=I||a,Object(r.useLayoutEffect)(()=>{if(I)return We(F.current,"is-without-arrow",a),We(F.current,"is-alternate",c),Be(F.current,"data-x-axis"),Be(F.current,"data-y-axis"),Ue(F.current,"top"),Ue(F.current,"left"),Ue(N.current,"maxHeight"),void Ue(N.current,"maxWidth");const e=()=>{if(!F.current||!N.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 Re(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 Re(Object(Te.getRectangleFromRange)(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=Re(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:Ve(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),c=Re(new window.DOMRect(n.left,n.top,n.width,a.bottom-n.top),e.ownerDocument,i);return o?c:Ve(c,r)}if(!e.current)return;const{parentNode:a}=e.current,c=a.getBoundingClientRect();return o?c:Ve(c,a)}(_,m,d,p,f,F.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=F.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;j&&(r=null===(i=F.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const l=A.height?A:N.current.getBoundingClientRect(),{popoverTop:u,popoverLeft:h,xAxis:b,yAxis:g,contentHeight:v,contentWidth:w}=function(e,t,n="top",r,o,i,a,c,s){const[l,u="center",p]=n.split(" "),f=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},f={popoverTop:e.bottom,contentHeight:e.bottom+10+s>window.innerHeight?window.innerHeight-10-e.bottom:s};let m,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&&f.contentHeight===s)d="bottom";else{d=p.contentHeight>f.contentHeight?"top":"bottom";const e="top"===d?p.contentHeight:f.contentHeight;h=e!==s?e:null}return m="middle"===d?u.popoverTop:"top"===d?p.popoverTop:f.popoverTop,{yAxis:d,popoverTop:m,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(D.isRTL)()?n="right":"right"===n&&Object(D.isRTL)()&&(n="left"),"left"===r&&Object(D.isRTL)()?r="right":"right"===r&&Object(D.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 f=e.left;"right"===r?f=e.right:"middle"===i||s||(f=u);let m=e.right;"left"===r?m=e.left:"middle"===i||s||(m=u);const d={popoverLeft:f,contentWidth:f-l>0?l:f},h={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m: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(D.isRTL)()||(b=Math.max(b,0))}return{xAxis:g,popoverLeft:b,contentWidth:v}}(e,t,u,p,r,f.yAxis,a,c,s),...f}}(e,l,s,O,F.current,o,r,E,S);"number"==typeof u&&"number"==typeof h&&(Ue(F.current,"top",u+"px"),Ue(F.current,"left",h+"px")),We(F.current,"is-without-arrow",a||"center"===b&&"middle"===g),We(F.current,"is-alternate",c),Be(F.current,"data-x-axis",b),Be(F.current,"data-y-axis",g),Ue(N.current,"maxHeight","number"==typeof v?v+"px":""),Ue(N.current,"maxWidth","number"==typeof w?w+"px":""),P(({left:"right",right:"left"}[b]||"center")+" "+({top:"bottom",bottom:"top"}[g]||"middle"))};e();const{ownerDocument:t}=F.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)),y&&(u=new n.MutationObserver(e),u.observe(y,{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()}},[I,m,d,p,f,s,A,O,y,j]);const L=(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}),W()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),g(e)}else t&&t()},[V,B]=Object(te.__experimentalUseDialog)({focusOnMount:u,__unstableOnClose:L,onClose:L}),U=Object(te.useMergeRefs)([F,V,k]),H=Boolean(b&&T)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:n=Le(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:T});let z=Object(r.createElement)("div",Object(G.a)({className:i()("components-popover",o,H,{"is-expanded":I,"is-without-arrow":a,"is-alternate":c})},x,{ref:U},B,{tabIndex:"-1"}),I&&Object(r.createElement)(Ae,null),I&&Object(r.createElement)("div",{className:"components-popover__header"},Object(r.createElement)("span",{className:"components-popover__header-title"},e),Object(r.createElement)(tt,{className:"components-popover__close",icon:Pe,onClick:t})),Object(r.createElement)("div",{ref:N,className:"components-popover__content"},Object(r.createElement)("div",{style:{position:"relative"}},M,n)));return R.ref&&(z=Object(r.createElement)(ce,{name:w},z)),p||m?z:Object(r.createElement)("span",{ref:_},z)});He.Slot=Object(r.forwardRef)((function({name:e="Popover"},t){return Object(r.createElement)(se,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var ze=He,$e=function({shortcut:e,className:t}){if(!e)return null;let n,o;return Object(K.isString)(e)&&(n=e),Object(K.isObject)(e)&&(n=e.display,o=e.ariaLabel),Object(r.createElement)("span",{className:t,"aria-label":o},n)};const Ge=Object(r.createElement)("div",{className:"event-catcher"}),Ke=({eventHandlers:e,child:t,childrenWithPopover:n})=>Object(r.cloneElement)(Object(r.createElement)("span",{className:"disabled-element-wrapper"},Object(r.cloneElement)(Ge,e),Object(r.cloneElement)(t,{children:n}),","),e),qe=({child:e,eventHandlers:t,childrenWithPopover:n})=>Object(r.cloneElement)(e,{...t,children:n}),Ye=(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 Ze=function({children:e,position:t,text:n,shortcut:o}){const[i,a]=Object(r.useState)(!1),[c,s]=Object(r.useState)(!1),l=Object(te.useDebounce)(s,700),u=t=>{Ye(e,"onMouseDown",t),document.addEventListener("mouseup",m),a(!0)},p=t=>{Ye(e,"onMouseUp",t),document.removeEventListener("mouseup",m),a(!1)},f=e=>"mouseUp"===e?p:"mouseDown"===e?u:void 0,m=f("mouseUp"),d=(t,n)=>r=>{if(Ye(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&i)return;l.cancel();const o=Object(K.includes)(["focus","mouseenter"],r.type);o!==c&&(n?l(o):s(o))},h=()=>{l.cancel(),document.removeEventListener("mouseup",m)};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:f("mouseDown")},g=r.Children.only(e),{children:v,disabled:O}=g.props;return(O?Ke:qe)({child:g,eventHandlers:b,childrenWithPopover:(({grandchildren:e,isOver:t,position:n,text:o,shortcut:i})=>Object(r.concatChildren)(e,t&&Object(r.createElement)(ze,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,Object(r.createElement)($e,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:c,position:t,text:n,shortcut:o})})},Xe=function({icon:e,className:t,...n}){const o=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(r.createElement)("span",Object(G.a)({className:o},n))},Je=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return Object(r.createElement)(Xe,Object(G.a)({icon:e},n));if(Object(r.isValidElement)(e)&&Xe===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===H.SVG)){const o={width:t,height:t,...e.props,...n};return Object(r.createElement)(H.SVG,o)}return Object(r.isValidElement)(e)?Object(r.cloneElement)(e,{size:t,...n}):e},Qe=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 et=["onMouseDown","onClick"];var tt=Object(r.forwardRef)((function(e,t){const{href:n,target:o,isSmall:a,isPressed:c,isBusy:s,isDestructive:l,className:u,disabled:p,icon:f,iconPosition:m="left",iconSize:d,showTooltip:h,tooltipPosition:b,shortcut:g,label:v,children:O,text:w,variant:y,__experimentalIsFocusable:j,describedBy:E,...S}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,variant:i,...a}){let c=i;var s,l,u,p,f;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&&(W()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=c)&&void 0!==p||(c="secondary")),o&&(null!==(f=c)&&void 0!==f||(c="link")),{...a,variant:c}}(e),x=i()("components-button",u,{"is-secondary":"secondary"===y,"is-primary":"primary"===y,"is-small":a,"is-tertiary":"tertiary"===y,"is-pressed":c,"is-busy":s,"is-link":"link"===y,"is-destructive":l,"has-text":!!f&&!!O,"has-icon":!!f}),k=p&&!j,_=void 0===n||k?"button":"a",N="a"===_?{href:n,target:o}:{type:"button",disabled:k,"aria-pressed":c};if(p&&j){N["aria-disabled"]=!0;for(const e of et)S[e]=e=>{e.stopPropagation(),e.preventDefault()}}const F=!k&&(h&&v||g||!!v&&(!O||Object(K.isArray)(O)&&!O.length)&&!1!==h),C=E?Object(K.uniqueId)():null,T=S["aria-describedby"]||C,P=Object(r.createElement)(_,Object(G.a)({},N,S,{className:x,"aria-label":S["aria-label"]||v,"aria-describedby":T,ref:t}),f&&"left"===m&&Object(r.createElement)(Je,{icon:f,size:d}),w&&Object(r.createElement)(r.Fragment,null,w),f&&"right"===m&&Object(r.createElement)(Je,{icon:f,size:d}),O);return F?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Ze,{text:E||v,shortcut:g,position:b},P),E&&Object(r.createElement)(Qe,null,Object(r.createElement)("span",{id:C},E))):Object(r.createElement)(r.Fragment,null,P,E&&Object(r.createElement)(Qe,null,Object(r.createElement)("span",{id:C},E)))}));n(133);var nt=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"});n(132);var rt=e=>{let{className:t,showSpinner:n=!1,children:o,...a}=e;const s=i()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(r.createElement)(tt,c()({className:s},a),n&&Object(r.createElement)(nt,null),Object(r.createElement)("span",{className:"wc-block-components-button__text"},o))},ot=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))};n(134);var it=Object(te.withInstanceId)(e=>{let{className:t,label:n,id:o,instanceId:a,onChange:s,children:l,hasError:u=!1,...p}=e;const f=o||"checkbox-control-"+a;return Object(r.createElement)("div",{className:i()("wc-block-components-checkbox",{"has-error":u},t)},Object(r.createElement)("label",{htmlFor:f},Object(r.createElement)("input",c()({id:f,className:"wc-block-components-checkbox__input",type:"checkbox",onChange:e=>s(e.target.checked),"aria-invalid":!0===u},p)),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),l))});const at=(e,t)=>{if(!e.includes(t))throw Error(Object(D.sprintf)( +/* translators: %1$s value passed to filter, %2$s : value that must be included. */ +Object(D.__)('Returned value must include %1$s, you passed "%2$s"',"woo-gutenberg-products-block"),t,e));return!0};var ct=n(8),st=n(12);const lt=e=>{const{applyExtensionCartUpdate:t}=Object(ct.dispatch)(st.b);return t(e)},ut=()=>!0;let pt={};const ft=(e,t)=>{Object.keys(t).includes("couponName")&&W()("snackbarNotices",{alternative:"snackbarNoticeVisibility",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4417"}),Object.keys(t).includes("couponName")&&W()("couponName",{alternative:"coupons",plugin:"WooCommerce Blocks",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/blob/bb921d21f42e21f38df2b1c87b48e07aa4cb0538/docs/extensibility/available-filters.md#coupons"}),pt={...pt,[e]:t}},mt=e=>{let{filterName:t,defaultValue:n,extensions:o=null,arg:i=null,validation:a=ut}=e;return Object(r.useMemo)(()=>{const e=(e=>Object.keys(pt).map(t=>pt[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(D.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(D.__)("The type returned by checkout filters must be the same as the type they receive. The function received %1$s but returned %2$s.","woo-gutenberg-products-block"),typeof r,typeof t));r=a(t)?t:r}catch(e){if(M.CURRENT_USER_IS_ADMIN)throw e;console.error(e)}}),r},[t,n,o,i,a])};let dt;!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_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"}(dt||(dt={}));const ht={},bt=e=>Object.values(dt).includes(e),gt=e=>bt(e)?Object.values(ht).filter(t=>{let{metadata:n}=t;return((null==n?void 0:n.parent)||[]).includes(e)}):[];var vt=n(32);const Ot=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object,wt=e=>{var t,n,r,o;((e,t,n)=>{if(!Ot(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&&!bt(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=>bt(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(Ot(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(vt.registerBlockComponent)({blockName:e.metadata.name,component:e.component}),ht[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)}}},14:function(e,t){e.exports=window.React},15: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},17:function(e,t,n){"use strict";(function(e){var r=n(0);n(29);const o=Object(r.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,n(18))},18: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 f(){u&&s&&(u=!1,s.length?l=s.concat(l):p=-1,l.length&&m())}function m(){if(!u){var e=c(f);u=!0;for(var t=l.length;t;){for(s=l,l=[];++p1)for(var n=1;n0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:e,expressPaymentMethods:s,paymentMethodsInitialized:c,expressPaymentMethodsInitialized:o}=Object(n.b)(),l=Object(a.a)(e),i=Object(a.a)(s);return{paymentMethods:t?i:l,isInitialized:t?o:c}},o=()=>c(!1),l=()=>c(!0)},239:function(t,e){},243:function(t,e,s){"use strict";var a=s(10),n=s.n(a),c=s(0),o=s(4),l=s.n(o);const i=t=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+t;var r=t=>{let{id:e,src:s=null,alt:a=""}=t;return s?Object(c.createElement)("img",{className:i(e),src:s,alt:a}):null},d=s(66);const m=[{id:"alipay",alt:"Alipay",src:d.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.l+"payment-methods/wechat.svg"}];var p=s(35);s(239),e.a=t=>{let{icons:e=[],align:s="center",className:a}=t;const o=(t=>{const e={};return t.forEach(t=>{let s={};"string"==typeof t&&(s={id:t,alt:t,src:null}),"object"==typeof t&&(s={id:t.id||"",alt:t.alt||"",src:t.src||null}),s.id&&Object(p.d)(s.id)&&!e[s.id]&&(e[s.id]=s)}),Object.values(e)})(e);if(0===o.length)return null;const i=l()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===s,"wc-block-components-payment-method-icons--align-right":"right"===s},a);return Object(c.createElement)("div",{className:i},o.map(t=>{const e={...t,...(s=t.id,m.find(t=>t.id===s)||{})};var s;return Object(c.createElement)(r,n()({key:"payment-method-icon-"+t.id},e))}))}},400:function(t,e,s){"use strict";s.r(e);var a=s(0),n=s(243),c=s(238);const o=t=>Object.values(t).reduce((t,e)=>(null!==e.icons&&(t=t.concat(e.icons)),t),[]);e.default=t=>{let{className:e}=t;const{paymentMethods:s}=Object(c.b)();return Object(a.createElement)(n.a,{className:e,icons:o(s)})}}}]); \ No newline at end of file diff --git a/build/cart-blocks/checkout-button-frontend.js b/build/cart-blocks/checkout-button-frontend.js new file mode 100644 index 00000000000..24d10e1a61f --- /dev/null +++ b/build/cart-blocks/checkout-button-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[22],{227:function(e,t,c){"use strict";var n=c(10),o=c.n(n),s=c(0),r=c(56),a=c(4),i=c.n(a),u=c(130);c(230),t.a=e=>{let{className:t,showSpinner:c=!1,children:n,...a}=e;const b=i()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(s.createElement)(r.a,o()({className:b},a),c&&Object(s.createElement)(u.a,null),Object(s.createElement)("span",{className:"wc-block-components-button__text"},n))}},230:function(e,t){},342:function(e,t,c){"use strict";(function(e){var n=c(0),o=c(1),s=c(4),r=c.n(s),a=c(227),i=c(66),u=c(31),b=c(379),l=c(2);c(344),t.a=t=>{let{checkoutPageId:c,className:s}=t;const d=Object(l.getSetting)("page-"+c,!1),{isCalculating:m}=Object(u.b)(),[f,w]=Object(b.a)(),[p,v]=Object(n.useState)(!1);Object(n.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{v(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const j=Object(n.createElement)(a.a,{className:"wc-block-cart__submit-button",href:d||i.d,disabled:m,onClick:()=>v(!0),showSpinner:p},Object(o.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(n.createElement)("div",{className:r()("wc-block-cart__submit",s)},f,Object(n.createElement)("div",{className:"wc-block-cart__submit-container"},j),"below"===w&&Object(n.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,c(343))},343:function(e,t){var c;c=function(){return this}();try{c=c||new Function("return this")()}catch(e){"object"==typeof window&&(c=window)}e.exports=c},344:function(e,t){},379:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(0);const o={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},s=()=>{const[e,t]=Object(n.useState)(""),c=Object(n.useRef)(null),s=Object(n.useRef)(new IntersectionObserver(e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")},{threshold:1}));return Object(n.useLayoutEffect)(()=>{const e=c.current,t=s.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]),[Object(n.createElement)("div",{"aria-hidden":!0,ref:c,style:o}),e]}},399:function(e,t,c){"use strict";c.r(t);var n=c(110),o=c(342);t.default=Object(n.withFilteredAttributes)({checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}}})(o.a)}}]); \ No newline at end of file diff --git a/build/cart-blocks/empty-cart-frontend.js b/build/cart-blocks/empty-cart-frontend.js new file mode 100644 index 00000000000..c49ae9c4d8d --- /dev/null +++ b/build/cart-blocks/empty-cart-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[23],{331:function(e,c){},376:function(e,c,t){"use strict";t.r(c);var n=t(0),o=t(22),s=t(67);t(331),c.default=e=>{let{children:c,className:t}=e;const{cartItems:l,cartIsLoading:r}=Object(o.a)();return Object(n.useEffect)(()=>{Object(s.a)("wc-blocks_render_blocks_frontend",{element:document.body.querySelector(".wp-block-woocommerce-cart")})},[]),r||0!==l.length?null:Object(n.createElement)("div",{className:t},c)}}}]); \ No newline at end of file diff --git a/build/cart-blocks/express-payment-frontend.js b/build/cart-blocks/express-payment-frontend.js new file mode 100644 index 00000000000..3d946718e62 --- /dev/null +++ b/build/cart-blocks/express-payment-frontend.js @@ -0,0 +1,5 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[24],{221:function(e,t){},235:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0),s=(n(8),n(160));n(221);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:r,getValidationErrorId:a}=Object(s.b)();if(!t||"string"!=typeof t){const e=r(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(c.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(c.createElement)("p",{id:a(o)},t))}},238:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var c=n(17),s=n(204);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:r}=Object(s.b)(),a=Object(c.a)(t),i=Object(c.a)(n);return{paymentMethods:e?i:a,isInitialized:e?r:o}},r=()=>o(!1),a=()=>o(!0)},239:function(e,t){},240:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var c=n(1),s=n(9),o=n(6),r=n(19),a=n(22),i=n(0),l=n(211),p=n(160),u=n(32);const d=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(a.a)(),{addErrorNotice:n}=Object(u.a)(),{addSnackbarNotice:d}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:c}=Object(l.b)(),s=Object(i.useRef)(e);Object(i.useEffect)(()=>{s.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),r=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...o,...r,setIsSuppressed:c}})(),{setValidationErrors:m}=Object(p.b)();return{appliedCoupons:e,isLoading:t,...Object(s.useSelect)((e,t)=>{let{dispatch:s}=t;const a=e(o.CART_STORE_KEY),i=a.isApplyingCoupon(),l=a.isRemovingCoupon(),{applyCoupon:p,removeCoupon:u,receiveApplyingCoupon:b}=s(o.CART_STORE_KEY);return{applyCoupon:e=>{p(e).then(t=>{!0===t&&d(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{m({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),b("")})},removeCoupon:e=>{u(e).then(t=>{!0===t&&d(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{n(e.message,{id:"coupon-form"}),b("")})},isApplyingCoupon:i,isRemovingCoupon:l}},[n,d])}}},243:function(e,t,n){"use strict";var c=n(10),s=n.n(c),o=n(0),r=n(4),a=n.n(r);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:n=null,alt:c=""}=e;return n?Object(o.createElement)("img",{className:i(t),src:n,alt:c}):null},p=n(66);const u=[{id:"alipay",alt:"Alipay",src:p.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:p.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:p.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:p.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:p.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:p.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:p.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:p.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:p.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:p.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:p.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:p.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:p.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:p.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:p.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:p.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:p.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:p.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:p.l+"payment-methods/wechat.svg"}];var d=n(35);n(239),t.a=e=>{let{icons:t=[],align:n="center",className:c}=e;const r=(e=>{const t={};return e.forEach(e=>{let n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"==typeof e&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&Object(d.d)(n.id)&&!t[n.id]&&(t[n.id]=n)}),Object.values(t)})(t);if(0===r.length)return null;const i=a()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===n,"wc-block-components-payment-method-icons--align-right":"right"===n},c);return Object(o.createElement)("div",{className:i},r.map(e=>{const t={...e,...(n=e.id,u.find(e=>e.id===n)||{})};var n;return Object(o.createElement)(l,s()({key:"payment-method-icon-"+e.id},t))}))}},255:function(e,t){},256:function(e,t,n){"use strict";var c=n(15),s=n.n(c),o=n(0),r=n(1),a=n(3),i=(n(8),n(2)),l=n(92);class p extends a.Component{constructor(){super(...arguments),s()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:n}=this.props;if(e){let e=Object(r.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(n||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(r.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const c=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.StoreNoticesContainer,{notices:c})}return this.props.children}}p.defaultProps={isEditor:!1},t.a=p},279:function(e,t){},280:function(e,t,n){"use strict";var c=n(0),s=n(1),o=n(305),r=n(238),a=n(18),i=n(204),l=n(30),p=n.n(l),u=n(256);t.a=()=>{const{isEditor:e}=Object(a.a)(),{setActivePaymentMethod:t,setExpressPaymentError:n,activePaymentMethod:l,paymentMethodData:d,setPaymentStatus:m}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:h}=Object(r.a)(),g=Object(c.useRef)(l),v=Object(c.useRef)(d),j=Object(c.useCallback)(e=>()=>{g.current=l,v.current=d,m().started(),t(e)},[l,d,t,m]),O=Object(c.useCallback)(()=>{m().pristine(),t(g.current,v.current)},[t,m]),y=Object(c.useCallback)(e=>{m().error(e),n(e),t(g.current,v.current)},[t,m,n]),E=Object(c.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";p()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?y(e):n("")}),[n,y]),f=Object.entries(h),k=f.length>0?f.map(t=>{let[n,s]=t;const o=e?s.edit:s.content;return Object(c.isValidElement)(o)?Object(c.createElement)("li",{key:n,id:"express-payment-method-"+n},Object(c.cloneElement)(o,{...b,onClick:j(n),onClose:O,onError:y,setExpressPaymentError:E})):null}):Object(c.createElement)("li",{key:"noneRegistered"},Object(s.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(c.createElement)(u.a,{isEditor:e},Object(c.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},300:function(e,t,n){"use strict";var c=n(0),s=n(24);const o=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},305:function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var c=n(1),s=n(40),o=n(0),r=n(4),a=n.n(r),i=n(24),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),u=n(300),d=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),m=n(98),b=n(35);n(255);const h={bank:l,bill:p,card:u.a,checkPayment:d};var g=e=>{let{icon:t="",text:n=""}=e;const c=!!t,s=Object(o.useCallback)(e=>c&&Object(b.d)(e)&&Object(b.e)(h,e),[c]),r=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return Object(o.createElement)("span",{className:r},s(t)?Object(o.createElement)(m.a,{srcElement:h[t]}):t,n)},v=n(243),j=n(2),O=n(30),y=n.n(O),E=n(129),f=n(235),k=n(22),w=n(240),S=n(29),C=n(31),P=n(204),_=n(44),x=n(33);const M=(e,t)=>{const n=[],s=(t,n)=>{const c=n+"_tax",s=Object(b.e)(e,n)&&Object(b.d)(e[n])?parseInt(e[n],10):0;return{key:n,label:t,value:s,valueWithTax:s+(Object(b.e)(e,c)&&Object(b.d)(e[c])?parseInt(e[c],10):0)}};return n.push(s(Object(c.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(s(Object(c.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(s(Object(c.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({key:"total_tax",label:Object(c.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(s(Object(c.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},R=()=>{const{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onSubmit:u,customerId:d}=Object(C.b)(),{currentStatus:m,activePaymentMethod:b,onPaymentProcessing:h,setExpressPaymentError:O,shouldSavePayment:R}=Object(P.b)(),{shippingErrorStatus:I,shippingErrorTypes:z,shippingRates:V,shippingRatesLoading:N,selectedRates:T,setSelectedRates:A,isSelectingRate:H,onShippingRateSuccess:B,onShippingRateFail:D,onShippingRateSelectSuccess:L,onShippingRateSelectFail:F,needsShipping:W}=Object(_.b)(),{billingData:G,shippingAddress:J,setShippingAddress:U}=Object(x.b)(),{cartItems:Y,cartFees:K,cartTotals:X,extensions:q}=Object(k.a)(),{appliedCoupons:Q}=Object(w.a)(),{noticeContexts:Z,responseTypes:$}=Object(S.c)(),ee=Object(o.useRef)(M(X,W)),te=Object(o.useRef)({label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)});Object(o.useEffect)(()=>{ee.current=M(X,W),te.current={label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)}},[X,W]);const ne=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";y()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),O(e)}),[O]);return{activePaymentMethod:b,billing:{appliedCoupons:Q,billingData:G,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(s.getCurrencyFromPriceResponse)(X),customerId:d,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:Y,cartFees:K,extensions:q},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r},components:{LoadingMask:E.a,PaymentMethodIcons:v.a,PaymentMethodLabel:g,ValidationInputError:f.a},emitResponse:{noticeContexts:Z,responseTypes:$},eventRegistration:{onCheckoutAfterProcessingWithError:p,onCheckoutAfterProcessingWithSuccess:l,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onPaymentProcessing:h,onShippingRateFail:D,onShippingRateSelectFail:F,onShippingRateSelectSuccess:L,onShippingRateSuccess:B},onSubmit:u,paymentStatus:m,setExpressPaymentError:ne,shippingData:{isSelectingRate:H,needsShipping:W,selectedRates:T,setSelectedRates:A,setShippingAddress:U,shippingAddress:J,shippingRates:V,shippingRatesLoading:N},shippingStatus:{shippingErrorStatus:I,shippingErrorTypes:z},shouldSavePayment:R}}},398:function(e,t,n){"use strict";n.r(t);var c=n(0),s=n(22),o=n(4),r=n.n(o),a=n(1),i=n(238),l=n(29),p=n(31),u=n(204),d=n(87),m=n(129),b=n(280);n(279);var h=()=>{const{paymentMethods:e,isInitialized:t}=Object(i.a)(),{noticeContexts:n}=Object(l.c)(),{isCalculating:s,isProcessing:o,isAfterProcessing:r,isBeforeProcessing:h,isComplete:g,hasError:v}=Object(p.b)(),{currentStatus:j}=Object(u.b)();if(!t||t&&0===Object.keys(e).length)return null;const O=o||r||h||g&&!v;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(m.a,{isLoading:s||O||j.isDoingExpressPayment},Object(c.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(c.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(c.createElement)(d.a,{context:n.EXPRESS_PAYMENTS},Object(c.createElement)(b.a,null))))),Object(c.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(a.__)("Or","woo-gutenberg-products-block")))};t.default=e=>{let{className:t}=e;const{cartNeedsPayment:n}=Object(s.a)();return n?Object(c.createElement)("div",{className:r()("wc-block-cart__payment-options",t)},Object(c.createElement)(h,null)):null}},92:function(e,t,n){},98:function(e,t,n){"use strict";var c=n(0);t.a=function(e){let{srcElement:t,size:n=24,...s}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:n,height:n,...s}):null}}}]); \ No newline at end of file diff --git a/build/cart-blocks/filled-cart-frontend.js b/build/cart-blocks/filled-cart-frontend.js new file mode 100644 index 00000000000..f0af674c084 --- /dev/null +++ b/build/cart-blocks/filled-cart-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{164:function(e,t){},212:function(e,t,s){"use strict";s.d(t,"b",(function(){return l})),s.d(t,"a",(function(){return o}));var a=s(0),c=(s(8),s(12)),i=s(4),r=s.n(i);const n=Object(a.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(a.useContext)(n),o=e=>{let{children:t,className:s=""}=e;const[i,l]=(()=>{const[e,{width:t}]=Object(c.useResizeObserver)();let s="";return t>700?s="is-large":t>520?s="is-medium":t>400?s="is-small":t&&(s="is-mobile"),[e,s]})(),o={hasContainerWidth:""!==l,containerClassName:l,isMobile:"is-mobile"===l,isSmall:"is-small"===l,isMedium:"is-medium"===l,isLarge:"is-large"===l};return Object(a.createElement)(n.Provider,{value:o},Object(a.createElement)("div",{className:r()(s,l)},i,t))}},214:function(e,t,s){"use strict";var a=s(0),c=s(4),i=s.n(c),r=(s(8),s(212));s(164),t.a=e=>{let{children:t,className:s}=e;return Object(a.createElement)(r.a,{className:i()("wc-block-components-sidebar-layout",s)},t)}},375:function(e,t,s){"use strict";s.r(t);var a=s(0),c=s(4),i=s.n(c),r=s(214),n=s(22),l=s(32),o=s(19),m=s(135);t.default=e=>{let{children:t,className:s}=e;const{cartItems:c,cartIsLoading:u,cartItemErrors:d}=Object(n.a)(),{hasDarkControls:b}=Object(m.b)(),{addErrorNotice:h}=Object(l.a)();return Object(a.useEffect)(()=>{d.forEach(e=>{h(Object(o.decodeEntities)(e.message),{isDismissible:!0,id:e.code})})},[h,d]),u||c.length>=1?Object(a.createElement)(r.a,{className:i()("wc-block-cart",s,{"has-dark-controls":b})},t):null}}}]); \ No newline at end of file diff --git a/build/cart-blocks/items-frontend.js b/build/cart-blocks/items-frontend.js new file mode 100644 index 00000000000..6fdb6d20808 --- /dev/null +++ b/build/cart-blocks/items-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[26],{332:function(e,c,a){"use strict";var n=a(0),t=a(3),s=a(4),r=a.n(s);const l=Object(t.forwardRef)((e,c)=>{let{children:a,className:t=""}=e;return Object(n.createElement)("div",{ref:c,className:r()("wc-block-components-main",t)},a)});c.a=l},377:function(e,c,a){"use strict";a.r(c);var n=a(0),t=a(332),s=a(4),r=a.n(s);c.default=e=>{let{children:c,className:a}=e;return Object(n.createElement)(t.a,{className:r()("wc-block-cart__main",a)},c)}}}]); \ No newline at end of file diff --git a/build/cart-blocks/line-items-frontend.js b/build/cart-blocks/line-items-frontend.js new file mode 100644 index 00000000000..a239e439332 --- /dev/null +++ b/build/cart-blocks/line-items-frontend.js @@ -0,0 +1,15 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[27],{159:function(e,t){},242:function(e,t,c){"use strict";var r=c(0),a=c(4),n=c.n(a);c(272),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)("div",{className:n()("wc-block-components-product-badge",c)},t)}},245:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(96),l=c(4),o=c.n(l),i=c(40);c(246);const s=e=>{let{currency:t,maxPrice:c,minPrice:l,priceClassName:s,priceStyle:u={}}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(l),Object(i.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:t,value:l,style:u})," — ",Object(r.createElement)(n.a,{className:o()("wc-block-components-product-price__value",s),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:l,regularPrice:i,priceClassName:s,priceStyle:u,price:m}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:o()("wc-block-components-product-price__regular",c),style:l},e),value:i}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:o()("wc-block-components-product-price__value","is-discounted",s),style:u},e),value:m}))};t.a=e=>{let{align:t,className:c,currency:a,format:l="",maxPrice:i,minPrice:m,price:b,priceClassName:p,priceStyle:d,regularPrice:O,regularPriceClassName:j,regularPriceStyle:_}=e;const y=o()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});l.includes("")||(l="",console.error("Price formats need to include the `` tag."));const g=O&&b!==O;let f=Object(r.createElement)("span",{className:o()("wc-block-components-product-price__value",p)});return g?f=Object(r.createElement)(u,{currency:a,price:b,priceClassName:p,priceStyle:d,regularPrice:O,regularPriceClassName:j,regularPriceStyle:_}):void 0!==m&&void 0!==i?f=Object(r.createElement)(s,{currency:a,maxPrice:i,minPrice:m,priceClassName:p,priceStyle:d}):b&&(f=Object(r.createElement)(n.a,{className:o()("wc-block-components-product-price__value",p),currency:a,value:b,style:d})),Object(r.createElement)("span",{className:y},Object(r.createInterpolateElement)(l,{price:f}))}},246:function(e,t){},247:function(e,t,c){"use strict";var r=c(10),a=c.n(r),n=c(0),l=c(19),o=c(4),i=c.n(o);c(248),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:o="",rel:s,style:u,onClick:m,...b}=e;const p=i()("wc-block-components-product-name",t);if(c){const e=b;return Object(n.createElement)("span",a()({className:p},e,{dangerouslySetInnerHTML:{__html:Object(l.decodeEntities)(r)}}))}return Object(n.createElement)("a",a()({className:p,href:o,rel:s},b,{dangerouslySetInnerHTML:{__html:Object(l.decodeEntities)(r)},style:u}))}},248:function(e,t){},258:function(e,t,c){"use strict";var r=c(0),a=c(113),n=c(114);const l=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},o=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),i=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=o(e),a=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(i(a,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const a=o(e),l=a.slice(0,t);if(c)return Object(n.autop)(i(l,r));const s=l.match(/([\s]+)/g),u=s?s.length:0,m=a.slice(0,t+u);return Object(n.autop)(i(m,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:o="words",className:i=""}=e;const m=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),o=Object(a.count)(r,c);if(o<=t)return r;const i=l(r),m=Object(a.count)(i,c);return m<=t?i:"words"===c?s(i,t):u(i,t,"characters_including_spaces"===c)}(t,c,o),[t,c,o]);return Object(r.createElement)(r.RawHTML,{className:i},m)}},271:function(e,t){},272:function(e,t){},273:function(e,t){},274:function(e,t){},296:function(e,t,c){"use strict";var r=c(10),a=c.n(r),n=c(0),l=c(19),o=c(2);c(271),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(l.decodeEntities)(t.alt)||c||"Product Image"}:{src:o.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",a()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},297:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(242);t.a=()=>Object(r.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(a.__)("Available on backorder","woo-gutenberg-products-block"))},298:function(e,t,c){"use strict";var r=c(0),a=c(1),n=c(242);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(a.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(a.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},307:function(e,t,c){"use strict";var r=c(0),a=c(5),n=c(19);c(274);var l=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(a.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},o=c(258),i=c(66),s=e=>{let{className:t,shortDescription:c="",fullDescription:a=""}=e;const n=c||a;return n?Object(r.createElement)(o.a,{className:t,source:n,maxLength:15,countType:i.n.wordCountType||"words"}):null};c(273),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:a=[],variation:n=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(s,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(l,{details:a}),Object(r.createElement)(l,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},333:function(e,t){},386:function(e,t,c){"use strict";c.r(t);var r=c(0),a=c(22),n=c(4),l=c.n(n),o=c(1),i=c(23),s=c(167);c(333);var u=e=>{let{className:t,quantity:c=1,minimum:a=1,maximum:n,onChange:u=(()=>{}),itemName:m="",disabled:b}=e;const p=l()("wc-block-components-quantity-selector",t),d=void 0!==n,O=c>a,j=!d||c{const t=void 0!==typeof e.key?"ArrowDown"===e.key:e.keyCode===s.DOWN,r=void 0!==typeof e.key?"ArrowUp"===e.key:e.keyCode===s.UP;t&&O&&(e.preventDefault(),u(c-1)),r&&j&&(e.preventDefault(),u(c+1))},[c,u,j,O]);return Object(r.createElement)("div",{className:p},Object(r.createElement)("input",{className:"wc-block-components-quantity-selector__input",disabled:b,type:"number",step:"1",min:"0",value:c,onKeyDown:_,onChange:e=>{let t=Number.isNaN(e.target.value)||!e.target.value?0:parseInt(e.target.value,10);d&&(t=Math.min(t,n)),t=Math.max(t,a),t!==c&&u(t)},"aria-label":Object(o.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(o.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),m)}),Object(r.createElement)("button",{"aria-label":Object(o.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:b||!O,onClick:()=>{const e=c-1;u(e),Object(i.speak)(Object(o.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(o.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e))}},"-"),Object(r.createElement)("button",{"aria-label":Object(o.__)("Increase quantity","woo-gutenberg-products-block"),disabled:b||!j,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=c+1;u(e),Object(i.speak)(Object(o.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(o.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e))}},"+"))},m=c(245),b=c(247),p=c(9),d=c(6),O=c(94),j=c(62),_=c(67),y=c(35),g=c(31);var f=c(38),k=c(296),E=c(297),v=c(298),w=c(96),N=c(242),h=e=>{let{currency:t,saleAmount:c,format:a=""}=e;if(!c||c<=0)return null;a.includes("")||(a="",console.error("Price formats need to include the `` tag."));const n=Object(o.sprintf)( +/* translators: %s will be replaced by the discount amount */ +Object(o.__)("Save %s","woo-gutenberg-products-block"),a);return Object(r.createElement)(N.a,{className:"wc-block-components-sale-badge"},Object(r.createInterpolateElement)(n,{price:Object(r.createElement)(w.a,{currency:t,value:c})}))},C=c(307),x=c(40),I=c(13),P=c(295),S=c(2);const q=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),D=e=>Object(I.mustContain)(e,"");var A=Object(r.forwardRef)((e,t)=>{let{lineItem:c,onRemove:n=(()=>{}),tabIndex:s=null}=e;const{name:w="",catalog_visibility:N="visible",short_description:A="",description:R="",low_stock_remaining:T=null,show_backorder_badge:F=!1,quantity_limit:L=99,permalink:M="",images:U=[],variation:Q=[],item_data:V=[],prices:$={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:H={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:B}=c,{quantity:K,setItemQuantity:W,removeItem:J,isPendingDelete:Y}=(e=>{const t={key:"",quantity:1};(e=>Object(y.c)(e)&&Object(y.e)(e,"key")&&Object(y.e)(e,"quantity")&&Object(y.d)(e.key)&&Object(y.b)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:c="",quantity:n=1}=t,{cartErrors:l}=Object(a.a)(),{dispatchActions:o}=Object(g.b)(),[i,s]=Object(r.useState)(n),[u]=Object(O.a)(i,400),m=Object(j.a)(u),{removeItemFromCart:b,changeCartItemQuantity:f}=Object(p.useDispatch)(d.CART_STORE_KEY);Object(r.useEffect)(()=>s(n),[n]);const k=Object(p.useSelect)(e=>{if(!c)return{quantity:!1,delete:!1};const t=e(d.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(c),delete:t.isItemPendingDelete(c)}},[c]),E=Object(r.useCallback)(()=>c?b(c).then(()=>(Object(_.c)(),!0)):Promise.resolve(!1),[c,b]);return Object(r.useEffect)(()=>{c&&Object(y.b)(m)&&Number.isFinite(m)&&m!==u&&f(c,u)},[c,f,u,m]),Object(r.useEffect)(()=>(k.delete?o.incrementCalculating():o.decrementCalculating(),()=>{k.delete&&o.decrementCalculating()}),[o,k.delete]),Object(r.useEffect)(()=>(k.quantity||u!==i?o.incrementCalculating():o.decrementCalculating(),()=>{(k.quantity||u!==i)&&o.decrementCalculating()}),[o,k.quantity,u,i]),{isPendingDelete:k.delete,quantity:i,setItemQuantity:s,removeItem:E,cartItemQuantityErrors:l}})(c),{dispatchStoreEvent:z}=Object(f.a)(),{receiveCart:G,...X}=Object(a.a)(),Z=Object(r.useMemo)(()=>({context:"cart",cartItem:c,cart:X}),[c,X]),ee=Object(x.getCurrencyFromPriceResponse)($),te=Object(I.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:w,extensions:B,arg:Z}),ce=Object(P.a)({amount:parseInt($.raw_prices.regular_price,10),precision:$.raw_prices.precision}),re=Object(P.a)({amount:parseInt($.raw_prices.price,10),precision:$.raw_prices.precision}),ae=ce.subtract(re),ne=ae.multiply(K),le=Object(x.getCurrencyFromPriceResponse)(H);let oe=parseInt(H.line_subtotal,10);Object(S.getSetting)("displayCartPricesIncludingTax",!1)&&(oe+=parseInt(H.line_subtotal_tax,10));const ie=Object(P.a)({amount:oe,precision:le.minorUnit}),se=U.length?U[0]:{},ue="hidden"===N||"search"===N,me=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:B,arg:Z}),be=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:B,arg:Z,validation:D}),pe=Object(I.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:B,arg:Z,validation:D}),de=Object(I.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:B,arg:Z,validation:D});return Object(r.createElement)("tr",{className:l()("wc-block-cart-items__row",me,{"is-disabled":Y}),ref:t,tabIndex:s},Object(r.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(y.e)(se,"alt")||!se.alt},ue?Object(r.createElement)(k.a,{image:se,fallbackAlt:te}):Object(r.createElement)("a",{href:M,tabIndex:-1},Object(r.createElement)(k.a,{image:se,fallbackAlt:te}))),Object(r.createElement)("td",{className:"wc-block-cart-item__product"},Object(r.createElement)(b.a,{disabled:Y||ue,name:te,permalink:M}),F?Object(r.createElement)(E.a,null):!!T&&Object(r.createElement)(v.a,{lowStockRemaining:T}),Object(r.createElement)("div",{className:"wc-block-cart-item__prices"},Object(r.createElement)(m.a,{currency:ee,regularPrice:q(ce,ee),price:q(re,ee),format:pe})),Object(r.createElement)(h,{currency:ee,saleAmount:q(ae,ee),format:de}),Object(r.createElement)(C.a,{shortDescription:A,fullDescription:R,itemData:V,variation:Q}),Object(r.createElement)("div",{className:"wc-block-cart-item__quantity"},Object(r.createElement)(u,{disabled:Y,quantity:K,maximum:L,onChange:e=>{W(e),z("cart-set-item-quantity",{product:c,quantity:e})},itemName:te}),Object(r.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:()=>{n(),J(),z("cart-remove-item",{product:c,quantity:K}),Object(i.speak)(Object(o.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(o.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),te))},disabled:Y},Object(o.__)("Remove item","woo-gutenberg-products-block")))),Object(r.createElement)("td",{className:"wc-block-cart-item__total"},Object(r.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(r.createElement)(m.a,{currency:le,format:be,price:ie.getAmount()}),K>1&&Object(r.createElement)(h,{currency:ee,saleAmount:q(ne,ee),format:de}))))});const R=[...Array(3)].map((_x,e)=>Object(r.createElement)(A,{lineItem:{},key:e})),T=e=>{const t={};return e.forEach(e=>{let{key:c}=e;t[c]=Object(r.createRef)()}),t};var F=e=>{let{lineItems:t=[],isLoading:c=!1,className:a}=e;const n=Object(r.useRef)(null),i=Object(r.useRef)(T(t));Object(r.useEffect)(()=>{i.current=T(t)},[t]);const s=e=>()=>{null!=i&&i.current&&e&&i.current[e].current instanceof HTMLElement?i.current[e].current.focus():n.current instanceof HTMLElement&&n.current.focus()},u=c?R:t.map((e,c)=>{const a=t.length>c+1?t[c+1].key:null;return Object(r.createElement)(A,{key:e.key,lineItem:e,onRemove:s(a),ref:i.current[e.key],tabIndex:-1})});return Object(r.createElement)("table",{className:l()("wc-block-cart-items",a),ref:n,tabIndex:-1},Object(r.createElement)("thead",null,Object(r.createElement)("tr",{className:"wc-block-cart-items__header"},Object(r.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(r.createElement)("span",null,Object(o.__)("Product","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(r.createElement)("span",null,Object(o.__)("Details","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(r.createElement)("span",null,Object(o.__)("Total","woo-gutenberg-products-block"))))),Object(r.createElement)("tbody",null,u))};t.default=e=>{let{className:t}=e;const{cartItems:c,cartIsLoading:n}=Object(a.a)();return Object(r.createElement)(F,{className:t,lineItems:c,isLoading:n})}},94:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(3),a=c(52);function n(e,t){return e===t}function l(e){return"function"==typeof e?function(){return e}:e}function o(e,t,c){var o=c&&c.equalityFn||n,i=function(e){var t=Object(r.useState)(l(e)),c=t[0],a=t[1];return[c,Object(r.useCallback)((function(e){return a(l(e))}),[])]}(e),s=i[0],u=i[1],m=Object(a.a)(Object(r.useCallback)((function(e){return u(e)}),[u]),t,c),b=Object(r.useRef)(e);return o(b.current,e)||(m(e),b.current=e),[s,m]}},96:function(e,t,c){"use strict";var r=c(10),a=c.n(r),n=c(0),l=c(131),o=c(4),i=c.n(o);c(159);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:o,displayType:u="text",...m}=e;const b="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(b))return null;const p=b/10**r.minorUnit;if(!Number.isFinite(p))return null;const d=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),O={...m,...s(r),value:void 0,currency:void 0,onValueChange:void 0},j=o?e=>{const t=+e.value*10**r.minorUnit;o(t)}:()=>{};return Object(n.createElement)(l.a,a()({className:d,displayType:u},O,{value:p,onValueChange:j}))}}}]); \ No newline at end of file diff --git a/build/cart-blocks/order-summary-frontend.js b/build/cart-blocks/order-summary-frontend.js new file mode 100644 index 00000000000..10dd5924ecb --- /dev/null +++ b/build/cart-blocks/order-summary-frontend.js @@ -0,0 +1,23 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[28],{112:function(e,t){},159:function(e,t){},163:function(e,t,n){"use strict";var c=n(10),a=n.n(c),o=n(0),r=n(24);const s=Object(o.createElement)(e=>{let{className:t,size:n,...c}=e;return Object(o.createElement)(r.SVG,a()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:n,height:n},c),Object(o.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=s},168:function(e,t,n){"use strict";var c=n(10),a=n.n(c),o=n(0),r=n(4),s=n.n(r),l=n(1),i=n(98),p=n(163);n(112);var u=e=>{let{text:t,screenReaderText:n="",element:c="li",className:r="",radius:l="small",children:i=null,...p}=e;const u=c,b=s()(r,"wc-block-components-chip","wc-block-components-chip--radius-"+l),d=Boolean(n&&n!==t);return Object(o.createElement)(u,a()({className:b},p),Object(o.createElement)("span",{"aria-hidden":d,className:"wc-block-components-chip__text"},t),d&&Object(o.createElement)("span",{className:"screen-reader-text"},n),i)};t.a=e=>{let{ariaLabel:t="",className:n="",disabled:c=!1,onRemove:r=(()=>{}),removeOnAnyClick:b=!1,text:d,screenReaderText:m="",...g}=e;const O=b?"span":"button";if(!t){const e=m&&"string"==typeof m?m:d;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:c,onClick:r,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||r()}},h=b?j:{},E=b?{"aria-hidden":!0}:j;return Object(o.createElement)(u,a()({},g,h,{className:s()(n,"is-removable"),element:b?"button":g.element,screenReaderText:m,text:d}),Object(o.createElement)(O,a()({className:"wc-block-components-chip__remove"},E),Object(o.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},21:function(e,t,n){"use strict";var c=n(0),a=n(4),o=n.n(a);t.a=e=>{let t,{label:n,screenReaderLabel:a,wrapperElement:r,wrapperProps:s={}}=e;const l=null!=n,i=null!=a;return!l&&i?(t=r||"span",s={...s,className:o()(s.className,"screen-reader-text")},Object(c.createElement)(t,s,a)):(t=r||c.Fragment,l&&i&&n!==a?Object(c.createElement)(t,s,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},a)):Object(c.createElement)(t,s,n))}},221:function(e,t){},222:function(e,t,n){"use strict";var c=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:a,secondaryDescription:o,id:r}=e;return Object(c.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(c.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(c.createElement)("span",{id:r&&r+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(c.createElement)("span",{id:r&&r+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(c.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(c.createElement)("span",{id:r&&r+"__description",className:"wc-block-components-radio-control__description"},a),o&&Object(c.createElement)("span",{id:r&&r+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},224:function(e,t,n){"use strict";var c=n(10),a=n.n(c),o=n(0),r=n(4),s=n.n(r);n(8),n(225),t.a=e=>{let{children:t,className:n,headingLevel:c,...r}=e;const l=s()("wc-block-components-title",n),i="h"+c;return Object(o.createElement)(i,a()({className:l},r),t)}},225:function(e,t){},226:function(e,t,n){"use strict";var c=n(0),a=n(4),o=n.n(a),r=n(222);t.a=e=>{let{checked:t,name:n,onChange:a,option:s}=e;const{value:l,label:i,description:p,secondaryLabel:u,secondaryDescription:b}=s;return Object(c.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${l}`},Object(c.createElement)("input",{id:`${n}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:l,onChange:e=>a(e.target.value),checked:t,"aria-describedby":o()({[`${n}-${l}__label`]:i,[`${n}-${l}__secondary-label`]:u,[`${n}-${l}__description`]:p,[`${n}-${l}__secondary-description`]:b})}),Object(c.createElement)(r.a,{id:`${n}-${l}`,label:i,secondaryLabel:u,description:p,secondaryDescription:b}))}},227:function(e,t,n){"use strict";var c=n(10),a=n.n(c),o=n(0),r=n(56),s=n(4),l=n.n(s),i=n(130);n(230),t.a=e=>{let{className:t,showSpinner:n=!1,children:c,...s}=e;const p=l()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(o.createElement)(r.a,a()({className:p},s),n&&Object(o.createElement)(i.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},c))}},228:function(e,t){},230:function(e,t){},235:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0),a=(n(8),n(160));n(221);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:r,getValidationErrorId:s}=Object(a.b)();if(!t||"string"!=typeof t){const e=r(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(c.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(c.createElement)("p",{id:s(o)},t))}},236:function(e,t,n){"use strict";var c=n(0),a=n(4),o=n.n(a),r=n(12),s=n(226);n(237),t.a=Object(r.withInstanceId)(e=>{let{className:t="",instanceId:n,id:a,selected:r,onChange:l=(()=>{}),options:i=[]}=e;const p=a||n;return i.length&&Object(c.createElement)("div",{className:o()("wc-block-components-radio-control",t)},i.map(e=>Object(c.createElement)(s.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===r,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},237:function(e,t){},240:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var c=n(1),a=n(9),o=n(6),r=n(19),s=n(22),l=n(0),i=n(211),p=n(160),u=n(32);const b=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(s.a)(),{addErrorNotice:n}=Object(u.a)(),{addSnackbarNotice:b}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:c}=Object(i.b)(),a=Object(l.useRef)(e);Object(l.useEffect)(()=>{a.current=e},[e]);const o=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),r=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...o,...r,setIsSuppressed:c}})(),{setValidationErrors:d}=Object(p.b)();return{appliedCoupons:e,isLoading:t,...Object(a.useSelect)((e,t)=>{let{dispatch:a}=t;const s=e(o.CART_STORE_KEY),l=s.isApplyingCoupon(),i=s.isRemovingCoupon(),{applyCoupon:p,removeCoupon:u,receiveApplyingCoupon:m}=a(o.CART_STORE_KEY);return{applyCoupon:e=>{p(e).then(t=>{!0===t&&b(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{d({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),m("")})},removeCoupon:e=>{u(e).then(t=>{!0===t&&b(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{n(e.message,{id:"coupon-form"}),m("")})},isApplyingCoupon:l,isRemovingCoupon:i}},[n,b])}}},250:function(e,t){},251:function(e,t){},252:function(e,t){},253:function(e,t){},254:function(e,t){},262:function(e,t,n){"use strict";var c=n(0),a=n(1),o=n(23),r=n(129),s=n(13),l=n(299),i=n(22),p=n(18),u=n(4),b=n.n(u),d=n(19),m=n(21),g=n(11),O=n.n(g),j=n(99),h=n(38);const E=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var f=n(236),_=n(222),k=n(40),v=n(96),w=n(2);const y=e=>{const t=Object(w.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(d.decodeEntities)(e.name),value:e.rate_id,description:Object(c.createElement)(c.Fragment,null,Number.isFinite(t)&&Object(c.createElement)(v.a,{currency:Object(k.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(d.decodeEntities)(e.delivery_time))}};var C=e=>{let{className:t,noResultsMessage:n,onSelectRate:a,rates:o,renderOption:r=y,selected:s}=e;if(0===o.length)return n;if(o.length>1)return Object(c.createElement)(f.a,{className:t,onChange:e=>{a(e)},selected:s,options:o.map(r)});const{label:l,secondaryLabel:i,description:p,secondaryDescription:u}=r(o[0]);return Object(c.createElement)(_.a,{label:l,secondaryLabel:i,description:p,secondaryDescription:u})};n(254);var N=e=>{let{packageId:t,className:n,noResultsMessage:o,renderOption:r,packageData:l,collapsible:i=!1,collapse:p=!1,showItems:u=!1}=e;const{selectShippingRate:g,selectedShippingRate:f}=((e,t)=>{const{dispatchCheckoutEvent:n}=Object(h.a)(),{selectShippingRate:a,isSelectingRate:o}=Object(j.a)(),[r,s]=Object(c.useState)(()=>E(t)),l=Object(c.useRef)(t);return Object(c.useEffect)(()=>{O()(l.current,t)||(l.current=t,s(E(t)))},[t]),{selectShippingRate:Object(c.useCallback)(t=>{s(t),a(t,e),n("set-selected-shipping-rate",{shippingRateId:t})},[e,a,n]),selectedShippingRate:r,isSelectingRate:o}})(t,l.shipping_rates),_=Object(c.createElement)(c.Fragment,null,(u||i)&&Object(c.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),u&&Object(c.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(d.decodeEntities)(e.name),n=e.quantity;return Object(c.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(c.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(a.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),k=Object(c.createElement)(C,{className:n,noResultsMessage:o,rates:l.shipping_rates,onSelectRate:g,selected:f,renderOption:r});return i?Object(c.createElement)(s.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:_},k):Object(c.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},_,k)};const S=e=>{let{packages:t,collapse:n,showItems:a,collapsible:o,noResultsMessage:r,renderOption:s}=e;return t.length?Object(c.createElement)(c.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(c.createElement)(N,{key:t,packageId:t,packageData:l,collapsible:o,collapse:n,showItems:a,noResultsMessage:r,renderOption:s})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:n,className:u,collapsible:b=!1,noResultsMessage:d,renderOption:m}=e;Object(c.useEffect)(()=>{if(n)return;const e=Object(l.a)(t),c=Object(l.b)(t);1===e?Object(o.speak)(Object(a.sprintf)( +/* translators: %d number of shipping options found. */ +Object(a._n)("%d shipping option was found.","%d shipping options were found.",c,"woo-gutenberg-products-block"),c)):Object(o.speak)(Object(a.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)( +/* translators: %d number of shipping options available. */ +Object(a._n)("%d shipping option was found","%d shipping options were found",c,"woo-gutenberg-products-block"),c))},[n,t]);const{extensions:g,receiveCart:O,...j}=Object(i.a)(),h={className:u,collapsible:b,noResultsMessage:d,renderOption:m,extensions:g,cart:j,components:{ShippingRatesControlPackage:N}},{isEditor:E}=Object(p.a)();return Object(c.createElement)(r.a,{isLoading:n,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},E?Object(c.createElement)(S,{packages:t,noResultsMessage:d,renderOption:m}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.ExperimentalOrderShippingPackages.Slot,h),Object(c.createElement)(s.ExperimentalOrderShippingPackages,null,Object(c.createElement)(S,{packages:t,noResultsMessage:d,renderOption:m}))))}},275:function(e,t){},276:function(e,t){},277:function(e,t){},278:function(e,t){},281:function(e,t,n){"use strict";var c=n(10),a=n.n(c),o=n(0),r=n(1),s=n(3),l=n(4),i=n.n(l),p=n(160),u=n(235),b=n(12),d=n(35),m=n(21);n(228);var g=Object(s.forwardRef)((e,t)=>{let{className:n,id:c,type:r="text",ariaLabel:s,ariaDescribedBy:l,label:p,screenReaderLabel:u,disabled:b,help:d,autoCapitalize:g="off",autoComplete:O="off",value:j="",onChange:h,required:E=!1,onBlur:f=(()=>{}),feedback:_,...k}=e;const[v,w]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:i()("wc-block-components-text-input",n,{"is-active":v||j})},Object(o.createElement)("input",a()({type:r,id:c,value:j,ref:t,autoCapitalize:g,autoComplete:O,onChange:e=>{h(e.target.value)},onFocus:()=>w(!0),onBlur:e=>{f(e.target.value),w(!1)},"aria-label":s||p,disabled:b,"aria-describedby":d&&!l?c+"__help":l,required:E},k)),Object(o.createElement)(m.a,{label:p,screenReaderLabel:u||p,wrapperElement:"label",wrapperProps:{htmlFor:c},htmlFor:c}),!!d&&Object(o.createElement)("p",{id:c+"__help",className:"wc-block-components-text-input__help"},d),_)});t.a=Object(b.withInstanceId)(e=>{let{className:t,instanceId:n,id:c,ariaDescribedBy:l,errorId:b,focusOnMount:m=!1,onChange:O,showError:j=!0,errorMessage:h="",value:E="",...f}=e;const[_,k]=Object(s.useState)(!0),v=Object(s.useRef)(null),{getValidationError:w,hideValidationError:y,setValidationErrors:C,clearValidationError:N,getValidationErrorId:S}=Object(p.b)(),R=void 0!==c?c:"textinput-"+n,x=void 0!==b?b:R,I=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();n?N(x):C({[x]:{message:t.validationMessage||Object(r.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[N,x,C]);Object(s.useEffect)(()=>{var e;_&&m&&(null===(e=v.current)||void 0===e||e.focus()),k(!1)},[m,_,k]),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&&I(!0)},[E,I]),Object(s.useEffect)(()=>()=>{N(x)},[N,x]);const L=w(x)||{};Object(d.d)(h)&&""!==h&&(L.message=h);const M=L.message&&!L.hidden,T=j&&M&&S(x)?S(x):l;return Object(o.createElement)(g,a()({className:i()(t,{"has-error":M}),"aria-invalid":!0===M,id:R,onBlur:()=>{I(!1)},feedback:j&&Object(o.createElement)(u.a,{errorMessage:h,propertyName:x}),ref:v,onChange:e=>{y(x),O(e)},ariaDescribedBy:T,value:E},f))})},299:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a}));const c=e=>e.length,a=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},304:function(e,t,n){"use strict";var c=n(0),a=n(281),o=n(10),r=n.n(o),s=n(66),l=n(1),i=n(19),p=n(4),u=n.n(p),b=n(12),d=n(385),m=n(160),g=n(235),O=n(35);n(252);var j=Object(b.withInstanceId)(e=>{let{id:t,className:n,label:a,onChange:o,options:r,value:s,required:i=!1,errorMessage:p=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:b,instanceId:j="0",autoComplete:h="off"}=e;const{getValidationError:E,setValidationErrors:f,clearValidationError:_}=Object(m.b)(),k=Object(c.useRef)(null),v=t||"control-"+j,w=b||v,y=E(w)||{message:"",hidden:!1};return Object(c.useEffect)(()=>(!i||s?_(w):f({[w]:{message:p,hidden:!0}}),()=>{_(w)}),[_,s,w,p,i,f]),Object(c.createElement)("div",{id:v,className:u()("wc-block-components-combobox",n,{"is-active":s,"has-error":y.message&&!y.hidden}),ref:k},Object(c.createElement)(d.a,{className:"wc-block-components-combobox-control",label:a,onChange:o,onFilterValueChange:e=>{if(e.length){const t=Object(O.c)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(O.c)(k.current)&&k.current.contains(t))return;const n=e.toLocaleUpperCase(),c=r.find(e=>e.label.toLocaleUpperCase().startsWith(n)||e.value.toLocaleUpperCase()===n);c&&o(c.value)}},options:r,value:s||"",allowReset:!1,autoComplete:h,"aria-invalid":y.message&&!y.hidden}),Object(c.createElement)(g.a,{propertyName:w}))});n(251);var h=e=>{let{className:t,countries:n,id:a,label:o,onChange:r,value:s="",autoComplete:p="off",required:b=!1,errorId:d,errorMessage:m=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(c.useMemo)(()=>Object.entries(n).map(e=>{let[t,n]=e;return{value:t,label:Object(i.decodeEntities)(n)}}),[n]);return Object(c.createElement)("div",{className:u()(t,"wc-block-components-country-input")},Object(c.createElement)(j,{id:a,label:o,onChange:r,options:g,value:s,errorId:d,errorMessage:m,required:b,autoComplete:p}),"off"!==p&&Object(c.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:s,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),n=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);r(n?n.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},E=e=>Object(c.createElement)(h,r()({countries:s.g},e)),f=e=>Object(c.createElement)(h,r()({countries:s.a},e));n(253);const _=(e,t)=>{const n=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return n?n.value:""};var k=e=>{let{className:t,id:n,states:o,country:r,label:s,onChange:p,autoComplete:b="off",value:d="",required:m=!1}=e;const g=o[r],O=Object(c.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),h=Object(c.useCallback)(e=>{p(O.length>0?_(e,O):e)},[p,O]),E=Object(c.useRef)(d);return Object(c.useEffect)(()=>{E.current!==d&&(E.current=d)},[d]),Object(c.useEffect)(()=>{if(O.length>0&&E.current){const e=_(E.current,O);e!==E.current&&h(e)}},[O,h]),O.length>0?Object(c.createElement)(c.Fragment,null,Object(c.createElement)(j,{className:u()(t,"wc-block-components-state-input"),id:n,label:s,onChange:h,options:O,value:d,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:b}),"off"!==b&&Object(c.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:b,value:d,onChange:e=>h(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(c.createElement)(a.a,{className:t,id:n,label:s,onChange:h,autoComplete:b,value:d,required:m})},v=e=>Object(c.createElement)(k,r()({states:s.h},e)),w=e=>Object(c.createElement)(k,r()({states:s.b},e)),y=n(17),C=n(2),N=n(50);t.a=Object(b.withInstanceId)(e=>{let{id:t="",fields:n=Object.keys(C.defaultAddressFields),fieldConfig:o={},instanceId:r,onChange:s,type:i="shipping",values:p}=e;const{getValidationError:u,setValidationErrors:b,clearValidationError:d}=Object(m.b)(),g=Object(y.a)(n),O=u("shipping-missing-country")||{},j=Object(c.useMemo)(()=>Object(N.a)(g,o,p.country),[g,o,p.country]);return Object(c.useEffect)(()=>{j.forEach(e=>{e.hidden&&p[e.key]&&s({...p,[e.key]:""})})},[j,s,p]),Object(c.useEffect)(()=>{"shipping"===i&&((e,t,n,c)=>{c||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),c&&e.country&&n("shipping-missing-country")})(p,b,d,!!O.message&&!O.hidden)},[p,O.message,O.hidden,b,d,i]),t=t||r,Object(c.createElement)("div",{id:t,className:"wc-block-components-address-form"},j.map(e=>{if(e.hidden)return null;if("country"===e.key){const n="shipping"===i?E:f;return Object(c.createElement)(n,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:p.country,autoComplete:e.autocomplete,onChange:e=>s({...p,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const n="shipping"===i?v:w;return Object(c.createElement)(n,{key:e.key,id:`${t}-${e.key}`,country:p.country,label:e.required?e.label:e.optionalLabel,value:p.state,autoComplete:e.autocomplete,onChange:e=>s({...p,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(c.createElement)(a.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:p[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>s({...p,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},336:function(e,t,n){"use strict";var c=n(0),a=n(1),o=n(129),r=n(168),s=n(13),l=n(2);n(275);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:n,isRemovingCoupon:p,removeCoupon:u,values:b}=e;const{total_discount:d,total_discount_tax:m}=b,g=parseInt(d,10);if(!g&&0===t.length)return null;const O=parseInt(m,10),j=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+O:g,h=Object(s.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(c.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:n,description:0!==h.length&&Object(c.createElement)(o.a,{screenReaderLabel:Object(a.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:p,showSpinner:!1},Object(c.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},h.map(e=>Object(c.createElement)(r.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(a.sprintf)( +/* translators: %s Coupon code. */ +Object(a.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:p,onRemove:()=>{u(e.code)},radius:"large",ariaLabel:Object(a.sprintf)( +/* translators: %s is a coupon code. */ +Object(a.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:j?Object(a.__)("Discount","woo-gutenberg-products-block"):Object(a.__)("Coupons","woo-gutenberg-products-block"),value:j?-1*j:"-"})}},337:function(e,t,n){"use strict";var c=n(0),a=n(1),o=n(227),r=n(281),s=n(21),l=n(129),i=n(12),p=n(160),u=n(235),b=n(13);n(276),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:n=!1,initialOpen:i=!1,onSubmit:d=(()=>{})}=e;const[m,g]=Object(c.useState)(""),O=Object(c.useRef)(!1),{getValidationError:j,getValidationErrorId:h}=Object(p.b)(),E=j("coupon");Object(c.useEffect)(()=>{O.current!==n&&(n||!m||E||g(""),O.current=n)},[n,m,E]);const f="wc-block-components-totals-coupon__input-"+t;return Object(c.createElement)(b.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(c.createElement)(s.a,{label:Object(a.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:f})},Object(c.createElement)(l.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:n,showSpinner:!1},Object(c.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(c.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(c.createElement)(r.a,{id:f,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:h(f),onChange:e=>{g(e)},focusOnMount:!0,showError:!1}),Object(c.createElement)(o.a,{className:"wc-block-components-totals-coupon__button",disabled:n||!m,showSpinner:n,onClick:e=>{e.preventDefault(),d(m)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(c.createElement)(u.a,{propertyName:"coupon",elementId:f}))))})},341:function(e,t,n){"use strict";var c=n(0),a=n(1),o=n(96),r=n(13),s=n(22),l=n(2);n(278),t.a=e=>{let{currency:t,values:n}=e;const i=Object(l.getSetting)("taxesEnabled",!0)&&Object(l.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:u}=n,{receiveCart:b,...d}=Object(s.a)(),m=Object(r.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(a.__)("Total","woo-gutenberg-products-block"),extensions:d.extensions,arg:{cart:d}}),g=parseInt(u,10);return Object(c.createElement)(r.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:m,value:parseInt(p,10),description:i&&0!==g&&Object(c.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(c.createInterpolateElement)(Object(a.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(c.createElement)(o.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},357:function(e,t,n){"use strict";var c=n(10),a=n.n(c),o=n(0),r=n(4),s=n.n(r),l=n(1),i=n(22),p=n(13),u=n(2),b=n(19);const d=e=>{let{selectedShippingRates:t}=e;return Object(o.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(b.decodeEntities)(t.join(", ")))};var m=n(116),g=n(262),O=e=>{let{hasRates:t,shippingRates:n,shippingRatesLoading:c}=e;const a=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(o.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(o.createElement)("legend",{className:"screen-reader-text"},a),Object(o.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(o.createElement)(m.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:n,shippingRatesLoading:c}))},j=n(44),h=n(227),E=n(11),f=n.n(E),_=n(160),k=(n(250),n(304)),v=e=>{let{address:t,onUpdate:n,addressFields:c}=e;const[a,r]=Object(o.useState)(t),{hasValidationErrors:s,showAllValidationErrors:i}=Object(_.b)();return Object(o.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(o.createElement)(k.a,{fields:c,onChange:r,values:a}),Object(o.createElement)(h.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:f()(a,t),onClick:e=>{if(e.preventDefault(),i(),!s)return n(a)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},w=e=>{let{onUpdate:t=(()=>{}),addressFields:n=["country","state","city","postcode"]}=e;const{shippingAddress:c,setShippingAddress:a}=Object(j.b)();return Object(o.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(o.createElement)(v,{address:c,addressFields:n,onUpdate:e=>{a(e),t(e)}}))},y=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const n=Object(u.getSetting)("shippingCountries",{}),c=Object(u.getSetting)("shippingStates",{}),a="string"==typeof n[t.country]?Object(b.decodeEntities)(n[t.country]):"",r="object"==typeof c[t.country]&&"string"==typeof c[t.country][t.state]?Object(b.decodeEntities)(c[t.country][t.state]):t.state,s=[];s.push(t.postcode.toUpperCase()),s.push(t.city),s.push(r),s.push(a);const i=s.filter(Boolean).join(", ");return i?Object(o.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)( +/* translators: %s location. */ +Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" "):null};n(277);const C=e=>{let{label:t=Object(l.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}=e;return Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{c(!n)},"aria-expanded":n},t)},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c,shippingAddress:a}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(y,{address:a}),t&&Object(o.createElement)(C,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}))},S=e=>{let{showCalculator:t,isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c,isCheckout:a=!1}=e;return t?Object(o.createElement)(C,{isShippingCalculatorOpen:n,setIsShippingCalculatorOpen:c}):Object(o.createElement)("em",null,a?Object(l.__)("No shipping options available","woo-gutenberg-products-block"):Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:n,showCalculator:c=!0,showRateSelector:r=!0,isCheckout:b=!1,className:m}=e;const[g,j]=Object(o.useState)(!1),{shippingAddress:h,cartHasCalculatedShipping:E,shippingRates:f,shippingRatesLoading:_}=Object(i.a)(),k=Object(u.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(n.total_shipping,10)+parseInt(n.total_shipping_tax,10):parseInt(n.total_shipping,10),v=f.some(e=>e.shipping_rates.length)||k,y={isShippingCalculatorOpen:g,setIsShippingCalculatorOpen:j},C=f.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(o.createElement)("div",{className:s()("wc-block-components-totals-shipping",m)},Object(o.createElement)(p.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:v&&E?k:Object(o.createElement)(S,a()({showCalculator:c,isCheckout:b},y)),description:v&&E?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d,{selectedShippingRates:C}),Object(o.createElement)(N,a()({shippingAddress:h,showCalculator:c},y))):null,currency:t}),c&&g&&Object(o.createElement)(w,{onUpdate:()=>{j(!1)}}),r&&E&&Object(o.createElement)(O,{hasRates:v,shippingRates:f,shippingRatesLoading:_}))}},390:function(e,t,n){"use strict";n.r(t);var c=n(110),a=n(0),o=n(1),r=n(336),s=n(337),l=n(357),i=n(341),p=n(13),u=n(40),b=n(22),d=n(240),m=n(2),g=n(224),O={isShippingCalculatorEnabled:{type:"boolean",default:Object(m.getSetting)("isShippingCalculatorEnabled",!0)},showRateAfterTaxName:{type:"boolean",default:Object(m.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{move:!0,remove:!0}}};t.default=Object(c.withFilteredAttributes)(O)(e=>{let{className:t,showRateAfterTaxName:n=!1,isShippingCalculatorEnabled:c=!0}=e;const{cartFees:O,cartTotals:j,cartNeedsShipping:h}=Object(b.a)(),{applyCoupon:E,removeCoupon:f,isApplyingCoupon:_,isRemovingCoupon:k,appliedCoupons:v}=Object(d.a)(),w=Object(u.getCurrencyFromPriceResponse)(j),{extensions:y,receiveCart:C,...N}=Object(b.a)(),S={extensions:y,cart:N},R={extensions:y,cart:N};return Object(a.createElement)("div",{className:t},Object(a.createElement)(g.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(o.__)("Cart totals","woo-gutenberg-products-block")),Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(p.Subtotal,{currency:w,values:j}),Object(a.createElement)(p.TotalsFees,{currency:w,cartFees:O}),Object(a.createElement)(r.a,{cartCoupons:v,currency:w,isRemovingCoupon:k,removeCoupon:f,values:j})),Object(m.getSetting)("couponsEnabled",!0)&&Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(s.a,{onSubmit:E,isLoading:_})),Object(a.createElement)(p.ExperimentalDiscountsMeta.Slot,R),h&&Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(l.a,{showCalculator:c,showRateSelector:!0,values:j,currency:w})),!Object(m.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(j.total_tax,10)>0&&Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(p.TotalsTaxes,{showRateAfterTaxName:n,currency:w,values:j})),Object(a.createElement)(p.TotalsWrapper,null,Object(a.createElement)(i.a,{currency:w,values:j})),Object(a.createElement)(p.ExperimentalOrderMeta.Slot,S))})},96:function(e,t,n){"use strict";var c=n(10),a=n.n(c),o=n(0),r=n(131),s=n(4),l=n.n(s);n(159);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:c,onValueChange:s,displayType:p="text",...u}=e;const b="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(b))return null;const d=b/10**c.minorUnit;if(!Number.isFinite(d))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...u,...i(c),value:void 0,currency:void 0,onValueChange:void 0},O=s?e=>{const t=+e.value*10**c.minorUnit;s(t)}:()=>{};return Object(o.createElement)(r.a,a()({className:m,displayType:p},g,{value:d,onValueChange:O}))}},98:function(e,t,n){"use strict";var c=n(0);t.a=function(e){let{srcElement:t,size:n=24,...a}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:n,height:n,...a}):null}}}]); \ No newline at end of file diff --git a/build/cart-blocks/totals-frontend.js b/build/cart-blocks/totals-frontend.js new file mode 100644 index 00000000000..75874d9dc9b --- /dev/null +++ b/build/cart-blocks/totals-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[29],{334:function(e,c){},335:function(e,c,t){"use strict";var a=t(0),n=t(3),s=t(4),r=t.n(s);const l=Object(n.forwardRef)((e,c)=>{let{children:t,className:n=""}=e;return Object(a.createElement)("div",{ref:c,className:r()("wc-block-components-sidebar",n)},t)});c.a=l},378:function(e,c,t){"use strict";t.r(c);var a=t(0),n=t(4),s=t.n(n),r=t(335);t(334),c.default=e=>{let{children:c,className:t}=e;return Object(a.createElement)(r.a,{className:s()("wc-block-cart__sidebar",t)},c)}}}]); \ No newline at end of file diff --git a/build/cart-frontend.asset.php b/build/cart-frontend.asset.php new file mode 100644 index 00000000000..422269199d6 --- /dev/null +++ b/build/cart-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '41e298010000a80fb68cdea8184d5a0f'); \ No newline at end of file diff --git a/build/cart-frontend.js b/build/cart-frontend.js new file mode 100644 index 00000000000..93759a749cb --- /dev/null +++ b/build/cart-frontend.js @@ -0,0 +1,6 @@ +!function(e){function t(t){for(var r,o,i=t[0],a=t[1],s=0,l=[];s{let{imageUrl:t=c.l+"/block-error.svg",header:r=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),l&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(37);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:a,button:s}=this.props,{errorMessage:c,hasError:u}=this.state;return u?"function"==typeof a?a({errorMessage:c}):Object(i.createElement)(l,{errorMessage:r?c:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:s}):this.props.children}}t.a=u},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0),o=r(11),i=r.n(o);function a(e){const t=Object(n.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0);r(9);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),i=()=>Object(n.useContext)(o)},function(e,t){e.exports=window.wp.htmlEntities},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r(5),o=r(0),i=r(6),a=r(9),s=r(19),c=r(70),l=r(109),u=r(18),d=r(67);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(i.CART_STORE_KEY).invalidateResolutionForStore()},f=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),f),[])},h={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},b={...h,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:i.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},y=e=>Object(c.a)(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(s.decodeEntities)(r)]})),E={cartCoupons:i.EMPTY_CART_COUPONS,cartItems:i.EMPTY_CART_ITEMS,cartFees:i.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:i.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:i.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:h,shippingRates:i.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:i.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:i.EMPTY_EXTENSIONS},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(u.a)(),s=null==r?void 0:r.previewCart,{shouldSelect:c}=e,d=Object(o.useRef)();m();const p=Object(a.useSelect)((e,r)=>{let{dispatch:n}=r;if(!c)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:i.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:i.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:h,extensions:i.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const o=e(i.CART_STORE_KEY),a=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),f=o.isCustomerDataUpdating(),{receiveCart:m}=n(i.CART_STORE_KEY),g=y(a.billingAddress),v=a.needsShipping?y(a.shippingAddress):g,O=a.fees.length>0?a.fees.map(e=>y(e)):i.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):i.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:O,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(l.a)(g),shippingAddress:Object(l.a)(v),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:f,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}},[c]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wp.a11y},function(e,t){e.exports=window.wp.primitives},,function(e,t,r){"use strict";(function(e){var n=r(0);r(45);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(65))},function(e,t){e.exports=window.wp.apiFetch},,function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var n=r(35);let o,i;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(i||(i={}));const a=(e,t)=>Object(n.c)(e)&&"type"in e&&e.type===t,s=e=>a(e,o.SUCCESS),c=e=>a(e,o.ERROR),l=e=>a(e,o.FAIL),u=e=>!Object(n.c)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:i,shouldRetry:u,isSuccessResponse:s,isErrorResponse:c,isFailResponse:l})},function(e,t){e.exports=window.wp.deprecated},function(e,t,r){"use strict";r.d(t,"b",(function(){return T})),r.d(t,"a",(function(){return P}));var n=r(0),o=r(1),i=r(62),a=r(30),s=r.n(a),c=r(35);let l;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(l||(l={}));const u=()=>({type:l.SET_IDLE}),d=e=>({type:l.SET_REDIRECT_URL,redirectUrl:e}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l.SET_COMPLETE,data:e}},f=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?l.SET_HAS_ERROR:l.SET_NO_ERROR}};var m=r(2);let h;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(h||(h={}));const b={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},g={redirectUrl:"",status:h.PRISTINE,hasError:!1,calculatingCount:0,orderId:b.order_id,orderNotes:"",customerId:b.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:i,extensionData:a,shouldCreateAccount:s,data:c}=arguments.length>1?arguments[1]:void 0,u=e;switch(r){case l.SET_PRISTINE:u=g;break;case l.SET_IDLE:u=e.status!==h.IDLE?{...e,status:h.IDLE}:e;break;case l.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case l.SET_PROCESSING_RESPONSE:u={...e,processingResponse:c};break;case l.SET_COMPLETE:u=e.status!==h.COMPLETE?{...e,status:h.COMPLETE,redirectUrl:void 0!==c&&"string"==typeof c.redirectUrl&&c.redirectUrl?c.redirectUrl:e.redirectUrl}:e;break;case l.SET_PROCESSING:u=e.status!==h.PROCESSING?{...e,status:h.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case l.SET_BEFORE_PROCESSING:u=e.status!==h.BEFORE_PROCESSING?{...e,status:h.BEFORE_PROCESSING,hasError:!1}:e;break;case l.SET_AFTER_PROCESSING:u=e.status!==h.AFTER_PROCESSING?{...e,status:h.AFTER_PROCESSING}:e;break;case l.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===h.PROCESSING||e.status===h.BEFORE_PROCESSING?{...u,status:h.IDLE}:u;break;case l.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case l.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case l.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case l.SET_CUSTOMER_ID:u=void 0!==n?{...e,customerId:n}:e;break;case l.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case l.SET_SHOULD_CREATE_ACCOUNT:void 0!==s&&s!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:s});break;case l.SET_ORDER_NOTES:void 0!==i&&e.orderNotes!==i&&(u={...e,orderNotes:i});break;case l.SET_EXTENSION_DATA:void 0!==a&&e.extensionData!==a&&(u={...e,extensionData:a})}return u!==e&&r!==l.SET_PRISTINE&&u.status===h.PRISTINE&&(u.status=h.IDLE),u};var E=r(19),v=r(89),O=r(169);var S=r(170),_=r(160),j=r(32),w=r(38),k=r(9),C=r(29);const R=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),T=()=>Object(n.useContext)(R),P=e=>{let{children:t,redirectUrl:r,isCart:a=!1}=e;g.redirectUrl=r;const[m,b]=Object(n.useReducer)(y,g),{setValidationErrors:T}=Object(_.b)(),{addErrorNotice:P,removeNotices:x}=Object(j.a)(),{dispatchCheckoutEvent:A}=Object(w.a)(),N=m.calculatingCount>0,{isSuccessResponse:M,isErrorResponse:I,isFailResponse:D,shouldRetry:L}=Object(C.c)(),{checkoutNotices:F,paymentNotices:V,expressPaymentNotices:B}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(k.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(k.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(k.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,H]=Object(n.useReducer)(v.b,{}),G=Object(n.useRef)(U),{onCheckoutAfterProcessingWithSuccess:z,onCheckoutAfterProcessingWithError:W,onCheckoutValidationBeforeProcessing:q}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(O.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(O.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(O.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{G.current=U},[U]);const Y=Object(n.useMemo)(()=>function(){return s()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),X=Object(n.useMemo)(()=>({resetCheckout:()=>{b({type:l.SET_PRISTINE})},setRedirectUrl:e=>{b(d(e))},setHasError:e=>{b(f(e))},incrementCalculating:()=>{b({type:l.INCREMENT_CALCULATING})},decrementCalculating:()=>{b({type:l.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;b((t=e,{type:l.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{b((e=>({type:l.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{b((e=>({type:l.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{b((e=>({type:l.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(E.decodeEntities)(n)})),"message"in e&&(t.message=Object(E.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;t.redirectUrl&&b(d(t.redirectUrl)),b((r=t,{type:l.SET_PROCESSING_RESPONSE,data:r})),b({type:l.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{m.status===h.BEFORE_PROCESSING&&(x("error"),Object(S.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;P(t),T(r)}),b(u()),b(f())):b({type:l.SET_PROCESSING})}))},[m.status,T,P,x,b]);const $=Object(i.a)(m.status),K=Object(i.a)(m.hasError);Object(n.useEffect)(()=>{if((m.status!==$||m.hasError!==K)&&m.status===h.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(S.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message){const r=e.messageContext?{context:e.messageContext}:void 0;t=e,P(e.message,r)}}),t})(t);if(null!==r)L(r)?b(u()):b(p(r));else{if(!(F.some(e=>"error"===e.status)||B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");P(t,{id:"checkout"})}b(u())}}):Object(S.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{M(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)b(p(t));else if(Object(c.c)(r)){if(r.message){const e=r.messageContext?{context:r.messageContext}:void 0;P(r.message,e)}L(r)?b(f(!0)):b(p(r))}else b(p())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,$,K,X,P,I,D,M,L,F,B,V]);const J={onSubmit:Object(n.useCallback)(()=>{A("submit"),b({type:l.SET_BEFORE_PROCESSING})},[A]),isComplete:m.status===h.COMPLETE,isIdle:m.status===h.IDLE,isCalculating:N,isProcessing:m.status===h.PROCESSING,isBeforeProcessing:m.status===h.BEFORE_PROCESSING,isAfterProcessing:m.status===h.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:Y,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:z,onCheckoutAfterProcessingWithError:W,dispatchActions:X,isCart:a,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return b((t=e,{type:l.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(n.createElement)(R.Provider,{value:J},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(87);const i=()=>{const{notices:e,createNotice:t,removeNotice:r,setIsSuppressed:i}=Object(o.b)(),a=Object(n.useRef)(e);Object(n.useEffect)(()=>{a.current=e},[e]);const s=Object(n.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||r(t.id)})},removeNotice:r}),[r]),c=Object(n.useMemo)(()=>({addDefaultNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...r})},addErrorNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...r})},addWarningNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...r})},addInfoNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...r})},addSuccessNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...r})}}),[t]);return{notices:e,...s,...c,setIsSuppressed:i}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return y}));var n=r(0),o=r(2),i=r(9),a=r(6),s=r(52),c=r(11),l=r.n(c),u=r(109),d=r(88),p=r(22),f=r(32);const m=(e,t)=>!(!function(e){return"email"in e}(t)||Object(u.c)(t)===Object(u.c)(e))||!!t.country&&!l()(Object(u.b)(e),Object(u.b)(t));var h=r(31);const b=Object(n.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),g=()=>Object(n.useContext)(b),y=e=>{let{children:t}=e;const{billingData:r,shippingAddress:c,setBillingData:l,setShippingAddress:u}=(()=>{const{updateCustomerData:e}=Object(i.useDispatch)(a.CART_STORE_KEY),{addErrorNotice:t,removeNotice:r}=Object(f.a)(),{billingAddress:o,shippingAddress:c,cartIsLoading:l}=Object(p.a)(),[u,h]=Object(n.useState)(!1),[b,g]=Object(n.useState)({billingData:o,shippingAddress:c}),y=Object(n.useRef)(b);Object(n.useEffect)(()=>{if(u||l)return;const e={billingData:o,shippingAddress:c};y.current=e,g(e),h(!0)},[l,u,o,c]);const E=Object(n.useCallback)(e=>{g(t=>({...t,billingData:{...t.billingData,...e}}))},[]),v=Object(n.useCallback)(e=>{g(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]),O=Object(s.a)(()=>{const n={};m(y.current.billingData,b.billingData)&&(n.billing_address=b.billingData),m(y.current.shippingAddress,b.shippingAddress)&&(n.shipping_address=b.shippingAddress),0!==Object.keys(n).length&&(y.current=b,e(n).then(()=>{r("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})}))},1e3);return Object(n.useEffect)(()=>{u&&O()},[u,b,O]),{billingData:b.billingData,shippingAddress:b.shippingAddress,setBillingData:E,setShippingAddress:v}})(),{cartNeedsShipping:g}=Object(p.a)(),{customerId:y}=Object(h.b)(),[E,v]=Object(n.useState)(()=>{return g&&(!y||(e=c,t=r,Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r])));var e,t}),O={billingData:r,shippingAddress:c,setBillingData:l,setShippingAddress:u,shippingAsBilling:E,setShippingAsBilling:v};return Object(n.createElement)(b.Provider,{value:O},t)}},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return a})),r.d(t,"a",(function(){return s}));const n=e=>"number"==typeof e,o=e=>"string"==typeof e,i=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function a(e,t){return i(e)&&t in e}const s=e=>"boolean"==typeof e},,function(e,t){},function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(48),o=r(0),i=r(22);const a=()=>{const e=Object(i.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,function(e,t){e.exports=window.wc.priceFormat},,function(e,t,r){"use strict";var n=r(43);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.d(t,"b",(function(){return j})),r.d(t,"a",(function(){return w}));var n=r(0),o=r(11),i=r.n(o),a=r(70);const s=e=>Object(a.a)(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),c={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},l={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},u={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:c,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:r}=t;return Object.values(c).includes(r)?r:e};var p=r(89),f=r(169);const m=e=>({onSuccess:Object(f.a)("shipping_rates_success",e),onFail:Object(f.a)("shipping_rates_fail",e),onSelectSuccess:Object(f.a)("shipping_rate_select_success",e),onSelectFail:Object(f.a)("shipping_rate_select_fail",e)});var h=r(170),b=r(31),g=r(33),y=r(22),E=r(99);const{NONE:v,INVALID_ADDRESS:O,UNKNOWN:S}=c,_=Object(n.createContext)(u),j=()=>Object(n.useContext)(_),w=e=>{let{children:t}=e;const{dispatchActions:r}=Object(b.b)(),{shippingAddress:o,setShippingAddress:a}=Object(g.b)(),{cartNeedsShipping:u,cartHasCalculatedShipping:f,shippingRates:j,shippingRatesLoading:w,cartErrors:k}=Object(y.a)(),{selectShippingRate:C,isSelectingRate:R}=Object(E.a)(),[T,P]=Object(n.useReducer)(d,v),[x,A]=Object(n.useReducer)(p.b,{}),N=Object(n.useRef)(x),M=Object(n.useMemo)(()=>({onShippingRateSuccess:m(A).onSuccess,onShippingRateFail:m(A).onFail,onShippingRateSelectSuccess:m(A).onSelectSuccess,onShippingRateSelectFail:m(A).onSelectFail}),[A]);Object(n.useEffect)(()=>{N.current=x},[x]);const I=Object(n.useRef)(()=>s(j));Object(n.useEffect)(()=>{const e=s(j);i()(I.current,e)||(I.current=e)},[j]),Object(n.useEffect)(()=>{w?r.incrementCalculating():r.decrementCalculating()},[w,r]),Object(n.useEffect)(()=>{R?r.incrementCalculating():r.decrementCalculating()},[R,r]),Object(n.useEffect)(()=>{k.length>0&&k.some(e=>!(!e.code||!Object.values(l).includes(e.code)))?P({type:O}):P({type:v})},[k]);const D=Object(n.useMemo)(()=>({isPristine:T===v,isValid:T===v,hasInvalidAddress:T===O,hasError:T===S||T===O}),[T]);Object(n.useEffect)(()=>{w||0!==j.length&&!D.hasError||Object(h.a)(N.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[j,w,D.hasError,D.hasInvalidAddress]),Object(n.useEffect)(()=>{!w&&j.length>0&&!D.hasError&&Object(h.a)(N.current,"shipping_rates_success",j)},[j,w,D.hasError]),Object(n.useEffect)(()=>{R||(D.hasError?Object(h.a)(N.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(h.a)(N.current,"shipping_rate_select_success",I.current))},[R,D.hasError,D.hasInvalidAddress]);const L={shippingErrorStatus:D,dispatchErrorStatus:P,shippingErrorTypes:c,shippingRates:j,shippingRatesLoading:w,selectedRates:I.current,setSelectedRates:C,isSelectingRate:R,shippingAddress:o,setShippingAddress:a,needsShipping:u,hasCalculatedShipping:f,...M};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(_.Provider,{value:L},t))}},function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";var n=r(7),o=r(0),i=r(24),a=function({icon:e,className:t,...r}){const i=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:i},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(a,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&a===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===i.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(i.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(4),o=r.n(n),i=r(0);t.a=Object(i.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(i.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},function(e,t){e.exports=window.wp.hooks},,function(e,t,r){"use strict";var n=r(2),o=r(1),i=r(35);const a=Object(n.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(i.b)(e.priority)&&(t.index=e.priority),Object(i.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},c=Object.entries(a).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,s(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==c[r]?c[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),a=Object(n.useRef)(0),s=Object(n.useRef)(null),c=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=c.current,r=l.current;return c.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(s.current),s.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-i.current,n=e-a.current;return!i.current||r>=t||r<0||b&&n>=g},y=function(t){return s.current=null,h&&c.current?e(t):(c.current=l.current=null,u.current)},E=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-i.current,s=e-a.current,c=t-o,l=b?Math.min(c,g-s):c;r(E,l)}},v=function(){for(var d=[],f=0;f{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const c=n(e,r),l=s(e,r),u={...e.dataset,...c.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:c={}}=e;Object(i.render)(Object(i.createElement)(a.a,c,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:c,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const a=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const a=i.querySelectorAll(o);c({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,r){"use strict";var n=r(7),o=r(0),i=r(4),a=r.n(i),s=r(5),c=r(30),l=r.n(c),u=r(12),d=r(60),p=r(90),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const i=o.getBoundingClientRect();return new n.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function y(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var E=r(26);function v(e){const t=Object(o.useContext)(E.a),r=t.slots[e]||{},n=t.fills[e],i=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:i,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function S({name:e,children:t,registerFill:r,unregisterFill:n}){const i=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,i]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(i(t(e)),r(()=>{i(t(e))})),[e]),n})(e),a=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,a.current),()=>n(e,a.current)),[]),Object(o.useLayoutEffect)(()=>{a.current.children=t,i&&i.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==a.current.name&&(n(a.current.name,a.current),a.current.name=e,r(e,a.current))},[e]),i&&i.node?(Object(s.isFunction)(t)&&(t=t(i.props.fillProps)),Object(o.createPortal)(t,i.node)):null}var _=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(S,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class j extends o.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:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,i=Object(s.map)(n(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(i):i)}}var w=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:i})=>Object(o.createElement)(j,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:i})));function k(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:k()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...i},a){const s=Object(o.useContext)(E.a),c=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,c,t),()=>{s.unregisterSlot(e,c)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([a,c])},i))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(_,e),Object(o.createElement)(C,e))}r(11),o.Component;const P=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(w,t));function x(e){return"appear"===e?"top":"left"}function A(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:i}=(a=t).ownerDocument.defaultView.getComputedStyle(a);var a;const s=r?parseInt(r,10):0,c=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-c,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-c}}function N(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:i,noArrow:s=!0,isAlternate:c,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:E,shouldAnchorIncludePadding:O,anchorRect:S,getAnchorRect:_,expandOnMobile:j,animate:w=!0,onClickOutside:k,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:P="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),G=Object(o.useRef)(null),z=Object(o.useRef)(),W=Object(u.useViewportMatch)("medium","<"),[q,X]=Object(o.useState)(),$=v(P),K=j&&W,[J,Q]=Object(u.useResizeObserver)();s=K||s,Object(o.useLayoutEffect)(()=>{if(K)return I(z.current,"is-without-arrow",s),I(z.current,"is-alternate",c),N(z.current,"data-x-axis"),N(z.current,"data-y-axis"),M(z.current,"top"),M(z.current,"left"),M(G.current,"maxHeight"),void M(G.current,"maxWidth");const e=()=>{if(!z.current||!G.current)return;let e=function(e,t,r,n=!1,o,i){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,i);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,i);return o?e:A(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=m(new window.DOMRect(r.left,r.top,r.width,a.bottom-r.top),e.ownerDocument,i);return o?s:A(s,n)}if(!e.current)return;const{parentNode:a}=e.current,s=a.getBoundingClientRect();return o?s:A(s,a)}(H,S,_,E,O,z.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=z.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var i;L&&(n=null===(i=z.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const a=Q.height?Q:G.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:y}=function(e,t,r="top",n,o,i,a,s,c){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,i,a,s){const{height:c}=t;if(o){const t=o.getBoundingClientRect().top+c-a;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-c/2>0?c/2:l)+(l+c/2>window.innerHeight?window.innerHeight-l:c/2)},d={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let f,m=r,h=null;if(!o&&!s)if("middle"===r&&u.contentHeight===c)m="middle";else if("top"===r&&d.contentHeight===c)m="top";else if("bottom"===r&&p.contentHeight===c)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==c?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,i,s);return{...function(e,t,r,n,o,i,a,s,c){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===i||c||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===i||c||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,y=r,E=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)y="center";else if("left"===r&&h.contentWidth===l)y="left";else if("right"===r&&b.contentWidth===l)y="right";else{y=h.contentWidth>b.contentWidth?"left":"right";const e="left"===y?h.contentWidth:b.contentWidth;l>window.innerWidth&&(E=window.innerWidth),e!==l&&(y="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===y?d.popoverLeft:"left"===y?h.popoverLeft:b.popoverLeft,a){const e=a.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:y,popoverLeft:g,contentWidth:E}}(e,t,u,d,n,p.yAxis,a,s,c),...p}}(e,a,h,R,z.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(M(z.current,"top",l+"px"),M(z.current,"left",u+"px")),I(z.current,"is-without-arrow",s||"center"===p&&"middle"===b),I(z.current,"is-alternate",c),N(z.current,"data-x-axis",p),N(z.current,"data-y-axis",b),M(G.current,"maxHeight","number"==typeof g?g+"px":""),M(G.current,"maxWidth","number"==typeof y?y+"px":""),X(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=z.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const i=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",i),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(E);let l;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",i),r.cancelAnimationFrame(o),a&&a!==t&&(a.defaultView.removeEventListener("resize",e),a.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[K,S,_,E,O,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&k){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),k(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([z,ee,U]),ne=Boolean(w&&q)&&function(e){if("loading"===e.type)return a()("components-animate__loading");const{type:t,origin:r=x(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return a()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(n.a)({className:a()("components-popover",i,ne,{"is-expanded":K,"is-without-arrow":s,"is-alternate":c})},B,{ref:re},te,{tabIndex:"-1"}),K&&Object(o.createElement)(y,null),K&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Y,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:G,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return $.ref&&(oe=Object(o.createElement)(T,{name:P},oe)),E||S?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(P,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(s.isString)(e)&&(r=e),Object(s.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var G=function({children:e,position:t,text:r,shortcut:n}){const[i,a]=Object(o.useState)(!1),[c,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),a(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),a(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],n.type);o!==c&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const y={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},E=o.Children.only(e),{children:v,disabled:O}=E.props;return(O?B:U)({child:E,eventHandlers:y,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:i})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:c,position:t,text:r,shortcut:n})})},z=r(46),W=r(47);const q=["onMouseDown","onClick"];var Y=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:i,isSmall:c,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:y,tooltipPosition:E,shortcut:v,label:O,children:S,text:_,variant:j,__experimentalIsFocusable:w,describedBy:k,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:i,...a}){let s=i;var c,u,d,p,f;return t&&(null!==(c=s)&&void 0!==c||(s="primary")),n&&(null!==(u=s)&&void 0!==u||(s="tertiary")),r&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(f=s)&&void 0!==f||(s="link")),{...a,variant:s}}(e),R=a()("components-button",f,{"is-secondary":"secondary"===j,"is-primary":"primary"===j,"is-small":c,"is-tertiary":"tertiary"===j,"is-pressed":u,"is-busy":d,"is-link":"link"===j,"is-destructive":p,"has-text":!!h&&!!S,"has-icon":!!h}),T=m&&!w,P=void 0===r||T?"button":"a",x="a"===P?{href:r,target:i}:{type:"button",disabled:T,"aria-pressed":u};if(m&&w){x["aria-disabled"]=!0;for(const e of q)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!T&&(y&&O||v||!!O&&(!S||Object(s.isArray)(S)&&!S.length)&&!1!==y),N=k?Object(s.uniqueId)():null,M=C["aria-describedby"]||N,I=Object(o.createElement)(P,Object(n.a)({},x,C,{className:R,"aria-label":C["aria-label"]||O,"aria-describedby":M,ref:t}),h&&"left"===b&&Object(o.createElement)(z.a,{icon:h,size:g}),_&&Object(o.createElement)(o.Fragment,null,_),h&&"right"===b&&Object(o.createElement)(z.a,{icon:h,size:g}),S);return A?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(G,{text:k||O,shortcut:v,position:E},I),k&&Object(o.createElement)(W.a,null,Object(o.createElement)("span",{id:N},k))):Object(o.createElement)(o.Fragment,null,I,k&&Object(o.createElement)(W.a,null,Object(o.createElement)("span",{id:N},k)))}))},function(e,t,r){var n=r(76),o=r(58),i=o.setStyleProp,a=n.html,s=n.svg,c=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],c(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(s,t)?d[(u=s[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return i(e.style,d),d}},function(e,t,r){var n=r(3),o=r(80).default,i={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,i={},a={};for(r in e)n=e[r],o&&(i=t(r,n))&&2===i.length?a[i[0]]=i[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,i))}}},function(e,t,r){for(var n,o=r(86).CASE_SENSITIVE_TAG_NAMES,i={},a=0,s=o.length;a{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,,function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c,l=[],u=!1,d=-1;function p(){u&&c&&(u=!1,c.length?l=c.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(c=l,l=[];++d1)for(var r=1;r{let{bubbles:r=!1,cancelable:o=!1,element:i,detail:a={}}=t;if(!n)return;i||(i=document.body);const s=new n(e,{bubbles:r,cancelable:o,detail:a});i.dispatchEvent(s)};let i;const a=()=>{i&&clearTimeout(i),i=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const i=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,i),()=>jQuery(document).off(e,i)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},function(e,t,r){"use strict";var n=r(10),o=r.n(n),i=r(0);r(101);const a=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(i.useRef)(null);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(i.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];a(e),null==e||e.focus()}else a(e)})(e,r):a(e))})(r.current,e)}})))}},,,function(e,t){},function(e,t,r){var n=r(3),o=r(57),i=r(58),a=i.setStyleProp;function s(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var i,c,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,y=0,E=t.length;y1&&(c=p(c,{key:c.key||y})),h.push(c);else if("text"!==i.type){switch(l=i.attribs,s(i)?a(l.style,l):l&&(l=o(l)),u=null,i.type){case"script":case"style":i.children[0]&&(l.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?l.defaultValue=i.children[0].data:i.children&&i.children.length&&(u=e(i.children,r));break;default:continue}E>1&&(l.key=y),h.push(f(i.name,l,u))}else g?i.data.trim()&&h.push(i.data):h.push(i.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(77),o=r(78),i=r(79),a=i.MUST_USE_PROPERTY,s=i.HAS_BOOLEAN_VALUE,c=i.HAS_NUMERIC_VALUE,l=i.HAS_POSITIVE_NUMERIC_VALUE,u=i.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,i,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),i=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(i,a),hasBooleanValue:d(i,s),hasNumericValue:d(i,c),hasPositiveNumericValue:d(i,l),hasOverloadedBooleanValue:d(i,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(81)),i=r(83);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[i.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(82);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var i,a,s=n(e),c="function"==typeof t,l=0,u=s.length;l/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(s);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),i(n(e),null,t)}},function(e,t,r){var n=r(59),o=/<([a-zA-Z]+[0-9]?)/,i=//i,a=//i,s=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,c=n.isIE(9),l=c||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=c?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+""),c&&(e=e.replace(s,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,s,c=e.match(o);switch(c&&c[1]&&(t=c[1].toLowerCase()),t){case"html":return r=d(e),i.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return s=u(e).getElementsByTagName(t),a.test(e)&&i.test(e)?s[0].parentNode.childNodes:s;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return b}));var n=r(0),o=(r(8),r(9)),i=r(38),a=r(18),s=r(10),c=r.n(s),l=r(4),u=r.n(l),d=r(116);r(74);const p=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 f=e=>{let{className:t,notices:r,removeNotice:o}=e;const i=r.filter(e=>"snackbar"!==e.type);if(!i.length)return null;const a=u()(t,"wc-block-components-notices");return Object(n.createElement)("div",{className:a},i.map(e=>Object(n.createElement)(d.a,c()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(n.createContext)({notices:[],createNotice:(e,t,r)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),h=()=>Object(n.useContext)(m),b=e=>{let{children:t,className:r="",createNoticeContainer:s=!0,context:c="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(n.useState)(!1),{dispatchStoreEvent:h}=Object(i.a)(),{isEditor:b}=Object(a.a)(),g=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...r,context:r.context||c}),h("store-notice-create",{status:e,content:t,options:r})}),[l,h,c]),y=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;u(e,t)}),[u,c]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(c)}),[c]),v={notices:E,createNotice:g,removeNotice:y,context:c,setIsSuppressed:p},O=d?null:Object(n.createElement)(f,{className:r,notices:v.notices,removeNotice:v.removeNotice,isEditor:b});return Object(n.createElement)(m.Provider,{value:v},s&&O,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},i=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s}));var n=r(5);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const i={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:r,id:n,callback:i,priority:s}=arguments.length>1?arguments[1]:void 0;const c=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return c.set(n,{priority:s,callback:i}),{...e,[r]:c};case o.REMOVE_EVENT_CALLBACK:return c.delete(n),{...e,[r]:c}}}},function(e,t,r){"use strict";var n=r(0),o=r(24);const i=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.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"}));t.a=i},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(10)),i=n(r(120)),a=r(3),s=n(a),c=n(r(121)),l=n(r(123)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=a.useState(!1)[1];return a.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}for(var a=i,s=!1,c=0;c=f.startTime+l.duration;else if(l.decay)b=m+E/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,E=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;Oh:b=e);++r);return r-1}(e,i);return function(e,t,r,n,o,i,a,s,c){var l=c?c(e):e;if(lr){if("identity"===s)return l;"clamp"===s&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,i[t],i[t+1],o[t],o[t+1],c,a,s,n.map)}}var B=function(e){function t(r,n,o,i){var a;return(a=e.call(this)||this).calc=void 0,a.payload=r instanceof E&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],a.calc=V(n,o,i),a}c(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(E),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}c(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(y),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}c(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(E),G=0,z=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=G++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,a=t.to,s=i(t,["delay","to"]);if(u.arr(a)||u.fun(a))this.queue.push(o({},s,{delay:n,to:a}));else if(a){var c={};Object.entries(a).forEach((function(e){var t,r=e[0],i=e[1],a=o({to:(t={},t[r]=i,t),delay:m(n,r)},s),l=c[a.delay]&&c[a.delay].to;c[a.delay]=o({},c[a.delay],a,{to:o({},l,a.to)})})),this.queue=Object.values(c)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,i=e.to,a=void 0===i?{}:i;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(a)&&(t.merged=o({},t.merged,a))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,a){var s=o.delay,c=i(o,["delay"]),l=function(o){a===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(c.to)||u.fun(c.to);s?setTimeout((function(){r===t.guid&&(d?t.runAsync(c,l):t.diff(c).start(l))}),s):d?t.runAsync(c,l):t.diff(c).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,j(x||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,i(e,["delay"])),a=this.local,s=Promise.resolve(void 0);if(u.arr(n.to))for(var c=function(e){var t=e,i=o({},n,h(n.to[t]));u.arr(i.config)&&(i.config=i.config[t]),s=s.then((function(){if(a===r.guid)return new Promise((function(e){return r.diff(i).start(e)}))}))},l=0;l=n.length)return"break";a=n[i++]}else{if((i=n.next()).done)return"break";a=i.value}var r=a.key,s=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(s),e.current.deleted=e.current.deleted.filter(s))},n=e.current.deleted,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var a;if("break"===r())break}e.current.forceUpdate()}var K=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof y||(t=b.transform(t)),r.payload=t,r}return c(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,i=ce(o,n,e+1/3),a=ce(o,n,e),s=ce(o,n,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ae.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=se.exec(t))?parseInt(r[1],16)>>>0:(r=ie.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ee=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}ye=Object.keys(ye).reduce((function(e,t){return Ee.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),ye);var Oe={};N((function(e){return new K(e)})),T("div"),k((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),S(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,a=t.scrollLeft,s=i(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in s){var f=c?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,s[p])}}),(function(e){return e}));var Se,_e,je=(Se=function(e){return a.forwardRef((function(t,r){var n=d(),c=a.useRef(!0),l=a.useRef(null),p=a.useRef(null),f=a.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){c.current=!1,l.current&&l.current.detach()}}),[]),a.useImperativeHandle(r,(function(){return A(p,c,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),y=(m=e,!u.fun(m)||m.prototype instanceof s.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return s.createElement(e,o({},g,{ref:y}))}))},void 0===(_e=!1)&&(_e=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=_e?t[0].toLowerCase()+t.substring(1):t;return e[r]=Se(r),e}),Se)}),we=je(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=je,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=we,t.a=we,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=M,t.useSpring=function(e){var t=u.fun(e),r=W(1,t?e:[e]),n=r[0],o=r[1],i=r[2];return t?[n[0],o,i]:n},t.useTrail=function(e,t){var r=a.useRef(!1),n=u.fun(t),i=m(t),s=a.useRef(),c=W(e,(function(e,t){return 0===e&&(s.current=[]),s.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return s.current[e-1]}})})),l=c[0],d=c[1],p=c[2],f=a.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,a=s.current[n];return o({},e,{config:m(e.config||i.config,t),attach:a&&function(){return a}})}))}}),[e,i.reverse]);return a.useEffect((function(){r.current&&!n&&f(t)})),a.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),s=X(n),c=s.lazy,l=void 0!==c&&c,u=(s.unique,s.reset),p=void 0!==u&&u,f=(s.enter,s.leave,s.update,s.onDestroyed),h=(s.keys,s.items,s.onFrame),b=s.onRest,g=s.onStart,y=s.ref,E=i(s,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=a.useRef(!1),S=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return a.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(S.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(S.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(S.current.instances).map((function(e){return e[1]}))}}})),S.current=function(e,t){for(var r=e.first,n=e.prevProps,a=i(e,["first","prevProps"]),s=X(t),c=s.items,l=s.keys,u=s.initial,d=s.from,p=s.enter,f=s.leave,h=s.update,b=s.trail,g=void 0===b?0:b,y=s.unique,E=s.config,v=s.order,O=void 0===v?["enter","leave","update"]:v,S=X(n),_=S.keys,j=S.items,w=o({},a.current),k=[].concat(a.deleted),C=Object.keys(w),R=new Set(C),T=new Set(l),P=l.filter((function(e){return!R.has(e)})),x=a.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),A=l.filter((function(e){return R.has(e)})),N=-g;O.length;)switch(O.shift()){case"enter":P.forEach((function(e,t){y&&k.find((function(t){return t.originalKey===e}))&&(k=k.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=c[n],i=r&&void 0!==u?"initial":"enter";w[e]={slot:i,originalKey:e,key:y?String(e):q++,item:o,trail:N+=g,config:m(E,o,i),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":x.forEach((function(e){var t=_.indexOf(e),r=j[t];k.unshift(o({},w[e],{slot:"leave",destroyed:!0,left:_[Math.max(0,t-1)],right:_[Math.min(_.length,t+1)],trail:N+=g,config:m(E,r,"leave"),to:m(f,r)})),delete w[e]}));break;case"update":A.forEach((function(e){var t=l.indexOf(e),r=c[t];w[e]=o({},w[e],{item:r,slot:"update",trail:N+=g,config:m(E,r,"update"),to:m(h,r)})}))}var M=l.map((function(e){return w[e]}));return k.forEach((function(e){var t,r=e.left,n=(e.right,i(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[n],M.slice(t))})),o({},a,{changed:P.length||x.length||A.length,first:r&&0===P.length,transitions:M,current:w,deleted:k,prevProps:t})}(S.current,n),S.current.changed&&S.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,i=e.config,a=e.trail,s=e.key,c=e.item;S.current.instances.has(s)||S.current.instances.set(s,new z);var u=S.current.instances.get(s),d=o({},E,{to:n,from:r,config:i,ref:y,onRest:function(r){S.current.mounted&&(e.destroyed&&(y||l||$(S,s),f&&f(c)),!Array.from(S.current.instances).some((function(e){return!e[1].idle}))&&(y||l)&&S.current.deleted.length>0&&$(S),b&&b(c,t,r))},onStart:g&&function(){return g(c,t)},onFrame:h&&function(e){return h(c,t,e)},delay:a,reset:p&&"enter"===t});u.update(d),S.current.paused||u.start()})),a.useEffect((function(){return S.current.mounted=O.current=!0,function(){S.current.mounted=O.current=!1,Array.from(S.current.instances).map((function(e){return e[1].destroy()})),S.current.instances.clear()}}),[]),S.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:S.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=a.useRef();a.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var i=e.current;if(i){var a=i.controllers;if(a.length){var s=r*t[n];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+s})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=W},,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(9),o=r(0),i=r(6),a=r(54);const s=()=>{const e=Object(a.a)(),{selectShippingRate:t}=Object(n.useDispatch)(i.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((r,n)=>{t(r,n).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(n.useSelect)(e=>e(i.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,function(e,t){},,,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(5),i=r(4),a=r.n(i),s=r(23),c=r(1),l=(r(45),r(56));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:i=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(s.speak)(r,t)},[r,t])}(i,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const y=a()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const E=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:y,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(c.__)("Dismiss this notice")},Object(n.createElement)("div",{className:E},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(65))},function(e,t){e.exports=window.wp.plugins},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return c}));var n=r(2),o=r(50),i=r(34);const a=e=>{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(i.isEmail)(t)?t.trim():""},c=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(i[r]="")}),i}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";var n=r(0),o=r(5),i=r(4),a=r.n(i),s=r(1),c=r(23),l=r(90),u=r(56);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:i=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(c.speak)(r,t)},[r,t])}(i,h);const y=a()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:y},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:i=!1,onClick:s,url:c},l)=>{let d=o;return"primary"===o||i||(d=c?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:c,variant:d,onClick:c?void 0:s,className:a()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),o=r(53),i=r(61),a=r.n(i),s=r(13);const c=(e,t)=>e&&t[e]?t[e]:null,l=e=>{let{block:t,blockMap:r,blockWrapper:o,children:i,depth:u=1}=e;return i&&0!==i.length?Array.from(i).map((e,i)=>{const{blockName:d="",...p}={key:`${t}_${u}_${i}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},f=c(d,r);if(!f){const i=a()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof i&&i)return i;if(!Object(n.isValidElement)(i))return null;const s=e.childNodes.length?l({block:t,blockMap:r,children:e.childNodes,depth:u+1,blockWrapper:o}):void 0;return s?Object(n.cloneElement)(i,p,s):Object(n.cloneElement)(i,p)}const m=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${u}_${i}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(m,null,Object(n.createElement)(f,p,l({block:t,blockMap:r,children:e.children,depth:u+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(s.hasInnerBlocks)(e))return null;const i=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],a=Object(s.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!i.includes(t)}),l=o||n.Fragment;return Object(n.createElement)(l,null,a.map((e,r)=>{let{blockName:o,component:i}=e;const a=i||c(o,t);return a?Object(n.createElement)(a,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},u=e=>{let{Block:t,selector:r,blockName:n,getProps:i=(()=>({})),blockMap:a,blockWrapper:s}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=l({block:n,blockMap:a,children:e.children||[],blockWrapper:s});return{...i(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=r(122);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){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,r){"use strict";r.d(t,"a",(function(){return S}));var n=r(0),o=r(108),i=r(2),a=r(16),s=r(204),c=r(44),l=r(33),u=r(31),d=r(1),p=r(27),f=r.n(p),m=r(109),h=r(88);const b=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},g=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var y=r(160),E=r(22),v=r(32),O=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:i,isBeforeProcessing:a,isComplete:p,orderNotes:O,shouldCreateAccount:S,extensionData:_}=Object(u.b)(),{hasValidationErrors:j}=Object(y.b)(),{shippingErrorStatus:w}=Object(c.b)(),{billingData:k,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:R,receiveCart:T}=Object(E.a)(),{activePaymentMethod:P,isExpressPaymentMethodActive:x,currentStatus:A,paymentMethodData:N,expressPaymentMethods:M,paymentMethods:I,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:F,setIsSuppressed:V}=Object(v.a)(),B=Object(n.useRef)(k),U=Object(n.useRef)(C),H=Object(n.useRef)(o),[G,z]=Object(n.useState)(!1),W=Object(n.useMemo)(()=>{var e;const t={...M,...I};return null==t||null===(e=t[P])||void 0===e?void 0:e.paymentMethodId},[P,M,I]),q=j&&!x||A.hasError||w.hasError,Y=!e&&!q&&(A.isSuccessful||!R)&&i;Object(n.useEffect)(()=>{V(x)},[x,V]),Object(n.useEffect)(()=>{q===e||!i&&!a||x||r.setHasError(q)},[q,e,i,a,x,r]),Object(n.useEffect)(()=>{B.current=k,U.current=C,H.current=o},[k,C,o]);const X=Object(n.useCallback)(()=>!j&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!w.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[j,A.hasError,w.hasError]);Object(n.useEffect)(()=>{let e;return x||(e=t(X,0)),()=>{x||e()}},[t,X,x]),Object(n.useEffect)(()=>{H.current&&(window.location.href=H.current)},[p]);const $=Object(n.useCallback)(async()=>{if(G)return;z(!0),F("checkout");const e=R?{payment_method:W,payment_data:b(N,D,P)}:{},t={billing_address:Object(m.a)(B.current),shipping_address:Object(m.a)(U.current),customer_note:O,should_create_account:S,...e,extensions:{..._}};f()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(g(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),z(!1)}).catch(e=>{try{null!=e&&e.headers&&g(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),L(Object(h.b)(e),{id:"checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{L(e.message,{id:e.error_code})}),r.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text. +Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}r.setHasError(!0),z(!1)})},[G,F,O,S,R,W,N,D,P,_,r,L,T]);return Object(n.useEffect)(()=>{Y&&!G&&$()},[$,Y,G]),null};const S=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(c.a,null,Object(n.createElement)(s.a,null,t,Object(n.createElement)(a.a,{renderError:i.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(O,null)))))}},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t,r){"use strict";var n=r(0),o=r(1),i=(r(8),r(4)),a=r.n(i),s=(r(161),r(130));t.a=e=>{let{children:t,className:r,screenReaderLabel:i,showSpinner:c=!1,isLoading:l=!0}=e;return Object(n.createElement)("div",{className:a()(r,{"wc-block-components-loading-mask":l})},l&&c&&Object(n.createElement)(s.a,null),Object(n.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(n.createElement)("span",{className:"screen-reader-text"},i||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},function(e,t,r){"use strict";var n=r(0);r(157),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(0);const o=Object(n.createContext)({hasDarkControls:!1}),i=()=>Object(n.useContext)(o)},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,function(e,t){},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(5),i=r(11),a=r.n(i);const s=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),c=()=>Object(n.useContext)(s),l=e=>{let{children:t}=e;const[r,i]=Object(n.useState)({}),c=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{i(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{i({})},[]),p=Object(n.useCallback)(e=>{e&&i(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&a()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{i(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return a()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:c,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{i(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(s.Provider,{value:m},t)}},function(e,t){},,,,,,function(e,t){e.exports=window.wp.keycodes},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(89);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const i=n.a.addEventCallback(e,r,o);return t(i),()=>{t(n.a.removeEventCallback(e,i.id))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return a}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(29);const i=async(e,t,r)=>{const o=n(e,t),i=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&i.push(t)}catch(e){console.error(e)}return!i.length||i},a=async(e,t,r)=>{const i=[],a=n(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return i.push(t),i;i.push(t)}catch(e){return console.error(e),i.push({type:"error"}),i}return i}},,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(207)},function(e,t){},,,,,,,,,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return D})),r.d(t,"a",(function(){return L}));var n=r(0),o=r(35);let i,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(i||(i={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const s={currentStatus:i.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},c={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:i,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:c={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case i.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:i.PRISTINE};case i.STARTED:return{...e,currentStatus:i.STARTED};case i.ERROR:return e.currentStatus!==i.ERROR?{...e,currentStatus:i.ERROR,errorMessage:o||e.errorMessage}:e;case i.FAILED:return e.currentStatus!==i.FAILED?{...e,currentStatus:i.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case i.SUCCESS:return e.currentStatus!==i.SUCCESS?{...e,currentStatus:i.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case i.PROCESSING:return e.currentStatus!==i.PROCESSING?{...e,currentStatus:i.PROCESSING,errorMessage:""}:e;case i.COMPLETE:return e.currentStatus!==i.COMPLETE?{...e,currentStatus:i.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:c};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:c};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},u=r(1),d=r(14),p=r(17),f=r(2),m=r(52),h=r(18),b=r(44),g=r(33),y=r(22),E=r(32),v=r(29);const O=(e,t,r,o)=>{const[i,a]=Object(n.useState)(!1),{isEditor:s}=Object(h.a)(),{selectedRates:c}=Object(b.b)(),{billingData:l,shippingAddress:d}=Object(g.b)(),v=Object(p.a)(c),O=Object(p.a)(r),S=Object(y.a)(),{cartTotals:_,cartIsLoading:j,cartNeedsShipping:w,paymentRequirements:k}=S,C=Object(n.useRef)({cart:S,cartTotals:_,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:k}),{addErrorNotice:R}=Object(E.a)();Object(n.useEffect)(()=>{C.current={cart:S,cartTotals:_,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:k}},[S,_,w,l,d,v,k]);const T=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e{j||P()},[P,S,v,l,j]),i},S=e=>({type:e}),_=e=>({type:i.ERROR,errorMessage:e}),j=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:i.FAILED,errorMessage:t,paymentMethodData:r}},w=e=>{let{paymentMethodData:t}=e;return{type:i.SUCCESS,paymentMethodData:t}},k=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),T=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var P=r(31),x=r(89),A=r(169);var N=r(170),M=r(160);const I=Object(n.createContext)(c),D=()=>Object(n.useContext)(I),L=e=>{let{children:t}=e;const{isProcessing:r,isIdle:a,isCalculating:c,hasError:u}=Object(P.b)(),{isEditor:p,getPreviewData:m}=Object(h.a)(),{setValidationErrors:y}=Object(M.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:F,isErrorResponse:V,isFailResponse:B,noticeContexts:U}=Object(v.c)(),[H,G]=Object(n.useReducer)(x.b,{}),{onPaymentProcessing:z}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(G),W=Object(n.useRef)(H);Object(n.useEffect)(()=>{W.current=H},[H]);const[q,Y]=Object(n.useReducer)(l,s),{dispatchActions:X,setPaymentStatus:$}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:r}=Object(b.b)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(k(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(T(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(S(i.PRISTINE)),started:()=>e(S(i.STARTED)),processing:()=>e(S(i.PROCESSING)),completed:()=>e(S(i.COMPLETE)),error:t=>e(_(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(j({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof i&&null!=i&&i.address&&r(i.address),e(w({paymentMethodData:n}))}}),[e,t,r])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:r}=Object(v.c)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return O(e,t,Array.from(n),r.PAYMENTS)})(X.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:r}=Object(v.c)();return O(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})(X.setRegisteredExpressPaymentMethods),Q=Object(n.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(q.paymentMethods):{},[p,m,K,q.paymentMethods]),Z=Object(n.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),te=Object(n.useMemo)(()=>({isPristine:q.currentStatus===i.PRISTINE,isStarted:q.currentStatus===i.STARTED,isProcessing:q.currentStatus===i.PROCESSING,isFinished:[i.ERROR,i.FAILED,i.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===i.ERROR,hasFailed:q.currentStatus===i.FAILED,isSuccessful:q.currentStatus===i.SUCCESS,isDoingExpressPayment:q.currentStatus!==i.PRISTINE&&ee}),[q.currentStatus,ee]);Object(n.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;$().pristine();const r=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(r){const e=r.tokenId,t=r.method.gateway,n=`wc-${t}-payment-token`;X.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e.toString(),isSavedToken:!0})}else X.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[K,q.paymentMethods,q.expressPaymentMethods,X,$,q.activePaymentMethod,Q]),Object(n.useEffect)(()=>{!r||u||c||te.isFinished||$().processing()},[r,u,c,te.isFinished,$]),Object(n.useEffect)(()=>{a&&!te.isSuccessful&&$().pristine()},[a,te.isSuccessful,$]),Object(n.useEffect)(()=>{u&&te.isSuccessful&&$().pristine()},[u,te.isSuccessful,$]),Object(n.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(N.b)(W.current,"payment_processing",{}).then(e=>{let t,r;var n,o,i,a,s,c;if(e.forEach(e=>{F(e)&&(t=e),(V(e)||B(e))&&(r=e)}),t&&!r)$().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(i=t)||void 0===i||null===(a=i.meta)||void 0===a?void 0:a.billingData,null===(s=t)||void 0===s||null===(c=s.meta)||void 0===c?void 0:c.shippingData);else if(r&&B(r)){var l,u,d,p,f,m;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),$().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(r){var h,b;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||U.PAYMENTS}),$().error(r.message),y(null===(h=r)||void 0===h?void 0:h.validationErrors)}else $().success()}))},[te.isProcessing,y,$,L,U.PAYMENTS,F,B,V,D]);const re="object"==typeof q.paymentMethodData&&Object(o.e)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",ne={setPaymentStatus:$,currentStatus:te,paymentStatuses:i,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:re,setActivePaymentMethod:X.setActivePaymentMethod,onPaymentProcessing:z,customerPaymentMethods:Q,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:X.setShouldSavePayment};return Object(n.createElement)(I.Provider,{value:ne},t)}},,,function(e,t,r){"use strict";r.r(t);var n=r(134),o=r(0),i=r(22),a=r(14),s=r(119),c=r(66),l=r(13),u=r(127),d=r(128),p=r(138),f=r(142),m=r(139),h=r(141),b=r(140),g=r(143),y=r(144);r.p=c.k,Object(l.registerCheckoutBlock)({metadata:u,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,375)))}),Object(l.registerCheckoutBlock)({metadata:d,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,376)))}),Object(l.registerCheckoutBlock)({metadata:u,component:Object(o.lazy)(()=>r.e(25).then(r.bind(null,375)))}),Object(l.registerCheckoutBlock)({metadata:d,component:Object(o.lazy)(()=>r.e(23).then(r.bind(null,376)))}),Object(l.registerCheckoutBlock)({metadata:p,component:Object(o.lazy)(()=>r.e(26).then(r.bind(null,377)))}),Object(l.registerCheckoutBlock)({metadata:m,component:Object(o.lazy)(()=>Promise.all([r.e(1),r.e(4),r.e(27)]).then(r.bind(null,386)))}),Object(l.registerCheckoutBlock)({metadata:b,component:Object(o.lazy)(()=>r.e(29).then(r.bind(null,378)))}),Object(l.registerCheckoutBlock)({metadata:h,component:Object(o.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(28)]).then(r.bind(null,390)))}),Object(l.registerCheckoutBlock)({metadata:f,component:Object(o.lazy)(()=>r.e(24).then(r.bind(null,398)))}),Object(l.registerCheckoutBlock)({metadata:g,component:Object(o.lazy)(()=>r.e(22).then(r.bind(null,399)))}),Object(l.registerCheckoutBlock)({metadata:y,component:Object(o.lazy)(()=>r.e(21).then(r.bind(null,400)))});var E=r(1),v=r(129),O=r(160),S=r(2),_=r(16),j=r(67),w=r(71),k=r(211),C=r(87),R=r(124);const T=e=>{let{children:t,redirectUrl:r}=e;return Object(o.createElement)(R.a,{isCart:!0,redirectUrl:r},t)};var P=r(135);r(190);const x=()=>{window.location.reload(!0)},A=e=>{let{children:t,attributes:r}=e;const{cartIsLoading:n}=Object(i.a)(),{hasDarkControls:a}=r;return Object(o.createElement)(v.a,{showSpinner:!0,isLoading:n},Object(o.createElement)(P.a.Provider,{value:{hasDarkControls:a}},Object(o.createElement)(O.a,null,t)))},N=e=>{let{scrollToTop:t}=e;return Object(o.useEffect)(()=>{const e=Object(j.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",t),()=>{e(),document.body.removeEventListener("wc-blocks_added_to_cart",t)}},[t]),null};var M=Object(w.a)(e=>{let{attributes:t,children:r,scrollToTop:n}=e;return Object(o.createElement)(_.a,{header:Object(E.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(E.__)("The cart has encountered an unexpected error. If the error persists, please get in touch with us for help.","woo-gutenberg-products-block"),button:Object(o.createElement)("button",{className:"wc-block-button",onClick:x},Object(E.__)("Reload the page","woo-gutenberg-products-block")),showErrorMessage:S.CURRENT_USER_IS_ADMIN},Object(o.createElement)(k.a,{context:"wc/cart"},Object(o.createElement)(C.a,{context:"wc/cart"},Object(o.createElement)(l.SlotFillProvider,null,Object(o.createElement)(T,null,Object(o.createElement)(A,{attributes:t},r),Object(o.createElement)(N,{scrollToTop:n}))))))});const I={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(S.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(S.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};Object(s.a)({Block:M,blockName:"woocommerce/cart",selector:".wp-block-woocommerce-cart",getProps:e=>({attributes:Object(n.a)(I,e?e.dataset:{})}),blockMap:Object(a.getRegisteredBlockComponents)("woocommerce/cart"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:n,...a}=Object(i.a)();return o.Children.map(t,e=>{if(Object(o.isValidElement)(e)){const t={extensions:r,cart:a};return Object(o.cloneElement)(e,t)}return e})}})},,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return E})),r.d(t,"a",(function(){return v}));var n=r(0),o=(r(8),r(9)),i=r(7),a=r(4),s=r.n(a),c=r(5),l=r(91),u=r(12),d=r(107),p=function({notices:e,className:t,children:r,onRemove:o=c.noop}){const a=Object(u.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(l.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:a});t=s()("components-snackbar-list",t);const m=e=>()=>o(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(l.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(d.a,Object(i.a)({},Object(c.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},f=r(13);const m={};var h=e=>{let{className:t,notices:r,removeNotice:o,isEditor:i}=e;if(i)return null;const a=r.filter(e=>"snackbar"===e.type),c=a.length>0?a.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):m,l=Object(f.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:c}),u=a.filter(e=>!0===l[e.content]),d=s()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(p,{notices:u,className:d,onRemove:o})},b=r(38),g=r(18);const y=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),E=()=>Object(n.useContext)(y),v=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:i,removeNotice:a}=Object(o.useDispatch)("core/notices"),[s,c]=Object(n.useState)(!1),{dispatchStoreEvent:l}=Object(b.a)(),{isEditor:u}=Object(g.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i("default",e,{...t,type:"snackbar",context:t.context||r}),l("store-notice-create",{status:"default",content:e,options:t})}),[i,l,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;a(e,t)}),[a,r]),{notices:f}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:f,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:c},E=s?null:Object(n.createElement)(h,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:u});return Object(n.createElement)(y.Provider,{value:m},t,E)}}]); \ No newline at end of file diff --git a/build/cart.asset.php b/build/cart.asset.php new file mode 100644 index 00000000000..46b1e3d9277 --- /dev/null +++ b/build/cart.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'd0d66eae1c7f082aa947224d079aa10c'); \ No newline at end of file diff --git a/build/cart.js b/build/cart.js new file mode 100644 index 00000000000..f8900152a0e --- /dev/null +++ b/build/cart.js @@ -0,0 +1,44 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.cart=function(e){function t(t){for(var r,a,s=t[0],i=t[1],l=t[2],d=0,p=[];d{let{selected:t=[],search:c="",queryArgs:n={}}=e;const s=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=i.o.productCount>100,a={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},s=[Object(r.addQueryArgs)("/wc/store/products",{...a,...n})];return o&&t.length&&s.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:c,queryArgs:n});return Promise.all(s.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),p=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),b=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(s.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},m=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>o()({path:"wc/store/products/categories/"+e}),h=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},,function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n);t.a=e=>{let t,{label:c,screenReaderLabel:n,wrapperElement:a,wrapperProps:s={}}=e;const i=null!=c,l=null!=n;return!i&&l?(t=a||"span",s={...s,className:o()(s.className,"screen-reader-text")},Object(r.createElement)(t,s,n)):(t=a||r.Fragment,i&&l&&c!==n?Object(r.createElement)(t,s,Object(r.createElement)("span",{"aria-hidden":"true"},c),Object(r.createElement)("span",{className:"screen-reader-text"},n)):Object(r.createElement)(t,s,c))}},,,function(e,t,c){},,function(e,t){e.exports=window.wc.priceFormat},function(e,t,c){"use strict";c.d(t,"a",(function(){return _}));var r=c(6),n=c(0),o=c(16),a=c(13),s=c(14),i=c(149),l=c(248),u=c(49),d=c(247);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(o.CART_STORE_KEY).invalidateResolutionForStore()},b=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(n.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),b),[])},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...g,email:""},O={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:o.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},j=e=>Object(i.a)(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(s.decodeEntities)(c)]})),E={cartCoupons:o.EMPTY_CART_COUPONS,cartItems:o.EMPTY_CART_ITEMS,cartFees:o.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:O,cartIsLoading:!0,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:g,shippingRates:o.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:o.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:o.EMPTY_EXTENSIONS},_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(u.b)(),s=null==c?void 0:c.previewCart,{shouldSelect:i}=e,d=Object(n.useRef)();m();const p=Object(a.useSelect)((e,c)=>{let{dispatch:r}=c;if(!i)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:g,extensions:o.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const n=e(o.CART_STORE_KEY),a=n.getCartData(),u=n.getCartErrors(),d=n.getCartTotals(),p=!n.hasFinishedResolution("getCartData"),b=n.isCustomerDataUpdating(),{receiveCart:m}=r(o.CART_STORE_KEY),O=j(a.billingAddress),_=a.needsShipping?j(a.shippingAddress):O,f=a.fees.length>0?a.fees.map(e=>j(e)):o.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):o.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:f,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(l.a)(O),shippingAddress:Object(l.a)(_),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:b,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:m}},[i]);return d.current&&Object(r.isEqual)(d.current,p)||(d.current=p),d.current}},,,function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),n=c(26),o=c.n(n);function a(e){const t=Object(r.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(132),s=c(4),i=c.n(s);c(138);const l=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:s,displayType:u="text",...d}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const b=p/10**r.minorUnit;if(!Number.isFinite(b))return null;const m=i()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...l(r),value:void 0,currency:void 0,onValueChange:void 0},h=s?e=>{const t=+e.value*10**r.minorUnit;s(t)}:()=>{};return Object(o.createElement)(a.a,n()({className:m,displayType:u},g,{value:b,onValueChange:h}))}},,function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i})),c.d(t,"b",(function(){return l})),c.d(t,"c",(function(){return d}));var r=c(85);let n,o;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(n||(n={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(o||(o={}));const a=(e,t)=>Object(r.b)(e)&&"type"in e&&e.type===t,s=e=>a(e,n.SUCCESS),i=e=>a(e,n.ERROR),l=e=>a(e,n.FAIL),u=e=>!Object(r.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:n,noticeContexts:o,shouldRetry:u,isSuccessResponse:s,isErrorResponse:i,isFailResponse:l})},,function(e,t){e.exports=window.wp.a11y},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0),n=c(128);const o=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:o}=Object(n.b)(),a=Object(r.useRef)(e);Object(r.useEffect)(()=>{a.current=e},[e]);const s=Object(r.useMemo)(()=>({hasNoticesOfType:e=>a.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),i=Object(r.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...s,...i,setIsSuppressed:o}}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(0),n=c(13);const o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),a=()=>Object(r.useContext)(o),s=e=>{let{children:t,currentPostId:c=0,currentView:a="",previewData:s={}}=e;const i=Object(n.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),l=Object(r.useCallback)(e=>e in s?s[e]:{},[s]),u={isEditor:!0,currentPostId:i,currentView:a,previewData:s,getPreviewData:l};return Object(r.createElement)(o.Provider,{value:u},t)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return M})),c.d(t,"a",(function(){return I}));var r=c(0),n=c(1),o=c(108),a=c(65),s=c.n(a),i=c(85);let l;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(l||(l={}));const u=()=>({type:l.SET_IDLE}),d=e=>({type:l.SET_REDIRECT_URL,redirectUrl:e}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l.SET_COMPLETE,data:e}},b=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?l.SET_HAS_ERROR:l.SET_NO_ERROR}};var m=c(2);let g;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(g||(g={}));const h={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},O={redirectUrl:"",status:g.PRISTINE,hasError:!1,calculatingCount:0,orderId:h.order_id,orderNotes:"",customerId:h.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,{redirectUrl:t,type:c,customerId:r,orderId:n,orderNotes:o,extensionData:a,shouldCreateAccount:s,data:i}=arguments.length>1?arguments[1]:void 0,u=e;switch(c){case l.SET_PRISTINE:u=O;break;case l.SET_IDLE:u=e.status!==g.IDLE?{...e,status:g.IDLE}:e;break;case l.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case l.SET_PROCESSING_RESPONSE:u={...e,processingResponse:i};break;case l.SET_COMPLETE:u=e.status!==g.COMPLETE?{...e,status:g.COMPLETE,redirectUrl:void 0!==i&&"string"==typeof i.redirectUrl&&i.redirectUrl?i.redirectUrl:e.redirectUrl}:e;break;case l.SET_PROCESSING:u=e.status!==g.PROCESSING?{...e,status:g.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case l.SET_BEFORE_PROCESSING:u=e.status!==g.BEFORE_PROCESSING?{...e,status:g.BEFORE_PROCESSING,hasError:!1}:e;break;case l.SET_AFTER_PROCESSING:u=e.status!==g.AFTER_PROCESSING?{...e,status:g.AFTER_PROCESSING}:e;break;case l.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===g.PROCESSING||e.status===g.BEFORE_PROCESSING?{...u,status:g.IDLE}:u;break;case l.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case l.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case l.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case l.SET_CUSTOMER_ID:u=void 0!==r?{...e,customerId:r}:e;break;case l.SET_ORDER_ID:u=void 0!==n?{...e,orderId:n}:e;break;case l.SET_SHOULD_CREATE_ACCOUNT:void 0!==s&&s!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:s});break;case l.SET_ORDER_NOTES:void 0!==o&&e.orderNotes!==o&&(u={...e,orderNotes:o});break;case l.SET_EXTENSION_DATA:void 0!==a&&e.extensionData!==a&&(u={...e,extensionData:a})}return u!==e&&c!==l.SET_PRISTINE&&u.status===g.PRISTINE&&(u.status=g.IDLE),u};var E=c(14),_=c(107),f=c(251);var y=c(254),v=c(112),k=c(47),w=c(60),S=c(13),C=c(44);const N=Object(r.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),M=()=>Object(r.useContext)(N),I=e=>{let{children:t,redirectUrl:c,isCart:a=!1}=e;O.redirectUrl=c;const[m,h]=Object(r.useReducer)(j,O),{setValidationErrors:M}=Object(v.b)(),{addErrorNotice:I,removeNotices:R}=Object(k.a)(),{dispatchCheckoutEvent:x}=Object(w.a)(),P=m.calculatingCount>0,{isSuccessResponse:T,isErrorResponse:A,isFailResponse:D,shouldRetry:L}=Object(C.c)(),{checkoutNotices:B,paymentNotices:V,expressPaymentNotices:U}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(S.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(S.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(S.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[z,F]=Object(r.useReducer)(_.b,{}),G=Object(r.useRef)(z),{onCheckoutAfterProcessingWithSuccess:H,onCheckoutAfterProcessingWithError:Y,onCheckoutValidationBeforeProcessing:q}=(e=>Object(r.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(f.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(f.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(f.a)("checkout_validation_before_processing",e)}),[e]))(F);Object(r.useEffect)(()=>{G.current=z},[z]);const $=Object(r.useMemo)(()=>function(){return s()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),q(...arguments)},[q]),W=Object(r.useMemo)(()=>({resetCheckout:()=>{h({type:l.SET_PRISTINE})},setRedirectUrl:e=>{h(d(e))},setHasError:e=>{h(b(e))},incrementCalculating:()=>{h({type:l.INCREMENT_CALCULATING})},decrementCalculating:()=>{h({type:l.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;h((t=e,{type:l.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{h((e=>({type:l.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{h((e=>({type:l.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{h((e=>({type:l.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:c,value:r}=e;t.paymentDetails[c]=Object(E.decodeEntities)(r)})),"message"in e&&(t.message=Object(E.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var c;t.redirectUrl&&h(d(t.redirectUrl)),h((c=t,{type:l.SET_PROCESSING_RESPONSE,data:c})),h({type:l.SET_AFTER_PROCESSING})}}),[]);Object(r.useEffect)(()=>{m.status===g.BEFORE_PROCESSING&&(R("error"),Object(y.a)(G.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;I(t),M(c)}),h(u()),h(b())):h({type:l.SET_PROCESSING})}))},[m.status,M,I,R,h]);const Q=Object(o.a)(m.status),K=Object(o.a)(m.hasError);Object(r.useEffect)(()=>{if((m.status!==Q||m.hasError!==K)&&m.status===g.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(y.b)(G.current,"checkout_after_processing_with_error",e).then(t=>{const c=(e=>{let t=null;return e.forEach(e=>{if((A(e)||D(e))&&e.message){const c=e.messageContext?{context:e.messageContext}:void 0;t=e,I(e.message,c)}}),t})(t);if(null!==c)L(c)?h(u()):h(p(c));else{if(!(B.some(e=>"error"===e.status)||U.some(e=>"error"===e.status)||V.some(e=>"error"===e.status))){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");I(t,{id:"checkout"})}h(u())}}):Object(y.b)(G.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,c=null;if(e.forEach(e=>{T(e)&&(t=e),(A(e)||D(e))&&(c=e)}),t&&!c)h(p(t));else if(Object(i.b)(c)){if(c.message){const e=c.messageContext?{context:c.messageContext}:void 0;I(c.message,e)}L(c)?h(b(!0)):h(p(c))}else h(p())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,Q,K,W,I,A,D,T,L,B,U,V]);const X={onSubmit:Object(r.useCallback)(()=>{x("submit"),h({type:l.SET_BEFORE_PROCESSING})},[x]),isComplete:m.status===g.COMPLETE,isIdle:m.status===g.IDLE,isCalculating:P,isProcessing:m.status===g.PROCESSING,isBeforeProcessing:m.status===g.BEFORE_PROCESSING,isAfterProcessing:m.status===g.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:$,onCheckoutValidationBeforeProcessing:q,onCheckoutAfterProcessingWithSuccess:H,onCheckoutAfterProcessingWithError:Y,dispatchActions:W,isCart:a,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return h((t=e,{type:l.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(r.createElement)(N.Provider,{value:X},t)}},,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(80),s=c(116);const i=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:c={},...r}=e;const l=Object(o.useRef)(null),u=()=>{l.current&&a.focus.focusable.find(l.current).forEach(e=>{i.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(s.a)(u,0,{leading:!0});return Object(o.useLayoutEffect)(()=>{let e;return u(),l.current&&(e=new window.MutationObserver(d),e.observe(l.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(o.createElement)("div",n()({ref:l,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...c}},r),t)}},,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return O})),c.d(t,"a",(function(){return j}));var r=c(0),n=c(2),o=c(13),a=c(16),s=c(116),i=c(26),l=c.n(i),u=c(248),d=c(28),p=c(36),b=c(47);const m=(e,t)=>!(!function(e){return"email"in e}(t)||Object(u.c)(t)===Object(u.c)(e))||!!t.country&&!l()(Object(u.b)(e),Object(u.b)(t));var g=c(50);const h=Object(r.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),O=()=>Object(r.useContext)(h),j=e=>{let{children:t}=e;const{billingData:c,shippingAddress:i,setBillingData:l,setShippingAddress:u}=(()=>{const{updateCustomerData:e}=Object(o.useDispatch)(a.CART_STORE_KEY),{addErrorNotice:t,removeNotice:c}=Object(b.a)(),{billingAddress:n,shippingAddress:i,cartIsLoading:l}=Object(p.a)(),[u,g]=Object(r.useState)(!1),[h,O]=Object(r.useState)({billingData:n,shippingAddress:i}),j=Object(r.useRef)(h);Object(r.useEffect)(()=>{if(u||l)return;const e={billingData:n,shippingAddress:i};j.current=e,O(e),g(!0)},[l,u,n,i]);const E=Object(r.useCallback)(e=>{O(t=>({...t,billingData:{...t.billingData,...e}}))},[]),_=Object(r.useCallback)(e=>{O(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]),f=Object(s.a)(()=>{const r={};m(j.current.billingData,h.billingData)&&(r.billing_address=h.billingData),m(j.current.shippingAddress,h.shippingAddress)&&(r.shipping_address=h.shippingAddress),0!==Object.keys(r).length&&(j.current=h,e(r).then(()=>{c("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})}))},1e3);return Object(r.useEffect)(()=>{u&&f()},[u,h,f]),{billingData:h.billingData,shippingAddress:h.shippingAddress,setBillingData:E,setShippingAddress:_}})(),{cartNeedsShipping:O}=Object(p.a)(),{customerId:j}=Object(g.b)(),[E,_]=Object(r.useState)(()=>{return O&&(!j||(e=i,t=c,Object.keys(n.defaultAddressFields).every(c=>e[c]===t[c])));var e,t}),f={billingData:c,shippingAddress:i,setBillingData:l,setShippingAddress:u,shippingAsBilling:E,setShippingAsBilling:_};return Object(r.createElement)(h.Provider,{value:f},t)}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(61),n=c(0),o=c(36);const a=()=>{const e=Object(o.a)(),t=Object(n.useRef)(e);return Object(n.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(n.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t){e.exports=window.wp.hooks},,,,function(e,t){e.exports=window.wp.deprecated},function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(10),c(4)),a=c.n(o),s=(c(217),c(99));t.a=e=>{let{children:t,className:c,screenReaderLabel:o,showSpinner:i=!1,isLoading:l=!0}=e;return Object(r.createElement)("div",{className:a()(c,{"wc-block-components-loading-mask":l})},l&&i&&Object(r.createElement)(s.a,null),Object(r.createElement)("div",{className:a()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(r.createElement)("span",{className:"screen-reader-text"},o||Object(n.__)("Loading…","woo-gutenberg-products-block")))}},function(e,t,c){"use strict";c.d(t,"b",(function(){return k})),c.d(t,"a",(function(){return w}));var r=c(0),n=c(26),o=c.n(n),a=c(149);const s=e=>Object(a.a)(e.map(e=>{var t;let{package_id:c,shipping_rates:r}=e;return[c,null===(t=r.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),i={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},l={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},u={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:i,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:c}=t;return Object.values(i).includes(c)?c:e};var p=c(107),b=c(251);const m=e=>({onSuccess:Object(b.a)("shipping_rates_success",e),onFail:Object(b.a)("shipping_rates_fail",e),onSelectSuccess:Object(b.a)("shipping_rate_select_success",e),onSelectFail:Object(b.a)("shipping_rate_select_fail",e)});var g=c(254),h=c(50),O=c(56),j=c(36),E=c(122);const{NONE:_,INVALID_ADDRESS:f,UNKNOWN:y}=i,v=Object(r.createContext)(u),k=()=>Object(r.useContext)(v),w=e=>{let{children:t}=e;const{dispatchActions:c}=Object(h.b)(),{shippingAddress:n,setShippingAddress:a}=Object(O.b)(),{cartNeedsShipping:u,cartHasCalculatedShipping:b,shippingRates:k,shippingRatesLoading:w,cartErrors:S}=Object(j.a)(),{selectShippingRate:C,isSelectingRate:N}=Object(E.a)(),[M,I]=Object(r.useReducer)(d,_),[R,x]=Object(r.useReducer)(p.b,{}),P=Object(r.useRef)(R),T=Object(r.useMemo)(()=>({onShippingRateSuccess:m(x).onSuccess,onShippingRateFail:m(x).onFail,onShippingRateSelectSuccess:m(x).onSelectSuccess,onShippingRateSelectFail:m(x).onSelectFail}),[x]);Object(r.useEffect)(()=>{P.current=R},[R]);const A=Object(r.useRef)(()=>s(k));Object(r.useEffect)(()=>{const e=s(k);o()(A.current,e)||(A.current=e)},[k]),Object(r.useEffect)(()=>{w?c.incrementCalculating():c.decrementCalculating()},[w,c]),Object(r.useEffect)(()=>{N?c.incrementCalculating():c.decrementCalculating()},[N,c]),Object(r.useEffect)(()=>{S.length>0&&S.some(e=>!(!e.code||!Object.values(l).includes(e.code)))?I({type:f}):I({type:_})},[S]);const D=Object(r.useMemo)(()=>({isPristine:M===_,isValid:M===_,hasInvalidAddress:M===f,hasError:M===y||M===f}),[M]);Object(r.useEffect)(()=>{w||0!==k.length&&!D.hasError||Object(g.a)(P.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[k,w,D.hasError,D.hasInvalidAddress]),Object(r.useEffect)(()=>{!w&&k.length>0&&!D.hasError&&Object(g.a)(P.current,"shipping_rates_success",k)},[k,w,D.hasError]),Object(r.useEffect)(()=>{N||(D.hasError?Object(g.a)(P.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(g.a)(P.current,"shipping_rate_select_success",A.current))},[N,D.hasError,D.hasInvalidAddress]);const L={shippingErrorStatus:D,dispatchErrorStatus:I,shippingErrorTypes:i,shippingRates:k,shippingRatesLoading:w,selectedRates:A.current,setSelectedRates:C,isSelectingRate:N,shippingAddress:n,setShippingAddress:a,needsShipping:u,hasCalculatedShipping:b,...T};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(v.Provider,{value:L},t))}},,,,,,function(e,t){e.exports=window.wp.autop},,,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(137),s=c(4),i=c.n(s),l=c(99);c(158),t.a=e=>{let{className:t,showSpinner:c=!1,children:r,...s}=e;const u=i()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(o.createElement)(a.a,n()({className:u},s),c&&Object(o.createElement)(l.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},r))}},function(e,t,c){"use strict";c.d(t,"c",(function(){return o})),c.d(t,"d",(function(){return a})),c.d(t,"a",(function(){return s})),c.d(t,"b",(function(){return i}));var r=c(12),n=c(25);const o=(e,t)=>{if(n.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(n.n>1)return Object(r.registerBlockType)(e,t)},s=()=>n.n>2,i=()=>n.n>1},,,function(e,t){e.exports=window.wp.dom},,,,function(e,t){e.exports=window.wp.keycodes},function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"c",(function(){return n})),c.d(t,"b",(function(){return o})),c.d(t,"d",(function(){return a}));const r=e=>"number"==typeof e,n=e=>"string"==typeof e,o=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function a(e,t){return o(e)&&t in e}},,,,,,function(e,t){e.exports=window.wp.warning},,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0);const n=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,,,,function(e,t,c){"use strict";var r=c(2),n=c(1),o=c(85);const a=Object(r.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(n.sprintf)( +/* translators: %s Field label. */ +Object(n.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(o.a)(e.priority)&&(t.index=e.priority),Object(o.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},i=Object.entries(a).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,s(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const n=c&&void 0!==i[c]?i[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...n[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var r=c(0);c(159),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},function(e,t){e.exports=window.wp.wordcount},,,,,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(41),a=c(4),s=c.n(a),i=c(35);c(156);const l=e=>{let{currency:t,maxPrice:c,minPrice:a,priceClassName:l,priceStyle:u={}}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(n.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(i.formatPrice)(a),Object(i.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:a,style:u})," — ",Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",l),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:a,regularPrice:i,priceClassName:l,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:a},e),value:i}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(n.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(o.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",l),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:n,format:a="",maxPrice:i,minPrice:d,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}=e;const j=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});a.includes("")||(a="",console.error("Price formats need to include the `` tag."));const E=g&&p!==g;let _=Object(r.createElement)("span",{className:s()("wc-block-components-product-price__value",b)});return E?_=Object(r.createElement)(u,{currency:n,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}):void 0!==d&&void 0!==i?_=Object(r.createElement)(l,{currency:n,maxPrice:i,minPrice:d,priceClassName:b,priceStyle:m}):p&&(_=Object(r.createElement)(o.a,{className:s()("wc-block-components-product-price__value",b),currency:n,value:p,style:m})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(a,{price:_}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return s}));var r=c(6);let n;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(n||(n={}));const o={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:n.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:n.REMOVE_EVENT_CALLBACK,eventType:e})},a={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,eventType:c,id:r,callback:o,priority:s}=arguments.length>1?arguments[1]:void 0;const i=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case n.ADD_EVENT_CALLBACK:return i.set(r,{priority:s,callback:o}),{...e,[c]:i};case n.REMOVE_EVENT_CALLBACK:return i.delete(r),{...e,[c]:i}}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(8);function n(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n);c(212),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)("div",{className:o()("wc-block-components-product-badge",c)},t)}},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=c(6),o=c(26),a=c.n(o);const s=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t}=e;const[c,o]=Object(r.useState)({}),i=Object(r.useCallback)(e=>c[e],[c]),l=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{o(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{o({})},[]),p=Object(r.useCallback)(e=>{e&&o(t=>(e=Object(n.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&a()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),b=Object(r.useCallback)((e,t)=>{o(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return a()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:i,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{b(e,{hidden:!0})},[b]),showValidationError:Object(r.useCallback)(e=>{b(e,{hidden:!1})},[b]),showAllValidationErrors:Object(r.useCallback)(()=>{o(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:l};return Object(r.createElement)(s.Provider,{value:m},t)}},,function(e,t,c){"use strict";var r=c(24),n=c.n(r),o=c(0),a=c(8),s=c(1),i=c(25),l=e=>{let{imageUrl:t=i.m+"/block-error.svg",header:c=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:n,errorMessagePrefix:a=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),r&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",n),l&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};c(172);class u extends a.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,text:r,errorMessagePrefix:n,renderError:a,button:s}=this.props,{errorMessage:i,hasError:u}=this.state;return u?"function"==typeof a?a({errorMessage:i}):Object(o.createElement)(l,{errorMessage:c?i:null,header:e,imageUrl:t,text:r,errorMessagePrefix:n,button:s}):this.props.children}}t.a=u},,,,function(e,t,c){"use strict";var r=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:n,secondaryDescription:o,id:a}=e;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:a&&a+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(r.createElement)("span",{id:a&&a+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},n&&Object(r.createElement)("span",{id:a&&a+"__description",className:"wc-block-components-radio-control__description"},n),o&&Object(r.createElement)("span",{id:a&&a+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},o)))}},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(118);t.a=e=>{let{checked:t,name:c,onChange:n,option:s}=e;const{value:i,label:l,description:u,secondaryLabel:d,secondaryDescription:p}=s;return Object(r.createElement)("label",{className:o()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${i}`},Object(r.createElement)("input",{id:`${c}-${i}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:i,onChange:e=>n(e.target.value),checked:t,"aria-describedby":o()({[`${c}-${i}__label`]:l,[`${c}-${i}__secondary-label`]:d,[`${c}-${i}__description`]:u,[`${c}-${i}__secondary-description`]:p})}),Object(r.createElement)(a.a,{id:`${c}-${i}`,label:l,secondaryLabel:d,description:u,secondaryDescription:p}))}},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(4),s=c.n(a);c(10),c(215),t.a=e=>{let{children:t,className:c,headingLevel:r,...a}=e;const i=s()("wc-block-components-title",c),l="h"+r;return Object(o.createElement)(l,n()({className:i},a),t)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(13),n=c(0),o=c(16),a=c(93);const s=()=>{const e=Object(a.a)(),{selectShippingRate:t}=Object(r.useDispatch)(o.CART_STORE_KEY);return{selectShippingRate:Object(n.useCallback)((c,r)=>{t(c,r).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(r.useSelect)(e=>e(o.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,,,,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(14),s=c(4),i=c.n(s);c(155),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:s="",rel:l,style:u,onClick:d,...p}=e;const b=i()("wc-block-components-product-name",t);if(c){const e=p;return Object(o.createElement)("span",n()({className:b},e,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)}}))}return Object(o.createElement)("a",n()({className:b,href:s,rel:l},p,{dangerouslySetInnerHTML:{__html:Object(a.decodeEntities)(r)},style:u}))}},function(e,t,c){"use strict";c.d(t,"b",(function(){return g})),c.d(t,"a",(function(){return h}));var r=c(0),n=(c(10),c(13)),o=c(60),a=c(49),s=c(5),i=c.n(s),l=c(4),u=c.n(l),d=c(481);c(157);const p=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 b=e=>{let{className:t,notices:c,removeNotice:n}=e;const o=c.filter(e=>"snackbar"!==e.type);if(!o.length)return null;const a=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:a},o.map(e=>Object(r.createElement)(d.a,i()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&n(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),g=()=>Object(r.useContext)(m),h=e=>{let{children:t,className:c="",createNoticeContainer:s=!0,context:i="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(n.useDispatch)("core/notices"),[d,p]=Object(r.useState)(!1),{dispatchStoreEvent:g}=Object(o.a)(),{isEditor:h}=Object(a.b)(),O=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...c,context:c.context||i}),g("store-notice-create",{status:e,content:t,options:c})}),[l,g,i]),j=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;u(e,t)}),[u,i]),{notices:E}=Object(n.useSelect)(e=>({notices:e("core/notices").getNotices(i)}),[i]),_={notices:E,createNotice:O,removeNotice:j,context:i,setIsSuppressed:p},f=d?null:Object(r.createElement)(b,{className:c,notices:_.notices,removeNotice:_.removeNotice,isEditor:h});return Object(r.createElement)(m.Provider,{value:_},s&&f,t)}},function(e,t,c){"use strict";var r=c(0),n=c(100),o=c(73);const a=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),i=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,l=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=s(e),n=r.split(" ").splice(0,t).join(" ");return Object(o.autop)(i(n,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const n=s(e),a=n.slice(0,t);if(c)return Object(o.autop)(i(a,r));const l=a.match(/([\s]+)/g),u=l?l.length:0,d=n.slice(0,t+u);return Object(o.autop)(i(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:i=""}=e;const d=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(o.autop)(e),s=Object(n.count)(r,c);if(s<=t)return r;const i=a(r),d=Object(n.count)(i,c);return d<=t?i:"words"===c?l(i,t):u(i,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(r.createElement)(r.RawHTML,{className:i},d)}},,,,,,,,,function(e,t){},,,,,,function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=c(9),s=c(119);c(224),t.a=Object(a.withInstanceId)(e=>{let{className:t="",instanceId:c,id:n,selected:a,onChange:i=(()=>{}),options:l=[]}=e;const u=n||c;return l.length&&Object(r.createElement)("div",{className:o()("wc-block-components-radio-control",t)},l.map(e=>Object(r.createElement)(s.a,{key:`${u}-${e.value}`,name:"radio-control-"+u,checked:e.value===a,option:e,onChange:t=>{i(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},function(e,t,c){"use strict";var r=c(24),n=c.n(r),o=c(0),a=c(1),s=c(8),i=(c(10),c(2)),l=c(33);class u extends s.Component{constructor(){super(...arguments),n()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(a.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(a.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const r=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.StoreNoticesContainer,{notices:r})}return this.props.children}}u.defaultProps={isEditor:!1},t.a=u},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[c,r]=t;return e[c]=r,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,c){"use strict";var r=c(0),n=c(1),o=c(240),a=c(187),s=c(49),i=c(189),l=c(65),u=c.n(l),d=c(146);t.a=()=>{const{isEditor:e}=Object(s.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:l,paymentMethodData:p,setPaymentStatus:b}=Object(i.b)(),m=Object(o.a)(),{paymentMethods:g}=Object(a.a)(),h=Object(r.useRef)(l),O=Object(r.useRef)(p),j=Object(r.useCallback)(e=>()=>{h.current=l,O.current=p,b().started(),t(e)},[l,p,t,b]),E=Object(r.useCallback)(()=>{b().pristine(),t(h.current,O.current)},[t,b]),_=Object(r.useCallback)(e=>{b().error(e),c(e),t(h.current,O.current)},[t,b,c]),f=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?_(e):c("")}),[c,_]),y=Object.entries(g),v=y.length>0?y.map(t=>{let[c,n]=t;const o=e?n.edit:n.content;return Object(r.isValidElement)(o)?Object(r.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(r.cloneElement)(o,{...m,onClick:j(c),onClose:E,onError:_,setExpressPaymentError:f})):null}):Object(r.createElement)("li",{key:"noneRegistered"},Object(n.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(r.createElement)(d.a,{isEditor:e},Object(r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},v))}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(3),a=c(13),s=c(27);t.a=e=>{let{setPageId:t,pageId:c,labels:i}=e;const l=Object(a.useSelect)(e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100}),[])||null;return l?Object(r.createElement)(o.PanelBody,{title:i.title},Object(r.createElement)(o.SelectControl,{label:Object(n.__)("Link to","woo-gutenberg-products-block"),value:c,options:[{label:i.default,value:0},...l.map(e=>({label:Object(s.a)(e,l),value:parseInt(e.id,10)}))],onChange:e=>t(parseInt(e,10))})):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(0),n=c(1),o=(c(10),c(43)),a=c(194),s=c(120);c(229);const i=e=>{let{text:t,url:c="https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565"}=e;return Object(r.createElement)("div",{className:"wc-block-feedback-prompt"},Object(r.createElement)(o.a,{srcElement:a.a}),Object(r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(n.__)("Feedback?","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(r.createElement)("a",{href:c,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(n.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(r.createElement)(o.a,{srcElement:s.a,size:16})))},l=()=>Object(r.createElement)(i,{text:Object(n.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woo-gutenberg-products-block"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"})},function(e,t){e.exports=window.wp.plugins},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(46),a=c(66),s=c(19),i=c(397),l=c(36),u=c(49),d=c(4),p=c.n(d),b=c(14),m=c(30),g=c(26),h=c.n(g),O=c(122),j=c(60);const E=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var _=c(145),f=c(118),y=c(35),v=c(41),k=c(2);const w=e=>{const t=Object(k.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(b.decodeEntities)(e.name),value:e.rate_id,description:Object(r.createElement)(r.Fragment,null,Number.isFinite(t)&&Object(r.createElement)(v.a,{currency:Object(y.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(b.decodeEntities)(e.delivery_time))}};var S=e=>{let{className:t,noResultsMessage:c,onSelectRate:n,rates:o,renderOption:a=w,selected:s}=e;if(0===o.length)return c;if(o.length>1)return Object(r.createElement)(_.a,{className:t,onChange:e=>{n(e)},selected:s,options:o.map(a)});const{label:i,secondaryLabel:l,description:u,secondaryDescription:d}=a(o[0]);return Object(r.createElement)(f.a,{label:i,secondaryLabel:l,description:u,secondaryDescription:d})};c(223);var C=e=>{let{packageId:t,className:c,noResultsMessage:o,renderOption:a,packageData:i,collapsible:l=!1,collapse:u=!1,showItems:d=!1}=e;const{selectShippingRate:g,selectedShippingRate:_}=((e,t)=>{const{dispatchCheckoutEvent:c}=Object(j.a)(),{selectShippingRate:n,isSelectingRate:o}=Object(O.a)(),[a,s]=Object(r.useState)(()=>E(t)),i=Object(r.useRef)(t);return Object(r.useEffect)(()=>{h()(i.current,t)||(i.current=t,s(E(t)))},[t]),{selectShippingRate:Object(r.useCallback)(t=>{s(t),n(t,e),c("set-selected-shipping-rate",{shippingRateId:t})},[e,n,c]),selectedShippingRate:a,isSelectingRate:o}})(t,i.shipping_rates),f=Object(r.createElement)(r.Fragment,null,(d||l)&&Object(r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},i.name),d&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(i.items).map(e=>{const t=Object(b.decodeEntities)(e.name),c=e.quantity;return Object(r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(m.a,{label:c>1?`${t} × ${c}`:""+t,screenReaderLabel:Object(n.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(n._n)("%1$s (%2$d unit)","%1$s (%2$d units)",c,"woo-gutenberg-products-block"),t,c)}))}))),y=Object(r.createElement)(S,{className:c,noResultsMessage:o,rates:i.shipping_rates,onSelectRate:g,selected:_,renderOption:a});return l?Object(r.createElement)(s.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!u,title:f},y):Object(r.createElement)("div",{className:p()("wc-block-components-shipping-rates-control__package",c)},f,y)};const N=e=>{let{packages:t,collapse:c,showItems:n,collapsible:o,noResultsMessage:a,renderOption:s}=e;return t.length?Object(r.createElement)(r.Fragment,null,t.map(e=>{let{package_id:t,...i}=e;return Object(r.createElement)(C,{key:t,packageId:t,packageData:i,collapsible:o,collapse:c,showItems:n,noResultsMessage:a,renderOption:s})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:c,className:d,collapsible:p=!1,noResultsMessage:b,renderOption:m}=e;Object(r.useEffect)(()=>{if(c)return;const e=Object(i.a)(t),r=Object(i.b)(t);1===e?Object(o.speak)(Object(n.sprintf)( +/* translators: %d number of shipping options found. */ +Object(n._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(o.speak)(Object(n.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(n._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(n.sprintf)( +/* translators: %d number of shipping options available. */ +Object(n._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))},[c,t]);const{extensions:g,receiveCart:h,...O}=Object(l.a)(),j={className:d,collapsible:p,noResultsMessage:b,renderOption:m,extensions:g,cart:O,components:{ShippingRatesControlPackage:C}},{isEditor:E}=Object(u.b)();return Object(r.createElement)(a.a,{isLoading:c,screenReaderLabel:Object(n.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},E?Object(r.createElement)(N,{packages:t,noResultsMessage:b,renderOption:m}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(s.ExperimentalOrderShippingPackages.Slot,j),Object(r.createElement)(s.ExperimentalOrderShippingPackages,null,Object(r.createElement)(N,{packages:t,noResultsMessage:b,renderOption:m}))))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(1),n=c(13),o=c(16),a=c(14),s=c(36),i=c(0);c(10),c(485),c(4),c(19),c(60),c(49);const l=Object(i.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"});var u=c(112),d=c(47);const p=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(s.a)(),{addErrorNotice:c}=Object(d.a)(),{addSnackbarNotice:p}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:r}=Object(i.useContext)(l),n=Object(i.useRef)(e);Object(i.useEffect)(()=>{n.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;n.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),a=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...o,...a,setIsSuppressed:r}})(),{setValidationErrors:b}=Object(u.b)();return{appliedCoupons:e,isLoading:t,...Object(n.useSelect)((e,t)=>{let{dispatch:n}=t;const s=e(o.CART_STORE_KEY),i=s.isApplyingCoupon(),l=s.isRemovingCoupon(),{applyCoupon:u,removeCoupon:d,receiveApplyingCoupon:m}=n(o.CART_STORE_KEY);return{applyCoupon:e=>{u(e).then(t=>{!0===t&&p(Object(r.sprintf)( +/* translators: %s coupon code. */ +Object(r.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{b({coupon:{message:Object(a.decodeEntities)(e.message),hidden:!1}}),m("")})},removeCoupon:e=>{d(e).then(t=>{!0===t&&p(Object(r.sprintf)( +/* translators: %s coupon code. */ +Object(r.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{c(e.message,{id:"coupon-form"}),m("")})},isApplyingCoupon:i,isRemovingCoupon:l}},[c,p])}}},function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(4),s=c.n(a);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:c=null,alt:r=""}=e;return c?Object(o.createElement)("img",{className:i(t),src:c,alt:r}):null},u=c(25);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(85);c(227),t.a=e=>{let{icons:t=[],align:c="center",className:r}=e;const a=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.c)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===a.length)return null;const i=s()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},r);return Object(o.createElement)("div",{className:i},a.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(o.createElement)(l,n()({key:"payment-method-icon-"+e.id},t))}))}},function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(4),s=c.n(a),i=c(1),l=c(43),u=c(208);c(144);var d=e=>{let{text:t,screenReaderText:c="",element:r="li",className:a="",radius:i="small",children:l=null,...u}=e;const d=r,p=s()(a,"wc-block-components-chip","wc-block-components-chip--radius-"+i),b=Boolean(c&&c!==t);return Object(o.createElement)(d,n()({className:p},u),Object(o.createElement)("span",{"aria-hidden":b,className:"wc-block-components-chip__text"},t),b&&Object(o.createElement)("span",{className:"screen-reader-text"},c),l)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:r=!1,onRemove:a=(()=>{}),removeOnAnyClick:p=!1,text:b,screenReaderText:m="",...g}=e;const h=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:b;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(i.__)("Remove","woo-gutenberg-products-block"):Object(i.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},j=p?O:{},E=p?{"aria-hidden":!0}:O;return Object(o.createElement)(d,n()({},g,j,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(o.createElement)(h,n()({className:"wc-block-components-chip__remove"},E),Object(o.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));var r=c(40),n=c(189);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:a}=Object(n.b)(),s=Object(r.a)(t),i=Object(r.a)(c);return{paymentMethods:e?i:s,isInitialized:e?a:o}},a=()=>o(!1),s=()=>o(!0)},,function(e,t,c){"use strict";c.d(t,"b",(function(){return D})),c.d(t,"a",(function(){return L}));var r=c(0),n=c(85);let o,a;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(o||(o={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(a||(a={}));const s={currentStatus:o.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},i={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:o,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:n="",paymentMethods:i={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case o.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:o.PRISTINE};case o.STARTED:return{...e,currentStatus:o.STARTED};case o.ERROR:return e.currentStatus!==o.ERROR?{...e,currentStatus:o.ERROR,errorMessage:n||e.errorMessage}:e;case o.FAILED:return e.currentStatus!==o.FAILED?{...e,currentStatus:o.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:n||e.errorMessage}:e;case o.SUCCESS:return e.currentStatus!==o.SUCCESS?{...e,currentStatus:o.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case o.PROCESSING:return e.currentStatus!==o.PROCESSING?{...e,currentStatus:o.PROCESSING,errorMessage:""}:e;case o.COMPLETE:return e.currentStatus!==o.COMPLETE?{...e,currentStatus:o.COMPLETE}:e;case a.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:i};case a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:i};case a.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case a.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:c||e.paymentMethodData}}},u=c(1),d=c(39),p=c(40),b=c(2),m=c(116),g=c(49),h=c(67),O=c(56),j=c(36),E=c(47),_=c(44);const f=(e,t,c,n)=>{const[o,a]=Object(r.useState)(!1),{isEditor:s}=Object(g.b)(),{selectedRates:i}=Object(h.b)(),{billingData:l,shippingAddress:d}=Object(O.b)(),_=Object(p.a)(i),f=Object(p.a)(c),y=Object(j.a)(),{cartTotals:v,cartIsLoading:k,cartNeedsShipping:w,paymentRequirements:S}=y,C=Object(r.useRef)({cart:y,cartTotals:v,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}),{addErrorNotice:N}=Object(E.a)();Object(r.useEffect)(()=>{C.current={cart:y,cartTotals:v,cartNeedsShipping:w,billingData:l,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}},[y,v,w,l,d,_,S]);const M=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e{k||I()},[I,y,_,l,k]),o},y=e=>({type:e}),v=e=>({type:o.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:o.FAILED,errorMessage:t,paymentMethodData:c}},w=e=>{let{paymentMethodData:t}=e;return{type:o.SUCCESS,paymentMethodData:t}},S=e=>({type:a.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:a.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:a.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),M=(e,t)=>({type:a.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var I=c(50),R=c(107),x=c(251);var P=c(254),T=c(112);const A=Object(r.createContext)(i),D=()=>Object(r.useContext)(A),L=e=>{let{children:t}=e;const{isProcessing:c,isIdle:a,isCalculating:i,hasError:u}=Object(I.b)(),{isEditor:p,getPreviewData:m}=Object(g.b)(),{setValidationErrors:j}=Object(T.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:B,isErrorResponse:V,isFailResponse:U,noticeContexts:z}=Object(_.c)(),[F,G]=Object(r.useReducer)(R.b,{}),{onPaymentProcessing:H}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(x.a)("payment_processing",e)}),[e]))(G),Y=Object(r.useRef)(F);Object(r.useEffect)(()=>{Y.current=F},[F]);const[q,$]=Object(r.useReducer)(l,s),{dispatchActions:W,setPaymentStatus:Q}=(e=>{const{setBillingData:t}=Object(O.b)(),{setShippingAddress:c}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(S(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(N(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(M(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(y(o.PRISTINE)),started:()=>e(y(o.STARTED)),processing:()=>e(y(o.PROCESSING)),completed:()=>e(y(o.COMPLETE)),error:t=>e(v(t)),failed:function(c,r){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),e(k({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;n&&t(n),void 0!==typeof o&&null!=o&&o.address&&c(o.address),e(w({paymentMethodData:r}))}}),[e,t,c])}})($),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:c}=Object(_.c)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})(W.setRegisteredPaymentMethods),X=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.c)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),Z=Object(r.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const n=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});n.length&&(r[c]=n)}),r}(q.paymentMethods):{},[p,m,K,q.paymentMethods]),J=Object(r.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:z.EXPRESS_PAYMENTS}):L("wc-express-payment-error",z.EXPRESS_PAYMENTS)},[D,z.EXPRESS_PAYMENTS,L]),ee=Object.keys(q.expressPaymentMethods).includes(q.activePaymentMethod),te=Object(r.useMemo)(()=>({isPristine:q.currentStatus===o.PRISTINE,isStarted:q.currentStatus===o.STARTED,isProcessing:q.currentStatus===o.PROCESSING,isFinished:[o.ERROR,o.FAILED,o.SUCCESS].includes(q.currentStatus),hasError:q.currentStatus===o.ERROR,hasFailed:q.currentStatus===o.FAILED,isSuccessful:q.currentStatus===o.SUCCESS,isDoingExpressPayment:q.currentStatus!==o.PRISTINE&&ee}),[q.currentStatus,ee]);Object(r.useEffect)(()=>{const e=Object.keys(q.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(q.expressPaymentMethods)];if(q.activePaymentMethod&&t.includes(q.activePaymentMethod))return;Q().pristine();const c=Object.keys(Z).flatMap(e=>Z[e])[0]||void 0;if(c){const e=c.tokenId,t=c.method.gateway,r=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e.toString(),isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys(q.paymentMethods)[0])},[K,q.paymentMethods,q.expressPaymentMethods,W,Q,q.activePaymentMethod,Z]),Object(r.useEffect)(()=>{!c||u||i||te.isFinished||Q().processing()},[c,u,i,te.isFinished,Q]),Object(r.useEffect)(()=>{a&&!te.isSuccessful&&Q().pristine()},[a,te.isSuccessful,Q]),Object(r.useEffect)(()=>{u&&te.isSuccessful&&Q().pristine()},[u,te.isSuccessful,Q]),Object(r.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",z.PAYMENTS),Object(P.b)(Y.current,"payment_processing",{}).then(e=>{let t,c;var r,n,o,a,s,i;if(e.forEach(e=>{B(e)&&(t=e),(V(e)||U(e))&&(c=e)}),t&&!c)Q().success(null===(r=t)||void 0===r||null===(n=r.meta)||void 0===n?void 0:n.paymentMethodData,null===(o=t)||void 0===o||null===(a=o.meta)||void 0===a?void 0:a.billingData,null===(s=t)||void 0===s||null===(i=s.meta)||void 0===i?void 0:i.shippingData);else if(c&&U(c)){var l,u,d,p,b,m;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||z.PAYMENTS}),Q().failed(null===(l=c)||void 0===l?void 0:l.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var g,h;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=c)||void 0===h?void 0:h.messageContext)||z.PAYMENTS}),Q().error(c.message),j(null===(g=c)||void 0===g?void 0:g.validationErrors)}else Q().success()}))},[te.isProcessing,j,Q,L,z.PAYMENTS,B,U,V,D]);const ce="object"==typeof q.paymentMethodData&&Object(n.d)(q.paymentMethodData,"token")?q.paymentMethodData.token+"":"",re={setPaymentStatus:Q,currentStatus:te,paymentStatuses:o,paymentMethodData:q.paymentMethodData,errorMessage:q.errorMessage,activePaymentMethod:q.activePaymentMethod,activeSavedToken:ce,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:H,customerPaymentMethods:Z,paymentMethods:q.paymentMethods,expressPaymentMethods:q.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:X,setExpressPaymentError:J,isExpressPaymentMethodActive:ee,shouldSavePayment:q.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(r.createElement)(A.Provider,{value:re},t)}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0),n=(c(10),c(112));c(160);const o=e=>{let{errorMessage:t="",propertyName:c="",elementId:o=""}=e;const{getValidationError:a,getValidationErrorId:s}=Object(n.b)();if(!t||"string"!=typeof t){const e=a(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:s(o)},t))}},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=o},,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(18);const s=Object(o.createElement)(e=>{let{className:t,size:c,...r}=e;return Object(o.createElement)(a.SVG,n()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},r),Object(o.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=s},,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){},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){},,,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(14),s=c(2);c(211),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(a.decodeEntities)(t.alt)||c||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",n()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(109);t.a=()=>Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(n.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(109);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(o.a,{className:"wc-block-components-product-low-stock-badge"},Object(n.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(n.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(0),n=c(181),o=c(2),a=c(114),s=c(189),i=c(67),l=c(56),u=c(50),d=c(1),p=c(11),b=c.n(p),m=c(248),g=c(28);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),n=`wc-${c}-new-payment-method`;return r.push({key:n,value:t}),r},O=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var j=c(112),E=c(36),_=c(47),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:n,isProcessing:o,isBeforeProcessing:a,isComplete:p,orderNotes:f,shouldCreateAccount:y,extensionData:v}=Object(u.b)(),{hasValidationErrors:k}=Object(j.b)(),{shippingErrorStatus:w}=Object(i.b)(),{billingData:S,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:N,receiveCart:M}=Object(E.a)(),{activePaymentMethod:I,isExpressPaymentMethodActive:R,currentStatus:x,paymentMethodData:P,expressPaymentMethods:T,paymentMethods:A,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:B,setIsSuppressed:V}=Object(_.a)(),U=Object(r.useRef)(S),z=Object(r.useRef)(C),F=Object(r.useRef)(n),[G,H]=Object(r.useState)(!1),Y=Object(r.useMemo)(()=>{var e;const t={...T,...A};return null==t||null===(e=t[I])||void 0===e?void 0:e.paymentMethodId},[I,T,A]),q=k&&!R||x.hasError||w.hasError,$=!e&&!q&&(x.isSuccessful||!N)&&o;Object(r.useEffect)(()=>{V(R)},[R,V]),Object(r.useEffect)(()=>{q===e||!o&&!a||R||c.setHasError(q)},[q,e,o,a,R,c]),Object(r.useEffect)(()=>{U.current=S,z.current=C,F.current=n},[S,C,n]);const W=Object(r.useCallback)(()=>!k&&(x.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!w.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[k,x.hasError,w.hasError]);Object(r.useEffect)(()=>{let e;return R||(e=t(W,0)),()=>{R||e()}},[t,W,R]),Object(r.useEffect)(()=>{F.current&&(window.location.href=F.current)},[p]);const Q=Object(r.useCallback)(async()=>{if(G)return;H(!0),B("checkout");const e=N?{payment_method:Y,payment_data:h(P,D,I)}:{},t={billing_address:Object(m.a)(U.current),shipping_address:Object(m.a)(z.current),customer_note:f,should_create_account:y,...e,extensions:{...v}};b()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(O(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),H(!1)}).catch(e=>{try{null!=e&&e.headers&&O(e.headers,c),e.json().then(e=>{var t,r,n;null!==(t=e.data)&&void 0!==t&&t.cart&&M(e.data.cart),L(Object(g.b)(e),{id:"checkout"}),null==e||null===(r=e.additional_errors)||void 0===r||null===(n=r.forEach)||void 0===n||n.call(r,e=>{L(e.message,{id:e.error_code})}),c.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text. +Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}c.setHasError(!0),H(!1)})},[G,B,f,y,N,Y,P,D,I,v,c,L,M]);return Object(r.useEffect)(()=>{$&&!G&&Q()},[Q,$,G]),null};const y=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(l.a,null,Object(r.createElement)(i.a,null,Object(r.createElement)(s.a,null,t,Object(r.createElement)(a.a,{renderError:o.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(n.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(f,null)))))}},function(e,t,c){"use strict";var r=c(0),n=c(6),o=c(14);c(214);var a=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(n.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(o.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(o.decodeEntities)(e.display||e.value)))}))):null},s=c(129),i=c(25),l=e=>{let{className:t,shortDescription:c="",fullDescription:n=""}=e;const o=c||n;return o?Object(r.createElement)(s.a,{className:t,source:o,maxLength:15,countType:i.o.wordCountType||"words"}):null};c(213),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:n=[],variation:o=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(l,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(a,{details:n}),Object(r.createElement)(a,{details:o.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return R}));var r=c(1),n=c(35),o=c(0),a=c(4),s=c.n(a),i=c(18),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),u=c(205),d=c(399),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),b=c(43),m=c(85);c(228);const g={bank:l,bill:u.a,card:d.a,checkPayment:p};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,n=Object(o.useCallback)(e=>r&&Object(m.c)(e)&&Object(m.d)(g,e),[r]),a=s()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(o.createElement)("span",{className:a},n(t)?Object(o.createElement)(b.a,{srcElement:g[t]}):t,c)},O=c(184),j=c(2),E=c(65),_=c.n(E),f=c(66),y=c(193),v=c(36),k=c(183),w=c(44),S=c(50),C=c(189),N=c(67),M=c(56);const I=(e,t)=>{const c=[],n=(t,c)=>{const r=c+"_tax",n=Object(m.d)(e,c)&&Object(m.c)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:n,valueWithTax:n+(Object(m.d)(e,r)&&Object(m.c)(e[r])?parseInt(e[r],10):0)}};return c.push(n(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(n(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(n(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(n(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},R=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(S.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:E,shouldSavePayment:R}=Object(C.b)(),{shippingErrorStatus:x,shippingErrorTypes:P,shippingRates:T,shippingRatesLoading:A,selectedRates:D,setSelectedRates:L,isSelectingRate:B,onShippingRateSuccess:V,onShippingRateFail:U,onShippingRateSelectSuccess:z,onShippingRateSelectFail:F,needsShipping:G}=Object(N.b)(),{billingData:H,shippingAddress:Y,setShippingAddress:q}=Object(M.b)(),{cartItems:$,cartFees:W,cartTotals:Q,extensions:K}=Object(v.a)(),{appliedCoupons:X}=Object(k.a)(),{noticeContexts:Z,responseTypes:J}=Object(w.c)(),ee=Object(o.useRef)(I(Q,G)),te=Object(o.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(Q.total_price,10)});Object(o.useEffect)(()=>{ee.current=I(Q,G),te.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(Q.total_price,10)}},[Q,G]);const ce=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),E(e)}),[E]);return{activePaymentMethod:m,billing:{appliedCoupons:X,billingData:H,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(n.getCurrencyFromPriceResponse)(Q),customerId:p,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:$,cartFees:W,extensions:K},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:a},components:{LoadingMask:f.a,PaymentMethodIcons:O.a,PaymentMethodLabel:h,ValidationInputError:y.a},emitResponse:{noticeContexts:Z,responseTypes:J},eventRegistration:{onCheckoutAfterProcessingWithError:u,onCheckoutAfterProcessingWithSuccess:l,onCheckoutBeforeProcessing:s,onCheckoutValidationBeforeProcessing:i,onPaymentProcessing:g,onShippingRateFail:U,onShippingRateSelectFail:F,onShippingRateSelectSuccess:z,onShippingRateSuccess:V},onSubmit:d,paymentStatus:b,setExpressPaymentError:ce,shippingData:{isSelectingRate:B,needsShipping:G,selectedRates:D,setSelectedRates:L,setShippingAddress:q,shippingAddress:Y,shippingRates:T,shippingRatesLoading:A},shippingStatus:{shippingErrorStatus:x,shippingErrorTypes:P},shouldSavePayment:R}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var r=c(0),n=(c(10),c(9)),o=c(4),a=c.n(o);const s=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(r.useContext)(s),l=e=>{let{children:t,className:c=""}=e;const[o,i]=(()=>{const[e,{width:t}]=Object(n.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),l={hasContainerWidth:""!==i,containerClassName:i,isMobile:"is-mobile"===i,isSmall:"is-small"===i,isMedium:"is-medium"===i,isLarge:"is-large"===i};return Object(r.createElement)(s.Provider,{value:l},Object(r.createElement)("div",{className:a()(c,i)},o,t))}},function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(1),s=c(8),i=c(4),l=c.n(i),u=c(112),d=c(193),p=c(9),b=c(85),m=c(30);c(170);var g=Object(s.forwardRef)((e,t)=>{let{className:c,id:r,type:a="text",ariaLabel:s,ariaDescribedBy:i,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...y}=e;const[v,k]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":v||O})},Object(o.createElement)("input",n()({type:a,id:r,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>k(!0),onBlur:e=>{_(e.target.value),k(!1)},"aria-label":s||u,disabled:p,"aria-describedby":b&&!i?r+"__help":i,required:E},y)),Object(o.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&Object(o.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),f)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:i,errorId:p,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:j="",value:E="",..._}=e;const[f,y]=Object(s.useState)(!0),v=Object(s.useRef)(null),{getValidationError:k,hideValidationError:w,setValidationErrors:S,clearValidationError:C,getValidationErrorId:N}=Object(u.b)(),M=void 0!==r?r:"textinput-"+c,I=void 0!==p?p:M,R=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 c=t.checkValidity();c?C(I):S({[I]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[C,I,S]);Object(s.useEffect)(()=>{var e;f&&m&&(null===(e=v.current)||void 0===e||e.focus()),y(!1)},[m,f,y]),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&&R(!0)},[E,R]),Object(s.useEffect)(()=>()=>{C(I)},[C,I]);const x=k(I)||{};Object(b.c)(j)&&""!==j&&(x.message=j);const P=x.message&&!x.hidden,T=O&&P&&N(I)?N(I):i;return Object(o.createElement)(g,n()({className:l()(t,{"has-error":P}),"aria-invalid":!0===P,id:M,onBlur:()=>{R(!1)},feedback:O&&Object(o.createElement)(d.a,{errorMessage:j,propertyName:I}),ref:v,onChange:e=>{w(I),h(e)},ariaDescribedBy:T,value:E},_))})},,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"a",(function(){return s}));const r=window.CustomEvent||null,n=(e,t)=>{let{bubbles:c=!1,cancelable:n=!1,element:o,detail:a={}}=t;if(!r)return;o||(o=document.body);const s=new r(e,{bubbles:c,cancelable:n,detail:a});o.dispatchEvent(s)};let o;const a=()=>{o&&clearTimeout(o),o=setTimeout(()=>{n("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const o=()=>{n(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,o),()=>jQuery(document).off(e,o)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return a})),c.d(t,"c",(function(){return s})),c.d(t,"a",(function(){return i}));var r=c(2),n=c(98),o=c(15);const a=e=>{let{country:t="",state:c="",city:r="",postcode:n=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:n?n.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(o.isEmail)(t)?t.trim():""},i=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(n.a)(t,{},e.country),o=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(o[c]="")}),o}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(107);const n=(e,t)=>function(c){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const o=r.a.addEventCallback(e,c,n);return t(o),()=>{t(r.a.removeEventCallback(e,o.id))}}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return a}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var n=c(44);const o=async(e,t,c)=>{const n=r(e,t),o=[];for(const e of n)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&o.push(t)}catch(e){console.error(e)}return!o.length||o},a=async(e,t,c)=>{const o=[],a=r(e,t);for(const e of a)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(n.a)(t)||Object(n.b)(t))return o.push(t),o;o.push(t)}catch(e){return console.error(e),o.push({type:"error"}),o}return o}},,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(0),n=c(13),o=c(12),a=c(6);const s=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:s=[]}=e;const i=Object(r.useRef)(c),l=Object(r.useRef)(s),{insertBlock:u,replaceInnerBlocks:d}=Object(n.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(n.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:i.current.map(e=>Object(o.getBlockType)(e))}),[t,i.current]),m=Object(r.useCallback)((e,c)=>{const r=Object(o.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,r;let{attributes:n}=e;return Boolean((null===(t=n.lock)||void 0===t?void 0:t.remove)||(null===(c=n.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[b]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&l.current.length>0){const e=Object(o.createBlocksFromInnerBlocksTemplate)(l.current);if(!Object(a.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=l.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=l.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===r?t:r+1)}})}},[t,p,g,d,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),n=c(3),o=c(1),a=c(2);const s=[];var i=c(5),l=c.n(i),u=e=>Object(r.createElement)("div",l()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,i]=(e=>{const[t,c]=((e,t)=>{const[c,n]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,n]})("wc-blocks_dismissed_compatibility_notices",s),[n,o]=Object(r.useState)(!1),a=t.includes(e);return Object(r.useEffect)(()=>{o(!a)},[a]),[n,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(a.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(n.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(o.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>i(),finishButtonText:Object(o.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(o.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(o.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-cart-block","version":"1.0.0","title":"Filled Cart","description":"Contains blocks that are displayed when the cart contains products.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-items-block","version":"1.0.0","title":"Cart Items block","description":"Column containing cart items.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-line-items-block","version":"1.0.0","title":"Cart Line Items","description":"Block containing current line items in Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-totals-block","version":"1.0.0","title":"Cart Totals","description":"Column containing the cart totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false},"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/filled-cart-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/proceed-to-checkout-block","version":"1.0.0","title":"Proceed to checkout","description":"Allow customers proceed to Checkout.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"default":{"remove":true,"move":true}}},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e,t,c){"use strict";(function(e){var r=c(0),n=c(1),o=c(4),a=c.n(o),s=c(76),i=c(25),l=c(50),u=c(470),d=c(2);c(402),t.a=t=>{let{checkoutPageId:c,className:o}=t;const p=Object(d.getSetting)("page-"+c,!1),{isCalculating:b}=Object(l.b)(),[m,g]=Object(u.a)(),[h,O]=Object(r.useState)(!1);Object(r.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{O(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const j=Object(r.createElement)(s.a,{className:"wc-block-cart__submit-button",href:p||i.f,disabled:b,onClick:()=>O(!0),showSpinner:h},Object(n.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(r.createElement)("div",{className:a()("wc-block-cart__submit",o)},m,Object(r.createElement)("div",{className:"wc-block-cart__submit-container"},j),"below"===g&&Object(r.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},j))}}).call(this,c(401))},function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-cart-block","version":"1.0.0","title":"Empty Cart","description":"Contains blocks that are displayed when the cart is empty.","category":"woocommerce","supports":{"align":["wide"],"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/cart"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-accepted-payment-methods-block","version":"1.0.0","title":"Accepted Payment Methods","description":"Display accepted payment methods.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){e.exports=c(435)},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"nonzero",d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49A.996.996 0 0 0 20.01 4H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45ZM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2Z"}))," ");t.a=o},function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(12);const n=["core/paragraph","core/image","core/separator"],o=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...n]},function(e,t,c){"use strict";var r=c(0),n=c(4),o=c.n(n),a=(c(10),c(241));c(210),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(a.a,{className:o()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(4),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-main",n)},c)});t.a=s},function(e,t){},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(4),a=c.n(o);const s=Object(n.forwardRef)((e,t)=>{let{children:c,className:n=""}=e;return Object(r.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",n)},c)});t.a=s},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),Object(r.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"}));t.a=o},,,,,function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(66),a=c(185),s=c(19),i=c(2);c(216);const l={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(s.__experimentalApplyCheckoutFilter)({arg:l,filterName:"coupons",defaultValue:t});return Object(r.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(o.a,{screenReaderLabel:Object(n.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(n.sprintf)( +/* translators: %s Coupon code. */ +Object(n.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(n.sprintf)( +/* translators: %s is a coupon code. */ +Object(n.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:O?Object(n.__)("Discount","woo-gutenberg-products-block"):Object(n.__)("Coupons","woo-gutenberg-products-block"),value:O?-1*O:"-"})}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(76),a=c(242),s=c(30),i=c(66),l=c(9),u=c(112),d=c(193),p=c(19);c(218),t.a=Object(l.withInstanceId)(e=>{let{instanceId:t,isLoading:c=!1,initialOpen:l=!1,onSubmit:b=(()=>{})}=e;const[m,g]=Object(r.useState)(""),h=Object(r.useRef)(!1),{getValidationError:O,getValidationErrorId:j}=Object(u.b)(),E=O("coupon");Object(r.useEffect)(()=>{h.current!==c&&(c||!m||E||g(""),h.current=c)},[c,m,E]);const _="wc-block-components-totals-coupon__input-"+t;return Object(r.createElement)(p.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:l,title:Object(r.createElement)(s.a,{label:Object(n.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(n.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:_})},Object(r.createElement)(i.a,{screenReaderLabel:Object(n.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:c,showSpinner:!1},Object(r.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(r.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(r.createElement)(a.a,{id:_,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(n.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:j(_),onChange:e=>{g(e)},focusOnMount:!0,showError:!1}),Object(r.createElement)(o.a,{className:"wc-block-components-totals-coupon__button",disabled:c||!m,showSpinner:c,onClick:e=>{e.preventDefault(),b(m)},type:"submit"},Object(n.__)("Apply","woo-gutenberg-products-block"))),Object(r.createElement)(d.a,{propertyName:"coupon",elementId:_}))))})},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));const r=e=>e.length,n=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(41),a=c(19),s=c(36),i=c(2);c(225),t.a=e=>{let{currency:t,values:c}=e;const l=Object(i.getSetting)("taxesEnabled",!0)&&Object(i.getSetting)("displayCartPricesIncludingTax",!1),{total_price:u,total_tax:d}=c,{receiveCart:p,...b}=Object(s.a)(),m=Object(a.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(n.__)("Total","woo-gutenberg-products-block"),extensions:b.extensions,arg:{cart:b}}),g=parseInt(d,10);return Object(r.createElement)(a.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:m,value:parseInt(u,10),description:l&&0!==g&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(r.createInterpolateElement)(Object(n.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(o.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},function(e,t){},,function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}));t.a=o},function(e,t){},function(e,t){},function(e,t,c){"use strict";c.d(t,"a",(function(){return d})),c.d(t,"b",(function(){return b}));var r=c(7),n=c(80),o=c(13),a=c(0),s=c(84),i=c(61),l=c(12);const u=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},d=()=>{Object(i.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||Object(o.subscribe)(()=>{var e,t,c,n;const a=Object(o.select)(r.store);if(!a)return;const s=a.getSelectedBlock();s&&(u("wc-lock-selected-block--remove",!(null==s||null===(e=s.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),u("wc-lock-selected-block--move",!(null==s||null===(c=s.attributes)||void 0===c||null===(n=c.lock)||void 0===n||!n.move)))})},p=e=>{let{ref:t}=e;const c=Object(i.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),u=t.current;return Object(a.useEffect)(()=>{if(u&&!c)return u.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{u.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:c}=e;if(!(c instanceof HTMLElement))return;if(t!==s.BACKSPACE&&t!==s.DELETE)return;if(Object(n.isTextField)(c))return;const a=c;void 0!==a.dataset.block&&(e=>{var t,c,n,a,s;if(!e)return!1;const{getBlock:i}=Object(o.select)(r.store),u=i(e);if("boolean"==typeof(null==u||null===(t=u.attributes)||void 0===t||null===(c=t.lock)||void 0===c?void 0:c.remove))return u.attributes.lock.remove;const d=Object(l.getBlockType)(u.name);var p,b,m;return"boolean"==typeof(null==d||null===(n=d.attributes)||void 0===n||null===(a=n.lock)||void 0===a||null===(s=a.default)||void 0===s?void 0:s.remove)&&(null==d||null===(p=d.attributes)||void 0===p||null===(b=p.lock)||void 0===b||null===(m=b.default)||void 0===m?void 0:m.remove)})(a.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},[u,c])},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object(a.useRef)(),c=Object(r.useBlockProps)({ref:t,...e});return p({ref:t}),c}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(4),a=c.n(o),s=c(7),i=c(43),l=c(206),u=c(77),d=c(12),p=c(180),b=c(3),m=c(269),g=c(25),h=c(114),O=c(49),j=c(235);const E=e=>{let{children:t,redirectUrl:c}=e;return Object(r.createElement)(j.a,{isCart:!0,redirectUrl:c},t)};var _=c(2),f=c(464),y=c(380),v=c(403),k=(c(405),c(406)),w=c(463),S=c(268);const C=Object(r.createContext)({hasDarkControls:!1});Object(k.a)();const N=["woocommerce/filled-cart-block","woocommerce/empty-cart-block"],M=[{view:"woocommerce/filled-cart-block",label:Object(n.__)("Filled Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(i.a,{srcElement:y.a})},{view:"woocommerce/empty-cart-block",label:Object(n.__)("Empty Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(i.a,{srcElement:v.a})}],I=e=>{let{attributes:t,setAttributes:c}=e;const{hasDarkControls:o}=t,{currentPostId:a}=Object(O.b)();return Object(r.createElement)(s.InspectorControls,null,a!==g.c&&Object(r.createElement)(b.Notice,{className:"wc-block-cart__page-notice",isDismissible:!1,status:"warning"},Object(r.createInterpolateElement)(Object(n.__)("If you would like to use this block as your default cart you must update your page settings in WooCommerce.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:Object(_.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(b.PanelBody,{title:Object(n.__)("Style","woo-gutenberg-products-block")},Object(r.createElement)(b.ToggleControl,{label:Object(n.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(n.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:o,onChange:()=>c({hasDarkControls:!o})})),Object(r.createElement)(p.a,null))};c(379);const R={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(_.getSetting)("hasDarkEditorStyleSupport",!1)},isShippingCalculatorEnabled:{type:"boolean",default:Object(_.getSetting)("isShippingCalculatorEnabled",!0)},checkoutPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:!0},align:{type:"string"}};var x=c(5),P=c.n(x),T=c(19),A=c(383),D=c(382);c(381);var L=c(273);Object(u.d)(L,{icon:{src:Object(r.createElement)(i.a,{srcElement:y.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),{currentView:n}=Object(O.b)(),{hasDarkControls:o}=Object(r.useContext)(C),i=Object(D.a)(T.innerBlockAreas.FILLED_CART),l=[["woocommerce/cart-items-block",{},[]],["woocommerce/cart-totals-block",{},[]]];return Object(S.a)({clientId:t,registeredBlocks:i,defaultTemplate:l}),Object(r.createElement)("div",P()({},c,{hidden:"woocommerce/filled-cart-block"!==n}),Object(r.createElement)(A.a,{className:a()("wc-block-cart",{"has-dark-controls":o})},Object(r.createElement)(s.InnerBlocks,{allowedBlocks:i,template:l,templateLock:"insert"})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var B=c(478),V=c(484),U=c(384),z=c(274);Object(u.d)(z,{icon:{src:Object(r.createElement)(B.a,{icon:V.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)({className:"wc-block-cart__main"}),n=Object(D.a)(T.innerBlockAreas.CART_ITEMS),o=[["woocommerce/cart-line-items-block",{},[]]];return Object(S.a)({clientId:t,registeredBlocks:n,defaultTemplate:o}),Object(r.createElement)(U.a,c,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:n,template:o,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var F=c(52),G=c(36),H=c(46),Y=c(84);c(385);var q=e=>{let{className:t,quantity:c=1,minimum:o=1,maximum:s,onChange:i=(()=>{}),itemName:l="",disabled:u}=e;const d=a()("wc-block-components-quantity-selector",t),p=void 0!==s,b=c>o,m=!p||c{const t=void 0!==typeof e.key?"ArrowDown"===e.key:e.keyCode===Y.DOWN,r=void 0!==typeof e.key?"ArrowUp"===e.key:e.keyCode===Y.UP;t&&b&&(e.preventDefault(),i(c-1)),r&&m&&(e.preventDefault(),i(c+1))},[c,i,m,b]);return Object(r.createElement)("div",{className:d},Object(r.createElement)("input",{className:"wc-block-components-quantity-selector__input",disabled:u,type:"number",step:"1",min:"0",value:c,onKeyDown:g,onChange:e=>{let t=Number.isNaN(e.target.value)||!e.target.value?0:parseInt(e.target.value,10);p&&(t=Math.min(t,s)),t=Math.max(t,o),t!==c&&i(t)},"aria-label":Object(n.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(n.__)("Quantity of %s in your cart.","woo-gutenberg-products-block"),l)}),Object(r.createElement)("button",{"aria-label":Object(n.__)("Reduce quantity","woo-gutenberg-products-block"),className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--minus",disabled:u||!b,onClick:()=>{const e=c-1;i(e),Object(H.speak)(Object(n.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(n.__)("Quantity reduced to %s.","woo-gutenberg-products-block"),e))}},"-"),Object(r.createElement)("button",{"aria-label":Object(n.__)("Increase quantity","woo-gutenberg-products-block"),disabled:u||!m,className:"wc-block-components-quantity-selector__button wc-block-components-quantity-selector__button--plus",onClick:()=>{const e=c+1;i(e),Object(H.speak)(Object(n.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(n.__)("Quantity increased to %s.","woo-gutenberg-products-block"),e))}},"+"))},$=c(105),W=c(127),Q=c(13),K=c(16),X=c(243),Z=c(108),J=c(247),ee=c(85),te=c(50);var ce=c(60),re=c(232),ne=c(233),oe=c(234),ae=c(41),se=c(109),ie=e=>{let{currency:t,saleAmount:c,format:o=""}=e;if(!c||c<=0)return null;o.includes("")||(o="",console.error("Price formats need to include the `` tag."));const a=Object(n.sprintf)( +/* translators: %s will be replaced by the discount amount */ +Object(n.__)("Save %s","woo-gutenberg-products-block"),o);return Object(r.createElement)(se.a,{className:"wc-block-components-sale-badge"},Object(r.createInterpolateElement)(a,{price:Object(r.createElement)(ae.a,{currency:t,value:c})}))},le=c(236),ue=c(35),de=c(136);const pe=(e,t)=>e.convertPrecision(t.minorUnit).getAmount(),be=e=>Object(T.mustContain)(e,"");var me=Object(r.forwardRef)((e,t)=>{let{lineItem:c,onRemove:o=(()=>{}),tabIndex:s=null}=e;const{name:i="",catalog_visibility:l="visible",short_description:u="",description:d="",low_stock_remaining:p=null,show_backorder_badge:b=!1,quantity_limit:m=99,permalink:g="",images:h=[],variation:O=[],item_data:j=[],prices:E={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",price:"0",regular_price:"0",sale_price:"0",price_range:null,raw_prices:{precision:6,price:"0",regular_price:"0",sale_price:"0"}},totals:f={currency_code:"USD",currency_minor_unit:2,currency_symbol:"$",currency_prefix:"$",currency_suffix:"",currency_decimal_separator:".",currency_thousand_separator:",",line_subtotal:"0",line_subtotal_tax:"0"},extensions:y}=c,{quantity:v,setItemQuantity:k,removeItem:w,isPendingDelete:S}=(e=>{const t={key:"",quantity:1};(e=>Object(ee.b)(e)&&Object(ee.d)(e,"key")&&Object(ee.d)(e,"quantity")&&Object(ee.c)(e.key)&&Object(ee.a)(e.quantity))(e)&&(t.key=e.key,t.quantity=e.quantity);const{key:c="",quantity:n=1}=t,{cartErrors:o}=Object(G.a)(),{dispatchActions:a}=Object(te.b)(),[s,i]=Object(r.useState)(n),[l]=Object(X.a)(s,400),u=Object(Z.a)(l),{removeItemFromCart:d,changeCartItemQuantity:p}=Object(Q.useDispatch)(K.CART_STORE_KEY);Object(r.useEffect)(()=>i(n),[n]);const b=Object(Q.useSelect)(e=>{if(!c)return{quantity:!1,delete:!1};const t=e(K.CART_STORE_KEY);return{quantity:t.isItemPendingQuantity(c),delete:t.isItemPendingDelete(c)}},[c]),m=Object(r.useCallback)(()=>c?d(c).then(()=>(Object(J.b)(),!0)):Promise.resolve(!1),[c,d]);return Object(r.useEffect)(()=>{c&&Object(ee.a)(u)&&Number.isFinite(u)&&u!==l&&p(c,l)},[c,p,l,u]),Object(r.useEffect)(()=>(b.delete?a.incrementCalculating():a.decrementCalculating(),()=>{b.delete&&a.decrementCalculating()}),[a,b.delete]),Object(r.useEffect)(()=>(b.quantity||l!==s?a.incrementCalculating():a.decrementCalculating(),()=>{(b.quantity||l!==s)&&a.decrementCalculating()}),[a,b.quantity,l,s]),{isPendingDelete:b.delete,quantity:s,setItemQuantity:i,removeItem:m,cartItemQuantityErrors:o}})(c),{dispatchStoreEvent:C}=Object(ce.a)(),{receiveCart:N,...M}=Object(G.a)(),I=Object(r.useMemo)(()=>({context:"cart",cartItem:c,cart:M}),[c,M]),R=Object(ue.getCurrencyFromPriceResponse)(E),x=Object(T.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:i,extensions:y,arg:I}),P=Object(de.a)({amount:parseInt(E.raw_prices.regular_price,10),precision:E.raw_prices.precision}),A=Object(de.a)({amount:parseInt(E.raw_prices.price,10),precision:E.raw_prices.precision}),D=P.subtract(A),L=D.multiply(v),B=Object(ue.getCurrencyFromPriceResponse)(f);let V=parseInt(f.line_subtotal,10);Object(_.getSetting)("displayCartPricesIncludingTax",!1)&&(V+=parseInt(f.line_subtotal_tax,10));const U=Object(de.a)({amount:V,precision:B.minorUnit}),z=h.length?h[0]:{},F="hidden"===l||"search"===l,Y=Object(T.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:y,arg:I}),ae=Object(T.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:y,arg:I,validation:be}),se=Object(T.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:y,arg:I,validation:be}),me=Object(T.__experimentalApplyCheckoutFilter)({filterName:"saleBadgePriceFormat",defaultValue:"",extensions:y,arg:I,validation:be});return Object(r.createElement)("tr",{className:a()("wc-block-cart-items__row",Y,{"is-disabled":S}),ref:t,tabIndex:s},Object(r.createElement)("td",{className:"wc-block-cart-item__image","aria-hidden":!Object(ee.d)(z,"alt")||!z.alt},F?Object(r.createElement)(re.a,{image:z,fallbackAlt:x}):Object(r.createElement)("a",{href:g,tabIndex:-1},Object(r.createElement)(re.a,{image:z,fallbackAlt:x}))),Object(r.createElement)("td",{className:"wc-block-cart-item__product"},Object(r.createElement)(W.a,{disabled:S||F,name:x,permalink:g}),b?Object(r.createElement)(ne.a,null):!!p&&Object(r.createElement)(oe.a,{lowStockRemaining:p}),Object(r.createElement)("div",{className:"wc-block-cart-item__prices"},Object(r.createElement)($.a,{currency:R,regularPrice:pe(P,R),price:pe(A,R),format:se})),Object(r.createElement)(ie,{currency:R,saleAmount:pe(D,R),format:me}),Object(r.createElement)(le.a,{shortDescription:u,fullDescription:d,itemData:j,variation:O}),Object(r.createElement)("div",{className:"wc-block-cart-item__quantity"},Object(r.createElement)(q,{disabled:S,quantity:v,maximum:m,onChange:e=>{k(e),C("cart-set-item-quantity",{product:c,quantity:e})},itemName:x}),Object(r.createElement)("button",{className:"wc-block-cart-item__remove-link",onClick:()=>{o(),w(),C("cart-remove-item",{product:c,quantity:v}),Object(H.speak)(Object(n.sprintf)( +/* translators: %s refers to the item name in the cart. */ +Object(n.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),x))},disabled:S},Object(n.__)("Remove item","woo-gutenberg-products-block")))),Object(r.createElement)("td",{className:"wc-block-cart-item__total"},Object(r.createElement)("div",{className:"wc-block-cart-item__total-price-and-sale-badge-wrapper"},Object(r.createElement)($.a,{currency:B,format:ae,price:U.getAmount()}),v>1&&Object(r.createElement)(ie,{currency:R,saleAmount:pe(L,R),format:me}))))});const ge=[...Array(3)].map((_x,e)=>Object(r.createElement)(me,{lineItem:{},key:e})),he=e=>{const t={};return e.forEach(e=>{let{key:c}=e;t[c]=Object(r.createRef)()}),t};var Oe=e=>{let{lineItems:t=[],isLoading:c=!1,className:o}=e;const s=Object(r.useRef)(null),i=Object(r.useRef)(he(t));Object(r.useEffect)(()=>{i.current=he(t)},[t]);const l=e=>()=>{null!=i&&i.current&&e&&i.current[e].current instanceof HTMLElement?i.current[e].current.focus():s.current instanceof HTMLElement&&s.current.focus()},u=c?ge:t.map((e,c)=>{const n=t.length>c+1?t[c+1].key:null;return Object(r.createElement)(me,{key:e.key,lineItem:e,onRemove:l(n),ref:i.current[e.key],tabIndex:-1})});return Object(r.createElement)("table",{className:a()("wc-block-cart-items",o),ref:s,tabIndex:-1},Object(r.createElement)("thead",null,Object(r.createElement)("tr",{className:"wc-block-cart-items__header"},Object(r.createElement)("th",{className:"wc-block-cart-items__header-image"},Object(r.createElement)("span",null,Object(n.__)("Product","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(r.createElement)("span",null,Object(n.__)("Details","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(r.createElement)("span",null,Object(n.__)("Total","woo-gutenberg-products-block"))))),Object(r.createElement)("tbody",null,u))},je=e=>{let{className:t}=e;const{cartItems:c,cartIsLoading:n}=Object(G.a)();return Object(r.createElement)(Oe,{className:t,lineItems:c,isLoading:n})},Ee=c(275);Object(u.d)(Ee,{icon:{src:Object(r.createElement)(B.a,{icon:V.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(F.a,null,Object(r.createElement)(je,{className:c})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var _e=c(387);c(386);var fe=c(276);Object(u.d)(fe,{icon:{src:Object(r.createElement)(B.a,{icon:V.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)({className:"wc-block-cart__sidebar"}),n=Object(D.a)(T.innerBlockAreas.CART_TOTALS),o=[["woocommerce/cart-order-summary-block",{},[]],["woocommerce/cart-express-payment-block",{},[]],["woocommerce/proceed-to-checkout-block",{},[]],["woocommerce/cart-accepted-payment-methods-block",{},[]]];return Object(S.a)({clientId:t,registeredBlocks:n,defaultTemplate:o}),Object(r.createElement)(_e.a,c,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:n,template:o,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var ye=c(388),ve=c(393),ke=c(394),we=c(441),Se=c(398),Ce=c(183),Ne=c(121),Me=e=>{let{className:t,showRateAfterTaxName:c=!1,isShippingCalculatorEnabled:o=!0}=e;const{cartFees:a,cartTotals:s,cartNeedsShipping:i}=Object(G.a)(),{applyCoupon:l,removeCoupon:u,isApplyingCoupon:d,isRemovingCoupon:p,appliedCoupons:b}=Object(Ce.a)(),m=Object(ue.getCurrencyFromPriceResponse)(s),{extensions:g,receiveCart:h,...O}=Object(G.a)(),j={extensions:g,cart:O},E={extensions:g,cart:O};return Object(r.createElement)("div",{className:t},Object(r.createElement)(Ne.a,{headingLevel:"2",className:"wc-block-cart__totals-title"},Object(n.__)("Cart totals","woo-gutenberg-products-block")),Object(r.createElement)(T.TotalsWrapper,null,Object(r.createElement)(T.Subtotal,{currency:m,values:s}),Object(r.createElement)(T.TotalsFees,{currency:m,cartFees:a}),Object(r.createElement)(ve.a,{cartCoupons:b,currency:m,isRemovingCoupon:p,removeCoupon:u,values:s})),Object(_.getSetting)("couponsEnabled",!0)&&Object(r.createElement)(T.TotalsWrapper,null,Object(r.createElement)(ke.a,{onSubmit:l,isLoading:d})),Object(r.createElement)(T.ExperimentalDiscountsMeta.Slot,E),i&&Object(r.createElement)(T.TotalsWrapper,null,Object(r.createElement)(we.a,{showCalculator:o,showRateSelector:!0,values:s,currency:m})),!Object(_.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(s.total_tax,10)>0&&Object(r.createElement)(T.TotalsWrapper,null,Object(r.createElement)(T.TotalsTaxes,{showRateAfterTaxName:c,currency:m,values:s})),Object(r.createElement)(T.TotalsWrapper,null,Object(r.createElement)(Se.a,{currency:m,values:s})),Object(r.createElement)(T.ExperimentalOrderMeta.Slot,j))},Ie={isShippingCalculatorEnabled:{type:"boolean",default:Object(_.getSetting)("isShippingCalculatorEnabled",!0)},showRateAfterTaxName:{type:"boolean",default:Object(_.getSetting)("displayCartPricesIncludingTax",!1)},lock:{type:"object",default:{move:!0,remove:!0}}},Re=c(277);Object(u.d)(Re,{icon:{src:Object(r.createElement)(i.a,{srcElement:ye.a,className:"wc-block-editor-components-block-icon"})},attributes:Ie,edit:e=>{let{attributes:t,setAttributes:c}=e;const{showRateAfterTaxName:o,isShippingCalculatorEnabled:a,className:i}=t,l=Object(s.useBlockProps)(),u=Object(_.getSetting)("taxesEnabled"),d=Object(_.getSetting)("displayItemizedTaxes",!1),p=Object(_.getSetting)("displayCartPricesIncludingTax",!1);return Object(r.createElement)("div",l,Object(r.createElement)(s.InspectorControls,null,Object(_.getSetting)("shippingEnabled",!0)&&Object(r.createElement)(b.PanelBody,{title:Object(n.__)("Shipping rates","woo-gutenberg-products-block")},Object(r.createElement)(b.ToggleControl,{label:Object(n.__)("Shipping calculator","woo-gutenberg-products-block"),help:Object(n.__)("Allow customers to estimate shipping by entering their address.","woo-gutenberg-products-block"),checked:a,onChange:()=>c({isShippingCalculatorEnabled:!a})})),u&&d&&!p&&Object(r.createElement)(b.PanelBody,{title:Object(n.__)("Taxes","woo-gutenberg-products-block")},Object(r.createElement)(b.ToggleControl,{label:Object(n.__)("Show rate after tax name","woo-gutenberg-products-block"),help:Object(n.__)("Show the percentage rate alongside each tax line in the summary.","woo-gutenberg-products-block"),checked:o,onChange:()=>c({showRateAfterTaxName:!o})}))),Object(r.createElement)(F.a,null,Object(r.createElement)(Me,{className:i,showRateAfterTaxName:o,isShippingCalculatorEnabled:a})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var xe=c(399),Pe=c(483),Te=c(137),Ae=c(187),De=c(44),Le=c(189),Be=c(128),Ve=c(66),Ue=c(178);c(226);var ze=()=>{const{paymentMethods:e,isInitialized:t}=Object(Ae.a)(),{noticeContexts:c}=Object(De.c)(),{isCalculating:o,isProcessing:a,isAfterProcessing:s,isBeforeProcessing:i,isComplete:l,hasError:u}=Object(te.b)(),{currentStatus:d}=Object(Le.b)();if(!t||t&&0===Object.keys(e).length)return null;const p=a||s||i||l&&!u;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Ve.a,{isLoading:o||p||d.isDoingExpressPayment},Object(r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--cart"},Object(r.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(r.createElement)(Be.a,{context:c.EXPRESS_PAYMENTS},Object(r.createElement)(Ue.a,null))))),Object(r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--cart"},Object(n.__)("Or","woo-gutenberg-products-block")))},Fe=e=>{let{className:t}=e;const{cartNeedsPayment:c}=Object(G.a)();return c?Object(r.createElement)("div",{className:a()("wc-block-cart__payment-options",t)},Object(r.createElement)(ze,null)):null};c(400);const Ge=()=>Object(r.createElement)(Pe.a,{icon:Object(r.createElement)(i.a,{srcElement:xe.a}),label:Object(n.__)("Express Checkout","woo-gutenberg-products-block"),className:"wp-block-woocommerce-checkout-express-payment-block-placeholder"},Object(r.createElement)("span",{className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__description"},Object(n.__)("Your store doesn't have any Payment Methods that support the Express Checkout Block. If they are added, they will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(Te.a,{isPrimary:!0,href:_.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer",className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__button"},Object(n.__)("Configure Payment Methods","woo-gutenberg-products-block")));var He=c(280);Object(u.d)(He,{icon:{src:Object(r.createElement)(i.a,{srcElement:xe.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{paymentMethods:c,isInitialized:n}=Object(Ae.a)(),o=Object.keys(c).length>0,i=Object(s.useBlockProps)({className:a()({"wp-block-woocommerce-cart-express-payment-block--has-express-payment-methods":o})}),{className:l}=t;return n?Object(r.createElement)("div",i,o?Object(r.createElement)(Fe,{className:l}):Object(r.createElement)(Ge,null)):null},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var Ye=c(486),qe=c(179),$e=c(282),We=c(281);Object(u.d)(We,{icon:{src:Object(r.createElement)(B.a,{icon:Ye.a,className:"wc-block-editor-components-block-icon"})},attributes:{checkoutPageId:{type:"number",default:0},lock:{type:"object",default:{move:!0,remove:!0}}},edit:e=>{let{attributes:t,setAttributes:c}=e;const o=Object(s.useBlockProps)(),{checkoutPageId:a=0,className:i}=t,{current:l}=Object(r.useRef)(a),u=Object(Q.useSelect)(e=>l||e("core/editor").getCurrentPostId(),[l]);return Object(r.createElement)("div",o,Object(r.createElement)(s.InspectorControls,null,!(u===g.c&&0===l)&&Object(r.createElement)(qe.a,{pageId:a,setPageId:e=>c({checkoutPageId:e}),labels:{title:Object(n.__)("Proceed to Checkout button","woo-gutenberg-products-block"),default:Object(n.__)("WooCommerce Checkout Page","woo-gutenberg-products-block")}})),Object(r.createElement)(F.a,null,Object(r.createElement)($e.a,{checkoutPageId:a,className:i})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())}),c(404);const Qe=g.j?["core/paragraph",{align:"center",content:Object(n.sprintf)( +/* translators: %s is the link to the store product directory. */ +Object(n.__)('Browse store.',"woo-gutenberg-products-block"),g.j),dropCap:!1}]:null,Ke=[["core/image",{align:"center",url:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzgiIGhlaWdodD0iMzgiIHZpZXdCb3g9IjAgMCAzOCAzOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE5IDBDOC41MDQwMyAwIDAgOC41MDQwMyAwIDE5QzAgMjkuNDk2IDguNTA0MDMgMzggMTkgMzhDMjkuNDk2IDM4IDM4IDI5LjQ5NiAzOCAxOUMzOCA4LjUwNDAzIDI5LjQ5NiAwIDE5IDBaTTI1LjEyOSAxMi44NzFDMjYuNDg1MSAxMi44NzEgMjcuNTgwNiAxMy45NjY1IDI3LjU4MDYgMTUuMzIyNkMyNy41ODA2IDE2LjY3ODYgMjYuNDg1MSAxNy43NzQyIDI1LjEyOSAxNy43NzQyQzIzLjc3MyAxNy43NzQyIDIyLjY3NzQgMTYuNjc4NiAyMi42Nzc0IDE1LjMyMjZDMjIuNjc3NCAxMy45NjY1IDIzLjc3MyAxMi44NzEgMjUuMTI5IDEyLjg3MVpNMTEuNjQ1MiAzMS4yNTgxQzkuNjE0OTIgMzEuMjU4MSA3Ljk2Nzc0IDI5LjY0OTIgNy45Njc3NCAyNy42NTczQzcuOTY3NzQgMjYuMTI1IDEwLjE1MTIgMjMuMDI5OCAxMS4xNTQ4IDIxLjY5NjhDMTEuNCAyMS4zNjczIDExLjg5MDMgMjEuMzY3MyAxMi4xMzU1IDIxLjY5NjhDMTMuMTM5MSAyMy4wMjk4IDE1LjMyMjYgMjYuMTI1IDE1LjMyMjYgMjcuNjU3M0MxNS4zMjI2IDI5LjY0OTIgMTMuNjc1NCAzMS4yNTgxIDExLjY0NTIgMzEuMjU4MVpNMTIuODcxIDE3Ljc3NDJDMTEuNTE0OSAxNy43NzQyIDEwLjQxOTQgMTYuNjc4NiAxMC40MTk0IDE1LjMyMjZDMTAuNDE5NCAxMy45NjY1IDExLjUxNDkgMTIuODcxIDEyLjg3MSAxMi44NzFDMTQuMjI3IDEyLjg3MSAxNS4zMjI2IDEzLjk2NjUgMTUuMzIyNiAxNS4zMjI2QzE1LjMyMjYgMTYuNjc4NiAxNC4yMjcgMTcuNzc0MiAxMi44NzEgMTcuNzc0MlpNMjUuOTEwNSAyOS41ODc5QzI0LjE5NDQgMjcuNTM0NyAyMS42NzM4IDI2LjM1NDggMTkgMjYuMzU0OEMxNy4zNzU4IDI2LjM1NDggMTcuMzc1OCAyMy45MDMyIDE5IDIzLjkwMzJDMjIuNDAxNiAyMy45MDMyIDI1LjYxMTcgMjUuNDA0OCAyNy43ODc1IDI4LjAyNUMyOC44NDQ4IDI5LjI4MTUgMjYuOTI5NCAzMC44MjE0IDI1LjkxMDUgMjkuNTg3OVoiIGZpbGw9ImJsYWNrIi8+Cjwvc3ZnPgo=",sizeSlug:"small"}],["core/heading",{textAlign:"center",content:Object(n.__)("Your cart is currently empty!","woo-gutenberg-products-block"),level:2,className:"wc-block-cart__empty-cart__title"}],Qe,["core/separator",{className:"is-style-dots"}],["core/heading",{textAlign:"center",content:Object(n.__)("New in store","woo-gutenberg-products-block"),level:2}],["woocommerce/product-new",{columns:3,rows:1}]].filter(Boolean);var Xe=c(283);Object(u.d)(Xe,{icon:{src:Object(r.createElement)(i.a,{srcElement:v.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),{currentView:n}=Object(O.b)(),o=Object(D.a)(T.innerBlockAreas.EMPTY_CART);return Object(S.a)({clientId:t,registeredBlocks:o,defaultTemplate:Ke}),Object(r.createElement)("div",P()({},c,{hidden:"woocommerce/empty-cart-block"!==n}),Object(r.createElement)(s.InnerBlocks,{template:Ke,templateLock:!1,renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var Ze=c(184);const Je=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[]);var et=e=>{let{className:t}=e;const{paymentMethods:c}=Object(Ae.b)();return Object(r.createElement)(Ze.a,{className:t,icons:Je(c)})},tt=c(284);Object(u.d)(tt,{icon:{src:Object(r.createElement)(i.a,{srcElement:xe.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{className:c}=t,n=Object(s.useBlockProps)();return Object(r.createElement)("div",n,Object(r.createElement)(et,{className:c}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});const ct={title:Object(n.__)("Cart","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{srcElement:l.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Shopping cart.","woo-gutenberg-products-block"),supports:{align:["wide"],html:!1,multiple:!1,__experimentalExposeControlsToChildren:!0},example:{attributes:{isPreview:!0}},attributes:R,edit:e=>{let{className:t,attributes:c,setAttributes:o,clientId:i}=e;const{hasDarkControls:l}=c,{currentView:u,component:d}=Object(w.a)(i,M),p=[["woocommerce/filled-cart-block",{},[]],["woocommerce/empty-cart-block",{},[]]],b=Object(k.b)({className:a()(t,"wp-block-woocommerce-cart",{"is-editor-preview":c.isPreview})});return Object(S.a)({clientId:i,registeredBlocks:N,defaultTemplate:p}),Object(r.createElement)("div",b,Object(r.createElement)(h.a,{header:Object(n.__)("Cart Block Error","woo-gutenberg-products-block"),text:Object(n.__)("There was an error whilst rendering the cart block. If this problem continues, try re-creating the block.","woo-gutenberg-products-block"),showErrorMessage:!0,errorMessagePrefix:Object(n.__)("Error message:","woo-gutenberg-products-block")},Object(r.createElement)(O.a,{currentView:u,previewData:{previewCart:f.a}},Object(r.createElement)(I,{attributes:c,setAttributes:o}),Object(r.createElement)(s.BlockControls,{__experimentalShareWithChildBlocks:!0},d),Object(r.createElement)(C.Provider,{value:{hasDarkControls:l}},Object(r.createElement)(E,null,Object(r.createElement)(s.InnerBlocks,{allowedBlocks:N,template:p,templateLock:!1}))))),Object(r.createElement)(m.a,{blockName:"cart"}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save({className:"is-loading"}),Object(r.createElement)(s.InnerBlocks.Content,null)),deprecated:[{attributes:R,save:e=>{let{attributes:t}=e;return Object(r.createElement)("div",{className:a()("is-loading",t.className)},Object(r.createElement)(s.InnerBlocks.Content,null))},migrate:(e,t)=>{const{isShippingCalculatorEnabled:c,showRateAfterTaxName:r,checkoutPageId:n,align:o}=e;return[e,[Object(d.createBlock)("woocommerce/filled-cart-block",{align:o},[Object(d.createBlock)("woocommerce/cart-items-block"),Object(d.createBlock)("woocommerce/cart-totals-block",{},[Object(d.createBlock)("woocommerce/cart-order-summary-block",{isShippingCalculatorEnabled:c,showRateAfterTaxName:r}),Object(d.createBlock)("woocommerce/cart-express-payment-block"),Object(d.createBlock)("woocommerce/proceed-to-checkout-block",{checkoutPageId:n}),Object(d.createBlock)("woocommerce/cart-accepted-payment-methods-block")])]),Object(d.createBlock)("woocommerce/empty-cart-block",{align:o},t)]]},isEligible:(e,t)=>!t.find(e=>"woocommerce/filled-cart-block"===e.name)}]};Object(u.d)("woocommerce/cart",ct)},,,function(e,t,c){"use strict";var r=c(0),n=c(242),o=c(5),a=c.n(o),s=c(25),i=c(1),l=c(14),u=c(4),d=c.n(u),p=c(9),b=c(493),m=c(112),g=c(193),h=c(85);c(221);var O=Object(p.withInstanceId)(e=>{let{id:t,className:c,label:n,onChange:o,options:a,value:s,required:l=!1,errorMessage:u=Object(i.__)("Please select a value.","woo-gutenberg-products-block"),errorId:p,instanceId:O="0",autoComplete:j="off"}=e;const{getValidationError:E,setValidationErrors:_,clearValidationError:f}=Object(m.b)(),y=Object(r.useRef)(null),v=t||"control-"+O,k=p||v,w=E(k)||{message:"",hidden:!1};return Object(r.useEffect)(()=>(!l||s?f(k):_({[k]:{message:u,hidden:!0}}),()=>{f(k)}),[f,s,k,u,l,_]),Object(r.createElement)("div",{id:v,className:d()("wc-block-components-combobox",c,{"is-active":s,"has-error":w.message&&!w.hidden}),ref:y},Object(r.createElement)(b.a,{className:"wc-block-components-combobox-control",label:n,onChange:o,onFilterValueChange:e=>{if(e.length){const t=Object(h.b)(y.current)?y.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(y.current)&&y.current.contains(t))return;const c=e.toLocaleUpperCase(),r=a.find(e=>e.label.toLocaleUpperCase().startsWith(c)||e.value.toLocaleUpperCase()===c);r&&o(r.value)}},options:a,value:s||"",allowReset:!1,autoComplete:j,"aria-invalid":w.message&&!w.hidden}),Object(r.createElement)(g.a,{propertyName:k}))});c(220);var j=e=>{let{className:t,countries:c,id:n,label:o,onChange:a,value:s="",autoComplete:u="off",required:p=!1,errorId:b,errorMessage:m=Object(i.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(r.useMemo)(()=>Object.entries(c).map(e=>{let[t,c]=e;return{value:t,label:Object(l.decodeEntities)(c)}}),[c]);return Object(r.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(r.createElement)(O,{id:n,label:o,onChange:a,options:g,value:s,errorId:b,errorMessage:m,required:p,autoComplete:u}),"off"!==u&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:s,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),c=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);a(c?c.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},E=e=>Object(r.createElement)(j,a()({countries:s.h},e)),_=e=>Object(r.createElement)(j,a()({countries:s.a},e));c(222);const f=(e,t)=>{const c=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return c?c.value:""};var y=e=>{let{className:t,id:c,states:o,country:a,label:s,onChange:u,autoComplete:p="off",value:b="",required:m=!1}=e;const g=o[a],h=Object(r.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(l.decodeEntities)(g[e])})):[],[g]),j=Object(r.useCallback)(e=>{u(h.length>0?f(e,h):e)},[u,h]),E=Object(r.useRef)(b);return Object(r.useEffect)(()=>{E.current!==b&&(E.current=b)},[b]),Object(r.useEffect)(()=>{if(h.length>0&&E.current){const e=f(E.current,h);e!==E.current&&j(e)}},[h,j]),h.length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(O,{className:d()(t,"wc-block-components-state-input"),id:c,label:s,onChange:j,options:h,value:b,errorMessage:Object(i.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:p}),"off"!==p&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:b,onChange:e=>j(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(r.createElement)(n.a,{className:t,id:c,label:s,onChange:j,autoComplete:p,value:b,required:m})},v=e=>Object(r.createElement)(y,a()({states:s.i},e)),k=e=>Object(r.createElement)(y,a()({states:s.b},e)),w=c(40),S=c(2),C=c(98);t.a=Object(p.withInstanceId)(e=>{let{id:t="",fields:c=Object.keys(S.defaultAddressFields),fieldConfig:o={},instanceId:a,onChange:s,type:l="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:p,clearValidationError:b}=Object(m.b)(),g=Object(w.a)(c),h=d("shipping-missing-country")||{},O=Object(r.useMemo)(()=>Object(C.a)(g,o,u.country),[g,o,u.country]);return Object(r.useEffect)(()=>{O.forEach(e=>{e.hidden&&u[e.key]&&s({...u,[e.key]:""})})},[O,s,u]),Object(r.useEffect)(()=>{"shipping"===l&&((e,t,c,r)=>{r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(i.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&c("shipping-missing-country")})(u,p,b,!!h.message&&!h.hidden)},[u,h.message,h.hidden,p,b,l]),t=t||a,Object(r.createElement)("div",{id:t,className:"wc-block-components-address-form"},O.map(e=>{if(e.hidden)return null;if("country"===e.key){const c="shipping"===l?E:_;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>s({...u,country:e,state:""}),errorId:"shipping"===l?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const c="shipping"===l?v:k;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>s({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(r.createElement)(n.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>s({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},,,function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),a=c(4),s=c.n(a),i=c(1),l=c(36),u=c(19),d=c(2),p=c(14);const b=e=>{let{selectedShippingRates:t}=e;return Object(o.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(i.__)("via","woo-gutenberg-products-block")," ",Object(p.decodeEntities)(t.join(", ")))};var m=c(481),g=c(182),h=e=>{let{hasRates:t,shippingRates:c,shippingRatesLoading:r}=e;const n=t?Object(i.__)("Shipping options","woo-gutenberg-products-block"):Object(i.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(o.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(o.createElement)("legend",{className:"screen-reader-text"},n),Object(o.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(o.createElement)(m.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(i.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:c,shippingRatesLoading:r}))},O=c(67),j=c(76),E=c(26),_=c.n(E),f=c(112),y=(c(171),c(438)),v=e=>{let{address:t,onUpdate:c,addressFields:r}=e;const[n,a]=Object(o.useState)(t),{hasValidationErrors:s,showAllValidationErrors:l}=Object(f.b)();return Object(o.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(o.createElement)(y.a,{fields:r,onChange:a,values:n}),Object(o.createElement)(j.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:_()(n,t),onClick:e=>{if(e.preventDefault(),l(),!s)return c(n)},type:"submit"},Object(i.__)("Update","woo-gutenberg-products-block")))},k=e=>{let{onUpdate:t=(()=>{}),addressFields:c=["country","state","city","postcode"]}=e;const{shippingAddress:r,setShippingAddress:n}=Object(O.b)();return Object(o.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(o.createElement)(v,{address:r,addressFields:c,onUpdate:e=>{n(e),t(e)}}))},w=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const c=Object(d.getSetting)("shippingCountries",{}),r=Object(d.getSetting)("shippingStates",{}),n="string"==typeof c[t.country]?Object(p.decodeEntities)(c[t.country]):"",a="object"==typeof r[t.country]&&"string"==typeof r[t.country][t.state]?Object(p.decodeEntities)(r[t.country][t.state]):t.state,s=[];s.push(t.postcode.toUpperCase()),s.push(t.city),s.push(a),s.push(n);const l=s.filter(Boolean).join(", ");return l?Object(o.createElement)("span",{className:"wc-block-components-shipping-address"},Object(i.sprintf)( +/* translators: %s location. */ +Object(i.__)("Shipping to %s","woo-gutenberg-products-block"),l)+" "):null};c(219);const S=e=>{let{label:t=Object(i.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}=e;return Object(o.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{r(!c)},"aria-expanded":c},t)},C=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r,shippingAddress:n}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(w,{address:n}),t&&Object(o.createElement)(S,{label:Object(i.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}))},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r,isCheckout:n=!1}=e;return t?Object(o.createElement)(S,{isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}):Object(o.createElement)("em",null,n?Object(i.__)("No shipping options available","woo-gutenberg-products-block"):Object(i.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:c,showCalculator:r=!0,showRateSelector:a=!0,isCheckout:p=!1,className:m}=e;const[g,O]=Object(o.useState)(!1),{shippingAddress:j,cartHasCalculatedShipping:E,shippingRates:_,shippingRatesLoading:f}=Object(l.a)(),y=Object(d.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_shipping,10)+parseInt(c.total_shipping_tax,10):parseInt(c.total_shipping,10),v=_.some(e=>e.shipping_rates.length)||y,w={isShippingCalculatorOpen:g,setIsShippingCalculatorOpen:O},S=_.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(o.createElement)("div",{className:s()("wc-block-components-totals-shipping",m)},Object(o.createElement)(u.TotalsItem,{label:Object(i.__)("Shipping","woo-gutenberg-products-block"),value:v&&E?y:Object(o.createElement)(N,n()({showCalculator:r,isCheckout:p},w)),description:v&&E?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(b,{selectedShippingRates:S}),Object(o.createElement)(C,n()({shippingAddress:j,showCalculator:r},w))):null,currency:t}),r&&g&&Object(o.createElement)(k,{onUpdate:()=>{O(!1)}}),a&&E&&Object(o.createElement)(h,{hasRates:v,shippingRates:_,shippingRatesLoading:f}))}},,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),n=c(1),o=c(13),a=c(3),s=c(43),i=c(18),l=Object(r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M12 6a9.77 9.77 0 0 1 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0 1 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 0 1 0 5 2.5 2.5 0 0 1 0-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"})),u=c(7);const d=(e,t)=>{const c=t[0],[i,d]=Object(r.useState)(c),{selectBlock:p}=Object(o.useDispatch)("core/block-editor"),{getBlock:b,getSelectedBlockClientId:m,getBlockParentsByBlockName:g}=Object(o.select)(u.store),h=m();Object(r.useEffect)(()=>{const e=t.map(e=>{let{view:t}=e;return t}),c=g(h,e);if(1!==c.length)return;const r=b(c[0]);if(i.view===r.name)return;const n=t.filter(e=>{let{view:t}=e;return t===r.name});1===n.length&&d(n[0])},[g,h,b,i.view,t]);const O=Object(r.createElement)(a.ToolbarGroup,null,Object(r.createElement)(a.ToolbarDropdownMenu,{label:Object(n.__)("Switch view","woo-gutenberg-products-block"),text:i.label,icon:Object(r.createElement)(s.a,{srcElement:l,style:{marginRight:"8px"}}),controls:t.map(t=>({...t,title:Object(r.createElement)("span",null,t.label),isActive:t.view===i.view,onClick:()=>{var c;d(t),p((null===(c=b(e).innerBlocks.find(e=>e.name===t.view))||void 0===c?void 0:c.clientId)||e)}}))}));return{currentView:i.view,component:O}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(1),n=c(25),o=c(2);const a=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:Object(r.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(r._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(r._x)("Beanie","example product in Cart Block","woo-gutenberg-products-block"),quantity:1}],shipping_rates:[{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Free shipping","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"000",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Local pickup","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"200",taxes:"0",rate_id:"local_pickup:1",instance_id:1,meta_data:[],method_id:"local_pickup",selected:!1}]}],s=Object(o.getSetting)("displayCartPricesIncludingTax",!1),i={coupons:[],shipping_rates:Object(o.getSetting)("shippingMethodsExist",!1)?a:[],items:[{key:"1",id:1,quantity:2,name:Object(r.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(r.__)("Warm hat for winter","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:10,src:n.m+"previews/beanie.jpg",thumbnail:n.m+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(r.__)("Size","woo-gutenberg-products-block"),value:Object(r.__)("Small","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"12000":"10000",regular_price:s?"12000":"10000",sale_price:s?"12000":"10000",raw_prices:{precision:6,price:s?"12000000":"10000000",regular_price:s?"12000000":"10000000",sale_price:s?"12000000":"10000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}},{key:"2",id:2,quantity:1,name:Object(r.__)("Cap","woo-gutenberg-products-block"),short_description:Object(r.__)("Lightweight baseball cap","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:11,src:n.m+"previews/cap.jpg",thumbnail:n.m+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Orange","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"2400":"2000",regular_price:s?"2400":"2000",sale_price:s?"2400":"2000",raw_prices:{precision:6,price:s?"24000000":"20000000",regular_price:s?"24000000":"20000000",sale_price:s?"24000000":"20000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}}],fees:[],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:Object(o.getSetting)("shippingEnabled",!0),has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"4000",total_items_tax:"800",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"800",total_price:"4800",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"800"}]},errors:[],payment_requirements:["products"],extensions:{}}},,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const n={bottom:0,left:0,opacity:0,pointerEvents:"none",position:"absolute",right:0,top:0,zIndex:-1},o=()=>{const[e,t]=Object(r.useState)(""),c=Object(r.useRef)(null),o=Object(r.useRef)(new IntersectionObserver(e=>{e[0].isIntersecting?t("visible"):t(e[0].boundingClientRect.top>0?"below":"above")},{threshold:1}));return Object(r.useLayoutEffect)(()=>{const e=c.current,t=o.current;return e&&t.observe(e),()=>{t.unobserve(e)}},[]),[Object(r.createElement)("div",{"aria-hidden":!0,ref:c,style:n}),e]}}]); \ No newline at end of file diff --git a/build/checkout-blocks/actions-frontend.js b/build/checkout-blocks/actions-frontend.js new file mode 100644 index 00000000000..71773bdd900 --- /dev/null +++ b/build/checkout-blocks/actions-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[31],{130:function(e,t,n){"use strict";var c=n(0);n(157),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},157:function(e,t){},227:function(e,t,n){"use strict";var c=n(10),o=n.n(c),a=n(0),r=n(56),s=n(4),i=n.n(s),l=n(130);n(230),t.a=e=>{let{className:t,showSpinner:n=!1,children:c,...s}=e;const u=i()("wc-block-components-button",t,{"wc-block-components-button--loading":n});return Object(a.createElement)(r.a,o()({className:u},s),n&&Object(a.createElement)(l.a,null),Object(a.createElement)("span",{className:"wc-block-components-button__text"},c))}},230:function(e,t){},238:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return s}));var c=n(17),o=n(204);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:a,expressPaymentMethodsInitialized:r}=Object(o.b)(),s=Object(c.a)(t),i=Object(c.a)(n);return{paymentMethods:e?i:s,isInitialized:e?r:a}},r=()=>a(!1),s=()=>a(!0)},323:function(e,t,n){"use strict";var c=n(0),o=n(24);const a=Object(c.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(c.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=a},352:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var c=n(1),o=n(31),a=n(204),r=n(238);const s=()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:n,isProcessing:s,isAfterProcessing:i,isComplete:l,hasError:u}=Object(o.b)(),{paymentMethods:b={}}=Object(r.b)(),{activePaymentMethod:m,currentStatus:d}=Object(a.b)(),p=b[m]||{},w=s||i||n,g=l&&!u;return{submitButtonText:(null==p?void 0:p.placeOrderButtonLabel)||Object(c.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:s||d.isDoingExpressPayment,waitingForProcessing:w,waitingForRedirect:g}}},353:function(e,t){},354:function(e,t){},387:function(e,t,n){"use strict";n.r(t);var c=n(110),o=n(0),a=n(4),r=n.n(a),s=n(2),i=n(1),l=n(66),u=n(98),b=n(24),m=Object(o.createElement)(b.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},Object(o.createElement)("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"}));n(354);var d=e=>{let{link:t}=e;return Object(o.createElement)("a",{href:t||l.c,className:"wc-block-components-checkout-return-to-cart-button"},Object(o.createElement)(u.a,{srcElement:m}),Object(i.__)("Return to Cart","woo-gutenberg-products-block"))},p=n(352),w=n(323),g=n(227),h=()=>{const{submitButtonText:e,onSubmit:t,isCalculating:n,isDisabled:c,waitingForProcessing:a,waitingForRedirect:r}=Object(p.a)();return Object(o.createElement)(g.a,{className:"wc-block-components-checkout-place-order-button",onClick:t,disabled:n||c||a||r,showSpinner:a},r?Object(o.createElement)(u.a,{srcElement:w.a,alt:Object(i.__)("Done","woo-gutenberg-products-block")}):e)};n(353);t.default=Object(c.withFilteredAttributes)({cartPageId:{type:"number",default:0},showReturnToCart:{type:"boolean",default:!0},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}})(e=>{let{cartPageId:t,showReturnToCart:n,className:c}=e;return Object(o.createElement)("div",{className:r()("wc-block-checkout__actions",c)},n&&Object(o.createElement)(d,{link:Object(s.getSetting)("page-"+t,!1)}),Object(o.createElement)(h,null))})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js b/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js new file mode 100644 index 00000000000..ae8b63ff27a --- /dev/null +++ b/build/checkout-blocks/billing-address--checkout-blocks/shipping-address-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[3],{21:function(e,t,a){"use strict";var n=a(0),r=a(4),c=a.n(r);t.a=e=>{let t,{label:a,screenReaderLabel:r,wrapperElement:o,wrapperProps:l={}}=e;const s=null!=a,i=null!=r;return!s&&i?(t=o||"span",l={...l,className:c()(l.className,"screen-reader-text")},Object(n.createElement)(t,l,r)):(t=o||n.Fragment,s&&i&&a!==r?Object(n.createElement)(t,l,Object(n.createElement)("span",{"aria-hidden":"true"},a),Object(n.createElement)("span",{className:"screen-reader-text"},r)):Object(n.createElement)(t,l,a))}},221:function(e,t){},224:function(e,t,a){"use strict";var n=a(10),r=a.n(n),c=a(0),o=a(4),l=a.n(o);a(8),a(225),t.a=e=>{let{children:t,className:a,headingLevel:n,...o}=e;const s=l()("wc-block-components-title",a),i="h"+n;return Object(c.createElement)(i,r()({className:s},o),t)}},225:function(e,t){},228:function(e,t){},232:function(e,t){},233:function(e,t,a){"use strict";var n=a(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:a=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:r=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:a},showStepNumber:{type:"boolean",default:r}}}},235:function(e,t,a){"use strict";a.d(t,"a",(function(){return c}));var n=a(0),r=(a(8),a(160));a(221);const c=e=>{let{errorMessage:t="",propertyName:a="",elementId:c=""}=e;const{getValidationError:o,getValidationErrorId:l}=Object(r.b)();if(!t||"string"!=typeof t){const e=o(a)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:l(c)},t))}},251:function(e,t){},252:function(e,t){},253:function(e,t){},261:function(e,t,a){"use strict";var n=a(0),r=a(4),c=a.n(r),o=a(224);a(232);const l=e=>{let{title:t,stepHeadingContent:a}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!a&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},a))};t.a=e=>{let{id:t,className:a,title:r,legend:o,description:s,children:i,disabled:u=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const p=o||r?"fieldset":"div";return Object(n.createElement)(p,{className:c()(a,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":u}),id:t,disabled:u},!(!o&&!r)&&Object(n.createElement)("legend",{className:"screen-reader-text"},o||r),!!r&&Object(n.createElement)(l,{title:r,stepHeadingContent:b()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!s&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},s),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},281:function(e,t,a){"use strict";var n=a(10),r=a.n(n),c=a(0),o=a(1),l=a(3),s=a(4),i=a.n(s),u=a(160),d=a(235),b=a(12),p=a(35),m=a(21);a(228);var g=Object(l.forwardRef)((e,t)=>{let{className:a,id:n,type:o="text",ariaLabel:l,ariaDescribedBy:s,label:u,screenReaderLabel:d,disabled:b,help:p,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:f,required:j=!1,onBlur:v=(()=>{}),feedback:E,...k}=e;const[C,y]=Object(c.useState)(!1);return Object(c.createElement)("div",{className:i()("wc-block-components-text-input",a,{"is-active":C||O})},Object(c.createElement)("input",r()({type:o,id:n,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{f(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{v(e.target.value),y(!1)},"aria-label":l||u,disabled:b,"aria-describedby":p&&!s?n+"__help":s,required:j},k)),Object(c.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!p&&Object(c.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},p),E)});t.a=Object(b.withInstanceId)(e=>{let{className:t,instanceId:a,id:n,ariaDescribedBy:s,errorId:b,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:f="",value:j="",...v}=e;const[E,k]=Object(l.useState)(!0),C=Object(l.useRef)(null),{getValidationError:y,hideValidationError:w,setValidationErrors:N,clearValidationError:_,getValidationErrorId:I}=Object(u.b)(),L=void 0!==n?n:"textinput-"+a,q=void 0!==b?b:L,M=Object(l.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=C.current||null;if(!t)return;t.value=t.value.trim();const a=t.checkValidity();a?_(q):N({[q]:{message:t.validationMessage||Object(o.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[_,q,N]);Object(l.useEffect)(()=>{var e;E&&m&&(null===(e=C.current)||void 0===e||e.focus()),k(!1)},[m,E,k]),Object(l.useEffect)(()=>{var e,t;(null===(e=C.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==C.current&&M(!0)},[j,M]),Object(l.useEffect)(()=>()=>{_(q)},[_,q]);const S=y(q)||{};Object(p.d)(f)&&""!==f&&(S.message=f);const B=S.message&&!S.hidden,F=O&&B&&I(q)?I(q):s;return Object(c.createElement)(g,r()({className:i()(t,{"has-error":B}),"aria-invalid":!0===B,id:L,onBlur:()=>{M(!1)},feedback:O&&Object(c.createElement)(d.a,{errorMessage:f,propertyName:q}),ref:C,onChange:e=>{w(q),h(e)},ariaDescribedBy:F,value:j},v))})},301:function(e,t,a){"use strict";a.d(t,"a",(function(){return l}));var n=a(2),r=a(0),c=a(44),o=a(33);const l=()=>{const{needsShipping:e}=Object(c.b)(),{billingData:t,setBillingData:a,shippingAddress:l,setShippingAddress:s,shippingAsBilling:i,setShippingAsBilling:u}=Object(o.b)(),d=Object(r.useRef)(i),b=Object(r.useRef)(),p=Object(r.useCallback)(e=>{s(e),i&&a(e)},[i,s,a]),m=Object(r.useCallback)(t=>{a(t),e||s(t)},[e,s,a]);Object(r.useEffect)(()=>{if(d.current!==i){if(i)b.current=t,a(l);else{const{email:e,...n}=b.current||t;a({...n})}d.current=i}},[i,a,l,t]);const g=Object(r.useCallback)(e=>{a({email:e})},[a]),h=Object(r.useCallback)(e=>{a({phone:e})},[a]),O=Object(r.useCallback)(e=>{p({phone:e})},[p]);return{defaultAddressFields:n.defaultAddressFields,shippingFields:l,setShippingFields:p,billingFields:t,setBillingFields:m,setEmail:g,setPhone:h,setShippingPhone:O,shippingAsBilling:i,setShippingAsBilling:u,showShippingFields:e,showBillingFields:!e||!d.current}}},302:function(e,t,a){"use strict";var n=a(10),r=a.n(n),c=a(0),o=a(60),l=a(52);const s=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:a={},...n}=e;const i=Object(c.useRef)(null),u=()=>{i.current&&o.focus.focusable.find(i.current).forEach(e=>{s.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(l.a)(u,0,{leading:!0});return Object(c.useLayoutEffect)(()=>{let e;return u(),i.current&&(e=new window.MutationObserver(d),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(c.createElement)("div",r()({ref:i,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...a}},n),t)}},303:function(e,t,a){"use strict";var n=a(0),r=a(1),c=a(281);t.a=e=>{let{id:t="phone",isRequired:a=!1,value:o="",onChange:l}=e;return Object(n.createElement)(c.a,{id:t,type:"tel",autoComplete:"tel",required:a,label:a?Object(r.__)("Phone","woo-gutenberg-products-block"):Object(r.__)("Phone (optional)","woo-gutenberg-products-block"),value:o,onChange:l})}},304:function(e,t,a){"use strict";var n=a(0),r=a(281),c=a(10),o=a.n(c),l=a(66),s=a(1),i=a(19),u=a(4),d=a.n(u),b=a(12),p=a(385),m=a(160),g=a(235),h=a(35);a(252);var O=Object(b.withInstanceId)(e=>{let{id:t,className:a,label:r,onChange:c,options:o,value:l,required:i=!1,errorMessage:u=Object(s.__)("Please select a value.","woo-gutenberg-products-block"),errorId:b,instanceId:O="0",autoComplete:f="off"}=e;const{getValidationError:j,setValidationErrors:v,clearValidationError:E}=Object(m.b)(),k=Object(n.useRef)(null),C=t||"control-"+O,y=b||C,w=j(y)||{message:"",hidden:!1};return Object(n.useEffect)(()=>(!i||l?E(y):v({[y]:{message:u,hidden:!0}}),()=>{E(y)}),[E,l,y,u,i,v]),Object(n.createElement)("div",{id:C,className:d()("wc-block-components-combobox",a,{"is-active":l,"has-error":w.message&&!w.hidden}),ref:k},Object(n.createElement)(p.a,{className:"wc-block-components-combobox-control",label:r,onChange:c,onFilterValueChange:e=>{if(e.length){const t=Object(h.c)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(h.c)(k.current)&&k.current.contains(t))return;const a=e.toLocaleUpperCase(),n=o.find(e=>e.label.toLocaleUpperCase().startsWith(a)||e.value.toLocaleUpperCase()===a);n&&c(n.value)}},options:o,value:l||"",allowReset:!1,autoComplete:f,"aria-invalid":w.message&&!w.hidden}),Object(n.createElement)(g.a,{propertyName:y}))});a(251);var f=e=>{let{className:t,countries:a,id:r,label:c,onChange:o,value:l="",autoComplete:u="off",required:b=!1,errorId:p,errorMessage:m=Object(s.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(n.useMemo)(()=>Object.entries(a).map(e=>{let[t,a]=e;return{value:t,label:Object(i.decodeEntities)(a)}}),[a]);return Object(n.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(n.createElement)(O,{id:r,label:c,onChange:o,options:g,value:l,errorId:p,errorMessage:m,required:b,autoComplete:u}),"off"!==u&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:l,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),a=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);o(a?a.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},j=e=>Object(n.createElement)(f,o()({countries:l.g},e)),v=e=>Object(n.createElement)(f,o()({countries:l.a},e));a(253);const E=(e,t)=>{const a=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return a?a.value:""};var k=e=>{let{className:t,id:a,states:c,country:o,label:l,onChange:u,autoComplete:b="off",value:p="",required:m=!1}=e;const g=c[o],h=Object(n.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),f=Object(n.useCallback)(e=>{u(h.length>0?E(e,h):e)},[u,h]),j=Object(n.useRef)(p);return Object(n.useEffect)(()=>{j.current!==p&&(j.current=p)},[p]),Object(n.useEffect)(()=>{if(h.length>0&&j.current){const e=E(j.current,h);e!==j.current&&f(e)}},[h,f]),h.length>0?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(O,{className:d()(t,"wc-block-components-state-input"),id:a,label:l,onChange:f,options:h,value:p,errorMessage:Object(s.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:b}),"off"!==b&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:b,value:p,onChange:e=>f(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(n.createElement)(r.a,{className:t,id:a,label:l,onChange:f,autoComplete:b,value:p,required:m})},C=e=>Object(n.createElement)(k,o()({states:l.h},e)),y=e=>Object(n.createElement)(k,o()({states:l.b},e)),w=a(17),N=a(2),_=a(50);t.a=Object(b.withInstanceId)(e=>{let{id:t="",fields:a=Object.keys(N.defaultAddressFields),fieldConfig:c={},instanceId:o,onChange:l,type:i="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:b,clearValidationError:p}=Object(m.b)(),g=Object(w.a)(a),h=d("shipping-missing-country")||{},O=Object(n.useMemo)(()=>Object(_.a)(g,c,u.country),[g,c,u.country]);return Object(n.useEffect)(()=>{O.forEach(e=>{e.hidden&&u[e.key]&&l({...u,[e.key]:""})})},[O,l,u]),Object(n.useEffect)(()=>{"shipping"===i&&((e,t,a,n)=>{n||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(s.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),n&&e.country&&a("shipping-missing-country")})(u,b,p,!!h.message&&!h.hidden)},[u,h.message,h.hidden,b,p,i]),t=t||o,Object(n.createElement)("div",{id:t,className:"wc-block-components-address-form"},O.map(e=>{if(e.hidden)return null;if("country"===e.key){const a="shipping"===i?j:v;return Object(n.createElement)(a,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>l({...u,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const a="shipping"===i?C:y;return Object(n.createElement)(a,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>l({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(n.createElement)(r.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>l({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/billing-address-frontend.js b/build/checkout-blocks/billing-address-frontend.js new file mode 100644 index 00000000000..3df95d74cd4 --- /dev/null +++ b/build/checkout-blocks/billing-address-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[32],{392:function(e,t,i){"use strict";i.r(t);var l=i(0),s=i(4),n=i.n(s),o=i(110),d=i(261),c=i(31),r=i(301),a=i(38),b=i(18),u=i(304),h=i(302),p=i(303),m=e=>{let{showCompanyField:t=!1,showApartmentField:i=!1,showPhoneField:s=!1,requireCompanyField:n=!1,requirePhoneField:o=!1}=e;const{defaultAddressFields:d,billingFields:c,setBillingFields:m,setPhone:w}=Object(r.a)(),{dispatchCheckoutEvent:F}=Object(a.a)(),{isEditor:g}=Object(b.a)();Object(l.useEffect)(()=>{s||w("")},[s,w]);const j=Object(l.useMemo)(()=>({company:{hidden:!t,required:n},address_2:{hidden:!i}}),[t,n,i]),O=g?h.a:l.Fragment;return Object(l.createElement)(O,null,Object(l.createElement)(u.a,{id:"billing",type:"billing",onChange:e=>{m(e),F("set-billing-address")},values:c,fields:Object.keys(d),fieldConfig:j}),s&&Object(l.createElement)(p.a,{isRequired:o,value:c.phone,onChange:e=>{w(e),F("set-phone-number",{step:"billing"})}}))},w=i(1),F=i(233),g={...Object(F.a)({defaultTitle:Object(w.__)("Billing address","woo-gutenberg-products-block"),defaultDescription:Object(w.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},j=i(132);t.default=Object(o.withFilteredAttributes)(g)(e=>{let{title:t,description:i,showStepNumber:s,children:o,className:a}=e;const{isProcessing:b}=Object(c.b)(),{showBillingFields:u}=Object(r.a)(),{requireCompanyField:h,requirePhoneField:p,showApartmentField:w,showCompanyField:F,showPhoneField:g}=Object(j.b)();return u?Object(l.createElement)(d.a,{id:"billing-fields",disabled:b,className:n()("wc-block-checkout__billing-fields",a),title:t,description:i,showStepNumber:s},Object(l.createElement)(m,{requireCompanyField:h,showApartmentField:w,showCompanyField:F,showPhoneField:g,requirePhoneField:p}),o):null})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/contact-information-frontend.js b/build/checkout-blocks/contact-information-frontend.js new file mode 100644 index 00000000000..fc5a14e20df --- /dev/null +++ b/build/checkout-blocks/contact-information-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[33],{21:function(e,t,c){"use strict";var n=c(0),a=c(4),l=c.n(a);t.a=e=>{let t,{label:c,screenReaderLabel:a,wrapperElement:r,wrapperProps:o={}}=e;const s=null!=c,i=null!=a;return!s&&i?(t=r||"span",o={...o,className:l()(o.className,"screen-reader-text")},Object(n.createElement)(t,o,a)):(t=r||n.Fragment,s&&i&&c!==a?Object(n.createElement)(t,o,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},a)):Object(n.createElement)(t,o,c))}},221:function(e,t){},224:function(e,t,c){"use strict";var n=c(10),a=c.n(n),l=c(0),r=c(4),o=c.n(r);c(8),c(225),t.a=e=>{let{children:t,className:c,headingLevel:n,...r}=e;const s=o()("wc-block-components-title",c),i="h"+n;return Object(l.createElement)(i,a()({className:s},r),t)}},225:function(e,t){},228:function(e,t){},232:function(e,t){},233:function(e,t,c){"use strict";var n=c(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:a=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:a}}}},235:function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var n=c(0),a=(c(8),c(160));c(221);const l=e=>{let{errorMessage:t="",propertyName:c="",elementId:l=""}=e;const{getValidationError:r,getValidationErrorId:o}=Object(a.b)();if(!t||"string"!=typeof t){const e=r(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:o(l)},t))}},261:function(e,t,c){"use strict";var n=c(0),a=c(4),l=c.n(a),r=c(224);c(232);const o=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(r.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:a,legend:r,description:s,children:i,disabled:u=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const p=r||a?"fieldset":"div";return Object(n.createElement)(p,{className:l()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":u}),id:t,disabled:u},!(!r&&!a)&&Object(n.createElement)("legend",{className:"screen-reader-text"},r||a),!!a&&Object(n.createElement)(o,{title:a,stepHeadingContent:b()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!s&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},s),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},281:function(e,t,c){"use strict";var n=c(10),a=c.n(n),l=c(0),r=c(1),o=c(3),s=c(4),i=c.n(s),u=c(160),d=c(235),b=c(12),p=c(35),m=c(21);c(228);var g=Object(o.forwardRef)((e,t)=>{let{className:c,id:n,type:r="text",ariaLabel:o,ariaDescribedBy:s,label:u,screenReaderLabel:d,disabled:b,help:p,autoCapitalize:g="off",autoComplete:h="off",value:j="",onChange:O,required:f=!1,onBlur:k=(()=>{}),feedback:w,...E}=e;const[v,_]=Object(l.useState)(!1);return Object(l.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":v||j})},Object(l.createElement)("input",a()({type:r,id:n,value:j,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{O(e.target.value)},onFocus:()=>_(!0),onBlur:e=>{k(e.target.value),_(!1)},"aria-label":o||u,disabled:b,"aria-describedby":p&&!s?n+"__help":s,required:f},E)),Object(l.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!p&&Object(l.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},p),w)});t.a=Object(b.withInstanceId)(e=>{let{className:t,instanceId:c,id:n,ariaDescribedBy:s,errorId:b,focusOnMount:m=!1,onChange:h,showError:j=!0,errorMessage:O="",value:f="",...k}=e;const[w,E]=Object(o.useState)(!0),v=Object(o.useRef)(null),{getValidationError:_,hideValidationError:C,setValidationErrors:N,clearValidationError:S,getValidationErrorId:y}=Object(u.b)(),A=void 0!==n?n:"textinput-"+c,F=void 0!==b?b:A,B=Object(o.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 c=t.checkValidity();c?S(F):N({[F]:{message:t.validationMessage||Object(r.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[S,F,N]);Object(o.useEffect)(()=>{var e;w&&m&&(null===(e=v.current)||void 0===e||e.focus()),E(!1)},[m,w,E]),Object(o.useEffect)(()=>{var e,t;(null===(e=v.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==v.current&&B(!0)},[f,B]),Object(o.useEffect)(()=>()=>{S(F)},[S,F]);const I=_(F)||{};Object(p.d)(O)&&""!==O&&(I.message=O);const x=I.message&&!I.hidden,R=j&&x&&y(F)?y(F):s;return Object(l.createElement)(g,a()({className:i()(t,{"has-error":x}),"aria-invalid":!0===x,id:A,onBlur:()=>{B(!1)},feedback:j&&Object(l.createElement)(d.a,{errorMessage:O,propertyName:F}),ref:v,onChange:e=>{C(F),h(e)},ariaDescribedBy:R,value:f},k))})},301:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(2),a=c(0),l=c(44),r=c(33);const o=()=>{const{needsShipping:e}=Object(l.b)(),{billingData:t,setBillingData:c,shippingAddress:o,setShippingAddress:s,shippingAsBilling:i,setShippingAsBilling:u}=Object(r.b)(),d=Object(a.useRef)(i),b=Object(a.useRef)(),p=Object(a.useCallback)(e=>{s(e),i&&c(e)},[i,s,c]),m=Object(a.useCallback)(t=>{c(t),e||s(t)},[e,s,c]);Object(a.useEffect)(()=>{if(d.current!==i){if(i)b.current=t,c(o);else{const{email:e,...n}=b.current||t;c({...n})}d.current=i}},[i,c,o,t]);const g=Object(a.useCallback)(e=>{c({email:e})},[c]),h=Object(a.useCallback)(e=>{c({phone:e})},[c]),j=Object(a.useCallback)(e=>{p({phone:e})},[p]);return{defaultAddressFields:n.defaultAddressFields,shippingFields:o,setShippingFields:p,billingFields:t,setBillingFields:m,setEmail:g,setPhone:h,setShippingPhone:j,shippingAsBilling:i,setShippingAsBilling:u,showShippingFields:e,showBillingFields:!e||!d.current}}},389:function(e,t,c){"use strict";c.r(t);var n=c(0),a=c(4),l=c.n(a),r=c(110),o=c(261),s=c(31),i=c(1),u=c(281),d=c(301),b=c(38),p=c(2),m=c(13),g=e=>{let{allowCreateAccount:t}=e;const{customerId:c,shouldCreateAccount:a,setShouldCreateAccount:l}=Object(s.b)(),{billingFields:r,setEmail:o}=Object(d.a)(),{dispatchCheckoutEvent:g}=Object(b.a)(),h=!c&&t&&Object(p.getSetting)("checkoutAllowsGuest",!1)&&Object(p.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(m.CheckboxControl,{className:"wc-block-checkout__create-account",label:Object(i.__)("Create an account?","woo-gutenberg-products-block"),checked:a,onChange:e=>l(e)});return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(u.a,{id:"email",type:"email",label:Object(i.__)("Email address","woo-gutenberg-products-block"),value:r.email,autoComplete:"email",onChange:e=>{o(e),g("set-email-address")},required:!0}),h)},h=c(233),j={...Object(h.a)({defaultTitle:Object(i.__)("Contact information","woo-gutenberg-products-block"),defaultDescription:Object(i.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}};const O=`${c(66).e}?redirect_to=${encodeURIComponent(window.location.href)}`;var f=()=>{const{customerId:e}=Object(s.b)();return!Object(p.getSetting)("checkoutShowLoginReminder",!0)||e?null:Object(n.createElement)(n.Fragment,null,Object(i.__)("Already have an account? ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:O},Object(i.__)("Log in.","woo-gutenberg-products-block")))},k=c(132);t.default=Object(r.withFilteredAttributes)(j)(e=>{let{title:t,description:c,showStepNumber:a,children:r,className:i}=e;const{isProcessing:u}=Object(s.b)(),{allowCreateAccount:d}=Object(k.b)();return Object(n.createElement)(o.a,{id:"contact-fields",disabled:u,className:l()("wc-block-checkout__contact-fields",i),title:t,description:c,showStepNumber:a,stepHeadingContent:()=>Object(n.createElement)(f,null)},Object(n.createElement)(g,{allowCreateAccount:d}),r)})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/express-payment-frontend.js b/build/checkout-blocks/express-payment-frontend.js new file mode 100644 index 00000000000..6c0527c98ef --- /dev/null +++ b/build/checkout-blocks/express-payment-frontend.js @@ -0,0 +1,5 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[34],{129:function(e,t,n){"use strict";var c=n(0),s=n(1),o=(n(8),n(4)),r=n.n(o),a=(n(161),n(130));t.a=e=>{let{children:t,className:n,screenReaderLabel:o,showSpinner:i=!1,isLoading:l=!0}=e;return Object(c.createElement)("div",{className:r()(n,{"wc-block-components-loading-mask":l})},l&&i&&Object(c.createElement)(a.a,null),Object(c.createElement)("div",{className:r()({"wc-block-components-loading-mask__children":l}),"aria-hidden":l},t),l&&Object(c.createElement)("span",{className:"screen-reader-text"},o||Object(s.__)("Loading…","woo-gutenberg-products-block")))}},130:function(e,t,n){"use strict";var c=n(0);n(157),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},157:function(e,t){},161:function(e,t){},221:function(e,t){},224:function(e,t,n){"use strict";var c=n(10),s=n.n(c),o=n(0),r=n(4),a=n.n(r);n(8),n(225),t.a=e=>{let{children:t,className:n,headingLevel:c,...r}=e;const i=a()("wc-block-components-title",n),l="h"+c;return Object(o.createElement)(l,s()({className:i},r),t)}},225:function(e,t){},235:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var c=n(0),s=(n(8),n(160));n(221);const o=e=>{let{errorMessage:t="",propertyName:n="",elementId:o=""}=e;const{getValidationError:r,getValidationErrorId:a}=Object(s.b)();if(!t||"string"!=typeof t){const e=r(n)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(c.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(c.createElement)("p",{id:a(o)},t))}},238:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return a}));var c=n(17),s=n(204);const o=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:o,expressPaymentMethodsInitialized:r}=Object(s.b)(),a=Object(c.a)(t),i=Object(c.a)(n);return{paymentMethods:e?i:a,isInitialized:e?r:o}},r=()=>o(!1),a=()=>o(!0)},239:function(e,t){},240:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var c=n(1),s=n(9),o=n(6),r=n(19),a=n(22),i=n(0),l=n(211),p=n(160),u=n(32);const m=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(a.a)(),{addErrorNotice:n}=Object(u.a)(),{addSnackbarNotice:m}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:n,setIsSuppressed:c}=Object(l.b)(),s=Object(i.useRef)(e);Object(i.useEffect)(()=>{s.current=e},[e]);const o=Object(i.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach(t=>{null!==e&&t.status!==e||n(t.id)})},removeSnackbarNotice:n}),[n]),r=Object(i.useMemo)(()=>({addSnackbarNotice:function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,n)}}),[t]);return{notices:e,...o,...r,setIsSuppressed:c}})(),{setValidationErrors:d}=Object(p.b)();return{appliedCoupons:e,isLoading:t,...Object(s.useSelect)((e,t)=>{let{dispatch:s}=t;const a=e(o.CART_STORE_KEY),i=a.isApplyingCoupon(),l=a.isRemovingCoupon(),{applyCoupon:p,removeCoupon:u,receiveApplyingCoupon:b}=s(o.CART_STORE_KEY);return{applyCoupon:e=>{p(e).then(t=>{!0===t&&m(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{d({coupon:{message:Object(r.decodeEntities)(e.message),hidden:!1}}),b("")})},removeCoupon:e=>{u(e).then(t=>{!0===t&&m(Object(c.sprintf)( +/* translators: %s coupon code. */ +Object(c.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{n(e.message,{id:"coupon-form"}),b("")})},isApplyingCoupon:i,isRemovingCoupon:l}},[n,m])}}},243:function(e,t,n){"use strict";var c=n(10),s=n.n(c),o=n(0),r=n(4),a=n.n(r);const i=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var l=e=>{let{id:t,src:n=null,alt:c=""}=e;return n?Object(o.createElement)("img",{className:i(t),src:n,alt:c}):null},p=n(66);const u=[{id:"alipay",alt:"Alipay",src:p.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:p.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:p.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:p.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:p.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:p.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:p.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:p.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:p.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:p.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:p.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:p.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:p.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:p.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:p.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:p.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:p.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:p.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:p.l+"payment-methods/wechat.svg"}];var m=n(35);n(239),t.a=e=>{let{icons:t=[],align:n="center",className:c}=e;const r=(e=>{const t={};return e.forEach(e=>{let n={};"string"==typeof e&&(n={id:e,alt:e,src:null}),"object"==typeof e&&(n={id:e.id||"",alt:e.alt||"",src:e.src||null}),n.id&&Object(m.d)(n.id)&&!t[n.id]&&(t[n.id]=n)}),Object.values(t)})(t);if(0===r.length)return null;const i=a()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===n,"wc-block-components-payment-method-icons--align-right":"right"===n},c);return Object(o.createElement)("div",{className:i},r.map(e=>{const t={...e,...(n=e.id,u.find(e=>e.id===n)||{})};var n;return Object(o.createElement)(l,s()({key:"payment-method-icon-"+e.id},t))}))}},255:function(e,t){},256:function(e,t,n){"use strict";var c=n(15),s=n.n(c),o=n(0),r=n(1),a=n(3),i=(n(8),n(2)),l=n(92);class p extends a.Component{constructor(){super(...arguments),s()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:n}=this.props;if(e){let e=Object(r.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(n||i.CURRENT_USER_IS_ADMIN)&&(e=t||Object(r.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const c=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(o.createElement)(l.StoreNoticesContainer,{notices:c})}return this.props.children}}p.defaultProps={isEditor:!1},t.a=p},279:function(e,t){},280:function(e,t,n){"use strict";var c=n(0),s=n(1),o=n(305),r=n(238),a=n(18),i=n(204),l=n(30),p=n.n(l),u=n(256);t.a=()=>{const{isEditor:e}=Object(a.a)(),{setActivePaymentMethod:t,setExpressPaymentError:n,activePaymentMethod:l,paymentMethodData:m,setPaymentStatus:d}=Object(i.b)(),b=Object(o.a)(),{paymentMethods:h}=Object(r.a)(),g=Object(c.useRef)(l),v=Object(c.useRef)(m),j=Object(c.useCallback)(e=>()=>{g.current=l,v.current=m,d().started(),t(e)},[l,m,t,d]),O=Object(c.useCallback)(()=>{d().pristine(),t(g.current,v.current)},[t,d]),y=Object(c.useCallback)(e=>{d().error(e),n(e),t(g.current,v.current)},[t,d,n]),E=Object(c.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";p()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?y(e):n("")}),[n,y]),f=Object.entries(h),k=f.length>0?f.map(t=>{let[n,s]=t;const o=e?s.edit:s.content;return Object(c.isValidElement)(o)?Object(c.createElement)("li",{key:n,id:"express-payment-method-"+n},Object(c.cloneElement)(o,{...b,onClick:j(n),onClose:O,onError:y,setExpressPaymentError:E})):null}):Object(c.createElement)("li",{key:"noneRegistered"},Object(s.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(c.createElement)(u.a,{isEditor:e},Object(c.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},k))}},300:function(e,t,n){"use strict";var c=n(0),s=n(24);const o=Object(c.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=o},305:function(e,t,n){"use strict";n.d(t,"a",(function(){return R}));var c=n(1),s=n(40),o=n(0),r=n(4),a=n.n(r),i=n(24),l=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),p=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),u=n(300),m=Object(o.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(o.createElement)("path",{d:"M0 0h24v24H0z"}),Object(o.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(o.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),d=n(98),b=n(35);n(255);const h={bank:l,bill:p,card:u.a,checkPayment:m};var g=e=>{let{icon:t="",text:n=""}=e;const c=!!t,s=Object(o.useCallback)(e=>c&&Object(b.d)(e)&&Object(b.e)(h,e),[c]),r=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":c});return Object(o.createElement)("span",{className:r},s(t)?Object(o.createElement)(d.a,{srcElement:h[t]}):t,n)},v=n(243),j=n(2),O=n(30),y=n.n(O),E=n(129),f=n(235),k=n(22),w=n(240),S=n(29),_=n(31),x=n(204),C=n(44),P=n(33);const M=(e,t)=>{const n=[],s=(t,n)=>{const c=n+"_tax",s=Object(b.e)(e,n)&&Object(b.d)(e[n])?parseInt(e[n],10):0;return{key:n,label:t,value:s,valueWithTax:s+(Object(b.e)(e,c)&&Object(b.d)(e[c])?parseInt(e[c],10):0)}};return n.push(s(Object(c.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),n.push(s(Object(c.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),n.push(s(Object(c.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),n.push({key:"total_tax",label:Object(c.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&n.push(s(Object(c.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),n},R=()=>{const{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onCheckoutAfterProcessingWithSuccess:l,onCheckoutAfterProcessingWithError:p,onSubmit:u,customerId:m}=Object(_.b)(),{currentStatus:d,activePaymentMethod:b,onPaymentProcessing:h,setExpressPaymentError:O,shouldSavePayment:R}=Object(x.b)(),{shippingErrorStatus:N,shippingErrorTypes:I,shippingRates:z,shippingRatesLoading:V,selectedRates:T,setSelectedRates:A,isSelectingRate:H,onShippingRateSuccess:L,onShippingRateFail:D,onShippingRateSelectSuccess:B,onShippingRateSelectFail:F,needsShipping:W}=Object(C.b)(),{billingData:G,shippingAddress:U,setShippingAddress:Y}=Object(P.b)(),{cartItems:J,cartFees:K,cartTotals:X,extensions:q}=Object(k.a)(),{appliedCoupons:Q}=Object(w.a)(),{noticeContexts:Z,responseTypes:$}=Object(S.c)(),ee=Object(o.useRef)(M(X,W)),te=Object(o.useRef)({label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)});Object(o.useEffect)(()=>{ee.current=M(X,W),te.current={label:Object(c.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)}},[X,W]);const ne=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";y()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),O(e)}),[O]);return{activePaymentMethod:b,billing:{appliedCoupons:Q,billingData:G,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(s.getCurrencyFromPriceResponse)(X),customerId:m,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:J,cartFees:K,extensions:q},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:n,isProcessing:r},components:{LoadingMask:E.a,PaymentMethodIcons:v.a,PaymentMethodLabel:g,ValidationInputError:f.a},emitResponse:{noticeContexts:Z,responseTypes:$},eventRegistration:{onCheckoutAfterProcessingWithError:p,onCheckoutAfterProcessingWithSuccess:l,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:i,onPaymentProcessing:h,onShippingRateFail:D,onShippingRateSelectFail:F,onShippingRateSelectSuccess:B,onShippingRateSuccess:L},onSubmit:u,paymentStatus:d,setExpressPaymentError:ne,shippingData:{isSelectingRate:H,needsShipping:W,selectedRates:T,setSelectedRates:A,setShippingAddress:Y,shippingAddress:U,shippingRates:z,shippingRatesLoading:V},shippingStatus:{shippingErrorStatus:N,shippingErrorTypes:I},shouldSavePayment:R}}},401:function(e,t,n){"use strict";n.r(t);var c=n(0),s=n(22),o=n(1),r=n(238),a=n(29),i=n(31),l=n(204),p=n(18),u=n(87),m=n(224),d=n(129),b=n(2),h=n(280);n(279);var g=()=>{const{isCalculating:e,isProcessing:t,isAfterProcessing:n,isBeforeProcessing:s,isComplete:g,hasError:v}=Object(i.b)(),{currentStatus:j}=Object(l.b)(),{paymentMethods:O,isInitialized:y}=Object(r.a)(),{isEditor:E}=Object(p.a)(),{noticeContexts:f}=Object(a.c)();if(!y||y&&0===Object.keys(O).length)return E||b.CURRENT_USER_IS_ADMIN?Object(c.createElement)(u.a,{context:f.EXPRESS_PAYMENTS}):null;const k=t||n||s||g&&!v;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(d.a,{isLoading:e||k||j.isDoingExpressPayment},Object(c.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},Object(c.createElement)("div",{className:"wc-block-components-express-payment__title-container"},Object(c.createElement)(m.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(o.__)("Express checkout","woo-gutenberg-products-block"))),Object(c.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(c.createElement)(u.a,{context:f.EXPRESS_PAYMENTS},Object(c.createElement)("p",null,Object(o.__)("In a hurry? Use one of our express checkout options:","woo-gutenberg-products-block")),Object(c.createElement)(h.a,null))))),Object(c.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(o.__)("Or continue below","woo-gutenberg-products-block")))};t.default=e=>{let{className:t}=e;const{cartNeedsPayment:n}=Object(s.a)();return n?Object(c.createElement)("div",{className:t},Object(c.createElement)(g,null)):null}},92:function(e,t,n){}}]); \ No newline at end of file diff --git a/build/checkout-blocks/fields-frontend.js b/build/checkout-blocks/fields-frontend.js new file mode 100644 index 00000000000..b65a78f46c3 --- /dev/null +++ b/build/checkout-blocks/fields-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[35],{332:function(c,e,t){"use strict";var n=t(0),o=t(3),a=t(4),s=t.n(a);const r=Object(o.forwardRef)((c,e)=>{let{children:t,className:o=""}=c;return Object(n.createElement)("div",{ref:e,className:s()("wc-block-components-main",o)},t)});e.a=r},345:function(c,e){},380:function(c,e,t){"use strict";t.r(e);var n=t(0),o=t(4),a=t.n(o),s=t(332);t(345),e.default=c=>{let{children:e,className:t}=c;return Object(n.createElement)(s.a,{className:a()("wc-block-checkout__main",t)},Object(n.createElement)("form",{className:"wc-block-components-form wc-block-checkout__form"},e))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/order-note-frontend.js b/build/checkout-blocks/order-note-frontend.js new file mode 100644 index 00000000000..9f82d4ec973 --- /dev/null +++ b/build/checkout-blocks/order-note-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[36],{224:function(e,t,c){"use strict";var n=c(10),o=c.n(n),a=c(0),s=c(4),l=c.n(s);c(8),c(225),t.a=e=>{let{children:t,className:c,headingLevel:n,...s}=e;const r=l()("wc-block-components-title",c),d="h"+n;return Object(a.createElement)(d,o()({className:r},s),t)}},225:function(e,t){},232:function(e,t){},261:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o),s=c(224);c(232);const l=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(s.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:o,legend:s,description:r,children:d,disabled:i=!1,showStepNumber:b=!0,stepHeadingContent:u=(()=>{})}=e;const p=s||o?"fieldset":"div";return Object(n.createElement)(p,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":b,"wc-block-components-checkout-step--disabled":i}),id:t,disabled:i},!(!s&&!o)&&Object(n.createElement)("legend",{className:"screen-reader-text"},s||o),!!o&&Object(n.createElement)(l,{title:o,stepHeadingContent:u()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!r&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},r),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},d)))}},349:function(e,t){},350:function(e,t){},393:function(e,t,c){"use strict";c.r(t);var n=c(0),o=c(4),a=c.n(o),s=c(1),l=c(261),r=c(44),d=c(31),i=c(13),b=c(8),u=c.n(b);c(350);var p=e=>{let{className:t="",disabled:c=!1,onTextChange:o,placeholder:s,value:l=""}=e;return Object(n.createElement)("textarea",{className:a()("wc-block-components-textarea",t),disabled:c,onChange:e=>{o(e.target.value)},placeholder:s,rows:2,value:l})};c(349),p.propTypes={onTextChange:u.a.func.isRequired,disabled:u.a.bool,placeholder:u.a.string,value:u.a.string};var m=e=>{let{disabled:t,onChange:c,placeholder:o,value:a}=e;const[l,r]=Object(n.useState)(!1),[d,b]=Object(n.useState)("");return Object(n.createElement)("div",{className:"wc-block-checkout__add-note"},Object(n.createElement)(i.CheckboxControl,{disabled:t,label:Object(s.__)("Add a note to your order","woo-gutenberg-products-block"),checked:l,onChange:e=>{r(e),e?a!==d&&c(d):(c(""),b(a))}}),l&&Object(n.createElement)(p,{disabled:t,onTextChange:c,placeholder:o,value:a}))};t.default=e=>{let{className:t}=e;const{needsShipping:c}=Object(r.b)(),{isProcessing:o,orderNotes:i,dispatchActions:b}=Object(d.b)(),{setOrderNotes:u}=b;return Object(n.createElement)(l.a,{id:"order-notes",showStepNumber:!1,className:a()("wc-block-checkout__order-notes",t),disabled:o},Object(n.createElement)(m,{disabled:o,onChange:u,placeholder:c?Object(s.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(s.__)("Notes about your order.","woo-gutenberg-products-block"),value:i}))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/order-summary-frontend.js b/build/checkout-blocks/order-summary-frontend.js new file mode 100644 index 00000000000..35c1a2dd9ba --- /dev/null +++ b/build/checkout-blocks/order-summary-frontend.js @@ -0,0 +1,31 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[37],{112:function(e,t){},129:function(e,t,c){"use strict";var n=c(0),a=c(1),r=(c(8),c(4)),o=c.n(r),s=(c(161),c(130));t.a=e=>{let{children:t,className:c,screenReaderLabel:r,showSpinner:l=!1,isLoading:i=!0}=e;return Object(n.createElement)("div",{className:o()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(n.createElement)(s.a,null),Object(n.createElement)("div",{className:o()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(n.createElement)("span",{className:"screen-reader-text"},r||Object(a.__)("Loading…","woo-gutenberg-products-block")))}},130:function(e,t,c){"use strict";var n=c(0);c(157),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},157:function(e,t){},159:function(e,t){},161:function(e,t){},163:function(e,t,c){"use strict";var n=c(10),a=c.n(n),r=c(0),o=c(24);const s=Object(r.createElement)(e=>{let{className:t,size:c,...n}=e;return Object(r.createElement)(o.SVG,a()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},n),Object(r.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=s},168:function(e,t,c){"use strict";var n=c(10),a=c.n(n),r=c(0),o=c(4),s=c.n(o),l=c(1),i=c(98),p=c(163);c(112);var u=e=>{let{text:t,screenReaderText:c="",element:n="li",className:o="",radius:l="small",children:i=null,...p}=e;const u=n,b=s()(o,"wc-block-components-chip","wc-block-components-chip--radius-"+l),m=Boolean(c&&c!==t);return Object(r.createElement)(u,a()({className:b},p),Object(r.createElement)("span",{"aria-hidden":m,className:"wc-block-components-chip__text"},t),m&&Object(r.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:n=!1,onRemove:o=(()=>{}),removeOnAnyClick:b=!1,text:m,screenReaderText:d="",...g}=e;const O=b?"span":"button";if(!t){const e=d&&"string"==typeof d?d:m;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:n,onClick:o,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||o()}},h=b?j:{},_=b?{"aria-hidden":!0}:j;return Object(r.createElement)(u,a()({},g,h,{className:s()(c,"is-removable"),element:b?"button":g.element,screenReaderText:d,text:m}),Object(r.createElement)(O,a()({className:"wc-block-components-chip__remove"},_),Object(r.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:p.a,size:16})))}},21:function(e,t,c){"use strict";var n=c(0),a=c(4),r=c.n(a);t.a=e=>{let t,{label:c,screenReaderLabel:a,wrapperElement:o,wrapperProps:s={}}=e;const l=null!=c,i=null!=a;return!l&&i?(t=o||"span",s={...s,className:r()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,a)):(t=o||n.Fragment,l&&i&&c!==a?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},a)):Object(n.createElement)(t,s,c))}},221:function(e,t){},222:function(e,t,c){"use strict";var n=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:a,secondaryDescription:r,id:o}=e;return Object(n.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(n.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(n.createElement)("span",{id:o&&o+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(n.createElement)("span",{id:o&&o+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(n.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(n.createElement)("span",{id:o&&o+"__description",className:"wc-block-components-radio-control__description"},a),r&&Object(n.createElement)("span",{id:o&&o+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},r)))}},226:function(e,t,c){"use strict";var n=c(0),a=c(4),r=c.n(a),o=c(222);t.a=e=>{let{checked:t,name:c,onChange:a,option:s}=e;const{value:l,label:i,description:p,secondaryLabel:u,secondaryDescription:b}=s;return Object(n.createElement)("label",{className:r()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(n.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>a(e.target.value),checked:t,"aria-describedby":r()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:u,[`${c}-${l}__description`]:p,[`${c}-${l}__secondary-description`]:b})}),Object(n.createElement)(o.a,{id:`${c}-${l}`,label:i,secondaryLabel:u,description:p,secondaryDescription:b}))}},227:function(e,t,c){"use strict";var n=c(10),a=c.n(n),r=c(0),o=c(56),s=c(4),l=c.n(s),i=c(130);c(230),t.a=e=>{let{className:t,showSpinner:c=!1,children:n,...s}=e;const p=l()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(r.createElement)(o.a,a()({className:p},s),c&&Object(r.createElement)(i.a,null),Object(r.createElement)("span",{className:"wc-block-components-button__text"},n))}},228:function(e,t){},230:function(e,t){},235:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0),a=(c(8),c(160));c(221);const r=e=>{let{errorMessage:t="",propertyName:c="",elementId:r=""}=e;const{getValidationError:o,getValidationErrorId:s}=Object(a.b)();if(!t||"string"!=typeof t){const e=o(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:s(r)},t))}},236:function(e,t,c){"use strict";var n=c(0),a=c(4),r=c.n(a),o=c(12),s=c(226);c(237),t.a=Object(o.withInstanceId)(e=>{let{className:t="",instanceId:c,id:a,selected:o,onChange:l=(()=>{}),options:i=[]}=e;const p=a||c;return i.length&&Object(n.createElement)("div",{className:r()("wc-block-components-radio-control",t)},i.map(e=>Object(n.createElement)(s.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===o,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},237:function(e,t){},240:function(e,t,c){"use strict";c.d(t,"a",(function(){return b}));var n=c(1),a=c(9),r=c(6),o=c(19),s=c(22),l=c(0),i=c(211),p=c(160),u=c(32);const b=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(s.a)(),{addErrorNotice:c}=Object(u.a)(),{addSnackbarNotice:b}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:n}=Object(i.b)(),a=Object(l.useRef)(e);Object(l.useEffect)(()=>{a.current=e},[e]);const r=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),o=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...r,...o,setIsSuppressed:n}})(),{setValidationErrors:m}=Object(p.b)();return{appliedCoupons:e,isLoading:t,...Object(a.useSelect)((e,t)=>{let{dispatch:a}=t;const s=e(r.CART_STORE_KEY),l=s.isApplyingCoupon(),i=s.isRemovingCoupon(),{applyCoupon:p,removeCoupon:u,receiveApplyingCoupon:d}=a(r.CART_STORE_KEY);return{applyCoupon:e=>{p(e).then(t=>{!0===t&&b(Object(n.sprintf)( +/* translators: %s coupon code. */ +Object(n.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{m({coupon:{message:Object(o.decodeEntities)(e.message),hidden:!1}}),d("")})},removeCoupon:e=>{u(e).then(t=>{!0===t&&b(Object(n.sprintf)( +/* translators: %s coupon code. */ +Object(n.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{c(e.message,{id:"coupon-form"}),d("")})},isApplyingCoupon:l,isRemovingCoupon:i}},[c,b])}}},242:function(e,t,c){"use strict";var n=c(0),a=c(4),r=c.n(a);c(272),t.a=e=>{let{children:t,className:c}=e;return Object(n.createElement)("div",{className:r()("wc-block-components-product-badge",c)},t)}},245:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(96),o=c(4),s=c.n(o),l=c(40);c(246);const i=e=>{let{currency:t,maxPrice:c,minPrice:o,priceClassName:i,priceStyle:p={}}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(a.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(o),Object(l.formatPrice)(c))),Object(n.createElement)("span",{"aria-hidden":!0},Object(n.createElement)(r.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:o,style:p})," — ",Object(n.createElement)(r.a,{className:s()("wc-block-components-product-price__value",i),currency:t,value:c,style:p})))},p=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:o,regularPrice:l,priceClassName:i,priceStyle:p,price:u}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Previous price:","woo-gutenberg-products-block")),Object(n.createElement)(r.a,{currency:t,renderText:e=>Object(n.createElement)("del",{className:s()("wc-block-components-product-price__regular",c),style:o},e),value:l}),Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.__)("Discounted price:","woo-gutenberg-products-block")),Object(n.createElement)(r.a,{currency:t,renderText:e=>Object(n.createElement)("ins",{className:s()("wc-block-components-product-price__value","is-discounted",i),style:p},e),value:u}))};t.a=e=>{let{align:t,className:c,currency:a,format:o="",maxPrice:l,minPrice:u,price:b,priceClassName:m,priceStyle:d,regularPrice:g,regularPriceClassName:O,regularPriceStyle:j}=e;const h=s()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});o.includes("")||(o="",console.error("Price formats need to include the `` tag."));const _=g&&b!==g;let E=Object(n.createElement)("span",{className:s()("wc-block-components-product-price__value",m)});return _?E=Object(n.createElement)(p,{currency:a,price:b,priceClassName:m,priceStyle:d,regularPrice:g,regularPriceClassName:O,regularPriceStyle:j}):void 0!==u&&void 0!==l?E=Object(n.createElement)(i,{currency:a,maxPrice:l,minPrice:u,priceClassName:m,priceStyle:d}):b&&(E=Object(n.createElement)(r.a,{className:s()("wc-block-components-product-price__value",m),currency:a,value:b,style:d})),Object(n.createElement)("span",{className:h},Object(n.createInterpolateElement)(o,{price:E}))}},246:function(e,t){},247:function(e,t,c){"use strict";var n=c(10),a=c.n(n),r=c(0),o=c(19),s=c(4),l=c.n(s);c(248),t.a=e=>{let{className:t="",disabled:c=!1,name:n,permalink:s="",rel:i,style:p,onClick:u,...b}=e;const m=l()("wc-block-components-product-name",t);if(c){const e=b;return Object(r.createElement)("span",a()({className:m},e,{dangerouslySetInnerHTML:{__html:Object(o.decodeEntities)(n)}}))}return Object(r.createElement)("a",a()({className:m,href:s,rel:i},b,{dangerouslySetInnerHTML:{__html:Object(o.decodeEntities)(n)},style:p}))}},248:function(e,t){},250:function(e,t){},251:function(e,t){},252:function(e,t){},253:function(e,t){},254:function(e,t){},258:function(e,t,c){"use strict";var n=c(0),a=c(113),r=c(114);const o=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},s=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const n=s(e),a=n.split(" ").splice(0,t).join(" ");return Object(r.autop)(l(a,c))},p=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const a=s(e),o=a.slice(0,t);if(c)return Object(r.autop)(l(o,n));const i=o.match(/([\s]+)/g),p=i?i.length:0,u=a.slice(0,t+p);return Object(r.autop)(l(u,n))};t.a=e=>{let{source:t,maxLength:c=15,countType:s="words",className:l=""}=e;const u=Object(n.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const n=Object(r.autop)(e),s=Object(a.count)(n,c);if(s<=t)return n;const l=o(n),u=Object(a.count)(l,c);return u<=t?l:"words"===c?i(l,t):p(l,t,"characters_including_spaces"===c)}(t,c,s),[t,c,s]);return Object(n.createElement)(n.RawHTML,{className:l},u)}},262:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(23),o=c(129),s=c(13),l=c(299),i=c(22),p=c(18),u=c(4),b=c.n(u),m=c(19),d=c(21),g=c(11),O=c.n(g),j=c(99),h=c(38);const _=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var E=c(236),f=c(222),k=c(40),v=c(96),w=c(2);const y=e=>{const t=Object(w.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(m.decodeEntities)(e.name),value:e.rate_id,description:Object(n.createElement)(n.Fragment,null,Number.isFinite(t)&&Object(n.createElement)(v.a,{currency:Object(k.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(m.decodeEntities)(e.delivery_time))}};var C=e=>{let{className:t,noResultsMessage:c,onSelectRate:a,rates:r,renderOption:o=y,selected:s}=e;if(0===r.length)return c;if(r.length>1)return Object(n.createElement)(E.a,{className:t,onChange:e=>{a(e)},selected:s,options:r.map(o)});const{label:l,secondaryLabel:i,description:p,secondaryDescription:u}=o(r[0]);return Object(n.createElement)(f.a,{label:l,secondaryLabel:i,description:p,secondaryDescription:u})};c(254);var N=e=>{let{packageId:t,className:c,noResultsMessage:r,renderOption:o,packageData:l,collapsible:i=!1,collapse:p=!1,showItems:u=!1}=e;const{selectShippingRate:g,selectedShippingRate:E}=((e,t)=>{const{dispatchCheckoutEvent:c}=Object(h.a)(),{selectShippingRate:a,isSelectingRate:r}=Object(j.a)(),[o,s]=Object(n.useState)(()=>_(t)),l=Object(n.useRef)(t);return Object(n.useEffect)(()=>{O()(l.current,t)||(l.current=t,s(_(t)))},[t]),{selectShippingRate:Object(n.useCallback)(t=>{s(t),a(t,e),c("set-selected-shipping-rate",{shippingRateId:t})},[e,a,c]),selectedShippingRate:o,isSelectingRate:r}})(t,l.shipping_rates),f=Object(n.createElement)(n.Fragment,null,(u||i)&&Object(n.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),u&&Object(n.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(m.decodeEntities)(e.name),c=e.quantity;return Object(n.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(n.createElement)(d.a,{label:c>1?`${t} × ${c}`:""+t,screenReaderLabel:Object(a.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",c,"woo-gutenberg-products-block"),t,c)}))}))),k=Object(n.createElement)(C,{className:c,noResultsMessage:r,rates:l.shipping_rates,onSelectRate:g,selected:E,renderOption:o});return i?Object(n.createElement)(s.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:f},k):Object(n.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",c)},f,k)};const S=e=>{let{packages:t,collapse:c,showItems:a,collapsible:r,noResultsMessage:o,renderOption:s}=e;return t.length?Object(n.createElement)(n.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(n.createElement)(N,{key:t,packageId:t,packageData:l,collapsible:r,collapse:c,showItems:a,noResultsMessage:o,renderOption:s})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:c,className:u,collapsible:b=!1,noResultsMessage:m,renderOption:d}=e;Object(n.useEffect)(()=>{if(c)return;const e=Object(l.a)(t),n=Object(l.b)(t);1===e?Object(r.speak)(Object(a.sprintf)( +/* translators: %d number of shipping options found. */ +Object(a._n)("%d shipping option was found.","%d shipping options were found.",n,"woo-gutenberg-products-block"),n)):Object(r.speak)(Object(a.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)( +/* translators: %d number of shipping options available. */ +Object(a._n)("%d shipping option was found","%d shipping options were found",n,"woo-gutenberg-products-block"),n))},[c,t]);const{extensions:g,receiveCart:O,...j}=Object(i.a)(),h={className:u,collapsible:b,noResultsMessage:m,renderOption:d,extensions:g,cart:j,components:{ShippingRatesControlPackage:N}},{isEditor:_}=Object(p.a)();return Object(n.createElement)(o.a,{isLoading:c,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},_?Object(n.createElement)(S,{packages:t,noResultsMessage:m,renderOption:d}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.ExperimentalOrderShippingPackages.Slot,h),Object(n.createElement)(s.ExperimentalOrderShippingPackages,null,Object(n.createElement)(S,{packages:t,noResultsMessage:m,renderOption:d}))))}},271:function(e,t){},272:function(e,t){},273:function(e,t){},274:function(e,t){},275:function(e,t){},276:function(e,t){},277:function(e,t){},278:function(e,t){},281:function(e,t,c){"use strict";var n=c(10),a=c.n(n),r=c(0),o=c(1),s=c(3),l=c(4),i=c.n(l),p=c(160),u=c(235),b=c(12),m=c(35),d=c(21);c(228);var g=Object(s.forwardRef)((e,t)=>{let{className:c,id:n,type:o="text",ariaLabel:s,ariaDescribedBy:l,label:p,screenReaderLabel:u,disabled:b,help:m,autoCapitalize:g="off",autoComplete:O="off",value:j="",onChange:h,required:_=!1,onBlur:E=(()=>{}),feedback:f,...k}=e;const[v,w]=Object(r.useState)(!1);return Object(r.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":v||j})},Object(r.createElement)("input",a()({type:o,id:n,value:j,ref:t,autoCapitalize:g,autoComplete:O,onChange:e=>{h(e.target.value)},onFocus:()=>w(!0),onBlur:e=>{E(e.target.value),w(!1)},"aria-label":s||p,disabled:b,"aria-describedby":m&&!l?n+"__help":l,required:_},k)),Object(r.createElement)(d.a,{label:p,screenReaderLabel:u||p,wrapperElement:"label",wrapperProps:{htmlFor:n},htmlFor:n}),!!m&&Object(r.createElement)("p",{id:n+"__help",className:"wc-block-components-text-input__help"},m),f)});t.a=Object(b.withInstanceId)(e=>{let{className:t,instanceId:c,id:n,ariaDescribedBy:l,errorId:b,focusOnMount:d=!1,onChange:O,showError:j=!0,errorMessage:h="",value:_="",...E}=e;const[f,k]=Object(s.useState)(!0),v=Object(s.useRef)(null),{getValidationError:w,hideValidationError:y,setValidationErrors:C,clearValidationError:N,getValidationErrorId:S}=Object(p.b)(),x=void 0!==n?n:"textinput-"+c,I=void 0!==b?b:x,R=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 c=t.checkValidity();c?N(I):C({[I]:{message:t.validationMessage||Object(o.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[N,I,C]);Object(s.useEffect)(()=>{var e;f&&d&&(null===(e=v.current)||void 0===e||e.focus()),k(!1)},[d,f,k]),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&&R(!0)},[_,R]),Object(s.useEffect)(()=>()=>{N(I)},[N,I]);const L=w(I)||{};Object(m.d)(h)&&""!==h&&(L.message=h);const P=L.message&&!L.hidden,T=j&&P&&S(I)?S(I):l;return Object(r.createElement)(g,a()({className:i()(t,{"has-error":P}),"aria-invalid":!0===P,id:x,onBlur:()=>{R(!1)},feedback:j&&Object(r.createElement)(u.a,{errorMessage:h,propertyName:I}),ref:v,onChange:e=>{y(I),O(e)},ariaDescribedBy:T,value:_},E))})},296:function(e,t,c){"use strict";var n=c(10),a=c.n(n),r=c(0),o=c(19),s=c(2);c(271),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const n=t.thumbnail?{src:t.thumbnail,alt:Object(o.decodeEntities)(t.alt)||c||"Product Image"}:{src:s.PLACEHOLDER_IMG_SRC,alt:""};return Object(r.createElement)("img",a()({className:"wc-block-components-product-image"},n,{alt:n.alt}))}},297:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(242);t.a=()=>Object(n.createElement)(r.a,{className:"wc-block-components-product-backorder-badge"},Object(a.__)("Available on backorder","woo-gutenberg-products-block"))},298:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(242);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(n.createElement)(r.a,{className:"wc-block-components-product-low-stock-badge"},Object(a.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(a.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},299:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));const n=e=>e.length,a=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},304:function(e,t,c){"use strict";var n=c(0),a=c(281),r=c(10),o=c.n(r),s=c(66),l=c(1),i=c(19),p=c(4),u=c.n(p),b=c(12),m=c(385),d=c(160),g=c(235),O=c(35);c(252);var j=Object(b.withInstanceId)(e=>{let{id:t,className:c,label:a,onChange:r,options:o,value:s,required:i=!1,errorMessage:p=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:b,instanceId:j="0",autoComplete:h="off"}=e;const{getValidationError:_,setValidationErrors:E,clearValidationError:f}=Object(d.b)(),k=Object(n.useRef)(null),v=t||"control-"+j,w=b||v,y=_(w)||{message:"",hidden:!1};return Object(n.useEffect)(()=>(!i||s?f(w):E({[w]:{message:p,hidden:!0}}),()=>{f(w)}),[f,s,w,p,i,E]),Object(n.createElement)("div",{id:v,className:u()("wc-block-components-combobox",c,{"is-active":s,"has-error":y.message&&!y.hidden}),ref:k},Object(n.createElement)(m.a,{className:"wc-block-components-combobox-control",label:a,onChange:r,onFilterValueChange:e=>{if(e.length){const t=Object(O.c)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(O.c)(k.current)&&k.current.contains(t))return;const c=e.toLocaleUpperCase(),n=o.find(e=>e.label.toLocaleUpperCase().startsWith(c)||e.value.toLocaleUpperCase()===c);n&&r(n.value)}},options:o,value:s||"",allowReset:!1,autoComplete:h,"aria-invalid":y.message&&!y.hidden}),Object(n.createElement)(g.a,{propertyName:w}))});c(251);var h=e=>{let{className:t,countries:c,id:a,label:r,onChange:o,value:s="",autoComplete:p="off",required:b=!1,errorId:m,errorMessage:d=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(n.useMemo)(()=>Object.entries(c).map(e=>{let[t,c]=e;return{value:t,label:Object(i.decodeEntities)(c)}}),[c]);return Object(n.createElement)("div",{className:u()(t,"wc-block-components-country-input")},Object(n.createElement)(j,{id:a,label:r,onChange:o,options:g,value:s,errorId:m,errorMessage:d,required:b,autoComplete:p}),"off"!==p&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:s,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),c=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);o(c?c.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},_=e=>Object(n.createElement)(h,o()({countries:s.g},e)),E=e=>Object(n.createElement)(h,o()({countries:s.a},e));c(253);const f=(e,t)=>{const c=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return c?c.value:""};var k=e=>{let{className:t,id:c,states:r,country:o,label:s,onChange:p,autoComplete:b="off",value:m="",required:d=!1}=e;const g=r[o],O=Object(n.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),h=Object(n.useCallback)(e=>{p(O.length>0?f(e,O):e)},[p,O]),_=Object(n.useRef)(m);return Object(n.useEffect)(()=>{_.current!==m&&(_.current=m)},[m]),Object(n.useEffect)(()=>{if(O.length>0&&_.current){const e=f(_.current,O);e!==_.current&&h(e)}},[O,h]),O.length>0?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(j,{className:u()(t,"wc-block-components-state-input"),id:c,label:s,onChange:h,options:O,value:m,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:d,autoComplete:b}),"off"!==b&&Object(n.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:b,value:m,onChange:e=>h(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(n.createElement)(a.a,{className:t,id:c,label:s,onChange:h,autoComplete:b,value:m,required:d})},v=e=>Object(n.createElement)(k,o()({states:s.h},e)),w=e=>Object(n.createElement)(k,o()({states:s.b},e)),y=c(17),C=c(2),N=c(50);t.a=Object(b.withInstanceId)(e=>{let{id:t="",fields:c=Object.keys(C.defaultAddressFields),fieldConfig:r={},instanceId:o,onChange:s,type:i="shipping",values:p}=e;const{getValidationError:u,setValidationErrors:b,clearValidationError:m}=Object(d.b)(),g=Object(y.a)(c),O=u("shipping-missing-country")||{},j=Object(n.useMemo)(()=>Object(N.a)(g,r,p.country),[g,r,p.country]);return Object(n.useEffect)(()=>{j.forEach(e=>{e.hidden&&p[e.key]&&s({...p,[e.key]:""})})},[j,s,p]),Object(n.useEffect)(()=>{"shipping"===i&&((e,t,c,n)=>{n||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),n&&e.country&&c("shipping-missing-country")})(p,b,m,!!O.message&&!O.hidden)},[p,O.message,O.hidden,b,m,i]),t=t||o,Object(n.createElement)("div",{id:t,className:"wc-block-components-address-form"},j.map(e=>{if(e.hidden)return null;if("country"===e.key){const c="shipping"===i?_:E;return Object(n.createElement)(c,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:p.country,autoComplete:e.autocomplete,onChange:e=>s({...p,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const c="shipping"===i?v:w;return Object(n.createElement)(c,{key:e.key,id:`${t}-${e.key}`,country:p.country,label:e.required?e.label:e.optionalLabel,value:p.state,autoComplete:e.autocomplete,onChange:e=>s({...p,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(n.createElement)(a.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:p[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>s({...p,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},307:function(e,t,c){"use strict";var n=c(0),a=c(5),r=c(19);c(274);var o=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(n.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(a.kebabCase)(t):"";return Object(n.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"wc-block-components-product-details__name"},Object(r.decodeEntities)(t),":")," "),Object(n.createElement)("span",{className:"wc-block-components-product-details__value"},Object(r.decodeEntities)(e.display||e.value)))}))):null},s=c(258),l=c(66),i=e=>{let{className:t,shortDescription:c="",fullDescription:a=""}=e;const r=c||a;return r?Object(n.createElement)(s.a,{className:t,source:r,maxLength:15,countType:l.n.wordCountType||"words"}):null};c(273),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:a=[],variation:r=[]}=e;return Object(n.createElement)("div",{className:"wc-block-components-product-metadata"},Object(n.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(n.createElement)(o,{details:a}),Object(n.createElement)(o,{details:r.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},336:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(129),o=c(168),s=c(13),l=c(2);c(275);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:p,removeCoupon:u,values:b}=e;const{total_discount:m,total_discount_tax:d}=b,g=parseInt(m,10);if(!g&&0===t.length)return null;const O=parseInt(d,10),j=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+O:g,h=Object(s.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(n.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==h.length&&Object(n.createElement)(r.a,{screenReaderLabel:Object(a.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:p,showSpinner:!1},Object(n.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},h.map(e=>Object(n.createElement)(o.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(a.sprintf)( +/* translators: %s Coupon code. */ +Object(a.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:p,onRemove:()=>{u(e.code)},radius:"large",ariaLabel:Object(a.sprintf)( +/* translators: %s is a coupon code. */ +Object(a.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:j?Object(a.__)("Discount","woo-gutenberg-products-block"):Object(a.__)("Coupons","woo-gutenberg-products-block"),value:j?-1*j:"-"})}},337:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(227),o=c(281),s=c(21),l=c(129),i=c(12),p=c(160),u=c(235),b=c(13);c(276),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:c=!1,initialOpen:i=!1,onSubmit:m=(()=>{})}=e;const[d,g]=Object(n.useState)(""),O=Object(n.useRef)(!1),{getValidationError:j,getValidationErrorId:h}=Object(p.b)(),_=j("coupon");Object(n.useEffect)(()=>{O.current!==c&&(c||!d||_||g(""),O.current=c)},[c,d,_]);const E="wc-block-components-totals-coupon__input-"+t;return Object(n.createElement)(b.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(n.createElement)(s.a,{label:Object(a.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(a.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:E})},Object(n.createElement)(l.a,{screenReaderLabel:Object(a.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:c,showSpinner:!1},Object(n.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(n.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(n.createElement)(o.a,{id:E,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(a.__)("Enter code","woo-gutenberg-products-block"),value:d,ariaDescribedBy:h(E),onChange:e=>{g(e)},focusOnMount:!0,showError:!1}),Object(n.createElement)(r.a,{className:"wc-block-components-totals-coupon__button",disabled:c||!d,showSpinner:c,onClick:e=>{e.preventDefault(),m(d)},type:"submit"},Object(a.__)("Apply","woo-gutenberg-products-block"))),Object(n.createElement)(u.a,{propertyName:"coupon",elementId:E}))))})},341:function(e,t,c){"use strict";var n=c(0),a=c(1),r=c(96),o=c(13),s=c(22),l=c(2);c(278),t.a=e=>{let{currency:t,values:c}=e;const i=Object(l.getSetting)("taxesEnabled",!0)&&Object(l.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:u}=c,{receiveCart:b,...m}=Object(s.a)(),d=Object(o.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(a.__)("Total","woo-gutenberg-products-block"),extensions:m.extensions,arg:{cart:m}}),g=parseInt(u,10);return Object(n.createElement)(o.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:d,value:parseInt(p,10),description:i&&0!==g&&Object(n.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(n.createInterpolateElement)(Object(a.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(n.createElement)(r.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},356:function(e,t){},357:function(e,t,c){"use strict";var n=c(10),a=c.n(n),r=c(0),o=c(4),s=c.n(o),l=c(1),i=c(22),p=c(13),u=c(2),b=c(19);const m=e=>{let{selectedShippingRates:t}=e;return Object(r.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(b.decodeEntities)(t.join(", ")))};var d=c(116),g=c(262),O=e=>{let{hasRates:t,shippingRates:c,shippingRatesLoading:n}=e;const a=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(r.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(r.createElement)("legend",{className:"screen-reader-text"},a),Object(r.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(r.createElement)(d.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:c,shippingRatesLoading:n}))},j=c(44),h=c(227),_=c(11),E=c.n(_),f=c(160),k=(c(250),c(304)),v=e=>{let{address:t,onUpdate:c,addressFields:n}=e;const[a,o]=Object(r.useState)(t),{hasValidationErrors:s,showAllValidationErrors:i}=Object(f.b)();return Object(r.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(r.createElement)(k.a,{fields:n,onChange:o,values:a}),Object(r.createElement)(h.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:E()(a,t),onClick:e=>{if(e.preventDefault(),i(),!s)return c(a)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},w=e=>{let{onUpdate:t=(()=>{}),addressFields:c=["country","state","city","postcode"]}=e;const{shippingAddress:n,setShippingAddress:a}=Object(j.b)();return Object(r.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(r.createElement)(v,{address:n,addressFields:c,onUpdate:e=>{a(e),t(e)}}))},y=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const c=Object(u.getSetting)("shippingCountries",{}),n=Object(u.getSetting)("shippingStates",{}),a="string"==typeof c[t.country]?Object(b.decodeEntities)(c[t.country]):"",o="object"==typeof n[t.country]&&"string"==typeof n[t.country][t.state]?Object(b.decodeEntities)(n[t.country][t.state]):t.state,s=[];s.push(t.postcode.toUpperCase()),s.push(t.city),s.push(o),s.push(a);const i=s.filter(Boolean).join(", ");return i?Object(r.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)( +/* translators: %s location. */ +Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" "):null};c(277);const C=e=>{let{label:t=Object(l.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n}=e;return Object(r.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{n(!c)},"aria-expanded":c},t)},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n,shippingAddress:a}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(y,{address:a}),t&&Object(r.createElement)(C,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n}))},S=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n,isCheckout:a=!1}=e;return t?Object(r.createElement)(C,{isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:n}):Object(r.createElement)("em",null,a?Object(l.__)("No shipping options available","woo-gutenberg-products-block"):Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:c,showCalculator:n=!0,showRateSelector:o=!0,isCheckout:b=!1,className:d}=e;const[g,j]=Object(r.useState)(!1),{shippingAddress:h,cartHasCalculatedShipping:_,shippingRates:E,shippingRatesLoading:f}=Object(i.a)(),k=Object(u.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_shipping,10)+parseInt(c.total_shipping_tax,10):parseInt(c.total_shipping,10),v=E.some(e=>e.shipping_rates.length)||k,y={isShippingCalculatorOpen:g,setIsShippingCalculatorOpen:j},C=E.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(r.createElement)("div",{className:s()("wc-block-components-totals-shipping",d)},Object(r.createElement)(p.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:v&&_?k:Object(r.createElement)(S,a()({showCalculator:n,isCheckout:b},y)),description:v&&_?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(m,{selectedShippingRates:C}),Object(r.createElement)(N,a()({shippingAddress:h,showCalculator:n},y))):null,currency:t}),n&&g&&Object(r.createElement)(w,{onUpdate:()=>{j(!1)}}),o&&_&&Object(r.createElement)(O,{hasRates:v,shippingRates:E,shippingRatesLoading:f}))}},394:function(e,t,c){"use strict";c.r(t);var n=c(0),a=c(1),r=c(212),o=c(13),s=c(4),l=c.n(s),i=c(21),p=c(245),u=c(247),b=c(40),m=c(295),d=c(2),g=c(22),O=c(35),j=c(297),h=c(296),_=c(298),E=c(307);const f=e=>Object(o.mustContain)(e,"");var k=e=>{let{cartItem:t}=e;const{images:c,low_stock_remaining:r,show_backorder_badge:s,name:k,permalink:v,prices:w,quantity:y,short_description:C,description:N,item_data:S,variation:x,totals:I,extensions:R}=t,{receiveCart:L,...P}=Object(g.a)(),T=Object(n.useMemo)(()=>({context:"summary",cartItem:t,cart:P}),[t,P]),M=Object(b.getCurrencyFromPriceResponse)(w),F=Object(o.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:k,extensions:R,arg:T}),$=Object(m.a)({amount:parseInt(w.raw_prices.regular_price,10),precision:Object(O.d)(w.raw_prices.precision)?parseInt(w.raw_prices.precision,10):w.raw_prices.precision}).convertPrecision(M.minorUnit).getAmount(),A=Object(m.a)({amount:parseInt(w.raw_prices.price,10),precision:Object(O.d)(w.raw_prices.precision)?parseInt(w.raw_prices.precision,10):w.raw_prices.precision}).convertPrecision(M.minorUnit).getAmount(),D=Object(b.getCurrencyFromPriceResponse)(I);let V=parseInt(I.line_subtotal,10);Object(d.getSetting)("displayCartPricesIncludingTax",!1)&&(V+=parseInt(I.line_subtotal_tax,10));const U=Object(m.a)({amount:V,precision:D.minorUnit}).getAmount(),q=Object(o.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:R,arg:T,validation:f}),B=Object(o.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:R,arg:T,validation:f}),W=Object(o.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:R,arg:T});return Object(n.createElement)("div",{className:l()("wc-block-components-order-summary-item",W)},Object(n.createElement)("div",{className:"wc-block-components-order-summary-item__image"},Object(n.createElement)("div",{className:"wc-block-components-order-summary-item__quantity"},Object(n.createElement)(i.a,{label:y.toString(),screenReaderLabel:Object(a.sprintf)( +/* translators: %d number of products of the same type in the cart */ +Object(a._n)("%d item","%d items",y,"woo-gutenberg-products-block"),y)})),Object(n.createElement)(h.a,{image:c.length?c[0]:{},fallbackAlt:F})),Object(n.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(n.createElement)(u.a,{disabled:!0,name:F,permalink:v}),Object(n.createElement)(p.a,{currency:M,price:A,regularPrice:$,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:q}),s?Object(n.createElement)(j.a,null):!!r&&Object(n.createElement)(_.a,{lowStockRemaining:r}),Object(n.createElement)(E.a,{shortDescription:C,fullDescription:N,itemData:S,variation:x})),Object(n.createElement)("span",{className:"screen-reader-text"},Object(a.sprintf)( +/* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */ +Object(a._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",y,"woo-gutenberg-products-block"),y,F,Object(b.formatPrice)(U,D))),Object(n.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},Object(n.createElement)(p.a,{currency:D,format:B,price:U})))};c(356);var v=e=>{let{cartItems:t=[]}=e;const{isLarge:c,hasContainerWidth:s}=Object(r.b)();return s?Object(n.createElement)(o.Panel,{className:"wc-block-components-order-summary",initialOpen:c,hasBorder:!1,title:Object(n.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(a.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(n.createElement)("div",{className:"wc-block-components-order-summary__content"},t.map(e=>Object(n.createElement)(k,{key:e.key,cartItem:e})))):null},w=c(336),y=c(337),C=c(357),N=c(341),S=c(44),x=c(240);t.default=e=>{let{showRateAfterTaxName:t=!1,className:c}=e;const{cartItems:a,cartTotals:r,cartCoupons:s,cartFees:l}=Object(g.a)(),{applyCoupon:i,removeCoupon:p,isApplyingCoupon:u,isRemovingCoupon:m}=Object(x.a)(),{needsShipping:O}=Object(S.b)(),j=Object(b.getCurrencyFromPriceResponse)(r),{extensions:h,receiveCart:_,...E}=Object(g.a)(),f={extensions:h,cart:E};return Object(n.createElement)("div",{className:c},Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(v,{cartItems:a})),Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(o.Subtotal,{currency:j,values:r}),Object(n.createElement)(o.TotalsFees,{currency:j,cartFees:l}),Object(n.createElement)(w.a,{cartCoupons:s,currency:j,isRemovingCoupon:m,removeCoupon:p,values:r})),Object(d.getSetting)("couponsEnabled",!0)&&Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(y.a,{onSubmit:i,initialOpen:!1,isLoading:u})),O&&Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(C.a,{isCheckout:!0,showCalculator:!1,showRateSelector:!1,values:r,currency:j})),Object(n.createElement)(o.ExperimentalDiscountsMeta.Slot,f),!Object(d.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(r.total_tax,10)>0&&Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(o.TotalsTaxes,{currency:j,showRateAfterTaxName:t,values:r})),Object(n.createElement)(o.TotalsWrapper,null,Object(n.createElement)(N.a,{currency:j,values:r})),Object(n.createElement)(o.ExperimentalOrderMeta.Slot,f))}},96:function(e,t,c){"use strict";var n=c(10),a=c.n(n),r=c(0),o=c(131),s=c(4),l=c.n(s);c(159);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:n,onValueChange:s,displayType:p="text",...u}=e;const b="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(b))return null;const m=b/10**n.minorUnit;if(!Number.isFinite(m))return null;const d=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...u,...i(n),value:void 0,currency:void 0,onValueChange:void 0},O=s?e=>{const t=+e.value*10**n.minorUnit;s(t)}:()=>{};return Object(r.createElement)(o.a,a()({className:d,displayType:p},g,{value:m,onValueChange:O}))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/payment-frontend.js b/build/checkout-blocks/payment-frontend.js new file mode 100644 index 00000000000..7a2ada7846e --- /dev/null +++ b/build/checkout-blocks/payment-frontend.js @@ -0,0 +1,9 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[38],{129:function(e,t,c){"use strict";var n=c(0),o=c(1),a=(c(8),c(4)),s=c.n(a),r=(c(161),c(130));t.a=e=>{let{children:t,className:c,screenReaderLabel:a,showSpinner:l=!1,isLoading:i=!0}=e;return Object(n.createElement)("div",{className:s()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(n.createElement)(r.a,null),Object(n.createElement)("div",{className:s()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(n.createElement)("span",{className:"screen-reader-text"},a||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},130:function(e,t,c){"use strict";var n=c(0);c(157),t.a=()=>Object(n.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},157:function(e,t){},161:function(e,t){},21:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:s,wrapperProps:r={}}=e;const l=null!=c,i=null!=o;return!l&&i?(t=s||"span",r={...r,className:a()(r.className,"screen-reader-text")},Object(n.createElement)(t,r,o)):(t=s||n.Fragment,l&&i&&c!==o?Object(n.createElement)(t,r,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,r,c))}},221:function(e,t){},222:function(e,t,c){"use strict";var n=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:o,secondaryDescription:a,id:s}=e;return Object(n.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(n.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(n.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(n.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(n.createElement)("div",{className:"wc-block-components-radio-control__description-group"},o&&Object(n.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},o),a&&Object(n.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},a)))}},224:function(e,t,c){"use strict";var n=c(10),o=c.n(n),a=c(0),s=c(4),r=c.n(s);c(8),c(225),t.a=e=>{let{children:t,className:c,headingLevel:n,...s}=e;const l=r()("wc-block-components-title",c),i="h"+n;return Object(a.createElement)(i,o()({className:l},s),t)}},225:function(e,t){},226:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o),s=c(222);t.a=e=>{let{checked:t,name:c,onChange:o,option:r}=e;const{value:l,label:i,description:d,secondaryLabel:p,secondaryDescription:m}=r;return Object(n.createElement)("label",{className:a()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(n.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>o(e.target.value),checked:t,"aria-describedby":a()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:p,[`${c}-${l}__description`]:d,[`${c}-${l}__secondary-description`]:m})}),Object(n.createElement)(s.a,{id:`${c}-${l}`,label:i,secondaryLabel:p,description:d,secondaryDescription:m}))}},232:function(e,t){},233:function(e,t,c){"use strict";var n=c(1);t.a=e=>{let{defaultTitle:t=Object(n.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(n.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:o=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:o}}}},235:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(0),o=(c(8),c(160));c(221);const a=e=>{let{errorMessage:t="",propertyName:c="",elementId:a=""}=e;const{getValidationError:s,getValidationErrorId:r}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(n.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(n.createElement)("p",{id:r(a)},t))}},236:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o),s=c(12),r=c(226);c(237),t.a=Object(s.withInstanceId)(e=>{let{className:t="",instanceId:c,id:o,selected:s,onChange:l=(()=>{}),options:i=[]}=e;const d=o||c;return i.length&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},i.map(e=>Object(n.createElement)(r.a,{key:`${d}-${e.value}`,name:"radio-control-"+d,checked:e.value===s,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},237:function(e,t){},238:function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return r}));var n=c(17),o=c(204);const a=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:a,expressPaymentMethodsInitialized:s}=Object(o.b)(),r=Object(n.a)(t),l=Object(n.a)(c);return{paymentMethods:e?l:r,isInitialized:e?s:a}},s=()=>a(!1),r=()=>a(!0)},239:function(e,t){},240:function(e,t,c){"use strict";c.d(t,"a",(function(){return m}));var n=c(1),o=c(9),a=c(6),s=c(19),r=c(22),l=c(0),i=c(211),d=c(160),p=c(32);const m=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(r.a)(),{addErrorNotice:c}=Object(p.a)(),{addSnackbarNotice:m}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:n}=Object(i.b)(),o=Object(l.useRef)(e);Object(l.useEffect)(()=>{o.current=e},[e]);const a=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),s=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...a,...s,setIsSuppressed:n}})(),{setValidationErrors:b}=Object(d.b)();return{appliedCoupons:e,isLoading:t,...Object(o.useSelect)((e,t)=>{let{dispatch:o}=t;const r=e(a.CART_STORE_KEY),l=r.isApplyingCoupon(),i=r.isRemovingCoupon(),{applyCoupon:d,removeCoupon:p,receiveApplyingCoupon:u}=o(a.CART_STORE_KEY);return{applyCoupon:e=>{d(e).then(t=>{!0===t&&m(Object(n.sprintf)( +/* translators: %s coupon code. */ +Object(n.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{b({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),u("")})},removeCoupon:e=>{p(e).then(t=>{!0===t&&m(Object(n.sprintf)( +/* translators: %s coupon code. */ +Object(n.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{c(e.message,{id:"coupon-form"}),u("")})},isApplyingCoupon:l,isRemovingCoupon:i}},[c,m])}}},243:function(e,t,c){"use strict";var n=c(10),o=c.n(n),a=c(0),s=c(4),r=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:n=""}=e;return c?Object(a.createElement)("img",{className:l(t),src:c,alt:n}):null},d=c(66);const p=[{id:"alipay",alt:"Alipay",src:d.l+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:d.l+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:d.l+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:d.l+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:d.l+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:d.l+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:d.l+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:d.l+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:d.l+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:d.l+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:d.l+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:d.l+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:d.l+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:d.l+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:d.l+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:d.l+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:d.l+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:d.l+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:d.l+"payment-methods/wechat.svg"}];var m=c(35);c(239),t.a=e=>{let{icons:t=[],align:c="center",className:n}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(m.d)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=r()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},n);return Object(a.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,p.find(e=>e.id===c)||{})};var c;return Object(a.createElement)(i,o()({key:"payment-method-icon-"+e.id},t))}))}},255:function(e,t){},256:function(e,t,c){"use strict";var n=c(15),o=c.n(n),a=c(0),s=c(1),r=c(3),l=(c(8),c(2)),i=c(92);class d extends r.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const n=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(a.createElement)(i.StoreNoticesContainer,{notices:n})}return this.props.children}}d.defaultProps={isEditor:!1},t.a=d},261:function(e,t,c){"use strict";var n=c(0),o=c(4),a=c.n(o),s=c(224);c(232);const r=e=>{let{title:t,stepHeadingContent:c}=e;return Object(n.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(n.createElement)(s.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(n.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};t.a=e=>{let{id:t,className:c,title:o,legend:s,description:l,children:i,disabled:d=!1,showStepNumber:p=!0,stepHeadingContent:m=(()=>{})}=e;const b=s||o?"fieldset":"div";return Object(n.createElement)(b,{className:a()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":p,"wc-block-components-checkout-step--disabled":d}),id:t,disabled:d},!(!s&&!o)&&Object(n.createElement)("legend",{className:"screen-reader-text"},s||o),!!o&&Object(n.createElement)(r,{title:o,stepHeadingContent:m()}),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!l&&Object(n.createElement)("p",{className:"wc-block-components-checkout-step__description"},l),Object(n.createElement)("div",{className:"wc-block-components-checkout-step__content"},i)))}},294:function(e,t,c){"use strict";var n=c(7),o=c(0),a=c(4),s=c.n(a),r=c(12),l=c(46);t.a=function({icon:e,children:t,label:c,instructions:a,className:i,notices:d,preview:p,isColumnLayout:m,...b}){const[u,{width:h}]=Object(r.useResizeObserver)();let g;"number"==typeof h&&(g={"is-large":h>=480,"is-medium":h>=160&&h<480,"is-small":h<160});const O=s()("components-placeholder",i,g),j=s()("components-placeholder__fieldset",{"is-column-layout":m});return Object(o.createElement)("div",Object(n.a)({},b,{className:O}),u,d,p&&Object(o.createElement)("div",{className:"components-placeholder__preview"},p),Object(o.createElement)("div",{className:"components-placeholder__label"},Object(o.createElement)(l.a,{icon:e}),c),!!a&&Object(o.createElement)("div",{className:"components-placeholder__instructions"},a),Object(o.createElement)("div",{className:j},t))}},300:function(e,t,c){"use strict";var n=c(0),o=c(24);const a=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=a},305:function(e,t,c){"use strict";c.d(t,"a",(function(){return x}));var n=c(1),o=c(40),a=c(0),s=c(4),r=c.n(s),l=c(24),i=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(a.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),d=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(a.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"})),p=c(300),m=Object(a.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(a.createElement)("path",{d:"M0 0h24v24H0z"}),Object(a.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(a.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),b=c(98),u=c(35);c(255);const h={bank:i,bill:d,card:p.a,checkPayment:m};var g=e=>{let{icon:t="",text:c=""}=e;const n=!!t,o=Object(a.useCallback)(e=>n&&Object(u.d)(e)&&Object(u.e)(h,e),[n]),s=r()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":n});return Object(a.createElement)("span",{className:s},o(t)?Object(a.createElement)(b.a,{srcElement:h[t]}):t,c)},O=c(243),j=c(2),v=c(30),y=c.n(v),k=c(129),E=c(235),_=c(22),w=c(240),f=c(29),S=c(31),N=c(204),C=c(44),P=c(33);const M=(e,t)=>{const c=[],o=(t,c)=>{const n=c+"_tax",o=Object(u.e)(e,c)&&Object(u.d)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(u.e)(e,n)&&Object(u.d)(e[n])?parseInt(e[n],10):0)}};return c.push(o(Object(n.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(n.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(n.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(n.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(n.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},x=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:d,onSubmit:p,customerId:m}=Object(S.b)(),{currentStatus:b,activePaymentMethod:u,onPaymentProcessing:h,setExpressPaymentError:v,shouldSavePayment:x}=Object(N.b)(),{shippingErrorStatus:R,shippingErrorTypes:I,shippingRates:T,shippingRatesLoading:z,selectedRates:A,setSelectedRates:V,isSelectingRate:L,onShippingRateSuccess:H,onShippingRateFail:$,onShippingRateSelectSuccess:D,onShippingRateSelectFail:F,needsShipping:B}=Object(C.b)(),{billingData:W,shippingAddress:Y,setShippingAddress:G}=Object(P.b)(),{cartItems:U,cartFees:J,cartTotals:K,extensions:q}=Object(_.a)(),{appliedCoupons:Q}=Object(w.a)(),{noticeContexts:X,responseTypes:Z}=Object(f.c)(),ee=Object(a.useRef)(M(K,B)),te=Object(a.useRef)({label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(K.total_price,10)});Object(a.useEffect)(()=>{ee.current=M(K,B),te.current={label:Object(n.__)("Total","woo-gutenberg-products-block"),value:parseInt(K.total_price,10)}},[K,B]);const ce=Object(a.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";y()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),v(e)}),[v]);return{activePaymentMethod:u,billing:{appliedCoupons:Q,billingData:W,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(o.getCurrencyFromPriceResponse)(K),customerId:m,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:U,cartFees:J,extensions:q},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{LoadingMask:k.a,PaymentMethodIcons:O.a,PaymentMethodLabel:g,ValidationInputError:E.a},emitResponse:{noticeContexts:X,responseTypes:Z},eventRegistration:{onCheckoutAfterProcessingWithError:d,onCheckoutAfterProcessingWithSuccess:i,onCheckoutBeforeProcessing:r,onCheckoutValidationBeforeProcessing:l,onPaymentProcessing:h,onShippingRateFail:$,onShippingRateSelectFail:F,onShippingRateSelectSuccess:D,onShippingRateSuccess:H},onSubmit:p,paymentStatus:b,setExpressPaymentError:ce,shippingData:{isSelectingRate:L,needsShipping:B,selectedRates:A,setSelectedRates:V,setShippingAddress:G,shippingAddress:Y,shippingRates:T,shippingRatesLoading:z},shippingStatus:{shippingErrorStatus:R,shippingErrorTypes:I},shouldSavePayment:x}}},348:function(e,t){},384:function(e,t,c){"use strict";c.r(t);var n=c(0),o=c(4),a=c.n(o),s=c(22),r=c(29),l=c(110),i=c(261),d=c(31),p=c(87),m=c(238),b=c(1),u=c(21),h=c(204),g=c(294),O=c(56),j=c(116),v=c(98),y=c(300),k=c(2),E=c(18);c(348);const _=()=>Object(n.createElement)(g.a,{icon:Object(n.createElement)(v.a,{srcElement:y.a}),label:Object(b.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(n.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(b.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method (e.g. Stripe) it will be shown here.","woo-gutenberg-products-block")),Object(n.createElement)(O.a,{isSecondary:!0,href:k.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer"},Object(b.__)("Configure Payment Methods","woo-gutenberg-products-block"))),w=()=>Object(n.createElement)(j.a,{isDismissible:!1,className:a()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(b.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woo-gutenberg-products-block"));var f=()=>{const{isEditor:e}=Object(E.a)();return e?Object(n.createElement)(_,null):Object(n.createElement)(w,null)},S=c(305),N=c(32),C=c(38),P=c(12),M=c(226),x=Object(P.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:s,onChange:r,options:l=[]}=e;const i=o||c;return l.length&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control",t)},l.map(e=>{const t="object"==typeof e&&"content"in e,c=e.value===s;return Object(n.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(n.createElement)(M.a,{name:"radio-control-"+i,checked:c,option:e,onChange:t=>{r(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&Object(n.createElement)("div",{className:a()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))}))}),R=c(13),I=(c(8),c(256)),T=e=>{let{children:t,showSaveOption:c}=e;const{isEditor:o}=Object(E.a)(),{shouldSavePayment:a,setShouldSavePayment:s}=Object(h.b)(),{customerId:r}=Object(d.b)();return Object(n.createElement)(I.a,{isEditor:o},t,r>0&&c&&Object(n.createElement)(R.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(b.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:a,onChange:()=>s(!a)}))},z=()=>{const{setActivePaymentMethod:e,activeSavedToken:t,isExpressPaymentMethodActive:c,customerPaymentMethods:o}=Object(h.b)(),{paymentMethods:s}=Object(m.b)(),{activePaymentMethod:l,...i}=Object(S.a)(),{noticeContexts:d}=Object(r.c)(),{removeNotice:p}=Object(N.a)(),{dispatchCheckoutEvent:b}=Object(C.a)(),{isEditor:u}=Object(E.a)(),g=Object.keys(s).map(e=>{const{edit:t,content:c,label:o,supports:a}=s[e],r=u?t:c;return{value:e,label:"string"==typeof o?o:Object(n.cloneElement)(o,{components:i.components}),name:"wc-saved-payment-method-token-"+e,content:Object(n.createElement)(T,{showSaveOption:a.showSaveOption},Object(n.cloneElement)(r,{activePaymentMethod:l,...i}))}}),O=Object(n.useCallback)(t=>{e(t),p("wc-payment-error",d.PAYMENTS),b("set-active-payment-method",{value:t})},[b,d.PAYMENTS,p,e]),j=0===Object.keys(o).length&&1===Object.keys(s).length,v=a()({"disable-radio-control":j});return c?null:Object(n.createElement)(x,{id:"wc-payment-method-options",className:v,selected:t?null:l,onChange:O,options:g})},A=c(236);const V=e=>{let{method:t,expires:c}=e;return Object(b.sprintf)( +/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ +Object(b.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-products-block"),t.brand,t.last4,c)},L=e=>{let{method:t}=e;return Object(b.sprintf)( +/* translators: %s is the name of the payment method gateway. */ +Object(b.__)("Saved token for %s","woo-gutenberg-products-block"),t.gateway)};var H=()=>{var e,t;const{customerPaymentMethods:c,activePaymentMethod:o,setActivePaymentMethod:a,activeSavedToken:s}=Object(h.b)(),{paymentMethods:l}=Object(m.b)(),i=Object(S.a)(),{noticeContexts:d}=Object(r.c)(),{removeNotice:p}=Object(N.a)(),{dispatchCheckoutEvent:b}=Object(C.a)(),u=Object(n.useMemo)(()=>Object.keys(c).flatMap(e=>c[e].map(t=>{const c="cc"===e||"echeck"===e,n=t.method.gateway;return{name:"wc-saved-payment-method-token-"+n,label:c?V(t):L(t),value:t.tokenId.toString(),onChange:e=>{a(n,{token:e,payment_method:n,[`wc-${n}-payment-token`]:e.toString(),isSavedToken:!0}),p("wc-payment-error",d.PAYMENTS),b("set-active-payment-method",{paymentMethodSlug:n})}}})).filter(Boolean),[c,a,p,d.PAYMENTS,b]),g=s&&l[o]&&null!==(e=l[o])&&void 0!==e&&e.savedTokenComponent?Object(n.cloneElement)(null===(t=l[o])||void 0===t?void 0:t.savedTokenComponent,{token:s,...i}):null;return u.length>0?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(A.a,{id:"wc-payment-method-saved-tokens",selected:s,options:u}),g):null},$=()=>{const{isInitialized:e,paymentMethods:t}=Object(m.b)(),{customerPaymentMethods:c}=Object(h.b)();return e&&0===Object.keys(t).length?Object(n.createElement)(f,null):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(H,null),Object.keys(c).length>0&&Object(n.createElement)(u.a,{label:Object(b.__)("Use another payment method.","woo-gutenberg-products-block"),screenReaderLabel:Object(b.__)("Other available payment methods","woo-gutenberg-products-block"),wrapperElement:"p",wrapperProps:{className:["wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned"]}}),Object(n.createElement)(z,null))},D=()=>{const{noticeContexts:e}=Object(r.c)();return Object(n.createElement)(p.a,{context:e.PAYMENTS},Object(n.createElement)($,null))},F=c(233),B={...Object(F.a)({defaultTitle:Object(b.__)("Payment options","woo-gutenberg-products-block"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};t.default=Object(l.withFilteredAttributes)(B)(e=>{let{title:t,description:c,showStepNumber:o,children:l,className:m}=e;const{isProcessing:b}=Object(d.b)(),{cartNeedsPayment:u}=Object(s.a)(),{noticeContexts:h}=Object(r.c)();return u?Object(n.createElement)(i.a,{id:"payment-method",disabled:b,className:a()("wc-block-checkout__payment-method",m),title:t,description:c,showStepNumber:o},Object(n.createElement)(p.a,{context:h.PAYMENTS},Object(n.createElement)(D,null)),l):null})},92:function(e,t,c){}}]); \ No newline at end of file diff --git a/build/checkout-blocks/shipping-address-frontend.js b/build/checkout-blocks/shipping-address-frontend.js new file mode 100644 index 00000000000..de0beb5260a --- /dev/null +++ b/build/checkout-blocks/shipping-address-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[39],{391:function(e,t,i){"use strict";i.r(t);var s=i(0),n=i(4),o=i.n(n),l=i(110),c=i(261),d=i(31),r=i(301),a=i(1),p=i(304),h=i(38),b=i(18),u=i(13),g=i(302),m=i(303),w=e=>{let{showCompanyField:t=!1,showApartmentField:i=!1,showPhoneField:n=!1,requireCompanyField:o=!1,requirePhoneField:l=!1}=e;const{defaultAddressFields:c,setShippingFields:d,shippingFields:w,setShippingAsBilling:j,shippingAsBilling:F,setShippingPhone:O}=Object(r.a)(),{dispatchCheckoutEvent:f}=Object(h.a)(),{isEditor:k}=Object(b.a)();Object(s.useEffect)(()=>{n||O("")},[n,O]);const y=Object(s.useMemo)(()=>({company:{hidden:!t,required:o},address_2:{hidden:!i}}),[t,o,i]),C=k?g.a:s.Fragment;return Object(s.createElement)(s.Fragment,null,Object(s.createElement)(C,null,Object(s.createElement)(p.a,{id:"shipping",type:"shipping",onChange:e=>{d(e),f("set-shipping-address")},values:w,fields:Object.keys(c),fieldConfig:y}),n&&Object(s.createElement)(m.a,{id:"shipping-phone",isRequired:l,value:w.phone,onChange:e=>{O(e),f("set-phone-number",{step:"shipping"})}})),Object(s.createElement)(u.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:Object(a.__)("Use same address for billing","woo-gutenberg-products-block"),checked:F,onChange:e=>j(e)}))},j=i(233),F={...Object(j.a)({defaultTitle:Object(a.__)("Shipping address","woo-gutenberg-products-block"),defaultDescription:Object(a.__)("Enter the address where you want your order delivered.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},O=i(132);t.default=Object(l.withFilteredAttributes)(F)(e=>{let{title:t,description:i,showStepNumber:n,children:l,className:a}=e;const{isProcessing:p}=Object(d.b)(),{showShippingFields:h}=Object(r.a)(),{requireCompanyField:b,requirePhoneField:u,showApartmentField:g,showCompanyField:m,showPhoneField:j}=Object(O.b)();return h?Object(s.createElement)(c.a,{id:"shipping-fields",disabled:p,className:o()("wc-block-checkout__shipping-fields",a),title:t,description:i,showStepNumber:n},Object(s.createElement)(w,{requireCompanyField:b,requirePhoneField:u,showApartmentField:g,showCompanyField:m,showPhoneField:j}),l):null})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/shipping-methods-frontend.js b/build/checkout-blocks/shipping-methods-frontend.js new file mode 100644 index 00000000000..1f795e1a762 --- /dev/null +++ b/build/checkout-blocks/shipping-methods-frontend.js @@ -0,0 +1,9 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[40],{129:function(e,t,n){"use strict";var c=n(0),a=n(1),s=(n(8),n(4)),o=n.n(s),i=(n(161),n(130));t.a=e=>{let{children:t,className:n,screenReaderLabel:s,showSpinner:l=!1,isLoading:r=!0}=e;return Object(c.createElement)("div",{className:o()(n,{"wc-block-components-loading-mask":r})},r&&l&&Object(c.createElement)(i.a,null),Object(c.createElement)("div",{className:o()({"wc-block-components-loading-mask__children":r}),"aria-hidden":r},t),r&&Object(c.createElement)("span",{className:"screen-reader-text"},s||Object(a.__)("Loading…","woo-gutenberg-products-block")))}},130:function(e,t,n){"use strict";var c=n(0);n(157),t.a=()=>Object(c.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},157:function(e,t){},159:function(e,t){},161:function(e,t){},21:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a);t.a=e=>{let t,{label:n,screenReaderLabel:a,wrapperElement:o,wrapperProps:i={}}=e;const l=null!=n,r=null!=a;return!l&&r?(t=o||"span",i={...i,className:s()(i.className,"screen-reader-text")},Object(c.createElement)(t,i,a)):(t=o||c.Fragment,l&&r&&n!==a?Object(c.createElement)(t,i,Object(c.createElement)("span",{"aria-hidden":"true"},n),Object(c.createElement)("span",{className:"screen-reader-text"},a)):Object(c.createElement)(t,i,n))}},222:function(e,t,n){"use strict";var c=n(0);t.a=e=>{let{label:t,secondaryLabel:n,description:a,secondaryDescription:s,id:o}=e;return Object(c.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(c.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(c.createElement)("span",{id:o&&o+"__label",className:"wc-block-components-radio-control__label"},t),n&&Object(c.createElement)("span",{id:o&&o+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},n)),Object(c.createElement)("div",{className:"wc-block-components-radio-control__description-group"},a&&Object(c.createElement)("span",{id:o&&o+"__description",className:"wc-block-components-radio-control__description"},a),s&&Object(c.createElement)("span",{id:o&&o+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},s)))}},224:function(e,t,n){"use strict";var c=n(10),a=n.n(c),s=n(0),o=n(4),i=n.n(o);n(8),n(225),t.a=e=>{let{children:t,className:n,headingLevel:c,...o}=e;const l=i()("wc-block-components-title",n),r="h"+c;return Object(s.createElement)(r,a()({className:l},o),t)}},225:function(e,t){},226:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a),o=n(222);t.a=e=>{let{checked:t,name:n,onChange:a,option:i}=e;const{value:l,label:r,description:p,secondaryLabel:d,secondaryDescription:b}=i;return Object(c.createElement)("label",{className:s()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${n}-${l}`},Object(c.createElement)("input",{id:`${n}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:n,value:l,onChange:e=>a(e.target.value),checked:t,"aria-describedby":s()({[`${n}-${l}__label`]:r,[`${n}-${l}__secondary-label`]:d,[`${n}-${l}__description`]:p,[`${n}-${l}__secondary-description`]:b})}),Object(c.createElement)(o.a,{id:`${n}-${l}`,label:r,secondaryLabel:d,description:p,secondaryDescription:b}))}},232:function(e,t){},233:function(e,t,n){"use strict";var c=n(1);t.a=e=>{let{defaultTitle:t=Object(c.__)("Step","woo-gutenberg-products-block"),defaultDescription:n=Object(c.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:a=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:n},showStepNumber:{type:"boolean",default:a}}}},236:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a),o=n(12),i=n(226);n(237),t.a=Object(o.withInstanceId)(e=>{let{className:t="",instanceId:n,id:a,selected:o,onChange:l=(()=>{}),options:r=[]}=e;const p=a||n;return r.length&&Object(c.createElement)("div",{className:s()("wc-block-components-radio-control",t)},r.map(e=>Object(c.createElement)(i.a,{key:`${p}-${e.value}`,name:"radio-control-"+p,checked:e.value===o,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},237:function(e,t){},254:function(e,t){},261:function(e,t,n){"use strict";var c=n(0),a=n(4),s=n.n(a),o=n(224);n(232);const i=e=>{let{title:t,stepHeadingContent:n}=e;return Object(c.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(c.createElement)(o.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!n&&Object(c.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},n))};t.a=e=>{let{id:t,className:n,title:a,legend:o,description:l,children:r,disabled:p=!1,showStepNumber:d=!0,stepHeadingContent:b=(()=>{})}=e;const u=o||a?"fieldset":"div";return Object(c.createElement)(u,{className:s()(n,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":d,"wc-block-components-checkout-step--disabled":p}),id:t,disabled:p},!(!o&&!a)&&Object(c.createElement)("legend",{className:"screen-reader-text"},o||a),!!a&&Object(c.createElement)(i,{title:a,stepHeadingContent:b()}),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!l&&Object(c.createElement)("p",{className:"wc-block-components-checkout-step__description"},l),Object(c.createElement)("div",{className:"wc-block-components-checkout-step__content"},r)))}},262:function(e,t,n){"use strict";var c=n(0),a=n(1),s=n(23),o=n(129),i=n(13),l=n(299),r=n(22),p=n(18),d=n(4),b=n.n(d),u=n(19),m=n(21),g=n(11),h=n.n(g),O=n(99),j=n(38);const _=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var k=n(236),f=n(222),w=n(40),E=n(96),v=n(2);const N=e=>{const t=Object(v.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(u.decodeEntities)(e.name),value:e.rate_id,description:Object(c.createElement)(c.Fragment,null,Number.isFinite(t)&&Object(c.createElement)(E.a,{currency:Object(w.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(u.decodeEntities)(e.delivery_time))}};var y=e=>{let{className:t,noResultsMessage:n,onSelectRate:a,rates:s,renderOption:o=N,selected:i}=e;if(0===s.length)return n;if(s.length>1)return Object(c.createElement)(k.a,{className:t,onChange:e=>{a(e)},selected:i,options:s.map(o)});const{label:l,secondaryLabel:r,description:p,secondaryDescription:d}=o(s[0]);return Object(c.createElement)(f.a,{label:l,secondaryLabel:r,description:p,secondaryDescription:d})};n(254);var S=e=>{let{packageId:t,className:n,noResultsMessage:s,renderOption:o,packageData:l,collapsible:r=!1,collapse:p=!1,showItems:d=!1}=e;const{selectShippingRate:g,selectedShippingRate:k}=((e,t)=>{const{dispatchCheckoutEvent:n}=Object(j.a)(),{selectShippingRate:a,isSelectingRate:s}=Object(O.a)(),[o,i]=Object(c.useState)(()=>_(t)),l=Object(c.useRef)(t);return Object(c.useEffect)(()=>{h()(l.current,t)||(l.current=t,i(_(t)))},[t]),{selectShippingRate:Object(c.useCallback)(t=>{i(t),a(t,e),n("set-selected-shipping-rate",{shippingRateId:t})},[e,a,n]),selectedShippingRate:o,isSelectingRate:s}})(t,l.shipping_rates),f=Object(c.createElement)(c.Fragment,null,(d||r)&&Object(c.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),d&&Object(c.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(u.decodeEntities)(e.name),n=e.quantity;return Object(c.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(c.createElement)(m.a,{label:n>1?`${t} × ${n}`:""+t,screenReaderLabel:Object(a.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(a._n)("%1$s (%2$d unit)","%1$s (%2$d units)",n,"woo-gutenberg-products-block"),t,n)}))}))),w=Object(c.createElement)(y,{className:n,noResultsMessage:s,rates:l.shipping_rates,onSelectRate:g,selected:k,renderOption:o});return r?Object(c.createElement)(i.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!p,title:f},w):Object(c.createElement)("div",{className:b()("wc-block-components-shipping-rates-control__package",n)},f,w)};const R=e=>{let{packages:t,collapse:n,showItems:a,collapsible:s,noResultsMessage:o,renderOption:i}=e;return t.length?Object(c.createElement)(c.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(c.createElement)(S,{key:t,packageId:t,packageData:l,collapsible:s,collapse:n,showItems:a,noResultsMessage:o,renderOption:i})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:n,className:d,collapsible:b=!1,noResultsMessage:u,renderOption:m}=e;Object(c.useEffect)(()=>{if(n)return;const e=Object(l.a)(t),c=Object(l.b)(t);1===e?Object(s.speak)(Object(a.sprintf)( +/* translators: %d number of shipping options found. */ +Object(a._n)("%d shipping option was found.","%d shipping options were found.",c,"woo-gutenberg-products-block"),c)):Object(s.speak)(Object(a.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(a._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(a.sprintf)( +/* translators: %d number of shipping options available. */ +Object(a._n)("%d shipping option was found","%d shipping options were found",c,"woo-gutenberg-products-block"),c))},[n,t]);const{extensions:g,receiveCart:h,...O}=Object(r.a)(),j={className:d,collapsible:b,noResultsMessage:u,renderOption:m,extensions:g,cart:O,components:{ShippingRatesControlPackage:S}},{isEditor:_}=Object(p.a)();return Object(c.createElement)(o.a,{isLoading:n,screenReaderLabel:Object(a.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},_?Object(c.createElement)(R,{packages:t,noResultsMessage:u,renderOption:m}):Object(c.createElement)(c.Fragment,null,Object(c.createElement)(i.ExperimentalOrderShippingPackages.Slot,j),Object(c.createElement)(i.ExperimentalOrderShippingPackages,null,Object(c.createElement)(R,{packages:t,noResultsMessage:u,renderOption:m}))))}},294:function(e,t,n){"use strict";var c=n(7),a=n(0),s=n(4),o=n.n(s),i=n(12),l=n(46);t.a=function({icon:e,children:t,label:n,instructions:s,className:r,notices:p,preview:d,isColumnLayout:b,...u}){const[m,{width:g}]=Object(i.useResizeObserver)();let h;"number"==typeof g&&(h={"is-large":g>=480,"is-medium":g>=160&&g<480,"is-small":g<160});const O=o()("components-placeholder",r,h),j=o()("components-placeholder__fieldset",{"is-column-layout":b});return Object(a.createElement)("div",Object(c.a)({},u,{className:O}),m,p,d&&Object(a.createElement)("div",{className:"components-placeholder__preview"},d),Object(a.createElement)("div",{className:"components-placeholder__label"},Object(a.createElement)(l.a,{icon:e}),n),!!s&&Object(a.createElement)("div",{className:"components-placeholder__instructions"},s),Object(a.createElement)("div",{className:j},t))}},299:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return a}));const c=e=>e.length,a=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},301:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var c=n(2),a=n(0),s=n(44),o=n(33);const i=()=>{const{needsShipping:e}=Object(s.b)(),{billingData:t,setBillingData:n,shippingAddress:i,setShippingAddress:l,shippingAsBilling:r,setShippingAsBilling:p}=Object(o.b)(),d=Object(a.useRef)(r),b=Object(a.useRef)(),u=Object(a.useCallback)(e=>{l(e),r&&n(e)},[r,l,n]),m=Object(a.useCallback)(t=>{n(t),e||l(t)},[e,l,n]);Object(a.useEffect)(()=>{if(d.current!==r){if(r)b.current=t,n(i);else{const{email:e,...c}=b.current||t;n({...c})}d.current=r}},[r,n,i,t]);const g=Object(a.useCallback)(e=>{n({email:e})},[n]),h=Object(a.useCallback)(e=>{n({phone:e})},[n]),O=Object(a.useCallback)(e=>{u({phone:e})},[u]);return{defaultAddressFields:c.defaultAddressFields,shippingFields:i,setShippingFields:u,billingFields:t,setBillingFields:m,setEmail:g,setPhone:h,setShippingPhone:O,shippingAsBilling:r,setShippingAsBilling:p,showShippingFields:e,showBillingFields:!e||!d.current}}},346:function(e,t){},347:function(e,t){},388:function(e,t,n){"use strict";n.r(t);var c=n(0),a=n(4),s=n.n(a),o=n(110),i=n(261),l=n(31),r=n(301),p=n(1),d=n(262),b=n(299),u=n(40),m=n(96),g=n(18),h=n(44),O=n(19),j=n(116),_=n(2),k=n(294),f=n(56),w=n(98),E=n(24),v=Object(c.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 13"},Object(c.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.667 2.5h1.666l3.334 3.333V10H15a2.5 2.5 0 11-5 0H6.667a2.5 2.5 0 11-5 0H0V1.667C0 .746.746 0 1.667 0H10c.92 0 1.667.746 1.667 1.667V2.5zM2.917 10a1.25 1.25 0 102.5 0 1.25 1.25 0 00-2.5 0zm-1.25-2.5V1.667H10V7.5H1.667zM11.25 10a1.25 1.25 0 102.5 0 1.25 1.25 0 00-2.5 0z"}));n(347);var N=()=>Object(c.createElement)(k.a,{icon:Object(c.createElement)(w.a,{srcElement:v}),label:Object(p.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},Object(c.createElement)("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(p.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),Object(c.createElement)(f.a,{isSecondary:!0,href:_.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping",target:"_blank",rel:"noopener noreferrer"},Object(p.__)("Configure Shipping Options","woo-gutenberg-products-block")));n(346);const y=e=>{const t=Object(_.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(O.decodeEntities)(e.name),value:e.rate_id,description:Object(O.decodeEntities)(e.description),secondaryLabel:Object(c.createElement)(m.a,{currency:Object(u.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:Object(O.decodeEntities)(e.delivery_time)}};var S=()=>{const{isEditor:e}=Object(g.a)(),{shippingRates:t,shippingRatesLoading:n,needsShipping:a,hasCalculatedShipping:o}=Object(h.b)();if(!a)return null;const i=Object(b.a)(t);return e||o||i?Object(c.createElement)(c.Fragment,null,e&&!i?Object(c.createElement)(N,null):Object(c.createElement)(d.a,{noResultsMessage:Object(c.createElement)(j.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(p.__)("There are no shipping options available. Please check your shipping address.","woo-gutenberg-products-block")),renderOption:y,shippingRates:t,shippingRatesLoading:n})):Object(c.createElement)("p",null,Object(p.__)("Shipping options will be displayed here after entering your full shipping address.","woo-gutenberg-products-block"))},R=n(233),C={...Object(R.a)({defaultTitle:Object(p.__)("Shipping options","woo-gutenberg-products-block"),defaultDescription:""}),allowCreateAccount:{type:"boolean",default:!1},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}};t.default=Object(o.withFilteredAttributes)(C)(e=>{let{title:t,description:n,showStepNumber:a,children:o,className:p}=e;const{isProcessing:d}=Object(l.b)(),{showShippingFields:b}=Object(r.a)();return b?Object(c.createElement)(i.a,{id:"shipping-option",disabled:d,className:s()("wc-block-checkout__shipping-option",p),title:t,description:n,showStepNumber:a},Object(c.createElement)(S,null),o):null})},96:function(e,t,n){"use strict";var c=n(10),a=n.n(c),s=n(0),o=n(131),i=n(4),l=n.n(i);n(159);const r=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:n,currency:c,onValueChange:i,displayType:p="text",...d}=e;const b="string"==typeof n?parseInt(n,10):n;if(!Number.isFinite(b))return null;const u=b/10**c.minorUnit;if(!Number.isFinite(u))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...r(c),value:void 0,currency:void 0,onValueChange:void 0},h=i?e=>{const t=+e.value*10**c.minorUnit;i(t)}:()=>{};return Object(s.createElement)(o.a,a()({className:m,displayType:p},g,{value:u,onValueChange:h}))}}}]); \ No newline at end of file diff --git a/build/checkout-blocks/terms-frontend.js b/build/checkout-blocks/terms-frontend.js new file mode 100644 index 00000000000..9752a9218ad --- /dev/null +++ b/build/checkout-blocks/terms-frontend.js @@ -0,0 +1,5 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[41],{238:function(e,t,n){"use strict";n.d(t,"b",(function(){return s})),n.d(t,"a",(function(){return a}));var o=n(17),c=n(204);const r=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:n,paymentMethodsInitialized:r,expressPaymentMethodsInitialized:s}=Object(c.b)(),a=Object(o.a)(t),i=Object(o.a)(n);return{paymentMethods:e?i:a,isInitialized:e?s:r}},s=()=>r(!1),a=()=>r(!0)},351:function(e,t){},352:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var o=n(1),c=n(31),r=n(204),s=n(238);const a=()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:n,isProcessing:a,isAfterProcessing:i,isComplete:d,hasError:u}=Object(c.b)(),{paymentMethods:b={}}=Object(s.b)(),{activePaymentMethod:l,currentStatus:g}=Object(r.b)(),m=b[l]||{},p=a||i||n,h=d&&!u;return{submitButtonText:(null==m?void 0:m.placeOrderButtonLabel)||Object(o.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:a||g.isDoingExpressPayment,waitingForProcessing:p,waitingForRedirect:h}}},402:function(e,t,n){"use strict";n.r(t);var o=n(0),c=n(1),r=n(4),s=n.n(r),a=n(13),i=n(352),d=n(12),u=n(66);const b=u.j?`${Object(c.__)("Terms and Conditions","woo-gutenberg-products-block")}`:Object(c.__)("Terms and Conditions","woo-gutenberg-products-block"),l=u.f?`${Object(c.__)("Privacy Policy","woo-gutenberg-products-block")}`:Object(c.__)("Privacy Policy","woo-gutenberg-products-block"),g=Object(c.sprintf)( +/* translators: %1$s terms page link, %2$s privacy page link. */ +Object(c.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woo-gutenberg-products-block"),b,l),m=Object(c.sprintf)( +/* translators: %1$s terms page link, %2$s privacy page link. */ +Object(c.__)("You must accept our %1$s and %2$s to continue with your purchase.","woo-gutenberg-products-block"),b,l);n(351),t.default=Object(d.withInstanceId)(e=>{let{text:t,checkbox:n,instanceId:r,validation:d,className:u}=e;const[b,l]=Object(o.useState)(!1),{isDisabled:p}=Object(i.a)(),h="terms-and-conditions-"+r,{getValidationError:j,setValidationErrors:O,clearValidationError:_}=d,w=j(h)||{},f=w.message&&!w.hidden;return Object(o.useEffect)(()=>{if(n)return b?_(h):O({[h]:{message:Object(c.__)("Please read and accept the terms and conditions.","woo-gutenberg-products-block"),hidden:!0}}),()=>{_(h)}},[n,b,h,_,O]),Object(o.createElement)("div",{className:s()("wc-block-checkout__terms",{"wc-block-checkout__terms--disabled":p},u)},n?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.CheckboxControl,{id:"terms-and-conditions",checked:b,onChange:()=>l(e=>!e),hasError:f,disabled:p},Object(o.createElement)("span",{dangerouslySetInnerHTML:{__html:t||m}}))):Object(o.createElement)("span",{dangerouslySetInnerHTML:{__html:t||g}}))})}}]); \ No newline at end of file diff --git a/build/checkout-blocks/totals-frontend.js b/build/checkout-blocks/totals-frontend.js new file mode 100644 index 00000000000..e8e76b61260 --- /dev/null +++ b/build/checkout-blocks/totals-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[42],{335:function(e,c,t){"use strict";var n=t(0),s=t(3),a=t(4),r=t.n(a);const o=Object(s.forwardRef)((e,c)=>{let{children:t,className:s=""}=e;return Object(n.createElement)("div",{ref:c,className:r()("wc-block-components-sidebar",s)},t)});c.a=o},355:function(e,c){},381:function(e,c,t){"use strict";t.r(c);var n=t(0),s=t(4),a=t.n(s),r=t(335);t(355),c.default=e=>{let{children:c,className:t}=e;return Object(n.createElement)(r.a,{className:a()("wc-block-checkout__sidebar",t)},c)}}}]); \ No newline at end of file diff --git a/build/checkout-frontend.asset.php b/build/checkout-frontend.asset.php new file mode 100644 index 00000000000..dc97d7e81a8 --- /dev/null +++ b/build/checkout-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '0ab8ffa93f350d57aabb4f0a728461de'); \ No newline at end of file diff --git a/build/checkout-frontend.js b/build/checkout-frontend.js new file mode 100644 index 00000000000..671fc1ae90a --- /dev/null +++ b/build/checkout-frontend.js @@ -0,0 +1,6 @@ +!function(e){function t(t){for(var r,o,i=t[0],c=t[1],s=0,l=[];s{let{imageUrl:t=a.l+"/block-error.svg",header:r=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:c=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},c?c+" ":"",o),l&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(37);class u extends c.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:c,button:s}=this.props,{errorMessage:a,hasError:u}=this.state;return u?"function"==typeof c?c({errorMessage:a}):Object(i.createElement)(l,{errorMessage:r?a:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:s}):this.props.children}}t.a=u},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=r(11),i=r.n(o);function c(e){const t=Object(n.useRef)(e);return i()(e,t.current)||(t.current=e),t.current}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0);r(9);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),i=()=>Object(n.useContext)(o)},function(e,t){e.exports=window.wp.htmlEntities},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r(5),o=r(0),i=r(6),c=r(9),s=r(19),a=r(70),l=r(109),u=r(18),d=r(67);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(c.dispatch)(i.CART_STORE_KEY).invalidateResolutionForStore()},f=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),f),[])},h={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},b={...h,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:i.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},y=e=>Object(a.a)(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(s.decodeEntities)(r)]})),E={cartCoupons:i.EMPTY_CART_COUPONS,cartItems:i.EMPTY_CART_ITEMS,cartFees:i.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:i.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:i.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:h,shippingRates:i.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:i.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:i.EMPTY_EXTENSIONS},v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(u.a)(),s=null==r?void 0:r.previewCart,{shouldSelect:a}=e,d=Object(o.useRef)();m();const p=Object(c.useSelect)((e,r)=>{let{dispatch:n}=r;if(!a)return E;if(t)return{cartCoupons:s.coupons,cartItems:s.items,cartFees:s.fees,cartItemsCount:s.items_count,cartItemsWeight:s.items_weight,cartNeedsPayment:s.needs_payment,cartNeedsShipping:s.needs_shipping,cartItemErrors:i.EMPTY_CART_ITEM_ERRORS,cartTotals:s.totals,cartIsLoading:!1,cartErrors:i.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:h,extensions:i.EMPTY_EXTENSIONS,shippingRates:s.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:s.has_calculated_shipping,paymentRequirements:s.paymentRequirements,receiveCart:"function"==typeof(null==s?void 0:s.receiveCart)?s.receiveCart:()=>{}};const o=e(i.CART_STORE_KEY),c=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),f=o.isCustomerDataUpdating(),{receiveCart:m}=n(i.CART_STORE_KEY),g=y(c.billingAddress),v=c.needsShipping?y(c.shippingAddress):g,O=c.fees.length>0?c.fees.map(e=>y(e)):i.EMPTY_CART_FEES;return{cartCoupons:c.coupons.length>0?c.coupons.map(e=>({...e,label:e.code})):i.EMPTY_CART_COUPONS,cartItems:c.items,cartFees:O,cartItemsCount:c.itemsCount,cartItemsWeight:c.itemsWeight,cartNeedsPayment:c.needsPayment,cartNeedsShipping:c.needsShipping,cartItemErrors:c.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(l.a)(g),shippingAddress:Object(l.a)(v),extensions:c.extensions,shippingRates:c.shippingRates,shippingRatesLoading:f,cartHasCalculatedShipping:c.hasCalculatedShipping,paymentRequirements:c.paymentRequirements,receiveCart:m}},[a]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},function(e,t){e.exports=window.wp.a11y},function(e,t){e.exports=window.wp.primitives},,function(e,t,r){"use strict";(function(e){var n=r(0);r(45);const o=Object(n.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,r(65))},function(e,t){e.exports=window.wp.apiFetch},,function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d}));var n=r(35);let o,i;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(i||(i={}));const c=(e,t)=>Object(n.c)(e)&&"type"in e&&e.type===t,s=e=>c(e,o.SUCCESS),a=e=>c(e,o.ERROR),l=e=>c(e,o.FAIL),u=e=>!Object(n.c)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:i,shouldRetry:u,isSuccessResponse:s,isErrorResponse:a,isFailResponse:l})},function(e,t){e.exports=window.wp.deprecated},function(e,t,r){"use strict";r.d(t,"b",(function(){return T})),r.d(t,"a",(function(){return x}));var n=r(0),o=r(1),i=r(62),c=r(30),s=r.n(c),a=r(35);let l;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(l||(l={}));const u=()=>({type:l.SET_IDLE}),d=e=>({type:l.SET_REDIRECT_URL,redirectUrl:e}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:l.SET_COMPLETE,data:e}},f=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?l.SET_HAS_ERROR:l.SET_NO_ERROR}};var m=r(2);let h;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(h||(h={}));const b={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},g={redirectUrl:"",status:h.PRISTINE,hasError:!1,calculatingCount:0,orderId:b.order_id,orderNotes:"",customerId:b.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g,{redirectUrl:t,type:r,customerId:n,orderId:o,orderNotes:i,extensionData:c,shouldCreateAccount:s,data:a}=arguments.length>1?arguments[1]:void 0,u=e;switch(r){case l.SET_PRISTINE:u=g;break;case l.SET_IDLE:u=e.status!==h.IDLE?{...e,status:h.IDLE}:e;break;case l.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case l.SET_PROCESSING_RESPONSE:u={...e,processingResponse:a};break;case l.SET_COMPLETE:u=e.status!==h.COMPLETE?{...e,status:h.COMPLETE,redirectUrl:void 0!==a&&"string"==typeof a.redirectUrl&&a.redirectUrl?a.redirectUrl:e.redirectUrl}:e;break;case l.SET_PROCESSING:u=e.status!==h.PROCESSING?{...e,status:h.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case l.SET_BEFORE_PROCESSING:u=e.status!==h.BEFORE_PROCESSING?{...e,status:h.BEFORE_PROCESSING,hasError:!1}:e;break;case l.SET_AFTER_PROCESSING:u=e.status!==h.AFTER_PROCESSING?{...e,status:h.AFTER_PROCESSING}:e;break;case l.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===h.PROCESSING||e.status===h.BEFORE_PROCESSING?{...u,status:h.IDLE}:u;break;case l.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case l.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case l.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case l.SET_CUSTOMER_ID:u=void 0!==n?{...e,customerId:n}:e;break;case l.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case l.SET_SHOULD_CREATE_ACCOUNT:void 0!==s&&s!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:s});break;case l.SET_ORDER_NOTES:void 0!==i&&e.orderNotes!==i&&(u={...e,orderNotes:i});break;case l.SET_EXTENSION_DATA:void 0!==c&&e.extensionData!==c&&(u={...e,extensionData:c})}return u!==e&&r!==l.SET_PRISTINE&&u.status===h.PRISTINE&&(u.status=h.IDLE),u};var E=r(19),v=r(89),O=r(169);var _=r(170),S=r(160),k=r(32),j=r(38),w=r(9),C=r(29);const R=Object(n.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),T=()=>Object(n.useContext)(R),x=e=>{let{children:t,redirectUrl:r,isCart:c=!1}=e;g.redirectUrl=r;const[m,b]=Object(n.useReducer)(y,g),{setValidationErrors:T}=Object(S.b)(),{addErrorNotice:x,removeNotices:P}=Object(k.a)(),{dispatchCheckoutEvent:A}=Object(j.a)(),N=m.calculatingCount>0,{isSuccessResponse:M,isErrorResponse:I,isFailResponse:D,shouldRetry:L}=Object(C.c)(),{checkoutNotices:F,paymentNotices:V,expressPaymentNotices:B}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(w.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(w.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(w.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,H]=Object(n.useReducer)(v.b,{}),z=Object(n.useRef)(U),{onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,onCheckoutValidationBeforeProcessing:W}=(e=>Object(n.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(O.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(O.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(O.a)("checkout_validation_before_processing",e)}),[e]))(H);Object(n.useEffect)(()=>{z.current=U},[U]);const Y=Object(n.useMemo)(()=>function(){return s()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),W(...arguments)},[W]),$=Object(n.useMemo)(()=>({resetCheckout:()=>{b({type:l.SET_PRISTINE})},setRedirectUrl:e=>{b(d(e))},setHasError:e=>{b(f(e))},incrementCalculating:()=>{b({type:l.INCREMENT_CALCULATING})},decrementCalculating:()=>{b({type:l.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;b((t=e,{type:l.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{b((e=>({type:l.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{b((e=>({type:l.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{b((e=>({type:l.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:r,value:n}=e;t.paymentDetails[r]=Object(E.decodeEntities)(n)})),"message"in e&&(t.message=Object(E.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var r;t.redirectUrl&&b(d(t.redirectUrl)),b((r=t,{type:l.SET_PROCESSING_RESPONSE,data:r})),b({type:l.SET_AFTER_PROCESSING})}}),[]);Object(n.useEffect)(()=>{m.status===h.BEFORE_PROCESSING&&(P("error"),Object(_.a)(z.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:r}=e;x(t),T(r)}),b(u()),b(f())):b({type:l.SET_PROCESSING})}))},[m.status,T,x,P,b]);const X=Object(i.a)(m.status),K=Object(i.a)(m.hasError);Object(n.useEffect)(()=>{if((m.status!==X||m.hasError!==K)&&m.status===h.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(_.b)(z.current,"checkout_after_processing_with_error",e).then(t=>{const r=(e=>{let t=null;return e.forEach(e=>{if((I(e)||D(e))&&e.message){const r=e.messageContext?{context:e.messageContext}:void 0;t=e,x(e.message,r)}}),t})(t);if(null!==r)L(r)?b(u()):b(p(r));else{if(!(F.some(e=>"error"===e.status)||B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status))){var n;const t=(null===(n=e.processingResponse)||void 0===n?void 0:n.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");x(t,{id:"checkout"})}b(u())}}):Object(_.b)(z.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,r=null;if(e.forEach(e=>{M(e)&&(t=e),(I(e)||D(e))&&(r=e)}),t&&!r)b(p(t));else if(Object(a.c)(r)){if(r.message){const e=r.messageContext?{context:r.messageContext}:void 0;x(r.message,e)}L(r)?b(f(!0)):b(p(r))}else b(p())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,X,K,$,x,I,D,M,L,F,B,V]);const J={onSubmit:Object(n.useCallback)(()=>{A("submit"),b({type:l.SET_BEFORE_PROCESSING})},[A]),isComplete:m.status===h.COMPLETE,isIdle:m.status===h.IDLE,isCalculating:N,isProcessing:m.status===h.PROCESSING,isBeforeProcessing:m.status===h.BEFORE_PROCESSING,isAfterProcessing:m.status===h.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:Y,onCheckoutValidationBeforeProcessing:W,onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,dispatchActions:$,isCart:c,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return b((t=e,{type:l.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(n.createElement)(R.Provider,{value:J},t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),o=r(87);const i=()=>{const{notices:e,createNotice:t,removeNotice:r,setIsSuppressed:i}=Object(o.b)(),c=Object(n.useRef)(e);Object(n.useEffect)(()=>{c.current=e},[e]);const s=Object(n.useMemo)(()=>({hasNoticesOfType:e=>c.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c.current.forEach(t=>{null!==e&&t.status!==e||r(t.id)})},removeNotice:r}),[r]),a=Object(n.useMemo)(()=>({addDefaultNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...r})},addErrorNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...r})},addWarningNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...r})},addInfoNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...r})},addSuccessNotice:function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...r})}}),[t]);return{notices:e,...s,...a,setIsSuppressed:i}}},function(e,t,r){"use strict";r.d(t,"b",(function(){return g})),r.d(t,"a",(function(){return y}));var n=r(0),o=r(2),i=r(9),c=r(6),s=r(52),a=r(11),l=r.n(a),u=r(109),d=r(88),p=r(22),f=r(32);const m=(e,t)=>!(!function(e){return"email"in e}(t)||Object(u.c)(t)===Object(u.c)(e))||!!t.country&&!l()(Object(u.b)(e),Object(u.b)(t));var h=r(31);const b=Object(n.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),g=()=>Object(n.useContext)(b),y=e=>{let{children:t}=e;const{billingData:r,shippingAddress:a,setBillingData:l,setShippingAddress:u}=(()=>{const{updateCustomerData:e}=Object(i.useDispatch)(c.CART_STORE_KEY),{addErrorNotice:t,removeNotice:r}=Object(f.a)(),{billingAddress:o,shippingAddress:a,cartIsLoading:l}=Object(p.a)(),[u,h]=Object(n.useState)(!1),[b,g]=Object(n.useState)({billingData:o,shippingAddress:a}),y=Object(n.useRef)(b);Object(n.useEffect)(()=>{if(u||l)return;const e={billingData:o,shippingAddress:a};y.current=e,g(e),h(!0)},[l,u,o,a]);const E=Object(n.useCallback)(e=>{g(t=>({...t,billingData:{...t.billingData,...e}}))},[]),v=Object(n.useCallback)(e=>{g(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]),O=Object(s.a)(()=>{const n={};m(y.current.billingData,b.billingData)&&(n.billing_address=b.billingData),m(y.current.shippingAddress,b.shippingAddress)&&(n.shipping_address=b.shippingAddress),0!==Object.keys(n).length&&(y.current=b,e(n).then(()=>{r("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})}))},1e3);return Object(n.useEffect)(()=>{u&&O()},[u,b,O]),{billingData:b.billingData,shippingAddress:b.shippingAddress,setBillingData:E,setShippingAddress:v}})(),{cartNeedsShipping:g}=Object(p.a)(),{customerId:y}=Object(h.b)(),[E,v]=Object(n.useState)(()=>{return g&&(!y||(e=a,t=r,Object.keys(o.defaultAddressFields).every(r=>e[r]===t[r])));var e,t}),O={billingData:r,shippingAddress:a,setBillingData:l,setShippingAddress:u,shippingAsBilling:E,setShippingAsBilling:v};return Object(n.createElement)(b.Provider,{value:O},t)}},function(e,t){e.exports=window.wp.url},function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return c})),r.d(t,"a",(function(){return s}));const n=e=>"number"==typeof e,o=e=>"string"==typeof e,i=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function c(e,t){return i(e)&&t in e}const s=e=>"boolean"==typeof e},,function(e,t){},function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(48),o=r(0),i=r(22);const c=()=>{const e=Object(i.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(n.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...r,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,function(e,t){e.exports=window.wc.priceFormat},,function(e,t,r){"use strict";var n=r(43);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,c){if(c!==n){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.d(t,"b",(function(){return k})),r.d(t,"a",(function(){return j}));var n=r(0),o=r(11),i=r.n(o),c=r(70);const s=e=>Object(c.a)(e.map(e=>{var t;let{package_id:r,shipping_rates:n}=e;return[r,null===(t=n.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),a={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},l={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},u={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:a,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:r}=t;return Object.values(a).includes(r)?r:e};var p=r(89),f=r(169);const m=e=>({onSuccess:Object(f.a)("shipping_rates_success",e),onFail:Object(f.a)("shipping_rates_fail",e),onSelectSuccess:Object(f.a)("shipping_rate_select_success",e),onSelectFail:Object(f.a)("shipping_rate_select_fail",e)});var h=r(170),b=r(31),g=r(33),y=r(22),E=r(99);const{NONE:v,INVALID_ADDRESS:O,UNKNOWN:_}=a,S=Object(n.createContext)(u),k=()=>Object(n.useContext)(S),j=e=>{let{children:t}=e;const{dispatchActions:r}=Object(b.b)(),{shippingAddress:o,setShippingAddress:c}=Object(g.b)(),{cartNeedsShipping:u,cartHasCalculatedShipping:f,shippingRates:k,shippingRatesLoading:j,cartErrors:w}=Object(y.a)(),{selectShippingRate:C,isSelectingRate:R}=Object(E.a)(),[T,x]=Object(n.useReducer)(d,v),[P,A]=Object(n.useReducer)(p.b,{}),N=Object(n.useRef)(P),M=Object(n.useMemo)(()=>({onShippingRateSuccess:m(A).onSuccess,onShippingRateFail:m(A).onFail,onShippingRateSelectSuccess:m(A).onSelectSuccess,onShippingRateSelectFail:m(A).onSelectFail}),[A]);Object(n.useEffect)(()=>{N.current=P},[P]);const I=Object(n.useRef)(()=>s(k));Object(n.useEffect)(()=>{const e=s(k);i()(I.current,e)||(I.current=e)},[k]),Object(n.useEffect)(()=>{j?r.incrementCalculating():r.decrementCalculating()},[j,r]),Object(n.useEffect)(()=>{R?r.incrementCalculating():r.decrementCalculating()},[R,r]),Object(n.useEffect)(()=>{w.length>0&&w.some(e=>!(!e.code||!Object.values(l).includes(e.code)))?x({type:O}):x({type:v})},[w]);const D=Object(n.useMemo)(()=>({isPristine:T===v,isValid:T===v,hasInvalidAddress:T===O,hasError:T===_||T===O}),[T]);Object(n.useEffect)(()=>{j||0!==k.length&&!D.hasError||Object(h.a)(N.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[k,j,D.hasError,D.hasInvalidAddress]),Object(n.useEffect)(()=>{!j&&k.length>0&&!D.hasError&&Object(h.a)(N.current,"shipping_rates_success",k)},[k,j,D.hasError]),Object(n.useEffect)(()=>{R||(D.hasError?Object(h.a)(N.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(h.a)(N.current,"shipping_rate_select_success",I.current))},[R,D.hasError,D.hasInvalidAddress]);const L={shippingErrorStatus:D,dispatchErrorStatus:x,shippingErrorTypes:a,shippingRates:k,shippingRatesLoading:j,selectedRates:I.current,setSelectedRates:C,isSelectingRate:R,shippingAddress:o,setShippingAddress:c,needsShipping:u,hasCalculatedShipping:f,...M};return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(S.Provider,{value:L},t))}},function(e,t){e.exports=window.wp.warning},function(e,t,r){"use strict";var n=r(7),o=r(0),i=r(24),c=function({icon:e,className:t,...r}){const i=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(n.a)({className:i},r))};t.a=function({icon:e=null,size:t=24,...r}){if("string"==typeof e)return Object(o.createElement)(c,Object(n.a)({icon:e},r));if(Object(o.isValidElement)(e)&&c===e.type)return Object(o.cloneElement)(e,{...r});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...r}):e({size:t,...r});if(e&&("svg"===e.type||e.type===i.SVG)){const n={width:t,height:t,...e.props,...r};return Object(o.createElement)(i.SVG,n)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...r}):e}},function(e,t,r){"use strict";var n=r(4),o=r.n(n),i=r(0);t.a=Object(i.forwardRef)((function({as:e="div",className:t,...r},n){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(i.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...r,ref:n})}))},function(e,t){e.exports=window.wp.hooks},,function(e,t,r){"use strict";var n=r(2),o=r(1),i=r(35);const c=Object(n.getSetting)("countryLocale",{}),s=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(i.b)(e.priority)&&(t.index=e.priority),Object(i.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},a=Object.entries(c).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,s(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==a[r]?a[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),c=Object(n.useRef)(0),s=Object(n.useRef)(null),a=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var f=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var m=!!(r=r||{}).leading,h=!("trailing"in r)||!!r.trailing,b="maxWait"in r,g=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=a.current,r=l.current;return a.current=l.current=null,c.current=e,u.current=d.current.apply(r,t)},r=function(e,t){f&&cancelAnimationFrame(s.current),s.current=f?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-i.current,n=e-c.current;return!i.current||r>=t||r<0||b&&n>=g},y=function(t){return s.current=null,h&&a.current?e(t):(a.current=l.current=null,u.current)},E=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-i.current,s=e-c.current,a=t-o,l=b?Math.min(a,g-s):a;r(E,l)}},v=function(){for(var d=[],f=0;f{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const a=n(e,r),l=s(e,r),u={...e.dataset,...a.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:a={}}=e;Object(i.render)(Object(i.createElement)(c.a,a,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:a,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const c=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(c,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),a({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const c=i.querySelectorAll(o);a({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},,function(e,t,r){"use strict";var n=r(7),o=r(0),i=r(4),c=r.n(i),s=r(5),a=r(30),l=r.n(a),u=r(12),d=r(60),p=r(90),f=r(1);function m(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const i=o.getBoundingClientRect();return new n.DOMRect(e.left+i.left,e.top+i.top,e.width,e.height)}let h=0;function b(e){const t=document.scrollingElement||document.body;e&&(h=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=h)}let g=0;function y(){return Object(o.useEffect)(()=>(0===g&&b(!0),++g,()=>{1===g&&b(!1),--g}),[]),null}var E=r(26);function v(e){const t=Object(o.useContext)(E.a),r=t.slots[e]||{},n=t.fills[e],i=Object(o.useMemo)(()=>n||[],[n]);return{...r,updateSlot:Object(o.useCallback)(r=>{t.updateSlot(e,r)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(r=>{t.unregisterSlot(e,r)},[e,t.unregisterSlot]),fills:i,registerFill:Object(o.useCallback)(r=>{t.registerFill(e,r)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(r=>{t.unregisterFill(e,r)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function _({name:e,children:t,registerFill:r,unregisterFill:n}){const i=(e=>{const{getSlot:t,subscribe:r}=Object(o.useContext)(O),[n,i]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(i(t(e)),r(()=>{i(t(e))})),[e]),n})(e),c=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(r(e,c.current),()=>n(e,c.current)),[]),Object(o.useLayoutEffect)(()=>{c.current.children=t,i&&i.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==c.current.name&&(n(c.current.name,c.current),c.current.name=e,r(e,c.current))},[e]),i&&i.node?(Object(s.isFunction)(t)&&(t=t(i.props.fillProps)),Object(o.createPortal)(t,i.node)):null}var S=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:r})=>Object(o.createElement)(_,Object(n.a)({},e,{registerFill:t,unregisterFill:r})));class k extends o.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:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,i=Object(s.map)(n(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(r):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const r=e.key||t;return Object(o.cloneElement)(e,{key:r})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(i):i)}}var j=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:r,getFills:i})=>Object(o.createElement)(k,Object(n.a)({},e,{registerSlot:t,unregisterSlot:r,getFills:i})));function w(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const r=v(e),n=Object(o.useRef)({rerender:w()});return Object(o.useEffect)(()=>(r.registerFill(n),()=>{r.unregisterFill(n)}),[r.registerFill,r.unregisterFill]),r.ref&&r.ref.current?("function"==typeof t&&(t=t(r.fillProps)),Object(o.createPortal)(t,r.ref.current)):null}var R=Object(o.forwardRef)((function({name:e,fillProps:t={},as:r="div",...i},c){const s=Object(o.useContext)(E.a),a=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,a,t),()=>{s.unregisterSlot(e,a)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(r,Object(n.a)({ref:Object(u.useMergeRefs)([c,a])},i))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(S,e),Object(o.createElement)(C,e))}r(11),o.Component;const x=Object(o.forwardRef)(({bubblesVirtually:e,...t},r)=>e?Object(o.createElement)(R,Object(n.a)({},t,{ref:r})):Object(o.createElement)(j,t));function P(e){return"appear"===e?"top":"left"}function A(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:i}=(c=t).ownerDocument.defaultView.getComputedStyle(c);var c;const s=r?parseInt(r,10):0,a=n?parseInt(n,10):0,l=o?parseInt(o,10):0,u=i?parseInt(i,10):0;return{x:e.left+l,y:e.top+s,width:e.width-l-u,height:e.height-s-a,left:e.left+l,right:e.right-u,top:e.top+s,bottom:e.bottom-a}}function N(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function M(e,t,r=""){e.style[t]!==r&&(e.style[t]=r)}function I(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const D=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:r,className:i,noArrow:s=!0,isAlternate:a,position:h="bottom right",range:b,focusOnMount:g="firstElement",anchorRef:E,shouldAnchorIncludePadding:O,anchorRect:_,getAnchorRect:S,expandOnMobile:k,animate:j=!0,onClickOutside:w,onFocusOutside:C,__unstableStickyBoundaryElement:R,__unstableSlotName:x="Popover",__unstableObserveElement:D,__unstableBoundaryParent:L,__unstableForcePosition:F,__unstableForceXAlignment:V,...B},U)=>{const H=Object(o.useRef)(null),z=Object(o.useRef)(null),G=Object(o.useRef)(),q=Object(u.useViewportMatch)("medium","<"),[W,$]=Object(o.useState)(),X=v(x),K=k&&q,[J,Q]=Object(u.useResizeObserver)();s=K||s,Object(o.useLayoutEffect)(()=>{if(K)return I(G.current,"is-without-arrow",s),I(G.current,"is-alternate",a),N(G.current,"data-x-axis"),N(G.current,"data-y-axis"),M(G.current,"top"),M(G.current,"left"),M(z.current,"maxHeight"),void M(z.current,"maxWidth");const e=()=>{if(!G.current||!z.current)return;let e=function(e,t,r,n=!1,o,i){if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return m(t,t.ownerDocument||e.current.ownerDocument,i)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return m(Object(d.getRectangleFromRange)(n),n.endContainer.ownerDocument,i);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=m(n.getBoundingClientRect(),n.ownerDocument,i);return o?e:A(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),c=t.getBoundingClientRect(),s=m(new window.DOMRect(r.left,r.top,r.width,c.bottom-r.top),e.ownerDocument,i);return o?s:A(s,n)}if(!e.current)return;const{parentNode:c}=e.current,s=c.getBoundingClientRect();return o?s:A(s,c)}(H,_,S,E,O,G.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=G.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}var i;L&&(n=null===(i=G.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const c=Q.height?Q:z.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:p,yAxis:b,contentHeight:g,contentWidth:y}=function(e,t,r="top",n,o,i,c,s,a){const[l,u="center",d]=r.split(" "),p=function(e,t,r,n,o,i,c,s){const{height:a}=t;if(o){const t=o.getBoundingClientRect().top+a-c;if(e.top<=t)return{yAxis:r,popoverTop:Math.min(e.bottom,t)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const u={popoverTop:l,contentHeight:(l-a/2>0?a/2:l)+(l+a/2>window.innerHeight?window.innerHeight-l:a/2)},d={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};let f,m=r,h=null;if(!o&&!s)if("middle"===r&&u.contentHeight===a)m="middle";else if("top"===r&&d.contentHeight===a)m="top";else if("bottom"===r&&p.contentHeight===a)m="bottom";else{m=d.contentHeight>p.contentHeight?"top":"bottom";const e="top"===m?d.contentHeight:p.contentHeight;h=e!==a?e:null}return f="middle"===m?u.popoverTop:"top"===m?d.popoverTop:p.popoverTop,{yAxis:m,popoverTop:f,contentHeight:h}}(e,t,l,d,n,0,i,s);return{...function(e,t,r,n,o,i,c,s,a){const{width:l}=t;"left"===r&&Object(f.isRTL)()?r="right":"right"===r&&Object(f.isRTL)()&&(r="left"),"left"===n&&Object(f.isRTL)()?n="right":"right"===n&&Object(f.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let p=e.left;"right"===n?p=e.right:"middle"===i||a||(p=u);let m=e.right;"left"===n?m=e.left:"middle"===i||a||(m=u);const h={popoverLeft:p,contentWidth:p-l>0?l:p},b={popoverLeft:m,contentWidth:m+l>window.innerWidth?window.innerWidth-m:l};let g,y=r,E=null;if(!o&&!s)if("center"===r&&d.contentWidth===l)y="center";else if("left"===r&&h.contentWidth===l)y="left";else if("right"===r&&b.contentWidth===l)y="right";else{y=h.contentWidth>b.contentWidth?"left":"right";const e="left"===y?h.contentWidth:b.contentWidth;l>window.innerWidth&&(E=window.innerWidth),e!==l&&(y="center",d.popoverLeft=window.innerWidth/2)}if(g="center"===y?d.popoverLeft:"left"===y?h.popoverLeft:b.popoverLeft,c){const e=c.getBoundingClientRect();g=Math.min(g,e.right-l),Object(f.isRTL)()||(g=Math.max(g,0))}return{xAxis:y,popoverLeft:g,contentWidth:E}}(e,t,u,d,n,p.yAxis,c,s,a),...p}}(e,c,h,R,G.current,o,n,F,V);"number"==typeof l&&"number"==typeof u&&(M(G.current,"top",l+"px"),M(G.current,"left",u+"px")),I(G.current,"is-without-arrow",s||"center"===p&&"middle"===b),I(G.current,"is-alternate",a),N(G.current,"data-x-axis",p),N(G.current,"data-y-axis",b),M(z.current,"maxHeight","number"==typeof g?g+"px":""),M(z.current,"maxWidth","number"==typeof y?y+"px":""),$(({left:"right",right:"left"}[p]||"center")+" "+({top:"bottom",bottom:"top"}[b]||"middle"))};e();const{ownerDocument:t}=G.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const i=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",i),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const c=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(E);let l;return c&&c!==t&&(c.defaultView.addEventListener("resize",e),c.defaultView.addEventListener("scroll",e,!0)),D&&(l=new r.MutationObserver(e),l.observe(D,{attributes:!0})),()=>{r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",i),r.cancelAnimationFrame(o),c&&c!==t&&(c.defaultView.removeEventListener("resize",e),c.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[K,_,S,E,O,h,Q,R,D,L]);const Z=(e,r)=>{if("focus-outside"===e&&C)C(r);else if("focus-outside"===e&&w){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>r.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),w(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:Z,onClose:Z}),re=Object(u.useMergeRefs)([G,ee,U]),ne=Boolean(j&&W)&&function(e){if("loading"===e.type)return c()("components-animate__loading");const{type:t,origin:r=P(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return c()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?c()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:W});let oe=Object(o.createElement)("div",Object(n.a)({className:c()("components-popover",i,ne,{"is-expanded":K,"is-without-arrow":s,"is-alternate":a})},B,{ref:re},te,{tabIndex:"-1"}),K&&Object(o.createElement)(y,null),K&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(Y,{className:"components-popover__close",icon:p.a,onClick:t})),Object(o.createElement)("div",{ref:z,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},J,r)));return X.ref&&(oe=Object(o.createElement)(T,{name:x},oe)),E||_?oe:Object(o.createElement)("span",{ref:H},oe)});D.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(x,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var L=D,F=function({shortcut:e,className:t}){if(!e)return null;let r,n;return Object(s.isString)(e)&&(r=e),Object(s.isObject)(e)&&(r=e.display,n=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":n},r)};const V=Object(o.createElement)("div",{className:"event-catcher"}),B=({eventHandlers:e,child:t,childrenWithPopover:r})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(V,e),Object(o.cloneElement)(t,{children:r}),","),e),U=({child:e,eventHandlers:t,childrenWithPopover:r})=>Object(o.cloneElement)(e,{...t,children:r}),H=(e,t,r)=>{if(1!==o.Children.count(e))return;const n=o.Children.only(e);"function"==typeof n.props[t]&&n.props[t](r)};var z=function({children:e,position:t,text:r,shortcut:n}){const[i,c]=Object(o.useState)(!1),[a,l]=Object(o.useState)(!1),d=Object(u.useDebounce)(l,700),p=t=>{H(e,"onMouseDown",t),document.addEventListener("mouseup",h),c(!0)},f=t=>{H(e,"onMouseUp",t),document.removeEventListener("mouseup",h),c(!1)},m=e=>"mouseUp"===e?f:"mouseDown"===e?p:void 0,h=m("mouseUp"),b=(t,r)=>n=>{if(H(e,t,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;d.cancel();const o=Object(s.includes)(["focus","mouseenter"],n.type);o!==a&&(r?d(o):l(o))},g=()=>{d.cancel(),document.removeEventListener("mouseup",h)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const y={onMouseEnter:b("onMouseEnter",!0),onMouseLeave:b("onMouseLeave"),onClick:b("onClick"),onFocus:b("onFocus"),onBlur:b("onBlur"),onMouseDown:m("mouseDown")},E=o.Children.only(e),{children:v,disabled:O}=E.props;return(O?B:U)({child:E,eventHandlers:y,childrenWithPopover:(({grandchildren:e,isOver:t,position:r,text:n,shortcut:i})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(L,{focusOnMount:!1,position:r,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},n,Object(o.createElement)(F,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:v,isOver:a,position:t,text:r,shortcut:n})})},G=r(46),q=r(47);const W=["onMouseDown","onClick"];var Y=t.a=Object(o.forwardRef)((function(e,t){const{href:r,target:i,isSmall:a,isPressed:u,isBusy:d,isDestructive:p,className:f,disabled:m,icon:h,iconPosition:b="left",iconSize:g,showTooltip:y,tooltipPosition:E,shortcut:v,label:O,children:_,text:S,variant:k,__experimentalIsFocusable:j,describedBy:w,...C}=function({isDefault:e,isPrimary:t,isSecondary:r,isTertiary:n,isLink:o,variant:i,...c}){let s=i;var a,u,d,p,f;return t&&(null!==(a=s)&&void 0!==a||(s="primary")),n&&(null!==(u=s)&&void 0!==u||(s="tertiary")),r&&(null!==(d=s)&&void 0!==d||(s="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(p=s)&&void 0!==p||(s="secondary")),o&&(null!==(f=s)&&void 0!==f||(s="link")),{...c,variant:s}}(e),R=c()("components-button",f,{"is-secondary":"secondary"===k,"is-primary":"primary"===k,"is-small":a,"is-tertiary":"tertiary"===k,"is-pressed":u,"is-busy":d,"is-link":"link"===k,"is-destructive":p,"has-text":!!h&&!!_,"has-icon":!!h}),T=m&&!j,x=void 0===r||T?"button":"a",P="a"===x?{href:r,target:i}:{type:"button",disabled:T,"aria-pressed":u};if(m&&j){P["aria-disabled"]=!0;for(const e of W)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!T&&(y&&O||v||!!O&&(!_||Object(s.isArray)(_)&&!_.length)&&!1!==y),N=w?Object(s.uniqueId)():null,M=C["aria-describedby"]||N,I=Object(o.createElement)(x,Object(n.a)({},P,C,{className:R,"aria-label":C["aria-label"]||O,"aria-describedby":M,ref:t}),h&&"left"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),S&&Object(o.createElement)(o.Fragment,null,S),h&&"right"===b&&Object(o.createElement)(G.a,{icon:h,size:g}),_);return A?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(z,{text:w||O,shortcut:v,position:E},I),w&&Object(o.createElement)(q.a,null,Object(o.createElement)("span",{id:N},w))):Object(o.createElement)(o.Fragment,null,I,w&&Object(o.createElement)(q.a,null,Object(o.createElement)("span",{id:N},w)))}))},function(e,t,r){var n=r(76),o=r(58),i=o.setStyleProp,c=n.html,s=n.svg,a=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],a(t)?d[t]=n:(r=t.toLowerCase(),l.call(c,r)?d[(u=c[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(s,t)?d[(u=s[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return i(e.style,d),d}},function(e,t,r){var n=r(3),o=r(80).default,i={reactCompat:!0},c=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:c,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,i={},c={};for(r in e)n=e[r],o&&(i=t(r,n))&&2===i.length?c[i[0]]=i[1]:"string"==typeof n&&(c[n]=r);return c},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,i))}}},function(e,t,r){for(var n,o=r(86).CASE_SENSITIVE_TAG_NAMES,i={},c=0,s=o.length;c{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},,,function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var a,l=[],u=!1,d=-1;function p(){u&&a&&(u=!1,a.length?l=a.concat(l):d=-1,l.length&&f())}function f(){if(!u){var e=s(p);u=!0;for(var t=l.length;t;){for(a=l,l=[];++d1)for(var r=1;r{let{bubbles:r=!1,cancelable:o=!1,element:i,detail:c={}}=t;if(!n)return;i||(i=document.body);const s=new n(e,{bubbles:r,cancelable:o,detail:c});i.dispatchEvent(s)};let i;const c=()=>{i&&clearTimeout(i),i=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},s=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const i=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,i),()=>jQuery(document).off(e,i)}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},function(e,t,r){"use strict";var n=r(10),o=r.n(n),i=r(0);r(101);const c=e=>{if(!e)return;const t=e.getBoundingClientRect().bottom;t>=0&&t<=window.innerHeight||e.scrollIntoView()};t.a=e=>t=>{const r=Object(i.useRef)(null);return Object(i.createElement)(i.Fragment,null,Object(i.createElement)("div",{className:"with-scroll-to-top__scroll-point",ref:r,"aria-hidden":!0}),Object(i.createElement)(e,o()({},t,{scrollToTop:e=>{null!==r.current&&((e,t)=>{const{focusableSelector:r}=t||{};window&&Number.isFinite(window.innerHeight)&&(r?((e,t)=>{var r;const n=(null===(r=e.parentElement)||void 0===r?void 0:r.querySelectorAll(t))||[];if(n.length){const e=n[0];c(e),null==e||e.focus()}else c(e)})(e,r):c(e))})(r.current,e)}})))}},,,function(e,t){},function(e,t,r){var n=r(3),o=r(57),i=r(58),c=i.setStyleProp;function s(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var i,a,l,u,d=(r=r||{}).library||n,p=d.cloneElement,f=d.createElement,m=d.isValidElement,h=[],b="function"==typeof r.replace,g=r.trim,y=0,E=t.length;y1&&(a=p(a,{key:a.key||y})),h.push(a);else if("text"!==i.type){switch(l=i.attribs,s(i)?c(l.style,l):l&&(l=o(l)),u=null,i.type){case"script":case"style":i.children[0]&&(l.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?l.defaultValue=i.children[0].data:i.children&&i.children.length&&(u=e(i.children,r));break;default:continue}E>1&&(l.key=y),h.push(f(i.name,l,u))}else g?i.data.trim()&&h.push(i.data):h.push(i.data);return 1===h.length?h[0]:h}},function(e,t,r){var n=r(77),o=r(78),i=r(79),c=i.MUST_USE_PROPERTY,s=i.HAS_BOOLEAN_VALUE,a=i.HAS_NUMERIC_VALUE,l=i.HAS_POSITIVE_NUMERIC_VALUE,u=i.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,i,p=e.Properties,f=e.DOMAttributeNames;for(o in p)n=f[o]||(r?o:o.toLowerCase()),i=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(i,c),hasBooleanValue:d(i,s),hasNumericValue:d(i,a),hasPositiveNumericValue:d(i,l),hasOverloadedBooleanValue:d(i,u)}}var f={};p(n,f);var m={};p(o,m,!0);var h={};p(n,h),p(o,h,!0),e.exports={html:f,svg:m,properties:h,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(81)),i=r(83);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[i.camelCase(e,t)]=n)})),r):r}},function(e,t,r){var n=r(82);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var i,c,s=n(e),a="function"==typeof t,l=0,u=s.length;l/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(s);return r&&r[1]&&(t=r[1],c&&(e=e.replace(r[0],""))),i(n(e),null,t)}},function(e,t,r){var n=r(59),o=/<([a-zA-Z]+[0-9]?)/,i=//i,c=//i,s=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,a=n.isIE(9),l=a||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,f=a?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+""),a&&(e=e.replace(s,"<$1$2$3/>")),p.parseFromString(e,f)}}if(document.implementation){var m=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return m.documentElement.getElementsByTagName(t)[0].innerHTML=e,m;try{return m.documentElement.innerHTML=e,m}catch(t){if(d)return d(e)}}}var h,b=document.createElement("template");b.content&&(h=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,s,a=e.match(o);switch(a&&a[1]&&(t=a[1].toLowerCase()),t){case"html":return r=d(e),i.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),c.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return s=u(e).getElementsByTagName(t),c.test(e)&&i.test(e)?s[0].parentNode.childNodes:s;default:return h?h(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,r){"use strict";r.d(t,"b",(function(){return h})),r.d(t,"a",(function(){return b}));var n=r(0),o=(r(8),r(9)),i=r(38),c=r(18),s=r(10),a=r.n(s),l=r(4),u=r.n(l),d=r(116);r(74);const p=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 f=e=>{let{className:t,notices:r,removeNotice:o}=e;const i=r.filter(e=>"snackbar"!==e.type);if(!i.length)return null;const c=u()(t,"wc-block-components-notices");return Object(n.createElement)("div",{className:c},i.map(e=>Object(n.createElement)(d.a,a()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(n.createContext)({notices:[],createNotice:(e,t,r)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),h=()=>Object(n.useContext)(m),b=e=>{let{children:t,className:r="",createNoticeContainer:s=!0,context:a="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(n.useState)(!1),{dispatchStoreEvent:h}=Object(i.a)(),{isEditor:b}=Object(c.a)(),g=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...r,context:r.context||a}),h("store-notice-create",{status:e,content:t,options:r})}),[l,h,a]),y=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a;u(e,t)}),[u,a]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(a)}),[a]),v={notices:E,createNotice:g,removeNotice:y,context:a,setIsSuppressed:p},O=d?null:Object(n.createElement)(f,{className:r,notices:v.notices,removeNotice:v.removeNotice,isEditor:b});return Object(n.createElement)(m.Provider,{value:v},s&&O,t)}},function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},i=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return s}));var n=r(5);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const i={addEventCallback:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(n.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:r}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},c={},s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,{type:t,eventType:r,id:n,callback:i,priority:s}=arguments.length>1?arguments[1]:void 0;const a=e.hasOwnProperty(r)?new Map(e[r]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return a.set(n,{priority:s,callback:i}),{...e,[r]:a};case o.REMOVE_EVENT_CALLBACK:return a.delete(n),{...e,[r]:a}}}},function(e,t,r){"use strict";var n=r(0),o=r(24);const i=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)(o.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"}));t.a=i},function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(10)),i=n(r(120)),c=r(3),s=n(c),a=n(r(121)),l=n(r(123)),u={arr:Array.isArray,obj:function(e){return"[object Object]"===Object.prototype.toString.call(e)},fun:function(e){return"function"==typeof e},str:function(e){return"string"==typeof e},num:function(e){return"number"==typeof e},und:function(e){return void 0===e},nul:function(e){return null===e},set:function(e){return e instanceof Set},map:function(e){return e instanceof Map},equ:function(e,t){if(typeof e!=typeof t)return!1;if(u.str(e)||u.num(e))return e===t;if(u.obj(e)&&u.obj(t)&&Object.keys(e).length+Object.keys(t).length===0)return!0;var r;for(r in e)if(!(r in t))return!1;for(r in t)if(e[r]!==t[r])return!1;return!u.und(r)||e===t}};function d(){var e=c.useState(!1)[1];return c.useCallback((function(){return e((function(e){return!e}))}),[])}function p(e,t){return u.und(e)||u.nul(e)?t:e}function f(e){return u.und(e)?[]:u.arr(e)?e:[e]}function m(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=r.length)break;i=r[o++]}else{if((o=r.next()).done)break;i=o.value}for(var c=i,s=!1,a=0;a=f.startTime+l.duration;else if(l.decay)b=m+E/(1-.998)*(1-Math.exp(-(1-.998)*(t-f.startTime))),(u=Math.abs(f.lastPosition-b)<.1)&&(h=b);else{d=void 0!==f.lastTime?f.lastTime:t,E=void 0!==f.lastVelocity?f.lastVelocity:l.initialVelocity,t>d+64&&(d=t);for(var v=Math.floor(t-d),O=0;Oh:b=e);++r);return r-1}(e,i);return function(e,t,r,n,o,i,c,s,a){var l=a?a(e):e;if(lr){if("identity"===s)return l;"clamp"===s&&(l=r)}return n===o?n:t===r?e<=t?n:o:(t===-1/0?l=-l:r===1/0?l-=t:l=(l-t)/(r-t),l=i(l),n===-1/0?l=-l:o===1/0?l+=n:l=l*(o-n)+n,l)}(e,i[t],i[t+1],o[t],o[t+1],a,c,s,n.map)}}var B=function(e){function t(r,n,o,i){var c;return(c=e.call(this)||this).calc=void 0,c.payload=r instanceof E&&!(r instanceof t)?r.getPayload():Array.isArray(r)?r:[r],c.calc=V(n,o,i),c}a(t,e);var r=t.prototype;return r.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},r.updateConfig=function(e,t,r){this.calc=V(e,t,r)},r.interpolate=function(e,r,n){return new t(this,e,r,n)},t}(E),U=function(e){function t(t){var r;return(r=e.call(this)||this).animatedStyles=new Set,r.value=void 0,r.startPosition=void 0,r.lastPosition=void 0,r.lastVelocity=void 0,r.startTime=void 0,r.lastTime=void 0,r.done=!1,r.setValue=function(e,t){void 0===t&&(t=!0),r.value=e,t&&r.flush()},r.value=t,r.startPosition=t,r.lastPosition=t,r}a(t,e);var r=t.prototype;return r.flush=function(){0===this.animatedStyles.size&&function e(t,r){"update"in t?r.add(t):t.getChildren().forEach((function(t){return e(t,r)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},r.clearStyles=function(){this.animatedStyles.clear()},r.getValue=function(){return this.value},r.interpolate=function(e,t,r){return new B(this,e,t,r)},t}(y),H=function(e){function t(t){var r;return(r=e.call(this)||this).payload=t.map((function(e){return new U(e)})),r}a(t,e);var r=t.prototype;return r.setValue=function(e,t){var r=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,n){return r.payload[n].setValue(e,t)})):this.payload.forEach((function(r){return r.setValue(e,t)}))},r.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},r.interpolate=function(e,t){return new B(this,e,t)},t}(E),z=0,G=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=z++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=h(e),r=t.delay,n=void 0===r?0:r,c=t.to,s=i(t,["delay","to"]);if(u.arr(c)||u.fun(c))this.queue.push(o({},s,{delay:n,to:c}));else if(c){var a={};Object.entries(c).forEach((function(e){var t,r=e[0],i=e[1],c=o({to:(t={},t[r]=i,t),delay:m(n,r)},s),l=a[c.delay]&&a[c.delay].to;a[c.delay]=o({},a[c.delay],c,{to:o({},l,c.to)})})),this.queue=Object.values(a)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var r=e.from,n=void 0===r?{}:r,i=e.to,c=void 0===i?{}:i;u.obj(n)&&(t.merged=o({},n,t.merged)),u.obj(c)&&(t.merged=o({},t.merged,c))}));var r=this.local=++this.guid,n=this.localQueue=this.queue;this.queue=[],n.forEach((function(o,c){var s=o.delay,a=i(o,["delay"]),l=function(o){c===n.length-1&&r===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},d=u.arr(a.to)||u.fun(a.to);s?setTimeout((function(){r===t.guid&&(d?t.runAsync(a,l):t.diff(a).start(l))}),s):d?t.runAsync(a,l):t.diff(a).start(l)}))}else u.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,L.has(this)||L.add(this),D||(D=!0,k(P||F));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,L.has(this)&&L.delete(this)),this},t.runAsync=function(e,t){var r=this,n=(e.delay,i(e,["delay"])),c=this.local,s=Promise.resolve(void 0);if(u.arr(n.to))for(var a=function(e){var t=e,i=o({},n,h(n.to[t]));u.arr(i.config)&&(i.config=i.config[t]),s=s.then((function(){if(c===r.guid)return new Promise((function(e){return r.diff(i).start(e)}))}))},l=0;l=n.length)return"break";c=n[i++]}else{if((i=n.next()).done)return"break";c=i.value}var r=c.key,s=function(e){return e.key!==r};(u.und(t)||t===r)&&(e.current.instances.delete(r),e.current.transitions=e.current.transitions.filter(s),e.current.deleted=e.current.deleted.filter(s))},n=e.current.deleted,o=Array.isArray(n),i=0;for(n=o?n:n[Symbol.iterator]();;){var c;if("break"===r())break}e.current.forceUpdate()}var K=function(e){function t(t){var r;return void 0===t&&(t={}),r=e.call(this)||this,!t.transform||t.transform instanceof y||(t=b.transform(t)),r.payload=t,r}return a(t,e),t}(v),J={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Q="[-+]?\\d*\\.?\\d+";function Z(){for(var e=arguments.length,t=new Array(e),r=0;r1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function le(e,t,r){var n=r<.5?r*(1+t):r+t-r*t,o=2*r-n,i=ae(o,n,e+1/3),c=ae(o,n,e),s=ae(o,n,e-1/3);return Math.round(255*i)<<24|Math.round(255*c)<<16|Math.round(255*s)<<8}function ue(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function de(e){return(parseFloat(e)%360+360)%360/360}function pe(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function fe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function me(e){var t,r,n="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(r=ce.exec(t))?parseInt(r[1]+"ff",16)>>>0:J.hasOwnProperty(t)?J[t]:(r=ee.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|255)>>>0:(r=te.exec(t))?(ue(r[1])<<24|ue(r[2])<<16|ue(r[3])<<8|pe(r[4]))>>>0:(r=oe.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+"ff",16)>>>0:(r=se.exec(t))?parseInt(r[1],16)>>>0:(r=ie.exec(t))?parseInt(r[1]+r[1]+r[2]+r[2]+r[3]+r[3]+r[4]+r[4],16)>>>0:(r=re.exec(t))?(255|le(de(r[1]),fe(r[2]),fe(r[3])))>>>0:(r=ne.exec(t))?(le(de(r[1]),fe(r[2]),fe(r[3]))|pe(r[4]))>>>0:null;return null===n?e:"rgba("+((4278190080&(n=n||0))>>>24)+", "+((16711680&n)>>>16)+", "+((65280&n)>>>8)+", "+(255&n)/255+")"}var he=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,be=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,ge=new RegExp("("+Object.keys(J).join("|")+")","g"),ye={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ee=["Webkit","Ms","Moz","O"];function ve(e,t,r){return null==t||"boolean"==typeof t||""===t?"":r||"number"!=typeof t||0===t||ye.hasOwnProperty(e)&&ye[e]?(""+t).trim():t+"px"}ye=Object.keys(ye).reduce((function(e,t){return Ee.forEach((function(r){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(r,t)]=e[t]})),e}),ye);var Oe={};N((function(e){return new K(e)})),T("div"),w((function(e){var t=e.output.map((function(e){return e.replace(be,me)})).map((function(e){return e.replace(ge,me)})),r=t[0].match(he).map((function(){return[]}));t.forEach((function(e){e.match(he).forEach((function(e,t){return r[t].push(+e)}))}));var n=t[0].match(he).map((function(t,n){return V(o({},e,{output:r[n]}))}));return function(e){var r=0;return t[0].replace(he,(function(){return n[r++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,r,n,o){return"rgba("+Math.round(t)+", "+Math.round(r)+", "+Math.round(n)+", "+o+")"}))}})),_(J),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var r=t.style,n=t.children,o=t.scrollTop,c=t.scrollLeft,s=i(t,["style","children","scrollTop","scrollLeft"]),a="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var l in void 0!==o&&(e.scrollTop=o),void 0!==c&&(e.scrollLeft=c),void 0!==n&&(e.textContent=n),r)if(r.hasOwnProperty(l)){var u=0===l.indexOf("--"),d=ve(l,r[l],u);"float"===l&&(l="cssFloat"),u?e.style.setProperty(l,d):e.style[l]=d}for(var p in s){var f=a?p:Oe[p]||(Oe[p]=p.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(f)&&e.setAttribute(f,s[p])}}),(function(e){return e}));var _e,Se,ke=(_e=function(e){return c.forwardRef((function(t,r){var n=d(),a=c.useRef(!0),l=c.useRef(null),p=c.useRef(null),f=c.useCallback((function(e){var t=l.current;l.current=new I(e,(function(){var e=!1;p.current&&(e=b.fn(p.current,l.current.getAnimatedValue())),p.current&&!1!==e||n()})),t&&t.detach()}),[]);c.useEffect((function(){return function(){a.current=!1,l.current&&l.current.detach()}}),[]),c.useImperativeHandle(r,(function(){return A(p,a,n)})),f(t);var m,h=l.current.getValue(),g=(h.scrollTop,h.scrollLeft,i(h,["scrollTop","scrollLeft"])),y=(m=e,!u.fun(m)||m.prototype instanceof s.Component?function(e){return p.current=function(e,t){return t&&(u.fun(t)?t(e):u.obj(t)&&(t.current=e)),e}(e,r)}:void 0);return s.createElement(e,o({},g,{ref:y}))}))},void 0===(Se=!1)&&(Se=!0),function(e){return(u.arr(e)?e:Object.keys(e)).reduce((function(e,t){var r=Se?t[0].toLowerCase()+t.substring(1):t;return e[r]=_e(r),e}),_e)}),je=ke(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=ke,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=F,t.animated=je,t.a=je,t.interpolate=function(e,t,r){return e&&new B(e,t,r)},t.Globals=M,t.useSpring=function(e){var t=u.fun(e),r=q(1,t?e:[e]),n=r[0],o=r[1],i=r[2];return t?[n[0],o,i]:n},t.useTrail=function(e,t){var r=c.useRef(!1),n=u.fun(t),i=m(t),s=c.useRef(),a=q(e,(function(e,t){return 0===e&&(s.current=[]),s.current.push(t),o({},i,{config:m(i.config,e),attach:e>0&&function(){return s.current[e-1]}})})),l=a[0],d=a[1],p=a[2],f=c.useMemo((function(){return function(e){return d((function(t,r){e.reverse;var n=e.reverse?t+1:t-1,c=s.current[n];return o({},e,{config:m(e.config||i.config,t),attach:c&&function(){return c}})}))}}),[e,i.reverse]);return c.useEffect((function(){r.current&&!n&&f(t)})),c.useEffect((function(){r.current=!0}),[]),n?[l,f,p]:l},t.useTransition=function(e,t,r){var n=o({items:e,keys:t||function(e){return e}},r),s=$(n),a=s.lazy,l=void 0!==a&&a,u=(s.unique,s.reset),p=void 0!==u&&u,f=(s.enter,s.leave,s.update,s.onDestroyed),h=(s.keys,s.items,s.onFrame),b=s.onRest,g=s.onStart,y=s.ref,E=i(s,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),v=d(),O=c.useRef(!1),_=c.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!n.ref,instances:!O.current&&new Map,forceUpdate:v});return c.useImperativeHandle(n.ref,(function(){return{start:function(){return Promise.all(Array.from(_.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(_.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(_.current.instances).map((function(e){return e[1]}))}}})),_.current=function(e,t){for(var r=e.first,n=e.prevProps,c=i(e,["first","prevProps"]),s=$(t),a=s.items,l=s.keys,u=s.initial,d=s.from,p=s.enter,f=s.leave,h=s.update,b=s.trail,g=void 0===b?0:b,y=s.unique,E=s.config,v=s.order,O=void 0===v?["enter","leave","update"]:v,_=$(n),S=_.keys,k=_.items,j=o({},c.current),w=[].concat(c.deleted),C=Object.keys(j),R=new Set(C),T=new Set(l),x=l.filter((function(e){return!R.has(e)})),P=c.transitions.filter((function(e){return!e.destroyed&&!T.has(e.originalKey)})).map((function(e){return e.originalKey})),A=l.filter((function(e){return R.has(e)})),N=-g;O.length;)switch(O.shift()){case"enter":x.forEach((function(e,t){y&&w.find((function(t){return t.originalKey===e}))&&(w=w.filter((function(t){return t.originalKey!==e})));var n=l.indexOf(e),o=a[n],i=r&&void 0!==u?"initial":"enter";j[e]={slot:i,originalKey:e,key:y?String(e):W++,item:o,trail:N+=g,config:m(E,o,i),from:m(r&&void 0!==u?u||{}:d,o),to:m(p,o)}}));break;case"leave":P.forEach((function(e){var t=S.indexOf(e),r=k[t];w.unshift(o({},j[e],{slot:"leave",destroyed:!0,left:S[Math.max(0,t-1)],right:S[Math.min(S.length,t+1)],trail:N+=g,config:m(E,r,"leave"),to:m(f,r)})),delete j[e]}));break;case"update":A.forEach((function(e){var t=l.indexOf(e),r=a[t];j[e]=o({},j[e],{item:r,slot:"update",trail:N+=g,config:m(E,r,"update"),to:m(h,r)})}))}var M=l.map((function(e){return j[e]}));return w.forEach((function(e){var t,r=e.left,n=(e.right,i(e,["left","right"]));-1!==(t=M.findIndex((function(e){return e.originalKey===r})))&&(t+=1),t=Math.max(0,t),M=[].concat(M.slice(0,t),[n],M.slice(t))})),o({},c,{changed:x.length||P.length||A.length,first:r&&0===x.length,transitions:M,current:j,deleted:w,prevProps:t})}(_.current,n),_.current.changed&&_.current.transitions.forEach((function(e){var t=e.slot,r=e.from,n=e.to,i=e.config,c=e.trail,s=e.key,a=e.item;_.current.instances.has(s)||_.current.instances.set(s,new G);var u=_.current.instances.get(s),d=o({},E,{to:n,from:r,config:i,ref:y,onRest:function(r){_.current.mounted&&(e.destroyed&&(y||l||X(_,s),f&&f(a)),!Array.from(_.current.instances).some((function(e){return!e[1].idle}))&&(y||l)&&_.current.deleted.length>0&&X(_),b&&b(a,t,r))},onStart:g&&function(){return g(a,t)},onFrame:h&&function(e){return h(a,t,e)},delay:c,reset:p&&"enter"===t});u.update(d),_.current.paused||u.start()})),c.useEffect((function(){return _.current.mounted=O.current=!0,function(){_.current.mounted=O.current=!1,Array.from(_.current.instances).map((function(e){return e[1].destroy()})),_.current.instances.clear()}}),[]),_.current.transitions.map((function(e){var t=e.item,r=e.slot,n=e.key;return{item:t,key:n,state:r,props:_.current.instances.get(n).getValues()}}))},t.useChain=function(e,t,r){void 0===r&&(r=1e3);var n=c.useRef();c.useEffect((function(){u.equ(e,n.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,n){var i=e.current;if(i){var c=i.controllers;if(c.length){var s=r*t[n];c.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+s})})),e.start()}))}}})):e.reduce((function(e,t,r){var n=t.current;return e.then((function(){return n.start()}))}),Promise.resolve()),n.current=e}))},t.useSprings=q},,,,,,,function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:r,height:r,...o}):null}},function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(9),o=r(0),i=r(6),c=r(54);const s=()=>{const e=Object(c.a)(),{selectShippingRate:t}=Object(n.useDispatch)(i.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((r,n)=>{t(r,n).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(n.useSelect)(e=>e(i.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,function(e,t){},,,,,,function(e,t,r){"use strict";(function(e){var n=r(0),o=r(5),i=r(4),c=r.n(i),s=r(23),a=r(1),l=(r(45),r(56));t.a=Object(n.forwardRef)((function({className:t,children:r,spokenMessage:i=r,politeness:u="polite",actions:d=[],onRemove:p=o.noop,icon:f=null,explicitDismiss:m=!1,onDismiss:h=o.noop},b){function g(e){e&&e.preventDefault&&e.preventDefault(),h(),p()}h=h||o.noop,function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(s.speak)(r,t)},[r,t])}(i,u),Object(n.useEffect)(()=>{const e=setTimeout(()=>{m||(h(),p())},1e4);return()=>clearTimeout(e)},[h,p]);const y=c()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!m});d&&d.length>1&&(void 0!==e&&e.env,d=[d[0]]);const E=c()("components-snackbar__content",{"components-snackbar__content-with-icon":!!f});return Object(n.createElement)("div",{ref:b,className:y,onClick:m?o.noop:g,tabIndex:"0",role:m?"":"button",onKeyPress:m?o.noop:g,"aria-label":m?"":Object(a.__)("Dismiss this notice")},Object(n.createElement)("div",{className:E},f&&Object(n.createElement)("div",{className:"components-snackbar__icon"},f),r,d.map(({label:e,onClick:t,url:r},o)=>Object(n.createElement)(l.a,{key:o,href:r,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),p(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),m&&Object(n.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:g,onKeyPress:g},"✕")))}))}).call(this,r(65))},function(e,t){e.exports=window.wp.plugins},function(e,t,r){"use strict";r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return s})),r.d(t,"a",(function(){return a}));var n=r(2),o=r(50),i=r(34);const c=e=>{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},s=e=>{let{email:t=""}=e;return Object(i.isEmail)(t)?t.trim():""},a=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(i[r]="")}),i}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,r){"use strict";var n=r(0),o=r(5),i=r(4),c=r.n(i),s=r(1),a=r(23),l=r(90),u=r(56);function d(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:r,spokenMessage:i=r,onRemove:p=o.noop,isDismissible:f=!0,actions:m=[],politeness:h=d(t),__unstableHTML:b,onDismiss:g=o.noop}){!function(e,t){const r="string"==typeof e?e:Object(n.renderToString)(e);Object(n.useEffect)(()=>{r&&Object(a.speak)(r,t)},[r,t])}(i,h);const y=c()(e,"components-notice","is-"+t,{"is-dismissible":f});return b&&(r=Object(n.createElement)(n.RawHTML,null,r)),Object(n.createElement)("div",{className:y},Object(n.createElement)("div",{className:"components-notice__content"},r,Object(n.createElement)("div",{className:"components-notice__actions"},m.map(({className:e,label:t,isPrimary:r,variant:o,noDefaultClasses:i=!1,onClick:s,url:a},l)=>{let d=o;return"primary"===o||i||(d=a?"link":"secondary"),void 0===d&&r&&(d="primary"),Object(n.createElement)(u.a,{key:l,href:a,variant:d,onClick:a?void 0:s,className:c()("components-notice__action",e)},t)}))),f&&Object(n.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),p()},showTooltip:!1}))}},,,function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),o=r(53),i=r(61),c=r.n(i),s=r(13);const a=(e,t)=>e&&t[e]?t[e]:null,l=e=>{let{block:t,blockMap:r,blockWrapper:o,children:i,depth:u=1}=e;return i&&0!==i.length?Array.from(i).map((e,i)=>{const{blockName:d="",...p}={key:`${t}_${u}_${i}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},f=a(d,r);if(!f){const i=c()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof i&&i)return i;if(!Object(n.isValidElement)(i))return null;const s=e.childNodes.length?l({block:t,blockMap:r,children:e.childNodes,depth:u+1,blockWrapper:o}):void 0;return s?Object(n.cloneElement)(i,p,s):Object(n.cloneElement)(i,p)}const m=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${u}_${i}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(m,null,Object(n.createElement)(f,p,l({block:t,blockMap:r,children:e.children,depth:u+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(s.hasInnerBlocks)(e))return null;const i=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],c=Object(s.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!i.includes(t)}),l=o||n.Fragment;return Object(n.createElement)(l,null,c.map((e,r)=>{let{blockName:o,component:i}=e;const c=i||a(o,t);return c?Object(n.createElement)(c,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},u=e=>{let{Block:t,selector:r,blockName:n,getProps:i=(()=>({})),blockMap:c,blockWrapper:s}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=l({block:n,blockMap:c,children:e.children||[],blockWrapper:s});return{...i(e,t),children:r}}})}},function(e,t){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,r){var n=r(122);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){function r(t,n){return e.exports=r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,r(t,n)}e.exports=r,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){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,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(0),o=r(108),i=r(2),c=r(16),s=r(204),a=r(44),l=r(33),u=r(31),d=r(1),p=r(27),f=r.n(p),m=r(109),h=r(88);const b=(e,t,r)=>{const n=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${r}-new-payment-method`;return n.push({key:o,value:t}),n},g=(e,t)=>{f.a.setNonce&&"function"==typeof f.a.setNonce&&f.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var y=r(160),E=r(22),v=r(32),O=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:r,redirectUrl:o,isProcessing:i,isBeforeProcessing:c,isComplete:p,orderNotes:O,shouldCreateAccount:_,extensionData:S}=Object(u.b)(),{hasValidationErrors:k}=Object(y.b)(),{shippingErrorStatus:j}=Object(a.b)(),{billingData:w,shippingAddress:C}=Object(l.b)(),{cartNeedsPayment:R,receiveCart:T}=Object(E.a)(),{activePaymentMethod:x,isExpressPaymentMethodActive:P,currentStatus:A,paymentMethodData:N,expressPaymentMethods:M,paymentMethods:I,shouldSavePayment:D}=Object(s.b)(),{addErrorNotice:L,removeNotice:F,setIsSuppressed:V}=Object(v.a)(),B=Object(n.useRef)(w),U=Object(n.useRef)(C),H=Object(n.useRef)(o),[z,G]=Object(n.useState)(!1),q=Object(n.useMemo)(()=>{var e;const t={...M,...I};return null==t||null===(e=t[x])||void 0===e?void 0:e.paymentMethodId},[x,M,I]),W=k&&!P||A.hasError||j.hasError,Y=!e&&!W&&(A.isSuccessful||!R)&&i;Object(n.useEffect)(()=>{V(P)},[P,V]),Object(n.useEffect)(()=>{W===e||!i&&!c||P||r.setHasError(W)},[W,e,i,c,P,r]),Object(n.useEffect)(()=>{B.current=w,U.current=C,H.current=o},[w,C,o]);const $=Object(n.useCallback)(()=>!k&&(A.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!j.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[k,A.hasError,j.hasError]);Object(n.useEffect)(()=>{let e;return P||(e=t($,0)),()=>{P||e()}},[t,$,P]),Object(n.useEffect)(()=>{H.current&&(window.location.href=H.current)},[p]);const X=Object(n.useCallback)(async()=>{if(z)return;G(!0),F("checkout");const e=R?{payment_method:q,payment_data:b(N,D,x)}:{},t={billing_address:Object(m.a)(B.current),shipping_address:Object(m.a)(U.current),customer_note:O,should_create_account:_,...e,extensions:{...S}};f()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(g(e.headers,r),!e.ok)throw new Error(e);return e.json()}).then(e=>{r.setAfterProcessing(e),G(!1)}).catch(e=>{try{null!=e&&e.headers&&g(e.headers,r),e.json().then(e=>{var t,n,o;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),L(Object(h.b)(e),{id:"checkout"}),null==e||null===(n=e.additional_errors)||void 0===n||null===(o=n.forEach)||void 0===o||o.call(n,e=>{L(e.message,{id:e.error_code})}),r.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text. +Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}r.setHasError(!0),G(!1)})},[z,F,O,_,R,q,N,D,x,S,r,L,T]);return Object(n.useEffect)(()=>{Y&&!z&&X()},[X,Y,z]),null};const _=e=>{let{children:t,isCart:r=!1,redirectUrl:d}=e;return Object(n.createElement)(u.a,{redirectUrl:d,isCart:r},Object(n.createElement)(l.a,null,Object(n.createElement)(a.a,null,Object(n.createElement)(s.a,null,t,Object(n.createElement)(c.a,{renderError:i.CURRENT_USER_IS_ADMIN?null:()=>null},Object(n.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(n.createElement)(O,null)))))}},,,,,,,,function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return i}));var n=r(0);const o=Object(n.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),i=(Object(n.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),()=>Object(n.useContext)(o))},,function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=(e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r}},,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return l}));var n=r(0),o=r(5),i=r(11),c=r.n(i);const s=Object(n.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),a=()=>Object(n.useContext)(s),l=e=>{let{children:t}=e;const[r,i]=Object(n.useState)({}),a=Object(n.useCallback)(e=>r[e],[r]),l=Object(n.useCallback)(e=>{const t=r[e];return!t||t.hidden?"":"validate-error-"+e},[r]),u=Object(n.useCallback)(e=>{i(t=>{if(!t[e])return t;const{[e]:r,...n}=t;return n})},[]),d=Object(n.useCallback)(()=>{i({})},[]),p=Object(n.useCallback)(e=>{e&&i(t=>(e=Object(o.pickBy)(e,(e,r)=>!("string"!=typeof e.message||t.hasOwnProperty(r)&&c()(t[r],e))),0===Object.values(e).length?t:{...t,...e}))},[]),f=Object(n.useCallback)((e,t)=>{i(r=>{if(!r.hasOwnProperty(e))return r;const n={...r[e],...t};return c()(r[e],n)?r:{...r,[e]:n}})},[]),m={getValidationError:a,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!0})},[f]),showValidationError:Object(n.useCallback)(e=>{f(e,{hidden:!1})},[f]),showAllValidationErrors:Object(n.useCallback)(()=>{i(e=>{const t={};return Object.keys(e).forEach(r=>{e[r].hidden&&(t[r]={...e[r],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(r).length>0,getValidationErrorId:l};return Object(n.createElement)(s.Provider,{value:m},t)}},,,,function(e,t){},,,function(e,t){e.exports=window.wp.keycodes},,function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(89);const o=(e,t)=>function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const i=n.a.addEventCallback(e,r,o);return t(i),()=>{t(n.a.removeEventCallback(e,i.id))}}},function(e,t,r){"use strict";r.d(t,"a",(function(){return i})),r.d(t,"b",(function(){return c}));const n=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=r(29);const i=async(e,t,r)=>{const o=n(e,t),i=[];for(const e of o)try{const t=await Promise.resolve(e.callback(r));"object"==typeof t&&i.push(t)}catch(e){console.error(e)}return!i.length||i},c=async(e,t,r)=>{const i=[],c=n(e,t);for(const e of c)try{const t=await Promise.resolve(e.callback(r));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return i.push(t),i;i.push(t)}catch(e){return console.error(e),i.push({type:"error"}),i}return i}},,,,,,,,,,,,,,,,,,,,,function(e,t,r){e.exports=r(201)},function(e,t){},function(e,t){},function(e,t){},,,,,,,function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(134),i=r(22),c=r(11),s=r.n(c),a=r(31),l=r(160),u=r(14),d=r(119),p=r(66),f=r(13),m=r(154),h=r(149),b=r(147),g=r(146),y=r(145),E=r(152),v=r(156),O=r(151),_=r(148),S=r(150),k=r(153),j=r(155);r.p=p.k,Object(f.registerCheckoutBlock)({metadata:y,component:Object(n.lazy)(()=>r.e(35).then(r.bind(null,380)))}),Object(f.registerCheckoutBlock)({metadata:g,component:Object(n.lazy)(()=>r.e(34).then(r.bind(null,401)))}),Object(f.registerCheckoutBlock)({metadata:b,component:Object(n.lazy)(()=>r.e(33).then(r.bind(null,389)))}),Object(f.registerCheckoutBlock)({metadata:_,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(2),r.e(3),r.e(39)]).then(r.bind(null,391)))}),Object(f.registerCheckoutBlock)({metadata:h,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(2),r.e(3),r.e(32)]).then(r.bind(null,392)))}),Object(f.registerCheckoutBlock)({metadata:S,component:Object(n.lazy)(()=>Promise.all([r.e(1),r.e(40)]).then(r.bind(null,388)))}),Object(f.registerCheckoutBlock)({metadata:O,component:Object(n.lazy)(()=>r.e(38).then(r.bind(null,384)))}),Object(f.registerCheckoutBlock)({metadata:E,component:Object(n.lazy)(()=>r.e(36).then(r.bind(null,393)))}),Object(f.registerCheckoutBlock)({metadata:k,component:Object(n.lazy)(()=>r.e(41).then(r.bind(null,402)))}),Object(f.registerCheckoutBlock)({metadata:m,component:Object(n.lazy)(()=>r.e(31).then(r.bind(null,387)))}),Object(f.registerCheckoutBlock)({metadata:j,component:Object(n.lazy)(()=>r.e(42).then(r.bind(null,381)))}),Object(f.registerCheckoutBlock)({metadata:v,component:Object(n.lazy)(()=>Promise.all([r.e(0),r.e(1),r.e(2),r.e(4),r.e(37)]).then(r.bind(null,394)))});var w=r(1),C=r(4),R=r.n(C),T=r(32),x=r(87),P=r(124),A=r(211),N=r(16),M=r(214),I=r(2),D=r(71),L=(r(192),r(98)),F=r(24),V=Object(n.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));r(193);var B=()=>Object(n.createElement)("div",{className:"wc-block-checkout-empty"},Object(n.createElement)(L.a,{className:"wc-block-checkout-empty__image",alt:"",srcElement:V,size:100}),Object(n.createElement)("strong",{className:"wc-block-checkout-empty__title"},Object(w.__)("Your cart is empty!","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-empty__description"},Object(w.__)("Checkout is not available whilst your cart is empty—please take a look through our store and come back when you're ready to place an order.","woo-gutenberg-products-block")),p.i&&Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:p.i,className:"wp-block-button__link"},Object(w.__)("Browse store","woo-gutenberg-products-block")))),U=Object(n.createElement)(F.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"})),H=r(19);r(194);const z=["woocommerce_product_out_of_stock","woocommerce_rest_cart_product_is_not_purchasable","woocommerce_rest_cart_product_no_stock","woocommerce_rest_cart_product_sold_individually","woocommerce_rest_cart_item_error"],G=Object(I.getSetting)("checkoutData",{}),q=e=>{let{errorData:t}=e,r=Object(w.__)("Checkout error","woo-gutenberg-products-block");return z.includes(t.code)&&(r=Object(w.__)("There is a problem with your cart","woo-gutenberg-products-block")),Object(n.createElement)("strong",{className:"wc-block-checkout-error_title"},r)},W=e=>{let{errorData:t}=e,r=t.message;return z.includes(t.code)&&(r=r+" "+Object(w.__)("Please edit your cart and try again.","woo-gutenberg-products-block")),Object(n.createElement)("p",{className:"wc-block-checkout-error__description"},r)},Y=e=>{let{errorData:t}=e,r=Object(w.__)("Retry","woo-gutenberg-products-block"),o="javascript:window.location.reload(true)";return z.includes(t.code)&&(r=Object(w.__)("Edit your cart","woo-gutenberg-products-block"),o=p.c),Object(n.createElement)("span",{className:"wp-block-button"},Object(n.createElement)("a",{href:o,className:"wp-block-button__link"},r))};var $=()=>{const e={code:"",message:"",...G||{}},t={code:e.code||"unknown",message:Object(H.decodeEntities)(e.message)||Object(w.__)("There was a problem checking out. Please try again. If the problem persists, please get in touch with us so we can assist.","woo-gutenberg-products-block")};return Object(n.createElement)("div",{className:"wc-block-checkout-error"},Object(n.createElement)(L.a,{className:"wc-block-checkout-error__image",alt:"",srcElement:U,size:100}),Object(n.createElement)(q,{errorData:t}),Object(n.createElement)(W,{errorData:t}),Object(n.createElement)(Y,{errorData:t}))};const X=`${p.e}?redirect_to=${encodeURIComponent(window.location.href)}`,K=()=>{window.location.reload(!0)};var J=r(132);const Q=()=>Object(n.createElement)(n.Fragment,null,Object(w.__)("You must be logged in to checkout. ","woo-gutenberg-products-block"),Object(n.createElement)("a",{href:X},Object(w.__)("Click here to log in.","woo-gutenberg-products-block"))),Z=e=>{let{attributes:t,children:r}=e;const{hasOrder:o,customerId:c}=Object(a.b)(),{cartItems:s,cartIsLoading:l}=Object(i.a)(),{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:f,showPhoneField:m,requirePhoneField:h}=t;return l||0!==s.length?o?((e=>!e&&!Object(I.getSetting)("checkoutAllowsGuest",!1))(c)&&u&&Object(I.getSetting)("checkoutAllowsSignup",!1)&&Object(n.createElement)(Q,null),Object(n.createElement)(J.a.Provider,{value:{allowCreateAccount:u,showCompanyField:d,requireCompanyField:p,showApartmentField:f,showPhoneField:m,requirePhoneField:h}},r)):Object(n.createElement)($,null):Object(n.createElement)(B,null)},ee=e=>{let{scrollToTop:t}=e;const{hasNoticesOfType:r}=Object(T.a)(),{hasError:o,isIdle:i}=Object(a.b)(),{hasValidationErrors:c,showAllValidationErrors:s}=Object(l.b)(),u=i&&o&&(c||r("default"));return Object(n.useEffect)(()=>{let e;return u&&(s(),e=window.setTimeout(()=>{t({focusableSelector:"input:invalid, .has-error input"})},50)),()=>{clearTimeout(e)}},[u,t,s]),null};var te=Object(D.a)(e=>{let{attributes:t,children:r,scrollToTop:o}=e;return Object(n.createElement)(N.a,{header:Object(w.__)("Something went wrong…","woo-gutenberg-products-block"),text:Object(n.createInterpolateElement)(Object(w.__)("The checkout has encountered an unexpected error. . If the error persists, please get in touch with us so we can assist.","woo-gutenberg-products-block"),{button:Object(n.createElement)("button",{className:"wc-block-link-button",onClick:K})}),showErrorMessage:I.CURRENT_USER_IS_ADMIN},Object(n.createElement)(A.a,{context:"wc/checkout"},Object(n.createElement)(x.a,{context:"wc/checkout"},Object(n.createElement)(l.a,null,Object(n.createElement)(f.SlotFillProvider,null,Object(n.createElement)(P.a,null,Object(n.createElement)(M.a,{className:R()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(n.createElement)(Z,{attributes:t},r),Object(n.createElement)(ee,{scrollToTop:o}))))))))});const re={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(I.getSetting)("hasDarkEditorStyleSupport",!1)},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:Object(I.getSetting)("displayCartPricesIncludingTax",!1)}};Object(d.a)({Block:te,blockName:"woocommerce/checkout",selector:".wp-block-woocommerce-checkout",getProps:e=>({attributes:Object(o.a)(re,e instanceof HTMLElement?e.dataset:{})}),blockMap:Object(u.getRegisteredBlockComponents)("woocommerce/checkout"),blockWrapper:e=>{let{children:t}=e;const{extensions:r,receiveCart:o,...c}=Object(i.a)(),u=(()=>{const{dispatchActions:e,extensionData:t}=Object(a.b)(),r=Object(n.useRef)(t);Object(n.useEffect)(()=>{s()(t,r.current)||(r.current=t)},[t]);const o=Object(n.useCallback)((t,n,o)=>{const i=r.current[t]||{};e.setExtensionData({...r.current,[t]:{...i,[n]:o}})},[e]);return{extensionData:r.current,setExtensionData:o}})(),d=(()=>{const{hasValidationErrors:e,getValidationError:t,clearValidationError:r,hideValidationError:o,setValidationErrors:i}=Object(l.b)(),c="extensions-errors";return{hasValidationErrors:e,getValidationError:Object(n.useCallback)(e=>t(`${c}-${e}`),[t]),clearValidationError:Object(n.useCallback)(e=>r(`${c}-${e}`),[r]),hideValidationError:Object(n.useCallback)(e=>o(`${c}-${e}`),[o]),setValidationErrors:Object(n.useCallback)(e=>i(Object.fromEntries(Object.entries(e).map(e=>{let[t,r]=e;return[`${c}-${t}`,r]}))),[i])}})();return n.Children.map(t,e=>{if(Object(n.isValidElement)(e)){const t={extensions:r,cart:c,checkoutExtensionData:u,validation:d};return Object(n.cloneElement)(e,t)}return e})}})},,,function(e,t,r){"use strict";r.d(t,"b",(function(){return D})),r.d(t,"a",(function(){return L}));var n=r(0),o=r(35);let i,c;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(i||(i={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(c||(c={}));const s={currentStatus:i.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},a={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:i,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,paymentMethodData:r,shouldSavePaymentMethod:n=!1,errorMessage:o="",paymentMethods:a={},paymentMethod:l=""}=arguments.length>1?arguments[1]:void 0;switch(t){case i.PRISTINE:return{...s,...e,errorMessage:"",currentStatus:i.PRISTINE};case i.STARTED:return{...e,currentStatus:i.STARTED};case i.ERROR:return e.currentStatus!==i.ERROR?{...e,currentStatus:i.ERROR,errorMessage:o||e.errorMessage}:e;case i.FAILED:return e.currentStatus!==i.FAILED?{...e,currentStatus:i.FAILED,paymentMethodData:r||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case i.SUCCESS:return e.currentStatus!==i.SUCCESS?{...e,currentStatus:i.SUCCESS,paymentMethodData:r||e.paymentMethodData}:e;case i.PROCESSING:return e.currentStatus!==i.PROCESSING?{...e,currentStatus:i.PROCESSING,errorMessage:""}:e;case i.COMPLETE:return e.currentStatus!==i.COMPLETE?{...e,currentStatus:i.COMPLETE}:e;case c.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:a};case c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:a};case c.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:n};case c.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:l,paymentMethodData:r||e.paymentMethodData}}},u=r(1),d=r(14),p=r(17),f=r(2),m=r(52),h=r(18),b=r(44),g=r(33),y=r(22),E=r(32),v=r(29);const O=(e,t,r,o)=>{const[i,c]=Object(n.useState)(!1),{isEditor:s}=Object(h.a)(),{selectedRates:a}=Object(b.b)(),{billingData:l,shippingAddress:d}=Object(g.b)(),v=Object(p.a)(a),O=Object(p.a)(r),_=Object(y.a)(),{cartTotals:S,cartIsLoading:k,cartNeedsShipping:j,paymentRequirements:w}=_,C=Object(n.useRef)({cart:_,cartTotals:S,cartNeedsShipping:j,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:w}),{addErrorNotice:R}=Object(E.a)();Object(n.useEffect)(()=>{C.current={cart:_,cartTotals:S,cartNeedsShipping:j,billingData:l,shippingAddress:d,selectedShippingMethods:v,paymentRequirements:w}},[_,S,j,l,d,v,w]);const T=Object(n.useCallback)(async()=>{let r={};const n=e=>{r={...r,[e.name]:e}};for(let e=0;e{k||x()},[x,_,v,l,k]),i},_=e=>({type:e}),S=e=>({type:i.ERROR,errorMessage:e}),k=e=>{let{errorMessage:t,paymentMethodData:r}=e;return{type:i.FAILED,errorMessage:t,paymentMethodData:r}},j=e=>{let{paymentMethodData:t}=e;return{type:i.SUCCESS,paymentMethodData:t}},w=e=>({type:c.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:c.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),R=e=>({type:c.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),T=(e,t)=>({type:c.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var x=r(31),P=r(89),A=r(169);var N=r(170),M=r(160);const I=Object(n.createContext)(a),D=()=>Object(n.useContext)(I),L=e=>{let{children:t}=e;const{isProcessing:r,isIdle:c,isCalculating:a,hasError:u}=Object(x.b)(),{isEditor:p,getPreviewData:m}=Object(h.a)(),{setValidationErrors:y}=Object(M.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:F,isErrorResponse:V,isFailResponse:B,noticeContexts:U}=Object(v.c)(),[H,z]=Object(n.useReducer)(P.b,{}),{onPaymentProcessing:G}=(e=>Object(n.useMemo)(()=>({onPaymentProcessing:Object(A.a)("payment_processing",e)}),[e]))(z),q=Object(n.useRef)(H);Object(n.useEffect)(()=>{q.current=H},[H]);const[W,Y]=Object(n.useReducer)(l,s),{dispatchActions:$,setPaymentStatus:X}=(e=>{const{setBillingData:t}=Object(g.b)(),{setShippingAddress:r}=Object(b.b)();return{dispatchActions:Object(n.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(w(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(R(t))},setActivePaymentMethod:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(T(t,r))}}),[e]),setPaymentStatus:Object(n.useCallback)(()=>({pristine:()=>e(_(i.PRISTINE)),started:()=>e(_(i.STARTED)),processing:()=>e(_(i.PROCESSING)),completed:()=>e(_(i.COMPLETE)),error:t=>e(S(t)),failed:function(r,n){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(k({errorMessage:r||"",paymentMethodData:n||{}}))},success:function(n){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof i&&null!=i&&i.address&&r(i.address),e(j({paymentMethodData:n}))}}),[e,t,r])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:r}=Object(v.c)(),n=new Set([...Object(f.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return O(e,t,Array.from(n),r.PAYMENTS)})($.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:r}=Object(v.c)();return O(e,t,Object.keys(t),r.EXPRESS_PAYMENTS)})($.setRegisteredExpressPaymentMethods),Q=Object(n.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(f.getSetting)("customerPaymentMethods",{}),r=Object.keys(t),n={};return r.forEach(r=>{const o=t[r].filter(t=>{var r;let{method:{gateway:n}}=t;return n in e&&(null===(r=e[n].supports)||void 0===r?void 0:r.showSavedCards)});o.length&&(n[r]=o)}),n}(W.paymentMethods):{},[p,m,K,W.paymentMethods]),Z=Object(n.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys(W.expressPaymentMethods).includes(W.activePaymentMethod),te=Object(n.useMemo)(()=>({isPristine:W.currentStatus===i.PRISTINE,isStarted:W.currentStatus===i.STARTED,isProcessing:W.currentStatus===i.PROCESSING,isFinished:[i.ERROR,i.FAILED,i.SUCCESS].includes(W.currentStatus),hasError:W.currentStatus===i.ERROR,hasFailed:W.currentStatus===i.FAILED,isSuccessful:W.currentStatus===i.SUCCESS,isDoingExpressPayment:W.currentStatus!==i.PRISTINE&&ee}),[W.currentStatus,ee]);Object(n.useEffect)(()=>{const e=Object.keys(W.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys(W.expressPaymentMethods)];if(W.activePaymentMethod&&t.includes(W.activePaymentMethod))return;X().pristine();const r=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(r){const e=r.tokenId,t=r.method.gateway,n=`wc-${t}-payment-token`;$.setActivePaymentMethod(t,{token:e,payment_method:t,[n]:e.toString(),isSavedToken:!0})}else $.setActivePaymentMethod(Object.keys(W.paymentMethods)[0])},[K,W.paymentMethods,W.expressPaymentMethods,$,X,W.activePaymentMethod,Q]),Object(n.useEffect)(()=>{!r||u||a||te.isFinished||X().processing()},[r,u,a,te.isFinished,X]),Object(n.useEffect)(()=>{c&&!te.isSuccessful&&X().pristine()},[c,te.isSuccessful,X]),Object(n.useEffect)(()=>{u&&te.isSuccessful&&X().pristine()},[u,te.isSuccessful,X]),Object(n.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(N.b)(q.current,"payment_processing",{}).then(e=>{let t,r;var n,o,i,c,s,a;if(e.forEach(e=>{F(e)&&(t=e),(V(e)||B(e))&&(r=e)}),t&&!r)X().success(null===(n=t)||void 0===n||null===(o=n.meta)||void 0===o?void 0:o.paymentMethodData,null===(i=t)||void 0===i||null===(c=i.meta)||void 0===c?void 0:c.billingData,null===(s=t)||void 0===s||null===(a=s.meta)||void 0===a?void 0:a.shippingData);else if(r&&B(r)){var l,u,d,p,f,m;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=r)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),X().failed(null===(l=r)||void 0===l?void 0:l.message,null===(u=r)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=r)||void 0===p||null===(f=p.meta)||void 0===f?void 0:f.billingData)}else if(r){var h,b;r.message&&r.message.length&&D(r.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(b=r)||void 0===b?void 0:b.messageContext)||U.PAYMENTS}),X().error(r.message),y(null===(h=r)||void 0===h?void 0:h.validationErrors)}else X().success()}))},[te.isProcessing,y,X,L,U.PAYMENTS,F,B,V,D]);const re="object"==typeof W.paymentMethodData&&Object(o.e)(W.paymentMethodData,"token")?W.paymentMethodData.token+"":"",ne={setPaymentStatus:X,currentStatus:te,paymentStatuses:i,paymentMethodData:W.paymentMethodData,errorMessage:W.errorMessage,activePaymentMethod:W.activePaymentMethod,activeSavedToken:re,setActivePaymentMethod:$.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:Q,paymentMethods:W.paymentMethods,expressPaymentMethods:W.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:W.shouldSavePaymentMethod,setShouldSavePayment:$.setShouldSavePayment};return Object(n.createElement)(I.Provider,{value:ne},t)}},,,,,,,function(e,t,r){"use strict";r.d(t,"b",(function(){return E})),r.d(t,"a",(function(){return v}));var n=r(0),o=(r(8),r(9)),i=r(7),c=r(4),s=r.n(c),a=r(5),l=r(91),u=r(12),d=r(107),p=function({notices:e,className:t,children:r,onRemove:o=a.noop}){const c=Object(u.useReducedMotion)(),[p]=Object(n.useState)(()=>new WeakMap),f=Object(l.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:p.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:c});t=s()("components-snackbar-list",t);const m=e=>()=>o(e.id);return Object(n.createElement)("div",{className:t},r,f.map(({item:e,key:t,props:r})=>Object(n.createElement)(l.animated.div,{key:t,style:r},Object(n.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&p.set(e,t)},Object(n.createElement)(d.a,Object(i.a)({},Object(a.omit)(e,["content"]),{onRemove:m(e)}),e.content)))))},f=r(13);const m={};var h=e=>{let{className:t,notices:r,removeNotice:o,isEditor:i}=e;if(i)return null;const c=r.filter(e=>"snackbar"===e.type),a=c.length>0?c.reduce((e,t)=>{let{content:r}=t;return e[r]=!0,e},{}):m,l=Object(f.__experimentalApplyCheckoutFilter)({filterName:"snackbarNoticeVisibility",defaultValue:a}),u=c.filter(e=>!0===l[e.content]),d=s()(t,"wc-block-components-notices__snackbar");return Object(n.createElement)(p,{notices:u,className:d,onRemove:o})},b=r(38),g=r(18);const y=Object(n.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),E=()=>Object(n.useContext)(y),v=e=>{let{children:t,context:r="wc/core"}=e;const{createNotice:i,removeNotice:c}=Object(o.useDispatch)("core/notices"),[s,a]=Object(n.useState)(!1),{dispatchStoreEvent:l}=Object(b.a)(),{isEditor:u}=Object(g.a)(),d=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i("default",e,{...t,type:"snackbar",context:t.context||r}),l("store-notice-create",{status:"default",content:e,options:t})}),[i,l,r]),p=Object(n.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;c(e,t)}),[c,r]),{notices:f}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(r)}),[r]),m={notices:f,createSnackbarNotice:d,removeSnackbarNotice:p,context:r,setIsSuppressed:a},E=s?null:Object(n.createElement)(h,{notices:m.notices,removeNotice:m.removeSnackbarNotice,isEditor:u});return Object(n.createElement)(y.Provider,{value:m},t,E)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return l}));var n=r(0),o=(r(8),r(12)),i=r(4),c=r.n(i);const s=Object(n.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),a=()=>Object(n.useContext)(s),l=e=>{let{children:t,className:r=""}=e;const[i,a]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let r="";return t>700?r="is-large":t>520?r="is-medium":t>400?r="is-small":t&&(r="is-mobile"),[e,r]})(),l={hasContainerWidth:""!==a,containerClassName:a,isMobile:"is-mobile"===a,isSmall:"is-small"===a,isMedium:"is-medium"===a,isLarge:"is-large"===a};return Object(n.createElement)(s.Provider,{value:l},Object(n.createElement)("div",{className:c()(r,a)},i,t))}},,function(e,t,r){"use strict";var n=r(0),o=r(4),i=r.n(o),c=(r(8),r(212));r(164),t.a=e=>{let{children:t,className:r}=e;return Object(n.createElement)(c.a,{className:i()("wc-block-components-sidebar-layout",r)},t)}}]); \ No newline at end of file diff --git a/build/checkout.asset.php b/build/checkout.asset.php new file mode 100644 index 00000000000..9549b95b924 --- /dev/null +++ b/build/checkout.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'fb8bcec9a1324d303b0cd80b32f61a2f'); \ No newline at end of file diff --git a/build/checkout.js b/build/checkout.js new file mode 100644 index 00000000000..4e2d3e9c92a --- /dev/null +++ b/build/checkout.js @@ -0,0 +1,46 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks.checkout=function(e){function t(t){for(var r,s,a=t[0],l=t[1],i=t[2],d=0,p=[];d{let{selected:t=[],search:c="",queryArgs:o={}}=e;const a=(e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const n=l.o.productCount>100,s={per_page:n?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},a=[Object(r.addQueryArgs)("/wc/store/products",{...s,...o})];return n&&t.length&&a.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),a})({selected:t,search:c,queryArgs:o});return Promise.all(a.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),p=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),b=e=>{let{selected:t=[],search:c}=e;const o=(e=>{let{selected:t=[],search:c}=e;const o=Object(a.getSetting)("limitTags",!1),n=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:c})];return o&&t.length&&n.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:c});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id"))},m=e=>n()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/products/categories/"+e}),h=e=>n()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return n}));var r=c(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},,function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:s,wrapperProps:a={}}=e;const l=null!=c,i=null!=o;return!l&&i?(t=s||"span",a={...a,className:n()(a.className,"screen-reader-text")},Object(r.createElement)(t,a,o)):(t=s||r.Fragment,l&&i&&c!==o?Object(r.createElement)(t,a,Object(r.createElement)("span",{"aria-hidden":"true"},c),Object(r.createElement)("span",{className:"screen-reader-text"},o)):Object(r.createElement)(t,a,c))}},,,function(e,t,c){},,function(e,t){e.exports=window.wc.priceFormat},function(e,t,c){"use strict";c.d(t,"a",(function(){return _}));var r=c(6),o=c(0),n=c(16),s=c(13),a=c(14),l=c(149),i=c(248),u=c(49),d=c(247);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(s.dispatch)(n.CART_STORE_KEY).invalidateResolutionForStore()},b=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},m=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),b),[])},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...g,email:""},O={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:n.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},j=e=>Object(l.a)(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(a.decodeEntities)(c)]})),E={cartCoupons:n.EMPTY_CART_COUPONS,cartItems:n.EMPTY_CART_ITEMS,cartFees:n.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:O,cartIsLoading:!0,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:g,shippingRates:n.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:n.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:n.EMPTY_EXTENSIONS},_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(u.b)(),a=null==c?void 0:c.previewCart,{shouldSelect:l}=e,d=Object(o.useRef)();m();const p=Object(s.useSelect)((e,c)=>{let{dispatch:r}=c;if(!l)return E;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:n.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:n.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:g,extensions:n.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(n.CART_STORE_KEY),s=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),b=o.isCustomerDataUpdating(),{receiveCart:m}=r(n.CART_STORE_KEY),O=j(s.billingAddress),_=s.needsShipping?j(s.shippingAddress):O,f=s.fees.length>0?s.fees.map(e=>j(e)):n.EMPTY_CART_FEES;return{cartCoupons:s.coupons.length>0?s.coupons.map(e=>({...e,label:e.code})):n.EMPTY_CART_COUPONS,cartItems:s.items,cartFees:f,cartItemsCount:s.itemsCount,cartItemsWeight:s.itemsWeight,cartNeedsPayment:s.needsPayment,cartNeedsShipping:s.needsShipping,cartItemErrors:s.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(i.a)(O),shippingAddress:Object(i.a)(_),extensions:s.extensions,shippingRates:s.shippingRates,shippingRatesLoading:b,cartHasCalculatedShipping:s.hasCalculatedShipping,paymentRequirements:s.paymentRequirements,receiveCart:m}},[l]);return d.current&&Object(r.isEqual)(d.current,p)||(d.current=p),d.current}},,,function(e,t){e.exports=window.wc.wcBlocksRegistry},function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(0),o=c(26),n=c.n(o);function s(e){const t=Object(r.useRef)(e);return n()(e,t.current)||(t.current=e),t.current}},function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(132),a=c(4),l=c.n(a);c(138);const i=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:r,onValueChange:a,displayType:u="text",...d}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const b=p/10**r.minorUnit;if(!Number.isFinite(b))return null;const m=l()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),g={...d,...i(r),value:void 0,currency:void 0,onValueChange:void 0},h=a?e=>{const t=+e.value*10**r.minorUnit;a(t)}:()=>{};return Object(n.createElement)(s.a,o()({className:m,displayType:u},g,{value:b,onValueChange:h}))}},,function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...o}):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return l})),c.d(t,"b",(function(){return i})),c.d(t,"c",(function(){return d}));var r=c(85);let o,n;!function(e){e.SUCCESS="success",e.FAIL="failure",e.ERROR="error"}(o||(o={})),function(e){e.PAYMENTS="wc/payment-area",e.EXPRESS_PAYMENTS="wc/express-payment-area"}(n||(n={}));const s=(e,t)=>Object(r.b)(e)&&"type"in e&&e.type===t,a=e=>s(e,o.SUCCESS),l=e=>s(e,o.ERROR),i=e=>s(e,o.FAIL),u=e=>!Object(r.b)(e)||void 0===e.retry||!0===e.retry,d=()=>({responseTypes:o,noticeContexts:n,shouldRetry:u,isSuccessResponse:a,isErrorResponse:l,isFailResponse:i})},,function(e,t){e.exports=window.wp.a11y},function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=c(128);const n=()=>{const{notices:e,createNotice:t,removeNotice:c,setIsSuppressed:n}=Object(o.b)(),s=Object(r.useRef)(e);Object(r.useEffect)(()=>{s.current=e},[e]);const a=Object(r.useMemo)(()=>({hasNoticesOfType:e=>s.current.some(t=>t.type===e),removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeNotice:c}),[c]),l=Object(r.useMemo)(()=>({addDefaultNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("default",e,{...c})},addErrorNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("error",e,{...c})},addWarningNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("warning",e,{...c})},addInfoNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("info",e,{...c})},addSuccessNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t("success",e,{...c})}}),[t]);return{notices:e,...a,...l,setIsSuppressed:n}}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var r=c(0),o=c(13);const n=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),s=()=>Object(r.useContext)(n),a=e=>{let{children:t,currentPostId:c=0,currentView:s="",previewData:a={}}=e;const l=Object(o.useSelect)(e=>c||e("core/editor").getCurrentPostId(),[c]),i=Object(r.useCallback)(e=>e in a?a[e]:{},[a]),u={isEditor:!0,currentPostId:l,currentView:s,previewData:a,getPreviewData:i};return Object(r.createElement)(n.Provider,{value:u},t)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return P})),c.d(t,"a",(function(){return R}));var r=c(0),o=c(1),n=c(108),s=c(65),a=c.n(s),l=c(85);let i;!function(e){e.SET_IDLE="set_idle",e.SET_PRISTINE="set_pristine",e.SET_REDIRECT_URL="set_redirect_url",e.SET_COMPLETE="set_checkout_complete",e.SET_BEFORE_PROCESSING="set_before_processing",e.SET_AFTER_PROCESSING="set_after_processing",e.SET_PROCESSING_RESPONSE="set_processing_response",e.SET_PROCESSING="set_checkout_is_processing",e.SET_HAS_ERROR="set_checkout_has_error",e.SET_NO_ERROR="set_checkout_no_error",e.SET_CUSTOMER_ID="set_checkout_customer_id",e.SET_ORDER_ID="set_checkout_order_id",e.SET_ORDER_NOTES="set_checkout_order_notes",e.INCREMENT_CALCULATING="increment_calculating",e.DECREMENT_CALCULATING="decrement_calculating",e.SET_SHOULD_CREATE_ACCOUNT="set_should_create_account",e.SET_EXTENSION_DATA="set_extension_data"}(i||(i={}));const u=()=>({type:i.SET_IDLE}),d=e=>({type:i.SET_REDIRECT_URL,redirectUrl:e}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:i.SET_COMPLETE,data:e}},b=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:e?i.SET_HAS_ERROR:i.SET_NO_ERROR}};var m=c(2);let g;!function(e){e.PRISTINE="pristine",e.IDLE="idle",e.PROCESSING="processing",e.COMPLETE="complete",e.BEFORE_PROCESSING="before_processing",e.AFTER_PROCESSING="after_processing"}(g||(g={}));const h={order_id:0,customer_id:0,...Object(m.getSetting)("checkoutData",{})||{}},O={redirectUrl:"",status:g.PRISTINE,hasError:!1,calculatingCount:0,orderId:h.order_id,orderNotes:"",customerId:h.customer_id,shouldCreateAccount:!1,processingResponse:null,extensionData:{}},j=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O,{redirectUrl:t,type:c,customerId:r,orderId:o,orderNotes:n,extensionData:s,shouldCreateAccount:a,data:l}=arguments.length>1?arguments[1]:void 0,u=e;switch(c){case i.SET_PRISTINE:u=O;break;case i.SET_IDLE:u=e.status!==g.IDLE?{...e,status:g.IDLE}:e;break;case i.SET_REDIRECT_URL:u=void 0!==t&&t!==e.redirectUrl?{...e,redirectUrl:t}:e;break;case i.SET_PROCESSING_RESPONSE:u={...e,processingResponse:l};break;case i.SET_COMPLETE:u=e.status!==g.COMPLETE?{...e,status:g.COMPLETE,redirectUrl:void 0!==l&&"string"==typeof l.redirectUrl&&l.redirectUrl?l.redirectUrl:e.redirectUrl}:e;break;case i.SET_PROCESSING:u=e.status!==g.PROCESSING?{...e,status:g.PROCESSING,hasError:!1}:e,u=!1===u.hasError?u:{...u,hasError:!1};break;case i.SET_BEFORE_PROCESSING:u=e.status!==g.BEFORE_PROCESSING?{...e,status:g.BEFORE_PROCESSING,hasError:!1}:e;break;case i.SET_AFTER_PROCESSING:u=e.status!==g.AFTER_PROCESSING?{...e,status:g.AFTER_PROCESSING}:e;break;case i.SET_HAS_ERROR:u=e.hasError?e:{...e,hasError:!0},u=e.status===g.PROCESSING||e.status===g.BEFORE_PROCESSING?{...u,status:g.IDLE}:u;break;case i.SET_NO_ERROR:u=e.hasError?{...e,hasError:!1}:e;break;case i.INCREMENT_CALCULATING:u={...e,calculatingCount:e.calculatingCount+1};break;case i.DECREMENT_CALCULATING:u={...e,calculatingCount:Math.max(0,e.calculatingCount-1)};break;case i.SET_CUSTOMER_ID:u=void 0!==r?{...e,customerId:r}:e;break;case i.SET_ORDER_ID:u=void 0!==o?{...e,orderId:o}:e;break;case i.SET_SHOULD_CREATE_ACCOUNT:void 0!==a&&a!==e.shouldCreateAccount&&(u={...e,shouldCreateAccount:a});break;case i.SET_ORDER_NOTES:void 0!==n&&e.orderNotes!==n&&(u={...e,orderNotes:n});break;case i.SET_EXTENSION_DATA:void 0!==s&&e.extensionData!==s&&(u={...e,extensionData:s})}return u!==e&&c!==i.SET_PRISTINE&&u.status===g.PRISTINE&&(u.status=g.IDLE),u};var E=c(14),_=c(107),f=c(251);var k=c(254),w=c(112),y=c(47),v=c(60),S=c(13),C=c(44);const N=Object(r.createContext)({dispatchActions:{resetCheckout:()=>{},setRedirectUrl:e=>{},setHasError:e=>{},setAfterProcessing:e=>{},incrementCalculating:()=>{},decrementCalculating:()=>{},setCustomerId:e=>{},setOrderId:e=>{},setOrderNotes:e=>{},setExtensionData:e=>{}},onSubmit:()=>{},isComplete:!1,isIdle:!1,isCalculating:!1,isProcessing:!1,isBeforeProcessing:!1,isAfterProcessing:!1,hasError:!1,redirectUrl:"",orderId:0,orderNotes:"",customerId:0,onCheckoutAfterProcessingWithSuccess:()=>()=>{},onCheckoutAfterProcessingWithError:()=>()=>{},onCheckoutBeforeProcessing:()=>()=>{},onCheckoutValidationBeforeProcessing:()=>()=>{},hasOrder:!1,isCart:!1,shouldCreateAccount:!1,setShouldCreateAccount:e=>{},extensionData:{}}),P=()=>Object(r.useContext)(N),R=e=>{let{children:t,redirectUrl:c,isCart:s=!1}=e;O.redirectUrl=c;const[m,h]=Object(r.useReducer)(j,O),{setValidationErrors:P}=Object(w.b)(),{addErrorNotice:R,removeNotices:x}=Object(y.a)(),{dispatchCheckoutEvent:T}=Object(v.a)(),A=m.calculatingCount>0,{isSuccessResponse:I,isErrorResponse:M,isFailResponse:D,shouldRetry:L}=Object(C.c)(),{checkoutNotices:B,paymentNotices:F,expressPaymentNotices:V}=(()=>{const{noticeContexts:e}=Object(C.c)();return{checkoutNotices:Object(S.useSelect)(e=>e("core/notices").getNotices("wc/checkout"),[]),expressPaymentNotices:Object(S.useSelect)(t=>t("core/notices").getNotices(e.EXPRESS_PAYMENTS),[e.EXPRESS_PAYMENTS]),paymentNotices:Object(S.useSelect)(t=>t("core/notices").getNotices(e.PAYMENTS),[e.PAYMENTS])}})(),[U,z]=Object(r.useReducer)(_.b,{}),H=Object(r.useRef)(U),{onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,onCheckoutValidationBeforeProcessing:$}=(e=>Object(r.useMemo)(()=>({onCheckoutAfterProcessingWithSuccess:Object(f.a)("checkout_after_processing_with_success",e),onCheckoutAfterProcessingWithError:Object(f.a)("checkout_after_processing_with_error",e),onCheckoutValidationBeforeProcessing:Object(f.a)("checkout_validation_before_processing",e)}),[e]))(z);Object(r.useEffect)(()=>{H.current=U},[U]);const Y=Object(r.useMemo)(()=>function(){return a()("onCheckoutBeforeProcessing",{alternative:"onCheckoutValidationBeforeProcessing",plugin:"WooCommerce Blocks"}),$(...arguments)},[$]),W=Object(r.useMemo)(()=>({resetCheckout:()=>{h({type:i.SET_PRISTINE})},setRedirectUrl:e=>{h(d(e))},setHasError:e=>{h(b(e))},incrementCalculating:()=>{h({type:i.INCREMENT_CALCULATING})},decrementCalculating:()=>{h({type:i.DECREMENT_CALCULATING})},setCustomerId:e=>{var t;h((t=e,{type:i.SET_CUSTOMER_ID,customerId:t}))},setOrderId:e=>{h((e=>({type:i.SET_ORDER_ID,orderId:e}))(e))},setOrderNotes:e=>{h((e=>({type:i.SET_ORDER_NOTES,orderNotes:e}))(e))},setExtensionData:e=>{h((e=>({type:i.SET_EXTENSION_DATA,extensionData:e}))(e))},setAfterProcessing:e=>{const t=(e=>{const t={message:"",paymentStatus:"",redirectUrl:"",paymentDetails:{}};return"payment_result"in e&&(t.paymentStatus=e.payment_result.payment_status,t.redirectUrl=e.payment_result.redirect_url,e.payment_result.hasOwnProperty("payment_details")&&Array.isArray(e.payment_result.payment_details)&&e.payment_result.payment_details.forEach(e=>{let{key:c,value:r}=e;t.paymentDetails[c]=Object(E.decodeEntities)(r)})),"message"in e&&(t.message=Object(E.decodeEntities)(e.message)),!t.message&&"data"in e&&"status"in e.data&&e.data.status>299&&(t.message=Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")),t})(e);var c;t.redirectUrl&&h(d(t.redirectUrl)),h((c=t,{type:i.SET_PROCESSING_RESPONSE,data:c})),h({type:i.SET_AFTER_PROCESSING})}}),[]);Object(r.useEffect)(()=>{m.status===g.BEFORE_PROCESSING&&(x("error"),Object(k.a)(H.current,"checkout_validation_before_processing",{}).then(e=>{!0!==e?(Array.isArray(e)&&e.forEach(e=>{let{errorMessage:t,validationErrors:c}=e;R(t),P(c)}),h(u()),h(b())):h({type:i.SET_PROCESSING})}))},[m.status,P,R,x,h]);const X=Object(n.a)(m.status),K=Object(n.a)(m.hasError);Object(r.useEffect)(()=>{if((m.status!==X||m.hasError!==K)&&m.status===g.AFTER_PROCESSING){const e={redirectUrl:m.redirectUrl,orderId:m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,processingResponse:m.processingResponse};m.hasError?Object(k.b)(H.current,"checkout_after_processing_with_error",e).then(t=>{const c=(e=>{let t=null;return e.forEach(e=>{if((M(e)||D(e))&&e.message){const c=e.messageContext?{context:e.messageContext}:void 0;t=e,R(e.message,c)}}),t})(t);if(null!==c)L(c)?h(u()):h(p(c));else{if(!(B.some(e=>"error"===e.status)||V.some(e=>"error"===e.status)||F.some(e=>"error"===e.status))){var r;const t=(null===(r=e.processingResponse)||void 0===r?void 0:r.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block");R(t,{id:"checkout"})}h(u())}}):Object(k.b)(H.current,"checkout_after_processing_with_success",e).then(e=>{let t=null,c=null;if(e.forEach(e=>{I(e)&&(t=e),(M(e)||D(e))&&(c=e)}),t&&!c)h(p(t));else if(Object(l.b)(c)){if(c.message){const e=c.messageContext?{context:c.messageContext}:void 0;R(c.message,e)}L(c)?h(b(!0)):h(p(c))}else h(p())})}},[m.status,m.hasError,m.redirectUrl,m.orderId,m.customerId,m.orderNotes,m.processingResponse,X,K,W,R,M,D,I,L,B,V,F]);const J={onSubmit:Object(r.useCallback)(()=>{T("submit"),h({type:i.SET_BEFORE_PROCESSING})},[T]),isComplete:m.status===g.COMPLETE,isIdle:m.status===g.IDLE,isCalculating:A,isProcessing:m.status===g.PROCESSING,isBeforeProcessing:m.status===g.BEFORE_PROCESSING,isAfterProcessing:m.status===g.AFTER_PROCESSING,hasError:m.hasError,redirectUrl:m.redirectUrl,onCheckoutBeforeProcessing:Y,onCheckoutValidationBeforeProcessing:$,onCheckoutAfterProcessingWithSuccess:G,onCheckoutAfterProcessingWithError:q,dispatchActions:W,isCart:s,orderId:m.orderId,hasOrder:!!m.orderId,customerId:m.customerId,orderNotes:m.orderNotes,shouldCreateAccount:m.shouldCreateAccount,setShouldCreateAccount:e=>{return h((t=e,{type:i.SET_SHOULD_CREATE_ACCOUNT,shouldCreateAccount:t}));var t},extensionData:m.extensionData};return Object(r.createElement)(N.Provider,{value:J},t)}},,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(80),a=c(116);const l=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:c={},...r}=e;const i=Object(n.useRef)(null),u=()=>{i.current&&s.focus.focusable.find(i.current).forEach(e=>{l.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},d=Object(a.a)(u,0,{leading:!0});return Object(n.useLayoutEffect)(()=>{let e;return u(),i.current&&(e=new window.MutationObserver(d),e.observe(i.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),d.cancel()}},[d]),Object(n.createElement)("div",o()({ref:i,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...c}},r),t)}},,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return O})),c.d(t,"a",(function(){return j}));var r=c(0),o=c(2),n=c(13),s=c(16),a=c(116),l=c(26),i=c.n(l),u=c(248),d=c(28),p=c(36),b=c(47);const m=(e,t)=>!(!function(e){return"email"in e}(t)||Object(u.c)(t)===Object(u.c)(e))||!!t.country&&!i()(Object(u.b)(e),Object(u.b)(t));var g=c(50);const h=Object(r.createContext)({billingData:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},setBillingData:()=>null,setShippingAddress:()=>null,shippingAsBilling:!0,setShippingAsBilling:()=>null}),O=()=>Object(r.useContext)(h),j=e=>{let{children:t}=e;const{billingData:c,shippingAddress:l,setBillingData:i,setShippingAddress:u}=(()=>{const{updateCustomerData:e}=Object(n.useDispatch)(s.CART_STORE_KEY),{addErrorNotice:t,removeNotice:c}=Object(b.a)(),{billingAddress:o,shippingAddress:l,cartIsLoading:i}=Object(p.a)(),[u,g]=Object(r.useState)(!1),[h,O]=Object(r.useState)({billingData:o,shippingAddress:l}),j=Object(r.useRef)(h);Object(r.useEffect)(()=>{if(u||i)return;const e={billingData:o,shippingAddress:l};j.current=e,O(e),g(!0)},[i,u,o,l]);const E=Object(r.useCallback)(e=>{O(t=>({...t,billingData:{...t.billingData,...e}}))},[]),_=Object(r.useCallback)(e=>{O(t=>({...t,shippingAddress:{...t.shippingAddress,...e}}))},[]),f=Object(a.a)(()=>{const r={};m(j.current.billingData,h.billingData)&&(r.billing_address=h.billingData),m(j.current.shippingAddress,h.shippingAddress)&&(r.shipping_address=h.shippingAddress),0!==Object.keys(r).length&&(j.current=h,e(r).then(()=>{c("checkout")}).catch(e=>{t(Object(d.b)(e),{id:"checkout"})}))},1e3);return Object(r.useEffect)(()=>{u&&f()},[u,h,f]),{billingData:h.billingData,shippingAddress:h.shippingAddress,setBillingData:E,setShippingAddress:_}})(),{cartNeedsShipping:O}=Object(p.a)(),{customerId:j}=Object(g.b)(),[E,_]=Object(r.useState)(()=>{return O&&(!j||(e=l,t=c,Object.keys(o.defaultAddressFields).every(c=>e[c]===t[c])));var e,t}),f={billingData:c,shippingAddress:l,setBillingData:i,setShippingAddress:u,shippingAsBilling:E,setShippingAsBilling:_};return Object(r.createElement)(h.Provider,{value:f},t)}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(61),o=c(0),n=c(36);const s=()=>{const e=Object(n.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...c,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},function(e,t){e.exports=window.wp.hooks},,,,function(e,t){e.exports=window.wp.deprecated},function(e,t,c){"use strict";var r=c(0),o=c(1),n=(c(10),c(4)),s=c.n(n),a=(c(217),c(99));t.a=e=>{let{children:t,className:c,screenReaderLabel:n,showSpinner:l=!1,isLoading:i=!0}=e;return Object(r.createElement)("div",{className:s()(c,{"wc-block-components-loading-mask":i})},i&&l&&Object(r.createElement)(a.a,null),Object(r.createElement)("div",{className:s()({"wc-block-components-loading-mask__children":i}),"aria-hidden":i},t),i&&Object(r.createElement)("span",{className:"screen-reader-text"},n||Object(o.__)("Loading…","woo-gutenberg-products-block")))}},function(e,t,c){"use strict";c.d(t,"b",(function(){return y})),c.d(t,"a",(function(){return v}));var r=c(0),o=c(26),n=c.n(o),s=c(149);const a=e=>Object(s.a)(e.map(e=>{var t;let{package_id:c,shipping_rates:r}=e;return[c,null===(t=r.find(e=>e.selected))||void 0===t?void 0:t.rate_id]})),l={NONE:"none",INVALID_ADDRESS:"invalid_address",UNKNOWN:"unknown_error"},i={INVALID_COUNTRY:"woocommerce_rest_cart_shipping_rates_invalid_country",MISSING_COUNTRY:"woocommerce_rest_cart_shipping_rates_missing_country",INVALID_STATE:"woocommerce_rest_cart_shipping_rates_invalid_state"},u={shippingErrorStatus:{isPristine:!0,isValid:!1,hasInvalidAddress:!1,hasError:!1},dispatchErrorStatus:()=>null,shippingErrorTypes:l,shippingRates:[],shippingRatesLoading:!1,selectedRates:[],setSelectedRates:()=>null,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},setShippingAddress:()=>null,onShippingRateSuccess:()=>null,onShippingRateFail:()=>null,onShippingRateSelectSuccess:()=>null,onShippingRateSelectFail:()=>null,needsShipping:!1},d=(e,t)=>{let{type:c}=t;return Object.values(l).includes(c)?c:e};var p=c(107),b=c(251);const m=e=>({onSuccess:Object(b.a)("shipping_rates_success",e),onFail:Object(b.a)("shipping_rates_fail",e),onSelectSuccess:Object(b.a)("shipping_rate_select_success",e),onSelectFail:Object(b.a)("shipping_rate_select_fail",e)});var g=c(254),h=c(50),O=c(56),j=c(36),E=c(122);const{NONE:_,INVALID_ADDRESS:f,UNKNOWN:k}=l,w=Object(r.createContext)(u),y=()=>Object(r.useContext)(w),v=e=>{let{children:t}=e;const{dispatchActions:c}=Object(h.b)(),{shippingAddress:o,setShippingAddress:s}=Object(O.b)(),{cartNeedsShipping:u,cartHasCalculatedShipping:b,shippingRates:y,shippingRatesLoading:v,cartErrors:S}=Object(j.a)(),{selectShippingRate:C,isSelectingRate:N}=Object(E.a)(),[P,R]=Object(r.useReducer)(d,_),[x,T]=Object(r.useReducer)(p.b,{}),A=Object(r.useRef)(x),I=Object(r.useMemo)(()=>({onShippingRateSuccess:m(T).onSuccess,onShippingRateFail:m(T).onFail,onShippingRateSelectSuccess:m(T).onSelectSuccess,onShippingRateSelectFail:m(T).onSelectFail}),[T]);Object(r.useEffect)(()=>{A.current=x},[x]);const M=Object(r.useRef)(()=>a(y));Object(r.useEffect)(()=>{const e=a(y);n()(M.current,e)||(M.current=e)},[y]),Object(r.useEffect)(()=>{v?c.incrementCalculating():c.decrementCalculating()},[v,c]),Object(r.useEffect)(()=>{N?c.incrementCalculating():c.decrementCalculating()},[N,c]),Object(r.useEffect)(()=>{S.length>0&&S.some(e=>!(!e.code||!Object.values(i).includes(e.code)))?R({type:f}):R({type:_})},[S]);const D=Object(r.useMemo)(()=>({isPristine:P===_,isValid:P===_,hasInvalidAddress:P===f,hasError:P===k||P===f}),[P]);Object(r.useEffect)(()=>{v||0!==y.length&&!D.hasError||Object(g.a)(A.current,"shipping_rates_fail",{hasInvalidAddress:D.hasInvalidAddress,hasError:D.hasError})},[y,v,D.hasError,D.hasInvalidAddress]),Object(r.useEffect)(()=>{!v&&y.length>0&&!D.hasError&&Object(g.a)(A.current,"shipping_rates_success",y)},[y,v,D.hasError]),Object(r.useEffect)(()=>{N||(D.hasError?Object(g.a)(A.current,"shipping_rate_select_fail",{hasError:D.hasError,hasInvalidAddress:D.hasInvalidAddress}):Object(g.a)(A.current,"shipping_rate_select_success",M.current))},[N,D.hasError,D.hasInvalidAddress]);const L={shippingErrorStatus:D,dispatchErrorStatus:R,shippingErrorTypes:l,shippingRates:y,shippingRatesLoading:v,selectedRates:M.current,setSelectedRates:C,isSelectingRate:N,shippingAddress:o,setShippingAddress:s,needsShipping:u,hasCalculatedShipping:b,...I};return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(w.Provider,{value:L},t))}},,,,,,function(e,t){e.exports=window.wp.autop},,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(137),a=c(4),l=c.n(a),i=c(99);c(158),t.a=e=>{let{className:t,showSpinner:c=!1,children:r,...a}=e;const u=l()("wc-block-components-button",t,{"wc-block-components-button--loading":c});return Object(n.createElement)(s.a,o()({className:u},a),c&&Object(n.createElement)(i.a,null),Object(n.createElement)("span",{className:"wc-block-components-button__text"},r))}},function(e,t,c){"use strict";c.d(t,"c",(function(){return n})),c.d(t,"d",(function(){return s})),c.d(t,"a",(function(){return a})),c.d(t,"b",(function(){return l}));var r=c(12),o=c(25);const n=(e,t)=>{if(o.n>2)return Object(r.registerBlockType)(e,t)},s=(e,t)=>{if(o.n>1)return Object(r.registerBlockType)(e,t)},a=()=>o.n>2,l=()=>o.n>1},,,function(e,t){e.exports=window.wp.dom},,,,function(e,t){e.exports=window.wp.keycodes},function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"c",(function(){return o})),c.d(t,"b",(function(){return n})),c.d(t,"d",(function(){return s}));const r=e=>"number"==typeof e,o=e=>"string"==typeof e,n=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function s(e,t){return n(e)&&t in e}},,,,,,function(e,t){e.exports=window.wp.warning},,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(0);const o=()=>{const[,e]=Object(r.useState)();return Object(r.useCallback)(t=>{e(()=>{throw t})},[])}},,,,,function(e,t,c){"use strict";var r=c(2),o=c(1),n=c(85);const s=Object(r.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(n.a)(e.priority)&&(t.index=e.priority),Object(n.c)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},l=Object.entries(s).map(e=>{let[t,c]=e;return[t,Object.entries(c).map(e=>{let[t,c]=e;return[t,a(c)]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{})]}).reduce((e,t)=>{let[c,r]=t;return e[c]=r,e},{});t.a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=c&&void 0!==l[c]?l[c]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},function(e,t,c){"use strict";var r=c(0);c(159),t.a=()=>Object(r.createElement)("span",{className:"wc-block-components-spinner","aria-hidden":"true"})},function(e,t){e.exports=window.wp.wordcount},,,,,function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(41),s=c(4),a=c.n(s),l=c(35);c(156);const i=e=>{let{currency:t,maxPrice:c,minPrice:s,priceClassName:i,priceStyle:u={}}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.sprintf)( +/* translators: %1$s min price, %2$s max price */ +Object(o.__)("Price between %1$s and %2$s","woo-gutenberg-products-block"),Object(l.formatPrice)(s),Object(l.formatPrice)(c))),Object(r.createElement)("span",{"aria-hidden":!0},Object(r.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:s,style:u})," — ",Object(r.createElement)(n.a,{className:a()("wc-block-components-product-price__value",i),currency:t,value:c,style:u})))},u=e=>{let{currency:t,regularPriceClassName:c,regularPriceStyle:s,regularPrice:l,priceClassName:i,priceStyle:u,price:d}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Previous price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("del",{className:a()("wc-block-components-product-price__regular",c),style:s},e),value:l}),Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.__)("Discounted price:","woo-gutenberg-products-block")),Object(r.createElement)(n.a,{currency:t,renderText:e=>Object(r.createElement)("ins",{className:a()("wc-block-components-product-price__value","is-discounted",i),style:u},e),value:d}))};t.a=e=>{let{align:t,className:c,currency:o,format:s="",maxPrice:l,minPrice:d,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}=e;const j=a()(c,"price","wc-block-components-product-price",{["wc-block-components-product-price--align-"+t]:t});s.includes("")||(s="",console.error("Price formats need to include the `` tag."));const E=g&&p!==g;let _=Object(r.createElement)("span",{className:a()("wc-block-components-product-price__value",b)});return E?_=Object(r.createElement)(u,{currency:o,price:p,priceClassName:b,priceStyle:m,regularPrice:g,regularPriceClassName:h,regularPriceStyle:O}):void 0!==d&&void 0!==l?_=Object(r.createElement)(i,{currency:o,maxPrice:l,minPrice:d,priceClassName:b,priceStyle:m}):p&&(_=Object(r.createElement)(n.a,{className:a()("wc-block-components-product-price__value",b),currency:o,value:p,style:m})),Object(r.createElement)("span",{className:j},Object(r.createInterpolateElement)(s,{price:_}))}},,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return a}));var r=c(6);let o;!function(e){e.ADD_EVENT_CALLBACK="add_event_callback",e.REMOVE_EVENT_CALLBACK="remove_event_callback"}(o||(o={}));const n={addEventCallback:function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;return{id:Object(r.uniqueId)(),type:o.ADD_EVENT_CALLBACK,eventType:e,callback:t,priority:c}},removeEventCallback:(e,t)=>({id:t,type:o.REMOVE_EVENT_CALLBACK,eventType:e})},s={},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,{type:t,eventType:c,id:r,callback:n,priority:a}=arguments.length>1?arguments[1]:void 0;const l=e.hasOwnProperty(c)?new Map(e[c]):new Map;switch(t){case o.ADD_EVENT_CALLBACK:return l.set(r,{priority:a,callback:n}),{...e,[c]:l};case o.REMOVE_EVENT_CALLBACK:return l.delete(r),{...e,[c]:l}}}},function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(8);function o(e,t){const c=Object(r.useRef)();return Object(r.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o);c(212),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)("div",{className:n()("wc-block-components-product-badge",c)},t)}},,,function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=c(6),n=c(26),s=c.n(n);const a=Object(r.createContext)({getValidationError:()=>"",setValidationErrors:e=>{},clearValidationError:e=>{},clearAllValidationErrors:()=>{},hideValidationError:()=>{},showValidationError:()=>{},showAllValidationErrors:()=>{},hasValidationErrors:!1,getValidationErrorId:e=>e}),l=()=>Object(r.useContext)(a),i=e=>{let{children:t}=e;const[c,n]=Object(r.useState)({}),l=Object(r.useCallback)(e=>c[e],[c]),i=Object(r.useCallback)(e=>{const t=c[e];return!t||t.hidden?"":"validate-error-"+e},[c]),u=Object(r.useCallback)(e=>{n(t=>{if(!t[e])return t;const{[e]:c,...r}=t;return r})},[]),d=Object(r.useCallback)(()=>{n({})},[]),p=Object(r.useCallback)(e=>{e&&n(t=>(e=Object(o.pickBy)(e,(e,c)=>!("string"!=typeof e.message||t.hasOwnProperty(c)&&s()(t[c],e))),0===Object.values(e).length?t:{...t,...e}))},[]),b=Object(r.useCallback)((e,t)=>{n(c=>{if(!c.hasOwnProperty(e))return c;const r={...c[e],...t};return s()(c[e],r)?c:{...c,[e]:r}})},[]),m={getValidationError:l,setValidationErrors:p,clearValidationError:u,clearAllValidationErrors:d,hideValidationError:Object(r.useCallback)(e=>{b(e,{hidden:!0})},[b]),showValidationError:Object(r.useCallback)(e=>{b(e,{hidden:!1})},[b]),showAllValidationErrors:Object(r.useCallback)(()=>{n(e=>{const t={};return Object.keys(e).forEach(c=>{e[c].hidden&&(t[c]={...e[c],hidden:!1})}),0===Object.values(t).length?e:{...e,...t}})},[]),hasValidationErrors:Object.keys(c).length>0,getValidationErrorId:i};return Object(r.createElement)(a.Provider,{value:m},t)}},,function(e,t,c){"use strict";var r=c(24),o=c.n(r),n=c(0),s=c(8),a=c(1),l=c(25),i=e=>{let{imageUrl:t=l.m+"/block-error.svg",header:c=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:s=Object(a.__)("Error:","woo-gutenberg-products-block"),button:i}=e;return Object(n.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(n.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(n.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(n.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),r&&Object(n.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(n.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",o),i&&Object(n.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},i)))};c(172);class u extends s.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,text:r,errorMessagePrefix:o,renderError:s,button:a}=this.props,{errorMessage:l,hasError:u}=this.state;return u?"function"==typeof s?s({errorMessage:l}):Object(n.createElement)(i,{errorMessage:c?l:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:a}):this.props.children}}t.a=u},,,,function(e,t,c){"use strict";var r=c(0);t.a=e=>{let{label:t,secondaryLabel:c,description:o,secondaryDescription:n,id:s}=e;return Object(r.createElement)("div",{className:"wc-block-components-radio-control__option-layout"},Object(r.createElement)("div",{className:"wc-block-components-radio-control__label-group"},t&&Object(r.createElement)("span",{id:s&&s+"__label",className:"wc-block-components-radio-control__label"},t),c&&Object(r.createElement)("span",{id:s&&s+"__secondary-label",className:"wc-block-components-radio-control__secondary-label"},c)),Object(r.createElement)("div",{className:"wc-block-components-radio-control__description-group"},o&&Object(r.createElement)("span",{id:s&&s+"__description",className:"wc-block-components-radio-control__description"},o),n&&Object(r.createElement)("span",{id:s&&s+"__secondary-description",className:"wc-block-components-radio-control__secondary-description"},n)))}},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),s=c(118);t.a=e=>{let{checked:t,name:c,onChange:o,option:a}=e;const{value:l,label:i,description:u,secondaryLabel:d,secondaryDescription:p}=a;return Object(r.createElement)("label",{className:n()("wc-block-components-radio-control__option",{"wc-block-components-radio-control__option-checked":t}),htmlFor:`${c}-${l}`},Object(r.createElement)("input",{id:`${c}-${l}`,className:"wc-block-components-radio-control__input",type:"radio",name:c,value:l,onChange:e=>o(e.target.value),checked:t,"aria-describedby":n()({[`${c}-${l}__label`]:i,[`${c}-${l}__secondary-label`]:d,[`${c}-${l}__description`]:u,[`${c}-${l}__secondary-description`]:p})}),Object(r.createElement)(s.a,{id:`${c}-${l}`,label:i,secondaryLabel:d,description:u,secondaryDescription:p}))}},function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=n},function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(4),a=c.n(s);c(10),c(215),t.a=e=>{let{children:t,className:c,headingLevel:r,...s}=e;const l=a()("wc-block-components-title",c),i="h"+r;return Object(n.createElement)(i,o()({className:l},s),t)}},function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(13),o=c(0),n=c(16),s=c(93);const a=()=>{const e=Object(s.a)(),{selectShippingRate:t}=Object(r.useDispatch)(n.CART_STORE_KEY);return{selectShippingRate:Object(o.useCallback)((c,r)=>{t(c,r).catch(t=>{e(t)})},[e,t]),isSelectingRate:Object(r.useSelect)(e=>e(n.CART_STORE_KEY).isShippingRateBeingSelected(),[])}}},,,,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(14),a=c(4),l=c.n(a);c(155),t.a=e=>{let{className:t="",disabled:c=!1,name:r,permalink:a="",rel:i,style:u,onClick:d,...p}=e;const b=l()("wc-block-components-product-name",t);if(c){const e=p;return Object(n.createElement)("span",o()({className:b},e,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(r)}}))}return Object(n.createElement)("a",o()({className:b,href:a,rel:i},p,{dangerouslySetInnerHTML:{__html:Object(s.decodeEntities)(r)},style:u}))}},function(e,t,c){"use strict";c.d(t,"b",(function(){return g})),c.d(t,"a",(function(){return h}));var r=c(0),o=(c(10),c(13)),n=c(60),s=c(49),a=c(5),l=c.n(a),i=c(4),u=c.n(i),d=c(481);c(157);const p=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 b=e=>{let{className:t,notices:c,removeNotice:o}=e;const n=c.filter(e=>"snackbar"!==e.type);if(!n.length)return null;const s=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:s},n.map(e=>Object(r.createElement)(d.a,l()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",p(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const m=Object(r.createContext)({notices:[],createNotice:(e,t,c)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),g=()=>Object(r.useContext)(m),h=e=>{let{children:t,className:c="",createNoticeContainer:a=!0,context:l="wc/core"}=e;const{createNotice:i,removeNotice:u}=Object(o.useDispatch)("core/notices"),[d,p]=Object(r.useState)(!1),{dispatchStoreEvent:g}=Object(n.a)(),{isEditor:h}=Object(s.b)(),O=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i(e,t,{...c,context:c.context||l}),g("store-notice-create",{status:e,content:t,options:c})}),[i,g,l]),j=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l;u(e,t)}),[u,l]),{notices:E}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(l)}),[l]),_={notices:E,createNotice:O,removeNotice:j,context:l,setIsSuppressed:p},f=d?null:Object(r.createElement)(b,{className:c,notices:_.notices,removeNotice:_.removeNotice,isEditor:h});return Object(r.createElement)(m.Provider,{value:_},a&&f,t)}},function(e,t,c){"use strict";var r=c(0),o=c(100),n=c(73);const s=e=>{const t=e.indexOf("

");return-1===t?e:e.substr(0,t+4)},a=e=>e.replace(/<\/?[a-z][^>]*?>/gi,""),l=(e,t)=>e.replace(/[\s|\.\,]+$/i,"")+t,i=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"…";const r=a(e),o=r.split(" ").splice(0,t).join(" ");return Object(n.autop)(l(o,c))},u=function(e,t){let c=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"…";const o=a(e),s=o.slice(0,t);if(c)return Object(n.autop)(l(s,r));const i=s.match(/([\s]+)/g),u=i?i.length:0,d=o.slice(0,t+u);return Object(n.autop)(l(d,r))};t.a=e=>{let{source:t,maxLength:c=15,countType:a="words",className:l=""}=e;const d=Object(r.useMemo)(()=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15,c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"words";const r=Object(n.autop)(e),a=Object(o.count)(r,c);if(a<=t)return r;const l=s(r),d=Object(o.count)(l,c);return d<=t?l:"words"===c?i(l,t):u(l,t,"characters_including_spaces"===c)}(t,c,a),[t,c,a]);return Object(r.createElement)(r.RawHTML,{className:l},d)}},,,,,,,,,function(e,t){},,,,,,function(e,t){},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),s=c(9),a=c(119);c(224),t.a=Object(s.withInstanceId)(e=>{let{className:t="",instanceId:c,id:o,selected:s,onChange:l=(()=>{}),options:i=[]}=e;const u=o||c;return i.length&&Object(r.createElement)("div",{className:n()("wc-block-components-radio-control",t)},i.map(e=>Object(r.createElement)(a.a,{key:`${u}-${e.value}`,name:"radio-control-"+u,checked:e.value===s,option:e,onChange:t=>{l(t),"function"==typeof e.onChange&&e.onChange(t)}})))})},function(e,t,c){"use strict";var r=c(24),o=c.n(r),n=c(0),s=c(1),a=c(8),l=(c(10),c(2)),i=c(33);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return{errorMessage:e.message,hasError:!0}}render(){const{hasError:e,errorMessage:t}=this.state,{isEditor:c}=this.props;if(e){let e=Object(s.__)("This site is experiencing difficulties with this payment method. Please contact the owner of the site for assistance.","woo-gutenberg-products-block");(c||l.CURRENT_USER_IS_ADMIN)&&(e=t||Object(s.__)("There was an error with this payment method. Please verify it's configured correctly.","woo-gutenberg-products-block"));const r=[{id:"0",content:e,isDismissible:!1,status:"error"}];return Object(n.createElement)(i.StoreNoticesContainer,{notices:r})}return this.props.children}}u.defaultProps={isEditor:!1},t.a=u},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[c,r]=t;return e[c]=r,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,c){"use strict";var r=c(0),o=c(1),n=c(240),s=c(187),a=c(49),l=c(189),i=c(65),u=c.n(i),d=c(146);t.a=()=>{const{isEditor:e}=Object(a.b)(),{setActivePaymentMethod:t,setExpressPaymentError:c,activePaymentMethod:i,paymentMethodData:p,setPaymentStatus:b}=Object(l.b)(),m=Object(n.a)(),{paymentMethods:g}=Object(s.a)(),h=Object(r.useRef)(i),O=Object(r.useRef)(p),j=Object(r.useCallback)(e=>()=>{h.current=i,O.current=p,b().started(),t(e)},[i,p,t,b]),E=Object(r.useCallback)(()=>{b().pristine(),t(h.current,O.current)},[t,b]),_=Object(r.useCallback)(e=>{b().error(e),c(e),t(h.current,O.current)},[t,b,c]),f=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";u()("Express Payment Methods should use the provided onError handler instead.",{alternative:"onError",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),e?_(e):c("")}),[c,_]),k=Object.entries(g),w=k.length>0?k.map(t=>{let[c,o]=t;const n=e?o.edit:o.content;return Object(r.isValidElement)(n)?Object(r.createElement)("li",{key:c,id:"express-payment-method-"+c},Object(r.cloneElement)(n,{...m,onClick:j(c),onClose:E,onError:_,setExpressPaymentError:f})):null}):Object(r.createElement)("li",{key:"noneRegistered"},Object(o.__)("No registered Payment Methods","woo-gutenberg-products-block"));return Object(r.createElement)(d.a,{isEditor:e},Object(r.createElement)("ul",{className:"wc-block-components-express-payment__event-buttons"},w))}},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(3),s=c(13),a=c(27);t.a=e=>{let{setPageId:t,pageId:c,labels:l}=e;const i=Object(s.useSelect)(e=>e("core").getEntityRecords("postType","page",{status:"publish",orderby:"title",order:"asc",per_page:100}),[])||null;return i?Object(r.createElement)(n.PanelBody,{title:l.title},Object(r.createElement)(n.SelectControl,{label:Object(o.__)("Link to","woo-gutenberg-products-block"),value:c,options:[{label:l.default,value:0},...i.map(e=>({label:Object(a.a)(e,i),value:parseInt(e.id,10)}))],onChange:e=>t(parseInt(e,10))})):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(0),o=c(1),n=(c(10),c(43)),s=c(194),a=c(120);c(229);const l=e=>{let{text:t,url:c="https://ideas.woocommerce.com/forums/133476-woocommerce?category_id=384565"}=e;return Object(r.createElement)("div",{className:"wc-block-feedback-prompt"},Object(r.createElement)(n.a,{srcElement:s.a}),Object(r.createElement)("h2",{className:"wc-block-feedback-prompt__title"},Object(o.__)("Feedback?","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-feedback-prompt__text"},t),Object(r.createElement)("a",{href:c,className:"wc-block-feedback-prompt__link",rel:"noreferrer noopener",target:"_blank"},Object(o.__)("Give us your feedback.","woo-gutenberg-products-block"),Object(r.createElement)(n.a,{srcElement:a.a,size:16})))},i=()=>Object(r.createElement)(l,{text:Object(o.__)("We are currently working on improving our cart and checkout blocks to provide merchants with the tools and customization options they need.","woo-gutenberg-products-block"),url:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues/new?template=--cart-checkout-feedback.md"})},function(e,t){e.exports=window.wp.plugins},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(46),s=c(66),a=c(19),l=c(397),i=c(36),u=c(49),d=c(4),p=c.n(d),b=c(14),m=c(30),g=c(26),h=c.n(g),O=c(122),j=c(60);const E=e=>{var t;return null===(t=e.find(e=>e.selected))||void 0===t?void 0:t.rate_id};var _=c(145),f=c(118),k=c(35),w=c(41),y=c(2);const v=e=>{const t=Object(y.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object(b.decodeEntities)(e.name),value:e.rate_id,description:Object(r.createElement)(r.Fragment,null,Number.isFinite(t)&&Object(r.createElement)(w.a,{currency:Object(k.getCurrencyFromPriceResponse)(e),value:t}),Number.isFinite(t)&&e.delivery_time?" — ":null,Object(b.decodeEntities)(e.delivery_time))}};var S=e=>{let{className:t,noResultsMessage:c,onSelectRate:o,rates:n,renderOption:s=v,selected:a}=e;if(0===n.length)return c;if(n.length>1)return Object(r.createElement)(_.a,{className:t,onChange:e=>{o(e)},selected:a,options:n.map(s)});const{label:l,secondaryLabel:i,description:u,secondaryDescription:d}=s(n[0]);return Object(r.createElement)(f.a,{label:l,secondaryLabel:i,description:u,secondaryDescription:d})};c(223);var C=e=>{let{packageId:t,className:c,noResultsMessage:n,renderOption:s,packageData:l,collapsible:i=!1,collapse:u=!1,showItems:d=!1}=e;const{selectShippingRate:g,selectedShippingRate:_}=((e,t)=>{const{dispatchCheckoutEvent:c}=Object(j.a)(),{selectShippingRate:o,isSelectingRate:n}=Object(O.a)(),[s,a]=Object(r.useState)(()=>E(t)),l=Object(r.useRef)(t);return Object(r.useEffect)(()=>{h()(l.current,t)||(l.current=t,a(E(t)))},[t]),{selectShippingRate:Object(r.useCallback)(t=>{a(t),o(t,e),c("set-selected-shipping-rate",{shippingRateId:t})},[e,o,c]),selectedShippingRate:s,isSelectingRate:n}})(t,l.shipping_rates),f=Object(r.createElement)(r.Fragment,null,(d||i)&&Object(r.createElement)("div",{className:"wc-block-components-shipping-rates-control__package-title"},l.name),d&&Object(r.createElement)("ul",{className:"wc-block-components-shipping-rates-control__package-items"},Object.values(l.items).map(e=>{const t=Object(b.decodeEntities)(e.name),c=e.quantity;return Object(r.createElement)("li",{key:e.key,className:"wc-block-components-shipping-rates-control__package-item"},Object(r.createElement)(m.a,{label:c>1?`${t} × ${c}`:""+t,screenReaderLabel:Object(o.sprintf)( +/* translators: %1$s name of the product (ie: Sunglasses), %2$d number of units in the current cart package */ +Object(o._n)("%1$s (%2$d unit)","%1$s (%2$d units)",c,"woo-gutenberg-products-block"),t,c)}))}))),k=Object(r.createElement)(S,{className:c,noResultsMessage:n,rates:l.shipping_rates,onSelectRate:g,selected:_,renderOption:s});return i?Object(r.createElement)(a.Panel,{className:"wc-block-components-shipping-rates-control__package",initialOpen:!u,title:f},k):Object(r.createElement)("div",{className:p()("wc-block-components-shipping-rates-control__package",c)},f,k)};const N=e=>{let{packages:t,collapse:c,showItems:o,collapsible:n,noResultsMessage:s,renderOption:a}=e;return t.length?Object(r.createElement)(r.Fragment,null,t.map(e=>{let{package_id:t,...l}=e;return Object(r.createElement)(C,{key:t,packageId:t,packageData:l,collapsible:n,collapse:c,showItems:o,noResultsMessage:s,renderOption:a})})):null};t.a=e=>{let{shippingRates:t,shippingRatesLoading:c,className:d,collapsible:p=!1,noResultsMessage:b,renderOption:m}=e;Object(r.useEffect)(()=>{if(c)return;const e=Object(l.a)(t),r=Object(l.b)(t);1===e?Object(n.speak)(Object(o.sprintf)( +/* translators: %d number of shipping options found. */ +Object(o._n)("%d shipping option was found.","%d shipping options were found.",r,"woo-gutenberg-products-block"),r)):Object(n.speak)(Object(o.sprintf)( +/* translators: %d number of shipping packages packages. */ +Object(o._n)("Shipping option searched for %d package.","Shipping options searched for %d packages.",e,"woo-gutenberg-products-block"),e)+" "+Object(o.sprintf)( +/* translators: %d number of shipping options available. */ +Object(o._n)("%d shipping option was found","%d shipping options were found",r,"woo-gutenberg-products-block"),r))},[c,t]);const{extensions:g,receiveCart:h,...O}=Object(i.a)(),j={className:d,collapsible:p,noResultsMessage:b,renderOption:m,extensions:g,cart:O,components:{ShippingRatesControlPackage:C}},{isEditor:E}=Object(u.b)();return Object(r.createElement)(s.a,{isLoading:c,screenReaderLabel:Object(o.__)("Loading shipping rates…","woo-gutenberg-products-block"),showSpinner:!0},E?Object(r.createElement)(N,{packages:t,noResultsMessage:b,renderOption:m}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(a.ExperimentalOrderShippingPackages.Slot,j),Object(r.createElement)(a.ExperimentalOrderShippingPackages,null,Object(r.createElement)(N,{packages:t,noResultsMessage:b,renderOption:m}))))}},function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(1),o=c(13),n=c(16),s=c(14),a=c(36),l=c(0);c(10),c(485),c(4),c(19),c(60),c(49);const i=Object(l.createContext)({notices:[],createSnackbarNotice:(e,t)=>{},removeSnackbarNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"});var u=c(112),d=c(47);const p=()=>{const{cartCoupons:e,cartIsLoading:t}=Object(a.a)(),{addErrorNotice:c}=Object(d.a)(),{addSnackbarNotice:p}=(()=>{const{notices:e,createSnackbarNotice:t,removeSnackbarNotice:c,setIsSuppressed:r}=Object(l.useContext)(i),o=Object(l.useRef)(e);Object(l.useEffect)(()=>{o.current=e},[e]);const n=Object(l.useMemo)(()=>({removeNotices:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;o.current.forEach(t=>{null!==e&&t.status!==e||c(t.id)})},removeSnackbarNotice:c}),[c]),s=Object(l.useMemo)(()=>({addSnackbarNotice:function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t(e,c)}}),[t]);return{notices:e,...n,...s,setIsSuppressed:r}})(),{setValidationErrors:b}=Object(u.b)();return{appliedCoupons:e,isLoading:t,...Object(o.useSelect)((e,t)=>{let{dispatch:o}=t;const a=e(n.CART_STORE_KEY),l=a.isApplyingCoupon(),i=a.isRemovingCoupon(),{applyCoupon:u,removeCoupon:d,receiveApplyingCoupon:m}=o(n.CART_STORE_KEY);return{applyCoupon:e=>{u(e).then(t=>{!0===t&&p(Object(r.sprintf)( +/* translators: %s coupon code. */ +Object(r.__)('Coupon code "%s" has been applied to your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{b({coupon:{message:Object(s.decodeEntities)(e.message),hidden:!1}}),m("")})},removeCoupon:e=>{d(e).then(t=>{!0===t&&p(Object(r.sprintf)( +/* translators: %s coupon code. */ +Object(r.__)('Coupon code "%s" has been removed from your cart.',"woo-gutenberg-products-block"),e),{id:"coupon-form"})}).catch(e=>{c(e.message,{id:"coupon-form"}),m("")})},isApplyingCoupon:l,isRemovingCoupon:i}},[c,p])}}},function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(4),a=c.n(s);const l=e=>"wc-block-components-payment-method-icon wc-block-components-payment-method-icon--"+e;var i=e=>{let{id:t,src:c=null,alt:r=""}=e;return c?Object(n.createElement)("img",{className:l(t),src:c,alt:r}):null},u=c(25);const d=[{id:"alipay",alt:"Alipay",src:u.m+"payment-methods/alipay.svg"},{id:"amex",alt:"American Express",src:u.m+"payment-methods/amex.svg"},{id:"bancontact",alt:"Bancontact",src:u.m+"payment-methods/bancontact.svg"},{id:"diners",alt:"Diners Club",src:u.m+"payment-methods/diners.svg"},{id:"discover",alt:"Discover",src:u.m+"payment-methods/discover.svg"},{id:"eps",alt:"EPS",src:u.m+"payment-methods/eps.svg"},{id:"giropay",alt:"Giropay",src:u.m+"payment-methods/giropay.svg"},{id:"ideal",alt:"iDeal",src:u.m+"payment-methods/ideal.svg"},{id:"jcb",alt:"JCB",src:u.m+"payment-methods/jcb.svg"},{id:"laser",alt:"Laser",src:u.m+"payment-methods/laser.svg"},{id:"maestro",alt:"Maestro",src:u.m+"payment-methods/maestro.svg"},{id:"mastercard",alt:"Mastercard",src:u.m+"payment-methods/mastercard.svg"},{id:"multibanco",alt:"Multibanco",src:u.m+"payment-methods/multibanco.svg"},{id:"p24",alt:"Przelewy24",src:u.m+"payment-methods/p24.svg"},{id:"sepa",alt:"Sepa",src:u.m+"payment-methods/sepa.svg"},{id:"sofort",alt:"Sofort",src:u.m+"payment-methods/sofort.svg"},{id:"unionpay",alt:"Union Pay",src:u.m+"payment-methods/unionpay.svg"},{id:"visa",alt:"Visa",src:u.m+"payment-methods/visa.svg"},{id:"wechat",alt:"WeChat",src:u.m+"payment-methods/wechat.svg"}];var p=c(85);c(227),t.a=e=>{let{icons:t=[],align:c="center",className:r}=e;const s=(e=>{const t={};return e.forEach(e=>{let c={};"string"==typeof e&&(c={id:e,alt:e,src:null}),"object"==typeof e&&(c={id:e.id||"",alt:e.alt||"",src:e.src||null}),c.id&&Object(p.c)(c.id)&&!t[c.id]&&(t[c.id]=c)}),Object.values(t)})(t);if(0===s.length)return null;const l=a()("wc-block-components-payment-method-icons",{"wc-block-components-payment-method-icons--align-left":"left"===c,"wc-block-components-payment-method-icons--align-right":"right"===c},r);return Object(n.createElement)("div",{className:l},s.map(e=>{const t={...e,...(c=e.id,d.find(e=>e.id===c)||{})};var c;return Object(n.createElement)(i,o()({key:"payment-method-icon-"+e.id},t))}))}},function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(4),a=c.n(s),l=c(1),i=c(43),u=c(208);c(144);var d=e=>{let{text:t,screenReaderText:c="",element:r="li",className:s="",radius:l="small",children:i=null,...u}=e;const d=r,p=a()(s,"wc-block-components-chip","wc-block-components-chip--radius-"+l),b=Boolean(c&&c!==t);return Object(n.createElement)(d,o()({className:p},u),Object(n.createElement)("span",{"aria-hidden":b,className:"wc-block-components-chip__text"},t),b&&Object(n.createElement)("span",{className:"screen-reader-text"},c),i)};t.a=e=>{let{ariaLabel:t="",className:c="",disabled:r=!1,onRemove:s=(()=>{}),removeOnAnyClick:p=!1,text:b,screenReaderText:m="",...g}=e;const h=p?"span":"button";if(!t){const e=m&&"string"==typeof m?m:b;t="string"!=typeof e? +/* translators: Remove chip. */ +Object(l.__)("Remove","woo-gutenberg-products-block"):Object(l.sprintf)( +/* translators: %s text of the chip to remove. */ +Object(l.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:r,onClick:s,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||s()}},j=p?O:{},E=p?{"aria-hidden":!0}:O;return Object(n.createElement)(d,o()({},g,j,{className:a()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(n.createElement)(h,o()({className:"wc-block-components-chip__remove"},E),Object(n.createElement)(i.a,{className:"wc-block-components-chip__remove-icon",srcElement:u.a,size:16})))}},,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));var r=c(40),o=c(189);const n=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{paymentMethods:t,expressPaymentMethods:c,paymentMethodsInitialized:n,expressPaymentMethodsInitialized:s}=Object(o.b)(),a=Object(r.a)(t),l=Object(r.a)(c);return{paymentMethods:e?l:a,isInitialized:e?s:n}},s=()=>n(!1),a=()=>n(!0)},,function(e,t,c){"use strict";c.d(t,"b",(function(){return D})),c.d(t,"a",(function(){return L}));var r=c(0),o=c(85);let n,s;!function(e){e.PRISTINE="pristine",e.STARTED="started",e.PROCESSING="processing",e.ERROR="has_error",e.FAILED="failed",e.SUCCESS="success",e.COMPLETE="complete"}(n||(n={})),function(e){e.SET_REGISTERED_PAYMENT_METHODS="set_registered_payment_methods",e.SET_REGISTERED_EXPRESS_PAYMENT_METHODS="set_registered_express_payment_methods",e.SET_SHOULD_SAVE_PAYMENT_METHOD="set_should_save_payment_method",e.SET_ACTIVE_PAYMENT_METHOD="set_active_payment_method"}(s||(s={}));const a={currentStatus:n.PRISTINE,shouldSavePaymentMethod:!1,activePaymentMethod:"",paymentMethodData:{payment_method:""},errorMessage:"",paymentMethods:{},expressPaymentMethods:{}},l={setPaymentStatus:()=>({pristine:()=>{},started:()=>{},processing:()=>{},completed:()=>{},error:e=>{},failed:(e,t)=>{},success:(e,t)=>{}}),currentStatus:{isPristine:!0,isStarted:!1,isProcessing:!1,isFinished:!1,hasError:!1,hasFailed:!1,isSuccessful:!1,isDoingExpressPayment:!1},paymentStatuses:n,paymentMethodData:{},errorMessage:"",activePaymentMethod:"",activeSavedToken:"",setActivePaymentMethod:()=>{},customerPaymentMethods:{},paymentMethods:{},expressPaymentMethods:{},paymentMethodsInitialized:!1,expressPaymentMethodsInitialized:!1,onPaymentProcessing:()=>()=>()=>{},setExpressPaymentError:()=>{},isExpressPaymentMethodActive:!1,setShouldSavePayment:()=>{},shouldSavePayment:!1};var i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,{type:t,paymentMethodData:c,shouldSavePaymentMethod:r=!1,errorMessage:o="",paymentMethods:l={},paymentMethod:i=""}=arguments.length>1?arguments[1]:void 0;switch(t){case n.PRISTINE:return{...a,...e,errorMessage:"",currentStatus:n.PRISTINE};case n.STARTED:return{...e,currentStatus:n.STARTED};case n.ERROR:return e.currentStatus!==n.ERROR?{...e,currentStatus:n.ERROR,errorMessage:o||e.errorMessage}:e;case n.FAILED:return e.currentStatus!==n.FAILED?{...e,currentStatus:n.FAILED,paymentMethodData:c||e.paymentMethodData,errorMessage:o||e.errorMessage}:e;case n.SUCCESS:return e.currentStatus!==n.SUCCESS?{...e,currentStatus:n.SUCCESS,paymentMethodData:c||e.paymentMethodData}:e;case n.PROCESSING:return e.currentStatus!==n.PROCESSING?{...e,currentStatus:n.PROCESSING,errorMessage:""}:e;case n.COMPLETE:return e.currentStatus!==n.COMPLETE?{...e,currentStatus:n.COMPLETE}:e;case s.SET_REGISTERED_PAYMENT_METHODS:return{...e,paymentMethods:l};case s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS:return{...e,expressPaymentMethods:l};case s.SET_SHOULD_SAVE_PAYMENT_METHOD:return{...e,shouldSavePaymentMethod:r};case s.SET_ACTIVE_PAYMENT_METHOD:return{...e,activePaymentMethod:i,paymentMethodData:c||e.paymentMethodData}}},u=c(1),d=c(39),p=c(40),b=c(2),m=c(116),g=c(49),h=c(67),O=c(56),j=c(36),E=c(47),_=c(44);const f=(e,t,c,o)=>{const[n,s]=Object(r.useState)(!1),{isEditor:a}=Object(g.b)(),{selectedRates:l}=Object(h.b)(),{billingData:i,shippingAddress:d}=Object(O.b)(),_=Object(p.a)(l),f=Object(p.a)(c),k=Object(j.a)(),{cartTotals:w,cartIsLoading:y,cartNeedsShipping:v,paymentRequirements:S}=k,C=Object(r.useRef)({cart:k,cartTotals:w,cartNeedsShipping:v,billingData:i,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}),{addErrorNotice:N}=Object(E.a)();Object(r.useEffect)(()=>{C.current={cart:k,cartTotals:w,cartNeedsShipping:v,billingData:i,shippingAddress:d,selectedShippingMethods:_,paymentRequirements:S}},[k,w,v,i,d,_,S]);const P=Object(r.useCallback)(async()=>{let c={};const r=e=>{c={...c,[e.name]:e}};for(let e=0;e{y||R()},[R,k,_,i,y]),n},k=e=>({type:e}),w=e=>({type:n.ERROR,errorMessage:e}),y=e=>{let{errorMessage:t,paymentMethodData:c}=e;return{type:n.FAILED,errorMessage:t,paymentMethodData:c}},v=e=>{let{paymentMethodData:t}=e;return{type:n.SUCCESS,paymentMethodData:t}},S=e=>({type:s.SET_REGISTERED_PAYMENT_METHODS,paymentMethods:e}),C=e=>({type:s.SET_REGISTERED_EXPRESS_PAYMENT_METHODS,paymentMethods:e}),N=e=>({type:s.SET_SHOULD_SAVE_PAYMENT_METHOD,shouldSavePaymentMethod:e}),P=(e,t)=>({type:s.SET_ACTIVE_PAYMENT_METHOD,paymentMethod:e,paymentMethodData:t});var R=c(50),x=c(107),T=c(251);var A=c(254),I=c(112);const M=Object(r.createContext)(l),D=()=>Object(r.useContext)(M),L=e=>{let{children:t}=e;const{isProcessing:c,isIdle:s,isCalculating:l,hasError:u}=Object(R.b)(),{isEditor:p,getPreviewData:m}=Object(g.b)(),{setValidationErrors:j}=Object(I.b)(),{addErrorNotice:D,removeNotice:L}=Object(E.a)(),{isSuccessResponse:B,isErrorResponse:F,isFailResponse:V,noticeContexts:U}=Object(_.c)(),[z,H]=Object(r.useReducer)(x.b,{}),{onPaymentProcessing:G}=(e=>Object(r.useMemo)(()=>({onPaymentProcessing:Object(T.a)("payment_processing",e)}),[e]))(H),q=Object(r.useRef)(z);Object(r.useEffect)(()=>{q.current=z},[z]);const[$,Y]=Object(r.useReducer)(i,a),{dispatchActions:W,setPaymentStatus:X}=(e=>{const{setBillingData:t}=Object(O.b)(),{setShippingAddress:c}=Object(h.b)();return{dispatchActions:Object(r.useMemo)(()=>({setRegisteredPaymentMethods:t=>{e(S(t))},setRegisteredExpressPaymentMethods:t=>{e(C(t))},setShouldSavePayment:t=>{e(N(t))},setActivePaymentMethod:function(t){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e(P(t,c))}}),[e]),setPaymentStatus:Object(r.useCallback)(()=>({pristine:()=>e(k(n.PRISTINE)),started:()=>e(k(n.STARTED)),processing:()=>e(k(n.PROCESSING)),completed:()=>e(k(n.COMPLETE)),error:t=>e(w(t)),failed:function(c,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),e(y({errorMessage:c||"",paymentMethodData:r||{}}))},success:function(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;o&&t(o),void 0!==typeof n&&null!=n&&n.address&&c(n.address),e(v({paymentMethodData:r}))}}),[e,t,c])}})(Y),K=(e=>{const t=Object(d.getPaymentMethods)(),{noticeContexts:c}=Object(_.c)(),r=new Set([...Object(b.getSetting)("paymentGatewaySortOrder",[]),...Object.keys(t)]);return f(e,t,Array.from(r),c.PAYMENTS)})(W.setRegisteredPaymentMethods),J=(e=>{const t=Object(d.getExpressPaymentMethods)(),{noticeContexts:c}=Object(_.c)();return f(e,t,Object.keys(t),c.EXPRESS_PAYMENTS)})(W.setRegisteredExpressPaymentMethods),Q=Object(r.useMemo)(()=>p?m("previewSavedPaymentMethods"):K?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===Object.keys(e).length)return{};const t=Object(b.getSetting)("customerPaymentMethods",{}),c=Object.keys(t),r={};return c.forEach(c=>{const o=t[c].filter(t=>{var c;let{method:{gateway:r}}=t;return r in e&&(null===(c=e[r].supports)||void 0===c?void 0:c.showSavedCards)});o.length&&(r[c]=o)}),r}($.paymentMethods):{},[p,m,K,$.paymentMethods]),Z=Object(r.useCallback)(e=>{e?D(e,{id:"wc-express-payment-error",context:U.EXPRESS_PAYMENTS}):L("wc-express-payment-error",U.EXPRESS_PAYMENTS)},[D,U.EXPRESS_PAYMENTS,L]),ee=Object.keys($.expressPaymentMethods).includes($.activePaymentMethod),te=Object(r.useMemo)(()=>({isPristine:$.currentStatus===n.PRISTINE,isStarted:$.currentStatus===n.STARTED,isProcessing:$.currentStatus===n.PROCESSING,isFinished:[n.ERROR,n.FAILED,n.SUCCESS].includes($.currentStatus),hasError:$.currentStatus===n.ERROR,hasFailed:$.currentStatus===n.FAILED,isSuccessful:$.currentStatus===n.SUCCESS,isDoingExpressPayment:$.currentStatus!==n.PRISTINE&&ee}),[$.currentStatus,ee]);Object(r.useEffect)(()=>{const e=Object.keys($.paymentMethods);if(!K||!e.length)return;const t=[...e,...Object.keys($.expressPaymentMethods)];if($.activePaymentMethod&&t.includes($.activePaymentMethod))return;X().pristine();const c=Object.keys(Q).flatMap(e=>Q[e])[0]||void 0;if(c){const e=c.tokenId,t=c.method.gateway,r=`wc-${t}-payment-token`;W.setActivePaymentMethod(t,{token:e,payment_method:t,[r]:e.toString(),isSavedToken:!0})}else W.setActivePaymentMethod(Object.keys($.paymentMethods)[0])},[K,$.paymentMethods,$.expressPaymentMethods,W,X,$.activePaymentMethod,Q]),Object(r.useEffect)(()=>{!c||u||l||te.isFinished||X().processing()},[c,u,l,te.isFinished,X]),Object(r.useEffect)(()=>{s&&!te.isSuccessful&&X().pristine()},[s,te.isSuccessful,X]),Object(r.useEffect)(()=>{u&&te.isSuccessful&&X().pristine()},[u,te.isSuccessful,X]),Object(r.useEffect)(()=>{te.isProcessing&&(L("wc-payment-error",U.PAYMENTS),Object(A.b)(q.current,"payment_processing",{}).then(e=>{let t,c;var r,o,n,s,a,l;if(e.forEach(e=>{B(e)&&(t=e),(F(e)||V(e))&&(c=e)}),t&&!c)X().success(null===(r=t)||void 0===r||null===(o=r.meta)||void 0===o?void 0:o.paymentMethodData,null===(n=t)||void 0===n||null===(s=n.meta)||void 0===s?void 0:s.billingData,null===(a=t)||void 0===a||null===(l=a.meta)||void 0===l?void 0:l.shippingData);else if(c&&V(c)){var i,u,d,p,b,m;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(m=c)||void 0===m?void 0:m.messageContext)||U.PAYMENTS}),X().failed(null===(i=c)||void 0===i?void 0:i.message,null===(u=c)||void 0===u||null===(d=u.meta)||void 0===d?void 0:d.paymentMethodData,null===(p=c)||void 0===p||null===(b=p.meta)||void 0===b?void 0:b.billingData)}else if(c){var g,h;c.message&&c.message.length&&D(c.message,{id:"wc-payment-error",isDismissible:!1,context:(null===(h=c)||void 0===h?void 0:h.messageContext)||U.PAYMENTS}),X().error(c.message),j(null===(g=c)||void 0===g?void 0:g.validationErrors)}else X().success()}))},[te.isProcessing,j,X,L,U.PAYMENTS,B,V,F,D]);const ce="object"==typeof $.paymentMethodData&&Object(o.d)($.paymentMethodData,"token")?$.paymentMethodData.token+"":"",re={setPaymentStatus:X,currentStatus:te,paymentStatuses:n,paymentMethodData:$.paymentMethodData,errorMessage:$.errorMessage,activePaymentMethod:$.activePaymentMethod,activeSavedToken:ce,setActivePaymentMethod:W.setActivePaymentMethod,onPaymentProcessing:G,customerPaymentMethods:Q,paymentMethods:$.paymentMethods,expressPaymentMethods:$.expressPaymentMethods,paymentMethodsInitialized:K,expressPaymentMethodsInitialized:J,setExpressPaymentError:Z,isExpressPaymentMethodActive:ee,shouldSavePayment:$.shouldSavePaymentMethod,setShouldSavePayment:W.setShouldSavePayment};return Object(r.createElement)(M.Provider,{value:re},t)}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(0),o=(c(10),c(112));c(160);const n=e=>{let{errorMessage:t="",propertyName:c="",elementId:n=""}=e;const{getValidationError:s,getValidationErrorId:a}=Object(o.b)();if(!t||"string"!=typeof t){const e=s(c)||{};if(!e.message||e.hidden)return null;t=e.message}return Object(r.createElement)("div",{className:"wc-block-components-validation-error",role:"alert"},Object(r.createElement)("p",{id:a(n)},t))}},function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=n},,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=n},,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(18);const a=Object(n.createElement)(e=>{let{className:t,size:c,...r}=e;return Object(n.createElement)(s.SVG,o()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:t,width:c,height:c},r),Object(n.createElement)("path",{d:"M14.95 6.46L11.41 10l3.54 3.54-1.41 1.41L10 11.42l-3.53 3.53-1.42-1.42L8.58 10 5.05 6.47l1.42-1.42L10 8.58l3.54-3.53z"}))},null);t.a=a},,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){},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){},,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(14),a=c(2);c(211),t.a=e=>{let{image:t={},fallbackAlt:c=""}=e;const r=t.thumbnail?{src:t.thumbnail,alt:Object(s.decodeEntities)(t.alt)||c||"Product Image"}:{src:a.PLACEHOLDER_IMG_SRC,alt:""};return Object(n.createElement)("img",o()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(109);t.a=()=>Object(r.createElement)(n.a,{className:"wc-block-components-product-backorder-badge"},Object(o.__)("Available on backorder","woo-gutenberg-products-block"))},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(109);t.a=e=>{let{lowStockRemaining:t}=e;return t?Object(r.createElement)(n.a,{className:"wc-block-components-product-low-stock-badge"},Object(o.sprintf)( +/* translators: %d stock amount (number of items in stock for product) */ +Object(o.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(0),o=c(181),n=c(2),s=c(114),a=c(189),l=c(67),i=c(56),u=c(50),d=c(1),p=c(11),b=c.n(p),m=c(248),g=c(28);const h=(e,t,c)=>{const r=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),o=`wc-${c}-new-payment-method`;return r.push({key:o,value:t}),r},O=(e,t)=>{b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("X-WC-Store-API-User")&&t.setCustomerId(parseInt(e.get("X-WC-Store-API-User")||"0",10))};var j=c(112),E=c(36),_=c(47),f=()=>{const{hasError:e,onCheckoutValidationBeforeProcessing:t,dispatchActions:c,redirectUrl:o,isProcessing:n,isBeforeProcessing:s,isComplete:p,orderNotes:f,shouldCreateAccount:k,extensionData:w}=Object(u.b)(),{hasValidationErrors:y}=Object(j.b)(),{shippingErrorStatus:v}=Object(l.b)(),{billingData:S,shippingAddress:C}=Object(i.b)(),{cartNeedsPayment:N,receiveCart:P}=Object(E.a)(),{activePaymentMethod:R,isExpressPaymentMethodActive:x,currentStatus:T,paymentMethodData:A,expressPaymentMethods:I,paymentMethods:M,shouldSavePayment:D}=Object(a.b)(),{addErrorNotice:L,removeNotice:B,setIsSuppressed:F}=Object(_.a)(),V=Object(r.useRef)(S),U=Object(r.useRef)(C),z=Object(r.useRef)(o),[H,G]=Object(r.useState)(!1),q=Object(r.useMemo)(()=>{var e;const t={...I,...M};return null==t||null===(e=t[R])||void 0===e?void 0:e.paymentMethodId},[R,I,M]),$=y&&!x||T.hasError||v.hasError,Y=!e&&!$&&(T.isSuccessful||!N)&&n;Object(r.useEffect)(()=>{F(x)},[x,F]),Object(r.useEffect)(()=>{$===e||!n&&!s||x||c.setHasError($)},[$,e,n,s,x,c]),Object(r.useEffect)(()=>{V.current=S,U.current=C,z.current=o},[S,C,o]);const W=Object(r.useCallback)(()=>!y&&(T.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!v.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[y,T.hasError,v.hasError]);Object(r.useEffect)(()=>{let e;return x||(e=t(W,0)),()=>{x||e()}},[t,W,x]),Object(r.useEffect)(()=>{z.current&&(window.location.href=z.current)},[p]);const X=Object(r.useCallback)(async()=>{if(H)return;G(!0),B("checkout");const e=N?{payment_method:q,payment_data:h(A,D,R)}:{},t={billing_address:Object(m.a)(V.current),shipping_address:Object(m.a)(U.current),customer_note:f,should_create_account:k,...e,extensions:{...w}};b()({path:"/wc/store/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(O(e.headers,c),!e.ok)throw new Error(e);return e.json()}).then(e=>{c.setAfterProcessing(e),G(!1)}).catch(e=>{try{null!=e&&e.headers&&O(e.headers,c),e.json().then(e=>{var t,r,o;null!==(t=e.data)&&void 0!==t&&t.cart&&P(e.data.cart),L(Object(g.b)(e),{id:"checkout"}),null==e||null===(r=e.additional_errors)||void 0===r||null===(o=r.forEach)||void 0===o||o.call(r,e=>{L(e.message,{id:e.error_code})}),c.setAfterProcessing(e)})}catch{var t;L(Object(d.sprintf)(// Translators: %s Error text. +Object(d.__)("%s Please try placing your order again.","woo-gutenberg-products-block"),null!==(t=null==e?void 0:e.message)&&void 0!==t?t:Object(d.__)("Something went wrong.","woo-gutenberg-products-block")),{id:"checkout"})}c.setHasError(!0),G(!1)})},[H,B,f,k,N,q,A,D,R,w,c,L,P]);return Object(r.useEffect)(()=>{Y&&!H&&X()},[X,Y,H]),null};const k=e=>{let{children:t,isCart:c=!1,redirectUrl:d}=e;return Object(r.createElement)(u.a,{redirectUrl:d,isCart:c},Object(r.createElement)(i.a,null,Object(r.createElement)(l.a,null,Object(r.createElement)(a.a,null,t,Object(r.createElement)(s.a,{renderError:n.CURRENT_USER_IS_ADMIN?null:()=>null},Object(r.createElement)(o.PluginArea,{scope:"woocommerce-checkout"})),Object(r.createElement)(f,null)))))}},function(e,t,c){"use strict";var r=c(0),o=c(6),n=c(14);c(214);var s=e=>{let{details:t=[]}=e;return Array.isArray(t)?(t=t.filter(e=>!e.hidden),0===t.length?null:Object(r.createElement)("ul",{className:"wc-block-components-product-details"},t.map(e=>{const t=(null==e?void 0:e.key)||e.name||"",c=t?"wc-block-components-product-details__"+Object(o.kebabCase)(t):"";return Object(r.createElement)("li",{key:t+(e.display||e.value),className:c},t&&Object(r.createElement)(r.Fragment,null,Object(r.createElement)("span",{className:"wc-block-components-product-details__name"},Object(n.decodeEntities)(t),":")," "),Object(r.createElement)("span",{className:"wc-block-components-product-details__value"},Object(n.decodeEntities)(e.display||e.value)))}))):null},a=c(129),l=c(25),i=e=>{let{className:t,shortDescription:c="",fullDescription:o=""}=e;const n=c||o;return n?Object(r.createElement)(a.a,{className:t,source:n,maxLength:15,countType:l.o.wordCountType||"words"}):null};c(213),t.a=e=>{let{shortDescription:t="",fullDescription:c="",itemData:o=[],variation:n=[]}=e;return Object(r.createElement)("div",{className:"wc-block-components-product-metadata"},Object(r.createElement)(i,{className:"wc-block-components-product-metadata__description",shortDescription:t,fullDescription:c}),Object(r.createElement)(s,{details:o}),Object(r.createElement)(s,{details:n.map(e=>{let{attribute:t="",value:c}=e;return{key:t,value:c}})}))}},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return x}));var r=c(1),o=c(35),n=c(0),s=c(4),a=c.n(s),l=c(18),i=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M4 10h3v7H4zM10.5 10h3v7h-3zM2 19h20v3H2zM17 10h3v7h-3zM12 1L2 6v2h20V6z"})),u=c(205),d=c(399),p=Object(n.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{fill:"#000",fillRule:"nonzero",d:"M17.3 8v1c1 .2 1.4.9 1.4 1.7h-1c0-.6-.3-1-1-1-.8 0-1.3.4-1.3.9 0 .4.3.6 1.4 1 1 .2 2 .6 2 1.9 0 .9-.6 1.4-1.5 1.5v1H16v-1c-.9-.1-1.6-.7-1.7-1.7h1c0 .6.4 1 1.3 1 1 0 1.2-.5 1.2-.8 0-.4-.2-.8-1.3-1.1-1.3-.3-2.1-.8-2.1-1.8 0-.9.7-1.5 1.6-1.6V8h1.3zM12 10v1H6v-1h6zm2-2v1H6V8h8zM2 4v16h20V4H2zm2 14V6h16v12H4z"}),Object(n.createElement)("path",{stroke:"#000",strokeLinecap:"round",d:"M6 16c2.6 0 3.9-3 1.7-3-2 0-1 3 1.5 3 1 0 1-.8 2.8-.8"}))),b=c(43),m=c(85);c(228);const g={bank:i,bill:u.a,card:d.a,checkPayment:p};var h=e=>{let{icon:t="",text:c=""}=e;const r=!!t,o=Object(n.useCallback)(e=>r&&Object(m.c)(e)&&Object(m.d)(g,e),[r]),s=a()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":r});return Object(n.createElement)("span",{className:s},o(t)?Object(n.createElement)(b.a,{srcElement:g[t]}):t,c)},O=c(184),j=c(2),E=c(65),_=c.n(E),f=c(66),k=c(193),w=c(36),y=c(183),v=c(44),S=c(50),C=c(189),N=c(67),P=c(56);const R=(e,t)=>{const c=[],o=(t,c)=>{const r=c+"_tax",o=Object(m.d)(e,c)&&Object(m.c)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:o,valueWithTax:o+(Object(m.d)(e,r)&&Object(m.c)(e[r])?parseInt(e[r],10):0)}};return c.push(o(Object(r.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(o(Object(r.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(o(Object(r.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(r.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(o(Object(r.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c},x=()=>{const{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onCheckoutAfterProcessingWithSuccess:i,onCheckoutAfterProcessingWithError:u,onSubmit:d,customerId:p}=Object(S.b)(),{currentStatus:b,activePaymentMethod:m,onPaymentProcessing:g,setExpressPaymentError:E,shouldSavePayment:x}=Object(C.b)(),{shippingErrorStatus:T,shippingErrorTypes:A,shippingRates:I,shippingRatesLoading:M,selectedRates:D,setSelectedRates:L,isSelectingRate:B,onShippingRateSuccess:F,onShippingRateFail:V,onShippingRateSelectSuccess:U,onShippingRateSelectFail:z,needsShipping:H}=Object(N.b)(),{billingData:G,shippingAddress:q,setShippingAddress:$}=Object(P.b)(),{cartItems:Y,cartFees:W,cartTotals:X,extensions:K}=Object(w.a)(),{appliedCoupons:J}=Object(y.a)(),{noticeContexts:Q,responseTypes:Z}=Object(v.c)(),ee=Object(n.useRef)(R(X,H)),te=Object(n.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)});Object(n.useEffect)(()=>{ee.current=R(X,H),te.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(X.total_price,10)}},[X,H]);const ce=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";_()("setExpressPaymentError should only be used by Express Payment Methods (using the provided onError handler).",{alternative:"",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4228"}),E(e)}),[E]);return{activePaymentMethod:m,billing:{appliedCoupons:J,billingData:G,cartTotal:te.current,cartTotalItems:ee.current,currency:Object(o.getCurrencyFromPriceResponse)(X),customerId:p,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:Y,cartFees:W,extensions:K},checkoutStatus:{isCalculating:e,isComplete:t,isIdle:c,isProcessing:s},components:{LoadingMask:f.a,PaymentMethodIcons:O.a,PaymentMethodLabel:h,ValidationInputError:k.a},emitResponse:{noticeContexts:Q,responseTypes:Z},eventRegistration:{onCheckoutAfterProcessingWithError:u,onCheckoutAfterProcessingWithSuccess:i,onCheckoutBeforeProcessing:a,onCheckoutValidationBeforeProcessing:l,onPaymentProcessing:g,onShippingRateFail:V,onShippingRateSelectFail:z,onShippingRateSelectSuccess:U,onShippingRateSuccess:F},onSubmit:d,paymentStatus:b,setExpressPaymentError:ce,shippingData:{isSelectingRate:B,needsShipping:H,selectedRates:D,setSelectedRates:L,setShippingAddress:$,shippingAddress:q,shippingRates:I,shippingRatesLoading:M},shippingStatus:{shippingErrorStatus:T,shippingErrorTypes:A},shouldSavePayment:x}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return l})),c.d(t,"a",(function(){return i}));var r=c(0),o=(c(10),c(9)),n=c(4),s=c.n(n);const a=Object(r.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),l=()=>Object(r.useContext)(a),i=e=>{let{children:t,className:c=""}=e;const[n,l]=(()=>{const[e,{width:t}]=Object(o.useResizeObserver)();let c="";return t>700?c="is-large":t>520?c="is-medium":t>400?c="is-small":t&&(c="is-mobile"),[e,c]})(),i={hasContainerWidth:""!==l,containerClassName:l,isMobile:"is-mobile"===l,isSmall:"is-small"===l,isMedium:"is-medium"===l,isLarge:"is-large"===l};return Object(r.createElement)(a.Provider,{value:i},Object(r.createElement)("div",{className:s()(c,l)},n,t))}},function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(1),a=c(8),l=c(4),i=c.n(l),u=c(112),d=c(193),p=c(9),b=c(85),m=c(30);c(170);var g=Object(a.forwardRef)((e,t)=>{let{className:c,id:r,type:s="text",ariaLabel:a,ariaDescribedBy:l,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:j,required:E=!1,onBlur:_=(()=>{}),feedback:f,...k}=e;const[w,y]=Object(n.useState)(!1);return Object(n.createElement)("div",{className:i()("wc-block-components-text-input",c,{"is-active":w||O})},Object(n.createElement)("input",o()({type:s,id:r,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{j(e.target.value)},onFocus:()=>y(!0),onBlur:e=>{_(e.target.value),y(!1)},"aria-label":a||u,disabled:p,"aria-describedby":b&&!l?r+"__help":l,required:E},k)),Object(n.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:r},htmlFor:r}),!!b&&Object(n.createElement)("p",{id:r+"__help",className:"wc-block-components-text-input__help"},b),f)});t.a=Object(p.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:l,errorId:p,focusOnMount:m=!1,onChange:h,showError:O=!0,errorMessage:j="",value:E="",..._}=e;const[f,k]=Object(a.useState)(!0),w=Object(a.useRef)(null),{getValidationError:y,hideValidationError:v,setValidationErrors:S,clearValidationError:C,getValidationErrorId:N}=Object(u.b)(),P=void 0!==r?r:"textinput-"+c,R=void 0!==p?p:P,x=Object(a.useCallback)((function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=w.current||null;if(!t)return;t.value=t.value.trim();const c=t.checkValidity();c?C(R):S({[R]:{message:t.validationMessage||Object(s.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}})}),[C,R,S]);Object(a.useEffect)(()=>{var e;f&&m&&(null===(e=w.current)||void 0===e||e.focus()),k(!1)},[m,f,k]),Object(a.useEffect)(()=>{var e,t;(null===(e=w.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==w.current&&x(!0)},[E,x]),Object(a.useEffect)(()=>()=>{C(R)},[C,R]);const T=y(R)||{};Object(b.c)(j)&&""!==j&&(T.message=j);const A=T.message&&!T.hidden,I=O&&A&&N(R)?N(R):l;return Object(n.createElement)(g,o()({className:i()(t,{"has-error":A}),"aria-invalid":!0===A,id:P,onBlur:()=>{x(!1)},feedback:O&&Object(n.createElement)(d.a,{errorMessage:j,propertyName:R}),ref:w,onChange:e=>{v(R),h(e)},ariaDescribedBy:I,value:E},_))})},,,,,function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return a}));const r=window.CustomEvent||null,o=(e,t)=>{let{bubbles:c=!1,cancelable:o=!1,element:n,detail:s={}}=t;if(!r)return;n||(n=document.body);const a=new r(e,{bubbles:c,cancelable:o,detail:s});n.dispatchEvent(a)};let n;const s=()=>{n&&clearTimeout(n),n=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const n=()=>{o(t,{bubbles:c,cancelable:r})};return jQuery(document).on(e,n),()=>jQuery(document).off(e,n)}},function(e,t,c){"use strict";c.d(t,"b",(function(){return s})),c.d(t,"c",(function(){return a})),c.d(t,"a",(function(){return l}));var r=c(2),o=c(98),n=c(15);const s=e=>{let{country:t="",state:c="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:c.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(n.isEmail)(t)?t.trim():""},l=e=>{const t=Object.keys(r.defaultAddressFields),c=Object(o.a)(t,{},e.country),n=Object.assign({},e);return c.forEach(t=>{let{key:c="",hidden:r=!1}=t;r&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(107);const o=(e,t)=>function(c){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;const n=r.a.addEventCallback(e,c,o);return t(n),()=>{t(r.a.removeEventCallback(e,n.id))}}},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return s}));const r=(e,t)=>e[t]?Array.from(e[t].values()).sort((e,t)=>e.priority-t.priority):[];var o=c(44);const n=async(e,t,c)=>{const o=r(e,t),n=[];for(const e of o)try{const t=await Promise.resolve(e.callback(c));"object"==typeof t&&n.push(t)}catch(e){console.error(e)}return!n.length||n},s=async(e,t,c)=>{const n=[],s=r(e,t);for(const e of s)try{const t=await Promise.resolve(e.callback(c));if("object"!=typeof t||null===t)continue;if(!t.hasOwnProperty("type"))throw new Error("Returned objects from event emitter observers must return an object with a type property");if(Object(o.a)(t)||Object(o.b)(t))return n.push(t),n;n.push(t)}catch(e){return console.error(e),n.push({type:"error"}),n}return n}},,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),o=c(13),n=c(12),s=c(6);const a=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:a=[]}=e;const l=Object(r.useRef)(c),i=Object(r.useRef)(a),{insertBlock:u,replaceInnerBlocks:d}=Object(o.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(o.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:l.current.map(e=>Object(n.getBlockType)(e))}),[t,l.current]),m=Object(r.useCallback)((e,c)=>{const r=Object(n.createBlock)(e.name);u(r,c,t,!1)},[t,u]),g=Object(r.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,r;let{attributes:o}=e;return Boolean((null===(t=o.lock)||void 0===t?void 0:t.remove)||(null===(c=o.lock)||void 0===c||null===(r=c.default)||void 0===r?void 0:r.remove))})(e)),[b]);Object(r.useLayoutEffect)(()=>{if(t){if(0===p.length&&i.current.length>0){const e=Object(n.createBlocksFromInnerBlocksTemplate)(i.current);if(!Object(s.isEqual)(e,p))return void d(t,e)}g.forEach(e=>{if(p.find(t=>{let{name:c}=t;return c===e.name}))return;const t=i.current.findIndex(t=>{let[c]=t;return c===e.name});switch(t){case-1:m(e,p.length);break;case 0:m(e,0);break;default:const c=i.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===r?t:r+1)}})}},[t,p,g,d,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return d}));var r=c(0),o=c(3),n=c(1),s=c(2);const a=[];var l=c(5),i=c.n(l),u=e=>Object(r.createElement)("div",i()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(r.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)("g",{filter:"url(#filter0_ddd)"},Object(r.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(r.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(r.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(r.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(r.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(r.createElement)("defs",null,Object(r.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(r.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"1"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(r.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(r.createElement)("feOffset",{dy:"2"}),Object(r.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(r.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(r.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(r.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function d(e){let{blockName:t}=e;const[c,l]=(e=>{const[t,c]=((e,t)=>{const[c,o]=Object(r.useState)(()=>{const c=window.localStorage.getItem(e);if(c)try{return JSON.parse(c)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(r.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(c))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,c]),[c,o]})("wc-blocks_dismissed_compatibility_notices",a),[o,n]=Object(r.useState)(!1),s=t.includes(e);return Object(r.useEffect)(()=>{n(!s)},[s]),[o,()=>{const r=new Set(t);r.add(e),c([...r])}]})(t);return Object(s.isWpVersion)("5.4","<=")||!c?null:Object(r.createElement)(o.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(n.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>l(),finishButtonText:Object(n.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(r.createElement)(u,null),content:Object(r.createElement)(r.Fragment,null,Object(r.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(n.__)("Compatibility notice","woo-gutenberg-products-block")),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(n.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(r.createElement)("em",null)})),Object(r.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(r.createInterpolateElement)(Object(n.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},,,,,,,,,,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-fields-block","version":"1.0.0","title":"Checkout Fields","description":"Column containing checkout address fields.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-totals-block","version":"1.0.0","title":"Checkout Totals","description":"Column containing the checkout totals.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-address-block","version":"1.0.0","title":"Shipping Address","description":"Collect your customer\'s shipping address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-terms-block","version":"1.0.0","title":"Terms and Conditions","description":"Ensure customers agree to your terms and conditions and privacy policy.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"checkbox":{"type":"boolean","default":false},"text":{"type":"string","required":false}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-contact-information-block","version":"1.0.0","title":"Contact Information","description":"Collect your customer\'s contact information.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-billing-address-block","version":"1.0.0","title":"Billing Address","description":"Collect your customer\'s billing address.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-actions-block","version":"1.0.0","title":"Actions","description":"Allow customers to place their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-note-block","version":"1.0.0","title":"Order Note","description":"Allow customers to add a note to their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":false,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-order-summary-block","version":"1.0.0","title":"Order Summary","description":"Show customers a summary of their order.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true}}},"parent":["woocommerce/checkout-totals-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-payment-block","version":"1.0.0","title":"Payment Options","description":"Payment options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-express-payment-block","version":"1.0.0","title":"Express Checkout","description":"Provide an express payment option for your customers.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"className":{"type":"string","default":""},"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout-shipping-methods-block","version":"1.0.0","title":"Shipping Options","description":"Shipping options for your store.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/checkout-fields-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(r.createElement)("path",{d:"M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"}));t.a=n},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h12c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M12 6H4V4.75h8zM12 9H4V7.75h8zM10 12H4v-1.25h6z"})));t.a=n},,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(12);const o=["core/paragraph","core/image","core/separator"],n=e=>[...Object(r.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...o]},function(e,t,c){"use strict";var r=c(0),o=c(4),n=c.n(o),s=(c(10),c(241));c(210),t.a=e=>{let{children:t,className:c}=e;return Object(r.createElement)(s.a,{className:n()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var r=c(0),o=c(8),n=c(4),s=c.n(n);const a=Object(o.forwardRef)((e,t)=>{let{children:c,className:o=""}=e;return Object(r.createElement)("div",{ref:t,className:s()("wc-block-components-main",o)},c)});t.a=a},,,function(e,t,c){"use strict";var r=c(0),o=c(8),n=c(4),s=c.n(n);const a=Object(o.forwardRef)((e,t)=>{let{children:c,className:o=""}=e;return Object(r.createElement)("div",{ref:t,className:s()("wc-block-components-sidebar",o)},c)});t.a=a},function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M6 3.75h12c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H6c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.9 7.5A1.1 1.1 0 018 6.4h8a1.1 1.1 0 011.1 1.1v2a1.1 1.1 0 01-1.1 1.1H8a1.1 1.1 0 01-1.1-1.1v-2zm1.2.1v1.8h7.8V7.6H8.1z",clipRule:"evenodd"}),Object(r.createElement)("path",{fill:"currentColor",d:"M8.5 12h1v1h-1v-1zM8.5 14h1v1h-1v-1zM8.5 16h1v1h-1v-1zM11.5 12h1v1h-1v-1zM11.5 14h1v1h-1v-1zM11.5 16h1v1h-1v-1zM14.5 12h1v1h-1v-1zM14.5 14h1v1h-1v-1zM14.5 16h1v1h-1v-1z"}));t.a=n},,,,,function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(66),s=c(185),a=c(19),l=c(2);c(216);const i={context:"summary"};t.a=e=>{let{cartCoupons:t=[],currency:c,isRemovingCoupon:u,removeCoupon:d,values:p}=e;const{total_discount:b,total_discount_tax:m}=p,g=parseInt(b,10);if(!g&&0===t.length)return null;const h=parseInt(m,10),O=Object(l.getSetting)("displayCartPricesIncludingTax",!1)?g+h:g,j=Object(a.__experimentalApplyCheckoutFilter)({arg:i,filterName:"coupons",defaultValue:t});return Object(r.createElement)(a.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==j.length&&Object(r.createElement)(n.a,{screenReaderLabel:Object(o.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(r.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},j.map(e=>Object(r.createElement)(s.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(o.sprintf)( +/* translators: %s Coupon code. */ +Object(o.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(o.sprintf)( +/* translators: %s is a coupon code. */ +Object(o.__)('Remove coupon "%s"',"woo-gutenberg-products-block"),e.label)})))),label:O?Object(o.__)("Discount","woo-gutenberg-products-block"):Object(o.__)("Coupons","woo-gutenberg-products-block"),value:O?-1*O:"-"})}},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(76),s=c(242),a=c(30),l=c(66),i=c(9),u=c(112),d=c(193),p=c(19);c(218),t.a=Object(i.withInstanceId)(e=>{let{instanceId:t,isLoading:c=!1,initialOpen:i=!1,onSubmit:b=(()=>{})}=e;const[m,g]=Object(r.useState)(""),h=Object(r.useRef)(!1),{getValidationError:O,getValidationErrorId:j}=Object(u.b)(),E=O("coupon");Object(r.useEffect)(()=>{h.current!==c&&(c||!m||E||g(""),h.current=c)},[c,m,E]);const _="wc-block-components-totals-coupon__input-"+t;return Object(r.createElement)(p.Panel,{className:"wc-block-components-totals-coupon",hasBorder:!1,initialOpen:i,title:Object(r.createElement)(a.a,{label:Object(o.__)("Coupon code","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Apply a coupon code","woo-gutenberg-products-block"),htmlFor:_})},Object(r.createElement)(l.a,{screenReaderLabel:Object(o.__)("Applying coupon…","woo-gutenberg-products-block"),isLoading:c,showSpinner:!1},Object(r.createElement)("div",{className:"wc-block-components-totals-coupon__content"},Object(r.createElement)("form",{className:"wc-block-components-totals-coupon__form"},Object(r.createElement)(s.a,{id:_,errorId:"coupon",className:"wc-block-components-totals-coupon__input",label:Object(o.__)("Enter code","woo-gutenberg-products-block"),value:m,ariaDescribedBy:j(_),onChange:e=>{g(e)},focusOnMount:!0,showError:!1}),Object(r.createElement)(n.a,{className:"wc-block-components-totals-coupon__button",disabled:c||!m,showSpinner:c,onClick:e=>{e.preventDefault(),b(m)},type:"submit"},Object(o.__)("Apply","woo-gutenberg-products-block"))),Object(r.createElement)(d.a,{propertyName:"coupon",elementId:_}))))})},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return o}));const r=e=>e.length,o=e=>e.reduce((function(e,t){return e+t.shipping_rates.length}),0)},function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(41),s=c(19),a=c(36),l=c(2);c(225),t.a=e=>{let{currency:t,values:c}=e;const i=Object(l.getSetting)("taxesEnabled",!0)&&Object(l.getSetting)("displayCartPricesIncludingTax",!1),{total_price:u,total_tax:d}=c,{receiveCart:p,...b}=Object(a.a)(),m=Object(s.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(o.__)("Total","woo-gutenberg-products-block"),extensions:b.extensions,arg:{cart:b}}),g=parseInt(d,10);return Object(r.createElement)(s.TotalsItem,{className:"wc-block-components-totals-footer-item",currency:t,label:m,value:parseInt(u,10),description:i&&0!==g&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(r.createInterpolateElement)(Object(o.__)("Including in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(n.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:g})}))})}},function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}));t.a=n},,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return d})),c.d(t,"b",(function(){return b}));var r=c(7),o=c(80),n=c(13),s=c(0),a=c(84),l=c(61),i=c(12);const u=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t?window.document.body.classList.add(e):window.document.body.classList.remove(e)},d=()=>{Object(l.hasFilter)("blocks.registerBlockType","core/lock/addAttribute")||Object(n.subscribe)(()=>{var e,t,c,o;const s=Object(n.select)(r.store);if(!s)return;const a=s.getSelectedBlock();a&&(u("wc-lock-selected-block--remove",!(null==a||null===(e=a.attributes)||void 0===e||null===(t=e.lock)||void 0===t||!t.remove)),u("wc-lock-selected-block--move",!(null==a||null===(c=a.attributes)||void 0===c||null===(o=c.lock)||void 0===o||!o.move)))})},p=e=>{let{ref:t}=e;const c=Object(l.hasFilter)("blocks.registerBlockType","core/lock/addAttribute"),u=t.current;return Object(s.useEffect)(()=>{if(u&&!c)return u.addEventListener("keydown",e,{capture:!0,passive:!1}),()=>{u.removeEventListener("keydown",e,{capture:!0})};function e(e){const{keyCode:t,target:c}=e;if(!(c instanceof HTMLElement))return;if(t!==a.BACKSPACE&&t!==a.DELETE)return;if(Object(o.isTextField)(c))return;const s=c;void 0!==s.dataset.block&&(e=>{var t,c,o,s,a;if(!e)return!1;const{getBlock:l}=Object(n.select)(r.store),u=l(e);if("boolean"==typeof(null==u||null===(t=u.attributes)||void 0===t||null===(c=t.lock)||void 0===c?void 0:c.remove))return u.attributes.lock.remove;const d=Object(i.getBlockType)(u.name);var p,b,m;return"boolean"==typeof(null==d||null===(o=d.attributes)||void 0===o||null===(s=o.lock)||void 0===s||null===(a=s.default)||void 0===a?void 0:a.remove)&&(null==d||null===(p=d.attributes)||void 0===p||null===(b=p.lock)||void 0===b||null===(m=b.default)||void 0===m?void 0:m.remove)})(s.dataset.block)&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}},[u,c])},b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Object(s.useRef)(),c=Object(r.useBlockProps)({ref:t,...e});return p({ref:t}),c}},function(e,t,c){e.exports=c(433)},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){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},,,,,,,,,function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(4),s=c.n(n),a=c(43),l=c(18),i=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",fill:"none",d:"M5 3.75h14c.69 0 1.25.56 1.25 1.25v14c0 .69-.56 1.25-1.25 1.25H5c-.69 0-1.25-.56-1.25-1.25V5c0-.69.56-1.25 1.25-1.25z"}),Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.4 10.75c0-.47.38-.85.85-.85h9.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-9.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h8.8v-.8H7.6zM12.4 15.25c0-.47.38-.85.85-.85h3.5c.47 0 .85.38.85.85v1.5c0 .47-.38.85-.85.85h-3.5a.85.85 0 01-.85-.85v-1.5zm1.2.35v.8h2.8v-.8h-2.8zM6.5 15.9a.6.6 0 01.6-.6h2.8a.6.6 0 010 1.2H7.1a.6.6 0 01-.6-.6zM6.5 7.9a.6.6 0 01.6-.6h9.8a.6.6 0 110 1.2H7.1a.6.6 0 01-.6-.6z",clipRule:"evenodd"})),u=c(77),d=c(12),p=c(7),b=c(383),m=c(49),g=c(235),h=c(464);const O={cc:[{method:{gateway:"stripe",last4:"5678",brand:"Visa"},expires:"12/20",is_default:!1,tokenId:"1"}]};var j=c(3),E=c(180),_=c(25),f=c(2),k=c(269),w=(c(424),c(406));const y=Object(r.createContext)({allowCreateAccount:!1,showCompanyField:!1,showApartmentField:!1,showPhoneField:!1,requireCompanyField:!1,requirePhoneField:!1,showOrderNotes:!0,showPolicyLinks:!0,showReturnToCart:!0,cartPageId:0,showRateAfterTaxName:!1}),v=Object(r.createContext)({addressFieldControls:()=>null,accountControls:()=>null}),S=()=>Object(r.useContext)(y),C=()=>Object(r.useContext)(v);Object(w.a)();const N=["woocommerce/checkout-fields-block","woocommerce/checkout-totals-block"],P=e=>{let{attributes:t,setAttributes:c}=e;const{hasDarkControls:n}=t,{currentPostId:s}=Object(m.b)();return Object(r.createElement)(p.InspectorControls,null,s!==_.e&&Object(r.createElement)(j.Notice,{className:"wc-block-checkout__page-notice",isDismissible:!1,status:"warning"},Object(r.createInterpolateElement)(Object(o.__)("If you would like to use this block as your default checkout you must update your page settings in WooCommerce.","woo-gutenberg-products-block"),{a:Object(r.createElement)("a",{href:Object(f.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})})),Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Style","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Dark mode inputs","woo-gutenberg-products-block"),help:Object(o.__)("Inputs styled specifically for use on dark background colors.","woo-gutenberg-products-block"),checked:n,onChange:()=>c({hasDarkControls:!n})})),Object(r.createElement)(E.a,null))},R={isPreview:{type:"boolean",default:!1,save:!1},hasDarkControls:{type:"boolean",default:Object(f.getSetting)("hasDarkEditorStyleSupport",!1)},showCompanyField:{type:"boolean",default:!1},requireCompanyField:{type:"boolean",default:!1},allowCreateAccount:{type:"boolean",default:!1},showApartmentField:{type:"boolean",default:!0},showPhoneField:{type:"boolean",default:!0},requirePhoneField:{type:"boolean",default:!1},showOrderNotes:{type:"boolean",default:!0},showPolicyLinks:{type:"boolean",default:!0},showReturnToCart:{type:"boolean",default:!0},cartPageId:{type:"number",default:0},showRateAfterTaxName:{type:"boolean",default:Object(f.getSetting)("displayCartPricesIncludingTax",!1)}};var x=c(478),T=c(484),A=c(384),I=c(19),M=c(382),D=c(268);c(408);var L=c(285);Object(u.d)(L,{icon:{src:Object(r.createElement)(x.a,{icon:T.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t,attributes:c}=e;const o=Object(p.useBlockProps)({className:s()("wc-block-checkout__main",null==c?void 0:c.className)}),n=Object(M.a)(I.innerBlockAreas.CHECKOUT_FIELDS),{addressFieldControls:a}=C(),l=[["woocommerce/checkout-express-payment-block",{},[]],["woocommerce/checkout-contact-information-block",{},[]],["woocommerce/checkout-shipping-address-block",{},[]],["woocommerce/checkout-billing-address-block",{},[]],["woocommerce/checkout-shipping-methods-block",{},[]],["woocommerce/checkout-payment-block",{},[]],["woocommerce/checkout-order-note-block",{},[]],["woocommerce/checkout-terms-block",{},[]],["woocommerce/checkout-actions-block",{},[]]].filter(Boolean);return Object(D.a)({clientId:t,registeredBlocks:n,defaultTemplate:l}),Object(r.createElement)(A.a,o,Object(r.createElement)(a,null),Object(r.createElement)("form",{className:"wc-block-components-form wc-block-checkout__form"},Object(r.createElement)(p.InnerBlocks,{allowedBlocks:n,templateLock:!1,template:l,renderAppender:p.InnerBlocks.ButtonBlockAppender})))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(p.InnerBlocks.Content,null))});var B=c(387);c(409);var F=c(286);Object(u.d)(F,{icon:{src:Object(r.createElement)(x.a,{icon:T.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t,attributes:c}=e;const o=Object(p.useBlockProps)({className:s()("wc-block-checkout__sidebar",null==c?void 0:c.className)}),{showRateAfterTaxName:n}=S(),a=Object(M.a)(I.innerBlockAreas.CHECKOUT_TOTALS),l=[["woocommerce/checkout-order-summary-block",{showRateAfterTaxName:n},[]]];return Object(D.a)({clientId:t,registeredBlocks:a,defaultTemplate:l}),Object(r.createElement)(B.a,o,Object(r.createElement)(p.InnerBlocks,{allowedBlocks:a,templateLock:!1,template:l,renderAppender:p.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(p.InnerBlocks.Content,null))});var V=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 16"},Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.6 0A5.596 5.596 0 000 5.6C0 9.8 5.6 16 5.6 16s5.6-6.2 5.6-10.4C11.2 2.504 8.696 0 5.6 0zm-4 5.6c0-2.208 1.792-4 4-4s4 1.792 4 4c0 2.304-2.304 5.752-4 7.904-1.664-2.136-4-5.624-4-7.904zm2 0a2 2 0 114 0 2 2 0 01-4 0z"})),U=c(121),z=e=>{let{children:t,stepHeadingContent:c}=e;return Object(r.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(r.createElement)(U.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};const H=e=>{let{attributes:t,setAttributes:c,className:n="",children:a}=e;const{title:l="",description:i="",showStepNumber:u=!0}=t,d=Object(p.useBlockProps)({className:s()("wc-block-components-checkout-step",n,{"wc-block-components-checkout-step--with-step-number":u})});return Object(r.createElement)("div",d,Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Form Step Options","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Show step number","woo-gutenberg-products-block"),checked:u,onChange:()=>c({showStepNumber:!u})}))),Object(r.createElement)(z,null,Object(r.createElement)(p.PlainText,{className:"",value:l,onChange:e=>c({title:e})})),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__container"},Object(r.createElement)("p",{className:"wc-block-components-checkout-step__description"},Object(r.createElement)(p.PlainText,{className:i?"":"wc-block-components-checkout-step__description-placeholder",value:i,placeholder:Object(o.__)("Optional text for this form step.","woo-gutenberg-products-block"),onChange:e=>c({description:e})})),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__content"},a)))};c(410);const G=e=>{let{block:t}=e;const{"data-block":c}=Object(p.useBlockProps)(),o=Object(M.a)(t);return Object(D.a)({clientId:c,registeredBlocks:o}),Object(r.createElement)("div",{className:"wc-block-checkout__additional_fields"},Object(r.createElement)(p.InnerBlocks,{allowedBlocks:o}))},q=()=>Object(r.createElement)(p.InnerBlocks.Content,null);var $=c(438),Y=c(67),W=c(56);const X=()=>{const{needsShipping:e}=Object(Y.b)(),{billingData:t,setBillingData:c,shippingAddress:o,setShippingAddress:n,shippingAsBilling:s,setShippingAsBilling:a}=Object(W.b)(),l=Object(r.useRef)(s),i=Object(r.useRef)(),u=Object(r.useCallback)(e=>{n(e),s&&c(e)},[s,n,c]),d=Object(r.useCallback)(t=>{c(t),e||n(t)},[e,n,c]);Object(r.useEffect)(()=>{if(l.current!==s){if(s)i.current=t,c(o);else{const{email:e,...r}=i.current||t;c({...r})}l.current=s}},[s,c,o,t]);const p=Object(r.useCallback)(e=>{c({email:e})},[c]),b=Object(r.useCallback)(e=>{c({phone:e})},[c]),m=Object(r.useCallback)(e=>{u({phone:e})},[u]);return{defaultAddressFields:f.defaultAddressFields,shippingFields:o,setShippingFields:u,billingFields:t,setBillingFields:d,setEmail:p,setPhone:b,setShippingPhone:m,shippingAsBilling:s,setShippingAsBilling:a,showShippingFields:e,showBillingFields:!e||!l.current}};var K=c(60),J=c(52),Q=c(242),Z=e=>{let{id:t="phone",isRequired:c=!1,value:n="",onChange:s}=e;return Object(r.createElement)(Q.a,{id:t,type:"tel",autoComplete:"tel",required:c,label:c?Object(o.__)("Phone","woo-gutenberg-products-block"):Object(o.__)("Phone (optional)","woo-gutenberg-products-block"),value:n,onChange:s})},ee=e=>{let{showCompanyField:t=!1,showApartmentField:c=!1,showPhoneField:n=!1,requireCompanyField:s=!1,requirePhoneField:a=!1}=e;const{defaultAddressFields:l,setShippingFields:i,shippingFields:u,setShippingAsBilling:d,shippingAsBilling:p,setShippingPhone:b}=X(),{dispatchCheckoutEvent:g}=Object(K.a)(),{isEditor:h}=Object(m.b)();Object(r.useEffect)(()=>{n||b("")},[n,b]);const O=Object(r.useMemo)(()=>({company:{hidden:!t,required:s},address_2:{hidden:!c}}),[t,s,c]),j=h?J.a:r.Fragment;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(j,null,Object(r.createElement)($.a,{id:"shipping",type:"shipping",onChange:e=>{i(e),g("set-shipping-address")},values:u,fields:Object.keys(l),fieldConfig:O}),n&&Object(r.createElement)(Z,{id:"shipping-phone",isRequired:a,value:u.phone,onChange:e=>{b(e),g("set-phone-number",{step:"shipping"})}})),Object(r.createElement)(I.CheckboxControl,{className:"wc-block-checkout__use-address-for-billing",label:Object(o.__)("Use same address for billing","woo-gutenberg-products-block"),checked:p,onChange:e=>d(e)}))},te=e=>{let{defaultTitle:t=Object(o.__)("Step","woo-gutenberg-products-block"),defaultDescription:c=Object(o.__)("Step description text.","woo-gutenberg-products-block"),defaultShowStepNumber:r=!0}=e;return{title:{type:"string",default:t},description:{type:"string",default:c},showStepNumber:{type:"boolean",default:r}}},ce={...te({defaultTitle:Object(o.__)("Shipping address","woo-gutenberg-products-block"),defaultDescription:Object(o.__)("Enter the address where you want your order delivered.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},re=c(287);Object(u.d)(re,{icon:{src:Object(r.createElement)(a.a,{srcElement:V,className:"wc-block-editor-components-block-icon"})},attributes:ce,edit:e=>{let{attributes:t,setAttributes:c}=e;const{showCompanyField:o,showApartmentField:n,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}=S(),{addressFieldControls:u}=C();return Object(r.createElement)(H,{setAttributes:c,attributes:t,className:s()("wc-block-checkout__shipping-fields",null==t?void 0:t.className)},Object(r.createElement)(u,null),Object(r.createElement)(ee,{showCompanyField:o,showApartmentField:n,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}),Object(r.createElement)(G,{block:I.innerBlockAreas.SHIPPING_ADDRESS}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});var oe=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},Object(r.createElement)("g",{fill:"currentColor",fillRule:"evenodd"},Object(r.createElement)("path",{d:"M13.147 2.527c.288.279.295.739.015 1.027L9 7.84l4.449 4.581a.726.726 0 11-1.042 1.012l-4.42-4.55-4.419 4.55a.726.726 0 01-1.042-1.012l4.45-4.581L2.81 3.554a.726.726 0 011.042-1.012l4.133 4.256 4.134-4.256a.726.726 0 011.027-.015z"}),Object(r.createElement)("path",{d:"M.467 7.915c0-.4.326-.726.727-.726H7.29l-.03-5.99a.726.726 0 011.452-.008l.031 5.998h6.229a.726.726 0 110 1.453H8.752l.033 6.328a.726.726 0 11-1.453.007L7.3 8.642H1.194a.726.726 0 01-.727-.727z"}))),ne=c(487);c(411);const se=_.k?`${Object(o.__)("Terms and Conditions","woo-gutenberg-products-block")}`:Object(o.__)("Terms and Conditions","woo-gutenberg-products-block"),ae=_.g?`${Object(o.__)("Privacy Policy","woo-gutenberg-products-block")}`:Object(o.__)("Privacy Policy","woo-gutenberg-products-block"),le=Object(o.sprintf)( +/* translators: %1$s terms page link, %2$s privacy page link. */ +Object(o.__)("By proceeding with your purchase you agree to our %1$s and %2$s","woo-gutenberg-products-block"),se,ae),ie=Object(o.sprintf)( +/* translators: %1$s terms page link, %2$s privacy page link. */ +Object(o.__)("You must accept our %1$s and %2$s to continue with your purchase.","woo-gutenberg-products-block"),se,ae);var ue=c(288);Object(u.d)(ue,{icon:{src:Object(r.createElement)(a.a,{srcElement:oe,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:{checkbox:t,text:c},setAttributes:n}=e;const s=Object(p.useBlockProps)(),a=c||(t?ie:le);return Object(r.createElement)("div",s,Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Display options","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Require checkbox","woo-gutenberg-products-block"),checked:t,onChange:()=>n({checkbox:!t})}))),Object(r.createElement)("div",{className:"wc-block-checkout__terms"},t?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(I.CheckboxControl,{id:"terms-condition",checked:!1}),Object(r.createElement)(p.RichText,{value:a,onChange:e=>n({text:e})})):Object(r.createElement)(p.RichText,{tagName:"span",value:a,onChange:e=>n({text:e})})),(!_.k||!_.g)&&Object(r.createElement)(j.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:[!_.k&&{className:"wc-block-checkout__terms_notice-button",label:Object(r.createElement)(r.Fragment,null,Object(o.__)("Setup a Terms and Conditions page","woo-gutenberg-products-block"),Object(r.createElement)(x.a,{icon:ne.a,size:16,className:"wc-block-checkout__terms_notice-button__icon"})),onClick:()=>window.open(f.ADMIN_URL+"admin.php?page=wc-settings&tab=advanced","_blank")},!_.g&&{className:"wc-block-checkout__terms_notice-button",label:Object(r.createElement)(r.Fragment,null,Object(o.__)("Setup a Privacy Policy page","woo-gutenberg-products-block"),Object(r.createElement)(x.a,{size:16,icon:ne.a,className:"wc-block-checkout__terms_notice-button__icon"})),onClick:()=>window.open(f.ADMIN_URL+"options-privacy.php","_blank")}].filter(Boolean)},Object(r.createElement)("p",null,Object(o.__)("You don't seem to have a Terms and Conditions and/or a Privacy Policy pages setup.","woo-gutenberg-products-block"))),_.k&&_.g&&!(a.includes(_.k)&&a.includes(_.g))&&Object(r.createElement)(j.Notice,{className:"wc-block-checkout__terms_notice",status:"warning",isDismissible:!1,actions:le!==c?[{label:Object(o.__)("Restore default text","woo-gutenberg-products-block"),onClick:()=>n({text:""})}]:[]},Object(r.createElement)("p",null,Object(o.__)("Ensure you add links to your policy pages in this section.","woo-gutenberg-products-block"))))},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var de=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 16"},Object(r.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(r.createElement)("path",{stroke:"currentColor",strokeWidth:"1.5",d:"M2 .75h16c.69 0 1.25.56 1.25 1.25v12c0 .69-.56 1.25-1.25 1.25H2c-.69 0-1.25-.56-1.25-1.25V2C.75 1.31 1.31.75 2 .75z"}),Object(r.createElement)("path",{fill:"currentColor",d:"M7.667 7.667A2.34 2.34 0 0010 5.333 2.34 2.34 0 007.667 3a2.34 2.34 0 00-2.334 2.333 2.34 2.34 0 002.334 2.334zM11.556 3H17v3.889h-5.444V3zm2.722 2.916l1.944-1.36v-.779L14.278 5.14l-1.945-1.362v.778l1.945 1.361zm-5.834-.583a.78.78 0 00-.777-.777.78.78 0 00-.778.777c0 .428.35.778.778.778a.78.78 0 00.777-.778zm3.89 5.904c0-1.945-3.088-2.785-4.667-2.785-1.58 0-4.667.84-4.667 2.785v1.097h9.333v-1.097zM7.666 10c-1.012 0-2.163.389-2.738.778h5.475C9.821 10.38 8.678 10 7.667 10z"}))),pe=c(50),be=e=>{let{allowCreateAccount:t}=e;const{customerId:c,shouldCreateAccount:n,setShouldCreateAccount:s}=Object(pe.b)(),{billingFields:a,setEmail:l}=X(),{dispatchCheckoutEvent:i}=Object(K.a)(),u=!c&&t&&Object(f.getSetting)("checkoutAllowsGuest",!1)&&Object(f.getSetting)("checkoutAllowsSignup",!1)&&Object(r.createElement)(I.CheckboxControl,{className:"wc-block-checkout__create-account",label:Object(o.__)("Create an account?","woo-gutenberg-products-block"),checked:n,onChange:e=>s(e)});return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Q.a,{id:"email",type:"email",label:Object(o.__)("Email address","woo-gutenberg-products-block"),value:a.email,autoComplete:"email",onChange:e=>{l(e),i("set-email-address")},required:!0}),u)},me={...te({defaultTitle:Object(o.__)("Contact information","woo-gutenberg-products-block"),defaultDescription:Object(o.__)("We'll use this email to send you details and updates about your order.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{remove:!0,move:!0}}},ge=c(289);Object(u.d)(ge,{icon:{src:Object(r.createElement)(a.a,{srcElement:de,className:"wc-block-editor-components-block-icon"})},attributes:me,edit:e=>{let{attributes:t,setAttributes:c}=e;const{allowCreateAccount:o}=S(),{accountControls:n}=C();return Object(r.createElement)(H,{attributes:t,setAttributes:c,className:s()("wc-block-checkout__contact-fields",null==t?void 0:t.className)},Object(r.createElement)(n,null),Object(r.createElement)(J.a,null,Object(r.createElement)(be,{allowCreateAccount:o})),Object(r.createElement)(G,{block:I.innerBlockAreas.CONTACT_INFORMATION}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});var he=e=>{let{showCompanyField:t=!1,showApartmentField:c=!1,showPhoneField:o=!1,requireCompanyField:n=!1,requirePhoneField:s=!1}=e;const{defaultAddressFields:a,billingFields:l,setBillingFields:i,setPhone:u}=X(),{dispatchCheckoutEvent:d}=Object(K.a)(),{isEditor:p}=Object(m.b)();Object(r.useEffect)(()=>{o||u("")},[o,u]);const b=Object(r.useMemo)(()=>({company:{hidden:!t,required:n},address_2:{hidden:!c}}),[t,n,c]),g=p?J.a:r.Fragment;return Object(r.createElement)(g,null,Object(r.createElement)($.a,{id:"billing",type:"billing",onChange:e=>{i(e),d("set-billing-address")},values:l,fields:Object.keys(a),fieldConfig:b}),o&&Object(r.createElement)(Z,{isRequired:s,value:l.phone,onChange:e=>{u(e),d("set-phone-number",{step:"billing"})}}))},Oe={...te({defaultTitle:Object(o.__)("Billing address","woo-gutenberg-products-block"),defaultDescription:Object(o.__)("Enter the address that matches your card or payment method.","woo-gutenberg-products-block")}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},je=c(290);Object(u.d)(je,{icon:{src:Object(r.createElement)(a.a,{srcElement:V,className:"wc-block-editor-components-block-icon"})},attributes:Oe,edit:e=>{let{attributes:t,setAttributes:c}=e;const{showCompanyField:o,showApartmentField:n,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}=S(),{addressFieldControls:u}=C(),{showBillingFields:d}=X();return d?Object(r.createElement)(H,{setAttributes:c,attributes:t,className:s()("wc-block-checkout__billing-fields",null==t?void 0:t.className)},Object(r.createElement)(u,null),Object(r.createElement)(he,{showCompanyField:o,showApartmentField:n,requireCompanyField:a,showPhoneField:l,requirePhoneField:i}),Object(r.createElement)(G,{block:I.innerBlockAreas.BILLING_ADDRESS})):null},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});var Ee=c(486),_e=c(13),fe=c(179),ke=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",fill:"currentColor"},Object(r.createElement)("path",{d:"M20 11H7.8l5.6-5.6L12 4l-8 8 8 8 1.4-1.4L7.8 13H20v-2z"}));c(413);var we=e=>{let{link:t}=e;return Object(r.createElement)("a",{href:t||_.d,className:"wc-block-components-checkout-return-to-cart-button"},Object(r.createElement)(a.a,{srcElement:ke}),Object(o.__)("Return to Cart","woo-gutenberg-products-block"))},ye=c(189),ve=c(187),Se=c(308),Ce=c(76),Ne=()=>{const{submitButtonText:e,onSubmit:t,isCalculating:c,isDisabled:n,waitingForProcessing:s,waitingForRedirect:l}=(()=>{const{onSubmit:e,isCalculating:t,isBeforeProcessing:c,isProcessing:r,isAfterProcessing:n,isComplete:s,hasError:a}=Object(pe.b)(),{paymentMethods:l={}}=Object(ve.b)(),{activePaymentMethod:i,currentStatus:u}=Object(ye.b)(),d=l[i]||{},p=r||n||c,b=s&&!a;return{submitButtonText:(null==d?void 0:d.placeOrderButtonLabel)||Object(o.__)("Place Order","woo-gutenberg-products-block"),onSubmit:e,isCalculating:t,isDisabled:r||u.isDoingExpressPayment,waitingForProcessing:p,waitingForRedirect:b}})();return Object(r.createElement)(Ce.a,{className:"wc-block-components-checkout-place-order-button",onClick:t,disabled:c||n||s||l,showSpinner:s},l?Object(r.createElement)(a.a,{srcElement:Se.a,alt:Object(o.__)("Done","woo-gutenberg-products-block")}):e)};c(412);var Pe=e=>{let{cartPageId:t,showReturnToCart:c,className:o}=e;return Object(r.createElement)("div",{className:s()("wc-block-checkout__actions",o)},c&&Object(r.createElement)(we,{link:Object(f.getSetting)("page-"+t,!1)}),Object(r.createElement)(Ne,null))},Re=c(291);Object(u.d)(Re,{icon:{src:Object(r.createElement)(x.a,{icon:Ee.a,className:"wc-block-editor-components-block-icon"})},attributes:{cartPageId:{type:"number",default:0},showReturnToCart:{type:"boolean",default:!0},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},edit:e=>{let{attributes:t,setAttributes:c}=e;const n=Object(p.useBlockProps)(),{cartPageId:s=0,showReturnToCart:a=!0}=t,{current:l}=Object(r.useRef)(s),i=Object(_e.useSelect)(e=>l||e("core/editor").getCurrentPostId(),[l]);return Object(r.createElement)("div",n,Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Account options","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)('Show a "Return to Cart" link',"woo-gutenberg-products-block"),checked:a,onChange:()=>c({showReturnToCart:!a})})),a&&!(i===_.e&&0===l)&&Object(r.createElement)(fe.a,{pageId:s,setPageId:e=>c({cartPageId:e}),labels:{title:Object(o.__)("Return to Cart button","woo-gutenberg-products-block"),default:Object(o.__)("WooCommerce Cart Page","woo-gutenberg-products-block")}})),Object(r.createElement)(J.a,null,Object(r.createElement)(Pe,{showReturnToCart:a,cartPageId:s})))},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var xe=c(356);c(415);const Te=e=>{let{title:t,stepHeadingContent:c}=e;return Object(r.createElement)("div",{className:"wc-block-components-checkout-step__heading"},Object(r.createElement)(U.a,{"aria-hidden":"true",className:"wc-block-components-checkout-step__title",headingLevel:"2"},t),!!c&&Object(r.createElement)("span",{className:"wc-block-components-checkout-step__heading-content"},c))};var Ae=e=>{let{id:t,className:c,title:o,legend:n,description:a,children:l,disabled:i=!1,showStepNumber:u=!0,stepHeadingContent:d=(()=>{})}=e;const p=n||o?"fieldset":"div";return Object(r.createElement)(p,{className:s()(c,"wc-block-components-checkout-step",{"wc-block-components-checkout-step--with-step-number":u,"wc-block-components-checkout-step--disabled":i}),id:t,disabled:i},!(!n&&!o)&&Object(r.createElement)("legend",{className:"screen-reader-text"},n||o),!!o&&Object(r.createElement)(Te,{title:o,stepHeadingContent:d()}),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__container"},!!a&&Object(r.createElement)("p",{className:"wc-block-components-checkout-step__description"},a),Object(r.createElement)("div",{className:"wc-block-components-checkout-step__content"},l)))},Ie=c(10),Me=c.n(Ie);c(417);var De=e=>{let{className:t="",disabled:c=!1,onTextChange:o,placeholder:n,value:a=""}=e;return Object(r.createElement)("textarea",{className:s()("wc-block-components-textarea",t),disabled:c,onChange:e=>{o(e.target.value)},placeholder:n,rows:2,value:a})};c(416),De.propTypes={onTextChange:Me.a.func.isRequired,disabled:Me.a.bool,placeholder:Me.a.string,value:Me.a.string};var Le=e=>{let{disabled:t,onChange:c,placeholder:n,value:s}=e;const[a,l]=Object(r.useState)(!1),[i,u]=Object(r.useState)("");return Object(r.createElement)("div",{className:"wc-block-checkout__add-note"},Object(r.createElement)(I.CheckboxControl,{disabled:t,label:Object(o.__)("Add a note to your order","woo-gutenberg-products-block"),checked:a,onChange:e=>{l(e),e?s!==i&&c(i):(c(""),u(s))}}),a&&Object(r.createElement)(De,{disabled:t,onTextChange:c,placeholder:n,value:s}))},Be=e=>{let{className:t}=e;const{needsShipping:c}=Object(Y.b)(),{isProcessing:n,orderNotes:a,dispatchActions:l}=Object(pe.b)(),{setOrderNotes:i}=l;return Object(r.createElement)(Ae,{id:"order-notes",showStepNumber:!1,className:s()("wc-block-checkout__order-notes",t),disabled:n},Object(r.createElement)(Le,{disabled:n,onChange:i,placeholder:c?Object(o.__)("Notes about your order, e.g. special notes for delivery.","woo-gutenberg-products-block"):Object(o.__)("Notes about your order.","woo-gutenberg-products-block"),value:a}))};c(414);var Fe=c(292);Object(u.d)(Fe,{icon:{src:Object(r.createElement)(a.a,{srcElement:xe.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(p.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(J.a,null,Object(r.createElement)(Be,null)))},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var Ve=c(388),Ue=c(241),ze=c(30),He=c(105),Ge=c(127),qe=c(35),$e=c(136),Ye=c(36),We=c(85),Xe=c(233),Ke=c(232),Je=c(234),Qe=c(236);const Ze=e=>Object(I.mustContain)(e,"");var et=e=>{let{cartItem:t}=e;const{images:c,low_stock_remaining:n,show_backorder_badge:a,name:l,permalink:i,prices:u,quantity:d,short_description:p,description:b,item_data:m,variation:g,totals:h,extensions:O}=t,{receiveCart:j,...E}=Object(Ye.a)(),_=Object(r.useMemo)(()=>({context:"summary",cartItem:t,cart:E}),[t,E]),k=Object(qe.getCurrencyFromPriceResponse)(u),w=Object(I.__experimentalApplyCheckoutFilter)({filterName:"itemName",defaultValue:l,extensions:O,arg:_}),y=Object($e.a)({amount:parseInt(u.raw_prices.regular_price,10),precision:Object(We.c)(u.raw_prices.precision)?parseInt(u.raw_prices.precision,10):u.raw_prices.precision}).convertPrecision(k.minorUnit).getAmount(),v=Object($e.a)({amount:parseInt(u.raw_prices.price,10),precision:Object(We.c)(u.raw_prices.precision)?parseInt(u.raw_prices.precision,10):u.raw_prices.precision}).convertPrecision(k.minorUnit).getAmount(),S=Object(qe.getCurrencyFromPriceResponse)(h);let C=parseInt(h.line_subtotal,10);Object(f.getSetting)("displayCartPricesIncludingTax",!1)&&(C+=parseInt(h.line_subtotal_tax,10));const N=Object($e.a)({amount:C,precision:S.minorUnit}).getAmount(),P=Object(I.__experimentalApplyCheckoutFilter)({filterName:"subtotalPriceFormat",defaultValue:"",extensions:O,arg:_,validation:Ze}),R=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemPrice",defaultValue:"",extensions:O,arg:_,validation:Ze}),x=Object(I.__experimentalApplyCheckoutFilter)({filterName:"cartItemClass",defaultValue:"",extensions:O,arg:_});return Object(r.createElement)("div",{className:s()("wc-block-components-order-summary-item",x)},Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__image"},Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__quantity"},Object(r.createElement)(ze.a,{label:d.toString(),screenReaderLabel:Object(o.sprintf)( +/* translators: %d number of products of the same type in the cart */ +Object(o._n)("%d item","%d items",d,"woo-gutenberg-products-block"),d)})),Object(r.createElement)(Ke.a,{image:c.length?c[0]:{},fallbackAlt:w})),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__description"},Object(r.createElement)(Ge.a,{disabled:!0,name:w,permalink:i}),Object(r.createElement)(He.a,{currency:k,price:v,regularPrice:y,className:"wc-block-components-order-summary-item__individual-prices",priceClassName:"wc-block-components-order-summary-item__individual-price",regularPriceClassName:"wc-block-components-order-summary-item__regular-individual-price",format:P}),a?Object(r.createElement)(Xe.a,null):!!n&&Object(r.createElement)(Je.a,{lowStockRemaining:n}),Object(r.createElement)(Qe.a,{shortDescription:p,fullDescription:b,itemData:m,variation:g})),Object(r.createElement)("span",{className:"screen-reader-text"},Object(o.sprintf)( +/* translators: %1$d is the number of items, %2$s is the item name and %3$s is the total price including the currency symbol. */ +Object(o._n)("Total price for %1$d %2$s item: %3$s","Total price for %1$d %2$s items: %3$s",d,"woo-gutenberg-products-block"),d,w,Object(qe.formatPrice)(N,S))),Object(r.createElement)("div",{className:"wc-block-components-order-summary-item__total-price","aria-hidden":"true"},Object(r.createElement)(He.a,{currency:S,format:R,price:N})))};c(418);var tt=e=>{let{cartItems:t=[]}=e;const{isLarge:c,hasContainerWidth:n}=Object(Ue.b)();return n?Object(r.createElement)(I.Panel,{className:"wc-block-components-order-summary",initialOpen:c,hasBorder:!1,title:Object(r.createElement)("span",{className:"wc-block-components-order-summary__button-text"},Object(o.__)("Order summary","woo-gutenberg-products-block")),titleTag:"h2"},Object(r.createElement)("div",{className:"wc-block-components-order-summary__content"},t.map(e=>Object(r.createElement)(et,{key:e.key,cartItem:e})))):null},ct=c(393),rt=c(394),ot=c(441),nt=c(398),st=c(183),at=e=>{let{showRateAfterTaxName:t=!1,className:c}=e;const{cartItems:o,cartTotals:n,cartCoupons:s,cartFees:a}=Object(Ye.a)(),{applyCoupon:l,removeCoupon:i,isApplyingCoupon:u,isRemovingCoupon:d}=Object(st.a)(),{needsShipping:p}=Object(Y.b)(),b=Object(qe.getCurrencyFromPriceResponse)(n),{extensions:m,receiveCart:g,...h}=Object(Ye.a)(),O={extensions:m,cart:h};return Object(r.createElement)("div",{className:c},Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(tt,{cartItems:o})),Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(I.Subtotal,{currency:b,values:n}),Object(r.createElement)(I.TotalsFees,{currency:b,cartFees:a}),Object(r.createElement)(ct.a,{cartCoupons:s,currency:b,isRemovingCoupon:d,removeCoupon:i,values:n})),Object(f.getSetting)("couponsEnabled",!0)&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(rt.a,{onSubmit:l,initialOpen:!1,isLoading:u})),p&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(ot.a,{isCheckout:!0,showCalculator:!1,showRateSelector:!1,values:n,currency:b})),Object(r.createElement)(I.ExperimentalDiscountsMeta.Slot,O),!Object(f.getSetting)("displayCartPricesIncludingTax",!1)&&parseInt(n.total_tax,10)>0&&Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(I.TotalsTaxes,{currency:b,showRateAfterTaxName:t,values:n})),Object(r.createElement)(I.TotalsWrapper,null,Object(r.createElement)(nt.a,{currency:b,values:n})),Object(r.createElement)(I.ExperimentalOrderMeta.Slot,O))},lt={showRateAfterTaxName:{type:"boolean",default:Object(f.getSetting)("displayCartPricesIncludingTax",!1)},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},it=c(293);Object(u.d)(it,{icon:{src:Object(r.createElement)(a.a,{srcElement:Ve.a,className:"wc-block-editor-components-block-icon"})},attributes:lt,edit:e=>{let{attributes:t,setAttributes:c}=e;const n=Object(p.useBlockProps)(),s=Object(f.getSetting)("taxesEnabled"),a=Object(f.getSetting)("displayItemizedTaxes",!1),l=Object(f.getSetting)("displayCartPricesIncludingTax",!1);return Object(r.createElement)("div",n,Object(r.createElement)(p.InspectorControls,null,s&&a&&!l&&Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Taxes","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Show rate after tax name","woo-gutenberg-products-block"),help:Object(o.__)("Show the percentage rate alongside each tax line in the summary.","woo-gutenberg-products-block"),checked:t.showRateAfterTaxName,onChange:()=>c({showRateAfterTaxName:!t.showRateAfterTaxName})}))),Object(r.createElement)(J.a,null,Object(r.createElement)(at,{showRateAfterTaxName:t.showRateAfterTaxName})))},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var ut=c(399);c(419);var dt=e=>{let{href:t,title:c,description:n}=e;return Object(r.createElement)("a",{href:t,className:"wc-block-editor-components-external-link-card",target:"_blank",rel:"noreferrer"},Object(r.createElement)("span",{className:"wc-block-editor-components-external-link-card__content"},Object(r.createElement)("strong",{className:"wc-block-editor-components-external-link-card__title"},c),n&&Object(r.createElement)("span",{className:"wc-block-editor-components-external-link-card__description"},n)),Object(r.createElement)(j.VisuallyHidden,{as:"span"}, +/* translators: accessibility text */ +Object(o.__)("(opens in a new tab)","woo-gutenberg-products-block")),Object(r.createElement)(x.a,{icon:ne.a,className:"wc-block-editor-components-external-link-card__icon"}))},pt=c(128),bt=c(44),mt=c(483),gt=c(137),ht=c(481);c(420);const Ot=()=>Object(r.createElement)(mt.a,{icon:Object(r.createElement)(a.a,{srcElement:ut.a}),label:Object(o.__)("Payment methods","woo-gutenberg-products-block"),className:"wc-block-checkout__no-payment-methods-placeholder"},Object(r.createElement)("span",{className:"wc-block-checkout__no-payment-methods-placeholder-description"},Object(o.__)("Your store does not have any payment methods configured that support the checkout block. Once you have configured a compatible payment method (e.g. Stripe) it will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(gt.a,{isSecondary:!0,href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Configure Payment Methods","woo-gutenberg-products-block"))),jt=()=>Object(r.createElement)(ht.a,{isDismissible:!1,className:s()("wc-block-checkout__no-payment-methods-notice","woocommerce-message","woocommerce-error")},Object(o.__)("There are no payment methods available. This may be an error on our side. Please contact us if you need any help placing your order.","woo-gutenberg-products-block"));var Et=()=>{const{isEditor:e}=Object(m.b)();return e?Object(r.createElement)(Ot,null):Object(r.createElement)(jt,null)},_t=c(240),ft=c(47),kt=c(9),wt=c(119),yt=Object(kt.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,selected:n,onChange:a,options:l=[]}=e;const i=o||c;return l.length&&Object(r.createElement)("div",{className:s()("wc-block-components-radio-control",t)},l.map(e=>{const t="object"==typeof e&&"content"in e,c=e.value===n;return Object(r.createElement)("div",{className:"wc-block-components-radio-control-accordion-option",key:e.value},Object(r.createElement)(wt.a,{name:"radio-control-"+i,checked:c,option:e,onChange:t=>{a(t),"function"==typeof e.onChange&&e.onChange(t)}}),t&&c&&Object(r.createElement)("div",{className:s()("wc-block-components-radio-control-accordion-content",{"wc-block-components-radio-control-accordion-content-hide":!c})},e.content))}))}),vt=c(146),St=e=>{let{children:t,showSaveOption:c}=e;const{isEditor:n}=Object(m.b)(),{shouldSavePayment:s,setShouldSavePayment:a}=Object(ye.b)(),{customerId:l}=Object(pe.b)();return Object(r.createElement)(vt.a,{isEditor:n},t,l>0&&c&&Object(r.createElement)(I.CheckboxControl,{className:"wc-block-components-payment-methods__save-card-info",label:Object(o.__)("Save payment information to my account for future purchases.","woo-gutenberg-products-block"),checked:s,onChange:()=>a(!s)}))},Ct=()=>{const{setActivePaymentMethod:e,activeSavedToken:t,isExpressPaymentMethodActive:c,customerPaymentMethods:o}=Object(ye.b)(),{paymentMethods:n}=Object(ve.b)(),{activePaymentMethod:a,...l}=Object(_t.a)(),{noticeContexts:i}=Object(bt.c)(),{removeNotice:u}=Object(ft.a)(),{dispatchCheckoutEvent:d}=Object(K.a)(),{isEditor:p}=Object(m.b)(),b=Object.keys(n).map(e=>{const{edit:t,content:c,label:o,supports:s}=n[e],i=p?t:c;return{value:e,label:"string"==typeof o?o:Object(r.cloneElement)(o,{components:l.components}),name:"wc-saved-payment-method-token-"+e,content:Object(r.createElement)(St,{showSaveOption:s.showSaveOption},Object(r.cloneElement)(i,{activePaymentMethod:a,...l}))}}),g=Object(r.useCallback)(t=>{e(t),u("wc-payment-error",i.PAYMENTS),d("set-active-payment-method",{value:t})},[d,i.PAYMENTS,u,e]),h=0===Object.keys(o).length&&1===Object.keys(n).length,O=s()({"disable-radio-control":h});return c?null:Object(r.createElement)(yt,{id:"wc-payment-method-options",className:O,selected:t?null:a,onChange:g,options:b})},Nt=c(145);const Pt=e=>{let{method:t,expires:c}=e;return Object(o.sprintf)( +/* translators: %1$s is referring to the payment method brand, %2$s is referring to the last 4 digits of the payment card, %3$s is referring to the expiry date. */ +Object(o.__)("%1$s ending in %2$s (expires %3$s)","woo-gutenberg-products-block"),t.brand,t.last4,c)},Rt=e=>{let{method:t}=e;return Object(o.sprintf)( +/* translators: %s is the name of the payment method gateway. */ +Object(o.__)("Saved token for %s","woo-gutenberg-products-block"),t.gateway)};var xt=()=>{var e,t;const{customerPaymentMethods:c,activePaymentMethod:o,setActivePaymentMethod:n,activeSavedToken:s}=Object(ye.b)(),{paymentMethods:a}=Object(ve.b)(),l=Object(_t.a)(),{noticeContexts:i}=Object(bt.c)(),{removeNotice:u}=Object(ft.a)(),{dispatchCheckoutEvent:d}=Object(K.a)(),p=Object(r.useMemo)(()=>Object.keys(c).flatMap(e=>c[e].map(t=>{const c="cc"===e||"echeck"===e,r=t.method.gateway;return{name:"wc-saved-payment-method-token-"+r,label:c?Pt(t):Rt(t),value:t.tokenId.toString(),onChange:e=>{n(r,{token:e,payment_method:r,[`wc-${r}-payment-token`]:e.toString(),isSavedToken:!0}),u("wc-payment-error",i.PAYMENTS),d("set-active-payment-method",{paymentMethodSlug:r})}}})).filter(Boolean),[c,n,u,i.PAYMENTS,d]),b=s&&a[o]&&null!==(e=a[o])&&void 0!==e&&e.savedTokenComponent?Object(r.cloneElement)(null===(t=a[o])||void 0===t?void 0:t.savedTokenComponent,{token:s,...l}):null;return p.length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Nt.a,{id:"wc-payment-method-saved-tokens",selected:s,options:p}),b):null},Tt=()=>{const{isInitialized:e,paymentMethods:t}=Object(ve.b)(),{customerPaymentMethods:c}=Object(ye.b)();return e&&0===Object.keys(t).length?Object(r.createElement)(Et,null):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(xt,null),Object.keys(c).length>0&&Object(r.createElement)(ze.a,{label:Object(o.__)("Use another payment method.","woo-gutenberg-products-block"),screenReaderLabel:Object(o.__)("Other available payment methods","woo-gutenberg-products-block"),wrapperElement:"p",wrapperProps:{className:["wc-block-components-checkout-step__description wc-block-components-checkout-step__description-payments-aligned"]}}),Object(r.createElement)(Ct,null))},At=()=>{const{noticeContexts:e}=Object(bt.c)();return Object(r.createElement)(pt.a,{context:e.PAYMENTS},Object(r.createElement)(Tt,null))},It={...te({defaultTitle:Object(o.__)("Payment options","woo-gutenberg-products-block"),defaultDescription:""}),className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},Mt=c(294);Object(u.d)(Mt,{icon:{src:Object(r.createElement)(a.a,{srcElement:ut.a,className:"wc-block-editor-components-block-icon"})},attributes:It,edit:e=>{let{attributes:t,setAttributes:c}=e;const n=Object(f.getSetting)("globalPaymentMethods");return Object(r.createElement)(H,{attributes:t,setAttributes:c,className:s()("wc-block-checkout__payment-method",null==t?void 0:t.className)},Object(r.createElement)(p.InspectorControls,null,n.length>0&&Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Methods","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(o.__)("You currently have the following payment integrations active.","woo-gutenberg-products-block")),n.map(e=>Object(r.createElement)(dt,{key:e.id,href:`${f.ADMIN_URL}admin.php?page=wc-settings&tab=checkout§ion=${e.id}`,title:e.title,description:e.description})),Object(r.createElement)(j.ExternalLink,{href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout"},Object(o.__)("Manage payment methods","woo-gutenberg-products-block")))),Object(r.createElement)(J.a,null,Object(r.createElement)(At,null)),Object(r.createElement)(G,{block:I.innerBlockAreas.PAYMENT_METHODS}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});var Dt=c(66),Lt=c(178);c(226);var Bt=()=>{const{isCalculating:e,isProcessing:t,isAfterProcessing:c,isBeforeProcessing:n,isComplete:s,hasError:a}=Object(pe.b)(),{currentStatus:l}=Object(ye.b)(),{paymentMethods:i,isInitialized:u}=Object(ve.a)(),{isEditor:d}=Object(m.b)(),{noticeContexts:p}=Object(bt.c)();if(!u||u&&0===Object.keys(i).length)return d||f.CURRENT_USER_IS_ADMIN?Object(r.createElement)(pt.a,{context:p.EXPRESS_PAYMENTS}):null;const b=t||c||n||s&&!a;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(Dt.a,{isLoading:e||b||l.isDoingExpressPayment},Object(r.createElement)("div",{className:"wc-block-components-express-payment wc-block-components-express-payment--checkout"},Object(r.createElement)("div",{className:"wc-block-components-express-payment__title-container"},Object(r.createElement)(U.a,{className:"wc-block-components-express-payment__title",headingLevel:"2"},Object(o.__)("Express checkout","woo-gutenberg-products-block"))),Object(r.createElement)("div",{className:"wc-block-components-express-payment__content"},Object(r.createElement)(pt.a,{context:p.EXPRESS_PAYMENTS},Object(r.createElement)("p",null,Object(o.__)("In a hurry? Use one of our express checkout options:","woo-gutenberg-products-block")),Object(r.createElement)(Lt.a,null))))),Object(r.createElement)("div",{className:"wc-block-components-express-payment-continue-rule wc-block-components-express-payment-continue-rule--checkout"},Object(o.__)("Or continue below","woo-gutenberg-products-block")))},Ft=e=>{let{className:t}=e;const{cartNeedsPayment:c}=Object(Ye.a)();return c?Object(r.createElement)("div",{className:t},Object(r.createElement)(Bt,null)):null};c(421);const Vt=()=>Object(r.createElement)(mt.a,{icon:Object(r.createElement)(a.a,{srcElement:ut.a}),label:Object(o.__)("Express Checkout","woo-gutenberg-products-block"),className:"wp-block-woocommerce-checkout-express-payment-block-placeholder"},Object(r.createElement)("span",{className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__description"},Object(o.__)("Your store doesn't have any Payment Methods that support the Express Checkout Block. If they are added, they will be shown here.","woo-gutenberg-products-block")),Object(r.createElement)(gt.a,{isPrimary:!0,href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=checkout",target:"_blank",rel:"noopener noreferrer",className:"wp-block-woocommerce-checkout-express-payment-block-placeholder__button"},Object(o.__)("Configure Payment Methods","woo-gutenberg-products-block")));var Ut=c(295);Object(u.d)(Ut,{icon:{src:Object(r.createElement)(a.a,{srcElement:ut.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{attributes:t}=e;const{paymentMethods:c,isInitialized:o}=Object(ve.a)(),n=Object.keys(c).length>0,a=Object(p.useBlockProps)({className:s()({"wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods":n},null==t?void 0:t.className),attributes:t});return o?Object(r.createElement)("div",a,n?Object(r.createElement)(Ft,null):Object(r.createElement)(Vt,null)):null},save:()=>Object(r.createElement)("div",p.useBlockProps.save())});var zt=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 17 13"},Object(r.createElement)("path",{fill:"currentColor",fillRule:"evenodd",d:"M11.667 2.5h1.666l3.334 3.333V10H15a2.5 2.5 0 11-5 0H6.667a2.5 2.5 0 11-5 0H0V1.667C0 .746.746 0 1.667 0H10c.92 0 1.667.746 1.667 1.667V2.5zM2.917 10a1.25 1.25 0 102.5 0 1.25 1.25 0 00-2.5 0zm-1.25-2.5V1.667H10V7.5H1.667zM11.25 10a1.25 1.25 0 102.5 0 1.25 1.25 0 00-2.5 0z"})),Ht=c(182),Gt=c(397),qt=c(41),$t=c(14);c(423);var Yt=()=>Object(r.createElement)(mt.a,{icon:Object(r.createElement)(a.a,{srcElement:zt}),label:Object(o.__)("Shipping options","woo-gutenberg-products-block"),className:"wc-block-checkout__no-shipping-placeholder"},Object(r.createElement)("span",{className:"wc-block-checkout__no-shipping-placeholder-description"},Object(o.__)("Your store does not have any Shipping Options configured. Once you have added your Shipping Options they will appear here.","woo-gutenberg-products-block")),Object(r.createElement)(gt.a,{isSecondary:!0,href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping",target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Configure Shipping Options","woo-gutenberg-products-block")));c(422);const Wt=e=>{const t=Object(f.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10);return{label:Object($t.decodeEntities)(e.name),value:e.rate_id,description:Object($t.decodeEntities)(e.description),secondaryLabel:Object(r.createElement)(qt.a,{currency:Object(qe.getCurrencyFromPriceResponse)(e),value:t}),secondaryDescription:Object($t.decodeEntities)(e.delivery_time)}};var Xt=()=>{const{isEditor:e}=Object(m.b)(),{shippingRates:t,shippingRatesLoading:c,needsShipping:n,hasCalculatedShipping:a}=Object(Y.b)();if(!n)return null;const l=Object(Gt.a)(t);return e||a||l?Object(r.createElement)(r.Fragment,null,e&&!l?Object(r.createElement)(Yt,null):Object(r.createElement)(Ht.a,{noResultsMessage:Object(r.createElement)(ht.a,{isDismissible:!1,className:s()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(o.__)("There are no shipping options available. Please check your shipping address.","woo-gutenberg-products-block")),renderOption:Wt,shippingRates:t,shippingRatesLoading:c})):Object(r.createElement)("p",null,Object(o.__)("Shipping options will be displayed here after entering your full shipping address.","woo-gutenberg-products-block"))},Kt={...te({defaultTitle:Object(o.__)("Shipping options","woo-gutenberg-products-block"),defaultDescription:""}),allowCreateAccount:{type:"boolean",default:!1},className:{type:"string",default:""},lock:{type:"object",default:{move:!0,remove:!0}}},Jt=c(296);Object(u.d)(Jt,{icon:{src:Object(r.createElement)(a.a,{srcElement:zt,className:"wc-block-editor-components-block-icon"})},attributes:Kt,edit:e=>{let{attributes:t,setAttributes:c}=e;const n=Object(f.getSetting)("globalShippingMethods"),a=Object(f.getSetting)("activeShippingZones");return Object(r.createElement)(H,{attributes:t,setAttributes:c,className:s()("wc-block-checkout__shipping-option",null==t?void 0:t.className)},Object(r.createElement)(p.InspectorControls,null,n.length>0&&Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Methods","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(o.__)("You currently have the following shipping integrations active.","woo-gutenberg-products-block")),n.map(e=>Object(r.createElement)(dt,{key:e.id,href:`${f.ADMIN_URL}admin.php?page=wc-settings&tab=shipping§ion=${e.id}`,title:e.title,description:e.description})),Object(r.createElement)(j.ExternalLink,{href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping"},Object(o.__)("Manage shipping methods","woo-gutenberg-products-block"))),a.length&&Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Zones","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(o.__)("You currently have the following shipping zones active.","woo-gutenberg-products-block")),a.map(e=>Object(r.createElement)(dt,{key:e.id,href:`${f.ADMIN_URL}admin.php?page=wc-settings&tab=shipping&zone_id=${e.id}`,title:e.title,description:e.description})),Object(r.createElement)(j.ExternalLink,{href:f.ADMIN_URL+"admin.php?page=wc-settings&tab=shipping"},Object(o.__)("Manage shipping zones","woo-gutenberg-products-block")))),Object(r.createElement)(J.a,null,Object(r.createElement)(Xt,null)),Object(r.createElement)(G,{block:I.innerBlockAreas.SHIPPING_METHODS}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save(),Object(r.createElement)(q,null))});const Qt={title:Object(o.__)("Checkout","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(a.a,{srcElement:i,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a checkout form so your customers can submit orders.","woo-gutenberg-products-block"),supports:{align:["wide"],html:!1,multiple:!1},attributes:R,apiVersion:2,edit:e=>{let{attributes:t,setAttributes:c}=e;const{allowCreateAccount:n,showCompanyField:a,requireCompanyField:l,showApartmentField:i,showPhoneField:u,requirePhoneField:d,showOrderNotes:E,showPolicyLinks:_,showReturnToCart:f,showRateAfterTaxName:S,cartPageId:C}=t,R=e=>{const r={};r[e]=!t[e],c(r)},x=Object(w.b)();return Object(r.createElement)("div",x,Object(r.createElement)(m.a,{previewData:{previewCart:h.a,previewSavedPaymentMethods:O}},Object(r.createElement)(P,{attributes:t,setAttributes:c}),Object(r.createElement)(g.a,null,Object(r.createElement)(b.a,{className:s()("wc-block-checkout",{"has-dark-controls":t.hasDarkControls})},Object(r.createElement)(v.Provider,{value:{addressFieldControls:()=>Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Address Fields","woo-gutenberg-products-block")},Object(r.createElement)("p",{className:"wc-block-checkout__controls-text"},Object(o.__)("Show or hide fields in the checkout address forms.","woo-gutenberg-products-block")),Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Company","woo-gutenberg-products-block"),checked:a,onChange:()=>R("showCompanyField")}),a&&Object(r.createElement)(j.CheckboxControl,{label:Object(o.__)("Require company name?","woo-gutenberg-products-block"),checked:l,onChange:()=>R("requireCompanyField"),className:"components-base-control--nested"}),Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),checked:i,onChange:()=>R("showApartmentField")}),Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Phone","woo-gutenberg-products-block"),checked:u,onChange:()=>R("showPhoneField")}),u&&Object(r.createElement)(j.CheckboxControl,{label:Object(o.__)("Require phone number?","woo-gutenberg-products-block"),checked:d,onChange:()=>R("requirePhoneField"),className:"components-base-control--nested"}))),accountControls:()=>Object(r.createElement)(p.InspectorControls,null,Object(r.createElement)(j.PanelBody,{title:Object(o.__)("Account options","woo-gutenberg-products-block")},Object(r.createElement)(j.ToggleControl,{label:Object(o.__)("Allow shoppers to sign up for a user account during checkout","woo-gutenberg-products-block"),checked:n,onChange:()=>c({allowCreateAccount:!n})})))}},Object(r.createElement)(y.Provider,{value:{allowCreateAccount:n,showCompanyField:a,requireCompanyField:l,showApartmentField:i,showPhoneField:u,requirePhoneField:d,showOrderNotes:E,showPolicyLinks:_,showReturnToCart:f,cartPageId:C,showRateAfterTaxName:S}},Object(r.createElement)(p.InnerBlocks,{allowedBlocks:N,template:[["woocommerce/checkout-fields-block",{},[]],["woocommerce/checkout-totals-block",{},[]]],templateLock:"insert"})))))),Object(r.createElement)(k.a,{blockName:"checkout"}))},save:()=>Object(r.createElement)("div",p.useBlockProps.save({className:"wc-block-checkout is-loading"}),Object(r.createElement)(p.InnerBlocks.Content,null)),deprecated:[{attributes:R,save(e){let{attributes:t}=e;return Object(r.createElement)("div",{className:s()("is-loading",t.className)})},migrate:e=>{const{showOrderNotes:t,showPolicyLinks:c,showReturnToCart:r,cartPageId:o}=e;return[e,[Object(d.createBlock)("woocommerce/checkout-fields-block",{},[Object(d.createBlock)("woocommerce/checkout-express-payment-block",{},[]),Object(d.createBlock)("woocommerce/checkout-contact-information-block",{},[]),Object(d.createBlock)("woocommerce/checkout-shipping-address-block",{},[]),Object(d.createBlock)("woocommerce/checkout-billing-address-block",{},[]),Object(d.createBlock)("woocommerce/checkout-shipping-methods-block",{},[]),Object(d.createBlock)("woocommerce/checkout-payment-block",{},[]),!!t&&Object(d.createBlock)("woocommerce/checkout-order-note-block",{},[]),!!c&&Object(d.createBlock)("woocommerce/checkout-terms-block",{},[]),Object(d.createBlock)("woocommerce/checkout-actions-block",{showReturnToCart:r,cartPageId:o},[])].filter(Boolean)),Object(d.createBlock)("woocommerce/checkout-totals-block",{})]]},isEligible:(e,t)=>!t.some(e=>"woocommerce/checkout-fields-block"===e.name)}]};Object(u.d)("woocommerce/checkout",Qt)},,,,,function(e,t,c){"use strict";var r=c(0),o=c(242),n=c(5),s=c.n(n),a=c(25),l=c(1),i=c(14),u=c(4),d=c.n(u),p=c(9),b=c(493),m=c(112),g=c(193),h=c(85);c(221);var O=Object(p.withInstanceId)(e=>{let{id:t,className:c,label:o,onChange:n,options:s,value:a,required:i=!1,errorMessage:u=Object(l.__)("Please select a value.","woo-gutenberg-products-block"),errorId:p,instanceId:O="0",autoComplete:j="off"}=e;const{getValidationError:E,setValidationErrors:_,clearValidationError:f}=Object(m.b)(),k=Object(r.useRef)(null),w=t||"control-"+O,y=p||w,v=E(y)||{message:"",hidden:!1};return Object(r.useEffect)(()=>(!i||a?f(y):_({[y]:{message:u,hidden:!0}}),()=>{f(y)}),[f,a,y,u,i,_]),Object(r.createElement)("div",{id:w,className:d()("wc-block-components-combobox",c,{"is-active":a,"has-error":v.message&&!v.hidden}),ref:k},Object(r.createElement)(b.a,{className:"wc-block-components-combobox-control",label:o,onChange:n,onFilterValueChange:e=>{if(e.length){const t=Object(h.b)(k.current)?k.current.ownerDocument.activeElement:void 0;if(t&&Object(h.b)(k.current)&&k.current.contains(t))return;const c=e.toLocaleUpperCase(),r=s.find(e=>e.label.toLocaleUpperCase().startsWith(c)||e.value.toLocaleUpperCase()===c);r&&n(r.value)}},options:s,value:a||"",allowReset:!1,autoComplete:j,"aria-invalid":v.message&&!v.hidden}),Object(r.createElement)(g.a,{propertyName:y}))});c(220);var j=e=>{let{className:t,countries:c,id:o,label:n,onChange:s,value:a="",autoComplete:u="off",required:p=!1,errorId:b,errorMessage:m=Object(l.__)("Please select a country.","woo-gutenberg-products-block")}=e;const g=Object(r.useMemo)(()=>Object.entries(c).map(e=>{let[t,c]=e;return{value:t,label:Object(i.decodeEntities)(c)}}),[c]);return Object(r.createElement)("div",{className:d()(t,"wc-block-components-country-input")},Object(r.createElement)(O,{id:o,label:n,onChange:s,options:g,value:a,errorId:b,errorMessage:m,required:p,autoComplete:u}),"off"!==u&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:u,value:a,onChange:e=>{const t=e.target.value.toLocaleUpperCase(),c=g.find(e=>2!==t.length&&e.label.toLocaleUpperCase()===t||2===t.length&&e.value.toLocaleUpperCase()===t);s(c?c.value:"")},style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1}))},E=e=>Object(r.createElement)(j,s()({countries:a.h},e)),_=e=>Object(r.createElement)(j,s()({countries:a.a},e));c(222);const f=(e,t)=>{const c=t.find(t=>t.label.toLocaleUpperCase()===e.toLocaleUpperCase()||t.value.toLocaleUpperCase()===e.toLocaleUpperCase());return c?c.value:""};var k=e=>{let{className:t,id:c,states:n,country:s,label:a,onChange:u,autoComplete:p="off",value:b="",required:m=!1}=e;const g=n[s],h=Object(r.useMemo)(()=>g?Object.keys(g).map(e=>({value:e,label:Object(i.decodeEntities)(g[e])})):[],[g]),j=Object(r.useCallback)(e=>{u(h.length>0?f(e,h):e)},[u,h]),E=Object(r.useRef)(b);return Object(r.useEffect)(()=>{E.current!==b&&(E.current=b)},[b]),Object(r.useEffect)(()=>{if(h.length>0&&E.current){const e=f(E.current,h);e!==E.current&&j(e)}},[h,j]),h.length>0?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(O,{className:d()(t,"wc-block-components-state-input"),id:c,label:a,onChange:j,options:h,value:b,errorMessage:Object(l.__)("Please select a state.","woo-gutenberg-products-block"),required:m,autoComplete:p}),"off"!==p&&Object(r.createElement)("input",{type:"text","aria-hidden":!0,autoComplete:p,value:b,onChange:e=>j(e.target.value),style:{minHeight:"0",height:"0",border:"0",padding:"0",position:"absolute"},tabIndex:-1})):Object(r.createElement)(o.a,{className:t,id:c,label:a,onChange:j,autoComplete:p,value:b,required:m})},w=e=>Object(r.createElement)(k,s()({states:a.i},e)),y=e=>Object(r.createElement)(k,s()({states:a.b},e)),v=c(40),S=c(2),C=c(98);t.a=Object(p.withInstanceId)(e=>{let{id:t="",fields:c=Object.keys(S.defaultAddressFields),fieldConfig:n={},instanceId:s,onChange:a,type:i="shipping",values:u}=e;const{getValidationError:d,setValidationErrors:p,clearValidationError:b}=Object(m.b)(),g=Object(v.a)(c),h=d("shipping-missing-country")||{},O=Object(r.useMemo)(()=>Object(C.a)(g,n,u.country),[g,n,u.country]);return Object(r.useEffect)(()=>{O.forEach(e=>{e.hidden&&u[e.key]&&a({...u,[e.key]:""})})},[O,a,u]),Object(r.useEffect)(()=>{"shipping"===i&&((e,t,c,r)=>{r||e.country||!(e.city||e.state||e.postcode)||t({"shipping-missing-country":{message:Object(l.__)("Please select a country to calculate rates.","woo-gutenberg-products-block"),hidden:!1}}),r&&e.country&&c("shipping-missing-country")})(u,p,b,!!h.message&&!h.hidden)},[u,h.message,h.hidden,p,b,i]),t=t||s,Object(r.createElement)("div",{id:t,className:"wc-block-components-address-form"},O.map(e=>{if(e.hidden)return null;if("country"===e.key){const c="shipping"===i?E:_;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,label:e.required?e.label:e.optionalLabel,value:u.country,autoComplete:e.autocomplete,onChange:e=>a({...u,country:e,state:""}),errorId:"shipping"===i?"shipping-missing-country":null,errorMessage:e.errorMessage,required:e.required})}if("state"===e.key){const c="shipping"===i?w:y;return Object(r.createElement)(c,{key:e.key,id:`${t}-${e.key}`,country:u.country,label:e.required?e.label:e.optionalLabel,value:u.state,autoComplete:e.autocomplete,onChange:e=>a({...u,state:e}),errorMessage:e.errorMessage,required:e.required})}return Object(r.createElement)(o.a,{key:e.key,id:`${t}-${e.key}`,className:"wc-block-components-address-form__"+e.key,label:e.required?e.label:e.optionalLabel,value:u[e.key],autoCapitalize:e.autocapitalize,autoComplete:e.autocomplete,onChange:t=>a({...u,[e.key]:t}),errorMessage:e.errorMessage,required:e.required})}))})},,,function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(4),a=c.n(s),l=c(1),i=c(36),u=c(19),d=c(2),p=c(14);const b=e=>{let{selectedShippingRates:t}=e;return Object(n.createElement)("div",{className:"wc-block-components-totals-item__description wc-block-components-totals-shipping__via"},Object(l.__)("via","woo-gutenberg-products-block")," ",Object(p.decodeEntities)(t.join(", ")))};var m=c(481),g=c(182),h=e=>{let{hasRates:t,shippingRates:c,shippingRatesLoading:r}=e;const o=t?Object(l.__)("Shipping options","woo-gutenberg-products-block"):Object(l.__)("Choose a shipping option","woo-gutenberg-products-block");return Object(n.createElement)("fieldset",{className:"wc-block-components-totals-shipping__fieldset"},Object(n.createElement)("legend",{className:"screen-reader-text"},o),Object(n.createElement)(g.a,{className:"wc-block-components-totals-shipping__options",collapsible:!0,noResultsMessage:Object(n.createElement)(m.a,{isDismissible:!1,className:a()("wc-block-components-shipping-rates-control__no-results-notice","woocommerce-error")},Object(l.__)("No shipping options were found.","woo-gutenberg-products-block")),shippingRates:c,shippingRatesLoading:r}))},O=c(67),j=c(76),E=c(26),_=c.n(E),f=c(112),k=(c(171),c(438)),w=e=>{let{address:t,onUpdate:c,addressFields:r}=e;const[o,s]=Object(n.useState)(t),{hasValidationErrors:a,showAllValidationErrors:i}=Object(f.b)();return Object(n.createElement)("form",{className:"wc-block-components-shipping-calculator-address"},Object(n.createElement)(k.a,{fields:r,onChange:s,values:o}),Object(n.createElement)(j.a,{className:"wc-block-components-shipping-calculator-address__button",disabled:_()(o,t),onClick:e=>{if(e.preventDefault(),i(),!a)return c(o)},type:"submit"},Object(l.__)("Update","woo-gutenberg-products-block")))},y=e=>{let{onUpdate:t=(()=>{}),addressFields:c=["country","state","city","postcode"]}=e;const{shippingAddress:r,setShippingAddress:o}=Object(O.b)();return Object(n.createElement)("div",{className:"wc-block-components-shipping-calculator"},Object(n.createElement)(w,{address:r,addressFields:c,onUpdate:e=>{o(e),t(e)}}))},v=e=>{let{address:t}=e;if(0===Object.values(t).length)return null;const c=Object(d.getSetting)("shippingCountries",{}),r=Object(d.getSetting)("shippingStates",{}),o="string"==typeof c[t.country]?Object(p.decodeEntities)(c[t.country]):"",s="object"==typeof r[t.country]&&"string"==typeof r[t.country][t.state]?Object(p.decodeEntities)(r[t.country][t.state]):t.state,a=[];a.push(t.postcode.toUpperCase()),a.push(t.city),a.push(s),a.push(o);const i=a.filter(Boolean).join(", ");return i?Object(n.createElement)("span",{className:"wc-block-components-shipping-address"},Object(l.sprintf)( +/* translators: %s location. */ +Object(l.__)("Shipping to %s","woo-gutenberg-products-block"),i)+" "):null};c(219);const S=e=>{let{label:t=Object(l.__)("Calculate","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}=e;return Object(n.createElement)("button",{className:"wc-block-components-totals-shipping__change-address-button",onClick:()=>{r(!c)},"aria-expanded":c},t)},C=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r,shippingAddress:o}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(v,{address:o}),t&&Object(n.createElement)(S,{label:Object(l.__)("(change address)","woo-gutenberg-products-block"),isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}))},N=e=>{let{showCalculator:t,isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r,isCheckout:o=!1}=e;return t?Object(n.createElement)(S,{isShippingCalculatorOpen:c,setIsShippingCalculatorOpen:r}):Object(n.createElement)("em",null,o?Object(l.__)("No shipping options available","woo-gutenberg-products-block"):Object(l.__)("Calculated during checkout","woo-gutenberg-products-block"))};t.a=e=>{let{currency:t,values:c,showCalculator:r=!0,showRateSelector:s=!0,isCheckout:p=!1,className:m}=e;const[g,O]=Object(n.useState)(!1),{shippingAddress:j,cartHasCalculatedShipping:E,shippingRates:_,shippingRatesLoading:f}=Object(i.a)(),k=Object(d.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_shipping,10)+parseInt(c.total_shipping_tax,10):parseInt(c.total_shipping,10),w=_.some(e=>e.shipping_rates.length)||k,v={isShippingCalculatorOpen:g,setIsShippingCalculatorOpen:O},S=_.flatMap(e=>e.shipping_rates.filter(e=>e.selected).flatMap(e=>e.name));return Object(n.createElement)("div",{className:a()("wc-block-components-totals-shipping",m)},Object(n.createElement)(u.TotalsItem,{label:Object(l.__)("Shipping","woo-gutenberg-products-block"),value:w&&E?k:Object(n.createElement)(N,o()({showCalculator:r,isCheckout:p},v)),description:w&&E?Object(n.createElement)(n.Fragment,null,Object(n.createElement)(b,{selectedShippingRates:S}),Object(n.createElement)(C,o()({shippingAddress:j,showCalculator:r},v))):null,currency:t}),r&&g&&Object(n.createElement)(y,{onUpdate:()=>{O(!1)}}),s&&E&&Object(n.createElement)(h,{hasRates:w,shippingRates:_,shippingRatesLoading:f}))}},,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return l}));var r=c(1),o=c(25),n=c(2);const s=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:Object(r.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(r._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(r._x)("Beanie","example product in Cart Block","woo-gutenberg-products-block"),quantity:1}],shipping_rates:[{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Free shipping","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"000",taxes:"0",rate_id:"free_shipping:1",instance_id:0,meta_data:[],method_id:"flat_rate",selected:!0},{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",name:Object(r.__)("Local pickup","woo-gutenberg-products-block"),description:"",delivery_time:"",price:"200",taxes:"0",rate_id:"local_pickup:1",instance_id:1,meta_data:[],method_id:"local_pickup",selected:!1}]}],a=Object(n.getSetting)("displayCartPricesIncludingTax",!1),l={coupons:[],shipping_rates:Object(n.getSetting)("shippingMethodsExist",!1)?s:[],items:[{key:"1",id:1,quantity:2,name:Object(r.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(r.__)("Warm hat for winter","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-beanie",permalink:"https://example.org",low_stock_remaining:2,backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:10,src:o.m+"previews/beanie.jpg",thumbnail:o.m+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(r.__)("Size","woo-gutenberg-products-block"),value:Object(r.__)("Small","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:a?"12000":"10000",regular_price:a?"12000":"10000",sale_price:a?"12000":"10000",raw_prices:{precision:6,price:a?"12000000":"10000000",regular_price:a?"12000000":"10000000",sale_price:a?"12000000":"10000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}},{key:"2",id:2,quantity:1,name:Object(r.__)("Cap","woo-gutenberg-products-block"),short_description:Object(r.__)("Lightweight baseball cap","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",sku:"woo-cap",permalink:"https://example.org",backorders_allowed:!1,show_backorder_badge:!1,sold_individually:!1,images:[{id:11,src:o.m+"previews/cap.jpg",thumbnail:o.m+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(r.__)("Color","woo-gutenberg-products-block"),value:Object(r.__)("Orange","woo-gutenberg-products-block")}],prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:a?"2400":"2000",regular_price:a?"2400":"2000",sale_price:a?"2400":"2000",raw_prices:{precision:6,price:a?"24000000":"20000000",regular_price:a?"24000000":"20000000",sale_price:a?"24000000":"20000000"}},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",line_subtotal:"2000",line_subtotal_tax:"400",line_total:"2000",line_total_tax:"400"},extensions:{}}],fees:[],items_count:3,items_weight:0,needs_payment:!0,needs_shipping:Object(n.getSetting)("shippingEnabled",!0),has_calculated_shipping:!0,shipping_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billing_address:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",email:"",phone:""},totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total_items:"4000",total_items_tax:"800",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"800",total_price:"4800",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"800"}]},errors:[],payment_requirements:["products"],extensions:{}}}]); \ No newline at end of file diff --git a/build/featured-category.asset.php b/build/featured-category.asset.php new file mode 100644 index 00000000000..5c11ec13579 --- /dev/null +++ b/build/featured-category.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '4fdcf282d8c3503f4a558f3e2794112b'); \ No newline at end of file diff --git a/build/featured-category.js b/build/featured-category.js new file mode 100644 index 00000000000..dc12a39889b --- /dev/null +++ b/build/featured-category.js @@ -0,0 +1,16 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-category"]=function(e){function t(t){for(var c,a,l=t[0],s=t[1],i=t[2],d=0,b=[];dObject(n.sprintf)( +/* translators: Number of items selected from list. */ +Object(n._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Search results updated.","woo-gutenberg-products-block")},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=Object(o.groupBy)(e,"parent"),c=Object(o.keyBy)(t,"id"),n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=n(c[e.parent]);return[...t,e.name]},a=e=>e.map(e=>{const t=r[e.id];return delete r[e.id],{...e,breadcrumbs:n(c[e.parent]),children:t&&t.length?a(t):[]}}),l=a(r[0]||[]);return delete r[0],Object(o.forEach)(r,e=>{l.push(...a(e||[]))}),l},s=(e,t,r)=>{if(!t)return r?l(e):e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),o=e.map(e=>!!c.test(e.name)&&e).filter(Boolean);return r?l(o,e):o},i=(e,t)=>{if(!t)return e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(r).map((e,r)=>0===r?e:Object(c.createElement)(c.Fragment,{key:r},Object(c.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,r){"use strict";r.d(t,"o",(function(){return n})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return l})),r.d(t,"n",(function(){return s})),r.d(t,"j",(function(){return i})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return g})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return p})),r.d(t,"h",(function(){return h})),r.d(t,"a",(function(){return O})),r.d(t,"i",(function(){return j})),r.d(t,"b",(function(){return w}));var c,o=r(2);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=n.pluginUrl+"images/",l=n.pluginUrl+"build/",s=n.buildPhase,i=null===(c=o.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,u=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,b=o.STORE_PAGES.privacy.permalink,g=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),p=o.STORE_PAGES.cart.permalink,h=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),O=Object(o.getSetting)("allowedCountries",{}),j=Object(o.getSetting)("shippingStates",{}),w=Object(o.getSetting)("allowedStates",{})},27:function(e,t,r){"use strict";r.d(t,"h",(function(){return i})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return g})),r.d(t,"c",(function(){return m})),r.d(t,"d",(function(){return p})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return O}));var c=r(15),o=r(11),n=r.n(o),a=r(6),l=r(2),s=r(25);const i=e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const l=(e=>{let{selected:t=[],search:r="",queryArgs:o={}}=e;const n=s.o.productCount>100,a={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},l=[Object(c.addQueryArgs)("/wc/store/products",{...a,...o})];return n&&t.length&&l.push(Object(c.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),l})({selected:t,search:r,queryArgs:o});return Promise.all(l.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:r}=e;const o=(e=>{let{selected:t=[],search:r}=e;const o=Object(l.getSetting)("limitTags",!1),n=[Object(c.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:r})];return o&&t.length&&n.push(Object(c.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},m=e=>n()({path:Object(c.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),p=e=>n()({path:"wc/store/products/categories/"+e}),h=e=>n()({path:Object(c.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return n}));var c=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(c.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(31);t.a=e=>{let{error:t}=e;return Object(c.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===r?Object(c.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(c.createElement)("br",null),Object(c.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},34:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var c=r(5),o=r.n(c),n=r(0),a=r(17);const l=e=>{let{countLabel:t,className:r,depth:c=0,controlId:l="",item:s,isSelected:i,isSingle:u,onSelect:d,search:b="",...g}=e;const m=null!=t&&void 0!==s.count&&null!==s.count,p=[r,"woocommerce-search-list__item"];p.push("depth-"+c),u&&p.push("is-radio-button"),m&&p.push("has-count");const h=s.breadcrumbs&&s.breadcrumbs.length,O=g.name||"search-list-item-"+l,j=`${O}-${s.id}`;return Object(n.createElement)("label",{htmlFor:j,className:p.join(" ")},u?Object(n.createElement)("input",o()({type:"radio",id:j,name:O,value:s.value,onChange:d(s),checked:i,className:"woocommerce-search-list__item-input"},g)):Object(n.createElement)("input",o()({type:"checkbox",id:j,name:O,value:s.value,onChange:d(s),checked:i,className:"woocommerce-search-list__item-input"},g)),Object(n.createElement)("span",{className:"woocommerce-search-list__item-label"},h?Object(n.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(a.b)(s.breadcrumbs)):null,Object(n.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(a.d)(s.name,b))),!!m&&Object(n.createElement)("span",{className:"woocommerce-search-list__item-count"},t||s.count))};t.b=l},349:function(e,t,r){e.exports=r(439)},350:function(e,t){},351:function(e,t){},43:function(e,t,r){"use strict";var c=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:r,height:r,...o}):null}},439:function(e,t,r){"use strict";r.r(t);var c=r(0),o=r(1),n=r(7),a=r(12),l=r(2),s=r(43),i=r(18),u=Object(c.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-6.92-3.96L12.39 17 15 15.47 17.61 17l-.69-2.96 2.3-1.99-3.03-.26L15 9l-1.19 2.79-3.03.26z"})),d=(r(350),r(351),r(5)),b=r.n(d),g=r(24),m=r.n(g),p=r(3),h=r(4),O=r.n(h),j=r(13),w=r(9),f=(r(10),r(63)),_=r(69),y=r(6);function k(e){return e&&Object(y.isObject)(e.image)?e.image.src:""}var E=r(27),v=r(28),S=Object(w.createHigherOrderComponent)(e=>class extends c.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,category:"preview"===this.props.attributes.categoryId?this.props.attributes.previewCategory:null},this.loadCategory=this.loadCategory.bind(this)}componentDidMount(){this.loadCategory()}componentDidUpdate(e){e.attributes.categoryId!==this.props.attributes.categoryId&&this.loadCategory()}loadCategory(){const{categoryId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(E.d)(e).then(e=>{this.setState({category:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(v.a)(e);this.setState({category:null,loading:!1,error:t})})):this.setState({category:null,loading:!1,error:null}))}render(){const{error:t,loading:r,category:o}=this.state;return Object(c.createElement)(e,b()({},this.props,{error:t,getCategory:this.loadCategory,isLoading:r,category:o}))}},"withCategory"),C=Object(w.compose)([S,Object(n.withColors)({overlayColor:"background-color"}),p.withSpokenMessages,Object(j.withSelect)((e,t,r)=>{var c,o;let{clientId:n}=t,{dispatch:a}=r;const l=e("core/block-editor").getBlock(n),s=(null==l||null===(c=l.innerBlocks[0])||void 0===c?void 0:c.clientId)||"";return{updateBlockAttributes:e=>{s&&a("core/block-editor").updateBlockAttributes(s,e)},currentButtonAttributes:(null==l||null===(o=l.innerBlocks[0])||void 0===o?void 0:o.attributes)||{}}}),Object(w.createHigherOrderComponent)(e=>{class t extends c.Component{constructor(){super(...arguments),m()(this,"state",{doUrlUpdate:!1}),m()(this,"triggerUrlUpdate",()=>{this.setState({doUrlUpdate:!0})})}componentDidUpdate(){const{attributes:e,updateBlockAttributes:t,currentButtonAttributes:r,category:c}=this.props;this.state.doUrlUpdate&&!e.editMode&&null!=c&&c.permalink&&null!=r&&r.url&&c.permalink!==r.url&&(t({...r,url:c.permalink}),this.setState({doUrlUpdate:!1}))}render(){return Object(c.createElement)(e,b()({triggerUrlUpdate:this.triggerUrlUpdate},this.props))}}return t},"withUpdateButtonAttributes")])(e=>{let{attributes:t,isSelected:r,setAttributes:a,error:i,getCategory:d,isLoading:b,category:g,overlayColor:m,setOverlayColor:h,debouncedSpeak:j,triggerUrlUpdate:w=(()=>{})}=e;const{editMode:E}=t;return i?Object(c.createElement)(_.a,{className:"wc-block-featured-category-error",error:i,isLoading:b,onRetry:d}):E?Object(c.createElement)(p.Placeholder,{icon:Object(c.createElement)(s.a,{srcElement:u}),label:Object(o.__)("Featured Category","woo-gutenberg-products-block"),className:"wc-block-featured-category"},Object(o.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),Object(c.createElement)("div",{className:"wc-block-featured-category__selection"},Object(c.createElement)(f.a,{selected:[t.categoryId],onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;a({categoryId:t,mediaId:0,mediaSrc:""}),w()},isSingle:!0}),Object(c.createElement)(p.Button,{isPrimary:!0,onClick:()=>{a({editMode:!1}),j(Object(o.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block")))):Object(c.createElement)(c.Fragment,null,(()=>{const{contentAlign:e,mediaSrc:r}=t,l=t.mediaId||function(e){return e&&Object(y.isObject)(e.image)?e.image.id:0}(g);return Object(c.createElement)(n.BlockControls,null,Object(c.createElement)(n.AlignmentToolbar,{value:e,onChange:e=>{a({contentAlign:e})}}),Object(c.createElement)(n.MediaReplaceFlow,{mediaId:l,mediaURL:r,accept:"image/*",onSelect:e=>{a({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),Object(c.createElement)(p.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit selected category","woo-gutenberg-products-block"),onClick:()=>a({editMode:!E}),isActive:E}]}))})(),(()=>{const e=t.mediaSrc||k(g),{focalPoint:r={x:.5,y:.5}}=t,l="function"==typeof p.FocalPointPicker;return Object(c.createElement)(n.InspectorControls,{key:"inspector"},Object(c.createElement)(p.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block")},Object(c.createElement)(p.ToggleControl,{label:Object(o.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:()=>a({showDesc:!t.showDesc})})),Object(c.createElement)(n.PanelColorSettings,{title:Object(o.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:m.color,onChange:h,label:Object(o.__)("Overlay Color","woo-gutenberg-products-block")}]},!!e&&Object(c.createElement)(c.Fragment,null,Object(c.createElement)(p.RangeControl,{label:Object(o.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:e=>a({dimRatio:e}),min:0,max:100,step:10}),l&&Object(c.createElement)(p.FocalPointPicker,{label:Object(o.__)("Focal Point Picker","woo-gutenberg-products-block"),url:e,value:r,onChange:e=>a({focalPoint:e})}))))})(),g?(()=>{const{className:e,contentAlign:s,dimRatio:i,focalPoint:u,height:d,showDesc:h}=t,j=O()("wc-block-featured-category",{"is-selected":r&&"preview"!==t.productId,"is-loading":!g&&b,"is-not-found":!g&&!b,"has-background-dim":0!==i},0===(w=i)||50===w?null:"has-background-dim-"+10*Math.round(w/10),"center"!==s&&`has-${s}-content`,e);var w;const f=t.mediaSrc||k(g),_=g&&(y=f)?{backgroundImage:`url(${y})`}:{};var y;if(m.color&&(_.backgroundColor=m.color),u){const e=100*u.x,t=100*u.y;_.backgroundPosition=`${e}% ${t}%`}return Object(c.createElement)(p.ResizableBox,{className:j,size:{height:d},minHeight:Object(l.getSetting)("min_height",500),enable:{bottom:!0},onResizeStop:(e,t,r)=>{a({height:parseInt(r.style.height,10)})},style:_},Object(c.createElement)("div",{className:"wc-block-featured-category__wrapper"},Object(c.createElement)("h2",{className:"wc-block-featured-category__title",dangerouslySetInnerHTML:{__html:g.name}}),h&&Object(c.createElement)("div",{className:"wc-block-featured-category__description",dangerouslySetInnerHTML:{__html:g.description}}),Object(c.createElement)("div",{className:"wc-block-featured-category__link"},(()=>{const e=O()("wp-block-button__link","is-style-fill");return"preview"===t.categoryId?Object(c.createElement)("div",{className:"wp-block-button aligncenter",style:{width:"100%"}},Object(c.createElement)(n.RichText.Content,{tagName:"a",className:e,href:g.permalink,title:t.linkText,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:t.linkText,target:g.permalink})):Object(c.createElement)(n.InnerBlocks,{template:[["core/button",{text:Object(o.__)("Shop now","woo-gutenberg-products-block"),url:g.permalink,align:"center"}]],templateLock:"all"})})())))})():Object(c.createElement)(p.Placeholder,{className:"wc-block-featured-category",icon:Object(c.createElement)(s.a,{srcElement:u}),label:Object(o.__)("Featured Category","woo-gutenberg-products-block")},b?Object(c.createElement)(p.Spinner,null):Object(o.__)("No product category is selected.","woo-gutenberg-products-block")))}),x=r(25);const N=[{id:1,name:Object(o.__)("Clothing","woo-gutenberg-products-block"),slug:"clothing",parent:0,count:10,description:`

${Object(o.__)("Branded t-shirts, jumpers, pants and more!","woo-gutenberg-products-block")}

\n`,image:{id:1,date_created:"2019-07-15T17:05:04",date_created_gmt:"2019-07-15T17:05:04",date_modified:"2019-07-15T17:05:04",date_modified_gmt:"2019-07-15T17:05:04",src:x.m+"previews/collection.jpg",name:"",alt:""},permalink:"#"}],P={attributes:{contentAlign:"center",dimRatio:50,editMode:!1,height:Object(l.getSetting)("default_height",500),mediaSrc:"",showDesc:!0,categoryId:"preview",previewCategory:N[0]}};Object(a.registerBlockType)("woocommerce/featured-category",{title:Object(o.__)("Featured Category","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(s.a,{srcElement:u,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Visually highlight a product category and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:P,attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:Object(l.getSetting)("default_height",500)},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(o.__)("Shop now","woo-gutenberg-products-block")},categoryId:{type:"number"},showDesc:{type:"boolean",default:!0},previewCategory:{type:"object",default:null}},edit:e=>Object(c.createElement)(C,e),save:()=>Object(c.createElement)(n.InnerBlocks.Content,null)})},6:function(e,t){e.exports=window.lodash},63:function(e,t,r){"use strict";var c=r(5),o=r.n(c),n=r(0),a=r(1),l=(r(10),r(34)),s=r(86),i=r(3),u=r(9),d=r(27),b=r(28),g=Object(u.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(d.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:c}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:t,isLoading:r,categories:c}))}},"withCategories"),m=r(32),p=r(4),h=r.n(p);r(90);const O=e=>{let{categories:t,error:r,isLoading:c,onChange:u,onOperatorChange:d,operator:b,selected:g,isCompact:p,isSingle:O,showReviewCount:j}=e;const w={clear:Object(a.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(a.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(a.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(a.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(a._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(a.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(m.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.a,{className:"woocommerce-product-categories",list:t,isLoading:c,selected:g.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:u,renderItem:e=>{const{item:t,search:r,depth:c=0}=e,s=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,i=j?Object(a.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(a._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),s,t.review_count):Object(a.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(a._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),s,t.count),u=j?Object(a.sprintf)( +/* translators: %d is the count of reviews. */ +Object(a._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(a.sprintf)( +/* translators: %d is the count of products. */ +Object(a._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(l.a,o()({className:h()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===c&&0!==t.parent})},e,{countLabel:u,"aria-label":i}))},messages:w,isCompact:p,isHierarchical:!0,isSingle:O}),!!d&&Object(n.createElement)("div",{hidden:g.length<2},Object(n.createElement)(i.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(a.__)("Display products matching","woo-gutenberg-products-block"),help:Object(a.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:b,onChange:d,options:[{label:Object(a.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(a.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};O.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=g(O)},69:function(e,t,r){"use strict";var c=r(0),o=r(1),n=r(43),a=r(102),l=r(4),s=r.n(l),i=r(3),u=r(32);r(103),t.a=e=>{let{className:t,error:r,isLoading:l=!1,onRetry:d}=e;return Object(c.createElement)(i.Placeholder,{icon:Object(c.createElement)(n.a,{srcElement:a.a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:s()("wc-block-api-error",t)},Object(c.createElement)(u.a,{error:r}),d&&Object(c.createElement)(c.Fragment,null,l?Object(c.createElement)(i.Spinner,null):Object(c.createElement)(i.Button,{isSecondary:!0,onClick:d},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},7:function(e,t){e.exports=window.wp.blockEditor},86:function(e,t,r){"use strict";r.d(t,"a",(function(){return k}));var c=r(5),o=r.n(c),n=r(0),a=r(1),l=r(3),s=r(478),i=r(480),u=r(4),d=r.n(u),b=r(9),g=r(17),m=r(34),p=r(479),h=r(14);const O=e=>{let{id:t,label:r,popoverContents:c,remove:o,screenReaderLabel:i,className:u=""}=e;const[g,m]=Object(n.useState)(!1),j=Object(b.useInstanceId)(O);if(i=i||r,!r)return null;r=Object(h.decodeEntities)(r);const w=d()("woocommerce-tag",u,{"has-remove":!!o}),f="woocommerce-tag__label-"+j,_=Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},i),Object(n.createElement)("span",{"aria-hidden":"true"},r));return Object(n.createElement)("span",{className:w},c?Object(n.createElement)(l.Button,{className:"woocommerce-tag__text",id:f,onClick:()=>m(!0)},_):Object(n.createElement)("span",{className:"woocommerce-tag__text",id:f},_),c&&g&&Object(n.createElement)(l.Popover,{onClose:()=>m(!1)},c),o&&Object(n.createElement)(l.Button,{className:"woocommerce-tag__remove",onClick:o(t),label:Object(a.sprintf)(// Translators: %s label. +Object(a.__)("Remove %s","woo-gutenberg-products-block"),r),"aria-describedby":f},Object(n.createElement)(s.a,{icon:p.a,size:20,className:"clear-icon"})))};var j=O;const w=e=>Object(n.createElement)(m.b,e),f=e=>{const{list:t,selected:r,renderItem:c,depth:a=0,onSelect:l,instanceId:s,isSingle:i,search:u}=e;return t?Object(n.createElement)(n.Fragment,null,t.map(t=>{const d=-1!==r.findIndex(e=>{let{id:r}=e;return r===t.id});return Object(n.createElement)(n.Fragment,{key:t.id},Object(n.createElement)("li",null,c({item:t,isSelected:d,onSelect:l,isSingle:i,search:u,depth:a,controlId:s})),Object(n.createElement)(f,o()({},e,{list:t.children,depth:a+1})))})):null},_=e=>{let{isLoading:t,isSingle:r,selected:c,messages:o,onChange:s,onRemove:i}=e;if(t||r||!c)return null;const u=c.length;return Object(n.createElement)("div",{className:"woocommerce-search-list__selected"},Object(n.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(n.createElement)("strong",null,o.selected(u)),u>0?Object(n.createElement)(l.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":o.clear},Object(a.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(n.createElement)("ul",null,c.map((e,t)=>Object(n.createElement)("li",{key:t},Object(n.createElement)(j,{label:e.name,id:e.id,remove:i})))):null)},y=e=>{let{filteredList:t,search:r,onSelect:c,instanceId:o,...l}=e;const{messages:u,renderItem:d,selected:b,isSingle:g}=l,m=d||w;return 0===t.length?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(n.createElement)(s.a,{icon:i.a})),Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-text"},r?Object(a.sprintf)(u.noResults,r):u.noItems)):Object(n.createElement)("ul",{className:"woocommerce-search-list__list"},Object(n.createElement)(f,{list:t,selected:b,renderItem:m,onSelect:c,instanceId:o,isSingle:g,search:r}))},k=e=>{const{className:t="",isCompact:r,isHierarchical:c,isLoading:a,isSingle:s,list:i,messages:u=g.a,onChange:m,onSearch:p,selected:h,debouncedSpeak:O}=e,[j,w]=Object(n.useState)(""),f=Object(b.useInstanceId)(k),E=Object(n.useMemo)(()=>({...g.a,...u}),[u]),v=Object(n.useMemo)(()=>Object(g.c)(i,j,c),[i,j,c]);Object(n.useEffect)(()=>{O&&O(E.updated)},[O,E]),Object(n.useEffect)(()=>{"function"==typeof p&&p(j)},[j,p]);const S=Object(n.useCallback)(e=>()=>{s&&m([]);const t=h.findIndex(t=>{let{id:r}=t;return r===e});m([...h.slice(0,t),...h.slice(t+1)])},[s,h,m]),C=Object(n.useCallback)(e=>()=>{-1===h.findIndex(t=>{let{id:r}=t;return r===e.id})?m(s?[e]:[...h,e]):S(e.id)()},[s,S,m,h]);return Object(n.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":r})},Object(n.createElement)(_,o()({},e,{onRemove:S,messages:E})),Object(n.createElement)("div",{className:"woocommerce-search-list__search"},Object(n.createElement)(l.TextControl,{label:E.search,type:"search",value:j,onChange:e=>w(e)})),a?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(n.createElement)(l.Spinner,null)):Object(n.createElement)(y,o()({},e,{search:j,filteredList:v,messages:E,onSelect:C,instanceId:f})))};Object(l.withSpokenMessages)(k)},9:function(e,t){e.exports=window.wp.compose},90:function(e,t){}}); \ No newline at end of file diff --git a/build/featured-product.asset.php b/build/featured-product.asset.php new file mode 100644 index 00000000000..2db2d28b5da --- /dev/null +++ b/build/featured-product.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '72843c1dc2eabaebe2c8719ce53a2001'); \ No newline at end of file diff --git a/build/featured-product.js b/build/featured-product.js new file mode 100644 index 00000000000..d7571d8686d --- /dev/null +++ b/build/featured-product.js @@ -0,0 +1,10 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["featured-product"]=function(e){function t(t){for(var n,a,s=t[0],i=t[1],l=t[2],d=0,p=[];d{class t extends o.Component{render(){const{selected:t}=this.props,r=null==t;return Object(o.createElement)(e,c()({},this.props,{selected:r?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),p=r(191),m=r(24),b=r.n(m),g=r(26),h=r.n(g),O=r(27),w=r(28),j=Object(u.createHigherOrderComponent)(e=>{class t extends o.Component{constructor(){super(...arguments),b()(this,"state",{error:null,loading:!1,variations:{}}),b()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:r}=this.state;if(t)return;const n=this.getExpandedProduct();if(!n||r[n])return;const c=e.find(e=>e.id===n);c.variations&&0!==c.variations.length?(this.setState({loading:!0}),Object(O.g)(n).then(e=>{const t=e.map(e=>({...e,parent:n}));this.setState({variations:{...this.state.variations,[n]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(w.a)(e);this.setState({variations:{...this.state.variations,[n]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[n]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:r,showVariations:n}=this.props;n&&(!h()(e.selected,r)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:r}=t;return r===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:r}=this.props;if(!r)return null;let n=t&&t.length?t[0]:null;return n?this.prevSelectedItem=n:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(n=this.prevSelectedItem)),!e&&n?this.isProductId(n)?n:this.findParentProduct(n):null}render(){const{error:t,isLoading:r}=this.props,{error:n,loading:a,variations:s}=this.state;return Object(o.createElement)(e,c()({},this.props,{error:n||t,expandedProduct:this.getExpandedProduct(),isLoading:r,variations:s,variationsLoading:a}))}}return b()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),f=r(32),_=r(4),v=r.n(_),E=r(88);r(140);const k={list:Object(a.__)("Products","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(a.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(a.__)("Product search results updated.","woo-gutenberg-products-block")},S=e=>{let{expandedProduct:t,error:r,instanceId:n,isCompact:u,isLoading:d,onChange:p,onSearch:m,products:b,renderItem:g,selected:h,showVariations:O,variations:w,variationsLoading:j}=e;if(r)return Object(o.createElement)(f.a,{error:r});const _=[...b,...w&&w[t]?w[t]:[]];return Object(o.createElement)(l.a,{className:"woocommerce-products",list:_,isCompact:u,isLoading:d,isSingle:!0,selected:_.filter(e=>{let{id:t}=e;return h.includes(t)}),onChange:p,renderItem:g||(O?e=>{const{item:t,search:r,depth:l=0,isSelected:u,onSelect:p}=e,m=t.variations&&Array.isArray(t.variations)?t.variations.length:0,b=v()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+l,"has-count",{"is-searching":r.length>0,"is-skip-level":0===l&&0!==t.parent,"is-variable":m>0});if(!t.breadcrumbs.length)return Object(o.createElement)(E.a,c()({},e,{className:v()(b,{"is-selected":u}),isSelected:u,item:t,onSelect:()=>()=>{p(t)()},isLoading:d||j,countLabel:t.variations.length>0?Object(a.sprintf)( +/* translators: %1$d is the number of variations of a product product. */ +Object(a.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+n,"aria-label":Object(a.sprintf)( +/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ +Object(a._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const g=Object(s.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(o.createElement)(i.a,c()({},g,{className:b,name:"variations-"+n}))}:null),onSearch:m,messages:k,isHierarchical:!0})};S.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=d(Object(p.a)(j(Object(u.withInstanceId)(S))))},102:function(e,t,r){"use strict";var n=r(0),c=r(18);const o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=o},103:function(e,t){},11:function(e,t){e.exports=window.wp.apiFetch},12:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.data},14:function(e,t){e.exports=window.wp.htmlEntities},140:function(e,t){},15:function(e,t){e.exports=window.wp.url},17:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return u}));var n=r(0),c=r(6),o=r(1);const a={clear:Object(o.__)("Clear all selected items","woo-gutenberg-products-block"),noItems:Object(o.__)("No items found.","woo-gutenberg-products-block"), +/* Translators: %s search term */ +noResults:Object(o.__)("No results for %s","woo-gutenberg-products-block"),search:Object(o.__)("Search for items","woo-gutenberg-products-block"),selected:e=>Object(o.sprintf)( +/* translators: Number of items selected from list. */ +Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=Object(c.groupBy)(e,"parent"),n=Object(c.keyBy)(t,"id"),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=o(n[e.parent]);return[...t,e.name]},a=e=>e.map(e=>{const t=r[e.id];return delete r[e.id],{...e,breadcrumbs:o(n[e.parent]),children:t&&t.length?a(t):[]}}),s=a(r[0]||[]);return delete r[0],Object(c.forEach)(r,e=>{s.push(...a(e||[]))}),s},i=(e,t,r)=>{if(!t)return r?s(e):e;const n=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),c=e.map(e=>!!n.test(e.name)&&e).filter(Boolean);return r?s(c,e):c},l=(e,t)=>{if(!t)return e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(r).map((e,r)=>0===r?e:Object(n.createElement)(n.Fragment,{key:r},Object(n.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},191:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(25),s=r(27),i=r(116),l=r(28);t.a=e=>t=>{let{selected:r,...n}=t;const[u,d]=Object(o.useState)(!0),[p,m]=Object(o.useState)(null),[b,g]=Object(o.useState)([]),h=a.o.productCount>100,O=async e=>{const t=await Object(l.a)(e);m(t),d(!1)},w=Object(o.useRef)(r);Object(o.useEffect)(()=>{Object(s.h)({selected:w.current}).then(e=>{g(e),d(!1)}).catch(O)},[w]);const j=Object(i.a)(e=>{Object(s.h)({selected:r,search:e}).then(e=>{g(e),d(!1)}).catch(O)},400),f=Object(o.useCallback)(e=>{d(!0),j(e)},[d,j]);return Object(o.createElement)(e,c()({},n,{selected:r,error:p,products:b,isLoading:u,onSearch:h?f:null}))}},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,r){"use strict";r.d(t,"o",(function(){return o})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return s})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return p})),r.d(t,"k",(function(){return m})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"a",(function(){return O})),r.d(t,"i",(function(){return w})),r.d(t,"b",(function(){return j}));var n,c=r(2);const o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=o.pluginUrl+"images/",s=o.pluginUrl+"build/",i=o.buildPhase,l=null===(n=c.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=c.STORE_PAGES.checkout.id,d=c.STORE_PAGES.checkout.permalink,p=c.STORE_PAGES.privacy.permalink,m=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),b=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),g=c.STORE_PAGES.cart.permalink,h=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),O=Object(c.getSetting)("allowedCountries",{}),w=Object(c.getSetting)("shippingStates",{}),j=Object(c.getSetting)("allowedStates",{})},258:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(24),a=r.n(o),s=r(0),i=r(9),l=r(27),u=r(28);const d=Object(i.createHigherOrderComponent)(e=>class extends s.Component{constructor(){super(...arguments),a()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),a()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(l.e)(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(u.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:r,product:n}=this.state;return Object(s.createElement)(e,c()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:r,product:n}))}},"withProduct");t.a=d},26:function(e,t){e.exports=window.wp.isShallowEqual},27:function(e,t,r){"use strict";r.d(t,"h",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return p})),r.d(t,"f",(function(){return m})),r.d(t,"c",(function(){return b})),r.d(t,"d",(function(){return g})),r.d(t,"g",(function(){return h})),r.d(t,"a",(function(){return O}));var n=r(15),c=r(11),o=r.n(c),a=r(6),s=r(2),i=r(25);const l=e=>{let{selected:t=[],search:r="",queryArgs:c={}}=e;const s=(e=>{let{selected:t=[],search:r="",queryArgs:c={}}=e;const o=i.o.productCount>100,a={per_page:o?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},s=[Object(n.addQueryArgs)("/wc/store/products",{...a,...c})];return o&&t.length&&s.push(Object(n.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:r,queryArgs:c});return Promise.all(s.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),p=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:r}=e;const c=(e=>{let{selected:t=[],search:r}=e;const c=Object(s.getSetting)("limitTags",!1),o=[Object(n.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:r})];return c&&t.length&&o.push(Object(n.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:r});return Promise.all(c.map(e=>o()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},b=e=>o()({path:Object(n.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>o()({path:"wc/store/products/categories/"+e}),h=e=>o()({path:Object(n.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),O=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return o}));var n=r(1);const c=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(31);t.a=e=>{let{error:t}=e;return Object(n.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(n.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===r?Object(n.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(n.createElement)("br",null),Object(n.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},336:function(e,t,r){e.exports=r(445)},337:function(e,t){},338:function(e,t){},339:function(e,t,r){"use strict";var n=r(0),c=r(18);const o=Object(n.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}));t.a=o},34:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(5),c=r.n(n),o=r(0),a=r(17);const s=e=>{let{countLabel:t,className:r,depth:n=0,controlId:s="",item:i,isSelected:l,isSingle:u,onSelect:d,search:p="",...m}=e;const b=null!=t&&void 0!==i.count&&null!==i.count,g=[r,"woocommerce-search-list__item"];g.push("depth-"+n),u&&g.push("is-radio-button"),b&&g.push("has-count");const h=i.breadcrumbs&&i.breadcrumbs.length,O=m.name||"search-list-item-"+s,w=`${O}-${i.id}`;return Object(o.createElement)("label",{htmlFor:w,className:g.join(" ")},u?Object(o.createElement)("input",c()({type:"radio",id:w,name:O,value:i.value,onChange:d(i),checked:l,className:"woocommerce-search-list__item-input"},m)):Object(o.createElement)("input",c()({type:"checkbox",id:w,name:O,value:i.value,onChange:d(i),checked:l,className:"woocommerce-search-list__item-input"},m)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},h?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(a.b)(i.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(a.d)(i.name,p))),!!b&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||i.count))};t.b=s},340:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(1),c=r(25);const o=[{id:1,name:"WordPress Pennant",variation:"",permalink:"https://example.org",sku:"wp-pennant",short_description:Object(n.__)("Fly your WordPress banner with this beauty! Deck out your office space or add it to your kids walls. This banner will spruce up any space it’s hung!","woo-gutenberg-products-block"),description:"Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.",price:"7.99",price_html:'$7.99',images:[{id:1,src:c.m+"previews/pennant.jpg",thumbnail:c.m+"previews/pennant.jpg",name:"pennant-1.jpg",alt:"WordPress Pennant",srcset:"",sizes:""}],average_rating:5,review_count:1,prices:{currency_code:"GBP",decimal_separator:".",thousand_separator:",",decimals:2,price_prefix:"£",price_suffix:"",price:"7.99",regular_price:"9.99",sale_price:"7.99",price_range:null},add_to_cart:{text:Object(n.__)("Add to cart","woo-gutenberg-products-block"),description:Object(n.__)("Add to cart","woo-gutenberg-products-block")},has_options:!1,is_purchasable:!0,is_in_stock:!0,on_sale:!0}]},43:function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{srcElement:t,size:r=24,...c}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:r,height:r,...c}):null}},445:function(e,t,r){"use strict";r.r(t);var n=r(0),c=r(1),o=r(7),a=r(12),s=r(2),i=r(43),l=r(339),u=(r(337),r(338),r(340));const d={attributes:{contentAlign:"center",dimRatio:50,editMode:!1,height:Object(s.getSetting)("default_height",500),mediaSrc:"",showDesc:!0,productId:"preview",previewProduct:u.a[0]}};var p=r(5),m=r.n(p),b=r(24),g=r.n(b),h=r(13),O=r(3),w=r(4),j=r.n(w),f=r(9),_=r(6),v=(r(10),r(101)),E=r(69),k=r(258);function S(e){return e&&e.images&&e.images.length&&e.images[0].src||""}var y=Object(f.compose)([k.a,Object(o.withColors)({overlayColor:"background-color"}),O.withSpokenMessages,Object(h.withSelect)((e,t,r)=>{var n,c;let{clientId:o}=t,{dispatch:a}=r;const s=e("core/block-editor").getBlock(o),i=(null==s||null===(n=s.innerBlocks[0])||void 0===n?void 0:n.clientId)||"";return{updateBlockAttributes:e=>{i&&a("core/block-editor").updateBlockAttributes(i,e)},currentButtonAttributes:(null==s||null===(c=s.innerBlocks[0])||void 0===c?void 0:c.attributes)||{}}}),Object(f.createHigherOrderComponent)(e=>{class t extends n.Component{constructor(){super(...arguments),g()(this,"state",{doUrlUpdate:!1}),g()(this,"triggerUrlUpdate",()=>{this.setState({doUrlUpdate:!0})})}componentDidUpdate(){const{attributes:e,updateBlockAttributes:t,currentButtonAttributes:r,product:n}=this.props;this.state.doUrlUpdate&&!e.editMode&&null!=n&&n.permalink&&null!=r&&r.url&&n.permalink!==r.url&&(t({...r,url:n.permalink}),this.setState({doUrlUpdate:!1}))}render(){return Object(n.createElement)(e,m()({triggerUrlUpdate:this.triggerUrlUpdate},this.props))}}return t},"withUpdateButtonAttributes")])(e=>{let{attributes:t,debouncedSpeak:r,error:a,getProduct:u,isLoading:d,isSelected:p,overlayColor:m,product:b,setAttributes:g,setOverlayColor:h,triggerUrlUpdate:w=(()=>{})}=e;const f=()=>{const{contentAlign:e,editMode:r,mediaSrc:a}=t,s=t.mediaId||function(e){return e&&e.images&&e.images.length&&e.images[0].id||0}(b);return Object(n.createElement)(o.BlockControls,null,Object(n.createElement)(o.AlignmentToolbar,{value:e,onChange:e=>{g({contentAlign:e})}}),Object(n.createElement)(o.MediaReplaceFlow,{mediaId:s,mediaURL:a,accept:"image/*",onSelect:e=>{g({mediaId:e.id,mediaSrc:e.url})},allowedTypes:["image"]}),Object(n.createElement)(O.ToolbarGroup,{controls:[{icon:"edit",title:Object(c.__)("Edit selected product","woo-gutenberg-products-block"),onClick:()=>g({editMode:!r}),isActive:r}]}))},{editMode:k}=t;return a?Object(n.createElement)(E.a,{className:"wc-block-featured-product-error",error:a,isLoading:d,onRetry:u}):k?Object(n.createElement)(n.Fragment,null,f(),Object(n.createElement)(O.Placeholder,{icon:Object(n.createElement)(i.a,{srcElement:l.a}),label:Object(c.__)("Featured Product","woo-gutenberg-products-block"),className:"wc-block-featured-product"},Object(c.__)("Visually highlight a product or variation and encourage prompt action","woo-gutenberg-products-block"),Object(n.createElement)("div",{className:"wc-block-featured-product__selection"},Object(n.createElement)(v.a,{selected:t.productId||0,showVariations:!0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;g({productId:t,mediaId:0,mediaSrc:""}),w()}}),Object(n.createElement)(O.Button,{isPrimary:!0,onClick:()=>{g({editMode:!1}),r(Object(c.__)("Showing Featured Product block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))))):Object(n.createElement)(n.Fragment,null,f(),(()=>{const e=t.mediaSrc||S(b),{focalPoint:r={x:.5,y:.5}}=t,a="function"==typeof O.FocalPointPicker;return Object(n.createElement)(o.InspectorControls,{key:"inspector"},Object(n.createElement)(O.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block")},Object(n.createElement)(O.ToggleControl,{label:Object(c.__)("Show description","woo-gutenberg-products-block"),checked:t.showDesc,onChange:()=>g({showDesc:!t.showDesc})}),Object(n.createElement)(O.ToggleControl,{label:Object(c.__)("Show price","woo-gutenberg-products-block"),checked:t.showPrice,onChange:()=>g({showPrice:!t.showPrice})})),Object(n.createElement)(o.PanelColorSettings,{title:Object(c.__)("Overlay","woo-gutenberg-products-block"),colorSettings:[{value:m.color,onChange:h,label:Object(c.__)("Overlay Color","woo-gutenberg-products-block")}]},!!e&&Object(n.createElement)(n.Fragment,null,Object(n.createElement)(O.RangeControl,{label:Object(c.__)("Background Opacity","woo-gutenberg-products-block"),value:t.dimRatio,onChange:e=>g({dimRatio:e}),min:0,max:100,step:10}),a&&Object(n.createElement)(O.FocalPointPicker,{label:Object(c.__)("Focal Point Picker","woo-gutenberg-products-block"),url:e,value:r,onChange:e=>g({focalPoint:e})}))))})(),b?(()=>{const{className:e,contentAlign:r,dimRatio:a,focalPoint:i,height:l,showDesc:u,showPrice:h}=t,w=j()("wc-block-featured-product",{"is-selected":p&&"preview"!==t.productId,"is-loading":!b&&d,"is-not-found":!b&&!d,"has-background-dim":0!==a},0===(f=a)||50===f?null:"has-background-dim-"+10*Math.round(f/10),"center"!==r&&`has-${r}-content`,e);var f;const v=(E=t.mediaSrc||b,Object(_.isObject)(E)&&(E=S(E)),E?{backgroundImage:`url(${E})`}:{});var E;if(m.color&&(v.backgroundColor=m.color),i){const e=100*i.x,t=100*i.y;v.backgroundPosition=`${e}% ${t}%`}return Object(n.createElement)(O.ResizableBox,{className:w,size:{height:l},minHeight:Object(s.getSetting)("min_height",500),enable:{bottom:!0},onResizeStop:(e,t,r)=>{g({height:parseInt(r.style.height,10)})},style:v},Object(n.createElement)("div",{className:"wc-block-featured-product__wrapper"},Object(n.createElement)("h2",{className:"wc-block-featured-product__title",dangerouslySetInnerHTML:{__html:b.name}}),!Object(_.isEmpty)(b.variation)&&Object(n.createElement)("h3",{className:"wc-block-featured-product__variation",dangerouslySetInnerHTML:{__html:b.variation}}),u&&Object(n.createElement)("div",{className:"wc-block-featured-product__description",dangerouslySetInnerHTML:{__html:b.short_description}}),h&&Object(n.createElement)("div",{className:"wc-block-featured-product__price",dangerouslySetInnerHTML:{__html:b.price_html}}),Object(n.createElement)("div",{className:"wc-block-featured-product__link"},(()=>{const e=j()("wp-block-button__link","is-style-fill");return"preview"===t.productId?Object(n.createElement)("div",{className:"wp-block-button aligncenter",style:{width:"100%"}},Object(n.createElement)(o.RichText.Content,{tagName:"a",className:e,href:b.permalink,title:t.linkText,style:{backgroundColor:"vivid-green-cyan",borderRadius:"5px"},value:t.linkText,target:b.permalink})):Object(n.createElement)(o.InnerBlocks,{template:[["core/button",{text:Object(c.__)("Shop now","woo-gutenberg-products-block"),url:b.permalink,align:"center"}]],templateLock:"all"})})())))})():Object(n.createElement)(O.Placeholder,{className:"wc-block-featured-product",icon:Object(n.createElement)(i.a,{srcElement:l.a}),label:Object(c.__)("Featured Product","woo-gutenberg-products-block")},d?Object(n.createElement)(O.Spinner,null):Object(c.__)("No product is selected.","woo-gutenberg-products-block")))});Object(a.registerBlockType)("woocommerce/featured-product",{title:Object(c.__)("Featured Product","woo-gutenberg-products-block"),icon:{src:Object(n.createElement)(i.a,{srcElement:l.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Visually highlight a product or variation and encourage prompt action.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:d,attributes:{contentAlign:{type:"string",default:"center"},dimRatio:{type:"number",default:50},editMode:{type:"boolean",default:!0},focalPoint:{type:"object"},height:{type:"number",default:Object(s.getSetting)("default_height",500)},mediaId:{type:"number",default:0},mediaSrc:{type:"string",default:""},overlayColor:{type:"string"},customOverlayColor:{type:"string"},linkText:{type:"string",default:Object(c.__)("Shop now","woo-gutenberg-products-block")},productId:{type:"number"},showDesc:{type:"boolean",default:!0},showPrice:{type:"boolean",default:!0},previewProduct:{type:"object",default:null}},edit:e=>Object(n.createElement)(y,e),save:()=>Object(n.createElement)(o.InnerBlocks.Content,null)})},6:function(e,t){e.exports=window.lodash},69:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(43),a=r(102),s=r(4),i=r.n(s),l=r(3),u=r(32);r(103),t.a=e=>{let{className:t,error:r,isLoading:s=!1,onRetry:d}=e;return Object(n.createElement)(l.Placeholder,{icon:Object(n.createElement)(o.a,{srcElement:a.a}),label:Object(c.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(n.createElement)(u.a,{error:r}),d&&Object(n.createElement)(n.Fragment,null,s?Object(n.createElement)(l.Spinner,null):Object(n.createElement)(l.Button,{isSecondary:!0,onClick:d},Object(c.__)("Retry","woo-gutenberg-products-block"))))}},7:function(e,t){e.exports=window.wp.blockEditor},8:function(e,t){e.exports=window.React},86:function(e,t,r){"use strict";r.d(t,"a",(function(){return E}));var n=r(5),c=r.n(n),o=r(0),a=r(1),s=r(3),i=r(478),l=r(480),u=r(4),d=r.n(u),p=r(9),m=r(17),b=r(34),g=r(479),h=r(14);const O=e=>{let{id:t,label:r,popoverContents:n,remove:c,screenReaderLabel:l,className:u=""}=e;const[m,b]=Object(o.useState)(!1),w=Object(p.useInstanceId)(O);if(l=l||r,!r)return null;r=Object(h.decodeEntities)(r);const j=d()("woocommerce-tag",u,{"has-remove":!!c}),f="woocommerce-tag__label-"+w,_=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},l),Object(o.createElement)("span",{"aria-hidden":"true"},r));return Object(o.createElement)("span",{className:j},n?Object(o.createElement)(s.Button,{className:"woocommerce-tag__text",id:f,onClick:()=>b(!0)},_):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:f},_),n&&m&&Object(o.createElement)(s.Popover,{onClose:()=>b(!1)},n),c&&Object(o.createElement)(s.Button,{className:"woocommerce-tag__remove",onClick:c(t),label:Object(a.sprintf)(// Translators: %s label. +Object(a.__)("Remove %s","woo-gutenberg-products-block"),r),"aria-describedby":f},Object(o.createElement)(i.a,{icon:g.a,size:20,className:"clear-icon"})))};var w=O;const j=e=>Object(o.createElement)(b.b,e),f=e=>{const{list:t,selected:r,renderItem:n,depth:a=0,onSelect:s,instanceId:i,isSingle:l,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const d=-1!==r.findIndex(e=>{let{id:r}=e;return r===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,n({item:t,isSelected:d,onSelect:s,isSingle:l,search:u,depth:a,controlId:i})),Object(o.createElement)(f,c()({},e,{list:t.children,depth:a+1})))})):null},_=e=>{let{isLoading:t,isSingle:r,selected:n,messages:c,onChange:i,onRemove:l}=e;if(t||r||!n)return null;const u=n.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,c.selected(u)),u>0?Object(o.createElement)(s.Button,{isLink:!0,isDestructive:!0,onClick:()=>i([]),"aria-label":c.clear},Object(a.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(o.createElement)("ul",null,n.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(w,{label:e.name,id:e.id,remove:l})))):null)},v=e=>{let{filteredList:t,search:r,onSelect:n,instanceId:c,...s}=e;const{messages:u,renderItem:d,selected:p,isSingle:m}=s,b=d||j;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(i.a,{icon:l.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},r?Object(a.sprintf)(u.noResults,r):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(f,{list:t,selected:p,renderItem:b,onSelect:n,instanceId:c,isSingle:m,search:r}))},E=e=>{const{className:t="",isCompact:r,isHierarchical:n,isLoading:a,isSingle:i,list:l,messages:u=m.a,onChange:b,onSearch:g,selected:h,debouncedSpeak:O}=e,[w,j]=Object(o.useState)(""),f=Object(p.useInstanceId)(E),k=Object(o.useMemo)(()=>({...m.a,...u}),[u]),S=Object(o.useMemo)(()=>Object(m.c)(l,w,n),[l,w,n]);Object(o.useEffect)(()=>{O&&O(k.updated)},[O,k]),Object(o.useEffect)(()=>{"function"==typeof g&&g(w)},[w,g]);const y=Object(o.useCallback)(e=>()=>{i&&b([]);const t=h.findIndex(t=>{let{id:r}=t;return r===e});b([...h.slice(0,t),...h.slice(t+1)])},[i,h,b]),P=Object(o.useCallback)(e=>()=>{-1===h.findIndex(t=>{let{id:r}=t;return r===e.id})?b(i?[e]:[...h,e]):y(e.id)()},[i,y,b,h]);return Object(o.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":r})},Object(o.createElement)(_,c()({},e,{onRemove:y,messages:k})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(s.TextControl,{label:k.search,type:"search",value:w,onChange:e=>j(e)})),a?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(s.Spinner,null)):Object(o.createElement)(v,c()({},e,{search:w,filteredList:S,messages:k,onSelect:P,instanceId:f})))};Object(s.withSpokenMessages)(E)},88:function(e,t,r){"use strict";var n=r(5),c=r.n(n),o=r(0),a=r(34),s=r(3),i=r(4),l=r.n(i);t.a=e=>{let{className:t,item:r,isSelected:n,isLoading:i,onSelect:u,disabled:d,...p}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.a,c()({},p,{key:r.id,className:t,isSelected:n,item:r,onSelect:u,isSingle:!0,disabled:d})),n&&i&&Object(o.createElement)("div",{key:"loading",className:l()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(o.createElement)(s.Spinner,null)))}},9:function(e,t){e.exports=window.wp.compose}}); \ No newline at end of file diff --git a/build/handpicked-products.asset.php b/build/handpicked-products.asset.php new file mode 100644 index 00000000000..d5eb88d27b5 --- /dev/null +++ b/build/handpicked-products.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => '05d6517818489c7ede892c87aa8c9be6'); \ No newline at end of file diff --git a/build/handpicked-products.js b/build/handpicked-products.js new file mode 100644 index 00000000000..d486dea8f27 --- /dev/null +++ b/build/handpicked-products.js @@ -0,0 +1,8 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["handpicked-products"]=function(e){function t(t){for(var r,l,i=t[0],s=t[1],a=t[2],d=0,b=[];dObject(o.sprintf)( +/* translators: Number of items selected from list. */ +Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(n.groupBy)(e,"parent"),r=Object(n.keyBy)(t,"id"),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=o(r[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:o(r[e.parent]),children:t&&t.length?l(t):[]}}),i=l(c[0]||[]);return delete c[0],Object(n.forEach)(c,e=>{i.push(...l(e||[]))}),i},s=(e,t,c)=>{if(!t)return c?i(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?i(n,e):n},a=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},191:function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),l=c(25),i=c(27),s=c(116),a=c(28);t.a=e=>t=>{let{selected:c,...r}=t;const[u,d]=Object(o.useState)(!0),[b,g]=Object(o.useState)(null),[m,p]=Object(o.useState)([]),h=l.o.productCount>100,E=async e=>{const t=await Object(a.a)(e);g(t),d(!1)},O=Object(o.useRef)(c);Object(o.useEffect)(()=>{Object(i.h)({selected:O.current}).then(e=>{p(e),d(!1)}).catch(E)},[O]);const j=Object(s.a)(e=>{Object(i.h)({selected:c,search:e}).then(e=>{p(e),d(!1)}).catch(E)},400),w=Object(o.useCallback)(e=>{d(!0),j(e)},[d,j]);return Object(o.createElement)(e,n()({},r,{selected:c,error:b,products:m,isLoading:u,onSearch:h?w:null}))}},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return i})),c.d(t,"n",(function(){return s})),c.d(t,"j",(function(){return a})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return b})),c.d(t,"k",(function(){return g})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return p})),c.d(t,"h",(function(){return h})),c.d(t,"a",(function(){return E})),c.d(t,"i",(function(){return O})),c.d(t,"b",(function(){return j}));var r,n=c(2);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",s=o.buildPhase,a=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,g=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),m=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),p=n.STORE_PAGES.cart.permalink,h=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),E=Object(n.getSetting)("allowedCountries",{}),O=Object(n.getSetting)("shippingStates",{}),j=Object(n.getSetting)("allowedStates",{})},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return a})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return g})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return p})),c.d(t,"g",(function(){return h})),c.d(t,"a",(function(){return E}));var r=c(15),n=c(11),o=c.n(n),l=c(6),i=c(2),s=c(25);const a=e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=s.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},i=[Object(r.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&i.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:c,queryArgs:n});return Promise.all(i.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),b=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(i.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},m=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),p=e=>o()({path:"wc/store/products/categories/"+e}),h=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},317:function(e,t,c){e.exports=c(446)},318:function(e,t){},32:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(31);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(5),n=c.n(r),o=c(0),l=c(17);const i=e=>{let{countLabel:t,className:c,depth:r=0,controlId:i="",item:s,isSelected:a,isSingle:u,onSelect:d,search:b="",...g}=e;const m=null!=t&&void 0!==s.count&&null!==s.count,p=[c,"woocommerce-search-list__item"];p.push("depth-"+r),u&&p.push("is-radio-button"),m&&p.push("has-count");const h=s.breadcrumbs&&s.breadcrumbs.length,E=g.name||"search-list-item-"+i,O=`${E}-${s.id}`;return Object(o.createElement)("label",{htmlFor:O,className:p.join(" ")},u?Object(o.createElement)("input",n()({type:"radio",id:O,name:E,value:s.value,onChange:d(s),checked:a,className:"woocommerce-search-list__item-input"},g)):Object(o.createElement)("input",n()({type:"checkbox",id:O,name:E,value:s.value,onChange:d(s),checked:a,className:"woocommerce-search-list__item-input"},g)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},h?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(s.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(s.name,b))),!!m&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||s.count))};t.b=i},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},446:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(12),l=c(2),i=c(43),s=c(18),a=Object(r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M16.66 4.52l2.83 2.83-2.83 2.83-2.83-2.83 2.83-2.83M9 5v4H5V5h4m10 10v4h-4v-4h4M9 15v4H5v-4h4m7.66-13.31L11 7.34 16.66 13l5.66-5.66-5.66-5.65zM11 3H3v8h8V3zm10 10h-8v8h8v-8zm-10 0H3v8h8v-8z"})),u=(c(318),c(7)),d=c(51),b=c.n(d),g=c(3),m=(c(10),c(58)),p=c(86),h=c(191),E=c(32);const O=e=>{let{error:t,onChange:c,onSearch:o,selected:l,products:i,isLoading:s,isCompact:a}=e;const u={clear:Object(n.__)("Clear all products","woo-gutenberg-products-block"),list:Object(n.__)("Products","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(n.__)("Search for products to display","woo-gutenberg-products-block"),selected:e=>Object(n.sprintf)( +/* translators: %d is the number of selected products. */ +Object(n._n)("%d product selected","%d products selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Product search results updated.","woo-gutenberg-products-block")};return t?Object(r.createElement)(E.a,{error:t}):Object(r.createElement)(p.a,{className:"woocommerce-products",list:i.map(e=>{const t=e.sku?" ("+e.sku+")":"";return{...e,name:`${e.name}${t}`}}),isCompact:a,isLoading:s,selected:i.filter(e=>{let{id:t}=e;return l.includes(t)}),onSearch:o,onChange:c,messages:u})};O.defaultProps={selected:[],products:[],isCompact:!1,isLoading:!0};var j=Object(h.a)(O),w=c(87),f=c(126);class _ extends r.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{columns:c,contentVisibility:o,orderby:i,alignButtons:s}=e;return Object(r.createElement)(u.InspectorControls,{key:"inspector"},Object(r.createElement)(g.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(g.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:c,onChange:e=>t({columns:e}),min:Object(l.getSetting)("min_columns",1),max:Object(l.getSetting)("max_columns",6)}),Object(r.createElement)(g.ToggleControl,{label:Object(n.__)("Align Buttons","woo-gutenberg-products-block"),help:s?Object(n.__)("Buttons are aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("Buttons follow content.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({alignButtons:!s})})),Object(r.createElement)(g.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(m.a,{settings:o,onChange:e=>t({contentVisibility:e})})),Object(r.createElement)(g.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(w.a,{setAttributes:t,value:i})),Object(r.createElement)(g.PanelBody,{title:Object(n.__)("Products","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(j,{selected:e.products,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=e.map(e=>{let{id:t}=e;return t});t({products:c})},isCompact:!0})))}renderEditMode(){const{attributes:e,debouncedSpeak:t,setAttributes:c}=this.props;return Object(r.createElement)(g.Placeholder,{icon:Object(r.createElement)(i.a,{srcElement:a}),label:Object(n.__)("Hand-picked Products","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-handpicked-products"},Object(n.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-handpicked-products__selection"},Object(r.createElement)(j,{selected:e.products,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e.map(e=>{let{id:t}=e;return t});c({products:t})}}),Object(r.createElement)(g.Button,{isPrimary:!0,onClick:()=>{c({editMode:!1}),t(Object(n.__)("Showing Hand-picked Products block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}render(){const{attributes:e,name:t,setAttributes:c}=this.props,{editMode:o}=e;return e.isPreview?f.a:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.BlockControls,null,Object(r.createElement)(g.ToolbarGroup,{controls:[{icon:"edit",title:Object(n.__)("Edit selected products","woo-gutenberg-products-block"),onClick:()=>c({editMode:!o}),isActive:o}]})),this.getInspectorControls(),o?this.renderEditMode():Object(r.createElement)(g.Disabled,null,Object(r.createElement)(b.a,{block:t,attributes:e})))}}var y=Object(g.withSpokenMessages)(_);Object(o.registerBlockType)("woocommerce/handpicked-products",{title:Object(n.__)("Hand-picked Products","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{srcElement:a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("Handpicked Products","woo-gutenberg-products-block"),Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a selection of hand-picked products in a grid.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{align:{type:"string"},columns:{type:"number",default:Object(l.getSetting)("default_columns",3)},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},products:{type:"array",default:[]},alignButtons:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:e=>Object(r.createElement)(y,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},58:function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(10),c(3));t.a=e=>{let{onChange:t,settings:c}=e;const{button:l,price:i,rating:s,title:a}=c;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:a?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...c,title:!a})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:i?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...c,price:!i})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...c,rating:!s})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...c,button:!l})}))}},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},8:function(e,t){e.exports=window.React},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(5),n=c.n(r),o=c(0),l=c(1),i=c(3),s=c(478),a=c(480),u=c(4),d=c.n(u),b=c(9),g=c(17),m=c(34),p=c(479),h=c(14);const E=e=>{let{id:t,label:c,popoverContents:r,remove:n,screenReaderLabel:a,className:u=""}=e;const[g,m]=Object(o.useState)(!1),O=Object(b.useInstanceId)(E);if(a=a||c,!c)return null;c=Object(h.decodeEntities)(c);const j=d()("woocommerce-tag",u,{"has-remove":!!n}),w="woocommerce-tag__label-"+O,f=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},a),Object(o.createElement)("span",{"aria-hidden":"true"},c));return Object(o.createElement)("span",{className:j},r?Object(o.createElement)(i.Button,{className:"woocommerce-tag__text",id:w,onClick:()=>m(!0)},f):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:w},f),r&&g&&Object(o.createElement)(i.Popover,{onClose:()=>m(!1)},r),n&&Object(o.createElement)(i.Button,{className:"woocommerce-tag__remove",onClick:n(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":w},Object(o.createElement)(s.a,{icon:p.a,size:20,className:"clear-icon"})))};var O=E;const j=e=>Object(o.createElement)(m.b,e),w=e=>{const{list:t,selected:c,renderItem:r,depth:l=0,onSelect:i,instanceId:s,isSingle:a,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:d,onSelect:i,isSingle:a,search:u,depth:l,controlId:s})),Object(o.createElement)(w,n()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:r,messages:n,onChange:s,onRemove:a}=e;if(t||c||!r)return null;const u=r.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,n.selected(u)),u>0?Object(o.createElement)(i.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":n.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(o.createElement)("ul",null,r.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(O,{label:e.name,id:e.id,remove:a})))):null)},_=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:n,...i}=e;const{messages:u,renderItem:d,selected:b,isSingle:g}=i,m=d||j;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(s.a,{icon:a.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(w,{list:t,selected:b,renderItem:m,onSelect:r,instanceId:n,isSingle:g,search:c}))},y=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:l,isSingle:s,list:a,messages:u=g.a,onChange:m,onSearch:p,selected:h,debouncedSpeak:E}=e,[O,j]=Object(o.useState)(""),w=Object(b.useInstanceId)(y),x=Object(o.useMemo)(()=>({...g.a,...u}),[u]),k=Object(o.useMemo)(()=>Object(g.c)(a,O,r),[a,O,r]);Object(o.useEffect)(()=>{E&&E(x.updated)},[E,x]),Object(o.useEffect)(()=>{"function"==typeof p&&p(O)},[O,p]);const v=Object(o.useCallback)(e=>()=>{s&&m([]);const t=h.findIndex(t=>{let{id:c}=t;return c===e});m([...h.slice(0,t),...h.slice(t+1)])},[s,h,m]),S=Object(o.useCallback)(e=>()=>{-1===h.findIndex(t=>{let{id:c}=t;return c===e.id})?m(s?[e]:[...h,e]):v(e.id)()},[s,v,m,h]);return Object(o.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(o.createElement)(f,n()({},e,{onRemove:v,messages:x})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(i.TextControl,{label:x.search,type:"search",value:O,onChange:e=>j(e)})),l?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(i.Spinner,null)):Object(o.createElement)(_,n()({},e,{search:O,filteredList:k,messages:x,onSelect:S,instanceId:w})))};Object(i.withSpokenMessages)(y)},87:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(3);c(10),t.a=e=>{let{value:t,setAttributes:c}=e;return Object(r.createElement)(o.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>c({orderby:e})})}},9:function(e,t){e.exports=window.wp.compose}}); \ No newline at end of file diff --git a/build/legacy-template.asset.php b/build/legacy-template.asset.php new file mode 100644 index 00000000000..9bd3278b1a7 --- /dev/null +++ b/build/legacy-template.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'bf601244311016af853f968b801cea72'); \ No newline at end of file diff --git a/build/legacy-template.js b/build/legacy-template.js new file mode 100644 index 00000000000..43825f74376 --- /dev/null +++ b/build/legacy-template.js @@ -0,0 +1,3 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["legacy-template"]=function(e){function t(t){for(var r,l,i=t[0],a=t[1],u=t[2],s=0,d=[];s{var t,o,c,p;let{attributes:d}=e;const m=Object(l.useBlockProps)(),b=null!==(t=null===(o=s[d.template])||void 0===o?void 0:o.title)&&void 0!==t?t:d.template,g=null!==(c=null===(p=s[d.template])||void 0===p?void 0:p.placeholder)&&void 0!==c?c:"fallback";return Object(r.createElement)("div",m,Object(r.createElement)(i.Placeholder,{icon:u.a,label:b,className:"wp-block-woocommerce-legacy-template__placeholder"},Object(r.createElement)("div",{className:"wp-block-woocommerce-legacy-template__placeholder-copy"},Object(a.sprintf)( +/* translators: %s is the template title */ +Object(a.__)("This is an editor placeholder for the %s. On your store this will be replaced by the template and display with your product image(s), title, price, etc. You can move this placeholder around and add further blocks around it to extend the template.","woo-gutenberg-products-block"),b)),Object(r.createElement)("div",{className:"wp-block-woocommerce-legacy-template__placeholder-wireframe"},Object(r.createElement)("img",{className:"wp-block-woocommerce-legacy-template__placeholder-image",src:`${n.m}template-placeholders/${g}.svg`,alt:b}))))},save:()=>null})},7:function(e,t){e.exports=window.wp.blockEditor}}); \ No newline at end of file diff --git a/build/mini-cart-component-frontend.asset.php b/build/mini-cart-component-frontend.asset.php new file mode 100644 index 00000000000..efad3b881e8 --- /dev/null +++ b/build/mini-cart-component-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f4846afa97a89f92667f8c7a3fe1186a'); \ No newline at end of file diff --git a/build/mini-cart-component-frontend.js b/build/mini-cart-component-frontend.js new file mode 100644 index 00000000000..cae796e3ab1 --- /dev/null +++ b/build/mini-cart-component-frontend.js @@ -0,0 +1,5 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=205)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{let{country:t="",state:r="",city:n="",postcode:o=""}=e;return{country:t.trim(),state:r.trim(),city:n.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},c=e=>{let{email:t=""}=e;return Object(i.isEmail)(t)?t.trim():""},s=e=>{const t=Object.keys(n.defaultAddressFields),r=Object(o.a)(t,{},e.country),i=Object.assign({},e);return r.forEach(t=>{let{key:r="",hidden:n=!1}=t;n&&((e,t)=>e in t)(r,e)&&(i[r]="")}),i}},119:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),o=r(53),i=r(61),a=r.n(i),c=r(13);const s=(e,t)=>e&&t[e]?t[e]:null,l=e=>{let{block:t,blockMap:r,blockWrapper:o,children:i,depth:u=1}=e;return i&&0!==i.length?Array.from(i).map((e,i)=>{const{blockName:d="",...p}={key:`${t}_${u}_${i}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},m=s(d,r);if(!m){const i=a()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof i&&i)return i;if(!Object(n.isValidElement)(i))return null;const c=e.childNodes.length?l({block:t,blockMap:r,children:e.childNodes,depth:u+1,blockWrapper:o}):void 0;return c?Object(n.cloneElement)(i,p,c):Object(n.cloneElement)(i,p)}const f=o||n.Fragment;return Object(n.createElement)(n.Suspense,{key:`${t}_${u}_${i}_suspense`,fallback:Object(n.createElement)("div",{className:"wc-block-placeholder"})},Object(n.createElement)(f,null,Object(n.createElement)(m,p,l({block:t,blockMap:r,children:e.children,depth:u+1,blockWrapper:o}),((e,t,r,o)=>{if(!Object(c.hasInnerBlocks)(e))return null;const i=r?Array.from(r).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],a=Object(c.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:r}=e;return!0===r&&!i.includes(t)}),l=o||n.Fragment;return Object(n.createElement)(l,null,a.map((e,r)=>{let{blockName:o,component:i}=e;const a=i||s(o,t);return a?Object(n.createElement)(a,{key:`${o}_forced_${r}`}):null}))})(d,r,e.children,o))))}):null},u=e=>{let{Block:t,selector:r,blockName:n,getProps:i=(()=>({})),blockMap:a,blockWrapper:c}=e;Object(o.a)({Block:t,selector:r,getProps:(e,t)=>{const r=l({block:n,blockMap:a,children:e.children||[],blockWrapper:c});return{...i(e,t),children:r}}})}},13:function(e,t){e.exports=window.wc.blocksCheckout},136:function(e,t){},14:function(e,t){e.exports=window.wc.wcBlocksRegistry},15:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},16:function(e,t,r){"use strict";var n=r(15),o=r.n(n),i=r(0),a=r(3),c=r(1),s=r(66),l=e=>{let{imageUrl:t=s.l+"/block-error.svg",header:r=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:a=Object(c.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(i.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(i.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(i.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(i.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(i.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(i.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},a?a+" ":"",o),l&&Object(i.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(37);class u extends a.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(i.createElement)(i.Fragment,null,Object(i.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:a,button:c}=this.props,{errorMessage:s,hasError:u}=this.state;return u?"function"==typeof a?a({errorMessage:s}):Object(i.createElement)(l,{errorMessage:r?s:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:c}):this.props.children}}t.a=u},18:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0);r(9);const o=Object(n.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),i=()=>Object(n.useContext)(o)},19:function(e,t){e.exports=window.wp.htmlEntities},197:function(e,t){},198:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},205:function(e,t,r){"use strict";r.r(t);var n=r(53),o=r(0),i=r(119),a=r(1),c=r(95),s=r(94),l=r(4),u=r.n(l);r(198);var d=e=>{let{children:t,className:r,isOpen:n,onClose:i,slideIn:l=!0,slideOut:d=!0,title:p}=e;const[m]=Object(s.a)(n,300);return n||!n&&m?Object(o.createElement)(c.Modal,{title:p,focusOnMount:!0,onRequestClose:i,className:u()(r,"wc-block-components-drawer"),overlayClassName:u()("wc-block-components-drawer__screen-overlay",{"wc-block-components-drawer__screen-overlay--is-hidden":!n,"wc-block-components-drawer__screen-overlay--with-slide-in":l,"wc-block-components-drawer__screen-overlay--with-slide-out":d}),closeButtonLabel:Object(a.__)("Close mini cart","woo-gutenberg-products-block")},t):null},p=r(22),m=r(67),f=r(14),g=r(40),b=r(2),h=r(35),y=r(98),v=r(24),_=Object(o.createElement)(v.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none"},Object(o.createElement)("g",{clipPath:"url(#clip0)"},Object(o.createElement)("path",{d:"M7.50008 18.3332C7.96032 18.3332 8.33341 17.9601 8.33341 17.4998C8.33341 17.0396 7.96032 16.6665 7.50008 16.6665C7.03984 16.6665 6.66675 17.0396 6.66675 17.4998C6.66675 17.9601 7.03984 18.3332 7.50008 18.3332Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(o.createElement)("path",{d:"M16.6666 18.3332C17.1268 18.3332 17.4999 17.9601 17.4999 17.4998C17.4999 17.0396 17.1268 16.6665 16.6666 16.6665C16.2063 16.6665 15.8333 17.0396 15.8333 17.4998C15.8333 17.9601 16.2063 18.3332 16.6666 18.3332Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(o.createElement)("path",{d:"M0.833252 0.833496H4.16658L6.39992 11.9918C6.47612 12.3755 6.68484 12.7201 6.98954 12.9654C7.29424 13.2107 7.6755 13.341 8.06658 13.3335H16.1666C16.5577 13.341 16.9389 13.2107 17.2436 12.9654C17.5483 12.7201 17.757 12.3755 17.8333 11.9918L19.1666 5.00016H4.99992",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),Object(o.createElement)("defs",null,Object(o.createElement)("clipPath",{id:"clip0"},Object(o.createElement)("rect",{width:"20",height:"20",fill:"white"}))));r(197);var E=e=>{let{count:t,colorClassNames:r,style:n}=e;return Object(o.createElement)("span",{className:"wc-block-mini-cart__quantity-badge"},Object(o.createElement)(y.a,{className:"wc-block-mini-cart__icon",size:20,srcElement:_}),Object(o.createElement)("span",{className:"wc-block-mini-cart__badge "+r,style:n},t))};const k=e=>{let{children:t}=e;return Object(o.createElement)(o.Fragment,null,t)};r(136);const w="woocommerce/mini-cart-contents";var O=e=>{var t,r;let{isInitiallyOpen:n=!1,colorClassNames:c,style:s,contents:l=""}=e;const{cartItemsCount:y,cartIsLoading:v,cartTotals:_}=Object(p.a)(),[O,x]=Object(o.useState)(n),[S,j]=Object(o.useState)(n),[C,T]=Object(o.useState)(null),A=Object(o.useCallback)(e=>{T(e)},[]);Object(o.useEffect)(()=>{if(C instanceof Element){if(!C.querySelector(".wp-block-woocommerce-mini-cart-contents"))return;O&&Object(i.a)({Block:k,blockName:w,selector:".wp-block-woocommerce-mini-cart-contents",blockMap:Object(f.getRegisteredBlockComponents)(w)})}return()=>{if(C instanceof Element&&O){const e=C.querySelector(".wp-block-woocommerce-mini-cart-contents");e&&Object(o.unmountComponentAtNode)(e)}}},[O,C]),Object(o.useEffect)(()=>{const e=()=>{j(!1),x(!0)},t=Object(m.b)("added_to_cart","wc-blocks_added_to_cart");return document.body.addEventListener("wc-blocks_added_to_cart",e),()=>{t(),document.body.removeEventListener("wc-blocks_added_to_cart",e)}},[]);const P=Object(b.getSettingWithCoercion)("displayCartPricesIncludingTax",!1,h.a),R=Object(b.getSettingWithCoercion)("taxLabel","",h.d),M=P?parseInt(_.total_items,10)+parseInt(_.total_items_tax,10):parseInt(_.total_items,10),N=Object(a.sprintf)( +/* translators: %1$d is the number of products in the cart. %2$s is the cart total */ +Object(a._n)("%1$d item in cart, total price of %2$s","%1$d items in cart, total price of %2$s",y,"woo-gutenberg-products-block"),y,Object(g.formatPrice)(M,Object(g.getCurrencyFromPriceResponse)(_))),L={backgroundColor:null==s||null===(t=s.color)||void 0===t?void 0:t.background,color:null==s||null===(r=s.color)||void 0===r?void 0:r.text};return Object(o.createElement)(o.Fragment,null,Object(o.createElement)("button",{className:"wc-block-mini-cart__button "+c,style:L,onClick:()=>{O||(x(!0),j(!1))},"aria-label":N},Object(o.createElement)("span",{className:"wc-block-mini-cart__amount"},Object(g.formatPrice)(M,Object(g.getCurrencyFromPriceResponse)(_))),""!==R&&0!==M&&Object(o.createElement)("small",{className:"wc-block-mini-cart__tax-label"},R),Object(o.createElement)(E,{count:y,colorClassNames:c,style:L})),Object(o.createElement)(d,{className:u()("wc-block-mini-cart__drawer","is-mobile",{"is-loading":v}),title:"",isOpen:O,onClose:()=>{x(!1)},slideIn:!S},Object(o.createElement)("div",{className:"wc-block-mini-cart__template-part",ref:A},Object(o.createElement)(o.RawHTML,null,l))))};(()=>{let e=null;if(document.activeElement&&document.activeElement.classList.contains("wc-block-mini-cart__button")&&document.activeElement.parentNode instanceof HTMLElement&&(e=document.activeElement.parentNode),Object(n.a)({selector:".wc-block-mini-cart",Block:O,getProps:e=>{var t,r;let n="";const o=e.querySelector(".wc-block-mini-cart__button");return null!==o&&(n=o.classList.toString().replace("wc-block-mini-cart__button","")),{isDataOutdated:e.dataset.isDataOutdated,isInitiallyOpen:"true"===e.dataset.isInitiallyOpen,colorClassNames:n,style:e.dataset.style?JSON.parse(e.dataset.style):{},contents:null!==(t=null===(r=e.querySelector(".wc-block-mini-cart__template-part"))||void 0===r?void 0:r.innerHTML)&&void 0!==t?t:"",transparentButton:!1}}}),e instanceof HTMLElement&&!e.dataset.isInitiallyOpen){const t=e.querySelector(".wc-block-mini-cart__button");t instanceof HTMLElement&&t.focus()}})()},22:function(e,t,r){"use strict";r.d(t,"a",(function(){return _}));var n=r(5),o=r(0),i=r(6),a=r(9),c=r(19),s=r(70),l=r(109),u=r(18),d=r(67);const p=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(i.CART_STORE_KEY).invalidateResolutionForStore()},m=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},f=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(d.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(d.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",p),document.body.addEventListener("wc-blocks_removed_from_cart",p),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",p),document.body.removeEventListener("wc-blocks_removed_from_cart",p)}}window.wcBlocksStoreCartListeners.count++})(),m),[])},g={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},b={...g,email:""},h={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:i.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},y=e=>Object(s.a)(Object.entries(e).map(e=>{let[t,r]=e;return[t,Object(c.decodeEntities)(r)]})),v={cartCoupons:i.EMPTY_CART_COUPONS,cartItems:i.EMPTY_CART_ITEMS,cartFees:i.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:i.EMPTY_CART_ITEM_ERRORS,cartTotals:h,cartIsLoading:!0,cartErrors:i.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:g,shippingRates:i.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:i.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:i.EMPTY_EXTENSIONS},_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:r}=Object(u.a)(),c=null==r?void 0:r.previewCart,{shouldSelect:s}=e,d=Object(o.useRef)();f();const p=Object(a.useSelect)((e,r)=>{let{dispatch:n}=r;if(!s)return v;if(t)return{cartCoupons:c.coupons,cartItems:c.items,cartFees:c.fees,cartItemsCount:c.items_count,cartItemsWeight:c.items_weight,cartNeedsPayment:c.needs_payment,cartNeedsShipping:c.needs_shipping,cartItemErrors:i.EMPTY_CART_ITEM_ERRORS,cartTotals:c.totals,cartIsLoading:!1,cartErrors:i.EMPTY_CART_ERRORS,billingAddress:b,shippingAddress:g,extensions:i.EMPTY_EXTENSIONS,shippingRates:c.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:c.has_calculated_shipping,paymentRequirements:c.paymentRequirements,receiveCart:"function"==typeof(null==c?void 0:c.receiveCart)?c.receiveCart:()=>{}};const o=e(i.CART_STORE_KEY),a=o.getCartData(),u=o.getCartErrors(),d=o.getCartTotals(),p=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),{receiveCart:f}=n(i.CART_STORE_KEY),h=y(a.billingAddress),_=a.needsShipping?y(a.shippingAddress):h,E=a.fees.length>0?a.fees.map(e=>y(e)):i.EMPTY_CART_FEES;return{cartCoupons:a.coupons.length>0?a.coupons.map(e=>({...e,label:e.code})):i.EMPTY_CART_COUPONS,cartItems:a.items,cartFees:E,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:d,cartIsLoading:p,cartErrors:u,billingAddress:Object(l.a)(h),shippingAddress:Object(l.a)(_),extensions:a.extensions,shippingRates:a.shippingRates,shippingRatesLoading:m,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:f}},[s]);return d.current&&Object(n.isEqual)(d.current,p)||(d.current=p),d.current}},24:function(e,t){e.exports=window.wp.primitives},3:function(e,t){e.exports=window.React},34:function(e,t){e.exports=window.wp.url},35:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return a})),r.d(t,"a",(function(){return c}));const n=e=>"number"==typeof e,o=e=>"string"==typeof e,i=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function a(e,t){return i(e)&&t in e}const c=e=>"boolean"==typeof e},37:function(e,t){},4:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(i.b)(e.priority)&&(t.index=e.priority),Object(i.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},s=Object.entries(a).map(e=>{let[t,r]=e;return[t,Object.entries(r).map(e=>{let[t,r]=e;return[t,c(r)]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})]}).reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{});t.a=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=r&&void 0!==s[r]?s[r]:{};return e.map(e=>({key:e,...n.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},52:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t,r){var o=this,i=Object(n.useRef)(null),a=Object(n.useRef)(0),c=Object(n.useRef)(null),s=Object(n.useRef)([]),l=Object(n.useRef)(),u=Object(n.useRef)(),d=Object(n.useRef)(e),p=Object(n.useRef)(!0);d.current=e;var m=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var f=!!(r=r||{}).leading,g=!("trailing"in r)||!!r.trailing,b="maxWait"in r,h=b?Math.max(+r.maxWait||0,t):null;return Object(n.useEffect)((function(){return p.current=!0,function(){p.current=!1}}),[]),Object(n.useMemo)((function(){var e=function(e){var t=s.current,r=l.current;return s.current=l.current=null,a.current=e,u.current=d.current.apply(r,t)},r=function(e,t){m&&cancelAnimationFrame(c.current),c.current=m?requestAnimationFrame(e):setTimeout(e,t)},n=function(e){if(!p.current)return!1;var r=e-i.current,n=e-a.current;return!i.current||r>=t||r<0||b&&n>=h},y=function(t){return c.current=null,g&&s.current?e(t):(s.current=l.current=null,u.current)},v=function(){var e=Date.now();if(n(e))return y(e);if(p.current){var o=e-i.current,c=e-a.current,s=t-o,l=b?Math.min(s,h-c):s;r(v,l)}},_=function(){for(var d=[],m=0;m{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:c=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const s=n(e,r),l=c(e,r),u={...e.dataset,...s.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:c={},errorBoundaryProps:s={}}=e;Object(i.render)(Object(i.createElement)(a.a,s,Object(i.createElement)(i.Suspense,{fallback:Object(i.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(i.createElement)(t,o()({},c,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:s,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(c.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:i}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:i}=e;const a=document.body.querySelectorAll(o);i&&i.length>0&&Array.prototype.filter.call(a,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,i)),s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:i,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:i}=e;const a=i.querySelectorAll(o);s({Block:t,containers:a,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},57:function(e,t,r){var n=r(76),o=r(58),i=o.setStyleProp,a=n.html,c=n.svg,s=n.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,r,n,u;e=e||{};var d={};for(t in e)n=e[t],s(t)?d[t]=n:(r=t.toLowerCase(),l.call(a,r)?d[(u=a[r]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!n)||n:l.call(c,t)?d[(u=c[t]).propertyName]=n:o.PRESERVE_CUSTOM_ATTRIBUTES&&(d[t]=n));return i(e.style,d),d}},58:function(e,t,r){var n=r(3),o=r(80).default,i={reactCompat:!0},a=n.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:a,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var r,n,o="function"==typeof t,i={},a={};for(r in e)n=e[r],o&&(i=t(r,n))&&2===i.length?a[i[0]]=i[1]:"string"==typeof n&&(a[n]=r);return a},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,i))}}},59:function(e,t,r){for(var n,o=r(86).CASE_SENSITIVE_TAG_NAMES,i={},a=0,c=o.length;a{let{bubbles:r=!1,cancelable:o=!1,element:i,detail:a={}}=t;if(!n)return;i||(i=document.body);const c=new n(e,{bubbles:r,cancelable:o,detail:a});i.dispatchEvent(c)};let i;const a=()=>{i&&clearTimeout(i),i=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},c=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const i=()=>{o(t,{bubbles:r,cancelable:n})};return jQuery(document).on(e,i),()=>jQuery(document).off(e,i)}},70:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n=e=>e.reduce((e,t)=>{let[r,n]=t;return e[r]=n,e},{})},75:function(e,t,r){var n=r(3),o=r(57),i=r(58),a=i.setStyleProp;function c(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&i.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,r){for(var i,s,l,u,d=(r=r||{}).library||n,p=d.cloneElement,m=d.createElement,f=d.isValidElement,g=[],b="function"==typeof r.replace,h=r.trim,y=0,v=t.length;y1&&(s=p(s,{key:s.key||y})),g.push(s);else if("text"!==i.type){switch(l=i.attribs,c(i)?a(l.style,l):l&&(l=o(l)),u=null,i.type){case"script":case"style":i.children[0]&&(l.dangerouslySetInnerHTML={__html:i.children[0].data});break;case"tag":"textarea"===i.name&&i.children[0]?l.defaultValue=i.children[0].data:i.children&&i.children.length&&(u=e(i.children,r));break;default:continue}v>1&&(l.key=y),g.push(m(i.name,l,u))}else h?i.data.trim()&&g.push(i.data):g.push(i.data);return 1===g.length?g[0]:g}},76:function(e,t,r){var n=r(77),o=r(78),i=r(79),a=i.MUST_USE_PROPERTY,c=i.HAS_BOOLEAN_VALUE,s=i.HAS_NUMERIC_VALUE,l=i.HAS_POSITIVE_NUMERIC_VALUE,u=i.HAS_OVERLOADED_BOOLEAN_VALUE;function d(e,t){return(e&t)===t}function p(e,t,r){var n,o,i,p=e.Properties,m=e.DOMAttributeNames;for(o in p)n=m[o]||(r?o:o.toLowerCase()),i=p[o],t[n]={attributeName:n,propertyName:o,mustUseProperty:d(i,a),hasBooleanValue:d(i,c),hasNumericValue:d(i,s),hasPositiveNumericValue:d(i,l),hasOverloadedBooleanValue:d(i,u)}}var m={};p(n,m);var f={};p(o,f,!0);var g={};p(n,g),p(o,g,!0),e.exports={html:m,svg:f,properties:g,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},77:function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},78:function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},79:function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},80:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=n(r(81)),i=r(83);t.default=function(e,t){var r={};return e&&"string"==typeof e?(o.default(e,(function(e,n){e&&n&&(r[i.camelCase(e,t)]=n)})),r):r}},81:function(e,t,r){var n=r(82);e.exports=function(e,t){var r,o=null;if(!e||"string"!=typeof e)return o;for(var i,a,c=n(e),s="function"==typeof t,l=0,u=c.length;l/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,r=e.match(c);return r&&r[1]&&(t=r[1],a&&(e=e.replace(r[0],""))),i(n(e),null,t)}},85:function(e,t,r){var n=r(59),o=/<([a-zA-Z]+[0-9]?)/,i=//i,a=//i,c=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,s=n.isIE(9),l=s||n.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},d=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var p=new window.DOMParser,m=s?"text/xml":"text/html";u=d=function(e,t){return t&&(e="<"+t+">"+e+""),s&&(e=e.replace(c,"<$1$2$3/>")),p.parseFromString(e,m)}}if(document.implementation){var f=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f;try{return f.documentElement.innerHTML=e,f}catch(t){if(d)return d(e)}}}var g,b=document.createElement("template");b.content&&(g=function(e){return b.innerHTML=e,b.content.childNodes}),e.exports=function(e){var t,r,n,c,s=e.match(o);switch(s&&s[1]&&(t=s[1].toLowerCase()),t){case"html":return r=d(e),i.test(e)||(n=r.getElementsByTagName("head")[0])&&n.parentNode.removeChild(n),a.test(e)||(n=r.getElementsByTagName("body")[0])&&n.parentNode.removeChild(n),r.getElementsByTagName("html");case"head":case"body":return c=u(e).getElementsByTagName(t),a.test(e)&&i.test(e)?c[0].parentNode.childNodes:c;default:return g?g(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},86:function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},9:function(e,t){e.exports=window.wp.data},94:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3),o=r(52);function i(e,t){return e===t}function a(e){return"function"==typeof e?function(){return e}:e}function c(e,t,r){var c=r&&r.equalityFn||i,s=function(e){var t=Object(n.useState)(a(e)),r=t[0],o=t[1];return[r,Object(n.useCallback)((function(e){return o(a(e))}),[])]}(e),l=s[0],u=s[1],d=Object(o.a)(Object(n.useCallback)((function(e){return u(e)}),[u]),t,r),p=Object(n.useRef)(e);return c(p.current,e)||(d(e),p.current=e),[l,d]}},95:function(e,t){e.exports=window.wp.components},98:function(e,t,r){"use strict";var n=r(0);t.a=function(e){let{srcElement:t,size:r=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:r,height:r,...o}):null}}}); \ No newline at end of file diff --git a/build/mini-cart-contents.asset.php b/build/mini-cart-contents.asset.php new file mode 100644 index 00000000000..965ba378ee4 --- /dev/null +++ b/build/mini-cart-contents.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '454bdace93250df1fb1e5111ddfef094'); \ No newline at end of file diff --git a/build/mini-cart-contents.js b/build/mini-cart-contents.js new file mode 100644 index 00000000000..08eb0d21db3 --- /dev/null +++ b/build/mini-cart-contents.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["mini-cart-contents"]=function(e){var t={};function n(c){if(t[c])return t[c].exports;var r=t[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,c){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},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 c=Object.create(null);if(n.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(c,r,function(t){return e[t]}.bind(null,r));return c},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=427)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},12:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.data},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},206:function(e,t,n){"use strict";var c=n(0),r=n(18);const o=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"}));t.a=o},25:function(e,t,n){"use strict";n.d(t,"o",(function(){return o})),n.d(t,"m",(function(){return i})),n.d(t,"l",(function(){return l})),n.d(t,"n",(function(){return u})),n.d(t,"j",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return b})),n.d(t,"k",(function(){return m})),n.d(t,"c",(function(){return p})),n.d(t,"d",(function(){return f})),n.d(t,"h",(function(){return w})),n.d(t,"a",(function(){return O})),n.d(t,"i",(function(){return v})),n.d(t,"b",(function(){return g}));var c,r=n(2);const o=Object(r.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=o.pluginUrl+"images/",l=o.pluginUrl+"build/",u=o.buildPhase,a=null===(c=r.STORE_PAGES.shop)||void 0===c?void 0:c.permalink,s=r.STORE_PAGES.checkout.id,d=r.STORE_PAGES.checkout.permalink,b=r.STORE_PAGES.privacy.permalink,m=(r.STORE_PAGES.privacy.title,r.STORE_PAGES.terms.permalink),p=(r.STORE_PAGES.terms.title,r.STORE_PAGES.cart.id),f=r.STORE_PAGES.cart.permalink,w=(r.STORE_PAGES.myaccount.permalink?r.STORE_PAGES.myaccount.permalink:Object(r.getSetting)("wpLoginUrl","/wp-login.php"),Object(r.getSetting)("shippingCountries",{})),O=Object(r.getSetting)("allowedCountries",{}),v=Object(r.getSetting)("shippingStates",{}),g=Object(r.getSetting)("allowedStates",{})},268:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var c=n(0),r=n(13),o=n(12),i=n(6);const l=e=>{let{clientId:t,registeredBlocks:n,defaultTemplate:l=[]}=e;const u=Object(c.useRef)(n),a=Object(c.useRef)(l),{insertBlock:s,replaceInnerBlocks:d}=Object(r.useDispatch)("core/block-editor"),{innerBlocks:b,registeredBlockTypes:m}=Object(r.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:u.current.map(e=>Object(o.getBlockType)(e))}),[t,u.current]),p=Object(c.useCallback)((e,n)=>{const c=Object(o.createBlock)(e.name);s(c,n,t,!1)},[t,s]),f=Object(c.useMemo)(()=>m.filter(e=>e&&(e=>{var t,n,c;let{attributes:r}=e;return Boolean((null===(t=r.lock)||void 0===t?void 0:t.remove)||(null===(n=r.lock)||void 0===n||null===(c=n.default)||void 0===c?void 0:c.remove))})(e)),[m]);Object(c.useLayoutEffect)(()=>{if(t){if(0===b.length&&a.current.length>0){const e=Object(o.createBlocksFromInnerBlocksTemplate)(a.current);if(!Object(i.isEqual)(e,b))return void d(t,e)}f.forEach(e=>{if(b.find(t=>{let{name:n}=t;return n===e.name}))return;const t=a.current.findIndex(t=>{let[n]=t;return n===e.name});switch(t){case-1:p(e,b.length);break;case 0:p(e,0);break;default:const n=a.current[t-1],c=b.findIndex(e=>{let{name:t}=e;return t===n[0]});p(e,-1===c?t:c+1)}})}},[t,b,f,d,p])}},3:function(e,t){e.exports=window.wp.components},380:function(e,t,n){"use strict";var c=n(0),r=n(18);const o=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("g",{fill:"none",fillRule:"evenodd"},Object(c.createElement)("path",{d:"M0 0h24v24H0z"}),Object(c.createElement)("path",{fill:"currentColor",fillRule:"nonzero",d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49A.996.996 0 0 0 20.01 4H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45ZM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2Zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2Z"}))," ");t.a=o},403:function(e,t,n){"use strict";var c=n(0),r=n(18);const o=Object(c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M22.7 22.7l-20-20L2 2l-.7-.7L0 2.5 4.4 7l2.2 4.7L5.2 14A2 2 0 007 17h7.5l1.3 1.4a2 2 0 102.8 2.8l2.9 2.8 1.2-1.3zM7.4 15a.2.2 0 01-.2-.3l.9-1.7h2.4l2 2h-5zm8.2-2a2 2 0 001.7-1l3.6-6.5.1-.5c0-.6-.4-1-1-1H6.5l9 9zM7 18a2 2 0 100 4 2 2 0 000-4z"}),Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}));t.a=o},427:function(e,t,n){e.exports=n(458)},428:function(e,t){},43:function(e,t,n){"use strict";var c=n(0);t.a=function(e){let{srcElement:t,size:n=24,...r}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:n,height:n,...r}):null}},458:function(e,t,n){"use strict";n.r(t);var c=n(0),r=n(1),o=n(43),i=n(206),l=n(77),u=n(7),a=n(380),s=n(403),d=n(49),b=n(463),m=n(268);n(428);const p=["woocommerce/filled-mini-cart-contents-block","woocommerce/empty-mini-cart-contents-block"],f=[{view:"woocommerce/filled-mini-cart-contents-block",label:Object(r.__)("Filled Mini Cart","woo-gutenberg-products-block"),icon:Object(c.createElement)(o.a,{srcElement:a.a})},{view:"woocommerce/empty-mini-cart-contents-block",label:Object(r.__)("Empty Mini Cart","woo-gutenberg-products-block"),icon:Object(c.createElement)(o.a,{srcElement:s.a})}];const w={apiVersion:2,title:Object(r.__)("Mini Cart Contents","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(o.a,{srcElement:i.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Display a mini cart widget.","woo-gutenberg-products-block"),supports:{align:!1,html:!1,multiple:!1,reusable:!1,inserter:!1,__experimentalExposeControlsToChildren:!0,color:{text:!1}},attributes:{isPreview:{type:"boolean",default:!1,save:!1},lock:{type:"object",default:{remove:!0,move:!0}}},example:{attributes:{isPreview:!0}},edit:e=>{let{clientId:t}=e;const n=Object(u.useBlockProps)(),r=[["woocommerce/filled-mini-cart-contents-block",{},[]],["woocommerce/empty-mini-cart-contents-block",{},[]]],{currentView:o,component:i}=Object(b.a)(t,f);return Object(m.a)({clientId:t,registeredBlocks:p,defaultTemplate:r}),Object(c.createElement)("div",n,Object(c.createElement)(d.a,{currentView:o},Object(c.createElement)(u.BlockControls,{__experimentalShareWithChildBlocks:!0},i),Object(c.createElement)(u.InnerBlocks,{allowedBlocks:p,template:r,templateLock:!1})))},save:()=>Object(c.createElement)("div",u.useBlockProps.save(),Object(c.createElement)(u.InnerBlocks.Content,null))};Object(l.c)("woocommerce/mini-cart-contents",w)},463:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var c=n(0),r=n(1),o=n(13),i=n(3),l=n(43),u=n(18),a=Object(c.createElement)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(c.createElement)("path",{d:"M12 6a9.77 9.77 0 0 1 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0 1 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 0 1 0 5 2.5 2.5 0 0 1 0-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z"})),s=n(7);const d=(e,t)=>{const n=t[0],[u,d]=Object(c.useState)(n),{selectBlock:b}=Object(o.useDispatch)("core/block-editor"),{getBlock:m,getSelectedBlockClientId:p,getBlockParentsByBlockName:f}=Object(o.select)(s.store),w=p();Object(c.useEffect)(()=>{const e=t.map(e=>{let{view:t}=e;return t}),n=f(w,e);if(1!==n.length)return;const c=m(n[0]);if(u.view===c.name)return;const r=t.filter(e=>{let{view:t}=e;return t===c.name});1===r.length&&d(r[0])},[f,w,m,u.view,t]);const O=Object(c.createElement)(i.ToolbarGroup,null,Object(c.createElement)(i.ToolbarDropdownMenu,{label:Object(r.__)("Switch view","woo-gutenberg-products-block"),text:u.label,icon:Object(c.createElement)(l.a,{srcElement:a,style:{marginRight:"8px"}}),controls:t.map(t=>({...t,title:Object(c.createElement)("span",null,t.label),isActive:t.view===u.view,onClick:()=>{var n;d(t),b((null===(n=m(e).innerBlocks.find(e=>e.name===t.view))||void 0===n?void 0:n.clientId)||e)}}))}));return{currentView:u.view,component:O}}},49:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return l}));var c=n(0),r=n(13);const o=Object(c.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),i=()=>Object(c.useContext)(o),l=e=>{let{children:t,currentPostId:n=0,currentView:i="",previewData:l={}}=e;const u=Object(r.useSelect)(e=>n||e("core/editor").getCurrentPostId(),[n]),a=Object(c.useCallback)(e=>e in l?l[e]:{},[l]),s={isEditor:!0,currentPostId:u,currentView:i,previewData:l,getPreviewData:a};return Object(c.createElement)(o.Provider,{value:s},t)}},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},77:function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return i})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var c=n(12),r=n(25);const o=(e,t)=>{if(r.n>2)return Object(c.registerBlockType)(e,t)},i=(e,t)=>{if(r.n>1)return Object(c.registerBlockType)(e,t)},l=()=>r.n>2,u=()=>r.n>1}}); \ No newline at end of file diff --git a/build/mini-cart-frontend.asset.php b/build/mini-cart-frontend.asset.php new file mode 100644 index 00000000000..8813cd44d8b --- /dev/null +++ b/build/mini-cart-frontend.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-polyfill'), 'version' => '0cddc491cfb92acf3aa8848ab49c3ad2'); \ No newline at end of file diff --git a/build/mini-cart-frontend.js b/build/mini-cart-frontend.js new file mode 100644 index 00000000000..45e43aeb689 --- /dev/null +++ b/build/mini-cart-frontend.js @@ -0,0 +1 @@ +!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=195)}({195:function(e,t,n){e.exports=n(210)},2:function(e,t){e.exports=window.wc.wcSettings},210:function(e,t,n){"use strict";n.r(t);var o=n(2),r=e=>{let{handle:t,src:n,version:o}=e;if(0===document.querySelectorAll(`#${t}-js, #${t}-js-prefetch`).length){const e=document.createElement("link");e.href=o?`${n}?ver=${o}`:n,e.rel="preload",e.as="script",e.id=t+"-js-prefetch",document.head.appendChild(e)}},c=n(35);const d=e=>document.querySelectorAll("script#"+e).length>0,i=e=>{if(!Object(c.d)(e.id)||d(e.id))return;const t=document.createElement("script");for(const n in e){if(!e.hasOwnProperty(n))continue;const o=n;if("onload"===o||"onerror"===o)continue;const r=e[o];Object(c.d)(r)&&(t[o]=r)}"function"==typeof e.onload&&(t.onload=e.onload),"function"==typeof e.onerror&&(t.onerror=e.onerror),document.body.appendChild(t)};var a=e=>{let{handle:t,src:n,version:o,after:r,before:c,translations:a}=e;return new Promise((e,s)=>{d(t+"-js")&&e(),a&&i({id:t+"-js-translations",innerHTML:a}),c&&i({id:t+"-js-before",innerHTML:c}),i({id:t+"-js",onerror:s,onload:()=>{r&&i({id:t+"-js-after",innerHTML:r}),e()},src:o?`${n}?ver=${o}`:n})})},s=n(67);window.addEventListener("load",()=>{const e=document.querySelectorAll(".wc-block-mini-cart");let t=!1;if(0===e.length)return;const n=Object(o.getSetting)("mini_cart_block_frontend_dependencies",{});for(const e in n){const t=n[e];r({handle:e,...t})}const c=Object(s.b)("adding_to_cart","wc-blocks_adding_to_cart"),d=Object(s.b)("added_to_cart","wc-blocks_added_to_cart"),i=Object(s.b)("removed_from_cart","wc-blocks_removed_from_cart"),u=async()=>{if(!t){t=!0,document.body.removeEventListener("wc-blocks_adding_to_cart",u),c();for(const e in n){const t=n[e];await a({handle:e,...t})}}};document.body.addEventListener("wc-blocks_adding_to_cart",u),e.forEach((e,n)=>{if(!(e instanceof HTMLElement))return;const o=e.querySelector(".wc-block-mini-cart__button"),r=e.querySelector(".wc-block-components-drawer__screen-overlay");if(!o||!r)return;const c=()=>{t||u(),document.body.removeEventListener("wc-blocks_added_to_cart",s),document.body.removeEventListener("wc-blocks_removed_from_cart",l),d(),i()},a=()=>{e.dataset.isInitiallyOpen="true",r.classList.add("wc-block-components-drawer__screen-overlay--with-slide-in"),r.classList.remove("wc-block-components-drawer__screen-overlay--is-hidden"),c()},s=()=>{e.dataset.isDataOutdated="true",a()},l=()=>{e.dataset.isDataOutdated="true",e.dataset.isInitiallyOpen="false",c()};o.addEventListener("mouseover",u),o.addEventListener("focus",u),o.addEventListener("click",a),0===n&&(document.body.addEventListener("wc-blocks_added_to_cart",s),document.body.addEventListener("wc-blocks_removed_from_cart",l))})})},35:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"d",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return d})),n.d(t,"a",(function(){return i}));const o=e=>"number"==typeof e,r=e=>"string"==typeof e,c=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function d(e,t){return c(e)&&t in e}const i=e=>"boolean"==typeof e},67:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return d})),n.d(t,"b",(function(){return i}));const o=window.CustomEvent||null,r=(e,t)=>{let{bubbles:n=!1,cancelable:r=!1,element:c,detail:d={}}=t;if(!o)return;c||(c=document.body);const i=new o(e,{bubbles:n,cancelable:r,detail:d});c.dispatchEvent(i)};let c;const d=()=>{c&&clearTimeout(c),c=setTimeout(()=>{r("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{r(t,{bubbles:n,cancelable:o})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}}}); \ No newline at end of file diff --git a/build/mini-cart.asset.php b/build/mini-cart.asset.php new file mode 100644 index 00000000000..131297f5fea --- /dev/null +++ b/build/mini-cart.asset.php @@ -0,0 +1 @@ + array('react', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-dom', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'ee2f26b571d51465212f98aed0e74308'); \ No newline at end of file diff --git a/build/mini-cart.js b/build/mini-cart.js new file mode 100644 index 00000000000..44d56d32426 --- /dev/null +++ b/build/mini-cart.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["mini-cart"]=function(e){function t(t){for(var c,l,i=t[0],a=t[1],s=t[2],b=0,d=[];bObject(c.createElement)("div",s()({className:"wc-block-welcome-guide__image",style:{display:"flex",justifyContent:"center",alignItems:"center"}},e),Object(c.createElement)("svg",{height:"120",viewBox:"0 0 170 120",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Object(c.createElement)("g",{filter:"url(#filter0_ddd)"},Object(c.createElement)("rect",{x:"5.5",y:"18",width:"159",height:"96",rx:"3",fill:"white"}),Object(c.createElement)("rect",{x:"24.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"}),Object(c.createElement)("rect",{x:"94.5",y:"4",width:"51",height:"22",rx:"3",fill:"white"})),Object(c.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M48.8908 42H125.078C129.899 42 133.802 45.9231 133.802 50.7692V80C133.802 84.8462 129.899 88.7692 125.078 88.7692H97.756L101.506 98L85.0135 88.7692H48.929C44.1076 88.7692 40.2045 84.8462 40.2045 80V50.7692C40.1662 45.9615 44.0693 42 48.8908 42Z",fill:"#7F54B3"}),Object(c.createElement)("path",{d:"M44.8709 50.723C45.4039 50.0175 46.2033 49.6462 47.2693 49.5719C49.2108 49.4234 50.3149 50.3145 50.5814 52.2453C51.7615 60.0056 53.0559 66.5778 54.4264 71.9617L62.7637 56.4782C63.5251 55.0673 64.4768 54.3246 65.6189 54.2504C67.294 54.139 68.3219 55.1786 68.7406 57.3694C69.6924 62.3077 70.9106 66.5035 72.3573 70.0681C73.3471 60.6369 75.0222 53.8419 77.3825 49.6462C77.9535 48.6065 78.7911 48.0867 79.8951 48.0124C80.7707 47.9382 81.5702 48.1981 82.2935 48.755C83.0168 49.312 83.3975 50.0175 83.4736 50.8715C83.5117 51.5398 83.3975 52.0968 83.0929 52.6538C81.6082 55.3272 80.39 59.82 79.4002 66.0579C78.4484 72.1102 78.1058 76.8258 78.3342 80.2047C78.4104 81.133 78.2581 81.9499 77.8774 82.6553C77.4205 83.4722 76.7353 83.9178 75.8597 83.9921C74.8699 84.0663 73.842 83.6207 72.8522 82.6182C69.3117 79.0908 66.4945 73.8183 64.4388 66.8006C61.9642 71.5533 60.1369 75.1178 58.9567 77.4942C56.7106 81.69 54.8071 83.8435 53.2082 83.9549C52.1803 84.0292 51.3047 83.1752 50.5433 81.3929C48.6017 76.5288 46.5079 67.1347 44.2618 53.2107C44.1476 52.2453 44.3379 51.3913 44.8709 50.723Z",fill:"white"}),Object(c.createElement)("path",{d:"M126.922 56.5426C125.536 54.1968 123.495 52.7819 120.761 52.2234C120.029 52.0745 119.336 52 118.681 52C114.985 52 111.981 53.8617 109.632 57.5851C107.63 60.75 106.629 64.25 106.629 68.0851C106.629 70.9521 107.245 73.4096 108.477 75.4574C109.863 77.8032 111.904 79.2181 114.638 79.7766C115.37 79.9255 116.063 80 116.717 80C120.453 80 123.456 78.1383 125.767 74.4149C127.769 71.2128 128.77 67.7128 128.77 63.8777C128.77 60.9734 128.154 58.5532 126.922 56.5426ZM122.07 66.8564C121.531 69.3138 120.568 71.1383 119.143 72.367C118.027 73.3351 116.987 73.7447 116.024 73.5585C115.1 73.3723 114.33 72.5904 113.752 71.1383C113.29 69.984 113.059 68.8298 113.059 67.75C113.059 66.8192 113.136 65.8883 113.329 65.0319C113.675 63.5053 114.33 62.016 115.37 60.6011C116.64 58.7766 117.988 58.0319 119.374 58.2925C120.299 58.4787 121.069 59.2606 121.646 60.7128C122.108 61.867 122.339 63.0213 122.339 64.1011C122.339 65.0691 122.224 66 122.07 66.8564Z",fill:"white"}),Object(c.createElement)("path",{d:"M102.767 56.5426C101.381 54.1968 99.3018 52.7819 96.6063 52.2234C95.8747 52.0745 95.1816 52 94.5269 52C90.8303 52 87.8267 53.8617 85.4778 57.5851C83.4755 60.75 82.4743 64.25 82.4743 68.0851C82.4743 70.9521 83.0904 73.4096 84.3226 75.4574C85.7089 77.8032 87.7497 79.2181 90.4837 79.7766C91.2153 79.9255 91.9085 80 92.5631 80C96.2983 80 99.3018 78.1383 101.612 74.4149C103.615 71.2128 104.616 67.7128 104.616 63.8777C104.616 60.9734 104 58.5532 102.767 56.5426ZM97.9155 66.8564C97.3765 69.3138 96.4138 71.1383 94.989 72.367C93.8723 73.3351 92.8326 73.7447 91.87 73.5585C90.9458 73.3723 90.1757 72.5904 89.5981 71.1383C89.136 69.984 88.9049 68.8298 88.9049 67.75C88.9049 66.8192 88.9819 65.8883 89.1745 65.0319C89.521 63.5053 90.1757 62.016 91.2153 60.6011C92.4861 58.7766 93.8338 58.0319 95.2201 58.2925C96.1442 58.4787 96.9144 59.2606 97.492 60.7128C97.9541 61.867 98.1851 63.0213 98.1851 64.1011C98.1851 65.0691 98.1081 66 97.9155 66.8564Z",fill:"white"}),Object(c.createElement)("defs",null,Object(c.createElement)("filter",{id:"filter0_ddd",x:"0.5",y:"0",width:"169",height:"120",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Object(c.createElement)("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),Object(c.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(c.createElement)("feOffset",{dy:"1"}),Object(c.createElement)("feGaussianBlur",{stdDeviation:"1.5"}),Object(c.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"}),Object(c.createElement)("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow"}),Object(c.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(c.createElement)("feOffset",{dy:"1"}),Object(c.createElement)("feGaussianBlur",{stdDeviation:"2.5"}),Object(c.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0"}),Object(c.createElement)("feBlend",{mode:"normal",in2:"effect1_dropShadow",result:"effect2_dropShadow"}),Object(c.createElement)("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),Object(c.createElement)("feOffset",{dy:"2"}),Object(c.createElement)("feGaussianBlur",{stdDeviation:"1"}),Object(c.createElement)("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.14 0"}),Object(c.createElement)("feBlend",{mode:"normal",in2:"effect2_dropShadow",result:"effect3_dropShadow"}),Object(c.createElement)("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect3_dropShadow",result:"shape"})))));function b(e){let{blockName:t}=e;const[n,a]=(e=>{const[t,n]=((e,t)=>{const[n,r]=Object(c.useState)(()=>{const n=window.localStorage.getItem(e);if(n)try{return JSON.parse(n)}catch{console.error(`Value for key '${e}' could not be retrieved from localStorage because it can't be parsed.`)}return t});return Object(c.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(n))}catch{console.error(`Value for key '${e}' could not be saved in localStorage because it can't be converted into a string.`)}},[e,n]),[n,r]})("wc-blocks_dismissed_compatibility_notices",i),[r,o]=Object(c.useState)(!1),l=t.includes(e);return Object(c.useEffect)(()=>{o(!l)},[l]),[r,()=>{const c=new Set(t);c.add(e),n([...c])}]})(t);return Object(l.isWpVersion)("5.4","<=")||!n?null:Object(c.createElement)(r.Guide,{className:"wc-block-welcome-guide",contentLabel:Object(o.__)("Compatibility notice","woo-gutenberg-products-block"),onFinish:()=>a(),finishButtonText:Object(o.__)("Got it!","woo-gutenberg-products-block"),pages:[{image:Object(c.createElement)(u,null),content:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("h1",{className:"wc-block-welcome-guide__heading"},Object(o.__)("Compatibility notice","woo-gutenberg-products-block")),Object(c.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(c.createInterpolateElement)(Object(o.__)("This block may not be compatible with all checkout extensions and integrations.","woo-gutenberg-products-block"),{em:Object(c.createElement)("em",null)})),Object(c.createElement)("p",{className:"wc-block-welcome-guide__text"},Object(c.createInterpolateElement)(Object(o.__)("We recommend reviewing our expanding list of compatible extensions prior to using this block on a live store.","woo-gutenberg-products-block"),{a:Object(c.createElement)("a",{href:"https://docs.woocommerce.com/document/cart-checkout-blocks-support-status/",target:"_blank",rel:"noopener noreferrer"})})))}]})}},3:function(e,t){e.exports=window.wp.components},35:function(e,t){e.exports=window.wc.priceFormat},425:function(e,t,n){e.exports=n(451)},426:function(e,t){},43:function(e,t,n){"use strict";var c=n(0);t.a=function(e){let{srcElement:t,size:n=24,...r}=e;return Object(c.isValidElement)(t)?Object(c.cloneElement)(t,{width:n,height:n,...r}):null}},451:function(e,t,n){"use strict";n.r(t);var c=n(0),r=n(1),o=n(43),l=n(206),i=n(77),a=n(7),s=n(35),u=n(269),b=n(3),d=n(2),m=n(488),p=n(489),f=n(490),g=n(4),O=n.n(g),w=n(52),j=n(18),h=Object(c.createElement)(j.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"none"},Object(c.createElement)("g",{clipPath:"url(#clip0)"},Object(c.createElement)("path",{d:"M7.50008 18.3332C7.96032 18.3332 8.33341 17.9601 8.33341 17.4998C8.33341 17.0396 7.96032 16.6665 7.50008 16.6665C7.03984 16.6665 6.66675 17.0396 6.66675 17.4998C6.66675 17.9601 7.03984 18.3332 7.50008 18.3332Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(c.createElement)("path",{d:"M16.6666 18.3332C17.1268 18.3332 17.4999 17.9601 17.4999 17.4998C17.4999 17.0396 17.1268 16.6665 16.6666 16.6665C16.2063 16.6665 15.8333 17.0396 15.8333 17.4998C15.8333 17.9601 16.2063 18.3332 16.6666 18.3332Z",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Object(c.createElement)("path",{d:"M0.833252 0.833496H4.16658L6.39992 11.9918C6.47612 12.3755 6.68484 12.7201 6.98954 12.9654C7.29424 13.2107 7.6755 13.341 8.06658 13.3335H16.1666C16.5577 13.341 16.9389 13.2107 17.2436 12.9654C17.5483 12.7201 17.757 12.3755 17.8333 11.9918L19.1666 5.00016H4.99992",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),Object(c.createElement)("defs",null,Object(c.createElement)("clipPath",{id:"clip0"},Object(c.createElement)("rect",{width:"20",height:"20",fill:"white"}))));n(426);var C=e=>{let{count:t,colorClassNames:n,style:r}=e;return Object(c.createElement)("span",{className:"wc-block-mini-cart__quantity-badge"},Object(c.createElement)(o.a,{className:"wc-block-mini-cart__icon",size:20,srcElement:h}),Object(c.createElement)("span",{className:"wc-block-mini-cart__badge "+n,style:r},t))};const E={apiVersion:2,title:Object(r.__)("Mini Cart","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(o.a,{srcElement:l.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("Display a mini cart widget.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1,color:{__experimentalSkipSerialization:!0},__experimentalSelector:".wc-block-mini-cart__button, .wc-block-mini-cart__badge"},example:{attributes:{isPreview:!0}},attributes:{align:{type:"string",default:"right"},isPreview:{type:"boolean",default:!1,save:!1},transparentButton:{type:"boolean",default:!0}},edit:e=>{var t,n,o,l;let{attributes:i,setAttributes:g}=e;const{transparentButton:j,backgroundColor:h,textColor:E,style:k,align:_}=i,v=Object(a.useBlockProps)({className:O()("wc-block-mini-cart align-"+_,{"is-transparent":j})}),y=Object(d.getSetting)("templatePartEditUri",""),S=Object(a.getColorClassName)("background-color",h),x=Object(a.getColorClassName)("color",E),P={backgroundColor:null==k||null===(t=k.color)||void 0===t?void 0:t.background,color:null==k||null===(n=k.color)||void 0===n?void 0:n.text},B=O()(S,x,{"has-background":S||(null==k||null===(o=k.color)||void 0===o?void 0:o.background),"has-text-color":x||(null==k||null===(l=k.color)||void 0===l?void 0:l.text)});return Object(c.createElement)("div",v,Object(c.createElement)(a.BlockControls,null,Object(c.createElement)(a.AlignmentControl,{value:_,alignmentControls:[{icon:m.a,title:Object(r.__)("Align button left","woo-gutenberg-products-block"),align:"left"},{icon:p.a,title:Object(r.__)("Align button center","woo-gutenberg-products-block"),align:"center"},{icon:f.a,title:Object(r.__)("Align button right","woo-gutenberg-products-block"),align:"right"}],onChange:e=>g({align:e})})),Object(c.createElement)(a.InspectorControls,null,Object(c.createElement)(b.PanelBody,{title:Object(r.__)("Button style","woo-gutenberg-products-block")},Object(c.createElement)(b.ToggleControl,{label:Object(r.__)("Use transparent button","woo-gutenberg-products-block"),checked:j,onChange:()=>g({transparentButton:!j})})),y&&Object(c.createElement)(b.PanelBody,{title:Object(r.__)("Template Editor","woo-gutenberg-products-block")},Object(c.createElement)(b.ExternalLink,{href:y},Object(r.__)("Edit template part","woo-gutenberg-products-block")))),Object(c.createElement)(w.a,null,Object(c.createElement)("button",{className:O()("wc-block-mini-cart__button",B),style:P},Object(c.createElement)("span",{className:"wc-block-mini-cart__amount"},Object(s.formatPrice)(0)),Object(c.createElement)(C,{count:0,colorClassNames:B,style:P}))),Object(c.createElement)(u.a,{blockName:"mini-cart"}))},save:()=>null};Object(i.c)("woocommerce/mini-cart",E)},52:function(e,t,n){"use strict";var c=n(5),r=n.n(c),o=n(0),l=n(80),i=n(116);const a=["BUTTON","FIELDSET","INPUT","OPTGROUP","OPTION","SELECT","TEXTAREA","A"];t.a=e=>{let{children:t,style:n={},...c}=e;const s=Object(o.useRef)(null),u=()=>{s.current&&l.focus.focusable.find(s.current).forEach(e=>{a.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},b=Object(i.a)(u,0,{leading:!0});return Object(o.useLayoutEffect)(()=>{let e;return u(),s.current&&(e=new window.MutationObserver(b),e.observe(s.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),b.cancel()}},[b]),Object(o.createElement)("div",r()({ref:s,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...n}},c),t)}},7:function(e,t){e.exports=window.wp.blockEditor},77:function(e,t,n){"use strict";n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return l})),n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a}));var c=n(12),r=n(25);const o=(e,t)=>{if(r.n>2)return Object(c.registerBlockType)(e,t)},l=(e,t)=>{if(r.n>1)return Object(c.registerBlockType)(e,t)},i=()=>r.n>2,a=()=>r.n>1},8:function(e,t){e.exports=window.React},80:function(e,t){e.exports=window.wp.dom}}); \ No newline at end of file diff --git a/build/price-filter-frontend.asset.php b/build/price-filter-frontend.asset.php new file mode 100644 index 00000000000..e1014501eb4 --- /dev/null +++ b/build/price-filter-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '0e58f47ffb171a05648b51460b45ab8e'); \ No newline at end of file diff --git a/build/price-filter-frontend.js b/build/price-filter-frontend.js new file mode 100644 index 00000000000..c2b1ae1406d --- /dev/null +++ b/build/price-filter-frontend.js @@ -0,0 +1,3 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=179)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1],r="-"===e[0],n=r&&t,o=(e=e.replace("-","")).split("."),a=o[0],c=o[1]||"";return{beforeDecimal:a,afterDecimal:c,hasNagation:r,addNegation:n}}function v(e,t,r){for(var n="",o=r?"0":"",a=0;a<=t-1;a++)n+=e[a]||o;return n}function y(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function O(e,t,r){return Math.min(Math.max(e,t),r)}function w(e){return Math.max(e.selectionStart,e.selectionEnd)}var _={thousandSeparator:f.oneOfType([f.string,f.oneOf([!0])]),decimalSeparator:f.string,allowedDecimalSeparators:f.arrayOf(f.string),thousandsGroupStyle:f.oneOf(["thousand","lakh","wan"]),decimalScale:f.number,fixedDecimalScale:f.bool,displayType:f.oneOf(["input","text"]),prefix:f.string,suffix:f.string,format:f.oneOfType([f.string,f.func]),removeFormatting:f.func,mask:f.oneOfType([f.string,f.arrayOf(f.string)]),value:f.oneOfType([f.number,f.string]),defaultValue:f.oneOfType([f.number,f.string]),isNumericString:f.bool,customInput:f.elementType,allowNegative:f.bool,allowEmptyFormatting:f.bool,allowLeadingZeros:f.bool,onValueChange:f.func,onKeyDown:f.func,onMouseUp:f.func,onChange:f.func,onFocus:f.func,onBlur:f.func,type:f.oneOf(["text","tel","password"]),isAllowed:f.func,renderText:f.func,getInputRef:f.oneOfType([f.func,f.shape({current:f.any})])},j={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:m,onChange:m,onKeyDown:m,onMouseUp:m,onFocus:m,onBlur:m,isAllowed:function(){return!0}},S=function(e){function t(e){var r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=!(n=i(t).call(this,e))||"object"!=typeof n&&"function"!=typeof n?s(this):n;var o=e.defaultValue;r.validateProps();var a=r.formatValueProp(o);return r.state={value:a,numAsString:r.removeFormatting(a)},r.selectionBeforeInput={selectionStart:0,selectionEnd:0},r.onChange=r.onChange.bind(s(r)),r.onKeyDown=r.onKeyDown.bind(s(r)),r.onMouseUp=r.onMouseUp.bind(s(r)),r.onFocus=r.onFocus.bind(s(r)),r.onBlur=r.onBlur.bind(s(r)),r}var r,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),r=t,(n=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,r=this.state,n=this.focusedElm,o=r.value,a=r.numAsString,c=void 0===a?"":a;if(e!==t){this.validateProps();var i=this.formatNumString(c),u=b(t.value)?i:this.formatValueProp(),s=this.removeFormatting(u),l=parseFloat(s),p=parseFloat(c);(isNaN(l)&&isNaN(p)||l===p)&&i===o&&(null!==n||u===o)||this.updateValue({formattedValue:u,numAsString:s,input:n})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,r=this.getSeparators(),n=r.decimalSeparator,o=this.getNumberRegex(!0),a="-"===e[0];a&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var c=(e=(e.match(o)||[]).join("").replace(n,".")).indexOf(".");return-1!==c&&(e="".concat(e.substring(0,c),".").concat(e.substring(c+1,e.length).replace(new RegExp(g(n),"g"),""))),a&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var r=this.props,n=r.format,o=r.decimalScale,a=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!a||0===o||t||n?"":"|"+g(a)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,r=t.thousandSeparator,n=t.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:n}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,r=void 0===t?" ":t;return"string"==typeof r?r:r[e]||" "}},{key:"getValueObject",value:function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),r=t.decimalSeparator,n=t.thousandSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(n,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(r," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,r){y(e,t),setTimeout((function(){e.value===r&&y(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,r){var n=this.props,o=n.prefix,a=n.suffix,c=n.format;if(""===e)return 0;if(t=O(t,0,e.length),!c){var i="-"===e[0];return O(t,o.length+(i?1:0),e.length-a.length)}if("function"==typeof c)return t;if("#"===c[t]&&d(e[t]))return t;if("#"===c[t-1]&&d(e[t-1]))return t;var u=c.indexOf("#");t=O(t,u,c.lastIndexOf("#")+1);for(var s=c.substring(t,c.length).indexOf("#"),l=t,p=t+(-1===s?0:s);l>u&&("#"!==c[l]||!d(e[l]));)l-=1;return!d(e[p])||"left"===r&&t!==u||t-l0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,r=t.format,n=t.allowEmptyFormatting,o=e;return""!==e||n?"-"!==e||r?"string"==typeof r?this.formatWithPattern(o):"function"==typeof r?r(o):this.formatAsNumber(o):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,r=t.format,n=t.decimalScale,o=t.fixedDecimalScale,a=t.allowEmptyFormatting,c=this.props,i=c.value,u=c.isNumericString,s=!(i=b(i)?e:i)&&0!==i;return s&&a&&(i=""),s&&!a?"":("number"==typeof i&&(i=i.toString(),u=!0),"Infinity"===i&&u&&(i=""),u&&!r&&"number"==typeof n&&(i=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,o=h(e),a=o.beforeDecimal,c=o.afterDecimal,i=o.hasNagation,u=parseFloat("0.".concat(c||"0")).toFixed(t).split("."),s=a.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),l=v(u[1]||"",Math.min(t,c.length),r),p=n?".":"";return"".concat(i?"-":"").concat(s).concat(p).concat(l)}(i,n,o)),u?this.formatNumString(i):this.formatInput(i))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),o=r.test(e),a=n.test(e);return e=e.replace(/-/g,""),o&&!a&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var r=this.props,n=r.format,o=r.prefix,a=r.suffix,c=r.decimalScale,i=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e=t.length-a.length||c&&i&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,r){for(var n=e;nr&&o-n>r;)n++;return{start:r,end:o-n}}(t,r),v=g.start,y=g.end;if(!o&&v===y&&-1!==l.indexOf(r[d])){var O=0===u?"":p;return r.substr(0,d)+O+r.substr(d+1,r.length)}var w=o?0:c.length,_=t.length-(o?0:i.length);if(r.length>t.length||!r.length||v===y||0===d&&b===t.length||d===w&&b===_)return r;if(this.checkIfFormatGotDeleted(v,y,t)&&(r=t),!o){var j=this.removeFormatting(r),S=h(j,a),k=S.beforeDecimal,x=S.afterDecimal,E=S.addNegation,P=eO;)y--;y=this.correctCaretPosition(i,y,"left")}}else for(;!g.test(i[y])&&yw)&&(e.preventDefault(),this.setPatchedCaretPosition(r,y,i)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,y,i),d(e)}else d(e)}},{key:"onMouseUp",value:function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,o=t.value,a=void 0===o?"":o;if(r===n){var c=this.correctCaretPosition(a,r);c!==r&&this.setPatchedCaretPosition(t,c,a)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,o=r.selectionEnd,a=r.value,c=void 0===a?"":a,i=t.correctCaretPosition(c,n);i===n||0===n&&o===c.length||t.setPatchedCaretPosition(r,i,c),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,r,n=this.props,a=n.type,i=n.displayType,u=n.customInput,s=n.renderText,l=n.getInputRef,p=n.format,f=this.state.value,m=(e=this.props,t=_,r={},Object.keys(e).forEach((function(n){t[n]||(r[n]=e[n])})),r),d=c({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(p)?"numeric":void 0},m,{type:a,value:f,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===i)return s?s(f)||null:o.a.createElement("span",c({},m,{ref:l}),f);if(u){var b=u;return o.a.createElement(b,c({},d,{ref:l}))}return o.a.createElement("input",c({},d,{ref:l}))}}])&&a(r.prototype,n),t}(o.a.Component);S.propTypes=_,S.defaultProps=j,t.a=S},133:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(0),o=r(94),a=r(5),c=r(17),i=r(39),u=r(64),s=r(25);const l=e=>{let{queryAttribute:t,queryPrices:r,queryStock:l,queryState:p}=e,f=Object(s.a)();f+="-collection-data";const[m]=Object(i.a)(f),[d,b]=Object(i.b)("calculate_attribute_counts",[],f),[g,h]=Object(i.b)("calculate_price_range",null,f),[v,y]=Object(i.b)("calculate_stock_status_counts",null,f),O=Object(c.a)(t||{}),w=Object(c.a)(r),_=Object(c.a)(l);Object(n.useEffect)(()=>{"object"==typeof O&&Object.keys(O).length&&(d.find(e=>e.taxonomy===O.taxonomy)||b([...d,O]))},[O,d,b]),Object(n.useEffect)(()=>{g!==w&&void 0!==w&&h(w)},[w,h,g]),Object(n.useEffect)(()=>{v!==_&&void 0!==_&&y(_)},[_,y,v]);const[j,S]=Object(n.useState)(!1),[k]=Object(o.a)(j,200);j||S(!0);const x=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(a.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:r}=e;return{taxonomy:t,query_type:r}}),["taxonomy","query_type"])),t})(m),[m]);return Object(u.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...p,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...x},shouldSelect:k})}},15:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},159:function(e,t){},16:function(e,t,r){"use strict";var n=r(15),o=r.n(n),a=r(0),c=r(3),i=r(1),u=r(66),s=e=>{let{imageUrl:t=u.l+"/block-error.svg",header:r=Object(i.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(i.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:c=Object(i.__)("Error:","woo-gutenberg-products-block"),button:s}=e;return Object(a.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(a.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(a.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(a.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(a.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(a.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},c?c+" ":"",o),s&&Object(a.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},s)))};r(37);class l extends c.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(a.createElement)(a.Fragment,null,Object(a.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:c,button:i}=this.props,{errorMessage:u,hasError:l}=this.state;return l?"function"==typeof c?c({errorMessage:u}):Object(a.createElement)(s,{errorMessage:r?u:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:i}):this.props.children}}t.a=l},17:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0),o=r(11),a=r.n(o);function c(e){const t=Object(n.useRef)(e);return a()(e,t.current)||(t.current=e),t.current}},179:function(e,t,r){e.exports=r(206)},180:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},206:function(e,t,r){"use strict";r.r(t);var n=r(53),o=r(0),a=r(62),c=r(39),i=r(133),u=r(1),s=r(4),l=r.n(s),p=r(96),f=r(35);r(180);const m=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],[a,c]=e;const i=e=>Number.isFinite(e);return i(a)||(a=t||0),i(c)||(c=r||n),i(t)&&t>a&&(a=t),i(r)&&r<=a&&(a=r-n),i(t)&&t>=c&&(c=t+n),i(r)&&r=c&&(a=c-n),o&&c<=a&&(c=a+n),[a,c]};var d=r(72),b=e=>{let{minPrice:t,maxPrice:r,minConstraint:n,maxConstraint:a,onChange:c=(()=>{}),step:i,currency:s,showInputFields:b=!0,showFilterButton:g=!1,isLoading:h=!1,onSubmit:v=(()=>{})}=e;const y=Object(o.useRef)(null),O=Object(o.useRef)(null),w=i||10*10**s.minorUnit,[_,j]=Object(o.useState)(t),[S,k]=Object(o.useState)(r);Object(o.useEffect)(()=>{j(t)},[t]),Object(o.useEffect)(()=>{k(r)},[r]);const x=Object(o.useMemo)(()=>isFinite(n)&&isFinite(a),[n,a]),E=Object(o.useMemo)(()=>isFinite(t)&&isFinite(r)&&x?{"--low":Math.round((t-n)/(a-n)*100)-.5+"%","--high":Math.round((r-n)/(a-n)*100)+.5+"%"}:{"--low":"0%","--high":"100%"},[t,r,n,a,x]),P=Object(o.useCallback)(e=>{if(h||!x||!y.current||!O.current)return;const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=y.current.offsetWidth,o=+y.current.value,c=O.current.offsetWidth,i=+O.current.value,u=n*(o/a),s=c*(i/a);Math.abs(r-u)>Math.abs(r-s)?(y.current.style.zIndex="20",O.current.style.zIndex="21"):(y.current.style.zIndex="21",O.current.style.zIndex="20")},[h,a,x]),N=Object(o.useCallback)(e=>{const o=e.target.classList.contains("wc-block-price-filter__range-input--min"),i=+e.target.value,u=o?[Math.round(i/w)*w,r]:[t,Math.round(i/w)*w],s=m(u,n,a,w,o);c(s)},[c,t,r,n,a,w]),T=Object(o.useCallback)(e=>{if(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))return;const t=e.target.classList.contains("wc-block-price-filter__amount--min"),r=m([_,S],null,null,w,t);c(r)},[c,w,_,S]),F=l()("wc-block-price-filter","wc-block-components-price-slider",b&&"wc-block-price-filter--has-input-fields",b&&"wc-block-components-price-slider--has-input-fields",g&&"wc-block-price-filter--has-filter-button",g&&"wc-block-components-price-slider--has-filter-button",h&&"is-loading",!x&&"is-disabled"),C=Object(f.c)(y.current)?y.current.ownerDocument.activeElement:void 0,R=C&&C===y.current?w:1,A=C&&C===O.current?w:1,D=String(_/10**s.minorUnit),M=String(S/10**s.minorUnit);return Object(o.createElement)("div",{className:F},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:P,onFocus:P},x&&Object(o.createElement)("div",{"aria-hidden":b},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:E}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":Object(u.__)("Filter products by minimum price","woo-gutenberg-products-block"),"aria-valuetext":D,value:Number.isFinite(t)?t:n,onChange:N,step:R,min:n,max:a,ref:y,disabled:h,tabIndex:b?-1:0}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":Object(u.__)("Filter products by maximum price","woo-gutenberg-products-block"),"aria-valuetext":M,value:Number.isFinite(r)?r:a,onChange:N,step:A,min:n,max:a,ref:O,disabled:h,tabIndex:b?-1:0}))),Object(o.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},b&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(p.a,{currency:s,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--min wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--min","aria-label":Object(u.__)("Filter products by minimum price","woo-gutenberg-products-block"),onValueChange:e=>{e!==_&&j(e)},onBlur:T,disabled:h||!x,value:_}),Object(o.createElement)(p.a,{currency:s,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--max wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--max","aria-label":Object(u.__)("Filter products by maximum price","woo-gutenberg-products-block"),onValueChange:e=>{e!==S&&k(e)},onBlur:T,disabled:h||!x,value:S})),!b&&!h&&Number.isFinite(t)&&Number.isFinite(r)&&Object(o.createElement)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(u.__)("Price","woo-gutenberg-products-block"),":  ",Object(o.createElement)(p.a,{currency:s,value:t})," – ",Object(o.createElement)(p.a,{currency:s,value:r})),g&&Object(o.createElement)(d.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:h||!x,onClick:v,screenReaderLabel:Object(u.__)("Apply price filter","woo-gutenberg-products-block")})))},g=r(52),h=(r(8),r(40));const v=(e,t,r)=>{const n=10*10**t;let o;"ROUND_UP"===r?o=isNaN(e)?null:Math.ceil(parseFloat(e,10)/n)*n:"ROUND_DOWN"===r&&(o=isNaN(e)?null:Math.floor(parseFloat(e,10)/n)*n);const c=Object(a.a)(o,Number.isFinite);return Number.isFinite(o)?o:c};Object(n.a)({selector:".wp-block-woocommerce-price-filter",Block:e=>{let{attributes:t,isEditor:r=!1}=e;const[n,u]=Object(c.b)("min_price",null),[s,l]=Object(c.b)("max_price",null),[p]=Object(c.a)(),{results:f,isLoading:m}=Object(i.a)({queryPrices:!0,queryState:p}),[d,y]=Object(o.useState)(),[O,w]=Object(o.useState)(),_=Object(h.getCurrencyFromPriceResponse)(f.price_range),{minConstraint:j,maxConstraint:S}=(e=>{let{minPrice:t,maxPrice:r,minorUnit:n}=e;return{minConstraint:v(t,n,"ROUND_DOWN"),maxConstraint:v(r,n,"ROUND_UP")}})({minPrice:f.price_range?f.price_range.min_price:void 0,maxPrice:f.price_range?f.price_range.max_price:void 0,minorUnit:_.minorUnit}),k=Object(o.useCallback)((e,t)=>{u(e===j?void 0:e),l(t===S?void 0:t)},[j,S,u,l]),x=Object(g.a)(k,500),E=Object(o.useCallback)(e=>{e[0]!==d&&y(e[0]),e[1]!==O&&w(e[1])},[d,O,y,w]);Object(o.useEffect)(()=>{t.showFilterButton||x(d,O)},[d,O,t.showFilterButton,x]);const P=Object(a.a)(n),N=Object(a.a)(s),T=Object(a.a)(j),F=Object(a.a)(S);if(Object(o.useEffect)(()=>{(!Number.isFinite(d)||n!==P&&n!==d||j!==T&&j!==d)&&y(Number.isFinite(n)?n:j),(!Number.isFinite(O)||s!==N&&s!==O||S!==F&&S!==O)&&w(Number.isFinite(s)?s:S)},[d,O,n,s,j,S,T,F,P,N]),!m&&(null===j||null===S||j===S))return null;const C="h"+t.headingLevel;return Object(o.createElement)(o.Fragment,null,!r&&t.heading&&Object(o.createElement)(C,{className:"wc-block-price-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-price-slider"},Object(o.createElement)(b,{minConstraint:j,maxConstraint:S,minPrice:d,maxPrice:O,currency:_,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:E,onSubmit:()=>k(d,O),isLoading:m})))},getProps:e=>({attributes:{showInputFields:"true"===e.dataset.showinputfields,showFilterButton:"true"===e.dataset.showfilterbutton},isEditor:!1})})},21:function(e,t,r){"use strict";var n=r(0),o=r(4),a=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:c,wrapperProps:i={}}=e;const u=null!=r,s=null!=o;return!u&&s?(t=c||"span",i={...i,className:a()(i.className,"screen-reader-text")},Object(n.createElement)(t,i,o)):(t=c||n.Fragment,u&&s&&r!==o?Object(n.createElement)(t,i,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,i,r))}},25:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(0);const o=Object(n.createContext)("page"),a=()=>Object(n.useContext)(o);o.Provider},3:function(e,t){e.exports=window.React},35:function(e,t,r){"use strict";r.d(t,"b",(function(){return n})),r.d(t,"d",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"e",(function(){return c})),r.d(t,"a",(function(){return i}));const n=e=>"number"==typeof e,o=e=>"string"==typeof e,a=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function c(e,t){return a(e)&&t in e}const i=e=>"boolean"==typeof e},37:function(e,t){},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return f})),r.d(t,"c",(function(){return m}));var n=r(6),o=r(9),a=r(0),c=r(11),i=r.n(c),u=r(17),s=r(62),l=r(25);const p=e=>{const t=Object(l.a)();e=e||t;const r=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:c}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(a.useCallback)(t=>{c(e,t)},[e,c])]},f=(e,t,r)=>{const c=Object(l.a)();r=r||c;const i=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:u}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[i,Object(a.useCallback)(t=>{u(r,e,t)},[r,e,u])]},m=(e,t)=>{const r=Object(l.a)();t=t||r;const[n,o]=p(t),c=Object(u.a)(n),f=Object(u.a)(e),m=Object(s.a)(f),d=Object(a.useRef)(!1);return Object(a.useEffect)(()=>{i()(m,f)||(o(Object.assign({},c,f)),d.current=!0)},[c,f,m,o]),d.current?[n,o]:[e,o]}},4:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t=t||r<0||g&&n>=h},v=function(t){return i.current=null,b&&u.current?e(t):(u.current=s.current=null,l.current)},y=function(){var e=Date.now();if(n(e))return v(e);if(f.current){var o=e-a.current,i=e-c.current,u=t-o,s=g?Math.min(u,h-i):u;r(y,s)}},O=function(){for(var p=[],m=0;m{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:i=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const u=n(e,r),s=i(e,r),l={...e.dataset,...u.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:i={},errorBoundaryProps:u={}}=e;Object(a.render)(Object(a.createElement)(c.a,u,Object(a.createElement)(a.Suspense,{fallback:Object(a.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(a.createElement)(t,o()({},i,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:u,attributes:l,errorBoundaryProps:s})})},s=e=>{const t=document.body.querySelectorAll(i.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:a}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:a}=e;const c=document.body.querySelectorAll(o);a&&a.length>0&&Array.prototype.filter.call(c,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,a)),u({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:a,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:a}=e;const c=a.querySelectorAll(o);u({Block:t,containers:c,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},54:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},6:function(e,t){e.exports=window.wc.wcBlocksData},62:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3);function o(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},64:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(6),o=r(9),a=r(0),c=r(17),i=r(54);const u=e=>{const{namespace:t,resourceName:r,resourceValues:u=[],query:s={},shouldSelect:l=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const p=Object(a.useRef)({results:[],isLoading:!0}),f=Object(c.a)(s),m=Object(c.a)(u),d=Object(i.a)(),b=Object(o.useSelect)(e=>{if(!l)return null;const o=e(n.COLLECTIONS_STORE_KEY),a=[t,r,f,m],c=o.getCollectionError(...a);return c&&d(c),{results:o.getCollection(...a),isLoading:!o.hasFinishedResolution("getCollection",a)}},[t,r,m,f,l]);return null!==b&&(p.current=b),p.current}},66:function(e,t,r){"use strict";r.d(t,"n",(function(){return a})),r.d(t,"l",(function(){return c})),r.d(t,"k",(function(){return i})),r.d(t,"m",(function(){return u})),r.d(t,"i",(function(){return s})),r.d(t,"d",(function(){return l})),r.d(t,"f",(function(){return p})),r.d(t,"j",(function(){return f})),r.d(t,"c",(function(){return m})),r.d(t,"e",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return v}));var n,o=r(2);const a=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),c=a.pluginUrl+"images/",i=a.pluginUrl+"build/",u=a.buildPhase,s=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,l=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),p=o.STORE_PAGES.privacy.permalink,f=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),d=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),b=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},72:function(e,t,r){"use strict";var n=r(0),o=r(1),a=(r(8),r(4)),c=r.n(a),i=r(21);r(102);const u=e=>{let{className:t,disabled:r,label: +/* translators: Submit button text for filters. */ +a=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:u,screenReaderLabel:s=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:c()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:r,onClick:u},Object(n.createElement)(i.a,{label:a,screenReaderLabel:s}))};u.defaultProps={disabled:!1},t.a=u},8:function(e,t,r){e.exports=r(42)()},9:function(e,t){e.exports=window.wp.data},94:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),o=r(52);function a(e,t){return e===t}function c(e){return"function"==typeof e?function(){return e}:e}function i(e,t,r){var i=r&&r.equalityFn||a,u=function(e){var t=Object(n.useState)(c(e)),r=t[0],o=t[1];return[r,Object(n.useCallback)((function(e){return o(c(e))}),[])]}(e),s=u[0],l=u[1],p=Object(o.a)(Object(n.useCallback)((function(e){return l(e)}),[l]),t,r),f=Object(n.useRef)(e);return i(f.current,e)||(p(e),f.current=e),[s,p]}},96:function(e,t,r){"use strict";var n=r(10),o=r.n(n),a=r(0),c=r(131),i=r(4),u=r.n(i);r(159);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:r,currency:n,onValueChange:i,displayType:l="text",...p}=e;const f="string"==typeof r?parseInt(r,10):r;if(!Number.isFinite(f))return null;const m=f/10**n.minorUnit;if(!Number.isFinite(m))return null;const d=u()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),b={...p,...s(n),value:void 0,currency:void 0,onValueChange:void 0},g=i?e=>{const t=+e.value*10**n.minorUnit;i(t)}:()=>{};return Object(a.createElement)(c.a,o()({className:d,displayType:l},b,{value:m,onValueChange:g}))}}}); \ No newline at end of file diff --git a/build/price-filter.asset.php b/build/price-filter.asset.php new file mode 100644 index 00000000000..34f09a8bf56 --- /dev/null +++ b/build/price-filter.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-price-format', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => 'ac0e06f7ce4994e68382045300e3c441'); \ No newline at end of file diff --git a/build/price-filter.js b/build/price-filter.js new file mode 100644 index 00000000000..3104a3079b3 --- /dev/null +++ b/build/price-filter.js @@ -0,0 +1,5 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["price-filter"]=function(e){function t(t){for(var n,i,l=t[0],a=t[1],s=t[2],b=0,p=[];b{let{className:t,headingLevel:c,onChange:o,heading:l,instanceId:a}=e;const s="h"+c;return Object(n.createElement)(s,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+a},Object(i.__)("Block title","woo-gutenberg-products-block")),Object(n.createElement)(r.PlainText,{id:"block-title-"+a,className:"wc-block-editor-components-title",value:l,onChange:o}))})},108:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(8);function r(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},113:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(16),r=c(13),o=c(0),i=c(40),l=c(93);const a=e=>{const{namespace:t,resourceName:c,resourceValues:a=[],query:s={},shouldSelect:u=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),p=Object(i.a)(s),d=Object(i.a)(a),m=Object(l.a)(),f=Object(r.useSelect)(e=>{if(!u)return null;const r=e(n.COLLECTIONS_STORE_KEY),o=[t,c,p,d],i=r.getCollectionError(...o);return i&&m(i),{results:r.getCollection(...o),isLoading:!r.hasFinishedResolution("getCollection",o)}},[t,c,d,p,u]);return null!==f&&(b.current=f),b.current}},12:function(e,t){e.exports=window.wp.blocks},120:function(e,t,c){"use strict";var n=c(0),r=c(18);const o=Object(n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(n.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(n.createElement)("g",{mask:"url(#external-mask)"},Object(n.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=o},13:function(e,t){e.exports=window.wp.data},133:function(e,t,c){"use strict";var n=c(0),r=c(1),o=(c(10),c(4)),i=c.n(o),l=c(30);c(169);const a=e=>{let{className:t,disabled:c,label: +/* translators: Submit button text for filters. */ +o=Object(r.__)("Go","woo-gutenberg-products-block"),onClick:a,screenReaderLabel:s=Object(r.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:i()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:c,onClick:a},Object(n.createElement)(l.a,{label:o,screenReaderLabel:s}))};a.defaultProps={disabled:!1},t.a=a},138:function(e,t){},143:function(e,t){},16:function(e,t){e.exports=window.wc.wcBlocksData},169:function(e,t){},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},205:function(e,t,c){"use strict";var n=c(0),r=c(18);const o=Object(n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M11 17h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4V8h-2V7h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1zm9-13H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4V6h16v12z"}));t.a=o},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return i})),c.d(t,"l",(function(){return l})),c.d(t,"n",(function(){return a})),c.d(t,"j",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return b})),c.d(t,"g",(function(){return p})),c.d(t,"k",(function(){return d})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return f})),c.d(t,"h",(function(){return g})),c.d(t,"a",(function(){return O})),c.d(t,"i",(function(){return h})),c.d(t,"b",(function(){return w}));var n,r=c(2);const o=Object(r.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=o.pluginUrl+"images/",l=o.pluginUrl+"build/",a=o.buildPhase,s=null===(n=r.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,u=r.STORE_PAGES.checkout.id,b=r.STORE_PAGES.checkout.permalink,p=r.STORE_PAGES.privacy.permalink,d=(r.STORE_PAGES.privacy.title,r.STORE_PAGES.terms.permalink),m=(r.STORE_PAGES.terms.title,r.STORE_PAGES.cart.id),f=r.STORE_PAGES.cart.permalink,g=(r.STORE_PAGES.myaccount.permalink?r.STORE_PAGES.myaccount.permalink:Object(r.getSetting)("wpLoginUrl","/wp-login.php"),Object(r.getSetting)("shippingCountries",{})),O=Object(r.getSetting)("allowedCountries",{}),h=Object(r.getSetting)("shippingStates",{}),w=Object(r.getSetting)("allowedStates",{})},26:function(e,t){e.exports=window.wp.isShallowEqual},267:function(e,t,c){"use strict";c.d(t,"a",(function(){return u}));var n=c(0),r=c(243),o=c(6),i=c(40),l=c(71),a=c(113),s=c(48);const u=e=>{let{queryAttribute:t,queryPrices:c,queryStock:u,queryState:b}=e,p=Object(s.a)();p+="-collection-data";const[d]=Object(l.a)(p),[m,f]=Object(l.b)("calculate_attribute_counts",[],p),[g,O]=Object(l.b)("calculate_price_range",null,p),[h,w]=Object(l.b)("calculate_stock_status_counts",null,p),j=Object(i.a)(t||{}),_=Object(i.a)(c),v=Object(i.a)(u);Object(n.useEffect)(()=>{"object"==typeof j&&Object.keys(j).length&&(m.find(e=>e.taxonomy===j.taxonomy)||f([...m,j]))},[j,m,f]),Object(n.useEffect)(()=>{g!==_&&void 0!==_&&O(_)},[_,O,g]),Object(n.useEffect)(()=>{h!==v&&void 0!==v&&w(v)},[v,w,h]);const[k,E]=Object(n.useState)(!1),[y]=Object(r.a)(k,200);k||E(!0);const x=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(o.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:c}=e;return{taxonomy:t,query_type:c}}),["taxonomy","query_type"])),t})(d),[d]);return Object(a.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...x},shouldSelect:y})}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,c){"use strict";var n=c(0),r=c(4),o=c.n(r);t.a=e=>{let t,{label:c,screenReaderLabel:r,wrapperElement:i,wrapperProps:l={}}=e;const a=null!=c,s=null!=r;return!a&&s?(t=i||"span",l={...l,className:o()(l.className,"screen-reader-text")},Object(n.createElement)(t,l,r)):(t=i||n.Fragment,a&&s&&c!==r?Object(n.createElement)(t,l,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},r)):Object(n.createElement)(t,l,c))}},35:function(e,t){e.exports=window.wc.priceFormat},364:function(e,t,c){e.exports=c(440)},365:function(e,t){},366:function(e,t){},40:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var n=c(0),r=c(26),o=c.n(r);function i(e){const t=Object(n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},41:function(e,t,c){"use strict";var n=c(5),r=c.n(n),o=c(0),i=c(132),l=c(4),a=c.n(l);c(138);const s=e=>({thousandSeparator:e.thousandSeparator,decimalSeparator:e.decimalSeparator,decimalScale:e.minorUnit,fixedDecimalScale:!0,prefix:e.prefix,suffix:e.suffix,isNumericString:!0});t.a=e=>{let{className:t,value:c,currency:n,onValueChange:l,displayType:u="text",...b}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const d=p/10**n.minorUnit;if(!Number.isFinite(d))return null;const m=a()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),f={...b,...s(n),value:void 0,currency:void 0,onValueChange:void 0},g=l?e=>{const t=+e.value*10**n.minorUnit;l(t)}:()=>{};return Object(o.createElement)(i.a,r()({className:m,displayType:u},f,{value:d,onValueChange:g}))}},43:function(e,t,c){"use strict";var n=c(0);t.a=function(e){let{srcElement:t,size:c=24,...r}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:c,height:c,...r}):null}},440:function(e,t,c){"use strict";c.r(t);var n=c(5),r=c.n(n),o=c(0),i=c(1),l=c(12),a=c(4),s=c.n(a),u=c(43),b=c(205),p=c(7),d=c(3),m=c(2),f=c(25),g=c(89),O=c(106),h=c(55),w=c(120),j=c(108),_=c(71),v=c(267),k=c(41),E=c(85);c(366);const y=function(e,t,c){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],[o,i]=e;const l=e=>Number.isFinite(e);return l(o)||(o=t||0),l(i)||(i=c||n),l(t)&&t>o&&(o=t),l(c)&&c<=o&&(o=c-n),l(t)&&t>=i&&(i=t+n),l(c)&&c=i&&(o=i-n),r&&i<=o&&(i=o+n),[o,i]};var x=c(133),S=e=>{let{minPrice:t,maxPrice:c,minConstraint:n,maxConstraint:r,onChange:l=(()=>{}),step:a,currency:u,showInputFields:b=!0,showFilterButton:p=!1,isLoading:d=!1,onSubmit:m=(()=>{})}=e;const f=Object(o.useRef)(null),g=Object(o.useRef)(null),O=a||10*10**u.minorUnit,[h,w]=Object(o.useState)(t),[j,_]=Object(o.useState)(c);Object(o.useEffect)(()=>{w(t)},[t]),Object(o.useEffect)(()=>{_(c)},[c]);const v=Object(o.useMemo)(()=>isFinite(n)&&isFinite(r),[n,r]),S=Object(o.useMemo)(()=>isFinite(t)&&isFinite(c)&&v?{"--low":Math.round((t-n)/(r-n)*100)-.5+"%","--high":Math.round((c-n)/(r-n)*100)+.5+"%"}:{"--low":"0%","--high":"100%"},[t,c,n,r,v]),C=Object(o.useCallback)(e=>{if(d||!v||!f.current||!g.current)return;const t=e.target.getBoundingClientRect(),c=e.clientX-t.left,n=f.current.offsetWidth,o=+f.current.value,i=g.current.offsetWidth,l=+g.current.value,a=n*(o/r),s=i*(l/r);Math.abs(c-a)>Math.abs(c-s)?(f.current.style.zIndex="20",g.current.style.zIndex="21"):(f.current.style.zIndex="21",g.current.style.zIndex="20")},[d,r,v]),N=Object(o.useCallback)(e=>{const o=e.target.classList.contains("wc-block-price-filter__range-input--min"),i=+e.target.value,a=o?[Math.round(i/O)*O,c]:[t,Math.round(i/O)*O],s=y(a,n,r,O,o);l(s)},[l,t,c,n,r,O]),F=Object(o.useCallback)(e=>{if(e.relatedTarget&&e.relatedTarget.classList&&e.relatedTarget.classList.contains("wc-block-price-filter__amount"))return;const t=e.target.classList.contains("wc-block-price-filter__amount--min"),c=y([h,j],null,null,O,t);l(c)},[l,O,h,j]),P=s()("wc-block-price-filter","wc-block-components-price-slider",b&&"wc-block-price-filter--has-input-fields",b&&"wc-block-components-price-slider--has-input-fields",p&&"wc-block-price-filter--has-filter-button",p&&"wc-block-components-price-slider--has-filter-button",d&&"is-loading",!v&&"is-disabled"),T=Object(E.b)(f.current)?f.current.ownerDocument.activeElement:void 0,R=T&&T===f.current?O:1,V=T&&T===g.current?O:1,L=String(h/10**u.minorUnit),B=String(j/10**u.minorUnit);return Object(o.createElement)("div",{className:P},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-wrapper wc-block-components-price-slider__range-input-wrapper",onMouseMove:C,onFocus:C},v&&Object(o.createElement)("div",{"aria-hidden":b},Object(o.createElement)("div",{className:"wc-block-price-filter__range-input-progress wc-block-components-price-slider__range-input-progress",style:S}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--min wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--min","aria-label":Object(i.__)("Filter products by minimum price","woo-gutenberg-products-block"),"aria-valuetext":L,value:Number.isFinite(t)?t:n,onChange:N,step:R,min:n,max:r,ref:f,disabled:d,tabIndex:b?-1:0}),Object(o.createElement)("input",{type:"range",className:"wc-block-price-filter__range-input wc-block-price-filter__range-input--max wc-block-components-price-slider__range-input wc-block-components-price-slider__range-input--max","aria-label":Object(i.__)("Filter products by maximum price","woo-gutenberg-products-block"),"aria-valuetext":B,value:Number.isFinite(c)?c:r,onChange:N,step:V,min:n,max:r,ref:g,disabled:d,tabIndex:b?-1:0}))),Object(o.createElement)("div",{className:"wc-block-price-filter__controls wc-block-components-price-slider__controls"},b&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(k.a,{currency:u,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--min wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--min","aria-label":Object(i.__)("Filter products by minimum price","woo-gutenberg-products-block"),onValueChange:e=>{e!==h&&w(e)},onBlur:F,disabled:d||!v,value:h}),Object(o.createElement)(k.a,{currency:u,displayType:"input",className:"wc-block-price-filter__amount wc-block-price-filter__amount--max wc-block-form-text-input wc-block-components-price-slider__amount wc-block-components-price-slider__amount--max","aria-label":Object(i.__)("Filter products by maximum price","woo-gutenberg-products-block"),onValueChange:e=>{e!==j&&_(e)},onBlur:F,disabled:d||!v,value:j})),!b&&!d&&Number.isFinite(t)&&Number.isFinite(c)&&Object(o.createElement)("div",{className:"wc-block-price-filter__range-text wc-block-components-price-slider__range-text"},Object(i.__)("Price","woo-gutenberg-products-block"),":  ",Object(o.createElement)(k.a,{currency:u,value:t})," – ",Object(o.createElement)(k.a,{currency:u,value:c})),p&&Object(o.createElement)(x.a,{className:"wc-block-price-filter__button wc-block-components-price-slider__button",disabled:d||!v,onClick:m,screenReaderLabel:Object(i.__)("Apply price filter","woo-gutenberg-products-block")})))},C=c(116),N=(c(10),c(35));const F=(e,t,c)=>{const n=10*10**t;let r;"ROUND_UP"===c?r=isNaN(e)?null:Math.ceil(parseFloat(e,10)/n)*n:"ROUND_DOWN"===c&&(r=isNaN(e)?null:Math.floor(parseFloat(e,10)/n)*n);const o=Object(j.a)(r,Number.isFinite);return Number.isFinite(r)?r:o};var P=e=>{let{attributes:t,isEditor:c=!1}=e;const[n,r]=Object(_.b)("min_price",null),[i,l]=Object(_.b)("max_price",null),[a]=Object(_.a)(),{results:s,isLoading:u}=Object(v.a)({queryPrices:!0,queryState:a}),[b,p]=Object(o.useState)(),[d,m]=Object(o.useState)(),f=Object(N.getCurrencyFromPriceResponse)(s.price_range),{minConstraint:g,maxConstraint:O}=(e=>{let{minPrice:t,maxPrice:c,minorUnit:n}=e;return{minConstraint:F(t,n,"ROUND_DOWN"),maxConstraint:F(c,n,"ROUND_UP")}})({minPrice:s.price_range?s.price_range.min_price:void 0,maxPrice:s.price_range?s.price_range.max_price:void 0,minorUnit:f.minorUnit}),h=Object(o.useCallback)((e,t)=>{r(e===g?void 0:e),l(t===O?void 0:t)},[g,O,r,l]),w=Object(C.a)(h,500),k=Object(o.useCallback)(e=>{e[0]!==b&&p(e[0]),e[1]!==d&&m(e[1])},[b,d,p,m]);Object(o.useEffect)(()=>{t.showFilterButton||w(b,d)},[b,d,t.showFilterButton,w]);const E=Object(j.a)(n),y=Object(j.a)(i),x=Object(j.a)(g),P=Object(j.a)(O);if(Object(o.useEffect)(()=>{(!Number.isFinite(b)||n!==E&&n!==b||g!==x&&g!==b)&&p(Number.isFinite(n)?n:g),(!Number.isFinite(d)||i!==y&&i!==d||O!==P&&O!==d)&&m(Number.isFinite(i)?i:O)},[b,d,n,i,g,O,x,P,E,y]),!u&&(null===g||null===O||g===O))return null;const T="h"+t.headingLevel;return Object(o.createElement)(o.Fragment,null,!c&&t.heading&&Object(o.createElement)(T,{className:"wc-block-price-filter__title"},t.heading),Object(o.createElement)("div",{className:"wc-block-price-slider"},Object(o.createElement)(S,{minConstraint:g,maxConstraint:O,minPrice:b,maxPrice:d,currency:f,showInputFields:t.showInputFields,showFilterButton:t.showFilterButton,onChange:k,onSubmit:()=>h(b,d),isLoading:u})))};c(365),Object(l.registerBlockType)("woocommerce/price-filter",{title:Object(i.__)("Filter Products by Price","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(u.a,{srcElement:b.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(i.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(i.__)("Allow customers to filter the products by choosing a lower or upper price limit. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{},attributes:{showInputFields:{type:"boolean",default:!0},showFilterButton:{type:"boolean",default:!1},heading:{type:"string",default:Object(i.__)("Filter by price","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3}},edit:function(e){let{attributes:t,setAttributes:c}=e;const{className:n,heading:r,headingLevel:l,showInputFields:a,showFilterButton:j}=t;return Object(o.createElement)(o.Fragment,null,0===f.o.productCount?Object(o.createElement)(d.Placeholder,{className:"wc-block-price-slider",icon:Object(o.createElement)(u.a,{srcElement:b.a}),label:Object(i.__)("Filter Products by Price","woo-gutenberg-products-block"),instructions:Object(i.__)("Display a slider to filter products in your store by price.","woo-gutenberg-products-block")},Object(o.createElement)("p",null,Object(i.__)("Products with prices are needed for filtering by price. You haven't created any products yet.","woo-gutenberg-products-block")),Object(o.createElement)(d.Button,{className:"wc-block-price-slider__add-product-button",isSecondary:!0,href:Object(m.getAdminLink)("post-new.php?post_type=product")},Object(i.__)("Add new product","woo-gutenberg-products-block")+" ",Object(o.createElement)(u.a,{srcElement:w.a})),Object(o.createElement)(d.Button,{className:"wc-block-price-slider__read_more_button",isTertiary:!0,href:"https://docs.woocommerce.com/document/managing-products/"},Object(i.__)("Learn more","woo-gutenberg-products-block"))):Object(o.createElement)("div",{className:s()(n,"wp-block-woocommerce-price-filter")},Object(o.createElement)(p.InspectorControls,{key:"inspector"},Object(o.createElement)(d.PanelBody,{title:Object(i.__)("Block Settings","woo-gutenberg-products-block")},Object(o.createElement)(h.a,{label:Object(i.__)("Price Range","woo-gutenberg-products-block"),value:a?"editable":"text",options:[{label:Object(i.__)("Editable","woo-gutenberg-products-block"),value:"editable"},{label:Object(i.__)("Text","woo-gutenberg-products-block"),value:"text"}],onChange:e=>c({showInputFields:"editable"===e})}),Object(o.createElement)(d.ToggleControl,{label:Object(i.__)("Filter button","woo-gutenberg-products-block"),help:j?Object(i.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(i.__)("Products will update when the slider is moved.","woo-gutenberg-products-block"),checked:j,onChange:()=>c({showFilterButton:!j})}),Object(o.createElement)("p",null,Object(i.__)("Heading Level","woo-gutenberg-products-block")),Object(o.createElement)(g.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:l,onChange:e=>c({headingLevel:e})}))),Object(o.createElement)(O.a,{className:"wc-block-price-filter__title",headingLevel:l,heading:r,onChange:e=>c({heading:e})}),Object(o.createElement)(d.Disabled,null,Object(o.createElement)(P,{attributes:t,isEditor:!0}))))},save(e){let{attributes:t}=e;const{className:c,showInputFields:n,showFilterButton:i,heading:l,headingLevel:a}=t,u={"data-showinputfields":n,"data-showfilterbutton":i,"data-heading":l,"data-heading-level":a};return Object(o.createElement)("div",r()({className:s()("is-loading",c)},u),Object(o.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}))}})},48:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0);const r=Object(n.createContext)("page"),o=()=>Object(n.useContext)(r);r.Provider},55:function(e,t,c){"use strict";var n=c(5),r=c.n(n),o=c(0),i=c(6),l=c(4),a=c.n(l),s=c(3),u=c(9);c(82);class b extends o.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:c,className:n,help:l,options:u,value:b}=this.props,p="inspector-toggle-button-control-"+c;let d;return l&&(d=Object(i.isFunction)(l)?l(t):l),Object(o.createElement)(s.BaseControl,{id:p,help:d,className:a()("components-toggle-button-control",n)},Object(o.createElement)("label",{id:p+"__label",htmlFor:p,className:"components-toggle-button-control__label"},e),Object(o.createElement)(s.ButtonGroup,{"aria-labelledby":p+"__label"},u.map((t,c)=>{const n={};return b===t.value?(n.isPrimary=!0,n["aria-pressed"]=!0):(n.isSecondary=!0,n["aria-pressed"]=!1),Object(o.createElement)(s.Button,r()({key:`${t.label}-${t.value}-${c}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},n),t.label)})))}}t.a=Object(u.withInstanceId)(b)},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},71:function(e,t,c){"use strict";c.d(t,"a",(function(){return b})),c.d(t,"b",(function(){return p})),c.d(t,"c",(function(){return d}));var n=c(16),r=c(13),o=c(0),i=c(26),l=c.n(i),a=c(40),s=c(108),u=c(48);const b=e=>{const t=Object(u.a)();e=e||t;const c=Object(r.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:i}=Object(r.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(o.useCallback)(t=>{i(e,t)},[e,i])]},p=(e,t,c)=>{const i=Object(u.a)();c=c||i;const l=Object(r.useSelect)(r=>r(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:a}=Object(r.useDispatch)(n.QUERY_STATE_STORE_KEY);return[l,Object(o.useCallback)(t=>{a(c,e,t)},[c,e,a])]},d=(e,t)=>{const c=Object(u.a)();t=t||c;const[n,r]=b(t),i=Object(a.a)(n),p=Object(a.a)(e),d=Object(s.a)(p),m=Object(o.useRef)(!1);return Object(o.useEffect)(()=>{l()(d,p)||(r(Object.assign({},i,p)),m.current=!0)},[i,p,d,r]),m.current?[n,r]:[e,r]}},8:function(e,t){e.exports=window.React},82:function(e,t){},85:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"c",(function(){return r})),c.d(t,"b",(function(){return o})),c.d(t,"d",(function(){return i}));const n=e=>"number"==typeof e,r=e=>"string"==typeof e,o=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return o(e)&&t in e}},89:function(e,t,c){"use strict";var n=c(0),r=c(6),o=c(1),i=c(3);function l(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(n.createElement)(i.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(i.Path,{d:c[t]})):null}class a extends n.Component{createLevelControl(e,t,c){const r=e===t;return{icon:Object(n.createElement)(l,{level:e}),title:Object(o.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(o.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:r,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:o,onChange:a}=this.props;return Object(n.createElement)(i.ToolbarGroup,{isCollapsed:e,icon:Object(n.createElement)(l,{level:o}),controls:Object(r.range)(t,c).map(e=>this.createLevelControl(e,o,a))})}}t.a=a},9:function(e,t){e.exports=window.wp.compose},93:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const r=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}}}); \ No newline at end of file diff --git a/build/price-format.asset.php b/build/price-format.asset.php new file mode 100644 index 00000000000..a1cc2dcc4c9 --- /dev/null +++ b/build/price-format.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-polyfill'), 'version' => 'f34ed7b134772caf76a70475c3717eb4'); \ No newline at end of file diff --git a/build/price-format.js b/build/price-format.js new file mode 100644 index 00000000000..c502db2dad0 --- /dev/null +++ b/build/price-format.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.priceFormat=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=141)}({141:function(e,r,t){"use strict";t.r(r),t.d(r,"getCurrencyFromPriceResponse",(function(){return u})),t.d(r,"getCurrency",(function(){return a})),t.d(r,"formatPrice",(function(){return f}));var n=t(4);const o={code:n.CURRENCY.code,symbol:n.CURRENCY.symbol,thousandSeparator:n.CURRENCY.thousandSeparator,decimalSeparator:n.CURRENCY.decimalSeparator,minorUnit:n.CURRENCY.precision,prefix:(i=n.CURRENCY.symbol,c=n.CURRENCY.symbolPosition,{left:i,left_space:" "+i,right:"",right_space:""}[c]||""),suffix:((e,r)=>({left:"",left_space:"",right:e,right_space:" "+e}[r]||""))(n.CURRENCY.symbol,n.CURRENCY.symbolPosition)};var i,c;const u=e=>{if(null==e||!e.currency_code)return o;const{currency_code:r,currency_symbol:t,currency_thousand_separator:n,currency_decimal_separator:i,currency_minor_unit:c,currency_prefix:u,currency_suffix:a}=e;return{code:r||"USD",symbol:t||"$",thousandSeparator:"string"==typeof n?n:",",decimalSeparator:"string"==typeof i?i:".",minorUnit:Number.isFinite(c)?c:2,prefix:"string"==typeof u?u:"$",suffix:"string"==typeof a?a:""}},a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{...o,...e}},f=(e,r)=>{if(""===e||void 0===e)return"";const t="number"==typeof e?e:parseInt(e,10);if(!Number.isFinite(t))return"";const n=a(r),{minorUnit:o,prefix:i,suffix:c,decimalSeparator:u,thousandSeparator:f}=n,s=t/10**o,{beforeDecimal:l,afterDecimal:p}=(e=>{const r=e.split(".");return{beforeDecimal:r[0],afterDecimal:r[1]||""}})(s.toString()),d=`${i}${((e,r)=>e.replace(/\B(?=(\d{3})+(?!\d))/g,r))(l,f)}${((e,r,t)=>e?`${r}${e.padEnd(t,"0")}`:t>0?`${r}${"0".repeat(t)}`:"")(p,u,o)}${c}`,m=document.createElement("textarea");return m.innerHTML=d,m.value}},4:function(e,r){e.exports=window.wc.wcSettings}}); \ No newline at end of file diff --git a/build/product-best-sellers.asset.php b/build/product-best-sellers.asset.php new file mode 100644 index 00000000000..020dd032939 --- /dev/null +++ b/build/product-best-sellers.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => 'fd8f326d1b340de7ebdd9ed7e6f3b67e'); \ No newline at end of file diff --git a/build/product-best-sellers.js b/build/product-best-sellers.js new file mode 100644 index 00000000000..efd94a31a32 --- /dev/null +++ b/build/product-best-sellers.js @@ -0,0 +1,16 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-best-sellers"]=function(e){function t(t){for(var r,l,i=t[0],s=t[1],a=t[2],d=0,b=[];dObject(o.sprintf)( +/* translators: Number of items selected from list. */ +Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(n.groupBy)(e,"parent"),r=Object(n.keyBy)(t,"id"),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=o(r[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:o(r[e.parent]),children:t&&t.length?l(t):[]}}),i=l(c[0]||[]);return delete c[0],Object(n.forEach)(c,e=>{i.push(...l(e||[]))}),i},s=(e,t,c)=>{if(!t)return c?i(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?i(n,e):n},a=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return i})),c.d(t,"n",(function(){return s})),c.d(t,"j",(function(){return a})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return b})),c.d(t,"k",(function(){return m})),c.d(t,"c",(function(){return g})),c.d(t,"d",(function(){return h})),c.d(t,"h",(function(){return p})),c.d(t,"a",(function(){return E})),c.d(t,"i",(function(){return O})),c.d(t,"b",(function(){return w}));var r,n=c(2);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",s=o.buildPhase,a=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,m=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),g=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),h=n.STORE_PAGES.cart.permalink,p=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),E=Object(n.getSetting)("allowedCountries",{}),O=Object(n.getSetting)("shippingStates",{}),w=Object(n.getSetting)("allowedStates",{})},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return a})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return m})),c.d(t,"c",(function(){return g})),c.d(t,"d",(function(){return h})),c.d(t,"g",(function(){return p})),c.d(t,"a",(function(){return E}));var r=c(15),n=c(11),o=c.n(n),l=c(6),i=c(2),s=c(25);const a=e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=s.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},i=[Object(r.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&i.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:c,queryArgs:n});return Promise.all(i.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),b=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(i.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},g=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>o()({path:"wc/store/products/categories/"+e}),p=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(31);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},321:function(e,t,c){e.exports=c(452)},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(5),n=c.n(r),o=c(0),l=c(17);const i=e=>{let{countLabel:t,className:c,depth:r=0,controlId:i="",item:s,isSelected:a,isSingle:u,onSelect:d,search:b="",...m}=e;const g=null!=t&&void 0!==s.count&&null!==s.count,h=[c,"woocommerce-search-list__item"];h.push("depth-"+r),u&&h.push("is-radio-button"),g&&h.push("has-count");const p=s.breadcrumbs&&s.breadcrumbs.length,E=m.name||"search-list-item-"+i,O=`${E}-${s.id}`;return Object(o.createElement)("label",{htmlFor:O,className:h.join(" ")},u?Object(o.createElement)("input",n()({type:"radio",id:O,name:E,value:s.value,onChange:d(s),checked:a,className:"woocommerce-search-list__item-input"},m)):Object(o.createElement)("input",n()({type:"checkbox",id:O,name:E,value:s.value,onChange:d(s),checked:a,className:"woocommerce-search-list__item-input"},m)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},p?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(s.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(s.name,b))),!!g&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||s.count))};t.b=i},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},452:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(6),l=c(43),i=c(18),s=Object(r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M3.5 18.49l6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99l1.5 1.5z"})),a=c(12),u=c(3),d=c(7),b=c(51),m=c.n(b),g=(c(10),c(58)),h=c(59),p=c(63),E=c(126),O=c(2);class w extends r.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{categories:c,catOperator:o,columns:l,contentVisibility:i,rows:s,alignButtons:a}=e;return Object(r.createElement)(d.InspectorControls,{key:"inspector"},Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(h.a,{columns:l,rows:s,alignButtons:a,setAttributes:t,minColumns:Object(O.getSetting)("min_columns",1),maxColumns:Object(O.getSetting)("max_columns",6),minRows:Object(O.getSetting)("min_rows",1),maxRows:Object(O.getSetting)("max_rows",6)})),Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(g.a,{settings:i,onChange:e=>t({contentVisibility:e})})),Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(p.a,{selected:c,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=e.map(e=>{let{id:t}=e;return t});t({categories:c})},operator:o,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({catOperator:e})}})))}render(){const{attributes:e,name:t}=this.props;return e.isPreview?E.a:Object(r.createElement)("div",{className:"wc-block-product-best-sellers"},this.getInspectorControls(),Object(r.createElement)(u.Disabled,null,Object(r.createElement)(m.a,{block:t,attributes:e})))}}var j=w,f=c(70);Object(a.registerBlockType)("woocommerce/product-best-sellers",{title:Object(n.__)("Best Selling Products","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(l.a,{srcElement:s,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of your all-time best selling products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{...f.a},transforms:{from:[{type:"block",blocks:Object(o.without)(f.b,"woocommerce/product-best-sellers"),transform:e=>Object(a.createBlock)("woocommerce/product-best-sellers",e)}]},edit:e=>Object(r.createElement)(j,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},58:function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(10),c(3));t.a=e=>{let{onChange:t,settings:c}=e;const{button:l,price:i,rating:s,title:a}=c;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:a?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...c,title:!a})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:i?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...c,price:!i})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...c,rating:!s})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...c,button:!l})}))}},59:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(6),l=(c(10),c(3));t.a=e=>{let{columns:t,rows:c,setAttributes:i,alignButtons:s,minColumns:a=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(o.clamp)(e,a,u);i({columns:Number.isNaN(t)?"":t})},min:a,max:u}),Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(o.clamp)(e,d,b);i({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(r.createElement)(l.ToggleControl,{label:Object(n.__)("Align Last Block","woo-gutenberg-products-block"),help:s?Object(n.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:s,onChange:()=>i({alignButtons:!s})}))}},6:function(e,t){e.exports=window.lodash},63:function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),l=c(1),i=(c(10),c(34)),s=c(86),a=c(3),u=c(9),d=c(27),b=c(28),m=Object(u.createHigherOrderComponent)(e=>class extends o.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(d.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:c,categories:r}=this.state;return Object(o.createElement)(e,n()({},this.props,{error:t,isLoading:c,categories:r}))}},"withCategories"),g=c(32),h=c(4),p=c.n(h);c(90);const E=e=>{let{categories:t,error:c,isLoading:r,onChange:u,onOperatorChange:d,operator:b,selected:m,isCompact:h,isSingle:E,showReviewCount:O}=e;const w={clear:Object(l.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(l.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(l.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(l._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Category search results updated.","woo-gutenberg-products-block")};return c?Object(o.createElement)(g.a,{error:c}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(s.a,{className:"woocommerce-product-categories",list:t,isLoading:r,selected:m.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:u,renderItem:e=>{const{item:t,search:c,depth:r=0}=e,s=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,a=O?Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(l._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),s,t.review_count):Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(l._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),s,t.count),u=O?Object(l.sprintf)( +/* translators: %d is the count of reviews. */ +Object(l._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(l.sprintf)( +/* translators: %d is the count of products. */ +Object(l._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(o.createElement)(i.a,n()({className:p()("woocommerce-product-categories__item","has-count",{"is-searching":c.length>0,"is-skip-level":0===r&&0!==t.parent})},e,{countLabel:u,"aria-label":a}))},messages:w,isCompact:h,isHierarchical:!0,isSingle:E}),!!d&&Object(o.createElement)("div",{hidden:m.length<2},Object(o.createElement)(a.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(l.__)("Display products matching","woo-gutenberg-products-block"),help:Object(l.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:b,onChange:d,options:[{label:Object(l.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(l.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};E.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=m(E)},7:function(e,t){e.exports=window.wp.blockEditor},70:function(e,t,c){"use strict";c.d(t,"b",(function(){return n}));var r=c(2);const n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:Object(r.getSetting)("default_columns",3)},rows:{type:"number",default:Object(r.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},isPreview:{type:"boolean",default:!1}}},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(5),n=c.n(r),o=c(0),l=c(1),i=c(3),s=c(478),a=c(480),u=c(4),d=c.n(u),b=c(9),m=c(17),g=c(34),h=c(479),p=c(14);const E=e=>{let{id:t,label:c,popoverContents:r,remove:n,screenReaderLabel:a,className:u=""}=e;const[m,g]=Object(o.useState)(!1),O=Object(b.useInstanceId)(E);if(a=a||c,!c)return null;c=Object(p.decodeEntities)(c);const w=d()("woocommerce-tag",u,{"has-remove":!!n}),j="woocommerce-tag__label-"+O,f=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},a),Object(o.createElement)("span",{"aria-hidden":"true"},c));return Object(o.createElement)("span",{className:w},r?Object(o.createElement)(i.Button,{className:"woocommerce-tag__text",id:j,onClick:()=>g(!0)},f):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:j},f),r&&m&&Object(o.createElement)(i.Popover,{onClose:()=>g(!1)},r),n&&Object(o.createElement)(i.Button,{className:"woocommerce-tag__remove",onClick:n(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":j},Object(o.createElement)(s.a,{icon:h.a,size:20,className:"clear-icon"})))};var O=E;const w=e=>Object(o.createElement)(g.b,e),j=e=>{const{list:t,selected:c,renderItem:r,depth:l=0,onSelect:i,instanceId:s,isSingle:a,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:d,onSelect:i,isSingle:a,search:u,depth:l,controlId:s})),Object(o.createElement)(j,n()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:r,messages:n,onChange:s,onRemove:a}=e;if(t||c||!r)return null;const u=r.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,n.selected(u)),u>0?Object(o.createElement)(i.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":n.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(o.createElement)("ul",null,r.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(O,{label:e.name,id:e.id,remove:a})))):null)},_=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:n,...i}=e;const{messages:u,renderItem:d,selected:b,isSingle:m}=i,g=d||w;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(s.a,{icon:a.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(j,{list:t,selected:b,renderItem:g,onSelect:r,instanceId:n,isSingle:m,search:c}))},y=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:l,isSingle:s,list:a,messages:u=m.a,onChange:g,onSearch:h,selected:p,debouncedSpeak:E}=e,[O,w]=Object(o.useState)(""),j=Object(b.useInstanceId)(y),x=Object(o.useMemo)(()=>({...m.a,...u}),[u]),k=Object(o.useMemo)(()=>Object(m.c)(a,O,r),[a,O,r]);Object(o.useEffect)(()=>{E&&E(x.updated)},[E,x]),Object(o.useEffect)(()=>{"function"==typeof h&&h(O)},[O,h]);const v=Object(o.useCallback)(e=>()=>{s&&g([]);const t=p.findIndex(t=>{let{id:c}=t;return c===e});g([...p.slice(0,t),...p.slice(t+1)])},[s,p,g]),S=Object(o.useCallback)(e=>()=>{-1===p.findIndex(t=>{let{id:c}=t;return c===e.id})?g(s?[e]:[...p,e]):v(e.id)()},[s,v,g,p]);return Object(o.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(o.createElement)(f,n()({},e,{onRemove:v,messages:x})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(i.TextControl,{label:x.search,type:"search",value:O,onChange:e=>w(e)})),l?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(i.Spinner,null)):Object(o.createElement)(_,n()({},e,{search:O,filteredList:k,messages:x,onSelect:S,instanceId:j})))};Object(i.withSpokenMessages)(y)},9:function(e,t){e.exports=window.wp.compose},90:function(e,t){}}); \ No newline at end of file diff --git a/build/product-categories.asset.php b/build/product-categories.asset.php new file mode 100644 index 00000000000..45dccc5b3cd --- /dev/null +++ b/build/product-categories.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render'), 'version' => 'c03fc4e2b2b22a9f0a93f98ac65722f1'); \ No newline at end of file diff --git a/build/product-categories.js b/build/product-categories.js new file mode 100644 index 00000000000..ab1c3398a74 --- /dev/null +++ b/build/product-categories.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-categories"]=function(e){function t(t){for(var r,a,l=t[0],i=t[1],s=t[2],b=0,p=[];bObject(c.createElement)(h.Placeholder,{icon:Object(c.createElement)(i.a,{srcElement:u}),label:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),className:"wc-block-product-categories"},Object(a.__)("This block shows product categories for your store. To use it, you'll first need to create a product and assign it to a category.","woo-gutenberg-products-block"));var f=e=>{let{attributes:t,setAttributes:o,name:r}=e;const n=Object(p.useBlockProps)({className:"wc-block-product-categories"});return Object(c.createElement)("div",n,(()=>{const{hasCount:e,hasImage:r,hasEmpty:n,isDropdown:l,isHierarchical:i}=t;return Object(c.createElement)(p.InspectorControls,{key:"inspector"},Object(c.createElement)(h.PanelBody,{title:Object(a.__)("List Settings","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(m.a,{label:Object(a.__)("Display style","woo-gutenberg-products-block"),value:l?"dropdown":"list",options:[{label:Object(a.__)("List","woo-gutenberg-products-block"),value:"list"},{label:Object(a.__)("Dropdown","woo-gutenberg-products-block"),value:"dropdown"}],onChange:e=>o({isDropdown:"dropdown"===e})})),Object(c.createElement)(h.PanelBody,{title:Object(a.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show product count","woo-gutenberg-products-block"),help:e?Object(a.__)("Product count is visible.","woo-gutenberg-products-block"):Object(a.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:e,onChange:()=>o({hasCount:!e})}),!l&&Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show category images","woo-gutenberg-products-block"),help:r?Object(a.__)("Category images are visible.","woo-gutenberg-products-block"):Object(a.__)("Category images are hidden.","woo-gutenberg-products-block"),checked:r,onChange:()=>o({hasImage:!r})}),Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show hierarchy","woo-gutenberg-products-block"),help:i?Object(a.__)("Hierarchy is visible.","woo-gutenberg-products-block"):Object(a.__)("Hierarchy is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>o({isHierarchical:!i})}),Object(c.createElement)(h.ToggleControl,{label:Object(a.__)("Show empty categories","woo-gutenberg-products-block"),help:n?Object(a.__)("Empty categories are visible.","woo-gutenberg-products-block"):Object(a.__)("Empty categories are hidden.","woo-gutenberg-products-block"),checked:n,onChange:()=>o({hasEmpty:!n})})))})(),Object(c.createElement)(h.Disabled,null,Object(c.createElement)(g.a,{block:r,attributes:t,EmptyResponsePlaceholder:w})))};Object(l.registerBlockType)("woocommerce/product-categories",{apiVersion:2,title:Object(a.__)("Product Categories List","woo-gutenberg-products-block"),icon:{src:Object(c.createElement)(i.a,{srcElement:u,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(a.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(a.__)("Show all product categories as a list or dropdown.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1,...Object(b.b)()&&{color:{background:!1,link:!0},typography:{fontSize:!0,lineHeight:!0}}},example:{attributes:{hasCount:!0,hasImage:!1}},attributes:{align:{type:"string"},hasCount:{type:"boolean",default:!0},hasImage:{type:"boolean",default:!1},hasEmpty:{type:"boolean",default:!1},isDropdown:{type:"boolean",default:!1},isHierarchical:{type:"boolean",default:!0}},transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:o}=e;return"woocommerce_product_categories"===t&&!(null==o||!o.raw)},transform:e=>{let{instance:t}=e;return Object(l.createBlock)("woocommerce/product-categories",{hasCount:!!t.raw.count,hasEmpty:!t.raw.hide_empty,isDropdown:!!t.raw.dropdown,isHierarchical:!!t.raw.hierarchical})}}]},deprecated:[{attributes:{hasCount:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-has-count"},hasEmpty:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-has-empty"},isDropdown:{type:"boolean",default:!1,source:"attribute",selector:"div",attribute:"data-is-dropdown"},isHierarchical:{type:"boolean",default:!0,source:"attribute",selector:"div",attribute:"data-is-hierarchical"}},migrate:e=>e,save(e){const{hasCount:t,hasEmpty:o,isDropdown:r,isHierarchical:a}=e.attributes,l={};return t&&(l["data-has-count"]=!0),o&&(l["data-has-empty"]=!0),r&&(l["data-is-dropdown"]=!0),a&&(l["data-is-hierarchical"]=!0),Object(c.createElement)("div",n()({className:"is-loading"},l),r?Object(c.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-categories__placeholder"}):Object(c.createElement)("ul",{"aria-hidden":!0},Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"})),Object(c.createElement)("li",null,Object(c.createElement)("span",{className:"wc-block-product-categories__placeholder"}))))}}],edit:e=>Object(c.createElement)(f,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},55:function(e,t,o){"use strict";var r=o(5),n=o.n(r),c=o(0),a=o(6),l=o(4),i=o.n(l),s=o(3),u=o(9);o(82);class b extends c.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:o,className:r,help:l,options:u,value:b}=this.props,p="inspector-toggle-button-control-"+o;let d;return l&&(d=Object(a.isFunction)(l)?l(t):l),Object(c.createElement)(s.BaseControl,{id:p,help:d,className:i()("components-toggle-button-control",r)},Object(c.createElement)("label",{id:p+"__label",htmlFor:p,className:"components-toggle-button-control__label"},e),Object(c.createElement)(s.ButtonGroup,{"aria-labelledby":p+"__label"},u.map((t,o)=>{const r={};return b===t.value?(r.isPrimary=!0,r["aria-pressed"]=!0):(r.isSecondary=!0,r["aria-pressed"]=!1),Object(c.createElement)(s.Button,n()({key:`${t.label}-${t.value}-${o}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},r),t.label)})))}}t.a=Object(u.withInstanceId)(b)},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},77:function(e,t,o){"use strict";o.d(t,"c",(function(){return c})),o.d(t,"d",(function(){return a})),o.d(t,"a",(function(){return l})),o.d(t,"b",(function(){return i}));var r=o(12),n=o(25);const c=(e,t)=>{if(n.n>2)return Object(r.registerBlockType)(e,t)},a=(e,t)=>{if(n.n>1)return Object(r.registerBlockType)(e,t)},l=()=>n.n>2,i=()=>n.n>1},82:function(e,t){},9:function(e,t){e.exports=window.wp.compose}}); \ No newline at end of file diff --git a/build/product-category.asset.php b/build/product-category.asset.php new file mode 100644 index 00000000000..c78245a20df --- /dev/null +++ b/build/product-category.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => 'f3da69278379b4c1fb314a35f95f8450'); \ No newline at end of file diff --git a/build/product-category.js b/build/product-category.js new file mode 100644 index 00000000000..bb39b600b1e --- /dev/null +++ b/build/product-category.js @@ -0,0 +1,16 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-category"]=function(e){function t(t){for(var r,l,i=t[0],s=t[1],a=t[2],b=0,d=[];bObject(n.sprintf)( +/* translators: Number of items selected from list. */ +Object(n._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Search results updated.","woo-gutenberg-products-block")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(o.groupBy)(e,"parent"),r=Object(o.keyBy)(t,"id"),n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=n(r[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:n(r[e.parent]),children:t&&t.length?l(t):[]}}),i=l(c[0]||[]);return delete c[0],Object(o.forEach)(c,e=>{i.push(...l(e||[]))}),i},s=(e,t,c)=>{if(!t)return c?i(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),o=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?i(o,e):o},a=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return n})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return i})),c.d(t,"n",(function(){return s})),c.d(t,"j",(function(){return a})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return b})),c.d(t,"g",(function(){return d})),c.d(t,"k",(function(){return g})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return h})),c.d(t,"h",(function(){return p})),c.d(t,"a",(function(){return E})),c.d(t,"i",(function(){return O})),c.d(t,"b",(function(){return w}));var r,o=c(2);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=n.pluginUrl+"images/",i=n.pluginUrl+"build/",s=n.buildPhase,a=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=o.STORE_PAGES.checkout.id,b=o.STORE_PAGES.checkout.permalink,d=o.STORE_PAGES.privacy.permalink,g=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),m=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),h=o.STORE_PAGES.cart.permalink,p=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),E=Object(o.getSetting)("allowedCountries",{}),O=Object(o.getSetting)("shippingStates",{}),w=Object(o.getSetting)("allowedStates",{})},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return a})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return b})),c.d(t,"i",(function(){return d})),c.d(t,"f",(function(){return g})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return h})),c.d(t,"g",(function(){return p})),c.d(t,"a",(function(){return E}));var r=c(15),o=c(11),n=c.n(o),l=c(6),i=c(2),s=c(25);const a=e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const i=(e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const n=s.o.productCount>100,l={per_page:n?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},i=[Object(r.addQueryArgs)("/wc/store/products",{...l,...o})];return n&&t.length&&i.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:c,queryArgs:o});return Promise.all(i.map(e=>n()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),b=()=>n()({path:"wc/store/products/attributes"}),d=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:c}=e;const o=(e=>{let{selected:t=[],search:c}=e;const o=Object(i.getSetting)("limitTags",!1),n=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:c})];return o&&t.length&&n.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:c});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},m=e=>n()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>n()({path:"wc/store/products/categories/"+e}),p=e=>n()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return n}));var r=c(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(31);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},322:function(e,t,c){e.exports=c(459)},323:function(e,t){},324:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"}));t.a=n},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(5),o=c.n(r),n=c(0),l=c(17);const i=e=>{let{countLabel:t,className:c,depth:r=0,controlId:i="",item:s,isSelected:a,isSingle:u,onSelect:b,search:d="",...g}=e;const m=null!=t&&void 0!==s.count&&null!==s.count,h=[c,"woocommerce-search-list__item"];h.push("depth-"+r),u&&h.push("is-radio-button"),m&&h.push("has-count");const p=s.breadcrumbs&&s.breadcrumbs.length,E=g.name||"search-list-item-"+i,O=`${E}-${s.id}`;return Object(n.createElement)("label",{htmlFor:O,className:h.join(" ")},u?Object(n.createElement)("input",o()({type:"radio",id:O,name:E,value:s.value,onChange:b(s),checked:a,className:"woocommerce-search-list__item-input"},g)):Object(n.createElement)("input",o()({type:"checkbox",id:O,name:E,value:s.value,onChange:b(s),checked:a,className:"woocommerce-search-list__item-input"},g)),Object(n.createElement)("span",{className:"woocommerce-search-list__item-label"},p?Object(n.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(s.breadcrumbs)):null,Object(n.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(s.name,d))),!!m&&Object(n.createElement)("span",{className:"woocommerce-search-list__item-count"},t||s.count))};t.b=i},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...o}):null}},459:function(e,t,c){"use strict";c.r(t);var r=c(0),o=c(1),n=c(12),l=c(6),i=c(43),s=c(324),a=(c(323),c(24)),u=c.n(a),b=c(7),d=c(51),g=c.n(d),m=c(3),h=(c(10),c(58)),p=c(59),E=c(63),O=c(87),w=c(126),j=c(2);const f=()=>Object(r.createElement)(m.Placeholder,{icon:Object(r.createElement)(i.a,{srcElement:s.a}),label:Object(o.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(o.__)("No products were found that matched your selection.","woo-gutenberg-products-block"));class _ extends r.Component{constructor(){super(...arguments),u()(this,"state",{changedAttributes:{},isEditing:!1}),u()(this,"startEditing",()=>{this.setState({isEditing:!0,changedAttributes:{}})}),u()(this,"stopEditing",()=>{this.setState({isEditing:!1,changedAttributes:{}})}),u()(this,"setChangedAttributes",e=>{this.setState(t=>({changedAttributes:{...t.changedAttributes,...e}}))}),u()(this,"save",()=>{const{changedAttributes:e}=this.state,{setAttributes:t}=this.props;t(e),this.stopEditing()})}componentDidMount(){const{attributes:e}=this.props;e.categories.length||this.setState({isEditing:!0})}getInspectorControls(){var e=this;const{attributes:t,setAttributes:c}=this.props,{isEditing:n}=this.state,{columns:l,catOperator:i,contentVisibility:s,orderby:a,rows:u,alignButtons:d}=t;return Object(r.createElement)(b.InspectorControls,{key:"inspector"},Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Product Category","woo-gutenberg-products-block"),initialOpen:!t.categories.length&&!n},Object(r.createElement)(E.a,{selected:t.categories,onChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const r=t.map(e=>{let{id:t}=e;return t}),o={categories:r};c(o),e.setChangedAttributes(o)},operator:i,onOperatorChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";const r={catOperator:t};c(r),e.setChangedAttributes(r)},isCompact:!0})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(p.a,{columns:l,rows:u,alignButtons:d,setAttributes:c,minColumns:Object(j.getSetting)("min_columns",1),maxColumns:Object(j.getSetting)("max_columns",6),minRows:Object(j.getSetting)("min_rows",1),maxRows:Object(j.getSetting)("max_rows",6)})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(h.a,{settings:s,onChange:e=>c({contentVisibility:e})})),Object(r.createElement)(m.PanelBody,{title:Object(o.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(O.a,{setAttributes:c,value:a})))}renderEditMode(){var e=this;const{attributes:t,debouncedSpeak:c}=this.props,{changedAttributes:n}=this.state,l={...t,...n};return Object(r.createElement)(m.Placeholder,{icon:Object(r.createElement)(i.a,{srcElement:s.a}),label:Object(o.__)("Products by Category","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-category"},Object(o.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-products-category__selection"},Object(r.createElement)(E.a,{selected:l.categories,onChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=t.map(e=>{let{id:t}=e;return t});e.setChangedAttributes({categories:c})},operator:l.catOperator,onOperatorChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({catOperator:t})}}),Object(r.createElement)(m.Button,{isPrimary:!0,onClick:()=>{this.save(),c(Object(o.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Done","woo-gutenberg-products-block")),Object(r.createElement)(m.Button,{className:"wc-block-products-category__cancel-button",isTertiary:!0,onClick:()=>{this.stopEditing(),c(Object(o.__)("Showing Products by Category block preview.","woo-gutenberg-products-block"))}},Object(o.__)("Cancel","woo-gutenberg-products-block"))))}renderViewMode(){const{attributes:e,name:t}=this.props,c=e.categories.length;return Object(r.createElement)(m.Disabled,null,c?Object(r.createElement)(g.a,{block:t,attributes:e,EmptyResponsePlaceholder:f}):Object(o.__)("Select at least one category to display its products.","woo-gutenberg-products-block"))}render(){const{isEditing:e}=this.state,{attributes:t}=this.props;return t.isPreview?w.a:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(b.BlockControls,null,Object(r.createElement)(m.ToolbarGroup,{controls:[{icon:"edit",title:Object(o.__)("Edit selected categories","woo-gutenberg-products-block"),onClick:()=>e?this.stopEditing():this.startEditing(),isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode())}}var y=Object(m.withSpokenMessages)(_),x=c(70);Object(n.registerBlockType)("woocommerce/product-category",{title:Object(o.__)("Products by Category","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{srcElement:s.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(o.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(o.__)("Display a grid of products from your selected categories.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{...x.a,editMode:{type:"boolean",default:!0},orderby:{type:"string",default:"date"}},transforms:{from:[{type:"block",blocks:Object(l.without)(x.b,"woocommerce/product-category"),transform:e=>Object(n.createBlock)("woocommerce/product-category",{...e,editMode:!1})}]},edit:e=>Object(r.createElement)(y,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},58:function(e,t,c){"use strict";var r=c(0),o=c(1),n=(c(10),c(3));t.a=e=>{let{onChange:t,settings:c}=e;const{button:l,price:i,rating:s,title:a}=c;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(n.ToggleControl,{label:Object(o.__)("Product title","woo-gutenberg-products-block"),help:a?Object(o.__)("Product title is visible.","woo-gutenberg-products-block"):Object(o.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...c,title:!a})}),Object(r.createElement)(n.ToggleControl,{label:Object(o.__)("Product price","woo-gutenberg-products-block"),help:i?Object(o.__)("Product price is visible.","woo-gutenberg-products-block"):Object(o.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...c,price:!i})}),Object(r.createElement)(n.ToggleControl,{label:Object(o.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(o.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(o.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...c,rating:!s})}),Object(r.createElement)(n.ToggleControl,{label:Object(o.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(o.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(o.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...c,button:!l})}))}},59:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(6),l=(c(10),c(3));t.a=e=>{let{columns:t,rows:c,setAttributes:i,alignButtons:s,minColumns:a=1,maxColumns:u=6,minRows:b=1,maxRows:d=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.RangeControl,{label:Object(o.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(n.clamp)(e,a,u);i({columns:Number.isNaN(t)?"":t})},min:a,max:u}),Object(r.createElement)(l.RangeControl,{label:Object(o.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(n.clamp)(e,b,d);i({rows:Number.isNaN(t)?"":t})},min:b,max:d}),Object(r.createElement)(l.ToggleControl,{label:Object(o.__)("Align Last Block","woo-gutenberg-products-block"),help:s?Object(o.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(o.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:s,onChange:()=>i({alignButtons:!s})}))}},6:function(e,t){e.exports=window.lodash},63:function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),l=c(1),i=(c(10),c(34)),s=c(86),a=c(3),u=c(9),b=c(27),d=c(28),g=Object(u.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(b.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:c,categories:r}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:t,isLoading:c,categories:r}))}},"withCategories"),m=c(32),h=c(4),p=c.n(h);c(90);const E=e=>{let{categories:t,error:c,isLoading:r,onChange:u,onOperatorChange:b,operator:d,selected:g,isCompact:h,isSingle:E,showReviewCount:O}=e;const w={clear:Object(l.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(l.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(l.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(l._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Category search results updated.","woo-gutenberg-products-block")};return c?Object(n.createElement)(m.a,{error:c}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.a,{className:"woocommerce-product-categories",list:t,isLoading:r,selected:g.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:u,renderItem:e=>{const{item:t,search:c,depth:r=0}=e,s=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,a=O?Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(l._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),s,t.review_count):Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(l._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),s,t.count),u=O?Object(l.sprintf)( +/* translators: %d is the count of reviews. */ +Object(l._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(l.sprintf)( +/* translators: %d is the count of products. */ +Object(l._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(i.a,o()({className:p()("woocommerce-product-categories__item","has-count",{"is-searching":c.length>0,"is-skip-level":0===r&&0!==t.parent})},e,{countLabel:u,"aria-label":a}))},messages:w,isCompact:h,isHierarchical:!0,isSingle:E}),!!b&&Object(n.createElement)("div",{hidden:g.length<2},Object(n.createElement)(a.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(l.__)("Display products matching","woo-gutenberg-products-block"),help:Object(l.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:d,onChange:b,options:[{label:Object(l.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(l.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};E.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=g(E)},7:function(e,t){e.exports=window.wp.blockEditor},70:function(e,t,c){"use strict";c.d(t,"b",(function(){return o}));var r=c(2);const o=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:Object(r.getSetting)("default_columns",3)},rows:{type:"number",default:Object(r.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},isPreview:{type:"boolean",default:!1}}},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(5),o=c.n(r),n=c(0),l=c(1),i=c(3),s=c(478),a=c(480),u=c(4),b=c.n(u),d=c(9),g=c(17),m=c(34),h=c(479),p=c(14);const E=e=>{let{id:t,label:c,popoverContents:r,remove:o,screenReaderLabel:a,className:u=""}=e;const[g,m]=Object(n.useState)(!1),O=Object(d.useInstanceId)(E);if(a=a||c,!c)return null;c=Object(p.decodeEntities)(c);const w=b()("woocommerce-tag",u,{"has-remove":!!o}),j="woocommerce-tag__label-"+O,f=Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},a),Object(n.createElement)("span",{"aria-hidden":"true"},c));return Object(n.createElement)("span",{className:w},r?Object(n.createElement)(i.Button,{className:"woocommerce-tag__text",id:j,onClick:()=>m(!0)},f):Object(n.createElement)("span",{className:"woocommerce-tag__text",id:j},f),r&&g&&Object(n.createElement)(i.Popover,{onClose:()=>m(!1)},r),o&&Object(n.createElement)(i.Button,{className:"woocommerce-tag__remove",onClick:o(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":j},Object(n.createElement)(s.a,{icon:h.a,size:20,className:"clear-icon"})))};var O=E;const w=e=>Object(n.createElement)(m.b,e),j=e=>{const{list:t,selected:c,renderItem:r,depth:l=0,onSelect:i,instanceId:s,isSingle:a,search:u}=e;return t?Object(n.createElement)(n.Fragment,null,t.map(t=>{const b=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(n.createElement)(n.Fragment,{key:t.id},Object(n.createElement)("li",null,r({item:t,isSelected:b,onSelect:i,isSingle:a,search:u,depth:l,controlId:s})),Object(n.createElement)(j,o()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:r,messages:o,onChange:s,onRemove:a}=e;if(t||c||!r)return null;const u=r.length;return Object(n.createElement)("div",{className:"woocommerce-search-list__selected"},Object(n.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(n.createElement)("strong",null,o.selected(u)),u>0?Object(n.createElement)(i.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":o.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(n.createElement)("ul",null,r.map((e,t)=>Object(n.createElement)("li",{key:t},Object(n.createElement)(O,{label:e.name,id:e.id,remove:a})))):null)},_=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:o,...i}=e;const{messages:u,renderItem:b,selected:d,isSingle:g}=i,m=b||w;return 0===t.length?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(n.createElement)(s.a,{icon:a.a})),Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(n.createElement)("ul",{className:"woocommerce-search-list__list"},Object(n.createElement)(j,{list:t,selected:d,renderItem:m,onSelect:r,instanceId:o,isSingle:g,search:c}))},y=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:l,isSingle:s,list:a,messages:u=g.a,onChange:m,onSearch:h,selected:p,debouncedSpeak:E}=e,[O,w]=Object(n.useState)(""),j=Object(d.useInstanceId)(y),x=Object(n.useMemo)(()=>({...g.a,...u}),[u]),k=Object(n.useMemo)(()=>Object(g.c)(a,O,r),[a,O,r]);Object(n.useEffect)(()=>{E&&E(x.updated)},[E,x]),Object(n.useEffect)(()=>{"function"==typeof h&&h(O)},[O,h]);const v=Object(n.useCallback)(e=>()=>{s&&m([]);const t=p.findIndex(t=>{let{id:c}=t;return c===e});m([...p.slice(0,t),...p.slice(t+1)])},[s,p,m]),C=Object(n.useCallback)(e=>()=>{-1===p.findIndex(t=>{let{id:c}=t;return c===e.id})?m(s?[e]:[...p,e]):v(e.id)()},[s,v,m,p]);return Object(n.createElement)("div",{className:b()("woocommerce-search-list",t,{"is-compact":c})},Object(n.createElement)(f,o()({},e,{onRemove:v,messages:x})),Object(n.createElement)("div",{className:"woocommerce-search-list__search"},Object(n.createElement)(i.TextControl,{label:x.search,type:"search",value:O,onChange:e=>w(e)})),l?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(n.createElement)(i.Spinner,null)):Object(n.createElement)(_,o()({},e,{search:O,filteredList:k,messages:x,onSelect:C,instanceId:j})))};Object(i.withSpokenMessages)(y)},87:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(3);c(10),t.a=e=>{let{value:t,setAttributes:c}=e;return Object(r.createElement)(n.SelectControl,{label:Object(o.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(o.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(o.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(o.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(o.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(o.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(o.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(o.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>c({orderby:e})})}},9:function(e,t){e.exports=window.wp.compose},90:function(e,t){}}); \ No newline at end of file diff --git a/build/product-new.asset.php b/build/product-new.asset.php new file mode 100644 index 00000000000..1e5bacd980a --- /dev/null +++ b/build/product-new.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => 'e325042891608bd8661eadf49865c104'); \ No newline at end of file diff --git a/build/product-new.js b/build/product-new.js new file mode 100644 index 00000000000..04356720d78 --- /dev/null +++ b/build/product-new.js @@ -0,0 +1,16 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-new"]=function(e){function t(t){for(var r,l,i=t[0],a=t[1],s=t[2],d=0,b=[];dObject(o.sprintf)( +/* translators: Number of items selected from list. */ +Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(n.groupBy)(e,"parent"),r=Object(n.keyBy)(t,"id"),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=o(r[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:o(r[e.parent]),children:t&&t.length?l(t):[]}}),i=l(c[0]||[]);return delete c[0],Object(n.forEach)(c,e=>{i.push(...l(e||[]))}),i},a=(e,t,c)=>{if(!t)return c?i(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?i(n,e):n},s=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return i})),c.d(t,"n",(function(){return a})),c.d(t,"j",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return b})),c.d(t,"k",(function(){return m})),c.d(t,"c",(function(){return g})),c.d(t,"d",(function(){return h})),c.d(t,"h",(function(){return p})),c.d(t,"a",(function(){return E})),c.d(t,"i",(function(){return w})),c.d(t,"b",(function(){return O}));var r,n=c(2);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",a=o.buildPhase,s=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,m=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),g=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),h=n.STORE_PAGES.cart.permalink,p=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),E=Object(n.getSetting)("allowedCountries",{}),w=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return m})),c.d(t,"c",(function(){return g})),c.d(t,"d",(function(){return h})),c.d(t,"g",(function(){return p})),c.d(t,"a",(function(){return E}));var r=c(15),n=c(11),o=c.n(n),l=c(6),i=c(2),a=c(25);const s=e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=a.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},i=[Object(r.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&i.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:c,queryArgs:n});return Promise.all(i.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),b=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(i.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},g=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>o()({path:"wc/store/products/categories/"+e}),p=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(31);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},328:function(e,t,c){e.exports=c(454)},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(5),n=c.n(r),o=c(0),l=c(17);const i=e=>{let{countLabel:t,className:c,depth:r=0,controlId:i="",item:a,isSelected:s,isSingle:u,onSelect:d,search:b="",...m}=e;const g=null!=t&&void 0!==a.count&&null!==a.count,h=[c,"woocommerce-search-list__item"];h.push("depth-"+r),u&&h.push("is-radio-button"),g&&h.push("has-count");const p=a.breadcrumbs&&a.breadcrumbs.length,E=m.name||"search-list-item-"+i,w=`${E}-${a.id}`;return Object(o.createElement)("label",{htmlFor:w,className:h.join(" ")},u?Object(o.createElement)("input",n()({type:"radio",id:w,name:E,value:a.value,onChange:d(a),checked:s,className:"woocommerce-search-list__item-input"},m)):Object(o.createElement)("input",n()({type:"checkbox",id:w,name:E,value:a.value,onChange:d(a),checked:s,className:"woocommerce-search-list__item-input"},m)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},p?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(a.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(a.name,b))),!!g&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||a.count))};t.b=i},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},454:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(12),l=c(6),i=c(43),a=c(18),s=Object(r.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M23 12l-2.44-2.78.34-3.68-3.61-.82-1.89-3.18L12 3 8.6 1.54 6.71 4.72l-3.61.81.34 3.68L1 12l2.44 2.78-.34 3.69 3.61.82 1.89 3.18L12 21l3.4 1.46 1.89-3.18 3.61-.82-.34-3.68L23 12zm-4.51 2.11l.26 2.79-2.74.62-1.43 2.41L12 18.82l-2.58 1.11-1.43-2.41-2.74-.62.26-2.8L3.66 12l1.85-2.12-.26-2.78 2.74-.61 1.43-2.41L12 5.18l2.58-1.11 1.43 2.41 2.74.62-.26 2.79L20.34 12l-1.85 2.11zM11 15h2v2h-2zm0-8h2v6h-2z"})),u=c(3),d=c(7),b=c(51),m=c.n(b),g=(c(10),c(58)),h=c(59),p=c(63),E=c(126),w=c(2);class O extends r.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{categories:c,catOperator:o,columns:l,contentVisibility:i,rows:a,alignButtons:s}=e;return Object(r.createElement)(d.InspectorControls,{key:"inspector"},Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(h.a,{columns:l,rows:a,alignButtons:s,setAttributes:t,minColumns:Object(w.getSetting)("min_columns",1),maxColumns:Object(w.getSetting)("max_columns",6),minRows:Object(w.getSetting)("min_rows",1),maxRows:Object(w.getSetting)("max_rows",6)})),Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(g.a,{settings:i,onChange:e=>t({contentVisibility:e})})),Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(p.a,{selected:c,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=e.map(e=>{let{id:t}=e;return t});t({categories:c})},operator:o,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({catOperator:e})}})))}render(){const{attributes:e,name:t}=this.props;return e.isPreview?E.a:Object(r.createElement)(r.Fragment,null,this.getInspectorControls(),Object(r.createElement)(u.Disabled,null,Object(r.createElement)(m.a,{block:t,attributes:e})))}}var j=O,f=c(70);Object(o.registerBlockType)("woocommerce/product-new",{title:Object(n.__)("Newest Products","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{srcElement:s,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of your newest products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{...f.a},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",blocks:Object(l.without)(f.b,"woocommerce/product-new"),transform:e=>Object(o.createBlock)("woocommerce/product-new",e)}]},edit:e=>Object(r.createElement)(j,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},58:function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(10),c(3));t.a=e=>{let{onChange:t,settings:c}=e;const{button:l,price:i,rating:a,title:s}=c;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:s?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...c,title:!s})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:i?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...c,price:!i})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...c,rating:!a})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...c,button:!l})}))}},59:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(6),l=(c(10),c(3));t.a=e=>{let{columns:t,rows:c,setAttributes:i,alignButtons:a,minColumns:s=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(o.clamp)(e,s,u);i({columns:Number.isNaN(t)?"":t})},min:s,max:u}),Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(o.clamp)(e,d,b);i({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(r.createElement)(l.ToggleControl,{label:Object(n.__)("Align Last Block","woo-gutenberg-products-block"),help:a?Object(n.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:a,onChange:()=>i({alignButtons:!a})}))}},6:function(e,t){e.exports=window.lodash},63:function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),l=c(1),i=(c(10),c(34)),a=c(86),s=c(3),u=c(9),d=c(27),b=c(28),m=Object(u.createHigherOrderComponent)(e=>class extends o.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(d.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:c,categories:r}=this.state;return Object(o.createElement)(e,n()({},this.props,{error:t,isLoading:c,categories:r}))}},"withCategories"),g=c(32),h=c(4),p=c.n(h);c(90);const E=e=>{let{categories:t,error:c,isLoading:r,onChange:u,onOperatorChange:d,operator:b,selected:m,isCompact:h,isSingle:E,showReviewCount:w}=e;const O={clear:Object(l.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(l.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(l.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(l._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Category search results updated.","woo-gutenberg-products-block")};return c?Object(o.createElement)(g.a,{error:c}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.a,{className:"woocommerce-product-categories",list:t,isLoading:r,selected:m.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:u,renderItem:e=>{const{item:t,search:c,depth:r=0}=e,a=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,s=w?Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(l._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),a,t.review_count):Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(l._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),a,t.count),u=w?Object(l.sprintf)( +/* translators: %d is the count of reviews. */ +Object(l._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(l.sprintf)( +/* translators: %d is the count of products. */ +Object(l._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(o.createElement)(i.a,n()({className:p()("woocommerce-product-categories__item","has-count",{"is-searching":c.length>0,"is-skip-level":0===r&&0!==t.parent})},e,{countLabel:u,"aria-label":s}))},messages:O,isCompact:h,isHierarchical:!0,isSingle:E}),!!d&&Object(o.createElement)("div",{hidden:m.length<2},Object(o.createElement)(s.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(l.__)("Display products matching","woo-gutenberg-products-block"),help:Object(l.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:b,onChange:d,options:[{label:Object(l.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(l.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};E.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=m(E)},7:function(e,t){e.exports=window.wp.blockEditor},70:function(e,t,c){"use strict";c.d(t,"b",(function(){return n}));var r=c(2);const n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:Object(r.getSetting)("default_columns",3)},rows:{type:"number",default:Object(r.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},isPreview:{type:"boolean",default:!1}}},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(5),n=c.n(r),o=c(0),l=c(1),i=c(3),a=c(478),s=c(480),u=c(4),d=c.n(u),b=c(9),m=c(17),g=c(34),h=c(479),p=c(14);const E=e=>{let{id:t,label:c,popoverContents:r,remove:n,screenReaderLabel:s,className:u=""}=e;const[m,g]=Object(o.useState)(!1),w=Object(b.useInstanceId)(E);if(s=s||c,!c)return null;c=Object(p.decodeEntities)(c);const O=d()("woocommerce-tag",u,{"has-remove":!!n}),j="woocommerce-tag__label-"+w,f=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},s),Object(o.createElement)("span",{"aria-hidden":"true"},c));return Object(o.createElement)("span",{className:O},r?Object(o.createElement)(i.Button,{className:"woocommerce-tag__text",id:j,onClick:()=>g(!0)},f):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:j},f),r&&m&&Object(o.createElement)(i.Popover,{onClose:()=>g(!1)},r),n&&Object(o.createElement)(i.Button,{className:"woocommerce-tag__remove",onClick:n(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":j},Object(o.createElement)(a.a,{icon:h.a,size:20,className:"clear-icon"})))};var w=E;const O=e=>Object(o.createElement)(g.b,e),j=e=>{const{list:t,selected:c,renderItem:r,depth:l=0,onSelect:i,instanceId:a,isSingle:s,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:d,onSelect:i,isSingle:s,search:u,depth:l,controlId:a})),Object(o.createElement)(j,n()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:r,messages:n,onChange:a,onRemove:s}=e;if(t||c||!r)return null;const u=r.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,n.selected(u)),u>0?Object(o.createElement)(i.Button,{isLink:!0,isDestructive:!0,onClick:()=>a([]),"aria-label":n.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(o.createElement)("ul",null,r.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(w,{label:e.name,id:e.id,remove:s})))):null)},_=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:n,...i}=e;const{messages:u,renderItem:d,selected:b,isSingle:m}=i,g=d||O;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(a.a,{icon:s.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(j,{list:t,selected:b,renderItem:g,onSelect:r,instanceId:n,isSingle:m,search:c}))},y=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:l,isSingle:a,list:s,messages:u=m.a,onChange:g,onSearch:h,selected:p,debouncedSpeak:E}=e,[w,O]=Object(o.useState)(""),j=Object(b.useInstanceId)(y),x=Object(o.useMemo)(()=>({...m.a,...u}),[u]),k=Object(o.useMemo)(()=>Object(m.c)(s,w,r),[s,w,r]);Object(o.useEffect)(()=>{E&&E(x.updated)},[E,x]),Object(o.useEffect)(()=>{"function"==typeof h&&h(w)},[w,h]);const v=Object(o.useCallback)(e=>()=>{a&&g([]);const t=p.findIndex(t=>{let{id:c}=t;return c===e});g([...p.slice(0,t),...p.slice(t+1)])},[a,p,g]),S=Object(o.useCallback)(e=>()=>{-1===p.findIndex(t=>{let{id:c}=t;return c===e.id})?g(a?[e]:[...p,e]):v(e.id)()},[a,v,g,p]);return Object(o.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(o.createElement)(f,n()({},e,{onRemove:v,messages:x})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(i.TextControl,{label:x.search,type:"search",value:w,onChange:e=>O(e)})),l?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(i.Spinner,null)):Object(o.createElement)(_,n()({},e,{search:w,filteredList:k,messages:x,onSelect:S,instanceId:j})))};Object(i.withSpokenMessages)(y)},9:function(e,t){e.exports=window.wp.compose},90:function(e,t){}}); \ No newline at end of file diff --git a/build/product-on-sale.asset.php b/build/product-on-sale.asset.php new file mode 100644 index 00000000000..75ab13f8825 --- /dev/null +++ b/build/product-on-sale.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => '7b45a523abb6e4d6589fcade8c4c18a6'); \ No newline at end of file diff --git a/build/product-on-sale.js b/build/product-on-sale.js new file mode 100644 index 00000000000..6108c5e24a4 --- /dev/null +++ b/build/product-on-sale.js @@ -0,0 +1,16 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-on-sale"]=function(e){function t(t){for(var r,l,a=t[0],i=t[1],s=t[2],b=0,d=[];bObject(o.sprintf)( +/* translators: Number of items selected from list. */ +Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(n.groupBy)(e,"parent"),r=Object(n.keyBy)(t,"id"),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=o(r[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:o(r[e.parent]),children:t&&t.length?l(t):[]}}),a=l(c[0]||[]);return delete c[0],Object(n.forEach)(c,e=>{a.push(...l(e||[]))}),a},i=(e,t,c)=>{if(!t)return c?a(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?a(n,e):n},s=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return a})),c.d(t,"n",(function(){return i})),c.d(t,"j",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return b})),c.d(t,"g",(function(){return d})),c.d(t,"k",(function(){return g})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return p})),c.d(t,"h",(function(){return h})),c.d(t,"a",(function(){return E})),c.d(t,"i",(function(){return O})),c.d(t,"b",(function(){return w}));var r,n=c(2);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",a=o.pluginUrl+"build/",i=o.buildPhase,s=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,b=n.STORE_PAGES.checkout.permalink,d=n.STORE_PAGES.privacy.permalink,g=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),m=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),p=n.STORE_PAGES.cart.permalink,h=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),E=Object(n.getSetting)("allowedCountries",{}),O=Object(n.getSetting)("shippingStates",{}),w=Object(n.getSetting)("allowedStates",{})},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return b})),c.d(t,"i",(function(){return d})),c.d(t,"f",(function(){return g})),c.d(t,"c",(function(){return m})),c.d(t,"d",(function(){return p})),c.d(t,"g",(function(){return h})),c.d(t,"a",(function(){return E}));var r=c(15),n=c(11),o=c.n(n),l=c(6),a=c(2),i=c(25);const s=e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const a=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=i.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},a=[Object(r.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&a.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),a})({selected:t,search:c,queryArgs:n});return Promise.all(a.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),b=()=>o()({path:"wc/store/products/attributes"}),d=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(a.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},m=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),p=e=>o()({path:"wc/store/products/categories/"+e}),h=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(31);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},329:function(e,t,c){e.exports=c(460)},330:function(e,t){},331:function(e,t,c){"use strict";var r=c(0),n=c(18);const o=Object(r.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01L4 11V4h7v-.01l9 9-7 7.02z"}),Object(r.createElement)("circle",{cx:"6.5",cy:"6.5",r:"1.5"}),Object(r.createElement)("path",{d:"M8.9 12.55c0 .57.23 1.07.6 1.45l3.5 3.5 3.5-3.5c.37-.37.6-.89.6-1.45 0-1.13-.92-2.05-2.05-2.05-.57 0-1.08.23-1.45.6l-.6.6-.6-.59c-.37-.38-.89-.61-1.45-.61-1.13 0-2.05.92-2.05 2.05z"}));t.a=o},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(5),n=c.n(r),o=c(0),l=c(17);const a=e=>{let{countLabel:t,className:c,depth:r=0,controlId:a="",item:i,isSelected:s,isSingle:u,onSelect:b,search:d="",...g}=e;const m=null!=t&&void 0!==i.count&&null!==i.count,p=[c,"woocommerce-search-list__item"];p.push("depth-"+r),u&&p.push("is-radio-button"),m&&p.push("has-count");const h=i.breadcrumbs&&i.breadcrumbs.length,E=g.name||"search-list-item-"+a,O=`${E}-${i.id}`;return Object(o.createElement)("label",{htmlFor:O,className:p.join(" ")},u?Object(o.createElement)("input",n()({type:"radio",id:O,name:E,value:i.value,onChange:b(i),checked:s,className:"woocommerce-search-list__item-input"},g)):Object(o.createElement)("input",n()({type:"checkbox",id:O,name:E,value:i.value,onChange:b(i),checked:s,className:"woocommerce-search-list__item-input"},g)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},h?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(i.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(i.name,d))),!!m&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||i.count))};t.b=a},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},460:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(12),l=c(6),a=c(43),i=c(331),s=c(3),u=c(7),b=c(51),d=c.n(b),g=(c(10),c(58)),m=c(59),p=c(63),h=c(87),E=c(126),O=c(2);const w=()=>Object(r.createElement)(s.Placeholder,{icon:Object(r.createElement)(a.a,{srcElement:i.a}),label:Object(n.__)("On Sale Products","woo-gutenberg-products-block"),className:"wc-block-product-on-sale"},Object(n.__)("This block shows on-sale products. There are currently no discounted products in your store.","woo-gutenberg-products-block"));class j extends r.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{categories:c,catOperator:o,columns:l,contentVisibility:a,rows:i,orderby:b,alignButtons:d}=e;return Object(r.createElement)(u.InspectorControls,{key:"inspector"},Object(r.createElement)(s.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(m.a,{columns:l,rows:i,alignButtons:d,setAttributes:t,minColumns:Object(O.getSetting)("min_columns",1),maxColumns:Object(O.getSetting)("max_columns",6),minRows:Object(O.getSetting)("min_rows",1),maxRows:Object(O.getSetting)("max_rows",6)})),Object(r.createElement)(s.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(g.a,{settings:a,onChange:e=>t({contentVisibility:e})})),Object(r.createElement)(s.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(h.a,{setAttributes:t,value:b})),Object(r.createElement)(s.PanelBody,{title:Object(n.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(p.a,{selected:c,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=e.map(e=>{let{id:t}=e;return t});t({categories:c})},operator:o,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({catOperator:e})}})))}render(){const{attributes:e,name:t}=this.props;return e.isPreview?E.a:Object(r.createElement)(r.Fragment,null,this.getInspectorControls(),Object(r.createElement)(s.Disabled,null,Object(r.createElement)(d.a,{block:t,attributes:e,EmptyResponsePlaceholder:w})))}}var f=j,_=(c(330),c(70));Object(o.registerBlockType)("woocommerce/product-on-sale",{title:Object(n.__)("On Sale Products","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(a.a,{srcElement:i.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products currently on sale.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},attributes:{..._.a,orderby:{type:"string",default:"date"}},example:{attributes:{isPreview:!0}},transforms:{from:[{type:"block",blocks:Object(l.without)(_.b,"woocommerce/product-on-sale"),transform:e=>Object(o.createBlock)("woocommerce/product-on-sale",e)}]},edit:e=>Object(r.createElement)(f,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},58:function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(10),c(3));t.a=e=>{let{onChange:t,settings:c}=e;const{button:l,price:a,rating:i,title:s}=c;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:s?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...c,title:!s})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:a?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...c,price:!a})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:i?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...c,rating:!i})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...c,button:!l})}))}},59:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(6),l=(c(10),c(3));t.a=e=>{let{columns:t,rows:c,setAttributes:a,alignButtons:i,minColumns:s=1,maxColumns:u=6,minRows:b=1,maxRows:d=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(o.clamp)(e,s,u);a({columns:Number.isNaN(t)?"":t})},min:s,max:u}),Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(o.clamp)(e,b,d);a({rows:Number.isNaN(t)?"":t})},min:b,max:d}),Object(r.createElement)(l.ToggleControl,{label:Object(n.__)("Align Last Block","woo-gutenberg-products-block"),help:i?Object(n.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:i,onChange:()=>a({alignButtons:!i})}))}},6:function(e,t){e.exports=window.lodash},63:function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),l=c(1),a=(c(10),c(34)),i=c(86),s=c(3),u=c(9),b=c(27),d=c(28),g=Object(u.createHigherOrderComponent)(e=>class extends o.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(b.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:c,categories:r}=this.state;return Object(o.createElement)(e,n()({},this.props,{error:t,isLoading:c,categories:r}))}},"withCategories"),m=c(32),p=c(4),h=c.n(p);c(90);const E=e=>{let{categories:t,error:c,isLoading:r,onChange:u,onOperatorChange:b,operator:d,selected:g,isCompact:p,isSingle:E,showReviewCount:O}=e;const w={clear:Object(l.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(l.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(l.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(l._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Category search results updated.","woo-gutenberg-products-block")};return c?Object(o.createElement)(m.a,{error:c}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{className:"woocommerce-product-categories",list:t,isLoading:r,selected:g.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:u,renderItem:e=>{const{item:t,search:c,depth:r=0}=e,i=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,s=O?Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(l._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),i,t.review_count):Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(l._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),i,t.count),u=O?Object(l.sprintf)( +/* translators: %d is the count of reviews. */ +Object(l._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(l.sprintf)( +/* translators: %d is the count of products. */ +Object(l._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(o.createElement)(a.a,n()({className:h()("woocommerce-product-categories__item","has-count",{"is-searching":c.length>0,"is-skip-level":0===r&&0!==t.parent})},e,{countLabel:u,"aria-label":s}))},messages:w,isCompact:p,isHierarchical:!0,isSingle:E}),!!b&&Object(o.createElement)("div",{hidden:g.length<2},Object(o.createElement)(s.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(l.__)("Display products matching","woo-gutenberg-products-block"),help:Object(l.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:d,onChange:b,options:[{label:Object(l.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(l.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};E.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=g(E)},7:function(e,t){e.exports=window.wp.blockEditor},70:function(e,t,c){"use strict";c.d(t,"b",(function(){return n}));var r=c(2);const n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:Object(r.getSetting)("default_columns",3)},rows:{type:"number",default:Object(r.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},isPreview:{type:"boolean",default:!1}}},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(5),n=c.n(r),o=c(0),l=c(1),a=c(3),i=c(478),s=c(480),u=c(4),b=c.n(u),d=c(9),g=c(17),m=c(34),p=c(479),h=c(14);const E=e=>{let{id:t,label:c,popoverContents:r,remove:n,screenReaderLabel:s,className:u=""}=e;const[g,m]=Object(o.useState)(!1),O=Object(d.useInstanceId)(E);if(s=s||c,!c)return null;c=Object(h.decodeEntities)(c);const w=b()("woocommerce-tag",u,{"has-remove":!!n}),j="woocommerce-tag__label-"+O,f=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},s),Object(o.createElement)("span",{"aria-hidden":"true"},c));return Object(o.createElement)("span",{className:w},r?Object(o.createElement)(a.Button,{className:"woocommerce-tag__text",id:j,onClick:()=>m(!0)},f):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:j},f),r&&g&&Object(o.createElement)(a.Popover,{onClose:()=>m(!1)},r),n&&Object(o.createElement)(a.Button,{className:"woocommerce-tag__remove",onClick:n(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":j},Object(o.createElement)(i.a,{icon:p.a,size:20,className:"clear-icon"})))};var O=E;const w=e=>Object(o.createElement)(m.b,e),j=e=>{const{list:t,selected:c,renderItem:r,depth:l=0,onSelect:a,instanceId:i,isSingle:s,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const b=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:b,onSelect:a,isSingle:s,search:u,depth:l,controlId:i})),Object(o.createElement)(j,n()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:r,messages:n,onChange:i,onRemove:s}=e;if(t||c||!r)return null;const u=r.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,n.selected(u)),u>0?Object(o.createElement)(a.Button,{isLink:!0,isDestructive:!0,onClick:()=>i([]),"aria-label":n.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(o.createElement)("ul",null,r.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(O,{label:e.name,id:e.id,remove:s})))):null)},_=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:n,...a}=e;const{messages:u,renderItem:b,selected:d,isSingle:g}=a,m=b||w;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(i.a,{icon:s.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(j,{list:t,selected:d,renderItem:m,onSelect:r,instanceId:n,isSingle:g,search:c}))},y=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:l,isSingle:i,list:s,messages:u=g.a,onChange:m,onSearch:p,selected:h,debouncedSpeak:E}=e,[O,w]=Object(o.useState)(""),j=Object(d.useInstanceId)(y),x=Object(o.useMemo)(()=>({...g.a,...u}),[u]),k=Object(o.useMemo)(()=>Object(g.c)(s,O,r),[s,O,r]);Object(o.useEffect)(()=>{E&&E(x.updated)},[E,x]),Object(o.useEffect)(()=>{"function"==typeof p&&p(O)},[O,p]);const v=Object(o.useCallback)(e=>()=>{i&&m([]);const t=h.findIndex(t=>{let{id:c}=t;return c===e});m([...h.slice(0,t),...h.slice(t+1)])},[i,h,m]),S=Object(o.useCallback)(e=>()=>{-1===h.findIndex(t=>{let{id:c}=t;return c===e.id})?m(i?[e]:[...h,e]):v(e.id)()},[i,v,m,h]);return Object(o.createElement)("div",{className:b()("woocommerce-search-list",t,{"is-compact":c})},Object(o.createElement)(f,n()({},e,{onRemove:v,messages:x})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(a.TextControl,{label:x.search,type:"search",value:O,onChange:e=>w(e)})),l?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(a.Spinner,null)):Object(o.createElement)(_,n()({},e,{search:O,filteredList:k,messages:x,onSelect:S,instanceId:j})))};Object(a.withSpokenMessages)(y)},87:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(3);c(10),t.a=e=>{let{value:t,setAttributes:c}=e;return Object(r.createElement)(o.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>c({orderby:e})})}},9:function(e,t){e.exports=window.wp.compose},90:function(e,t){}}); \ No newline at end of file diff --git a/build/product-search.asset.php b/build/product-search.asset.php new file mode 100644 index 00000000000..c7ce9c57703 --- /dev/null +++ b/build/product-search.asset.php @@ -0,0 +1 @@ + array('wc-settings', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'b970314a26d8c65b95b1bb86836e7114'); \ No newline at end of file diff --git a/build/product-search.js b/build/product-search.js new file mode 100644 index 00000000000..9b85727f5e7 --- /dev/null +++ b/build/product-search.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-search"]=function(e){function t(t){for(var o,n,a=t[0],s=t[1],b=t[2],u=0,d=[];u{let{attributes:{label:t,placeholder:c,formId:l,className:n,hasLabel:a,align:s}}=e;const u=b()("wc-block-product-search",s?"align"+s:"",n);return Object(o.createElement)("div",{className:u},Object(o.createElement)("form",{role:"search",method:"get",action:i.HOME_URL},Object(o.createElement)("label",{htmlFor:l,className:a?"wc-block-product-search__label":"wc-block-product-search__label screen-reader-text"},t),Object(o.createElement)("div",{className:"wc-block-product-search__fields"},Object(o.createElement)("input",{type:"search",id:l,className:"wc-block-product-search__field",placeholder:c,name:"s"}),Object(o.createElement)("input",{type:"hidden",name:"post_type",value:"product"}),Object(o.createElement)("button",{type:"submit",className:"wc-block-product-search__button",label:Object(r.__)("Search","woo-gutenberg-products-block")},Object(o.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(o.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))},d=c(7),p=c(3),w=c(9),h=Object(w.withInstanceId)(e=>{let{attributes:{label:t,placeholder:c,formId:l,className:n,hasLabel:a,align:s},instanceId:i,setAttributes:u}=e;const w=b()("wc-block-product-search",s?"align"+s:"",n);return Object(o.useEffect)(()=>{l||u({formId:"wc-block-product-search-"+i})},[l,u,i]),Object(o.createElement)(o.Fragment,null,Object(o.createElement)(d.InspectorControls,{key:"inspector"},Object(o.createElement)(p.PanelBody,{title:Object(r.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(o.createElement)(p.ToggleControl,{label:Object(r.__)("Show search field label","woo-gutenberg-products-block"),help:a?Object(r.__)("Label is visible.","woo-gutenberg-products-block"):Object(r.__)("Label is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>u({hasLabel:!a})}))),Object(o.createElement)("div",{className:w},!!a&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("label",{className:"screen-reader-text",htmlFor:"wc-block-product-search__label"},Object(r.__)("Search Label","woo-gutenberg-products-block")),Object(o.createElement)(d.PlainText,{className:"wc-block-product-search__label",id:"wc-block-product-search__label",value:t,onChange:e=>u({label:e})})),Object(o.createElement)("div",{className:"wc-block-product-search__fields"},Object(o.createElement)(p.TextControl,{className:"wc-block-product-search__field input-control",value:c,placeholder:Object(r.__)("Enter search placeholder text","woo-gutenberg-products-block"),onChange:e=>u({placeholder:e})}),Object(o.createElement)("button",{type:"submit",className:"wc-block-product-search__button",label:Object(r.__)("Search","woo-gutenberg-products-block"),onClick:e=>e.preventDefault(),tabIndex:"-1"},Object(o.createElement)("svg",{"aria-hidden":"true",role:"img",focusable:"false",className:"dashicon dashicons-arrow-right-alt2",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},Object(o.createElement)("path",{d:"M6 15l5-5-5-5 1-2 7 7-7 7z"}))))))});const m={hasLabel:{type:"boolean",default:!0},label:{type:"string",default:Object(r.__)("Search","woo-gutenberg-products-block")},placeholder:{type:"string",default:Object(r.__)("Search products…","woo-gutenberg-products-block")},formId:{type:"string",default:""}};Object(l.registerBlockType)("woocommerce/product-search",{title:Object(r.__)("Product Search","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(n.a,{srcElement:a.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(r.__)("A search box to allow customers to search for products by keyword.","woo-gutenberg-products-block"),supports:{align:["wide","full"]},example:{attributes:{hasLabel:!0}},attributes:m,transforms:{from:[{type:"block",blocks:["core/legacy-widget"],isMatch:e=>{let{idBase:t,instance:c}=e;return"woocommerce_product_search"===t&&!(null==c||!c.raw)},transform:e=>{let{instance:t}=e;return Object(l.createBlock)("woocommerce/product-search",{label:""===t.raw.title?Object(r.__)("Search","woo-gutenberg-products-block"):t.raw.title})}}]},deprecated:[{attributes:m,save:e=>Object(o.createElement)("div",null,Object(o.createElement)(u,e))}],edit:h,save:()=>null})},7:function(e,t){e.exports=window.wp.blockEditor},9:function(e,t){e.exports=window.wp.compose}}); \ No newline at end of file diff --git a/build/product-tag.asset.php b/build/product-tag.asset.php new file mode 100644 index 00000000000..8a8b90e0c0f --- /dev/null +++ b/build/product-tag.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => '5d2eeafeb4ff30f4c0f07ee3dd4ad9a8'); \ No newline at end of file diff --git a/build/product-tag.js b/build/product-tag.js new file mode 100644 index 00000000000..1e9d0de88a1 --- /dev/null +++ b/build/product-tag.js @@ -0,0 +1,10 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-tag"]=function(e){function t(t){for(var r,l,i=t[0],s=t[1],a=t[2],d=0,b=[];dObject(o.sprintf)( +/* translators: Number of items selected from list. */ +Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(n.groupBy)(e,"parent"),r=Object(n.keyBy)(t,"id"),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=o(r[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:o(r[e.parent]),children:t&&t.length?l(t):[]}}),i=l(c[0]||[]);return delete c[0],Object(n.forEach)(c,e=>{i.push(...l(e||[]))}),i},s=(e,t,c)=>{if(!t)return c?i(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?i(n,e):n},a=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return i})),c.d(t,"n",(function(){return s})),c.d(t,"j",(function(){return a})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return b})),c.d(t,"k",(function(){return g})),c.d(t,"c",(function(){return h})),c.d(t,"d",(function(){return m})),c.d(t,"h",(function(){return p})),c.d(t,"a",(function(){return E})),c.d(t,"i",(function(){return O})),c.d(t,"b",(function(){return j}));var r,n=c(2);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",s=o.buildPhase,a=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,g=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),h=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),m=n.STORE_PAGES.cart.permalink,p=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),E=Object(n.getSetting)("allowedCountries",{}),O=Object(n.getSetting)("shippingStates",{}),j=Object(n.getSetting)("allowedStates",{})},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return a})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return g})),c.d(t,"c",(function(){return h})),c.d(t,"d",(function(){return m})),c.d(t,"g",(function(){return p})),c.d(t,"a",(function(){return E}));var r=c(15),n=c(11),o=c.n(n),l=c(6),i=c(2),s=c(25);const a=e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=s.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},i=[Object(r.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&i.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:c,queryArgs:n});return Promise.all(i.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),b=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),g=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(i.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},h=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),m=e=>o()({path:"wc/store/products/categories/"+e}),p=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},3:function(e,t){e.exports=window.wp.components},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(5),n=c.n(r),o=c(0),l=c(17);const i=e=>{let{countLabel:t,className:c,depth:r=0,controlId:i="",item:s,isSelected:a,isSingle:u,onSelect:d,search:b="",...g}=e;const h=null!=t&&void 0!==s.count&&null!==s.count,m=[c,"woocommerce-search-list__item"];m.push("depth-"+r),u&&m.push("is-radio-button"),h&&m.push("has-count");const p=s.breadcrumbs&&s.breadcrumbs.length,E=g.name||"search-list-item-"+i,O=`${E}-${s.id}`;return Object(o.createElement)("label",{htmlFor:O,className:m.join(" ")},u?Object(o.createElement)("input",n()({type:"radio",id:O,name:E,value:s.value,onChange:d(s),checked:a,className:"woocommerce-search-list__item-input"},g)):Object(o.createElement)("input",n()({type:"checkbox",id:O,name:E,value:s.value,onChange:d(s),checked:a,className:"woocommerce-search-list__item-input"},g)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},p?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(s.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(s.name,b))),!!h&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||s.count))};t.b=i},346:function(e,t,c){e.exports=c(449)},347:function(e,t){},348:function(e,t){},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},449:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(12),l=c(2),i=c(43),s=c(18),a=Object(r.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.97.89 1.66.89H22c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7.07L2.4 12l4.66-7H22v14z"}),Object(r.createElement)("circle",{cx:"9",cy:"12",r:"1.5"}),Object(r.createElement)("circle",{cx:"14",cy:"12",r:"1.5"}),Object(r.createElement)("circle",{cx:"19",cy:"12",r:"1.5"})),u=(c(347),c(7)),d=c(51),b=c.n(d),g=c(3),h=(c(10),c(58)),m=c(59),p=c(5),E=c.n(p),O=c(6),j=c(34),w=c(86),f=c(4),_=c.n(f),y=c(27);c(348);class x extends r.Component{constructor(){super(...arguments),this.state={list:[],loading:!0},this.renderItem=this.renderItem.bind(this),this.debouncedOnSearch=Object(O.debounce)(this.onSearch.bind(this),400)}componentDidMount(){const{selected:e}=this.props;Object(y.f)({selected:e}).then(e=>{this.setState({list:e,loading:!1})}).catch(()=>{this.setState({list:[],loading:!1})})}onSearch(e){const{selected:t}=this.props;this.setState({loading:!0}),Object(y.f)({selected:t,search:e}).then(e=>{this.setState({list:e,loading:!1})}).catch(()=>{this.setState({list:[],loading:!1})})}renderItem(e){const{item:t,search:c,depth:o=0}=e,l=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name;return Object(r.createElement)(j.a,E()({className:_()("woocommerce-product-tags__item","has-count",{"is-searching":c.length>0,"is-skip-level":0===o&&0!==t.parent})},e,{"aria-label":Object(n.sprintf)( +/* translators: %1$d is the count of products, %2$s is the name of the tag. */ +Object(n._n)("%1$d product tagged as %2$s","%1$d products tagged as %2$s",t.count,"woo-gutenberg-products-block"),t.count,l)}))}render(){const{list:e,loading:t}=this.state,{isCompact:c,onChange:o,onOperatorChange:i,operator:s,selected:a}=this.props,u={clear:Object(n.__)("Clear all product tags","woo-gutenberg-products-block"),list:Object(n.__)("Product Tags","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product tags.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product tags","woo-gutenberg-products-block"),selected:e=>Object(n.sprintf)( +/* translators: %d is the count of selected tags. */ +Object(n._n)("%d tag selected","%d tags selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Tag search results updated.","woo-gutenberg-products-block")},d=Object(l.getSetting)("limitTags",!1);return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(w.a,{className:"woocommerce-product-tags",list:e,isLoading:t,selected:a.map(t=>e.find(e=>e.id===t)).filter(Boolean),onChange:o,onSearch:d?this.debouncedOnSearch:null,renderItem:this.renderItem,messages:u,isCompact:c,isHierarchical:!0}),!!i&&Object(r.createElement)("div",{hidden:a.length<2},Object(r.createElement)(g.SelectControl,{className:"woocommerce-product-tags__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two tags to use this setting.","woo-gutenberg-products-block"),value:s,onChange:i,options:[{label:Object(n.__)("Any selected tags","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected tags","woo-gutenberg-products-block"),value:"all"}]})))}}x.defaultProps={isCompact:!1,operator:"any"};var k=x,v=c(87),S=c(126);class C extends r.Component{constructor(){super(...arguments),this.state={changedAttributes:{},isEditing:!1},this.startEditing=this.startEditing.bind(this),this.stopEditing=this.stopEditing.bind(this),this.setChangedAttributes=this.setChangedAttributes.bind(this),this.save=this.save.bind(this)}componentDidMount(){const{attributes:e}=this.props;e.tags.length||this.setState({isEditing:!0})}startEditing(){this.setState({isEditing:!0,changedAttributes:{}})}stopEditing(){this.setState({isEditing:!1,changedAttributes:{}})}setChangedAttributes(e){this.setState(t=>({changedAttributes:{...t.changedAttributes,...e}}))}save(){const{changedAttributes:e}=this.state,{setAttributes:t}=this.props;t(e),this.stopEditing()}getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{isEditing:c}=this.state,{columns:o,tagOperator:i,contentVisibility:s,orderby:a,rows:d,alignButtons:b}=e;return Object(r.createElement)(u.InspectorControls,{key:"inspector"},Object(r.createElement)(g.PanelBody,{title:Object(n.__)("Product Tag","woo-gutenberg-products-block"),initialOpen:!e.tags.length&&!c},Object(r.createElement)(k,{selected:e.tags,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=e.map(e=>{let{id:t}=e;return t});t({tags:c})},operator:i,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({tagOperator:e})},isCompact:!0})),Object(r.createElement)(g.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(m.a,{columns:o,rows:d,alignButtons:b,setAttributes:t,minColumns:Object(l.getSetting)("min_columns",1),maxColumns:Object(l.getSetting)("max_columns",6),minRows:Object(l.getSetting)("min_rows",1),maxRows:Object(l.getSetting)("max_rows",6)})),Object(r.createElement)(g.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(h.a,{settings:s,onChange:e=>t({contentVisibility:e})})),Object(r.createElement)(g.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(v.a,{setAttributes:t,value:a})))}renderEditMode(){var e=this;const{attributes:t,debouncedSpeak:c}=this.props,{changedAttributes:o}=this.state,l={...t,...o};return Object(r.createElement)(g.Placeholder,{icon:Object(r.createElement)(i.a,{srcElement:a,className:"block-editor-block-icon"}),label:Object(n.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(n.__)("Display a grid of products from your selected tags.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-product-tag__selection"},Object(r.createElement)(k,{selected:l.tags,onChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=t.map(e=>{let{id:t}=e;return t});e.setChangedAttributes({tags:c})},operator:l.tagOperator,onOperatorChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e.setChangedAttributes({tagOperator:t})}}),Object(r.createElement)(g.Button,{isPrimary:!0,onClick:()=>{this.save(),c(Object(n.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block")),Object(r.createElement)(g.Button,{className:"wc-block-product-tag__cancel-button",isTertiary:!0,onClick:()=>{this.stopEditing(),c(Object(n.__)("Showing Products by Tag block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Cancel","woo-gutenberg-products-block"))))}renderViewMode(){const{attributes:e,name:t}=this.props,c=e.tags.length;return Object(r.createElement)(g.Disabled,null,c?Object(r.createElement)(b.a,{block:t,attributes:e}):Object(r.createElement)(g.Placeholder,{icon:Object(r.createElement)(i.a,{icon:a,className:"block-editor-block-icon"}),label:Object(n.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(n.__)("This block displays products from selected tags. Select at least one tag to display its products.","woo-gutenberg-products-block")))}render(){const{isEditing:e}=this.state,{attributes:t}=this.props;return t.isPreview?S.a:Object(l.getSetting)("hasTags",!0)?Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.BlockControls,null,Object(r.createElement)(g.ToolbarGroup,{controls:[{icon:"edit",title:Object(n.__)("Edit selected tags","woo-gutenberg-products-block"),onClick:()=>e?this.stopEditing():this.startEditing(),isActive:e}]})),this.getInspectorControls(),e?this.renderEditMode():this.renderViewMode()):Object(r.createElement)(g.Placeholder,{icon:Object(r.createElement)(i.a,{icon:a,className:"block-editor-block-icon"}),label:Object(n.__)("Products by Tag","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-product-tag"},Object(n.__)("This block displays products from selected tags. In order to preview this you'll first need to create a product and assign it some tags.","woo-gutenberg-products-block"))}}var P=Object(g.withSpokenMessages)(C);Object(o.registerBlockType)("woocommerce/product-tag",{title:Object(n.__)("Products by Tag","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(i.a,{srcElement:a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products with selected tags.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{columns:{type:"number",default:Object(l.getSetting)("default_columns",3)},rows:{type:"number",default:Object(l.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},tags:{type:"array",default:[]},tagOperator:{type:"string",default:"any"},orderby:{type:"string",default:"date"},isPreview:{type:"boolean",default:!1}},edit:e=>Object(r.createElement)(P,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},58:function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(10),c(3));t.a=e=>{let{onChange:t,settings:c}=e;const{button:l,price:i,rating:s,title:a}=c;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:a?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...c,title:!a})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:i?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...c,price:!i})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:s?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...c,rating:!s})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...c,button:!l})}))}},59:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(6),l=(c(10),c(3));t.a=e=>{let{columns:t,rows:c,setAttributes:i,alignButtons:s,minColumns:a=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(o.clamp)(e,a,u);i({columns:Number.isNaN(t)?"":t})},min:a,max:u}),Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(o.clamp)(e,d,b);i({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(r.createElement)(l.ToggleControl,{label:Object(n.__)("Align Last Block","woo-gutenberg-products-block"),help:s?Object(n.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:s,onChange:()=>i({alignButtons:!s})}))}},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(5),n=c.n(r),o=c(0),l=c(1),i=c(3),s=c(478),a=c(480),u=c(4),d=c.n(u),b=c(9),g=c(17),h=c(34),m=c(479),p=c(14);const E=e=>{let{id:t,label:c,popoverContents:r,remove:n,screenReaderLabel:a,className:u=""}=e;const[g,h]=Object(o.useState)(!1),O=Object(b.useInstanceId)(E);if(a=a||c,!c)return null;c=Object(p.decodeEntities)(c);const j=d()("woocommerce-tag",u,{"has-remove":!!n}),w="woocommerce-tag__label-"+O,f=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},a),Object(o.createElement)("span",{"aria-hidden":"true"},c));return Object(o.createElement)("span",{className:j},r?Object(o.createElement)(i.Button,{className:"woocommerce-tag__text",id:w,onClick:()=>h(!0)},f):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:w},f),r&&g&&Object(o.createElement)(i.Popover,{onClose:()=>h(!1)},r),n&&Object(o.createElement)(i.Button,{className:"woocommerce-tag__remove",onClick:n(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":w},Object(o.createElement)(s.a,{icon:m.a,size:20,className:"clear-icon"})))};var O=E;const j=e=>Object(o.createElement)(h.b,e),w=e=>{const{list:t,selected:c,renderItem:r,depth:l=0,onSelect:i,instanceId:s,isSingle:a,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:d,onSelect:i,isSingle:a,search:u,depth:l,controlId:s})),Object(o.createElement)(w,n()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:r,messages:n,onChange:s,onRemove:a}=e;if(t||c||!r)return null;const u=r.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,n.selected(u)),u>0?Object(o.createElement)(i.Button,{isLink:!0,isDestructive:!0,onClick:()=>s([]),"aria-label":n.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(o.createElement)("ul",null,r.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(O,{label:e.name,id:e.id,remove:a})))):null)},_=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:n,...i}=e;const{messages:u,renderItem:d,selected:b,isSingle:g}=i,h=d||j;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(s.a,{icon:a.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(w,{list:t,selected:b,renderItem:h,onSelect:r,instanceId:n,isSingle:g,search:c}))},y=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:l,isSingle:s,list:a,messages:u=g.a,onChange:h,onSearch:m,selected:p,debouncedSpeak:E}=e,[O,j]=Object(o.useState)(""),w=Object(b.useInstanceId)(y),x=Object(o.useMemo)(()=>({...g.a,...u}),[u]),k=Object(o.useMemo)(()=>Object(g.c)(a,O,r),[a,O,r]);Object(o.useEffect)(()=>{E&&E(x.updated)},[E,x]),Object(o.useEffect)(()=>{"function"==typeof m&&m(O)},[O,m]);const v=Object(o.useCallback)(e=>()=>{s&&h([]);const t=p.findIndex(t=>{let{id:c}=t;return c===e});h([...p.slice(0,t),...p.slice(t+1)])},[s,p,h]),S=Object(o.useCallback)(e=>()=>{-1===p.findIndex(t=>{let{id:c}=t;return c===e.id})?h(s?[e]:[...p,e]):v(e.id)()},[s,v,h,p]);return Object(o.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(o.createElement)(f,n()({},e,{onRemove:v,messages:x})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(i.TextControl,{label:x.search,type:"search",value:O,onChange:e=>j(e)})),l?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(i.Spinner,null)):Object(o.createElement)(_,n()({},e,{search:O,filteredList:k,messages:x,onSelect:S,instanceId:w})))};Object(i.withSpokenMessages)(y)},87:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(3);c(10),t.a=e=>{let{value:t,setAttributes:c}=e;return Object(r.createElement)(o.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>c({orderby:e})})}},9:function(e,t){e.exports=window.wp.compose}}); \ No newline at end of file diff --git a/build/product-top-rated.asset.php b/build/product-top-rated.asset.php new file mode 100644 index 00000000000..996e9fe6115 --- /dev/null +++ b/build/product-top-rated.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => 'df9c98e251cb4be340d220d00ebafe6f'); \ No newline at end of file diff --git a/build/product-top-rated.js b/build/product-top-rated.js new file mode 100644 index 00000000000..f7f8d1e5ac0 --- /dev/null +++ b/build/product-top-rated.js @@ -0,0 +1,16 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["product-top-rated"]=function(e){function t(t){for(var r,l,i=t[0],a=t[1],s=t[2],d=0,b=[];dObject(o.sprintf)( +/* translators: Number of items selected from list. */ +Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(n.groupBy)(e,"parent"),r=Object(n.keyBy)(t,"id"),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=o(r[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:o(r[e.parent]),children:t&&t.length?l(t):[]}}),i=l(c[0]||[]);return delete c[0],Object(n.forEach)(c,e=>{i.push(...l(e||[]))}),i},a=(e,t,c)=>{if(!t)return c?i(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?i(n,e):n},s=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return i})),c.d(t,"n",(function(){return a})),c.d(t,"j",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return b})),c.d(t,"k",(function(){return m})),c.d(t,"c",(function(){return g})),c.d(t,"d",(function(){return h})),c.d(t,"h",(function(){return p})),c.d(t,"a",(function(){return E})),c.d(t,"i",(function(){return O})),c.d(t,"b",(function(){return w}));var r,n=c(2);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",a=o.buildPhase,s=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,d=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,m=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),g=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),h=n.STORE_PAGES.cart.permalink,p=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),E=Object(n.getSetting)("allowedCountries",{}),O=Object(n.getSetting)("shippingStates",{}),w=Object(n.getSetting)("allowedStates",{})},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return b})),c.d(t,"f",(function(){return m})),c.d(t,"c",(function(){return g})),c.d(t,"d",(function(){return h})),c.d(t,"g",(function(){return p})),c.d(t,"a",(function(){return E}));var r=c(15),n=c(11),o=c.n(n),l=c(6),i=c(2),a=c(25);const s=e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=a.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},i=[Object(r.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&i.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:c,queryArgs:n});return Promise.all(i.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),d=()=>o()({path:"wc/store/products/attributes"}),b=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(i.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},g=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),h=e=>o()({path:"wc/store/products/categories/"+e}),p=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(31);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},332:function(e,t,c){e.exports=c(455)},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(5),n=c.n(r),o=c(0),l=c(17);const i=e=>{let{countLabel:t,className:c,depth:r=0,controlId:i="",item:a,isSelected:s,isSingle:u,onSelect:d,search:b="",...m}=e;const g=null!=t&&void 0!==a.count&&null!==a.count,h=[c,"woocommerce-search-list__item"];h.push("depth-"+r),u&&h.push("is-radio-button"),g&&h.push("has-count");const p=a.breadcrumbs&&a.breadcrumbs.length,E=m.name||"search-list-item-"+i,O=`${E}-${a.id}`;return Object(o.createElement)("label",{htmlFor:O,className:h.join(" ")},u?Object(o.createElement)("input",n()({type:"radio",id:O,name:E,value:a.value,onChange:d(a),checked:s,className:"woocommerce-search-list__item-input"},m)):Object(o.createElement)("input",n()({type:"checkbox",id:O,name:E,value:a.value,onChange:d(a),checked:s,className:"woocommerce-search-list__item-input"},m)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},p?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(a.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(a.name,b))),!!g&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||a.count))};t.b=i},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},455:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(12),l=c(43),i=c(18),a=Object(r.createElement)(i.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{opacity:".87",fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M21 8h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2zm0 4l-3 7H9V9l4.34-4.34L12.23 10H21v2zM1 9h4v12H1z"})),s=c(6),u=c(3),d=c(7),b=c(51),m=c.n(b),g=(c(10),c(58)),h=c(59),p=c(63),E=c(126),O=c(2);class w extends r.Component{getInspectorControls(){const{attributes:e,setAttributes:t}=this.props,{categories:c,catOperator:o,columns:l,contentVisibility:i,rows:a,alignButtons:s}=e;return Object(r.createElement)(d.InspectorControls,{key:"inspector"},Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(h.a,{columns:l,rows:a,alignButtons:s,setAttributes:t,minColumns:Object(O.getSetting)("min_columns",1),maxColumns:Object(O.getSetting)("max_columns",6),minRows:Object(O.getSetting)("min_rows",1),maxRows:Object(O.getSetting)("max_rows",6)})),Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(g.a,{settings:i,onChange:e=>t({contentVisibility:e})})),Object(r.createElement)(u.PanelBody,{title:Object(n.__)("Filter by Product Category","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(p.a,{selected:c,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=e.map(e=>{let{id:t}=e;return t});t({categories:c})},operator:o,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({catOperator:e})}})))}render(){const{name:e,attributes:t}=this.props;return t.isPreview?E.a:Object(r.createElement)(r.Fragment,null,this.getInspectorControls(),Object(r.createElement)(u.Disabled,null,Object(r.createElement)(m.a,{block:e,attributes:t})))}}var j=w,f=c(70);Object(o.registerBlockType)("woocommerce/product-top-rated",{title:Object(n.__)("Top Rated Products","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(l.a,{srcElement:a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of your top rated products.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{...f.a},transforms:{from:[{type:"block",blocks:Object(s.without)(f.b,"woocommerce/product-top-rated"),transform:e=>Object(o.createBlock)("woocommerce/product-top-rated",e)}]},edit:e=>Object(r.createElement)(j,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},58:function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(10),c(3));t.a=e=>{let{onChange:t,settings:c}=e;const{button:l,price:i,rating:a,title:s}=c;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:s?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...c,title:!s})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:i?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...c,price:!i})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...c,rating:!a})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...c,button:!l})}))}},59:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(6),l=(c(10),c(3));t.a=e=>{let{columns:t,rows:c,setAttributes:i,alignButtons:a,minColumns:s=1,maxColumns:u=6,minRows:d=1,maxRows:b=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(o.clamp)(e,s,u);i({columns:Number.isNaN(t)?"":t})},min:s,max:u}),Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(o.clamp)(e,d,b);i({rows:Number.isNaN(t)?"":t})},min:d,max:b}),Object(r.createElement)(l.ToggleControl,{label:Object(n.__)("Align Last Block","woo-gutenberg-products-block"),help:a?Object(n.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:a,onChange:()=>i({alignButtons:!a})}))}},6:function(e,t){e.exports=window.lodash},63:function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),l=c(1),i=(c(10),c(34)),a=c(86),s=c(3),u=c(9),d=c(27),b=c(28),m=Object(u.createHigherOrderComponent)(e=>class extends o.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(d.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:c,categories:r}=this.state;return Object(o.createElement)(e,n()({},this.props,{error:t,isLoading:c,categories:r}))}},"withCategories"),g=c(32),h=c(4),p=c.n(h);c(90);const E=e=>{let{categories:t,error:c,isLoading:r,onChange:u,onOperatorChange:d,operator:b,selected:m,isCompact:h,isSingle:E,showReviewCount:O}=e;const w={clear:Object(l.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(l.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(l.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(l.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(l.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(l._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(l.__)("Category search results updated.","woo-gutenberg-products-block")};return c?Object(o.createElement)(g.a,{error:c}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)(a.a,{className:"woocommerce-product-categories",list:t,isLoading:r,selected:m.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:u,renderItem:e=>{const{item:t,search:c,depth:r=0}=e,a=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,s=O?Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(l._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),a,t.review_count):Object(l.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(l._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),a,t.count),u=O?Object(l.sprintf)( +/* translators: %d is the count of reviews. */ +Object(l._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(l.sprintf)( +/* translators: %d is the count of products. */ +Object(l._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(o.createElement)(i.a,n()({className:p()("woocommerce-product-categories__item","has-count",{"is-searching":c.length>0,"is-skip-level":0===r&&0!==t.parent})},e,{countLabel:u,"aria-label":s}))},messages:w,isCompact:h,isHierarchical:!0,isSingle:E}),!!d&&Object(o.createElement)("div",{hidden:m.length<2},Object(o.createElement)(s.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(l.__)("Display products matching","woo-gutenberg-products-block"),help:Object(l.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:b,onChange:d,options:[{label:Object(l.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(l.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};E.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=m(E)},7:function(e,t){e.exports=window.wp.blockEditor},70:function(e,t,c){"use strict";c.d(t,"b",(function(){return n}));var r=c(2);const n=["woocommerce/product-best-sellers","woocommerce/product-category","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated"];t.a={columns:{type:"number",default:Object(r.getSetting)("default_columns",3)},rows:{type:"number",default:Object(r.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},categories:{type:"array",default:[]},catOperator:{type:"string",default:"any"},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},isPreview:{type:"boolean",default:!1}}},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(5),n=c.n(r),o=c(0),l=c(1),i=c(3),a=c(478),s=c(480),u=c(4),d=c.n(u),b=c(9),m=c(17),g=c(34),h=c(479),p=c(14);const E=e=>{let{id:t,label:c,popoverContents:r,remove:n,screenReaderLabel:s,className:u=""}=e;const[m,g]=Object(o.useState)(!1),O=Object(b.useInstanceId)(E);if(s=s||c,!c)return null;c=Object(p.decodeEntities)(c);const w=d()("woocommerce-tag",u,{"has-remove":!!n}),j="woocommerce-tag__label-"+O,f=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},s),Object(o.createElement)("span",{"aria-hidden":"true"},c));return Object(o.createElement)("span",{className:w},r?Object(o.createElement)(i.Button,{className:"woocommerce-tag__text",id:j,onClick:()=>g(!0)},f):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:j},f),r&&m&&Object(o.createElement)(i.Popover,{onClose:()=>g(!1)},r),n&&Object(o.createElement)(i.Button,{className:"woocommerce-tag__remove",onClick:n(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":j},Object(o.createElement)(a.a,{icon:h.a,size:20,className:"clear-icon"})))};var O=E;const w=e=>Object(o.createElement)(g.b,e),j=e=>{const{list:t,selected:c,renderItem:r,depth:l=0,onSelect:i,instanceId:a,isSingle:s,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:d,onSelect:i,isSingle:s,search:u,depth:l,controlId:a})),Object(o.createElement)(j,n()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:r,messages:n,onChange:a,onRemove:s}=e;if(t||c||!r)return null;const u=r.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,n.selected(u)),u>0?Object(o.createElement)(i.Button,{isLink:!0,isDestructive:!0,onClick:()=>a([]),"aria-label":n.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(o.createElement)("ul",null,r.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(O,{label:e.name,id:e.id,remove:s})))):null)},_=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:n,...i}=e;const{messages:u,renderItem:d,selected:b,isSingle:m}=i,g=d||w;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(a.a,{icon:s.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(j,{list:t,selected:b,renderItem:g,onSelect:r,instanceId:n,isSingle:m,search:c}))},y=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:l,isSingle:a,list:s,messages:u=m.a,onChange:g,onSearch:h,selected:p,debouncedSpeak:E}=e,[O,w]=Object(o.useState)(""),j=Object(b.useInstanceId)(y),x=Object(o.useMemo)(()=>({...m.a,...u}),[u]),v=Object(o.useMemo)(()=>Object(m.c)(s,O,r),[s,O,r]);Object(o.useEffect)(()=>{E&&E(x.updated)},[E,x]),Object(o.useEffect)(()=>{"function"==typeof h&&h(O)},[O,h]);const k=Object(o.useCallback)(e=>()=>{a&&g([]);const t=p.findIndex(t=>{let{id:c}=t;return c===e});g([...p.slice(0,t),...p.slice(t+1)])},[a,p,g]),S=Object(o.useCallback)(e=>()=>{-1===p.findIndex(t=>{let{id:c}=t;return c===e.id})?g(a?[e]:[...p,e]):k(e.id)()},[a,k,g,p]);return Object(o.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(o.createElement)(f,n()({},e,{onRemove:k,messages:x})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(i.TextControl,{label:x.search,type:"search",value:O,onChange:e=>w(e)})),l?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(i.Spinner,null)):Object(o.createElement)(_,n()({},e,{search:O,filteredList:v,messages:x,onSelect:S,instanceId:j})))};Object(i.withSpokenMessages)(y)},9:function(e,t){e.exports=window.wp.compose},90:function(e,t){}}); \ No newline at end of file diff --git a/build/products-by-attribute.asset.php b/build/products-by-attribute.asset.php new file mode 100644 index 00000000000..f178af5f94c --- /dev/null +++ b/build/products-by-attribute.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-server-side-render', 'wp-url'), 'version' => 'da1af565b3a6734c30d4caa001540d5d'); \ No newline at end of file diff --git a/build/products-by-attribute.js b/build/products-by-attribute.js new file mode 100644 index 00000000000..294ee289663 --- /dev/null +++ b/build/products-by-attribute.js @@ -0,0 +1,16 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["products-by-attribute"]=function(e){function t(t){for(var r,l,i=t[0],a=t[1],s=t[2],b=0,d=[];bObject(o.sprintf)( +/* translators: Number of items selected from list. */ +Object(o._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(o.__)("Search results updated.","woo-gutenberg-products-block")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(n.groupBy)(e,"parent"),r=Object(n.keyBy)(t,"id"),o=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=o(r[e.parent]);return[...t,e.name]},l=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:o(r[e.parent]),children:t&&t.length?l(t):[]}}),i=l(c[0]||[]);return delete c[0],Object(n.forEach)(c,e=>{i.push(...l(e||[]))}),i},a=(e,t,c)=>{if(!t)return c?i(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?i(n,e):n},s=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return o})),c.d(t,"m",(function(){return l})),c.d(t,"l",(function(){return i})),c.d(t,"n",(function(){return a})),c.d(t,"j",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return b})),c.d(t,"g",(function(){return d})),c.d(t,"k",(function(){return m})),c.d(t,"c",(function(){return g})),c.d(t,"d",(function(){return p})),c.d(t,"h",(function(){return h})),c.d(t,"a",(function(){return E})),c.d(t,"i",(function(){return O})),c.d(t,"b",(function(){return j}));var r,n=c(2);const o=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),l=o.pluginUrl+"images/",i=o.pluginUrl+"build/",a=o.buildPhase,s=null===(r=n.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=n.STORE_PAGES.checkout.id,b=n.STORE_PAGES.checkout.permalink,d=n.STORE_PAGES.privacy.permalink,m=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),g=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),p=n.STORE_PAGES.cart.permalink,h=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),E=Object(n.getSetting)("allowedCountries",{}),O=Object(n.getSetting)("shippingStates",{}),j=Object(n.getSetting)("allowedStates",{})},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return s})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return b})),c.d(t,"i",(function(){return d})),c.d(t,"f",(function(){return m})),c.d(t,"c",(function(){return g})),c.d(t,"d",(function(){return p})),c.d(t,"g",(function(){return h})),c.d(t,"a",(function(){return E}));var r=c(15),n=c(11),o=c.n(n),l=c(6),i=c(2),a=c(25);const s=e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const i=(e=>{let{selected:t=[],search:c="",queryArgs:n={}}=e;const o=a.o.productCount>100,l={per_page:o?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},i=[Object(r.addQueryArgs)("/wc/store/products",{...l,...n})];return o&&t.length&&i.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),i})({selected:t,search:c,queryArgs:n});return Promise.all(i.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>o()({path:"/wc/store/products/"+e}),b=()=>o()({path:"wc/store/products/attributes"}),d=e=>o()({path:`wc/store/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:c}=e;const n=(e=>{let{selected:t=[],search:c}=e;const n=Object(i.getSetting)("limitTags",!1),o=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:c})];return n&&t.length&&o.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),o})({selected:t,search:c});return Promise.all(n.map(e=>o()({path:e}))).then(e=>Object(l.uniqBy)(Object(l.flatten)(e),"id"))},g=e=>o()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),p=e=>o()({path:"wc/store/products/categories/"+e}),h=e=>o()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),E=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},o=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(31);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(o.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},333:function(e,t,c){e.exports=c(444)},334:function(e,t){},335:function(e,t){},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(5),n=c.n(r),o=c(0),l=c(17);const i=e=>{let{countLabel:t,className:c,depth:r=0,controlId:i="",item:a,isSelected:s,isSingle:u,onSelect:b,search:d="",...m}=e;const g=null!=t&&void 0!==a.count&&null!==a.count,p=[c,"woocommerce-search-list__item"];p.push("depth-"+r),u&&p.push("is-radio-button"),g&&p.push("has-count");const h=a.breadcrumbs&&a.breadcrumbs.length,E=m.name||"search-list-item-"+i,O=`${E}-${a.id}`;return Object(o.createElement)("label",{htmlFor:O,className:p.join(" ")},u?Object(o.createElement)("input",n()({type:"radio",id:O,name:E,value:a.value,onChange:b(a),checked:s,className:"woocommerce-search-list__item-input"},m)):Object(o.createElement)("input",n()({type:"checkbox",id:O,name:E,value:a.value,onChange:b(a),checked:s,className:"woocommerce-search-list__item-input"},m)),Object(o.createElement)("span",{className:"woocommerce-search-list__item-label"},h?Object(o.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(l.b)(a.breadcrumbs)):null,Object(o.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(l.d)(a.name,d))),!!g&&Object(o.createElement)("span",{className:"woocommerce-search-list__item-count"},t||a.count))};t.b=i},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...n}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...n}):null}},444:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(43),l=c(18),i=Object(r.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(r.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(r.createElement)("path",{d:"M2.53 19.65l1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zm-9.2 3.8L7.87 7.79l7.35-3.04h.01l4.95 11.95-7.35 3.05z"}),Object(r.createElement)("circle",{cx:"11",cy:"9",r:"1"}),Object(r.createElement)("path",{d:"M5.88 19.75c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"})),a=c(12),s=c(2),u=(c(334),c(7)),b=c(51),d=c.n(b),m=c(3),g=(c(10),c(58)),p=c(59),h=c(5),E=c.n(h),O=c(34),j=c(86),w=c(9),f=c(27),_=c(28);const y=function(e,t){let c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";return Array.isArray(t)?t.find(t=>t[c]===e):null};var x=c(32),k=c(4),v=c.n(k),S=c(88);c(335);const C=e=>{let{attributes:t,error:c,expandedAttribute:o,onChange:l,onExpandAttribute:i,onOperatorChange:a,instanceId:s,isCompact:u,isLoading:b,operator:d,selected:g,termsAreLoading:p,termsList:h}=e;const w=[...t,...h[o]||[]],f={clear:Object(n.__)("Clear all product attributes","woo-gutenberg-products-block"),list:Object(n.__)("Product Attributes","woo-gutenberg-products-block"),noItems:Object(n.__)("Your store doesn't have any product attributes.","woo-gutenberg-products-block"),search:Object(n.__)("Search for product attributes","woo-gutenberg-products-block"),selected:e=>Object(n.sprintf)( +/* translators: %d is the count of attributes selected. */ +Object(n._n)("%d attribute selected","%d attributes selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Product attribute search results updated.","woo-gutenberg-products-block")};return c?Object(r.createElement)(x.a,{error:c}):Object(r.createElement)(r.Fragment,null,Object(r.createElement)(j.a,{className:"woocommerce-product-attributes",list:w,isLoading:b,selected:g.map(e=>{let{id:t}=e;return w.find(e=>e.id===t)}).filter(Boolean),onChange:l,renderItem:e=>{const{item:t,search:c,depth:a=0}=e,u=["woocommerce-product-attributes__item","woocommerce-search-list__item",{"is-searching":c.length>0,"is-skip-level":0===a&&0!==t.parent}];if(!t.breadcrumbs.length){const c=o===t.id;return Object(r.createElement)(S.a,E()({},e,{className:v()(...u,{"is-selected":c}),isSelected:c,item:t,isLoading:p,disabled:"0"===t.count,onSelect:e=>{let{id:t}=e;return()=>{l([]),i(t)}},name:"attributes-"+s,countLabel:Object(n.sprintf)( +/* translators: %d is the count of terms. */ +Object(n._n)("%d term","%d terms",t.count,"woo-gutenberg-products-block"),t.count),"aria-label":Object(n.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of terms for the item. */ +Object(n._n)("%1$s, has %2$d term","%1$s, has %2$d terms",t.count,"woo-gutenberg-products-block"),t.name,t.count)}))}const b=`${t.breadcrumbs[0]}: ${t.name}`;return Object(r.createElement)(O.a,E()({},e,{name:"terms-"+s,className:v()(...u,"has-count"),countLabel:Object(n.sprintf)( +/* translators: %d is the count of products. */ +Object(n._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count),"aria-label":Object(n.sprintf)( +/* translators: %1$s is the attribute name, %2$d is the count of products for that attribute. */ +Object(n._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),b,t.count)}))},messages:f,isCompact:u,isHierarchical:!0}),!!a&&Object(r.createElement)("div",{hidden:g.length<2},Object(r.createElement)(m.SelectControl,{className:"woocommerce-product-attributes__operator",label:Object(n.__)("Display products matching","woo-gutenberg-products-block"),help:Object(n.__)("Pick at least two attributes to use this setting.","woo-gutenberg-products-block"),value:d,onChange:a,options:[{label:Object(n.__)("Any selected attributes","woo-gutenberg-products-block"),value:"any"},{label:Object(n.__)("All selected attributes","woo-gutenberg-products-block"),value:"all"}]})))};C.defaultProps={isCompact:!1,operator:"any"};var P,A=(P=Object(w.withInstanceId)(C),e=>{const{selected:t=[]}=e,c=t.length?t[0].attr_slug:null,[n,o]=Object(r.useState)(null),[l,i]=Object(r.useState)(0),[a,s]=Object(r.useState)({}),[u,b]=Object(r.useState)(!0),[d,m]=Object(r.useState)(!1),[g,p]=Object(r.useState)(null);return Object(r.useEffect)(()=>{null===n&&Object(f.b)().then(e=>{if(e=e.map(e=>({...e,parent:0})),o(e),c){const t=y(c,e,"taxonomy");t&&i(t.id)}}).catch(async e=>{p(await Object(_.a)(e))}).finally(()=>{b(!1)})},[n,c]),Object(r.useEffect)(()=>{const e=y(l,n);e&&(m(!0),Object(f.i)(l).then(t=>{t=t.map(t=>({...t,parent:l,attr_slug:e.taxonomy})),s(e=>({...e,[l]:t}))}).catch(async e=>{p(await Object(_.a)(e))}).finally(()=>{m(!1)}))},[l,n]),Object(r.createElement)(P,E()({},e,{attributes:n||[],error:g,expandedAttribute:l,onExpandAttribute:i,isLoading:u,termsAreLoading:d,termsList:a}))}),N=c(87),T=c(126);class B extends r.Component{getInspectorControls(){const{setAttributes:e}=this.props,{attributes:t,attrOperator:c,columns:o,contentVisibility:l,orderby:i,rows:a,alignButtons:b}=this.props.attributes;return Object(r.createElement)(u.InspectorControls,{key:"inspector"},Object(r.createElement)(m.PanelBody,{title:Object(n.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(p.a,{columns:o,rows:a,alignButtons:b,setAttributes:e,minColumns:Object(s.getSetting)("min_columns",1),maxColumns:Object(s.getSetting)("max_columns",6),minRows:Object(s.getSetting)("min_rows",1),maxRows:Object(s.getSetting)("max_rows",6)})),Object(r.createElement)(m.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block"),initialOpen:!0},Object(r.createElement)(g.a,{settings:l,onChange:t=>e({contentVisibility:t})})),Object(r.createElement)(m.PanelBody,{title:Object(n.__)("Filter by Product Attribute","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(A,{selected:t,onChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=t.map(e=>{let{id:t,attr_slug:c}=e;return{id:t,attr_slug:c}});e({attributes:c})},operator:c,onOperatorChange:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return e({attrOperator:t})},isCompact:!0})),Object(r.createElement)(m.PanelBody,{title:Object(n.__)("Order By","woo-gutenberg-products-block"),initialOpen:!1},Object(r.createElement)(N.a,{setAttributes:e,value:i})))}renderEditMode(){const{debouncedSpeak:e,setAttributes:t}=this.props,c=this.props.attributes;return Object(r.createElement)(m.Placeholder,{icon:Object(r.createElement)(o.a,{srcElement:i}),label:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),className:"wc-block-products-grid wc-block-products-by-attribute"},Object(n.__)("Display a grid of products from your selected attributes.","woo-gutenberg-products-block"),Object(r.createElement)("div",{className:"wc-block-products-by-attribute__selection"},Object(r.createElement)(A,{selected:c.attributes,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const c=e.map(e=>{let{id:t,attr_slug:c}=e;return{id:t,attr_slug:c}});t({attributes:c})},operator:c.attrOperator,onOperatorChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"any";return t({attrOperator:e})}}),Object(r.createElement)(m.Button,{isPrimary:!0,onClick:()=>{t({editMode:!1}),e(Object(n.__)("Showing Products by Attribute block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))))}render(){const{attributes:e,name:t,setAttributes:c}=this.props,{editMode:o}=e;return e.isPreview?T.a:Object(r.createElement)(r.Fragment,null,Object(r.createElement)(u.BlockControls,null,Object(r.createElement)(m.ToolbarGroup,{controls:[{icon:"edit",title:Object(n.__)("Edit selected attribute","woo-gutenberg-products-block"),onClick:()=>c({editMode:!o}),isActive:o}]})),this.getInspectorControls(),o?this.renderEditMode():Object(r.createElement)(m.Disabled,null,Object(r.createElement)(d.a,{block:t,attributes:e})))}}var R=Object(m.withSpokenMessages)(B);Object(a.registerBlockType)("woocommerce/products-by-attribute",{title:Object(n.__)("Products by Attribute","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(o.a,{srcElement:i,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a grid of products with selected attributes.","woo-gutenberg-products-block"),supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{attributes:{type:"array",default:[]},attrOperator:{type:"string",default:"any"},columns:{type:"number",default:Object(s.getSetting)("default_columns",3)},editMode:{type:"boolean",default:!0},contentVisibility:{type:"object",default:{title:!0,price:!0,rating:!0,button:!0}},orderby:{type:"string",default:"date"},rows:{type:"number",default:Object(s.getSetting)("default_rows",3)},alignButtons:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:e=>Object(r.createElement)(R,e),save:()=>null})},51:function(e,t){e.exports=window.wp.serverSideRender},58:function(e,t,c){"use strict";var r=c(0),n=c(1),o=(c(10),c(3));t.a=e=>{let{onChange:t,settings:c}=e;const{button:l,price:i,rating:a,title:s}=c;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product title","woo-gutenberg-products-block"),help:s?Object(n.__)("Product title is visible.","woo-gutenberg-products-block"):Object(n.__)("Product title is hidden.","woo-gutenberg-products-block"),checked:s,onChange:()=>t({...c,title:!s})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product price","woo-gutenberg-products-block"),help:i?Object(n.__)("Product price is visible.","woo-gutenberg-products-block"):Object(n.__)("Product price is hidden.","woo-gutenberg-products-block"),checked:i,onChange:()=>t({...c,price:!i})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),help:a?Object(n.__)("Product rating is visible.","woo-gutenberg-products-block"):Object(n.__)("Product rating is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>t({...c,rating:!a})}),Object(r.createElement)(o.ToggleControl,{label:Object(n.__)("Add to Cart button","woo-gutenberg-products-block"),help:l?Object(n.__)("Add to Cart button is visible.","woo-gutenberg-products-block"):Object(n.__)("Add to Cart button is hidden.","woo-gutenberg-products-block"),checked:l,onChange:()=>t({...c,button:!l})}))}},59:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(6),l=(c(10),c(3));t.a=e=>{let{columns:t,rows:c,setAttributes:i,alignButtons:a,minColumns:s=1,maxColumns:u=6,minRows:b=1,maxRows:d=6}=e;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Columns","woo-gutenberg-products-block"),value:t,onChange:e=>{const t=Object(o.clamp)(e,s,u);i({columns:Number.isNaN(t)?"":t})},min:s,max:u}),Object(r.createElement)(l.RangeControl,{label:Object(n.__)("Rows","woo-gutenberg-products-block"),value:c,onChange:e=>{const t=Object(o.clamp)(e,b,d);i({rows:Number.isNaN(t)?"":t})},min:b,max:d}),Object(r.createElement)(l.ToggleControl,{label:Object(n.__)("Align Last Block","woo-gutenberg-products-block"),help:a?Object(n.__)("The last inner block will be aligned vertically.","woo-gutenberg-products-block"):Object(n.__)("The last inner block will follow other content.","woo-gutenberg-products-block"),checked:a,onChange:()=>i({alignButtons:!a})}))}},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var r=c(5),n=c.n(r),o=c(0),l=c(1),i=c(3),a=c(478),s=c(480),u=c(4),b=c.n(u),d=c(9),m=c(17),g=c(34),p=c(479),h=c(14);const E=e=>{let{id:t,label:c,popoverContents:r,remove:n,screenReaderLabel:s,className:u=""}=e;const[m,g]=Object(o.useState)(!1),O=Object(d.useInstanceId)(E);if(s=s||c,!c)return null;c=Object(h.decodeEntities)(c);const j=b()("woocommerce-tag",u,{"has-remove":!!n}),w="woocommerce-tag__label-"+O,f=Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"screen-reader-text"},s),Object(o.createElement)("span",{"aria-hidden":"true"},c));return Object(o.createElement)("span",{className:j},r?Object(o.createElement)(i.Button,{className:"woocommerce-tag__text",id:w,onClick:()=>g(!0)},f):Object(o.createElement)("span",{className:"woocommerce-tag__text",id:w},f),r&&m&&Object(o.createElement)(i.Popover,{onClose:()=>g(!1)},r),n&&Object(o.createElement)(i.Button,{className:"woocommerce-tag__remove",onClick:n(t),label:Object(l.sprintf)(// Translators: %s label. +Object(l.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":w},Object(o.createElement)(a.a,{icon:p.a,size:20,className:"clear-icon"})))};var O=E;const j=e=>Object(o.createElement)(g.b,e),w=e=>{const{list:t,selected:c,renderItem:r,depth:l=0,onSelect:i,instanceId:a,isSingle:s,search:u}=e;return t?Object(o.createElement)(o.Fragment,null,t.map(t=>{const b=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(o.createElement)(o.Fragment,{key:t.id},Object(o.createElement)("li",null,r({item:t,isSelected:b,onSelect:i,isSingle:s,search:u,depth:l,controlId:a})),Object(o.createElement)(w,n()({},e,{list:t.children,depth:l+1})))})):null},f=e=>{let{isLoading:t,isSingle:c,selected:r,messages:n,onChange:a,onRemove:s}=e;if(t||c||!r)return null;const u=r.length;return Object(o.createElement)("div",{className:"woocommerce-search-list__selected"},Object(o.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(o.createElement)("strong",null,n.selected(u)),u>0?Object(o.createElement)(i.Button,{isLink:!0,isDestructive:!0,onClick:()=>a([]),"aria-label":n.clear},Object(l.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(o.createElement)("ul",null,r.map((e,t)=>Object(o.createElement)("li",{key:t},Object(o.createElement)(O,{label:e.name,id:e.id,remove:s})))):null)},_=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:n,...i}=e;const{messages:u,renderItem:b,selected:d,isSingle:m}=i,g=b||j;return 0===t.length?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(o.createElement)(a.a,{icon:s.a})),Object(o.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(l.sprintf)(u.noResults,c):u.noItems)):Object(o.createElement)("ul",{className:"woocommerce-search-list__list"},Object(o.createElement)(w,{list:t,selected:d,renderItem:g,onSelect:r,instanceId:n,isSingle:m,search:c}))},y=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:l,isSingle:a,list:s,messages:u=m.a,onChange:g,onSearch:p,selected:h,debouncedSpeak:E}=e,[O,j]=Object(o.useState)(""),w=Object(d.useInstanceId)(y),x=Object(o.useMemo)(()=>({...m.a,...u}),[u]),k=Object(o.useMemo)(()=>Object(m.c)(s,O,r),[s,O,r]);Object(o.useEffect)(()=>{E&&E(x.updated)},[E,x]),Object(o.useEffect)(()=>{"function"==typeof p&&p(O)},[O,p]);const v=Object(o.useCallback)(e=>()=>{a&&g([]);const t=h.findIndex(t=>{let{id:c}=t;return c===e});g([...h.slice(0,t),...h.slice(t+1)])},[a,h,g]),S=Object(o.useCallback)(e=>()=>{-1===h.findIndex(t=>{let{id:c}=t;return c===e.id})?g(a?[e]:[...h,e]):v(e.id)()},[a,v,g,h]);return Object(o.createElement)("div",{className:b()("woocommerce-search-list",t,{"is-compact":c})},Object(o.createElement)(f,n()({},e,{onRemove:v,messages:x})),Object(o.createElement)("div",{className:"woocommerce-search-list__search"},Object(o.createElement)(i.TextControl,{label:x.search,type:"search",value:O,onChange:e=>j(e)})),l?Object(o.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(o.createElement)(i.Spinner,null)):Object(o.createElement)(_,n()({},e,{search:O,filteredList:k,messages:x,onSelect:S,instanceId:w})))};Object(i.withSpokenMessages)(y)},87:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(3);c(10),t.a=e=>{let{value:t,setAttributes:c}=e;return Object(r.createElement)(o.SelectControl,{label:Object(n.__)("Order products by","woo-gutenberg-products-block"),value:t,options:[{label:Object(n.__)("Newness - newest first","woo-gutenberg-products-block"),value:"date"},{label:Object(n.__)("Price - low to high","woo-gutenberg-products-block"),value:"price_asc"},{label:Object(n.__)("Price - high to low","woo-gutenberg-products-block"),value:"price_desc"},{label:Object(n.__)("Rating - highest first","woo-gutenberg-products-block"),value:"rating"},{label:Object(n.__)("Sales - most first","woo-gutenberg-products-block"),value:"popularity"},{label:Object(n.__)("Title - alphabetical","woo-gutenberg-products-block"),value:"title"},{label:Object(n.__)("Menu Order","woo-gutenberg-products-block"),value:"menu_order"}],onChange:e=>c({orderby:e})})}},88:function(e,t,c){"use strict";var r=c(5),n=c.n(r),o=c(0),l=c(34),i=c(3),a=c(4),s=c.n(a);t.a=e=>{let{className:t,item:c,isSelected:r,isLoading:a,onSelect:u,disabled:b,...d}=e;return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(l.a,n()({},d,{key:c.id,className:t,isSelected:r,item:c,onSelect:u,isSingle:!0,disabled:b})),r&&a&&Object(o.createElement)("div",{key:"loading",className:s()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(o.createElement)(i.Spinner,null)))}},9:function(e,t){e.exports=window.wp.compose}}); \ No newline at end of file diff --git a/build/reviews-by-category.asset.php b/build/reviews-by-category.asset.php new file mode 100644 index 00000000000..fcfdee85758 --- /dev/null +++ b/build/reviews-by-category.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '10cffeb9734c9aa3b7eb1d8d66331f92'); \ No newline at end of file diff --git a/build/reviews-by-category.js b/build/reviews-by-category.js new file mode 100644 index 00000000000..17c156251a3 --- /dev/null +++ b/build/reviews-by-category.js @@ -0,0 +1,22 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-category"]=function(e){function t(t){for(var o,a,s=t[0],i=t[1],l=t[2],d=0,b=[];d{let{className:t,instanceId:r,label:c,onChange:s,options:i,screenReaderLabel:l,readOnly:u,value:d}=e;const b="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:n()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(a.a,{label:c,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(o.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:s,readOnly:u,value:d},i.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},11:function(e,t){e.exports=window.wp.apiFetch},110:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var o=r(1),c=r(25);const n={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`

${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:c.o.defaultAvatar,96:c.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`

${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:c.o.defaultAvatar,96:c.o.defaultAvatar},rating:null,verified:!1}]}}},12:function(e,t){e.exports=window.wp.blocks},130:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},131:function(e,t,r){"use strict";var o=r(5),c=r.n(o),n=r(0),a=r(7),s=(r(141),r(53));t.a=e=>{let{attributes:t}=e;return Object(n.createElement)("div",c()({},a.useBlockProps.save({className:Object(s.a)(t)}),Object(s.b)(t)))}},134:function(e,t,r){"use strict";var o=r(0),c=r(1),n=(r(10),r(6)),a=r(3),s=r(7),i=r(8),l=r(2),u=r(69),d=r(30);r(167);const b=e=>{let{onClick:t,label:r,screenReaderLabel:c}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(d.a,{label:r,screenReaderLabel:c})))};b.defaultProps={label:Object(c.__)("Load more","woo-gutenberg-products-block")};var m=b,p=r(104);r(164);var w=e=>{let{onChange:t,readOnly:r,value:n}=e;return Object(o.createElement)(p.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(c.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(c.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(c.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(c.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(c.__)("Order reviews by","woo-gutenberg-products-block"),value:n})},g=r(4),h=r.n(g),v=r(24),O=r.n(v),_=r(151),j=r.n(_);const f=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const o=j()(e,{suffix:r,limit:t});return o.html},y=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e),k=(e,t,r,o)=>{const c=((e,t,r)=>{let o={start:0,middle:0,end:e.length};for(;o.start<=o.end;)o.middle=Math.floor((o.start+o.end)/2),t.innerHTML=f(e,o.middle),o=y(o,t.clientHeight,r);return o.middle})(e,t,r);return f(e,c-o.length,o)},E={className:"read-more-content",ellipsis:"…",lessText:Object(c.__)("Read less","woo-gutenberg-products-block"),maxLines:3,moreText:Object(c.__)("Read more","woo-gutenberg-products-block")};class R extends i.Component{constructor(e){super(e),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=Object(i.createRef)(),this.reviewSummary=Object(i.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const r=(this.reviewSummary.current.clientHeight+1)*e+1,o=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:o}),o&&this.setState({summary:k(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:c}=this.props,n=e?r:c;if(n)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},n)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:c,isExpanded:n}=this.state;return t?!1===c?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!n||null===c)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":n,dangerouslySetInnerHTML:{__html:r}}),(n||null===c)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!n},t),this.getButton()):null}}O()(R,"defaultProps",E);var C=R;r(166);var S=e=>{let{attributes:t,review:r={}}=e;const{imageType:n,showReviewDate:a,showReviewerName:s,showReviewImage:i,showReviewRating:l,showReviewContent:u,showProductName:d}=t,{rating:b}=r,m=!Object.keys(r).length>0,p=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:h()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":m,"wc-block-components-review-list-item__item--has-image":i}),"aria-hidden":m},(d||a||s||i||p)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},i&&function(e,t,r){var n,a;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(a=e.product_image)||void 0===a?void 0:a.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(c.__)("Verified buyer","woo-gutenberg-products-block")},Object(c.__)("Verified buyer","woo-gutenberg-products-block")))}(r,n,m),(d||s||p||a)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},p&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},n=Object(c.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(c.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},Object(o.createElement)("span",{style:r},n)))}(r),d&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),s&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),a&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),u&&function(e){return Object(o.createElement)(C,{maxLines:10,moreText:Object(c.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(c.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(165);var N=e=>{let{attributes:t,reviews:r}=e;const c=Object(l.getSetting)("showAvatars",!0),n=Object(l.getSetting)("reviewRatingsEnabled",!0),a=(c||"product"===t.imageType)&&t.showReviewImage,s=n&&t.showReviewRating,i={...t,showReviewImage:a,showReviewRating:s};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(S,{attributes:i}):r.map((e,t)=>Object(o.createElement)(S,{key:e.id||t,attributes:i,review:e})))},P=r(5),I=r.n(P),L=r(26),x=r.n(L),T=r(53),A=r(28);class M extends i.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:n,reviews:s,totalReviews:i}=this.props;if(t)return Object(o.createElement)(u.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===s.length&&!r)return Object(o.createElement)(n,{attributes:e});const d=Object(l.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(a.Disabled,null,e.showOrderby&&d&&Object(o.createElement)(w,{readOnly:!0,value:e.orderby}),Object(o.createElement)(N,{attributes:e,reviews:s}),e.showLoadMore&&i>s.length&&Object(o.createElement)(m,{screenReaderLabel:Object(c.__)("Load more reviews","woo-gutenberg-products-block")}))}}var B=(e=>{class t extends i.Component{constructor(){super(...arguments),O()(this,"isPreview",!!this.props.attributes.previewReviews),O()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),O()(this,"isMounted",!1),O()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),O()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(A.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,o=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(o).fill({}))}),Object(T.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:o}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:o,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:c,reviews:n,totalReviews:a}=this.state;return Object(o.createElement)(e,I()({},this.props,{error:r,isLoading:c,reviews:n.slice(0,t),totalReviews:a}))}}O()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(M);t.a=e=>{let{attributes:t,icon:r,name:i,noReviewsPlaceholder:l}=e;const{categoryIds:u,productId:d,reviewsOnPageLoad:b,showProductName:m,showReviewDate:p,showReviewerName:w,showReviewContent:g,showReviewImage:h,showReviewRating:v}=t,{order:O,orderby:_}=Object(T.d)(t.orderby),j=!(g||v||p||w||h||m),f=Object(s.useBlockProps)({className:Object(T.a)(t)});return j?Object(o.createElement)(a.Placeholder,{icon:r,label:i},Object(c.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(o.createElement)("div",f,Object(o.createElement)(B,{attributes:t,categoryIds:u,delayFunction:e=>Object(n.debounce)(e,400),noReviewsPlaceholder:l,orderby:_,order:O,productId:d,reviewsToDisplay:b}))}},14:function(e,t){e.exports=window.wp.htmlEntities},141:function(e,t){},142:function(e,t){},15:function(e,t){e.exports=window.wp.url},164:function(e,t){},165:function(e,t){},166:function(e,t){},167:function(e,t){},17:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return u}));var o=r(0),c=r(6),n=r(1);const a={clear:Object(n.__)("Clear all selected items","woo-gutenberg-products-block"),noItems:Object(n.__)("No items found.","woo-gutenberg-products-block"), +/* Translators: %s search term */ +noResults:Object(n.__)("No results for %s","woo-gutenberg-products-block"),search:Object(n.__)("Search for items","woo-gutenberg-products-block"),selected:e=>Object(n.sprintf)( +/* translators: Number of items selected from list. */ +Object(n._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Search results updated.","woo-gutenberg-products-block")},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=Object(c.groupBy)(e,"parent"),o=Object(c.keyBy)(t,"id"),n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=n(o[e.parent]);return[...t,e.name]},a=e=>e.map(e=>{const t=r[e.id];return delete r[e.id],{...e,breadcrumbs:n(o[e.parent]),children:t&&t.length?a(t):[]}}),s=a(r[0]||[]);return delete r[0],Object(c.forEach)(r,e=>{s.push(...a(e||[]))}),s},i=(e,t,r)=>{if(!t)return r?s(e):e;const o=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),c=e.map(e=>!!o.test(e.name)&&e).filter(Boolean);return r?s(c,e):c},l=(e,t)=>{if(!t)return e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(r).map((e,r)=>0===r?e:Object(o.createElement)(o.Fragment,{key:r},Object(o.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,r){"use strict";r.d(t,"o",(function(){return n})),r.d(t,"m",(function(){return a})),r.d(t,"l",(function(){return s})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"f",(function(){return d})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return m})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return w})),r.d(t,"h",(function(){return g})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return O}));var o,c=r(2);const n=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),a=n.pluginUrl+"images/",s=n.pluginUrl+"build/",i=n.buildPhase,l=null===(o=c.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,u=c.STORE_PAGES.checkout.id,d=c.STORE_PAGES.checkout.permalink,b=c.STORE_PAGES.privacy.permalink,m=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),p=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id),w=c.STORE_PAGES.cart.permalink,g=(c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),Object(c.getSetting)("shippingCountries",{})),h=Object(c.getSetting)("allowedCountries",{}),v=Object(c.getSetting)("shippingStates",{}),O=Object(c.getSetting)("allowedStates",{})},26:function(e,t){e.exports=window.wp.isShallowEqual},27:function(e,t,r){"use strict";r.d(t,"h",(function(){return l})),r.d(t,"e",(function(){return u})),r.d(t,"b",(function(){return d})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return m})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return w})),r.d(t,"g",(function(){return g})),r.d(t,"a",(function(){return h}));var o=r(15),c=r(11),n=r.n(c),a=r(6),s=r(2),i=r(25);const l=e=>{let{selected:t=[],search:r="",queryArgs:c={}}=e;const s=(e=>{let{selected:t=[],search:r="",queryArgs:c={}}=e;const n=i.o.productCount>100,a={per_page:n?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},s=[Object(o.addQueryArgs)("/wc/store/products",{...a,...c})];return n&&t.length&&s.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),s})({selected:t,search:r,queryArgs:c});return Promise.all(s.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),b=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:r}=e;const c=(e=>{let{selected:t=[],search:r}=e;const c=Object(s.getSetting)("limitTags",!1),n=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:c?100:0,orderby:c?"count":"name",order:c?"desc":"asc",search:r})];return c&&t.length&&n.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:r});return Promise.all(c.map(e=>n()({path:e}))).then(e=>Object(a.uniqBy)(Object(a.flatten)(e),"id"))},p=e=>n()({path:Object(o.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),w=e=>n()({path:"wc/store/products/categories/"+e}),g=e=>n()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return n}));var o=r(1);const c=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,r){"use strict";var o=r(0),c=r(4),n=r.n(c);t.a=e=>{let t,{label:r,screenReaderLabel:c,wrapperElement:a,wrapperProps:s={}}=e;const i=null!=r,l=null!=c;return!i&&l?(t=a||"span",s={...s,className:n()(s.className,"screen-reader-text")},Object(o.createElement)(t,s,c)):(t=a||o.Fragment,i&&l&&r!==c?Object(o.createElement)(t,s,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},c)):Object(o.createElement)(t,s,r))}},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,r){"use strict";var o=r(0),c=r(1),n=r(31);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(c.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(c.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(c.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},34:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var o=r(5),c=r.n(o),n=r(0),a=r(17);const s=e=>{let{countLabel:t,className:r,depth:o=0,controlId:s="",item:i,isSelected:l,isSingle:u,onSelect:d,search:b="",...m}=e;const p=null!=t&&void 0!==i.count&&null!==i.count,w=[r,"woocommerce-search-list__item"];w.push("depth-"+o),u&&w.push("is-radio-button"),p&&w.push("has-count");const g=i.breadcrumbs&&i.breadcrumbs.length,h=m.name||"search-list-item-"+s,v=`${h}-${i.id}`;return Object(n.createElement)("label",{htmlFor:v,className:w.join(" ")},u?Object(n.createElement)("input",c()({type:"radio",id:v,name:h,value:i.value,onChange:d(i),checked:l,className:"woocommerce-search-list__item-input"},m)):Object(n.createElement)("input",c()({type:"checkbox",id:v,name:h,value:i.value,onChange:d(i),checked:l,className:"woocommerce-search-list__item-input"},m)),Object(n.createElement)("span",{className:"woocommerce-search-list__item-label"},g?Object(n.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(a.b)(i.breadcrumbs)):null,Object(n.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(a.d)(i.name,b))),!!p&&Object(n.createElement)("span",{className:"woocommerce-search-list__item-count"},t||i.count))};t.b=s},343:function(e,t,r){e.exports=r(448)},43:function(e,t,r){"use strict";var o=r(0);t.a=function(e){let{srcElement:t,size:r=24,...c}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:r,height:r,...c}):null}},448:function(e,t,r){"use strict";r.r(t);var o=r(0),c=r(1),n=r(12),a=r(43),s=r(18),i=Object(o.createElement)(s.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9.5-2H18v-2h-5.5zm3.86-5.87c.2-.2.2-.51 0-.71l-1.77-1.77c-.2-.2-.51-.2-.71 0L6 11.53V14h2.47l5.89-5.87z"})),l=r(7),u=r(3),d=(r(10),r(63)),b=r(134),m=()=>Object(o.createElement)(u.Placeholder,{className:"wc-block-reviews-by-category",icon:Object(o.createElement)(a.a,{srcElement:i,className:"block-editor-block-icon"}),label:Object(c.__)("Reviews by Category","woo-gutenberg-products-block")},Object(c.__)("This block lists reviews for products from selected categories. The selected categories do not have any reviews yet, but they will show up here when they do.","woo-gutenberg-products-block")),p=r(94),w=Object(u.withSpokenMessages)(e=>{let{attributes:t,debouncedSpeak:r,setAttributes:n}=e;const{editMode:s,categoryIds:w}=t;if(!w||s)return Object(o.createElement)(u.Placeholder,{icon:Object(o.createElement)(a.a,{srcElement:i,className:"block-editor-block-icon"}),label:Object(c.__)("Reviews by Category","woo-gutenberg-products-block"),className:"wc-block-reviews-by-category"},Object(c.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-reviews__selection"},Object(o.createElement)(d.a,{selected:t.categoryIds,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e.map(e=>{let{id:t}=e;return t});n({categoryIds:t})},showReviewCount:!0}),Object(o.createElement)(u.Button,{isPrimary:!0,onClick:()=>{n({editMode:!1}),r(Object(c.__)("Showing Reviews by Category block preview.","woo-gutenberg-products-block"))}},Object(c.__)("Done","woo-gutenberg-products-block"))));const g=Object(c.__)("Edit selected categories","woo-gutenberg-products-block");return Object(o.createElement)(o.Fragment,null,Object(p.a)(s,n,g),Object(o.createElement)(l.InspectorControls,{key:"inspector"},Object(o.createElement)(u.PanelBody,{title:Object(c.__)("Category","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(d.a,{selected:t.categoryIds,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e.map(e=>{let{id:t}=e;return t});n({categoryIds:t})},isCompact:!0,showReviewCount:!0})),Object(o.createElement)(u.PanelBody,{title:Object(c.__)("Content","woo-gutenberg-products-block")},Object(o.createElement)(u.ToggleControl,{label:Object(c.__)("Product name","woo-gutenberg-products-block"),checked:t.showProductName,onChange:()=>n({showProductName:!t.showProductName})}),Object(p.b)(t,n)),Object(o.createElement)(u.PanelBody,{title:Object(c.__)("List Settings","woo-gutenberg-products-block")},Object(p.c)(t,n))),Object(o.createElement)(b.a,{attributes:t,icon:Object(o.createElement)(a.a,{srcElement:i,className:"block-editor-block-icon"}),name:Object(c.__)("Reviews by Category","woo-gutenberg-products-block"),noReviewsPlaceholder:m}))}),g=r(130),h=r(131),v=r(110);Object(n.registerBlockType)("woocommerce/reviews-by-category",{apiVersion:2,title:Object(c.__)("Reviews by Category","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(a.a,{srcElement:i,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(c.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(c.__)("Show product reviews from specific categories.","woo-gutenberg-products-block"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...v.a,attributes:{...v.a.attributes,categoryIds:[1],showProductName:!0}},attributes:{...g.a,categoryIds:{type:"array",default:[]},showProductName:{type:"boolean",default:!0}},edit:e=>Object(o.createElement)(w,e),save:h.a})},53:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return u})),r.d(t,"b",(function(){return d}));var o=r(11),c=r.n(o),n=r(4),a=r.n(n),s=r(2);const i=e=>{if(Object(s.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=e=>c()({path:"/wc/store/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),u=e=>{const{className:t,categoryIds:r,productId:o,showReviewDate:c,showReviewerName:n,showReviewContent:s,showProductName:i,showReviewImage:l,showReviewRating:u}=e;let d="wc-block-all-reviews";return o&&(d="wc-block-reviews-by-product"),Array.isArray(r)&&(d="wc-block-reviews-by-category"),a()(d,t,{"has-image":l,"has-name":n,"has-date":c,"has-rating":u,"has-content":s,"has-product-name":i})},d=e=>{const{categoryIds:t,imageType:r,orderby:o,productId:c,reviewsOnPageLoad:n,reviewsOnLoadMore:a,showLoadMore:s,showOrderby:i}=e,l={"data-image-type":r,"data-orderby":o,"data-reviews-on-page-load":n,"data-reviews-on-load-more":a,"data-show-load-more":s,"data-show-orderby":i};return c&&(l["data-product-id"]=c),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},55:function(e,t,r){"use strict";var o=r(5),c=r.n(o),n=r(0),a=r(6),s=r(4),i=r.n(s),l=r(3),u=r(9);r(82);class d extends n.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:r,className:o,help:s,options:u,value:d}=this.props,b="inspector-toggle-button-control-"+r;let m;return s&&(m=Object(a.isFunction)(s)?s(t):s),Object(n.createElement)(l.BaseControl,{id:b,help:m,className:i()("components-toggle-button-control",o)},Object(n.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(n.createElement)(l.ButtonGroup,{"aria-labelledby":b+"__label"},u.map((t,r)=>{const o={};return d===t.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(n.createElement)(l.Button,c()({key:`${t.label}-${t.value}-${r}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},o),t.label)})))}}t.a=Object(u.withInstanceId)(d)},6:function(e,t){e.exports=window.lodash},63:function(e,t,r){"use strict";var o=r(5),c=r.n(o),n=r(0),a=r(1),s=(r(10),r(34)),i=r(86),l=r(3),u=r(9),d=r(27),b=r(28),m=Object(u.createHigherOrderComponent)(e=>class extends n.Component{constructor(){super(...arguments),this.state={error:null,loading:!1,categories:[]},this.loadCategories=this.loadCategories.bind(this)}componentDidMount(){this.loadCategories()}loadCategories(){this.setState({loading:!0}),Object(d.c)().then(e=>{this.setState({categories:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({categories:[],loading:!1,error:t})})}render(){const{error:t,loading:r,categories:o}=this.state;return Object(n.createElement)(e,c()({},this.props,{error:t,isLoading:r,categories:o}))}},"withCategories"),p=r(32),w=r(4),g=r.n(w);r(90);const h=e=>{let{categories:t,error:r,isLoading:o,onChange:u,onOperatorChange:d,operator:b,selected:m,isCompact:w,isSingle:h,showReviewCount:v}=e;const O={clear:Object(a.__)("Clear all product categories","woo-gutenberg-products-block"),list:Object(a.__)("Product Categories","woo-gutenberg-products-block"),noItems:Object(a.__)("Your store doesn't have any product categories.","woo-gutenberg-products-block"),search:Object(a.__)("Search for product categories","woo-gutenberg-products-block"),selected:e=>Object(a.sprintf)( +/* translators: %d is the count of selected categories. */ +Object(a._n)("%d category selected","%d categories selected",e,"woo-gutenberg-products-block"),e),updated:Object(a.__)("Category search results updated.","woo-gutenberg-products-block")};return r?Object(n.createElement)(p.a,{error:r}):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(i.a,{className:"woocommerce-product-categories",list:t,isLoading:o,selected:m.map(e=>t.find(t=>t.id===e)).filter(Boolean),onChange:u,renderItem:e=>{const{item:t,search:r,depth:o=0}=e,i=t.breadcrumbs.length?`${t.breadcrumbs.join(", ")}, ${t.name}`:t.name,l=v?Object(a.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of reviews for the item. */ +Object(a._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),i,t.review_count):Object(a.sprintf)( +/* translators: %1$s is the item name, %2$d is the count of products for the item. */ +Object(a._n)("%1$s, has %2$d product","%1$s, has %2$d products",t.count,"woo-gutenberg-products-block"),i,t.count),u=v?Object(a.sprintf)( +/* translators: %d is the count of reviews. */ +Object(a._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count):Object(a.sprintf)( +/* translators: %d is the count of products. */ +Object(a._n)("%d product","%d products",t.count,"woo-gutenberg-products-block"),t.count);return Object(n.createElement)(s.a,c()({className:g()("woocommerce-product-categories__item","has-count",{"is-searching":r.length>0,"is-skip-level":0===o&&0!==t.parent})},e,{countLabel:u,"aria-label":l}))},messages:O,isCompact:w,isHierarchical:!0,isSingle:h}),!!d&&Object(n.createElement)("div",{hidden:m.length<2},Object(n.createElement)(l.SelectControl,{className:"woocommerce-product-categories__operator",label:Object(a.__)("Display products matching","woo-gutenberg-products-block"),help:Object(a.__)("Pick at least two categories to use this setting.","woo-gutenberg-products-block"),value:b,onChange:d,options:[{label:Object(a.__)("Any selected categories","woo-gutenberg-products-block"),value:"any"},{label:Object(a.__)("All selected categories","woo-gutenberg-products-block"),value:"all"}]})))};h.defaultProps={operator:"any",isCompact:!1,isSingle:!1},t.a=m(h)},69:function(e,t,r){"use strict";var o=r(0),c=r(1),n=r(43),a=r(102),s=r(4),i=r.n(s),l=r(3),u=r(32);r(103),t.a=e=>{let{className:t,error:r,isLoading:s=!1,onRetry:d}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(n.a,{srcElement:a.a}),label:Object(c.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(o.createElement)(u.a,{error:r}),d&&Object(o.createElement)(o.Fragment,null,s?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:d},Object(c.__)("Retry","woo-gutenberg-products-block"))))}},7:function(e,t){e.exports=window.wp.blockEditor},8:function(e,t){e.exports=window.React},82:function(e,t){},86:function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var o=r(5),c=r.n(o),n=r(0),a=r(1),s=r(3),i=r(478),l=r(480),u=r(4),d=r.n(u),b=r(9),m=r(17),p=r(34),w=r(479),g=r(14);const h=e=>{let{id:t,label:r,popoverContents:o,remove:c,screenReaderLabel:l,className:u=""}=e;const[m,p]=Object(n.useState)(!1),v=Object(b.useInstanceId)(h);if(l=l||r,!r)return null;r=Object(g.decodeEntities)(r);const O=d()("woocommerce-tag",u,{"has-remove":!!c}),_="woocommerce-tag__label-"+v,j=Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},l),Object(n.createElement)("span",{"aria-hidden":"true"},r));return Object(n.createElement)("span",{className:O},o?Object(n.createElement)(s.Button,{className:"woocommerce-tag__text",id:_,onClick:()=>p(!0)},j):Object(n.createElement)("span",{className:"woocommerce-tag__text",id:_},j),o&&m&&Object(n.createElement)(s.Popover,{onClose:()=>p(!1)},o),c&&Object(n.createElement)(s.Button,{className:"woocommerce-tag__remove",onClick:c(t),label:Object(a.sprintf)(// Translators: %s label. +Object(a.__)("Remove %s","woo-gutenberg-products-block"),r),"aria-describedby":_},Object(n.createElement)(i.a,{icon:w.a,size:20,className:"clear-icon"})))};var v=h;const O=e=>Object(n.createElement)(p.b,e),_=e=>{const{list:t,selected:r,renderItem:o,depth:a=0,onSelect:s,instanceId:i,isSingle:l,search:u}=e;return t?Object(n.createElement)(n.Fragment,null,t.map(t=>{const d=-1!==r.findIndex(e=>{let{id:r}=e;return r===t.id});return Object(n.createElement)(n.Fragment,{key:t.id},Object(n.createElement)("li",null,o({item:t,isSelected:d,onSelect:s,isSingle:l,search:u,depth:a,controlId:i})),Object(n.createElement)(_,c()({},e,{list:t.children,depth:a+1})))})):null},j=e=>{let{isLoading:t,isSingle:r,selected:o,messages:c,onChange:i,onRemove:l}=e;if(t||r||!o)return null;const u=o.length;return Object(n.createElement)("div",{className:"woocommerce-search-list__selected"},Object(n.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(n.createElement)("strong",null,c.selected(u)),u>0?Object(n.createElement)(s.Button,{isLink:!0,isDestructive:!0,onClick:()=>i([]),"aria-label":c.clear},Object(a.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(n.createElement)("ul",null,o.map((e,t)=>Object(n.createElement)("li",{key:t},Object(n.createElement)(v,{label:e.name,id:e.id,remove:l})))):null)},f=e=>{let{filteredList:t,search:r,onSelect:o,instanceId:c,...s}=e;const{messages:u,renderItem:d,selected:b,isSingle:m}=s,p=d||O;return 0===t.length?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(n.createElement)(i.a,{icon:l.a})),Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-text"},r?Object(a.sprintf)(u.noResults,r):u.noItems)):Object(n.createElement)("ul",{className:"woocommerce-search-list__list"},Object(n.createElement)(_,{list:t,selected:b,renderItem:p,onSelect:o,instanceId:c,isSingle:m,search:r}))},y=e=>{const{className:t="",isCompact:r,isHierarchical:o,isLoading:a,isSingle:i,list:l,messages:u=m.a,onChange:p,onSearch:w,selected:g,debouncedSpeak:h}=e,[v,O]=Object(n.useState)(""),_=Object(b.useInstanceId)(y),k=Object(n.useMemo)(()=>({...m.a,...u}),[u]),E=Object(n.useMemo)(()=>Object(m.c)(l,v,o),[l,v,o]);Object(n.useEffect)(()=>{h&&h(k.updated)},[h,k]),Object(n.useEffect)(()=>{"function"==typeof w&&w(v)},[v,w]);const R=Object(n.useCallback)(e=>()=>{i&&p([]);const t=g.findIndex(t=>{let{id:r}=t;return r===e});p([...g.slice(0,t),...g.slice(t+1)])},[i,g,p]),C=Object(n.useCallback)(e=>()=>{-1===g.findIndex(t=>{let{id:r}=t;return r===e.id})?p(i?[e]:[...g,e]):R(e.id)()},[i,R,p,g]);return Object(n.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":r})},Object(n.createElement)(j,c()({},e,{onRemove:R,messages:k})),Object(n.createElement)("div",{className:"woocommerce-search-list__search"},Object(n.createElement)(s.TextControl,{label:k.search,type:"search",value:v,onChange:e=>O(e)})),a?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(n.createElement)(s.Spinner,null)):Object(n.createElement)(f,c()({},e,{search:v,filteredList:E,messages:k,onSelect:C,instanceId:_})))};Object(s.withSpokenMessages)(y)},9:function(e,t){e.exports=window.wp.compose},90:function(e,t){},94:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return d}));var o=r(0),c=r(1),n=r(3),a=r(7),s=r(2),i=r(55);const l=(e,t,r)=>Object(o.createElement)(a.BlockControls,null,Object(o.createElement)(n.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),u=(e,t)=>{const r=Object(s.getSetting)("showAvatars",!0),a=Object(s.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(n.ToggleControl,{label:Object(c.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!a&&Object(o.createElement)(n.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(c.__)("Product rating is disabled in your store settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(n.ToggleControl,{label:Object(c.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(n.ToggleControl,{label:Object(c.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(n.ToggleControl,{label:Object(c.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(n.ToggleControl,{label:Object(c.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{label:Object(c.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(c.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(c.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:e=>t({imageType:e})}),"reviewer"===e.imageType&&!r&&Object(o.createElement)(n.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(c.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(s.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},d=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(n.ToggleControl,{label:Object(c.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(n.SelectControl,{label:Object(c.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(n.RangeControl,{label:Object(c.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(n.ToggleControl,{label:Object(c.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(n.RangeControl,{label:Object(c.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))}}); \ No newline at end of file diff --git a/build/reviews-by-product.asset.php b/build/reviews-by-product.asset.php new file mode 100644 index 00000000000..72b7c8fc68a --- /dev/null +++ b/build/reviews-by-product.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-settings', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-element', 'wp-escape-html', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f62f37b174aca67c96f675132ab816a2'); \ No newline at end of file diff --git a/build/reviews-by-product.js b/build/reviews-by-product.js new file mode 100644 index 00000000000..1e64dd31783 --- /dev/null +++ b/build/reviews-by-product.js @@ -0,0 +1,22 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["reviews-by-product"]=function(e){function t(t){for(var o,s,a=t[0],i=t[1],l=t[2],u=0,b=[];u{class t extends c.Component{render(){const{selected:t}=this.props,r=null==t;return Object(c.createElement)(e,n()({},this.props,{selected:r?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),b=r(191),m=r(24),p=r.n(m),w=r(26),g=r.n(w),h=r(27),v=r(28),O=Object(d.createHigherOrderComponent)(e=>{class t extends c.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,variations:{}}),p()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:r}=this.state;if(t)return;const o=this.getExpandedProduct();if(!o||r[o])return;const n=e.find(e=>e.id===o);n.variations&&0!==n.variations.length?(this.setState({loading:!0}),Object(h.g)(o).then(e=>{const t=e.map(e=>({...e,parent:o}));this.setState({variations:{...this.state.variations,[o]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(v.a)(e);this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[o]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:r,showVariations:o}=this.props;o&&(!g()(e.selected,r)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:r}=t;return r===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:r}=this.props;if(!r)return null;let o=t&&t.length?t[0]:null;return o?this.prevSelectedItem=o:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(o=this.prevSelectedItem)),!e&&o?this.isProductId(o)?o:this.findParentProduct(o):null}render(){const{error:t,isLoading:r}=this.props,{error:o,loading:s,variations:a}=this.state;return Object(c.createElement)(e,n()({},this.props,{error:o||t,expandedProduct:this.getExpandedProduct(),isLoading:r,variations:a,variationsLoading:s}))}}return p()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),j=r(32),_=r(4),f=r.n(_),k=r(88);r(140);const E={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},y=e=>{let{expandedProduct:t,error:r,instanceId:o,isCompact:d,isLoading:u,onChange:b,onSearch:m,products:p,renderItem:w,selected:g,showVariations:h,variations:v,variationsLoading:O}=e;if(r)return Object(c.createElement)(j.a,{error:r});const _=[...p,...v&&v[t]?v[t]:[]];return Object(c.createElement)(l.a,{className:"woocommerce-products",list:_,isCompact:d,isLoading:u,isSingle:!0,selected:_.filter(e=>{let{id:t}=e;return g.includes(t)}),onChange:b,renderItem:w||(h?e=>{const{item:t,search:r,depth:l=0,isSelected:d,onSelect:b}=e,m=t.variations&&Array.isArray(t.variations)?t.variations.length:0,p=f()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+l,"has-count",{"is-searching":r.length>0,"is-skip-level":0===l&&0!==t.parent,"is-variable":m>0});if(!t.breadcrumbs.length)return Object(c.createElement)(k.a,n()({},e,{className:f()(p,{"is-selected":d}),isSelected:d,item:t,onSelect:()=>()=>{b(t)()},isLoading:u||O,countLabel:t.variations.length>0?Object(s.sprintf)( +/* translators: %1$d is the number of variations of a product product. */ +Object(s.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+o,"aria-label":Object(s.sprintf)( +/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ +Object(s._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const w=Object(a.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(c.createElement)(i.a,n()({},w,{className:p,name:"variations-"+o}))}:null),onSearch:m,messages:E,isHierarchical:!0})};y.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=u(Object(b.a)(O(Object(d.withInstanceId)(y))))},102:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=c},103:function(e,t){},104:function(e,t,r){"use strict";var o=r(0),n=(r(10),r(4)),c=r.n(n),s=r(30),a=r(9);r(142),t.a=Object(a.withInstanceId)(e=>{let{className:t,instanceId:r,label:n,onChange:a,options:i,screenReaderLabel:l,readOnly:d,value:u}=e;const b="wc-block-components-sort-select__select-"+r;return Object(o.createElement)("div",{className:c()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(o.createElement)(s.a,{label:n,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:b}}),Object(o.createElement)("select",{id:b,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:a,readOnly:d,value:u},i.map(e=>Object(o.createElement)("option",{key:e.key,value:e.key},e.label))))})},11:function(e,t){e.exports=window.wp.apiFetch},110:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var o=r(1),n=r(25);const c={attributes:{editMode:!1,imageType:"reviewer",orderby:"most-recent",reviewsOnLoadMore:10,reviewsOnPageLoad:10,showLoadMore:!0,showOrderby:!0,showReviewDate:!0,showReviewerName:!0,showReviewImage:!0,showReviewRating:!0,showReviewContent:!0,previewReviews:[{id:1,date_created:"2019-07-15T17:05:04",formatted_date_created:Object(o.__)("July 15, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-15T15:05:04",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Alice","woo-gutenberg-products-block"),review:`

${Object(o.__)("I bought this product last week and I'm very happy with it.","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:5,verified:!0},{id:2,date_created:"2019-07-12T12:39:39",formatted_date_created:Object(o.__)("July 12, 2019","woo-gutenberg-products-block"),date_created_gmt:"2019-07-12T10:39:39",product_id:0,product_name:Object(o.__)("WordPress Pennant","woo-gutenberg-products-block"),product_permalink:"#", +/* translators: An example person name used for the block previews. */ +reviewer:Object(o.__)("Bob","woo-gutenberg-products-block"),review:`

${Object(o.__)("This product is awesome, I love it!","woo-gutenberg-products-block")}

\n`,reviewer_avatar_urls:{48:n.o.defaultAvatar,96:n.o.defaultAvatar},rating:null,verified:!1}]}}},12:function(e,t){e.exports=window.wp.blocks},130:function(e,t,r){"use strict";t.a={editMode:{type:"boolean",default:!0},imageType:{type:"string",default:"reviewer"},orderby:{type:"string",default:"most-recent"},reviewsOnLoadMore:{type:"number",default:10},reviewsOnPageLoad:{type:"number",default:10},showLoadMore:{type:"boolean",default:!0},showOrderby:{type:"boolean",default:!0},showReviewDate:{type:"boolean",default:!0},showReviewerName:{type:"boolean",default:!0},showReviewImage:{type:"boolean",default:!0},showReviewRating:{type:"boolean",default:!0},showReviewContent:{type:"boolean",default:!0},previewReviews:{type:"array",default:null}}},131:function(e,t,r){"use strict";var o=r(5),n=r.n(o),c=r(0),s=r(7),a=(r(141),r(53));t.a=e=>{let{attributes:t}=e;return Object(c.createElement)("div",n()({},s.useBlockProps.save({className:Object(a.a)(t)}),Object(a.b)(t)))}},134:function(e,t,r){"use strict";var o=r(0),n=r(1),c=(r(10),r(6)),s=r(3),a=r(7),i=r(8),l=r(2),d=r(69),u=r(30);r(167);const b=e=>{let{onClick:t,label:r,screenReaderLabel:n}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(u.a,{label:r,screenReaderLabel:n})))};b.defaultProps={label:Object(n.__)("Load more","woo-gutenberg-products-block")};var m=b,p=r(104);r(164);var w=e=>{let{onChange:t,readOnly:r,value:c}=e;return Object(o.createElement)(p.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(n.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(n.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(n.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(n.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(n.__)("Order reviews by","woo-gutenberg-products-block"),value:c})},g=r(4),h=r.n(g),v=r(24),O=r.n(v),j=r(151),_=r.n(j);const f=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const o=_()(e,{suffix:r,limit:t});return o.html},k=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e),E=(e,t,r,o)=>{const n=((e,t,r)=>{let o={start:0,middle:0,end:e.length};for(;o.start<=o.end;)o.middle=Math.floor((o.start+o.end)/2),t.innerHTML=f(e,o.middle),o=k(o,t.clientHeight,r);return o.middle})(e,t,r);return f(e,n-o.length,o)},y={className:"read-more-content",ellipsis:"…",lessText:Object(n.__)("Read less","woo-gutenberg-products-block"),maxLines:3,moreText:Object(n.__)("Read more","woo-gutenberg-products-block")};class R extends i.Component{constructor(e){super(e),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=Object(i.createRef)(),this.reviewSummary=Object(i.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const r=(this.reviewSummary.current.clientHeight+1)*e+1,o=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:o}),o&&this.setState({summary:E(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:n}=this.props,c=e?r:n;if(c)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},c)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:n,isExpanded:c}=this.state;return t?!1===n?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!c||null===n)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":c,dangerouslySetInnerHTML:{__html:r}}),(c||null===n)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!c},t),this.getButton()):null}}O()(R,"defaultProps",y);var S=R;r(166);var C=e=>{let{attributes:t,review:r={}}=e;const{imageType:c,showReviewDate:s,showReviewerName:a,showReviewImage:i,showReviewRating:l,showReviewContent:d,showProductName:u}=t,{rating:b}=r,m=!Object.keys(r).length>0,p=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:h()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":m,"wc-block-components-review-list-item__item--has-image":i}),"aria-hidden":m},(u||s||a||i||p)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},i&&function(e,t,r){var c,s;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(c=e.product_image)||void 0===c?void 0:c.alt)||"",src:(null===(s=e.product_image)||void 0===s?void 0:s.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(n.__)("Verified buyer","woo-gutenberg-products-block")},Object(n.__)("Verified buyer","woo-gutenberg-products-block")))}(r,c,m),(u||a||p||s)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},p&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},c=Object(n.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(n.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":c},Object(o.createElement)("span",{style:r},c)))}(r),u&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),a&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),s&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),d&&function(e){return Object(o.createElement)(S,{maxLines:10,moreText:Object(n.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(n.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(165);var P=e=>{let{attributes:t,reviews:r}=e;const n=Object(l.getSetting)("showAvatars",!0),c=Object(l.getSetting)("reviewRatingsEnabled",!0),s=(n||"product"===t.imageType)&&t.showReviewImage,a=c&&t.showReviewRating,i={...t,showReviewImage:s,showReviewRating:a};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(C,{attributes:i}):r.map((e,t)=>Object(o.createElement)(C,{key:e.id||t,attributes:i,review:e})))},N=r(5),I=r.n(N),L=r(26),x=r.n(L),T=r(53),A=r(28);class M extends i.Component{render(){const{attributes:e,error:t,isLoading:r,noReviewsPlaceholder:c,reviews:a,totalReviews:i}=this.props;if(t)return Object(o.createElement)(d.a,{className:"wc-block-featured-product-error",error:t,isLoading:r});if(0===a.length&&!r)return Object(o.createElement)(c,{attributes:e});const u=Object(l.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(s.Disabled,null,e.showOrderby&&u&&Object(o.createElement)(w,{readOnly:!0,value:e.orderby}),Object(o.createElement)(P,{attributes:e,reviews:a}),e.showLoadMore&&i>a.length&&Object(o.createElement)(m,{screenReaderLabel:Object(n.__)("Load more reviews","woo-gutenberg-products-block")}))}}var B=(e=>{class t extends i.Component{constructor(){super(...arguments),O()(this,"isPreview",!!this.props.attributes.previewReviews),O()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),O()(this,"isMounted",!1),O()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),O()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(A.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,o=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(o).fill({}))}),Object(T.c)(this.getArgs(e.length)).then(t=>{let{reviews:r,totalReviews:o}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:o,loading:!1,error:null}),{newReviews:r}}).catch(this.setError)}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:n,reviews:c,totalReviews:s}=this.state;return Object(o.createElement)(e,I()({},this.props,{error:r,isLoading:n,reviews:c.slice(0,t),totalReviews:s}))}}O()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(M);t.a=e=>{let{attributes:t,icon:r,name:i,noReviewsPlaceholder:l}=e;const{categoryIds:d,productId:u,reviewsOnPageLoad:b,showProductName:m,showReviewDate:p,showReviewerName:w,showReviewContent:g,showReviewImage:h,showReviewRating:v}=t,{order:O,orderby:j}=Object(T.d)(t.orderby),_=!(g||v||p||w||h||m),f=Object(a.useBlockProps)({className:Object(T.a)(t)});return _?Object(o.createElement)(s.Placeholder,{icon:r,label:i},Object(n.__)("The content for this block is hidden due to block settings.","woo-gutenberg-products-block")):Object(o.createElement)("div",f,Object(o.createElement)(B,{attributes:t,categoryIds:d,delayFunction:e=>Object(c.debounce)(e,400),noReviewsPlaceholder:l,orderby:j,order:O,productId:u,reviewsToDisplay:b}))}},14:function(e,t){e.exports=window.wp.htmlEntities},140:function(e,t){},141:function(e,t){},142:function(e,t){},15:function(e,t){e.exports=window.wp.url},164:function(e,t){},165:function(e,t){},166:function(e,t){},167:function(e,t){},17:function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"c",(function(){return i})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return d}));var o=r(0),n=r(6),c=r(1);const s={clear:Object(c.__)("Clear all selected items","woo-gutenberg-products-block"),noItems:Object(c.__)("No items found.","woo-gutenberg-products-block"), +/* Translators: %s search term */ +noResults:Object(c.__)("No results for %s","woo-gutenberg-products-block"),search:Object(c.__)("Search for items","woo-gutenberg-products-block"),selected:e=>Object(c.sprintf)( +/* translators: Number of items selected from list. */ +Object(c._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(c.__)("Search results updated.","woo-gutenberg-products-block")},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=Object(n.groupBy)(e,"parent"),o=Object(n.keyBy)(t,"id"),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=c(o[e.parent]);return[...t,e.name]},s=e=>e.map(e=>{const t=r[e.id];return delete r[e.id],{...e,breadcrumbs:c(o[e.parent]),children:t&&t.length?s(t):[]}}),a=s(r[0]||[]);return delete r[0],Object(n.forEach)(r,e=>{a.push(...s(e||[]))}),a},i=(e,t,r)=>{if(!t)return r?a(e):e;const o=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),n=e.map(e=>!!o.test(e.name)&&e).filter(Boolean);return r?a(n,e):n},l=(e,t)=>{if(!t)return e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(r).map((e,r)=>0===r?e:Object(o.createElement)(o.Fragment,{key:r},Object(o.createElement)("strong",null,t),e))},d=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},18:function(e,t){e.exports=window.wp.primitives},191:function(e,t,r){"use strict";var o=r(5),n=r.n(o),c=r(0),s=r(25),a=r(27),i=r(116),l=r(28);t.a=e=>t=>{let{selected:r,...o}=t;const[d,u]=Object(c.useState)(!0),[b,m]=Object(c.useState)(null),[p,w]=Object(c.useState)([]),g=s.o.productCount>100,h=async e=>{const t=await Object(l.a)(e);m(t),u(!1)},v=Object(c.useRef)(r);Object(c.useEffect)(()=>{Object(a.h)({selected:v.current}).then(e=>{w(e),u(!1)}).catch(h)},[v]);const O=Object(i.a)(e=>{Object(a.h)({selected:r,search:e}).then(e=>{w(e),u(!1)}).catch(h)},400),j=Object(c.useCallback)(e=>{u(!0),O(e)},[u,O]);return Object(c.createElement)(e,n()({},o,{selected:r,error:b,products:p,isLoading:d,onSearch:g?j:null}))}},194:function(e,t,r){"use strict";var o=r(0),n=r(18);const c=Object(o.createElement)(n.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(o.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(o.createElement)("path",{d:"M21.99 4c0-1.1-.89-2-1.99-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14l4 4-.01-18zM20 4v13.17L18.83 16H4V4h16zM6 12h12v2H6zm0-3h12v2H6zm0-3h12v2H6z"}));t.a=c},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,r){"use strict";r.d(t,"o",(function(){return c})),r.d(t,"m",(function(){return s})),r.d(t,"l",(function(){return a})),r.d(t,"n",(function(){return i})),r.d(t,"j",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"f",(function(){return u})),r.d(t,"g",(function(){return b})),r.d(t,"k",(function(){return m})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return w})),r.d(t,"h",(function(){return g})),r.d(t,"a",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"b",(function(){return O}));var o,n=r(2);const c=Object(n.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),s=c.pluginUrl+"images/",a=c.pluginUrl+"build/",i=c.buildPhase,l=null===(o=n.STORE_PAGES.shop)||void 0===o?void 0:o.permalink,d=n.STORE_PAGES.checkout.id,u=n.STORE_PAGES.checkout.permalink,b=n.STORE_PAGES.privacy.permalink,m=(n.STORE_PAGES.privacy.title,n.STORE_PAGES.terms.permalink),p=(n.STORE_PAGES.terms.title,n.STORE_PAGES.cart.id),w=n.STORE_PAGES.cart.permalink,g=(n.STORE_PAGES.myaccount.permalink?n.STORE_PAGES.myaccount.permalink:Object(n.getSetting)("wpLoginUrl","/wp-login.php"),Object(n.getSetting)("shippingCountries",{})),h=Object(n.getSetting)("allowedCountries",{}),v=Object(n.getSetting)("shippingStates",{}),O=Object(n.getSetting)("allowedStates",{})},258:function(e,t,r){"use strict";var o=r(5),n=r.n(o),c=r(24),s=r.n(c),a=r(0),i=r(9),l=r(27),d=r(28);const u=Object(i.createHigherOrderComponent)(e=>class extends a.Component{constructor(){super(...arguments),s()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),s()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(l.e)(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(d.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:r,product:o}=this.state;return Object(a.createElement)(e,n()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:r,product:o}))}},"withProduct");t.a=u},26:function(e,t){e.exports=window.wp.isShallowEqual},27:function(e,t,r){"use strict";r.d(t,"h",(function(){return l})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return u})),r.d(t,"i",(function(){return b})),r.d(t,"f",(function(){return m})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return w})),r.d(t,"g",(function(){return g})),r.d(t,"a",(function(){return h}));var o=r(15),n=r(11),c=r.n(n),s=r(6),a=r(2),i=r(25);const l=e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const a=(e=>{let{selected:t=[],search:r="",queryArgs:n={}}=e;const c=i.o.productCount>100,s={per_page:c?100:0,catalog_visibility:"any",search:r,orderby:"title",order:"asc"},a=[Object(o.addQueryArgs)("/wc/store/products",{...s,...n})];return c&&t.length&&a.push(Object(o.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),a})({selected:t,search:r,queryArgs:n});return Promise.all(a.map(e=>c()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},d=e=>c()({path:"/wc/store/products/"+e}),u=()=>c()({path:"wc/store/products/attributes"}),b=e=>c()({path:`wc/store/products/attributes/${e}/terms`}),m=e=>{let{selected:t=[],search:r}=e;const n=(e=>{let{selected:t=[],search:r}=e;const n=Object(a.getSetting)("limitTags",!1),c=[Object(o.addQueryArgs)("wc/store/products/tags",{per_page:n?100:0,orderby:n?"count":"name",order:n?"desc":"asc",search:r})];return n&&t.length&&c.push(Object(o.addQueryArgs)("wc/store/products/tags",{include:t})),c})({selected:t,search:r});return Promise.all(n.map(e=>c()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id"))},p=e=>c()({path:Object(o.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),w=e=>c()({path:"wc/store/products/categories/"+e}),g=e=>c()({path:Object(o.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),h=(e,t)=>{if(!e.title.raw)return e.slug;const r=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(r?"":" - "+e.slug)}},28:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return c}));var o=r(1);const n=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(o.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,r){"use strict";var o=r(0),n=r(4),c=r.n(n);t.a=e=>{let t,{label:r,screenReaderLabel:n,wrapperElement:s,wrapperProps:a={}}=e;const i=null!=r,l=null!=n;return!i&&l?(t=s||"span",a={...a,className:c()(a.className,"screen-reader-text")},Object(o.createElement)(t,a,n)):(t=s||o.Fragment,i&&l&&r!==n?Object(o.createElement)(t,a,Object(o.createElement)("span",{"aria-hidden":"true"},r),Object(o.createElement)("span",{className:"screen-reader-text"},n)):Object(o.createElement)(t,a,r))}},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(31);t.a=e=>{let{error:t}=e;return Object(o.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:r}=e;return t?"general"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):"api"===r?Object(o.createElement)("span",null,Object(n.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(o.createElement)("br",null),Object(o.createElement)("code",null,Object(c.escapeHTML)(t))):t:Object(n.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},34:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var o=r(5),n=r.n(o),c=r(0),s=r(17);const a=e=>{let{countLabel:t,className:r,depth:o=0,controlId:a="",item:i,isSelected:l,isSingle:d,onSelect:u,search:b="",...m}=e;const p=null!=t&&void 0!==i.count&&null!==i.count,w=[r,"woocommerce-search-list__item"];w.push("depth-"+o),d&&w.push("is-radio-button"),p&&w.push("has-count");const g=i.breadcrumbs&&i.breadcrumbs.length,h=m.name||"search-list-item-"+a,v=`${h}-${i.id}`;return Object(c.createElement)("label",{htmlFor:v,className:w.join(" ")},d?Object(c.createElement)("input",n()({type:"radio",id:v,name:h,value:i.value,onChange:u(i),checked:l,className:"woocommerce-search-list__item-input"},m)):Object(c.createElement)("input",n()({type:"checkbox",id:v,name:h,value:i.value,onChange:u(i),checked:l,className:"woocommerce-search-list__item-input"},m)),Object(c.createElement)("span",{className:"woocommerce-search-list__item-label"},g?Object(c.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(s.b)(i.breadcrumbs)):null,Object(c.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(s.d)(i.name,b))),!!p&&Object(c.createElement)("span",{className:"woocommerce-search-list__item-count"},t||i.count))};t.b=a},342:function(e,t,r){e.exports=r(456)},43:function(e,t,r){"use strict";var o=r(0);t.a=function(e){let{srcElement:t,size:r=24,...n}=e;return Object(o.isValidElement)(t)?Object(o.cloneElement)(t,{width:r,height:r,...n}):null}},456:function(e,t,r){"use strict";r.r(t);var o=r(0),n=r(1),c=r(12),s=r(43),a=r(194),i=(r(141),r(5)),l=r.n(i),d=r(7),u=r(3),b=r(34),m=(r(10),r(101)),p=r(134),w=r(69),g=r(258),h=Object(g.a)(e=>{let{error:t,getProduct:r,isLoading:c,product:i}=e;if(t)return Object(o.createElement)(w.a,{className:"wc-block-featured-product-error",error:t,isLoading:c,onRetry:r});const l=!i||c?Object(o.createElement)(u.Spinner,null):Object(n.sprintf)( +/* translators: %s is the product name. */ +Object(n.__)("This block lists reviews for a selected product. %s doesn't have any reviews yet, but they will show up here when it does.","woo-gutenberg-products-block"),i.name);return Object(o.createElement)(u.Placeholder,{className:"wc-block-reviews-by-product",icon:Object(o.createElement)(s.a,{srcElement:a.a,className:"block-editor-block-icon"}),label:Object(n.__)("Reviews by Product","woo-gutenberg-products-block")},l)}),v=r(94),O=Object(u.withSpokenMessages)(e=>{let{attributes:t,debouncedSpeak:r,setAttributes:c}=e;const{editMode:i,productId:w}=t,g=e=>{const{item:t=0}=e;return Object(o.createElement)(b.a,l()({},e,{countLabel:Object(n.sprintf)( +/* translators: %d is the review count. */ +Object(n._n)("%d review","%d reviews",t.review_count,"woo-gutenberg-products-block"),t.review_count),"aria-label":Object(n.sprintf)( +/* translators: %1$s is the item name, and %2$d is the number of reviews for the item. */ +Object(n._n)("%1$s, has %2$d review","%1$s, has %2$d reviews",t.review_count,"woo-gutenberg-products-block"),t.name,t.review_count)}))};if(!w||i)return Object(o.createElement)(u.Placeholder,{icon:Object(o.createElement)(s.a,{icon:a.a,className:"block-editor-block-icon"}),label:Object(n.__)("Reviews by Product","woo-gutenberg-products-block"),className:"wc-block-reviews-by-product"},Object(n.__)("Show reviews of your product to build trust","woo-gutenberg-products-block"),Object(o.createElement)("div",{className:"wc-block-reviews__selection"},Object(o.createElement)(m.a,{selected:t.productId||0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;c({productId:t})},queryArgs:{orderby:"comment_count",order:"desc"},renderItem:g}),Object(o.createElement)(u.Button,{isPrimary:!0,onClick:()=>{c({editMode:!1}),r(Object(n.__)("Showing Reviews by Product block preview.","woo-gutenberg-products-block"))}},Object(n.__)("Done","woo-gutenberg-products-block"))));const O=Object(n.__)("Edit selected product","woo-gutenberg-products-block");return Object(o.createElement)(o.Fragment,null,Object(v.a)(i,c,O),Object(o.createElement)(d.InspectorControls,{key:"inspector"},Object(o.createElement)(u.PanelBody,{title:Object(n.__)("Product","woo-gutenberg-products-block"),initialOpen:!1},Object(o.createElement)(m.a,{selected:t.productId||0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;c({productId:t})},renderItem:g,isCompact:!0})),Object(o.createElement)(u.PanelBody,{title:Object(n.__)("Content","woo-gutenberg-products-block")},Object(v.b)(t,c)),Object(o.createElement)(u.PanelBody,{title:Object(n.__)("List Settings","woo-gutenberg-products-block")},Object(v.c)(t,c))),Object(o.createElement)(p.a,{attributes:t,icon:Object(o.createElement)(s.a,{icon:a.a,className:"block-editor-block-icon"}),name:Object(n.__)("Reviews by Product","woo-gutenberg-products-block"),noReviewsPlaceholder:h}))}),j=r(130),_=r(131),f=r(110);Object(c.registerBlockType)("woocommerce/reviews-by-product",{apiVersion:2,title:Object(n.__)("Reviews by Product","woo-gutenberg-products-block"),icon:{src:Object(o.createElement)(s.a,{srcElement:a.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Show reviews of your products to build trust.","woo-gutenberg-products-block"),supports:{html:!1,color:{background:!1},typography:{fontSize:!0}},example:{...f.a,attributes:{...f.a.attributes,productId:1}},attributes:{...j.a,productId:{type:"number"}},edit:e=>Object(o.createElement)(O,e),save:_.a})},53:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"c",(function(){return l})),r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return u}));var o=r(11),n=r.n(o),c=r(4),s=r.n(c),a=r(2);const i=e=>{if(Object(a.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}},l=e=>n()({path:"/wc/store/products/reviews?"+Object.entries(e).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)}))),d=e=>{const{className:t,categoryIds:r,productId:o,showReviewDate:n,showReviewerName:c,showReviewContent:a,showProductName:i,showReviewImage:l,showReviewRating:d}=e;let u="wc-block-all-reviews";return o&&(u="wc-block-reviews-by-product"),Array.isArray(r)&&(u="wc-block-reviews-by-category"),s()(u,t,{"has-image":l,"has-name":c,"has-date":n,"has-rating":d,"has-content":a,"has-product-name":i})},u=e=>{const{categoryIds:t,imageType:r,orderby:o,productId:n,reviewsOnPageLoad:c,reviewsOnLoadMore:s,showLoadMore:a,showOrderby:i}=e,l={"data-image-type":r,"data-orderby":o,"data-reviews-on-page-load":c,"data-reviews-on-load-more":s,"data-show-load-more":a,"data-show-orderby":i};return n&&(l["data-product-id"]=n),Array.isArray(t)&&(l["data-category-ids"]=t.join(",")),l}},55:function(e,t,r){"use strict";var o=r(5),n=r.n(o),c=r(0),s=r(6),a=r(4),i=r.n(a),l=r(3),d=r(9);r(82);class u extends c.Component{constructor(){super(...arguments),this.onClick=this.onClick.bind(this)}onClick(e){this.props.onChange&&this.props.onChange(e.target.value)}render(){const{label:e,checked:t,instanceId:r,className:o,help:a,options:d,value:u}=this.props,b="inspector-toggle-button-control-"+r;let m;return a&&(m=Object(s.isFunction)(a)?a(t):a),Object(c.createElement)(l.BaseControl,{id:b,help:m,className:i()("components-toggle-button-control",o)},Object(c.createElement)("label",{id:b+"__label",htmlFor:b,className:"components-toggle-button-control__label"},e),Object(c.createElement)(l.ButtonGroup,{"aria-labelledby":b+"__label"},d.map((t,r)=>{const o={};return u===t.value?(o.isPrimary=!0,o["aria-pressed"]=!0):(o.isSecondary=!0,o["aria-pressed"]=!1),Object(c.createElement)(l.Button,n()({key:`${t.label}-${t.value}-${r}`,value:t.value,onClick:this.onClick,"aria-label":e+": "+t.label},o),t.label)})))}}t.a=Object(d.withInstanceId)(u)},6:function(e,t){e.exports=window.lodash},69:function(e,t,r){"use strict";var o=r(0),n=r(1),c=r(43),s=r(102),a=r(4),i=r.n(a),l=r(3),d=r(32);r(103),t.a=e=>{let{className:t,error:r,isLoading:a=!1,onRetry:u}=e;return Object(o.createElement)(l.Placeholder,{icon:Object(o.createElement)(c.a,{srcElement:s.a}),label:Object(n.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:i()("wc-block-api-error",t)},Object(o.createElement)(d.a,{error:r}),u&&Object(o.createElement)(o.Fragment,null,a?Object(o.createElement)(l.Spinner,null):Object(o.createElement)(l.Button,{isSecondary:!0,onClick:u},Object(n.__)("Retry","woo-gutenberg-products-block"))))}},7:function(e,t){e.exports=window.wp.blockEditor},8:function(e,t){e.exports=window.React},82:function(e,t){},86:function(e,t,r){"use strict";r.d(t,"a",(function(){return k}));var o=r(5),n=r.n(o),c=r(0),s=r(1),a=r(3),i=r(478),l=r(480),d=r(4),u=r.n(d),b=r(9),m=r(17),p=r(34),w=r(479),g=r(14);const h=e=>{let{id:t,label:r,popoverContents:o,remove:n,screenReaderLabel:l,className:d=""}=e;const[m,p]=Object(c.useState)(!1),v=Object(b.useInstanceId)(h);if(l=l||r,!r)return null;r=Object(g.decodeEntities)(r);const O=u()("woocommerce-tag",d,{"has-remove":!!n}),j="woocommerce-tag__label-"+v,_=Object(c.createElement)(c.Fragment,null,Object(c.createElement)("span",{className:"screen-reader-text"},l),Object(c.createElement)("span",{"aria-hidden":"true"},r));return Object(c.createElement)("span",{className:O},o?Object(c.createElement)(a.Button,{className:"woocommerce-tag__text",id:j,onClick:()=>p(!0)},_):Object(c.createElement)("span",{className:"woocommerce-tag__text",id:j},_),o&&m&&Object(c.createElement)(a.Popover,{onClose:()=>p(!1)},o),n&&Object(c.createElement)(a.Button,{className:"woocommerce-tag__remove",onClick:n(t),label:Object(s.sprintf)(// Translators: %s label. +Object(s.__)("Remove %s","woo-gutenberg-products-block"),r),"aria-describedby":j},Object(c.createElement)(i.a,{icon:w.a,size:20,className:"clear-icon"})))};var v=h;const O=e=>Object(c.createElement)(p.b,e),j=e=>{const{list:t,selected:r,renderItem:o,depth:s=0,onSelect:a,instanceId:i,isSingle:l,search:d}=e;return t?Object(c.createElement)(c.Fragment,null,t.map(t=>{const u=-1!==r.findIndex(e=>{let{id:r}=e;return r===t.id});return Object(c.createElement)(c.Fragment,{key:t.id},Object(c.createElement)("li",null,o({item:t,isSelected:u,onSelect:a,isSingle:l,search:d,depth:s,controlId:i})),Object(c.createElement)(j,n()({},e,{list:t.children,depth:s+1})))})):null},_=e=>{let{isLoading:t,isSingle:r,selected:o,messages:n,onChange:i,onRemove:l}=e;if(t||r||!o)return null;const d=o.length;return Object(c.createElement)("div",{className:"woocommerce-search-list__selected"},Object(c.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(c.createElement)("strong",null,n.selected(d)),d>0?Object(c.createElement)(a.Button,{isLink:!0,isDestructive:!0,onClick:()=>i([]),"aria-label":n.clear},Object(s.__)("Clear all","woo-gutenberg-products-block")):null),d>0?Object(c.createElement)("ul",null,o.map((e,t)=>Object(c.createElement)("li",{key:t},Object(c.createElement)(v,{label:e.name,id:e.id,remove:l})))):null)},f=e=>{let{filteredList:t,search:r,onSelect:o,instanceId:n,...a}=e;const{messages:d,renderItem:u,selected:b,isSingle:m}=a,p=u||O;return 0===t.length?Object(c.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(c.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(c.createElement)(i.a,{icon:l.a})),Object(c.createElement)("span",{className:"woocommerce-search-list__not-found-text"},r?Object(s.sprintf)(d.noResults,r):d.noItems)):Object(c.createElement)("ul",{className:"woocommerce-search-list__list"},Object(c.createElement)(j,{list:t,selected:b,renderItem:p,onSelect:o,instanceId:n,isSingle:m,search:r}))},k=e=>{const{className:t="",isCompact:r,isHierarchical:o,isLoading:s,isSingle:i,list:l,messages:d=m.a,onChange:p,onSearch:w,selected:g,debouncedSpeak:h}=e,[v,O]=Object(c.useState)(""),j=Object(b.useInstanceId)(k),E=Object(c.useMemo)(()=>({...m.a,...d}),[d]),y=Object(c.useMemo)(()=>Object(m.c)(l,v,o),[l,v,o]);Object(c.useEffect)(()=>{h&&h(E.updated)},[h,E]),Object(c.useEffect)(()=>{"function"==typeof w&&w(v)},[v,w]);const R=Object(c.useCallback)(e=>()=>{i&&p([]);const t=g.findIndex(t=>{let{id:r}=t;return r===e});p([...g.slice(0,t),...g.slice(t+1)])},[i,g,p]),S=Object(c.useCallback)(e=>()=>{-1===g.findIndex(t=>{let{id:r}=t;return r===e.id})?p(i?[e]:[...g,e]):R(e.id)()},[i,R,p,g]);return Object(c.createElement)("div",{className:u()("woocommerce-search-list",t,{"is-compact":r})},Object(c.createElement)(_,n()({},e,{onRemove:R,messages:E})),Object(c.createElement)("div",{className:"woocommerce-search-list__search"},Object(c.createElement)(a.TextControl,{label:E.search,type:"search",value:v,onChange:e=>O(e)})),s?Object(c.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(c.createElement)(a.Spinner,null)):Object(c.createElement)(f,n()({},e,{search:v,filteredList:y,messages:E,onSelect:S,instanceId:j})))};Object(a.withSpokenMessages)(k)},88:function(e,t,r){"use strict";var o=r(5),n=r.n(o),c=r(0),s=r(34),a=r(3),i=r(4),l=r.n(i);t.a=e=>{let{className:t,item:r,isSelected:o,isLoading:i,onSelect:d,disabled:u,...b}=e;return Object(c.createElement)(c.Fragment,null,Object(c.createElement)(s.a,n()({},b,{key:r.id,className:t,isSelected:o,item:r,onSelect:d,isSingle:!0,disabled:u})),o&&i&&Object(c.createElement)("div",{key:"loading",className:l()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(c.createElement)(a.Spinner,null)))}},9:function(e,t){e.exports=window.wp.compose},94:function(e,t,r){"use strict";r.d(t,"a",(function(){return l})),r.d(t,"b",(function(){return d})),r.d(t,"c",(function(){return u}));var o=r(0),n=r(1),c=r(3),s=r(7),a=r(2),i=r(55);const l=(e,t,r)=>Object(o.createElement)(s.BlockControls,null,Object(o.createElement)(c.ToolbarGroup,{controls:[{icon:"edit",title:r,onClick:()=>t({editMode:!e}),isActive:e}]})),d=(e,t)=>{const r=Object(a.getSetting)("showAvatars",!0),s=Object(a.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Product rating","woo-gutenberg-products-block"),checked:e.showReviewRating,onChange:()=>t({showReviewRating:!e.showReviewRating})}),e.showReviewRating&&!s&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Product rating is disabled in your store settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("admin.php?page=wc-settings&tab=products"),target:"_blank",rel:"noopener noreferrer"})})),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Reviewer name","woo-gutenberg-products-block"),checked:e.showReviewerName,onChange:()=>t({showReviewerName:!e.showReviewerName})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Image","woo-gutenberg-products-block"),checked:e.showReviewImage,onChange:()=>t({showReviewImage:!e.showReviewImage})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review date","woo-gutenberg-products-block"),checked:e.showReviewDate,onChange:()=>t({showReviewDate:!e.showReviewDate})}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Review content","woo-gutenberg-products-block"),checked:e.showReviewContent,onChange:()=>t({showReviewContent:!e.showReviewContent})}),e.showReviewImage&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)(i.a,{label:Object(n.__)("Review image","woo-gutenberg-products-block"),value:e.imageType,options:[{label:Object(n.__)("Reviewer photo","woo-gutenberg-products-block"),value:"reviewer"},{label:Object(n.__)("Product","woo-gutenberg-products-block"),value:"product"}],onChange:e=>t({imageType:e})}),"reviewer"===e.imageType&&!r&&Object(o.createElement)(c.Notice,{className:"wc-block-base-control-notice",isDismissible:!1},Object(o.createInterpolateElement)(Object(n.__)("Reviewer photo is disabled in your site settings.","woo-gutenberg-products-block"),{a:Object(o.createElement)("a",{href:Object(a.getAdminLink)("options-discussion.php"),target:"_blank",rel:"noopener noreferrer"})}))))},u=(e,t)=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Order by","woo-gutenberg-products-block"),checked:e.showOrderby,onChange:()=>t({showOrderby:!e.showOrderby})}),Object(o.createElement)(c.SelectControl,{label:Object(n.__)("Order Product Reviews by","woo-gutenberg-products-block"),value:e.orderby,options:[{label:"Most recent",value:"most-recent"},{label:"Highest Rating",value:"highest-rating"},{label:"Lowest Rating",value:"lowest-rating"}],onChange:e=>t({orderby:e})}),Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Starting Number of Reviews","woo-gutenberg-products-block"),value:e.reviewsOnPageLoad,onChange:e=>t({reviewsOnPageLoad:e}),max:20,min:1}),Object(o.createElement)(c.ToggleControl,{label:Object(n.__)("Load more","woo-gutenberg-products-block"),checked:e.showLoadMore,onChange:()=>t({showLoadMore:!e.showLoadMore})}),e.showLoadMore&&Object(o.createElement)(c.RangeControl,{label:Object(n.__)("Load More Reviews","woo-gutenberg-products-block"),value:e.reviewsOnLoadMore,onChange:e=>t({reviewsOnLoadMore:e}),max:20,min:1}))}}); \ No newline at end of file diff --git a/build/reviews-frontend.asset.php b/build/reviews-frontend.asset.php new file mode 100644 index 00000000000..bfc1ac3126c --- /dev/null +++ b/build/reviews-frontend.asset.php @@ -0,0 +1 @@ + array('react', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'e8b0e7bb88d02f8bec58bd5dea12f111'); \ No newline at end of file diff --git a/build/reviews-frontend.js b/build/reviews-frontend.js new file mode 100644 index 00000000000..d329a61edd6 --- /dev/null +++ b/build/reviews-frontend.js @@ -0,0 +1,5 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=202)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{let{className:t,instanceId:r,label:o,onChange:c,options:a,screenReaderLabel:l,readOnly:p,value:u}=e;const d="wc-block-components-sort-select__select-"+r;return Object(n.createElement)("div",{className:s()("wc-block-sort-select","wc-block-components-sort-select",t)},Object(n.createElement)(i.a,{label:o,screenReaderLabel:l,wrapperElement:"label",wrapperProps:{className:"wc-block-sort-select__label wc-block-components-sort-select__label",htmlFor:d}}),Object(n.createElement)("select",{id:d,className:"wc-block-sort-select__select wc-block-components-sort-select__select",onChange:c,readOnly:p,value:u},a.map(e=>Object(n.createElement)("option",{key:e.key,value:e.key},e.label))))})},11:function(e,t){e.exports=window.wp.isShallowEqual},115:function(e,t){},12:function(e,t){e.exports=window.wp.compose},137:function(e,t,r){function n(e){for(var t,r,n=[],o=0;o/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n"),g=0,h=[],v=!1,f=0;f=a)r="";else if(g+_.length>=a){if(" "===_[(o=a-g)-1])for(;o&&" "===_[(o-=1)-1];);else s=_.slice(o).indexOf(" "),p||(-1!==s?o+=s:o=r.length);r=_.slice(0,o).join("")+u,d&&(r+=''+b+""),g=a,v=!0}else g+=_.length;else if(l){if(g>=a)if(c=(i=r.match(/[a-zA-Z]+/))?i[0]:"")if("{let{imageUrl:t=a.l+"/block-error.svg",header:r=Object(c.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(c.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(c.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(s.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(s.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(s.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(s.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(s.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),o&&Object(s.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),l&&Object(s.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(37);class p extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(s.createElement)(s.Fragment,null,Object(s.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:o,renderError:i,button:c}=this.props,{errorMessage:a,hasError:p}=this.state;return p?"function"==typeof i?i({errorMessage:a}):Object(s.createElement)(l,{errorMessage:r?a:null,header:e,imageUrl:t,text:n,errorMessagePrefix:o,button:c}):this.props.children}}t.a=p},171:function(e,t){},172:function(e,t){},173:function(e,t){},174:function(e,t){},2:function(e,t){e.exports=window.wc.wcSettings},202:function(e,t,r){"use strict";r.r(t);var n=r(53),o=r(0),s=r(1),i=r(23),c=r(3),a=(r(8),r(27)),l=r.n(a),p=r(4),u=r.n(p),d=r(2),b=r(21);r(174);const w=e=>{let{onClick:t,label:r,screenReaderLabel:n}=e;return Object(o.createElement)("div",{className:"wp-block-button wc-block-load-more wc-block-components-load-more"},Object(o.createElement)("button",{className:"wp-block-button__link",onClick:t},Object(o.createElement)(b.a,{label:r,screenReaderLabel:n})))};w.defaultProps={label:Object(s.__)("Load more","woo-gutenberg-products-block")};var m=w,g=r(103);r(171);var h=e=>{let{onChange:t,readOnly:r,value:n}=e;return Object(o.createElement)(g.a,{className:"wc-block-review-sort-select wc-block-components-review-sort-select",label:Object(s.__)("Order by","woo-gutenberg-products-block"),onChange:t,options:[{key:"most-recent",label:Object(s.__)("Most recent","woo-gutenberg-products-block")},{key:"highest-rating",label:Object(s.__)("Highest rating","woo-gutenberg-products-block")},{key:"lowest-rating",label:Object(s.__)("Lowest rating","woo-gutenberg-products-block")}],readOnly:r,screenReaderLabel:Object(s.__)("Order reviews by","woo-gutenberg-products-block"),value:n})},v=r(15),f=r.n(v),_=r(137),y=r.n(_);const O=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";const n=y()(e,{suffix:r,limit:t});return n.html},k=(e,t,r)=>(t<=r?e.start=e.middle+1:e.end=e.middle-1,e),j=(e,t,r,n)=>{const o=((e,t,r)=>{let n={start:0,middle:0,end:e.length};for(;n.start<=n.end;)n.middle=Math.floor((n.start+n.end)/2),t.innerHTML=O(e,n.middle),n=k(n,t.clientHeight,r);return n.middle})(e,t,r);return O(e,o-n.length,n)},E={className:"read-more-content",ellipsis:"…",lessText:Object(s.__)("Read less","woo-gutenberg-products-block"),maxLines:3,moreText:Object(s.__)("Read more","woo-gutenberg-products-block")};class R extends c.Component{constructor(e){super(e),this.state={isExpanded:!1,clampEnabled:null,content:e.children,summary:"."},this.reviewContent=Object(c.createRef)(),this.reviewSummary=Object(c.createRef)(),this.getButton=this.getButton.bind(this),this.onClick=this.onClick.bind(this)}componentDidMount(){if(this.props.children){const{maxLines:e,ellipsis:t}=this.props;if(!this.reviewSummary.current||!this.reviewContent.current)return;const r=(this.reviewSummary.current.clientHeight+1)*e+1,n=this.reviewContent.current.clientHeight+1>r;this.setState({clampEnabled:n}),n&&this.setState({summary:j(this.reviewContent.current.innerHTML,this.reviewSummary.current,r,t)})}}getButton(){const{isExpanded:e}=this.state,{className:t,lessText:r,moreText:n}=this.props,s=e?r:n;if(s)return Object(o.createElement)("a",{href:"#more",className:t+"__read_more",onClick:this.onClick,"aria-expanded":!e,role:"button"},s)}onClick(e){e.preventDefault();const{isExpanded:t}=this.state;this.setState({isExpanded:!t})}render(){const{className:e}=this.props,{content:t,summary:r,clampEnabled:n,isExpanded:s}=this.state;return t?!1===n?Object(o.createElement)("div",{className:e},Object(o.createElement)("div",{ref:this.reviewContent},t)):Object(o.createElement)("div",{className:e},(!s||null===n)&&Object(o.createElement)("div",{ref:this.reviewSummary,"aria-hidden":s,dangerouslySetInnerHTML:{__html:r}}),(s||null===n)&&Object(o.createElement)("div",{ref:this.reviewContent,"aria-hidden":!s},t),this.getButton()):null}}f()(R,"defaultProps",E);var S=R;r(173);var x=e=>{let{attributes:t,review:r={}}=e;const{imageType:n,showReviewDate:i,showReviewerName:c,showReviewImage:a,showReviewRating:l,showReviewContent:p,showProductName:d}=t,{rating:b}=r,w=!Object.keys(r).length>0,m=Number.isFinite(b)&&l;return Object(o.createElement)("li",{className:u()("wc-block-review-list-item__item","wc-block-components-review-list-item__item",{"is-loading":w,"wc-block-components-review-list-item__item--has-image":a}),"aria-hidden":w},(d||i||c||a||m)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__info wc-block-components-review-list-item__info"},a&&function(e,t,r){var n,i;return r||!e?Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"}):Object(o.createElement)("div",{className:"wc-block-review-list-item__image wc-block-components-review-list-item__image"},"product"===t?Object(o.createElement)("img",{"aria-hidden":"true",alt:(null===(n=e.product_image)||void 0===n?void 0:n.alt)||"",src:(null===(i=e.product_image)||void 0===i?void 0:i.thumbnail)||""}):Object(o.createElement)("img",{"aria-hidden":"true",alt:"",src:e.reviewer_avatar_urls[96]||""}),e.verified&&Object(o.createElement)("div",{className:"wc-block-review-list-item__verified wc-block-components-review-list-item__verified",title:Object(s.__)("Verified buyer","woo-gutenberg-products-block")},Object(s.__)("Verified buyer","woo-gutenberg-products-block")))}(r,n,w),(d||c||m||i)&&Object(o.createElement)("div",{className:"wc-block-review-list-item__meta wc-block-components-review-list-item__meta"},m&&function(e){const{rating:t}=e,r={width:t/5*100+"%"},n=Object(s.sprintf)( +/* translators: %f is referring to the average rating value */ +Object(s.__)("Rated %f out of 5","woo-gutenberg-products-block"),t);return Object(o.createElement)("div",{className:"wc-block-review-list-item__rating wc-block-components-review-list-item__rating"},Object(o.createElement)("div",{className:"wc-block-review-list-item__rating__stars wc-block-components-review-list-item__rating__stars",role:"img","aria-label":n},Object(o.createElement)("span",{style:r},n)))}(r),d&&function(e){return Object(o.createElement)("div",{className:"wc-block-review-list-item__product wc-block-components-review-list-item__product"},Object(o.createElement)("a",{href:e.product_permalink,dangerouslySetInnerHTML:{__html:e.product_name}}))}(r),c&&function(e){const{reviewer:t=""}=e;return Object(o.createElement)("div",{className:"wc-block-review-list-item__author wc-block-components-review-list-item__author"},t)}(r),i&&function(e){const{date_created:t,formatted_date_created:r}=e;return Object(o.createElement)("time",{className:"wc-block-review-list-item__published-date wc-block-components-review-list-item__published-date",dateTime:t},r)}(r))),p&&function(e){return Object(o.createElement)(S,{maxLines:10,moreText:Object(s.__)("Read full review","woo-gutenberg-products-block"),lessText:Object(s.__)("Hide full review","woo-gutenberg-products-block"),className:"wc-block-review-list-item__text wc-block-components-review-list-item__text"},Object(o.createElement)("div",{dangerouslySetInnerHTML:{__html:e.review||""}}))}(r))};r(172);var P=e=>{let{attributes:t,reviews:r}=e;const n=Object(d.getSetting)("showAvatars",!0),s=Object(d.getSetting)("reviewRatingsEnabled",!0),i=(n||"product"===t.imageType)&&t.showReviewImage,c=s&&t.showReviewRating,a={...t,showReviewImage:i,showReviewRating:c};return Object(o.createElement)("ul",{className:"wc-block-review-list wc-block-components-review-list"},0===r.length?Object(o.createElement)(x,{attributes:a}):r.map((e,t)=>Object(o.createElement)(x,{key:e.id||t,attributes:a,review:e})))},T=r(10),C=r.n(T),N=r(11),A=r.n(N),L=r(88),M=(e=>{class t extends c.Component{constructor(){super(...arguments),f()(this,"isPreview",!!this.props.attributes.previewReviews),f()(this,"delayedAppendReviews",this.props.delayFunction(this.appendReviews)),f()(this,"isMounted",!1),f()(this,"state",{error:null,loading:!0,reviews:this.isPreview?this.props.attributes.previewReviews:[],totalReviews:this.isPreview?this.props.attributes.previewReviews.length:0}),f()(this,"setError",async e=>{if(!this.isMounted)return;const{onReviewsLoadError:t}=this.props,r=await Object(L.a)(e);this.setState({reviews:[],loading:!1,error:r}),t(r)})}componentDidMount(){this.isMounted=!0,this.replaceReviews()}componentDidUpdate(e){e.reviewsToDisplay0&&void 0!==arguments[0]?arguments[0]:[];const{reviewsToDisplay:t}=this.props,{totalReviews:r}=this.state,n=Math.min(r,t)-e.length;return this.setState({loading:!0,reviews:e.concat(Array(n).fill({}))}),(o=this.getArgs(e.length),l()({path:"/wc/store/products/reviews?"+Object.entries(o).map(e=>e.join("=")).join("&"),parse:!1}).then(e=>e.json().then(t=>({reviews:t,totalReviews:parseInt(e.headers.get("x-wp-total"),10)})))).then(t=>{let{reviews:r,totalReviews:n}=t;return this.isMounted&&this.setState({reviews:e.filter(e=>Object.keys(e).length).concat(r),totalReviews:n,loading:!1,error:null}),{newReviews:r}}).catch(this.setError);var o}render(){const{reviewsToDisplay:t}=this.props,{error:r,loading:n,reviews:s,totalReviews:i}=this.state;return Object(o.createElement)(e,C()({},this.props,{error:r,isLoading:n,reviews:s.slice(0,t),totalReviews:i}))}}f()(t,"defaultProps",{delayFunction:e=>e,onReviewsAppended:()=>{},onReviewsLoadError:()=>{},onReviewsReplaced:()=>{}});const{displayName:r=e.name||"Component"}=e;return t.displayName=`WithReviews( ${r} )`,t})(e=>{let{attributes:t,onAppendReviews:r,onChangeOrderby:n,reviews:i,sortSelectValue:c,totalReviews:a}=e;if(0===i.length)return null;const l=Object(d.getSetting)("reviewRatingsEnabled",!0);return Object(o.createElement)(o.Fragment,null,"false"!==t.showOrderby&&l&&Object(o.createElement)(h,{value:c,onChange:n}),Object(o.createElement)(P,{attributes:t,reviews:i}),"false"!==t.showLoadMore&&a>i.length&&Object(o.createElement)(m,{onClick:r,screenReaderLabel:Object(s.__)("Load more reviews","woo-gutenberg-products-block")}))});class I extends c.Component{constructor(){super(...arguments);const{attributes:e}=this.props;this.state={orderby:e.orderby,reviewsToDisplay:parseInt(e.reviewsOnPageLoad,10)},this.onAppendReviews=this.onAppendReviews.bind(this),this.onChangeOrderby=this.onChangeOrderby.bind(this)}onAppendReviews(){const{attributes:e}=this.props,{reviewsToDisplay:t}=this.state;this.setState({reviewsToDisplay:t+parseInt(e.reviewsOnLoadMore,10)})}onChangeOrderby(e){const{attributes:t}=this.props;this.setState({orderby:e.target.value,reviewsToDisplay:parseInt(t.reviewsOnPageLoad,10)})}onReviewsAppended(e){let{newReviews:t}=e;Object(i.speak)(Object(s.sprintf)( +/* translators: %d is the count of reviews loaded. */ +Object(s._n)("%d review loaded.","%d reviews loaded.",t.length,"woo-gutenberg-products-block"),t.length))}onReviewsReplaced(){Object(i.speak)(Object(s.__)("Reviews list updated.","woo-gutenberg-products-block"))}onReviewsLoadError(){Object(i.speak)(Object(s.__)("There was an error loading the reviews.","woo-gutenberg-products-block"))}render(){const{attributes:e}=this.props,{categoryIds:t,productId:r}=e,{reviewsToDisplay:n}=this.state,{order:s,orderby:i}=(e=>{if(Object(d.getSetting)("reviewRatingsEnabled",!0)){if("lowest-rating"===e)return{order:"asc",orderby:"rating"};if("highest-rating"===e)return{order:"desc",orderby:"rating"}}return{order:"desc",orderby:"date_gmt"}})(this.state.orderby);return Object(o.createElement)(M,{attributes:e,categoryIds:t,onAppendReviews:this.onAppendReviews,onChangeOrderby:this.onChangeOrderby,onReviewsAppended:this.onReviewsAppended,onReviewsLoadError:this.onReviewsLoadError,onReviewsReplaced:this.onReviewsReplaced,order:s,orderby:i,productId:r,reviewsToDisplay:n,sortSelectValue:this.state.orderby})}}var B=I;Object(n.a)({selector:"\n\t.wp-block-woocommerce-all-reviews,\n\t.wp-block-woocommerce-reviews-by-product,\n\t.wp-block-woocommerce-reviews-by-category\n",Block:B,getProps:e=>({attributes:{showReviewDate:e.classList.contains("has-date"),showReviewerName:e.classList.contains("has-name"),showReviewImage:e.classList.contains("has-image"),showReviewRating:e.classList.contains("has-rating"),showReviewContent:e.classList.contains("has-content"),showProductName:e.classList.contains("has-product-name")}})})},21:function(e,t,r){"use strict";var n=r(0),o=r(4),s=r.n(o);t.a=e=>{let t,{label:r,screenReaderLabel:o,wrapperElement:i,wrapperProps:c={}}=e;const a=null!=r,l=null!=o;return!a&&l?(t=i||"span",c={...c,className:s()(c.className,"screen-reader-text")},Object(n.createElement)(t,c,o)):(t=i||n.Fragment,a&&l&&r!==o?Object(n.createElement)(t,c,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,c,r))}},23:function(e,t){e.exports=window.wp.a11y},27:function(e,t){e.exports=window.wp.apiFetch},3:function(e,t){e.exports=window.React},37:function(e,t){},4:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:c=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const a=n(e,r),l=c(e,r),p={...e.dataset,...a.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:c={},errorBoundaryProps:a={}}=e;Object(s.render)(Object(s.createElement)(i.a,a,Object(s.createElement)(s.Suspense,{fallback:Object(s.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(s.createElement)(t,o()({},c,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:a,attributes:p,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(c.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:o,selector:s}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrappers:s}=e;const i=document.body.querySelectorAll(o);s&&s.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,s)),a({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:o,selector:s,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:o,wrapper:s}=e;const i=s.querySelectorAll(o);a({Block:t,containers:i,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},66:function(e,t,r){"use strict";r.d(t,"n",(function(){return s})),r.d(t,"l",(function(){return i})),r.d(t,"k",(function(){return c})),r.d(t,"m",(function(){return a})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return p})),r.d(t,"f",(function(){return u})),r.d(t,"j",(function(){return d})),r.d(t,"c",(function(){return b})),r.d(t,"e",(function(){return w})),r.d(t,"g",(function(){return m})),r.d(t,"a",(function(){return g})),r.d(t,"h",(function(){return h})),r.d(t,"b",(function(){return v}));var n,o=r(2);const s=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),i=s.pluginUrl+"images/",c=s.pluginUrl+"build/",a=s.buildPhase,l=null===(n=o.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,p=(o.STORE_PAGES.checkout.id,o.STORE_PAGES.checkout.permalink),u=o.STORE_PAGES.privacy.permalink,d=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),b=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id,o.STORE_PAGES.cart.permalink),w=o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),m=Object(o.getSetting)("shippingCountries",{}),g=Object(o.getSetting)("allowedCountries",{}),h=Object(o.getSetting)("shippingStates",{}),v=Object(o.getSetting)("allowedStates",{})},8:function(e,t,r){e.exports=r(42)()},88:function(e,t,r){"use strict";r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return s}));var n=r(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},s=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(n.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}}}); \ No newline at end of file diff --git a/build/single-product-frontend.asset.php b/build/single-product-frontend.asset.php new file mode 100644 index 00000000000..8900ece606e --- /dev/null +++ b/build/single-product-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => 'e820c2ae25965834ee472aa19893350f'); \ No newline at end of file diff --git a/build/single-product-frontend.js b/build/single-product-frontend.js new file mode 100644 index 00000000000..a8cc2e86bc5 --- /dev/null +++ b/build/single-product-frontend.js @@ -0,0 +1,3 @@ +!function(e){function t(t){for(var n,o,c=t[0],i=t[1],a=0,l=[];a{let{imageUrl:t=s.l+"/block-error.svg",header:n=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:i=Object(a.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(c.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(c.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(c.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},n&&Object(c.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},n),r&&Object(c.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(c.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},i?i+" ":"",o),l&&Object(c.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};n(37);class u extends i.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(c.createElement)(c.Fragment,null,Object(c.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:n=!0,text:r,errorMessagePrefix:o,renderError:i,button:a}=this.props,{errorMessage:s,hasError:u}=this.state;return u?"function"==typeof i?i({errorMessage:s}):Object(c.createElement)(l,{errorMessage:n?s:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:a}):this.props.children}}t.a=u},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(0);n(9);const o=Object(r.createContext)({isEditor:!1,currentPostId:0,currentView:"",previewData:{},getPreviewData:()=>{}}),c=()=>Object(r.useContext)(o)},function(e,t){e.exports=window.wp.htmlEntities},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(5),o=n(0),c=n(6),i=n(9),a=n(19),s=n(70),l=n(109),u=n(18),p=n(67);const d=e=>{const t=e.detail;t&&t.preserveCartData||Object(i.dispatch)(c.CART_STORE_KEY).invalidateResolutionForStore()},m=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},f=()=>{Object(o.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(p.b)("added_to_cart","wc-blocks_added_to_cart"),t=Object(p.b)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",d),document.body.addEventListener("wc-blocks_removed_from_cart",d),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",d),document.body.removeEventListener("wc-blocks_removed_from_cart",d)}}window.wcBlocksStoreCartListeners.count++})(),m),[])},b={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},h={...b,email:""},g={total_items:"",total_items_tax:"",total_fees:"",total_fees_tax:"",total_discount:"",total_discount_tax:"",total_shipping:"",total_shipping_tax:"",total_price:"",total_tax:"",tax_lines:c.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},v=e=>Object(s.a)(Object.entries(e).map(e=>{let[t,n]=e;return[t,Object(a.decodeEntities)(n)]})),O={cartCoupons:c.EMPTY_CART_COUPONS,cartItems:c.EMPTY_CART_ITEMS,cartFees:c.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:b,shippingRates:c.EMPTY_SHIPPING_RATES,shippingRatesLoading:!1,cartHasCalculatedShipping:!1,paymentRequirements:c.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:c.EMPTY_EXTENSIONS},y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:n}=Object(u.a)(),a=null==n?void 0:n.previewCart,{shouldSelect:s}=e,p=Object(o.useRef)();f();const d=Object(i.useSelect)((e,n)=>{let{dispatch:r}=n;if(!s)return O;if(t)return{cartCoupons:a.coupons,cartItems:a.items,cartFees:a.fees,cartItemsCount:a.items_count,cartItemsWeight:a.items_weight,cartNeedsPayment:a.needs_payment,cartNeedsShipping:a.needs_shipping,cartItemErrors:c.EMPTY_CART_ITEM_ERRORS,cartTotals:a.totals,cartIsLoading:!1,cartErrors:c.EMPTY_CART_ERRORS,billingAddress:h,shippingAddress:b,extensions:c.EMPTY_EXTENSIONS,shippingRates:a.shipping_rates,shippingRatesLoading:!1,cartHasCalculatedShipping:a.has_calculated_shipping,paymentRequirements:a.paymentRequirements,receiveCart:"function"==typeof(null==a?void 0:a.receiveCart)?a.receiveCart:()=>{}};const o=e(c.CART_STORE_KEY),i=o.getCartData(),u=o.getCartErrors(),p=o.getCartTotals(),d=!o.hasFinishedResolution("getCartData"),m=o.isCustomerDataUpdating(),{receiveCart:f}=r(c.CART_STORE_KEY),g=v(i.billingAddress),y=i.needsShipping?v(i.shippingAddress):g,w=i.fees.length>0?i.fees.map(e=>v(e)):c.EMPTY_CART_FEES;return{cartCoupons:i.coupons.length>0?i.coupons.map(e=>({...e,label:e.code})):c.EMPTY_CART_COUPONS,cartItems:i.items,cartFees:w,cartItemsCount:i.itemsCount,cartItemsWeight:i.itemsWeight,cartNeedsPayment:i.needsPayment,cartNeedsShipping:i.needsShipping,cartItemErrors:i.errors,cartTotals:p,cartIsLoading:d,cartErrors:u,billingAddress:Object(l.a)(g),shippingAddress:Object(l.a)(y),extensions:i.extensions,shippingRates:i.shippingRates,shippingRatesLoading:m,cartHasCalculatedShipping:i.hasCalculatedShipping,paymentRequirements:i.paymentRequirements,receiveCart:f}},[s]);return p.current&&Object(r.isEqual)(p.current,d)||(p.current=d),p.current}},function(e,t){e.exports=window.wp.a11y},function(e,t){e.exports=window.wp.primitives},,function(e,t,n){"use strict";(function(e){var r=n(0);n(45);const o=Object(r.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,n(65))},function(e,t){e.exports=window.wp.apiFetch},,,function(e,t){e.exports=window.wp.deprecated},,,,function(e,t){e.exports=window.wp.url},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return c})),n.d(t,"e",(function(){return i})),n.d(t,"a",(function(){return a}));const r=e=>"number"==typeof e,o=e=>"string"==typeof e,c=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function i(e,t){return c(e)&&t in e}const a=e=>"boolean"==typeof e},,function(e,t){},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(48),o=n(0),c=n(22);const i=()=>{const e=Object(c.a)(),t=Object(o.useRef)(e);return Object(o.useEffect)(()=>{t.current=e},[e]),{dispatchStoreEvent:Object(o.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-"+e,t)}catch(e){console.error(e)}}),[]),dispatchCheckoutEvent:Object(o.useCallback)((function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{Object(r.doAction)("experimental__woocommerce_blocks-checkout-"+e,{...n,storeCart:t.current})}catch(e){console.error(e)}}),[])}}},,function(e,t){e.exports=window.wc.priceFormat},,function(e,t,n){"use strict";var r=n(43);function o(){}function c(){}c.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,c,i){if(i!==r){var a=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 a.name="Invariant Violation",a}}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:c,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},,function(e,t){e.exports=window.wp.warning},function(e,t,n){"use strict";var r=n(7),o=n(0),c=n(24),i=function({icon:e,className:t,...n}){const c=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(r.a)({className:c},n))};t.a=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return Object(o.createElement)(i,Object(r.a)({icon:e},n));if(Object(o.isValidElement)(e)&&i===e.type)return Object(o.cloneElement)(e,{...n});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...n}):e({size:t,...n});if(e&&("svg"===e.type||e.type===c.SVG)){const r={width:t,height:t,...e.props,...n};return Object(o.createElement)(c.SVG,r)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...n}):e}},function(e,t,n){"use strict";var r=n(4),o=n.n(r),c=n(0);t.a=Object(c.forwardRef)((function({as:e="div",className:t,...n},r){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(c.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...n,ref:r})}))},function(e,t){e.exports=window.wp.hooks},function(e,t){e.exports=window.wc.wcBlocksSharedContext},function(e,t,n){"use strict";var r=n(2),o=n(1),c=n(35);const i=Object(r.getSetting)("countryLocale",{}),a=e=>{const t={};return void 0!==e.label&&(t.label=e.label),void 0!==e.required&&(t.required=e.required),void 0!==e.hidden&&(t.hidden=e.hidden),void 0===e.label||e.optionalLabel||(t.optionalLabel=Object(o.sprintf)( +/* translators: %s Field label. */ +Object(o.__)("%s (optional)","woo-gutenberg-products-block"),e.label)),e.priority&&(Object(c.b)(e.priority)&&(t.index=e.priority),Object(c.d)(e.priority)&&(t.index=parseInt(e.priority,10))),e.hidden&&(t.required=!1),t},s=Object.entries(i).map(e=>{let[t,n]=e;return[t,Object.entries(n).map(e=>{let[t,n]=e;return[t,a(n)]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})]}).reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{});t.a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";const o=n&&void 0!==s[n]?s[n]:{};return e.map(e=>({key:e,...r.defaultAddressFields[e]||{},...o[e]||{},...t[e]||{}})).sort((e,t)=>e.index-t.index)}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(10),o=n.n(r),c=n(0),i=n(16);const a=[".wp-block-woocommerce-cart"],s=e=>{let{Block:t,containers:n,getProps:r=(()=>({})),getErrorBoundaryProps:a=(()=>({}))}=e;0!==n.length&&Array.prototype.forEach.call(n,(e,n)=>{const s=r(e,n),l=a(e,n),u={...e.dataset,...s.attributes||{}};(e=>{let{Block:t,container:n,attributes:r={},props:a={},errorBoundaryProps:s={}}=e;Object(c.render)(Object(c.createElement)(i.a,s,Object(c.createElement)(c.Suspense,{fallback:Object(c.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(c.createElement)(t,o()({},a,{attributes:r})))),n,()=>{n.classList&&n.classList.remove("is-loading")})})({Block:t,container:e,props:s,attributes:u,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(a.join(",")),{Block:n,getProps:r,getErrorBoundaryProps:o,selector:c}=e;(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrappers:c}=e;const i=document.body.querySelectorAll(o);c&&c.length>0&&Array.prototype.filter.call(i,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,c)),s({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})})({Block:n,getProps:r,getErrorBoundaryProps:o,selector:c,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:n,getErrorBoundaryProps:r,selector:o,wrapper:c}=e;const i=c.querySelectorAll(o);s({Block:t,containers:i,getProps:n,getErrorBoundaryProps:r})})({...e,wrapper:t})})})}},,,function(e,t,n){"use strict";var r=n(7),o=n(0),c=n(4),i=n.n(c),a=n(5),s=n(30),l=n.n(s),u=n(12),p=n(60),d=n(90),m=n(1);function f(e,t,n){const{defaultView:r}=t,{frameElement:o}=r;if(!o||t===n.ownerDocument)return e;const c=o.getBoundingClientRect();return new r.DOMRect(e.left+c.left,e.top+c.top,e.width,e.height)}let b=0;function h(e){const t=document.scrollingElement||document.body;e&&(b=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=b)}let g=0;function v(){return Object(o.useEffect)(()=>(0===g&&h(!0),++g,()=>{1===g&&h(!1),--g}),[]),null}var O=n(26);function y(e){const t=Object(o.useContext)(O.a),n=t.slots[e]||{},r=t.fills[e],c=Object(o.useMemo)(()=>r||[],[r]);return{...n,updateSlot:Object(o.useCallback)(n=>{t.updateSlot(e,n)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(n=>{t.unregisterSlot(e,n)},[e,t.unregisterSlot]),fills:c,registerFill:Object(o.useCallback)(n=>{t.registerFill(e,n)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(n=>{t.unregisterFill(e,n)},[e,t.unregisterFill])}}var w=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function E({name:e,children:t,registerFill:n,unregisterFill:r}){const c=(e=>{const{getSlot:t,subscribe:n}=Object(o.useContext)(w),[r,c]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(c(t(e)),n(()=>{c(t(e))})),[e]),r})(e),i=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(n(e,i.current),()=>r(e,i.current)),[]),Object(o.useLayoutEffect)(()=>{i.current.children=t,c&&c.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==i.current.name&&(r(i.current.name,i.current),i.current.name=e,n(e,i.current))},[e]),c&&c.node?(Object(a.isFunction)(t)&&(t=t(c.props.fillProps)),Object(o.createPortal)(t,c.node)):null}var k=e=>Object(o.createElement)(w.Consumer,null,({registerFill:t,unregisterFill:n})=>Object(o.createElement)(E,Object(r.a)({},e,{registerFill:t,unregisterFill:n})));class j extends o.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:r}=this.props,c=Object(a.map)(r(t,this),e=>{const t=Object(a.isFunction)(e.children)?e.children(n):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(a.isString)(e))return e;const n=e.key||t;return Object(o.cloneElement)(e,{key:n})})}).filter(Object(a.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(a.isFunction)(e)?e(c):c)}}var _=e=>Object(o.createElement)(w.Consumer,null,({registerSlot:t,unregisterSlot:n,getFills:c})=>Object(o.createElement)(j,Object(r.a)({},e,{registerSlot:t,unregisterSlot:n,getFills:c})));function x(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function S({name:e,children:t}){const n=y(e),r=Object(o.useRef)({rerender:x()});return Object(o.useEffect)(()=>(n.registerFill(r),()=>{n.unregisterFill(r)}),[n.registerFill,n.unregisterFill]),n.ref&&n.ref.current?("function"==typeof t&&(t=t(n.fillProps)),Object(o.createPortal)(t,n.ref.current)):null}var C=Object(o.forwardRef)((function({name:e,fillProps:t={},as:n="div",...c},i){const a=Object(o.useContext)(O.a),s=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(a.registerSlot(e,s,t),()=>{a.unregisterSlot(e,s)}),[a.registerSlot,a.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{a.updateSlot(e,t)}),Object(o.createElement)(n,Object(r.a)({ref:Object(u.useMergeRefs)([i,s])},c))}));function T(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(k,e),Object(o.createElement)(S,e))}n(11),o.Component;const P=Object(o.forwardRef)(({bubblesVirtually:e,...t},n)=>e?Object(o.createElement)(C,Object(r.a)({},t,{ref:n})):Object(o.createElement)(_,t));function R(e){return"appear"===e?"top":"left"}function A(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:c}=(i=t).ownerDocument.defaultView.getComputedStyle(i);var i;const a=n?parseInt(n,10):0,s=r?parseInt(r,10):0,l=o?parseInt(o,10):0,u=c?parseInt(c,10):0;return{x:e.left+l,y:e.top+a,width:e.width-l-u,height:e.height-a-s,left:e.left+l,right:e.right-u,top:e.top+a,bottom:e.bottom-s}}function N(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function L(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function M(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const B=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:n,className:c,noArrow:a=!0,isAlternate:s,position:b="bottom right",range:h,focusOnMount:g="firstElement",anchorRef:O,shouldAnchorIncludePadding:w,anchorRect:E,getAnchorRect:k,expandOnMobile:j,animate:_=!0,onClickOutside:x,onFocusOutside:S,__unstableStickyBoundaryElement:C,__unstableSlotName:P="Popover",__unstableObserveElement:B,__unstableBoundaryParent:F,__unstableForcePosition:D,__unstableForceXAlignment:I,...H},z)=>{const U=Object(o.useRef)(null),V=Object(o.useRef)(null),W=Object(o.useRef)(),Y=Object(u.useViewportMatch)("medium","<"),[q,X]=Object(o.useState)(),$=y(P),Z=j&&Y,[K,Q]=Object(u.useResizeObserver)();a=Z||a,Object(o.useLayoutEffect)(()=>{if(Z)return M(W.current,"is-without-arrow",a),M(W.current,"is-alternate",s),N(W.current,"data-x-axis"),N(W.current,"data-y-axis"),L(W.current,"top"),L(W.current,"left"),L(V.current,"maxHeight"),void L(V.current,"maxWidth");const e=()=>{if(!W.current||!V.current)return;let e=function(e,t,n,r=!1,o,c){if(t)return t;if(n){if(!e.current)return;const t=n(e.current);return f(t,t.ownerDocument||e.current.ownerDocument,c)}if(!1!==r){if(!(r&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==r?void 0:r.cloneRange))return f(Object(p.getRectangleFromRange)(r),r.endContainer.ownerDocument,c);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=f(r.getBoundingClientRect(),r.ownerDocument,c);return o?e:A(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=f(new window.DOMRect(n.left,n.top,n.width,i.bottom-n.top),e.ownerDocument,c);return o?a:A(a,r)}if(!e.current)return;const{parentNode:i}=e.current,a=i.getBoundingClientRect();return o?a:A(a,i)}(U,E,k,O,w,W.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=W.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 c;F&&(r=null===(c=W.current.closest(".popover-slot"))||void 0===c?void 0:c.parentNode);const i=Q.height?Q:V.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:d,yAxis:h,contentHeight:g,contentWidth:v}=function(e,t,n="top",r,o,c,i,a,s){const[l,u="center",p]=n.split(" "),d=function(e,t,n,r,o,c,i,a){const{height:s}=t;if(o){const t=o.getBoundingClientRect().top+s-i;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},d={popoverTop:e.bottom,contentHeight:e.bottom+10+s>window.innerHeight?window.innerHeight-10-e.bottom:s};let m,f=n,b=null;if(!o&&!a)if("middle"===n&&u.contentHeight===s)f="middle";else if("top"===n&&p.contentHeight===s)f="top";else if("bottom"===n&&d.contentHeight===s)f="bottom";else{f=p.contentHeight>d.contentHeight?"top":"bottom";const e="top"===f?p.contentHeight:d.contentHeight;b=e!==s?e:null}return m="middle"===f?u.popoverTop:"top"===f?p.popoverTop:d.popoverTop,{yAxis:f,popoverTop:m,contentHeight:b}}(e,t,l,p,r,0,c,a);return{...function(e,t,n,r,o,c,i,a,s){const{width:l}=t;"left"===n&&Object(m.isRTL)()?n="right":"right"===n&&Object(m.isRTL)()&&(n="left"),"left"===r&&Object(m.isRTL)()?r="right":"right"===r&&Object(m.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 d=e.left;"right"===r?d=e.right:"middle"===c||s||(d=u);let f=e.right;"left"===r?f=e.left:"middle"===c||s||(f=u);const b={popoverLeft:d,contentWidth:d-l>0?l:d},h={popoverLeft:f,contentWidth:f+l>window.innerWidth?window.innerWidth-f:l};let g,v=n,O=null;if(!o&&!a)if("center"===n&&p.contentWidth===l)v="center";else if("left"===n&&b.contentWidth===l)v="left";else if("right"===n&&h.contentWidth===l)v="right";else{v=b.contentWidth>h.contentWidth?"left":"right";const e="left"===v?b.contentWidth:h.contentWidth;l>window.innerWidth&&(O=window.innerWidth),e!==l&&(v="center",p.popoverLeft=window.innerWidth/2)}if(g="center"===v?p.popoverLeft:"left"===v?b.popoverLeft:h.popoverLeft,i){const e=i.getBoundingClientRect();g=Math.min(g,e.right-l),Object(m.isRTL)()||(g=Math.max(g,0))}return{xAxis:v,popoverLeft:g,contentWidth:O}}(e,t,u,p,r,d.yAxis,i,a,s),...d}}(e,i,b,C,W.current,o,r,D,I);"number"==typeof l&&"number"==typeof u&&(L(W.current,"top",l+"px"),L(W.current,"left",u+"px")),M(W.current,"is-without-arrow",a||"center"===d&&"middle"===h),M(W.current,"is-alternate",s),N(W.current,"data-x-axis",d),N(W.current,"data-y-axis",h),L(V.current,"maxHeight","number"==typeof g?g+"px":""),L(V.current,"maxWidth","number"==typeof v?v+"px":""),X(({left:"right",right:"left"}[d]||"center")+" "+({top:"bottom",bottom:"top"}[h]||"middle"))};e();const{ownerDocument:t}=W.current,{defaultView:n}=t,r=n.setInterval(e,500);let o;const c=()=>{n.cancelAnimationFrame(o),o=n.requestAnimationFrame(e)};n.addEventListener("click",c),n.addEventListener("resize",e),n.addEventListener("scroll",e,!0);const i=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(O);let l;return i&&i!==t&&(i.defaultView.addEventListener("resize",e),i.defaultView.addEventListener("scroll",e,!0)),B&&(l=new n.MutationObserver(e),l.observe(B,{attributes:!0})),()=>{n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",c),n.cancelAnimationFrame(o),i&&i!==t&&(i.defaultView.removeEventListener("resize",e),i.defaultView.removeEventListener("scroll",e,!0)),l&&l.disconnect()}},[Z,E,k,O,w,b,Q,C,B,F]);const J=(e,n)=>{if("focus-outside"===e&&S)S(n);else if("focus-outside"===e&&x){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>n.relatedTarget}),l()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),x(e)}else t&&t()},[ee,te]=Object(u.__experimentalUseDialog)({focusOnMount:g,__unstableOnClose:J,onClose:J}),ne=Object(u.useMergeRefs)([W,ee,z]),re=Boolean(_&&q)&&function(e){if("loading"===e.type)return i()("components-animate__loading");const{type:t,origin:n=R(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:q});let oe=Object(o.createElement)("div",Object(r.a)({className:i()("components-popover",c,re,{"is-expanded":Z,"is-without-arrow":a,"is-alternate":s})},H,{ref:ne},te,{tabIndex:"-1"}),Z&&Object(o.createElement)(v,null),Z&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(G,{className:"components-popover__close",icon:d.a,onClick:t})),Object(o.createElement)("div",{ref:V,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},K,n)));return $.ref&&(oe=Object(o.createElement)(T,{name:P},oe)),O||E?oe:Object(o.createElement)("span",{ref:U},oe)});B.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(P,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var F=B,D=function({shortcut:e,className:t}){if(!e)return null;let n,r;return Object(a.isString)(e)&&(n=e),Object(a.isObject)(e)&&(n=e.display,r=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":r},n)};const I=Object(o.createElement)("div",{className:"event-catcher"}),H=({eventHandlers:e,child:t,childrenWithPopover:n})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(I,e),Object(o.cloneElement)(t,{children:n}),","),e),z=({child:e,eventHandlers:t,childrenWithPopover:n})=>Object(o.cloneElement)(e,{...t,children:n}),U=(e,t,n)=>{if(1!==o.Children.count(e))return;const r=o.Children.only(e);"function"==typeof r.props[t]&&r.props[t](n)};var V=function({children:e,position:t,text:n,shortcut:r}){const[c,i]=Object(o.useState)(!1),[s,l]=Object(o.useState)(!1),p=Object(u.useDebounce)(l,700),d=t=>{U(e,"onMouseDown",t),document.addEventListener("mouseup",b),i(!0)},m=t=>{U(e,"onMouseUp",t),document.removeEventListener("mouseup",b),i(!1)},f=e=>"mouseUp"===e?m:"mouseDown"===e?d:void 0,b=f("mouseUp"),h=(t,n)=>r=>{if(U(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&c)return;p.cancel();const o=Object(a.includes)(["focus","mouseenter"],r.type);o!==s&&(n?p(o):l(o))},g=()=>{p.cancel(),document.removeEventListener("mouseup",b)};if(Object(o.useEffect)(()=>g,[]),1!==o.Children.count(e))return e;const v={onMouseEnter:h("onMouseEnter",!0),onMouseLeave:h("onMouseLeave"),onClick:h("onClick"),onFocus:h("onFocus"),onBlur:h("onBlur"),onMouseDown:f("mouseDown")},O=o.Children.only(e),{children:y,disabled:w}=O.props;return(w?H:z)({child:O,eventHandlers:v,childrenWithPopover:(({grandchildren:e,isOver:t,position:n,text:r,shortcut:c})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(F,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(o.createElement)(D,{className:"components-tooltip__shortcut",shortcut:c}))))({grandchildren:y,isOver:s,position:t,text:n,shortcut:r})})},W=n(46),Y=n(47);const q=["onMouseDown","onClick"];var G=t.a=Object(o.forwardRef)((function(e,t){const{href:n,target:c,isSmall:s,isPressed:u,isBusy:p,isDestructive:d,className:m,disabled:f,icon:b,iconPosition:h="left",iconSize:g,showTooltip:v,tooltipPosition:O,shortcut:y,label:w,children:E,text:k,variant:j,__experimentalIsFocusable:_,describedBy:x,...S}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,variant:c,...i}){let a=c;var s,u,p,d,m;return t&&(null!==(s=a)&&void 0!==s||(a="primary")),r&&(null!==(u=a)&&void 0!==u||(a="tertiary")),n&&(null!==(p=a)&&void 0!==p||(a="secondary")),e&&(l()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(d=a)&&void 0!==d||(a="secondary")),o&&(null!==(m=a)&&void 0!==m||(a="link")),{...i,variant:a}}(e),C=i()("components-button",m,{"is-secondary":"secondary"===j,"is-primary":"primary"===j,"is-small":s,"is-tertiary":"tertiary"===j,"is-pressed":u,"is-busy":p,"is-link":"link"===j,"is-destructive":d,"has-text":!!b&&!!E,"has-icon":!!b}),T=f&&!_,P=void 0===n||T?"button":"a",R="a"===P?{href:n,target:c}:{type:"button",disabled:T,"aria-pressed":u};if(f&&_){R["aria-disabled"]=!0;for(const e of q)S[e]=e=>{e.stopPropagation(),e.preventDefault()}}const A=!T&&(v&&w||y||!!w&&(!E||Object(a.isArray)(E)&&!E.length)&&!1!==v),N=x?Object(a.uniqueId)():null,L=S["aria-describedby"]||N,M=Object(o.createElement)(P,Object(r.a)({},R,S,{className:C,"aria-label":S["aria-label"]||w,"aria-describedby":L,ref:t}),b&&"left"===h&&Object(o.createElement)(W.a,{icon:b,size:g}),k&&Object(o.createElement)(o.Fragment,null,k),b&&"right"===h&&Object(o.createElement)(W.a,{icon:b,size:g}),E);return A?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(V,{text:x||w,shortcut:y,position:O},M),x&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:N},x))):Object(o.createElement)(o.Fragment,null,M,x&&Object(o.createElement)(Y.a,null,Object(o.createElement)("span",{id:N},x)))}))},function(e,t,n){var r=n(76),o=n(58),c=o.setStyleProp,i=r.html,a=r.svg,s=r.isCustomAttribute,l=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n,r,u;e=e||{};var p={};for(t in e)r=e[t],s(t)?p[t]=r:(n=t.toLowerCase(),l.call(i,n)?p[(u=i[n]).propertyName]=!!(u.hasBooleanValue||u.hasOverloadedBooleanValue&&!r)||r:l.call(a,t)?p[(u=a[t]).propertyName]=r:o.PRESERVE_CUSTOM_ATTRIBUTES&&(p[t]=r));return c(e.style,p),p}},function(e,t,n){var r=n(3),o=n(80).default,c={reactCompat:!0},i=r.version.split(".")[0]>=16;e.exports={PRESERVE_CUSTOM_ATTRIBUTES:i,invertObject:function(e,t){if(!e||"object"!=typeof e)throw new TypeError("First argument must be an object");var n,r,o="function"==typeof t,c={},i={};for(n in e)r=e[n],o&&(c=t(n,r))&&2===c.length?i[c[0]]=c[1]:"string"==typeof r&&(i[r]=n);return i},isCustomComponent:function(e,t){if(-1===e.indexOf("-"))return t&&"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}},setStyleProp:function(e,t){null!=e&&(t.style=o(e,c))}}},function(e,t,n){for(var r,o=n(86).CASE_SENSITIVE_TAG_NAMES,c={},i=0,a=o.length;i1)for(var n=1;n{let{bubbles:n=!1,cancelable:o=!1,element:c,detail:i={}}=t;if(!r)return;c||(c=document.body);const a=new r(e,{bubbles:n,cancelable:o,detail:i});c.dispatchEvent(a)};let c;const i=()=>{c&&clearTimeout(c),c=setTimeout(()=>{o("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if("function"!=typeof jQuery)return()=>{};const c=()=>{o(t,{bubbles:n,cancelable:r})};return jQuery(document).on(e,c),()=>jQuery(document).off(e,c)}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=e=>e.reduce((e,t)=>{let[n,r]=t;return e[n]=r,e},{})},,,,function(e,t){},function(e,t,n){var r=n(3),o=n(57),c=n(58),i=c.setStyleProp;function a(e){return c.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&c.isCustomComponent(e.name,e.attribs)}e.exports=function e(t,n){for(var c,s,l,u,p=(n=n||{}).library||r,d=p.cloneElement,m=p.createElement,f=p.isValidElement,b=[],h="function"==typeof n.replace,g=n.trim,v=0,O=t.length;v1&&(s=d(s,{key:s.key||v})),b.push(s);else if("text"!==c.type){switch(l=c.attribs,a(c)?i(l.style,l):l&&(l=o(l)),u=null,c.type){case"script":case"style":c.children[0]&&(l.dangerouslySetInnerHTML={__html:c.children[0].data});break;case"tag":"textarea"===c.name&&c.children[0]?l.defaultValue=c.children[0].data:c.children&&c.children.length&&(u=e(c.children,n));break;default:continue}O>1&&(l.key=v),b.push(m(c.name,l,u))}else g?c.data.trim()&&b.push(c.data):b.push(c.data);return 1===b.length?b[0]:b}},function(e,t,n){var r=n(77),o=n(78),c=n(79),i=c.MUST_USE_PROPERTY,a=c.HAS_BOOLEAN_VALUE,s=c.HAS_NUMERIC_VALUE,l=c.HAS_POSITIVE_NUMERIC_VALUE,u=c.HAS_OVERLOADED_BOOLEAN_VALUE;function p(e,t){return(e&t)===t}function d(e,t,n){var r,o,c,d=e.Properties,m=e.DOMAttributeNames;for(o in d)r=m[o]||(n?o:o.toLowerCase()),c=d[o],t[r]={attributeName:r,propertyName:o,mustUseProperty:p(c,i),hasBooleanValue:p(c,a),hasNumericValue:p(c,s),hasPositiveNumericValue:p(c,l),hasOverloadedBooleanValue:p(c,u)}}var m={};d(r,m);var f={};d(o,f,!0);var b={};d(r,b),d(o,b,!0),e.exports={html:m,svg:f,properties:b,isCustomAttribute:RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"))}},function(e,t){e.exports={Properties:{autoFocus:4,accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:4,allowTransparency:0,alt:0,as:0,async:4,autoComplete:0,autoPlay:4,capture:4,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:5,cite:0,classID:0,className:0,cols:24,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:4,controlsList:0,coords:0,crossOrigin:0,data:0,dateTime:0,default:4,defer:4,dir:0,disabled:4,download:32,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:4,formTarget:0,frameBorder:0,headers:0,height:0,hidden:4,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:4,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:5,muted:5,name:0,nonce:0,noValidate:4,open:4,optimum:0,pattern:0,placeholder:0,playsInline:4,poster:0,preload:0,profile:0,radioGroup:0,readOnly:4,referrerPolicy:0,rel:0,required:4,reversed:4,role:0,rows:24,rowSpan:8,sandbox:0,scope:0,scoped:4,scrolling:0,seamless:4,selected:5,shape:0,size:24,sizes:0,span:24,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:8,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:0,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:4,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"}}},function(e,t){e.exports={Properties:{accentHeight:0,accumulate:0,additive:0,alignmentBaseline:0,allowReorder:0,alphabetic:0,amplitude:0,arabicForm:0,ascent:0,attributeName:0,attributeType:0,autoReverse:0,azimuth:0,baseFrequency:0,baseProfile:0,baselineShift:0,bbox:0,begin:0,bias:0,by:0,calcMode:0,capHeight:0,clip:0,clipPath:0,clipRule:0,clipPathUnits:0,colorInterpolation:0,colorInterpolationFilters:0,colorProfile:0,colorRendering:0,contentScriptType:0,contentStyleType:0,cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:0,direction:0,display:0,divisor:0,dominantBaseline:0,dur:0,dx:0,dy:0,edgeMode:0,elevation:0,enableBackground:0,end:0,exponent:0,externalResourcesRequired:0,fill:0,fillOpacity:0,fillRule:0,filter:0,filterRes:0,filterUnits:0,floodColor:0,floodOpacity:0,focusable:0,fontFamily:0,fontSize:0,fontSizeAdjust:0,fontStretch:0,fontStyle:0,fontVariant:0,fontWeight:0,format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:0,glyphOrientationHorizontal:0,glyphOrientationVertical:0,glyphRef:0,gradientTransform:0,gradientUnits:0,hanging:0,horizAdvX:0,horizOriginX:0,ideographic:0,imageRendering:0,in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:0,kernelUnitLength:0,kerning:0,keyPoints:0,keySplines:0,keyTimes:0,lengthAdjust:0,letterSpacing:0,lightingColor:0,limitingConeAngle:0,local:0,markerEnd:0,markerMid:0,markerStart:0,markerHeight:0,markerUnits:0,markerWidth:0,mask:0,maskContentUnits:0,maskUnits:0,mathematical:0,mode:0,numOctaves:0,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:0,overlineThickness:0,paintOrder:0,panose1:0,pathLength:0,patternContentUnits:0,patternTransform:0,patternUnits:0,pointerEvents:0,points:0,pointsAtX:0,pointsAtY:0,pointsAtZ:0,preserveAlpha:0,preserveAspectRatio:0,primitiveUnits:0,r:0,radius:0,refX:0,refY:0,renderingIntent:0,repeatCount:0,repeatDur:0,requiredExtensions:0,requiredFeatures:0,restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:0,slope:0,spacing:0,specularConstant:0,specularExponent:0,speed:0,spreadMethod:0,startOffset:0,stdDeviation:0,stemh:0,stemv:0,stitchTiles:0,stopColor:0,stopOpacity:0,strikethroughPosition:0,strikethroughThickness:0,string:0,stroke:0,strokeDasharray:0,strokeDashoffset:0,strokeLinecap:0,strokeLinejoin:0,strokeMiterlimit:0,strokeOpacity:0,strokeWidth:0,surfaceScale:0,systemLanguage:0,tableValues:0,targetX:0,targetY:0,textAnchor:0,textDecoration:0,textRendering:0,textLength:0,to:0,transform:0,u1:0,u2:0,underlinePosition:0,underlineThickness:0,unicode:0,unicodeBidi:0,unicodeRange:0,unitsPerEm:0,vAlphabetic:0,vHanging:0,vIdeographic:0,vMathematical:0,values:0,vectorEffect:0,version:0,vertAdvY:0,vertOriginX:0,vertOriginY:0,viewBox:0,viewTarget:0,visibility:0,widths:0,wordSpacing:0,writingMode:0,x:0,xHeight:0,x1:0,x2:0,xChannelSelector:0,xlinkActuate:0,xlinkArcrole:0,xlinkHref:0,xlinkRole:0,xlinkShow:0,xlinkTitle:0,xlinkType:0,xmlBase:0,xmlns:0,xmlnsXlink:0,xmlLang:0,xmlSpace:0,y:0,y1:0,y2:0,yChannelSelector:0,z:0,zoomAndPan:0},DOMAttributeNames:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},function(e,t){e.exports={MUST_USE_PROPERTY:1,HAS_BOOLEAN_VALUE:4,HAS_NUMERIC_VALUE:8,HAS_POSITIVE_NUMERIC_VALUE:24,HAS_OVERLOADED_BOOLEAN_VALUE:32}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};t.__esModule=!0;var o=r(n(81)),c=n(83);t.default=function(e,t){var n={};return e&&"string"==typeof e?(o.default(e,(function(e,r){e&&r&&(n[c.camelCase(e,t)]=r)})),n):n}},function(e,t,n){var r=n(82);e.exports=function(e,t){var n,o=null;if(!e||"string"!=typeof e)return o;for(var c,i,a=r(e),s="function"==typeof t,l=0,u=a.length;l/;e.exports=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t,n=e.match(a);return n&&n[1]&&(t=n[1],i&&(e=e.replace(n[0],""))),c(r(e),null,t)}},function(e,t,n){var r=n(59),o=/<([a-zA-Z]+[0-9]?)/,c=//i,i=//i,a=/<(area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)(.*?)\/?>/gi,s=r.isIE(9),l=s||r.isIE(),u=function(){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},p=function(){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")};if("function"==typeof window.DOMParser){var d=new window.DOMParser,m=s?"text/xml":"text/html";u=p=function(e,t){return t&&(e="<"+t+">"+e+""),s&&(e=e.replace(a,"<$1$2$3/>")),d.parseFromString(e,m)}}if(document.implementation){var f=document.implementation.createHTMLDocument(l?"html-dom-parser":void 0);u=function(e,t){if(t)return f.documentElement.getElementsByTagName(t)[0].innerHTML=e,f;try{return f.documentElement.innerHTML=e,f}catch(t){if(p)return p(e)}}}var b,h=document.createElement("template");h.content&&(b=function(e){return h.innerHTML=e,h.content.childNodes}),e.exports=function(e){var t,n,r,a,s=e.match(o);switch(s&&s[1]&&(t=s[1].toLowerCase()),t){case"html":return n=p(e),c.test(e)||(r=n.getElementsByTagName("head")[0])&&r.parentNode.removeChild(r),i.test(e)||(r=n.getElementsByTagName("body")[0])&&r.parentNode.removeChild(r),n.getElementsByTagName("html");case"head":case"body":return a=u(e).getElementsByTagName(t),i.test(e)&&c.test(e)?a[0].parentNode.childNodes:a;default:return b?b(e):u(e,"body").getElementsByTagName("body")[0].childNodes}}},function(e,t){e.exports={CASE_SENSITIVE_TAG_NAMES:["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussainBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]}},function(e,t,n){"use strict";n.d(t,"b",(function(){return b})),n.d(t,"a",(function(){return h}));var r=n(0),o=(n(8),n(9)),c=n(38),i=n(18),a=n(10),s=n.n(a),l=n(4),u=n.n(l),p=n(116);n(74);const d=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 m=e=>{let{className:t,notices:n,removeNotice:o}=e;const c=n.filter(e=>"snackbar"!==e.type);if(!c.length)return null;const i=u()(t,"wc-block-components-notices");return Object(r.createElement)("div",{className:i},c.map(e=>Object(r.createElement)(p.a,s()({key:"store-notice-"+e.id},e,{className:u()("wc-block-components-notices__notice",d(e)),onRemove:()=>{e.isDismissible&&o(e.id)}}),e.content)))};const f=Object(r.createContext)({notices:[],createNotice:(e,t,n)=>{},removeNotice:(e,t)=>{},setIsSuppressed:e=>{},context:"wc/core"}),b=()=>Object(r.useContext)(f),h=e=>{let{children:t,className:n="",createNoticeContainer:a=!0,context:s="wc/core"}=e;const{createNotice:l,removeNotice:u}=Object(o.useDispatch)("core/notices"),[p,d]=Object(r.useState)(!1),{dispatchStoreEvent:b}=Object(c.a)(),{isEditor:h}=Object(i.a)(),g=Object(r.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};l(e,t,{...n,context:n.context||s}),b("store-notice-create",{status:e,content:t,options:n})}),[l,b,s]),v=Object(r.useCallback)((function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;u(e,t)}),[u,s]),{notices:O}=Object(o.useSelect)(e=>({notices:e("core/notices").getNotices(s)}),[s]),y={notices:O,createNotice:g,removeNotice:v,context:s,setIsSuppressed:d},w=p?null:Object(r.createElement)(m,{className:n,notices:y.notices,removeNotice:y.removeNotice,isEditor:h});return Object(r.createElement)(f.Provider,{value:y},a&&w,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c}));var r=n(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},c=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},,function(e,t,n){"use strict";var r=n(0),o=n(24);const c=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.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"}));t.a=c},,,,,,,,function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{srcElement:t,size:n=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:n,height:n,...o}):null}},,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(2),o=n(50),c=n(34);const i=e=>{let{country:t="",state:n="",city:r="",postcode:o=""}=e;return{country:t.trim(),state:n.trim(),city:r.trim(),postcode:o?o.replace(" ","").toUpperCase():""}},a=e=>{let{email:t=""}=e;return Object(c.isEmail)(t)?t.trim():""},s=e=>{const t=Object.keys(r.defaultAddressFields),n=Object(o.a)(t,{},e.country),c=Object.assign({},e);return n.forEach(t=>{let{key:n="",hidden:r=!1}=t;r&&((e,t)=>e in t)(n,e)&&(c[n]="")}),c}},function(e,t){e.exports=window.wc.wcBlocksSharedHocs},,,function(e,t){e.exports=window.wp.wordcount},function(e,t){e.exports=window.wp.autop},,function(e,t,n){"use strict";var r=n(0),o=n(5),c=n(4),i=n.n(c),a=n(1),s=n(23),l=n(90),u=n(56);function p(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:n,spokenMessage:c=n,onRemove:d=o.noop,isDismissible:m=!0,actions:f=[],politeness:b=p(t),__unstableHTML:h,onDismiss:g=o.noop}){!function(e,t){const n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)(()=>{n&&Object(s.speak)(n,t)},[n,t])}(c,b);const v=i()(e,"components-notice","is-"+t,{"is-dismissible":m});return h&&(n=Object(r.createElement)(r.RawHTML,null,n)),Object(r.createElement)("div",{className:v},Object(r.createElement)("div",{className:"components-notice__content"},n,Object(r.createElement)("div",{className:"components-notice__actions"},f.map(({className:e,label:t,isPrimary:n,variant:o,noDefaultClasses:c=!1,onClick:a,url:s},l)=>{let p=o;return"primary"===o||c||(p=s?"link":"secondary"),void 0===p&&n&&(p="primary"),Object(r.createElement)(u.a,{key:l,href:s,variant:p,onClick:s?void 0:a,className:i()("components-notice__action",e)},t)}))),m&&Object(r.createElement)(u.a,{className:"components-notice__dismiss",icon:l.a,label:Object(a.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),g(),d()},showTooltip:!1}))}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(0),o=n(53),c=n(61),i=n.n(c),a=n(13);const s=(e,t)=>e&&t[e]?t[e]:null,l=e=>{let{block:t,blockMap:n,blockWrapper:o,children:c,depth:u=1}=e;return c&&0!==c.length?Array.from(c).map((e,c)=>{const{blockName:p="",...d}={key:`${t}_${u}_${c}`,...e instanceof HTMLElement?e.dataset:{},className:e.className||""},m=s(p,n);if(!m){const c=i()((null==e?void 0:e.outerHTML)||(null==e?void 0:e.textContent)||"");if("string"==typeof c&&c)return c;if(!Object(r.isValidElement)(c))return null;const a=e.childNodes.length?l({block:t,blockMap:n,children:e.childNodes,depth:u+1,blockWrapper:o}):void 0;return a?Object(r.cloneElement)(c,d,a):Object(r.cloneElement)(c,d)}const f=o||r.Fragment;return Object(r.createElement)(r.Suspense,{key:`${t}_${u}_${c}_suspense`,fallback:Object(r.createElement)("div",{className:"wc-block-placeholder"})},Object(r.createElement)(f,null,Object(r.createElement)(m,d,l({block:t,blockMap:n,children:e.children,depth:u+1,blockWrapper:o}),((e,t,n,o)=>{if(!Object(a.hasInnerBlocks)(e))return null;const c=n?Array.from(n).map(e=>e instanceof HTMLElement&&(null==e?void 0:e.dataset.blockName)||null).filter(Boolean):[],i=Object(a.getRegisteredBlocks)(e).filter(e=>{let{blockName:t,force:n}=e;return!0===n&&!c.includes(t)}),l=o||r.Fragment;return Object(r.createElement)(l,null,i.map((e,n)=>{let{blockName:o,component:c}=e;const i=c||s(o,t);return i?Object(r.createElement)(i,{key:`${o}_forced_${n}`}):null}))})(p,n,e.children,o))))}):null},u=e=>{let{Block:t,selector:n,blockName:r,getProps:c=(()=>({})),blockMap:i,blockWrapper:a}=e;Object(o.a)({Block:t,selector:n,getProps:(e,t)=>{const n=l({block:r,blockMap:i,children:e.children||[],blockWrapper:a});return{...c(e,t),children:n}}})}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(14),o=n(0),c=n(66);n.p=c.k,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([n.e(1),n.e(11)]).then(n.bind(null,362)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>n.e(10).then(n.bind(null,395)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>n.e(18).then(n.bind(null,396)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>n.e(12).then(n.bind(null,363)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>n.e(8).then(n.bind(null,364)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>n.e(16).then(n.bind(null,365)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>n.e(13).then(n.bind(null,285)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>n.e(14).then(n.bind(null,366)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>n.e(9).then(n.bind(null,367)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>n.e(17).then(n.bind(null,368)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>n.e(15).then(n.bind(null,369)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([n.e(0),n.e(49),n.e(7)]).then(n.bind(null,382)))});const i=e=>Object(r.getRegisteredBlockComponents)(e)},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r=(e,t)=>{const n=[];return Object.keys(e).forEach(r=>{if(void 0!==t[r])switch(e[r].type){case"boolean":n[r]="false"!==t[r]&&!1!==t[r];break;case"number":n[r]=parseInt(t[r],10);break;case"array":case"object":n[r]=JSON.parse(t[r]);break;default:n[r]=t[r]}else n[r]=e[r].default}),n}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){e.exports=window.wp.blockEditor},function(e,t){e.exports=window.wp.blocks},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){e.exports=n(203)},,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(134),o=n(119),c=n(125),i=n(53),a=n(0),s=n(10),l=n.n(s),u=n(15),p=n.n(u),d=n(12),m=(n(34),n(27)),f=n.n(m);n(5),n(2),n(66);var b=n(88),h=Object(d.createHigherOrderComponent)(e=>class extends a.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),p()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),(e=>f()({path:"/wc/store/products/"+e}))(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(b.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:n,product:r}=this.state;return Object(a.createElement)(e,l()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:n,product:r}))}},"withProduct"),g=n(49),v=n(87),O=n(38),y=n(1),w=n(98),E=n(24),k=Object(a.createElement)(E.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(a.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(a.createElement)("path",{d:"M21 4H3a2 2 0 00-2 2v13c0 1.1.9 2 2 2h18a2 2 0 002-2V6a2 2 0 00-2-2zM3 19V6h8v13H3zm18 0h-8V6h8v13zm-7-9.5h6V11h-6zm0 2.5h6v1.5h-6zm0 2.5h6V16h-6z"}));const j="woocommerce/single-product";Object(y.__)("Single Product","woo-gutenberg-products-block"),Object(a.createElement)(w.a,{srcElement:k,className:"wc-block-editor-components-block-icon"}),Object(y.__)("Display a single product.","woo-gutenberg-products-block"),Object.keys(Object(c.a)(j));var _=h(e=>{let{isLoading:t,product:n,children:r}=e;const{dispatchStoreEvent:o}=Object(O.a)(),c="wc-block-single-product wc-block-layout",i="woocommerce/single-product/"+((null==n?void 0:n.id)||0);return Object(a.useEffect)(()=>{o("product-render",{product:n,listName:j})},[n,o]),Object(a.createElement)(g.InnerBlockLayoutContextProvider,{parentName:j,parentClassName:c},Object(a.createElement)(g.ProductDataContextProvider,{product:n,isLoading:t},Object(a.createElement)(v.a,{context:i},Object(a.createElement)("div",{className:c},r))))}),x={isPreview:{type:"boolean",default:!1,save:!1},productId:{type:"number"}};Object(o.a)({Block:_,blockName:j,selector:".wp-block-woocommerce-single-product",getProps:e=>({attributes:Object(r.a)(x,e.dataset)}),blockMap:Object(c.a)(j)}),(()=>{const e=Object(c.a)("");Object.keys(e).forEach(t=>{const n=".wp-block-"+t.replace("/","-");Object(i.a)({Block:e[t],selector:n,getProps:e=>e.dataset})})})()}]); \ No newline at end of file diff --git a/build/single-product.asset.php b/build/single-product.asset.php new file mode 100644 index 00000000000..30c483a29cb --- /dev/null +++ b/build/single-product.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-blocks-shared-context', 'wc-blocks-shared-hocs', 'wc-price-format', 'wc-settings', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '9f795be2e4a454aa04ca488d3bf7db32'); \ No newline at end of file diff --git a/build/single-product.js b/build/single-product.js new file mode 100644 index 00000000000..a89084f667c --- /dev/null +++ b/build/single-product.js @@ -0,0 +1,10 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["single-product"]=function(e){function t(t){for(var r,s,a=t[0],l=t[1],i=t[2],d=0,m=[];d{class t extends n.Component{render(){const{selected:t}=this.props,c=null==t;return Object(n.createElement)(e,o()({},this.props,{selected:c?[]:[t]}))}}return t.defaultProps={selected:null},t},"withTransformSingleSelectToMultipleSelect"),m=c(191),b=c(24),p=c.n(b),g=c(26),h=c.n(g),w=c(27),O=c(28),j=Object(u.createHigherOrderComponent)(e=>{class t extends n.Component{constructor(){super(...arguments),p()(this,"state",{error:null,loading:!1,variations:{}}),p()(this,"loadVariations",()=>{const{products:e}=this.props,{loading:t,variations:c}=this.state;if(t)return;const r=this.getExpandedProduct();if(!r||c[r])return;const o=e.find(e=>e.id===r);o.variations&&0!==o.variations.length?(this.setState({loading:!0}),Object(w.g)(r).then(e=>{const t=e.map(e=>({...e,parent:r}));this.setState({variations:{...this.state.variations,[r]:t},loading:!1,error:null})}).catch(async e=>{const t=await Object(O.a)(e);this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:t})})):this.setState({variations:{...this.state.variations,[r]:null},loading:!1,error:null})})}componentDidMount(){const{selected:e,showVariations:t}=this.props;e&&t&&this.loadVariations()}componentDidUpdate(e){const{isLoading:t,selected:c,showVariations:r}=this.props;r&&(!h()(e.selected,c)||e.isLoading&&!t)&&this.loadVariations()}isProductId(e){const{products:t}=this.props;return t.some(t=>t.id===e)}findParentProduct(e){const{products:t}=this.props;return t.filter(t=>t.variations&&t.variations.find(t=>{let{id:c}=t;return c===e}))[0].id}getExpandedProduct(){const{isLoading:e,selected:t,showVariations:c}=this.props;if(!c)return null;let r=t&&t.length?t[0]:null;return r?this.prevSelectedItem=r:this.prevSelectedItem&&(e||this.isProductId(this.prevSelectedItem)||(r=this.prevSelectedItem)),!e&&r?this.isProductId(r)?r:this.findParentProduct(r):null}render(){const{error:t,isLoading:c}=this.props,{error:r,loading:s,variations:a}=this.state;return Object(n.createElement)(e,o()({},this.props,{error:r||t,expandedProduct:this.getExpandedProduct(),isLoading:c,variations:a,variationsLoading:s}))}}return p()(t,"defaultProps",{selected:[],showVariations:!1}),t},"withProductVariations"),f=c(32),E=c(4),k=c.n(E),v=c(88);c(140);const _={list:Object(s.__)("Products","woo-gutenberg-products-block"),noItems:Object(s.__)("Your store doesn't have any products.","woo-gutenberg-products-block"),search:Object(s.__)("Search for a product to display","woo-gutenberg-products-block"),updated:Object(s.__)("Product search results updated.","woo-gutenberg-products-block")},y=e=>{let{expandedProduct:t,error:c,instanceId:r,isCompact:u,isLoading:d,onChange:m,onSearch:b,products:p,renderItem:g,selected:h,showVariations:w,variations:O,variationsLoading:j}=e;if(c)return Object(n.createElement)(f.a,{error:c});const E=[...p,...O&&O[t]?O[t]:[]];return Object(n.createElement)(i.a,{className:"woocommerce-products",list:E,isCompact:u,isLoading:d,isSingle:!0,selected:E.filter(e=>{let{id:t}=e;return h.includes(t)}),onChange:m,renderItem:g||(w?e=>{const{item:t,search:c,depth:i=0,isSelected:u,onSelect:m}=e,b=t.variations&&Array.isArray(t.variations)?t.variations.length:0,p=k()("woocommerce-search-product__item","woocommerce-search-list__item","depth-"+i,"has-count",{"is-searching":c.length>0,"is-skip-level":0===i&&0!==t.parent,"is-variable":b>0});if(!t.breadcrumbs.length)return Object(n.createElement)(v.a,o()({},e,{className:k()(p,{"is-selected":u}),isSelected:u,item:t,onSelect:()=>()=>{m(t)()},isLoading:d||j,countLabel:t.variations.length>0?Object(s.sprintf)( +/* translators: %1$d is the number of variations of a product product. */ +Object(s.__)("%1$d variations","woo-gutenberg-products-block"),t.variations.length):null,name:"products-"+r,"aria-label":Object(s.sprintf)( +/* translators: %1$s is the product name, %2$d is the number of variations of that product. */ +Object(s._n)("%1$s, has %2$d variation","%1$s, has %2$d variations",t.variations.length,"woo-gutenberg-products-block"),t.name,t.variations.length)}));const g=Object(a.isEmpty)(t.variation)?e:{...e,item:{...e.item,name:t.variation},"aria-label":`${t.breadcrumbs[0]}: ${t.variation}`};return Object(n.createElement)(l.a,o()({},g,{className:p,name:"variations-"+r}))}:null),onSearch:b,messages:_,isHierarchical:!0})};y.defaultProps={isCompact:!1,expandedProduct:null,selected:[],showVariations:!1},t.a=d(Object(m.a)(j(Object(u.withInstanceId)(y))))},102:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}));t.a=n},103:function(e,t){},11:function(e,t){e.exports=window.wp.apiFetch},114:function(e,t,c){"use strict";var r=c(24),o=c.n(r),n=c(0),s=c(8),a=c(1),l=c(25),i=e=>{let{imageUrl:t=l.m+"/block-error.svg",header:c=Object(a.__)("Oops!","woo-gutenberg-products-block"),text:r=Object(a.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:o,errorMessagePrefix:s=Object(a.__)("Error:","woo-gutenberg-products-block"),button:i}=e;return Object(n.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(n.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(n.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},c&&Object(n.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},c),r&&Object(n.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},r),o&&Object(n.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},s?s+" ":"",o),i&&Object(n.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},i)))};c(172);class u extends s.Component{constructor(){super(...arguments),o()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(n.createElement)(n.Fragment,null,Object(n.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:c=!0,text:r,errorMessagePrefix:o,renderError:s,button:a}=this.props,{errorMessage:l,hasError:u}=this.state;return u?"function"==typeof s?s({errorMessage:l}):Object(n.createElement)(i,{errorMessage:c?l:null,header:e,imageUrl:t,text:r,errorMessagePrefix:o,button:a}):this.props.children}}t.a=u},12:function(e,t){e.exports=window.wp.blocks},120:function(e,t,c){"use strict";var r=c(0),o=c(18);const n=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)("mask",{id:"external-mask",width:"24",height:"24",x:"0",y:"0",maskUnits:"userSpaceOnUse"},Object(r.createElement)("path",{fill:"#fff",d:"M6.3431 6.3431v1.994l7.8984.0072-8.6055 8.6054 1.4142 1.4143 8.6055-8.6055.0071 7.8984h1.994V6.3431H6.3431z"})),Object(r.createElement)("g",{mask:"url(#external-mask)"},Object(r.createElement)("path",{d:"M0 0h24v24H0z"})));t.a=n},13:function(e,t){e.exports=window.wp.data},14:function(e,t){e.exports=window.wp.htmlEntities},140:function(e,t){},15:function(e,t){e.exports=window.wp.url},16:function(e,t){e.exports=window.wc.wcBlocksData},17:function(e,t,c){"use strict";c.d(t,"a",(function(){return s})),c.d(t,"c",(function(){return l})),c.d(t,"d",(function(){return i})),c.d(t,"b",(function(){return u}));var r=c(0),o=c(6),n=c(1);const s={clear:Object(n.__)("Clear all selected items","woo-gutenberg-products-block"),noItems:Object(n.__)("No items found.","woo-gutenberg-products-block"), +/* Translators: %s search term */ +noResults:Object(n.__)("No results for %s","woo-gutenberg-products-block"),search:Object(n.__)("Search for items","woo-gutenberg-products-block"),selected:e=>Object(n.sprintf)( +/* translators: Number of items selected from list. */ +Object(n._n)("%d item selected","%d items selected",e,"woo-gutenberg-products-block"),e),updated:Object(n.__)("Search results updated.","woo-gutenberg-products-block")},a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const c=Object(o.groupBy)(e,"parent"),r=Object(o.keyBy)(t,"id"),n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e.parent)return e.name?[e.name]:[];const t=n(r[e.parent]);return[...t,e.name]},s=e=>e.map(e=>{const t=c[e.id];return delete c[e.id],{...e,breadcrumbs:n(r[e.parent]),children:t&&t.length?s(t):[]}}),a=s(c[0]||[]);return delete c[0],Object(o.forEach)(c,e=>{a.push(...s(e||[]))}),a},l=(e,t,c)=>{if(!t)return c?a(e):e;const r=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i"),o=e.map(e=>!!r.test(e.name)&&e).filter(Boolean);return c?a(o,e):o},i=(e,t)=>{if(!t)return e;const c=new RegExp(t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"ig");return e.split(c).map((e,c)=>0===c?e:Object(r.createElement)(r.Fragment,{key:c},Object(r.createElement)("strong",null,t),e))},u=e=>1===e.length?e.slice(0,1).toString():2===e.length?e.slice(0,1).toString()+" › "+e.slice(-1).toString():e.slice(0,1).toString()+" … "+e.slice(-1).toString()},172:function(e,t){},18:function(e,t){e.exports=window.wp.primitives},191:function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(25),a=c(27),l=c(116),i=c(28);t.a=e=>t=>{let{selected:c,...r}=t;const[u,d]=Object(n.useState)(!0),[m,b]=Object(n.useState)(null),[p,g]=Object(n.useState)([]),h=s.o.productCount>100,w=async e=>{const t=await Object(i.a)(e);b(t),d(!1)},O=Object(n.useRef)(c);Object(n.useEffect)(()=>{Object(a.h)({selected:O.current}).then(e=>{g(e),d(!1)}).catch(w)},[O]);const j=Object(l.a)(e=>{Object(a.h)({selected:c,search:e}).then(e=>{g(e),d(!1)}).catch(w)},400),f=Object(n.useCallback)(e=>{d(!0),j(e)},[d,j]);return Object(n.createElement)(e,o()({},r,{selected:c,error:m,products:p,isLoading:u,onSearch:h?f:null}))}},2:function(e,t){e.exports=window.wc.wcSettings},25:function(e,t,c){"use strict";c.d(t,"o",(function(){return n})),c.d(t,"m",(function(){return s})),c.d(t,"l",(function(){return a})),c.d(t,"n",(function(){return l})),c.d(t,"j",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"f",(function(){return d})),c.d(t,"g",(function(){return m})),c.d(t,"k",(function(){return b})),c.d(t,"c",(function(){return p})),c.d(t,"d",(function(){return g})),c.d(t,"h",(function(){return h})),c.d(t,"a",(function(){return w})),c.d(t,"i",(function(){return O})),c.d(t,"b",(function(){return j}));var r,o=c(2);const n=Object(o.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),s=n.pluginUrl+"images/",a=n.pluginUrl+"build/",l=n.buildPhase,i=null===(r=o.STORE_PAGES.shop)||void 0===r?void 0:r.permalink,u=o.STORE_PAGES.checkout.id,d=o.STORE_PAGES.checkout.permalink,m=o.STORE_PAGES.privacy.permalink,b=(o.STORE_PAGES.privacy.title,o.STORE_PAGES.terms.permalink),p=(o.STORE_PAGES.terms.title,o.STORE_PAGES.cart.id),g=o.STORE_PAGES.cart.permalink,h=(o.STORE_PAGES.myaccount.permalink?o.STORE_PAGES.myaccount.permalink:Object(o.getSetting)("wpLoginUrl","/wp-login.php"),Object(o.getSetting)("shippingCountries",{})),w=Object(o.getSetting)("allowedCountries",{}),O=Object(o.getSetting)("shippingStates",{}),j=Object(o.getSetting)("allowedStates",{})},258:function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(24),s=c.n(n),a=c(0),l=c(9),i=c(27),u=c(28);const d=Object(l.createHigherOrderComponent)(e=>class extends a.Component{constructor(){super(...arguments),s()(this,"state",{error:null,loading:!1,product:"preview"===this.props.attributes.productId?this.props.attributes.previewProduct:null}),s()(this,"loadProduct",()=>{const{productId:e}=this.props.attributes;"preview"!==e&&(e?(this.setState({loading:!0}),Object(i.e)(e).then(e=>{this.setState({product:e,loading:!1,error:null})}).catch(async e=>{const t=await Object(u.a)(e);this.setState({product:null,loading:!1,error:t})})):this.setState({product:null,loading:!1,error:null}))})}componentDidMount(){this.loadProduct()}componentDidUpdate(e){e.attributes.productId!==this.props.attributes.productId&&this.loadProduct()}render(){const{error:t,loading:c,product:r}=this.state;return Object(a.createElement)(e,o()({},this.props,{error:t,getProduct:this.loadProduct,isLoading:c,product:r}))}},"withProduct");t.a=d},26:function(e,t){e.exports=window.wp.isShallowEqual},27:function(e,t,c){"use strict";c.d(t,"h",(function(){return i})),c.d(t,"e",(function(){return u})),c.d(t,"b",(function(){return d})),c.d(t,"i",(function(){return m})),c.d(t,"f",(function(){return b})),c.d(t,"c",(function(){return p})),c.d(t,"d",(function(){return g})),c.d(t,"g",(function(){return h})),c.d(t,"a",(function(){return w}));var r=c(15),o=c(11),n=c.n(o),s=c(6),a=c(2),l=c(25);const i=e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const a=(e=>{let{selected:t=[],search:c="",queryArgs:o={}}=e;const n=l.o.productCount>100,s={per_page:n?100:0,catalog_visibility:"any",search:c,orderby:"title",order:"asc"},a=[Object(r.addQueryArgs)("/wc/store/products",{...s,...o})];return n&&t.length&&a.push(Object(r.addQueryArgs)("/wc/store/products",{catalog_visibility:"any",include:t,per_page:0})),a})({selected:t,search:c,queryArgs:o});return Promise.all(a.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id").map(e=>({...e,parent:0}))).catch(e=>{throw e})},u=e=>n()({path:"/wc/store/products/"+e}),d=()=>n()({path:"wc/store/products/attributes"}),m=e=>n()({path:`wc/store/products/attributes/${e}/terms`}),b=e=>{let{selected:t=[],search:c}=e;const o=(e=>{let{selected:t=[],search:c}=e;const o=Object(a.getSetting)("limitTags",!1),n=[Object(r.addQueryArgs)("wc/store/products/tags",{per_page:o?100:0,orderby:o?"count":"name",order:o?"desc":"asc",search:c})];return o&&t.length&&n.push(Object(r.addQueryArgs)("wc/store/products/tags",{include:t})),n})({selected:t,search:c});return Promise.all(o.map(e=>n()({path:e}))).then(e=>Object(s.uniqBy)(Object(s.flatten)(e),"id"))},p=e=>n()({path:Object(r.addQueryArgs)("wc/store/products/categories",{per_page:0,...e})}),g=e=>n()({path:"wc/store/products/categories/"+e}),h=e=>n()({path:Object(r.addQueryArgs)("wc/store/products",{per_page:0,type:"variation",parent:e})}),w=(e,t)=>{if(!e.title.raw)return e.slug;const c=1===t.filter(t=>t.title.raw===e.title.raw).length;return e.title.raw+(c?"":" - "+e.slug)}},28:function(e,t,c){"use strict";c.d(t,"a",(function(){return o})),c.d(t,"b",(function(){return n}));var r=c(1);const o=async e=>{if("function"==typeof e.json)try{const t=await e.json();return{message:t.message,type:t.type||"api"}}catch(e){return{message:e.message,type:"general"}}return{message:e.message,type:e.type||"general"}},n=e=>{if(e.data&&"rest_invalid_param"===e.code){const t=Object.values(e.data.params);if(t[0])return t[0]}return(null==e?void 0:e.message)||Object(r.__)("Something went wrong. Please contact us to get assistance.","woo-gutenberg-products-block")}},29:function(e,t){e.exports=window.wc.wcBlocksSharedContext},3:function(e,t){e.exports=window.wp.components},31:function(e,t){e.exports=window.wp.escapeHtml},32:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(31);t.a=e=>{let{error:t}=e;return Object(r.createElement)("div",{className:"wc-block-error-message"},(e=>{let{message:t,type:c}=e;return t?"general"===c?Object(r.createElement)("span",null,Object(o.__)("The following error was returned","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):"api"===c?Object(r.createElement)("span",null,Object(o.__)("The following error was returned from the API","woo-gutenberg-products-block"),Object(r.createElement)("br",null),Object(r.createElement)("code",null,Object(n.escapeHTML)(t))):t:Object(o.__)("An unknown error occurred which prevented the block from being updated.","woo-gutenberg-products-block")})(t))}},34:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(5),o=c.n(r),n=c(0),s=c(17);const a=e=>{let{countLabel:t,className:c,depth:r=0,controlId:a="",item:l,isSelected:i,isSingle:u,onSelect:d,search:m="",...b}=e;const p=null!=t&&void 0!==l.count&&null!==l.count,g=[c,"woocommerce-search-list__item"];g.push("depth-"+r),u&&g.push("is-radio-button"),p&&g.push("has-count");const h=l.breadcrumbs&&l.breadcrumbs.length,w=b.name||"search-list-item-"+a,O=`${w}-${l.id}`;return Object(n.createElement)("label",{htmlFor:O,className:g.join(" ")},u?Object(n.createElement)("input",o()({type:"radio",id:O,name:w,value:l.value,onChange:d(l),checked:i,className:"woocommerce-search-list__item-input"},b)):Object(n.createElement)("input",o()({type:"checkbox",id:O,name:w,value:l.value,onChange:d(l),checked:i,className:"woocommerce-search-list__item-input"},b)),Object(n.createElement)("span",{className:"woocommerce-search-list__item-label"},h?Object(n.createElement)("span",{className:"woocommerce-search-list__item-prefix"},Object(s.b)(l.breadcrumbs)):null,Object(n.createElement)("span",{className:"woocommerce-search-list__item-name"},Object(s.d)(l.name,m))),!!p&&Object(n.createElement)("span",{className:"woocommerce-search-list__item-count"},t||l.count))};t.b=a},35:function(e,t){e.exports=window.wc.priceFormat},39:function(e,t){e.exports=window.wc.wcBlocksRegistry},429:function(e,t,c){e.exports=c(436)},43:function(e,t,c){"use strict";var r=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(r.isValidElement)(t)?Object(r.cloneElement)(t,{width:c,height:c,...o}):null}},430:function(e,t){},436:function(e,t,c){"use strict";c.r(t);var r=c(1),o=c(77),n=c(0),s=c(3),a=c(258),l=c(114),i=c(92);const u=Object(n.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 230 100"},Object(n.createElement)("path",{fill:"#E1E3E6",d:"M76 0h11v6H76zm0 11h88v11H76zm0 16h28v6H76zm0 17h154v28H76zm0 39h22v17H76zm28 0h44v17h-44zM0 0h66v66H0z",style:{width:"100%"}}));var d=c(7),m=(c(430),c(69)),b=e=>{let{error:t,isLoading:c,getProduct:r}=e;return Object(n.createElement)(m.a,{className:"wc-block-single-product-error",error:t,isLoading:c,onRetry:r})},p=c(101),g=e=>{let{attributes:t,setAttributes:c}=e;return Object(n.createElement)(p.a,{selected:t.productId||0,showVariations:!0,onChange:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const t=e[0]?e[0].id:0;c({productId:t})}})},h=e=>{let{isEditing:t,setIsEditing:c}=e;return Object(n.createElement)(d.BlockControls,null,Object(n.createElement)(s.ToolbarGroup,{controls:[{icon:"edit",title:Object(r.__)("Edit selected product","woo-gutenberg-products-block"),onClick:()=>c(!t),isActive:t}]}))},w=c(13),O=c(29),j=c(12);const f=e=>e.map(e=>{let[t,c={},r=[]]=e;const o=r?f(r):[];return Object(j.createBlock)(t,c,o)});var E=c(43),k=c(18),v=Object(n.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0z"}),Object(n.createElement)("path",{d:"M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-5 0-9 4-9 9H0l4 4 4-4H5a7 7 0 113 5.7l-1.5 1.4A9 9 0 1012 3z"})),_=Object(n.createElement)(k.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M21 4H3a2 2 0 00-2 2v13c0 1.1.9 2 2 2h18a2 2 0 002-2V6a2 2 0 00-2-2zM3 19V6h8v13H3zm18 0h-8V6h8v13zm-7-9.5h6V11h-6zm0 2.5h6v1.5h-6zm0 2.5h6V16h-6z"})),y=c(462);const S="woocommerce/single-product",x=Object(r.__)("Single Product","woo-gutenberg-products-block"),P=Object(n.createElement)(E.a,{srcElement:_,className:"wc-block-editor-components-block-icon"}),N=Object(r.__)("Display a single product.","woo-gutenberg-products-block"),C=[["core/columns",{},[["core/column",{},[["woocommerce/product-image",{showSaleBadge:!1}]]],["core/column",{},[["woocommerce/product-sale-badge"],["woocommerce/product-title",{headingLevel:2}],["woocommerce/product-rating"],["woocommerce/product-price"],["woocommerce/product-summary"],["woocommerce/product-stock-indicator"],["woocommerce/product-add-to-cart",{showFormElements:!0}],["woocommerce/product-sku"],["woocommerce/product-category-list"],["woocommerce/product-tag-list"]]]]]],I=["core/columns","core/column",...Object.keys(Object(y.a)(S))];var B=e=>{let{isLoading:t,product:c,clientId:o}=e;const{replaceInnerBlocks:a}=Object(w.useDispatch)("core/block-editor"),l=Object(n.useCallback)(()=>{a(o,f(C),!1)},[o,a]);return Object(n.createElement)(O.InnerBlockLayoutContextProvider,{parentName:S,parentClassName:"wc-block-single-product wc-block-layout"},Object(n.createElement)(O.ProductDataContextProvider,{product:c,isLoading:t},Object(n.createElement)(d.InspectorControls,null,Object(n.createElement)(s.PanelBody,{title:Object(r.__)("Layout","woo-gutenberg-products-block"),initialOpen:!0},Object(n.createElement)(s.Button,{label:Object(r.__)("Reset layout to default","woo-gutenberg-products-block"),onClick:l,isTertiary:!0,className:"wc-block-single-product__reset-layout"},Object(n.createElement)(E.a,{srcElement:v})," ",Object(r.__)("Reset layout","woo-gutenberg-products-block")))),Object(n.createElement)("div",{className:"wc-block-single-product wc-block-layout"},Object(n.createElement)(d.InnerBlocks,{template:C,allowedBlocks:I,templateLock:!1,renderAppender:!1}))))},L=Object(a.a)(e=>{let{className:t,attributes:c,setAttributes:o,error:a,getProduct:m,product:p,isLoading:w,clientId:O}=e;const{productId:j,isPreview:f}=c,[E,k]=Object(n.useState)(!j);return f?u:a?Object(n.createElement)(b,{error:a,isLoading:w,getProduct:m}):Object(n.createElement)("div",{className:t},Object(n.createElement)(l.a,{header:Object(r.__)("Single Product Block Error","woo-gutenberg-products-block")},Object(n.createElement)(h,{setIsEditing:k,isEditing:E}),E?Object(n.createElement)(s.Placeholder,{icon:P,label:x,className:"wc-block-single-product"},N,Object(n.createElement)("div",{className:"wc-block-single-product__selection"},Object(n.createElement)(g,{attributes:c,setAttributes:o}),Object(n.createElement)(s.Button,{isSecondary:!0,onClick:()=>{k(!1)}},Object(r.__)("Done","woo-gutenberg-products-block")))):Object(n.createElement)(n.Fragment,null,Object(n.createElement)(d.InspectorControls,null,Object(n.createElement)(s.PanelBody,{title:Object(r.__)("Product","woo-gutenberg-products-block"),initialOpen:!1},Object(n.createElement)(g,{attributes:c,setAttributes:o}))),Object(n.createElement)(i.a,{productId:j}),Object(n.createElement)(B,{clientId:O,product:p,isLoading:w}))))}),z=c(4),A=c.n(z);const M={title:x,icon:{src:P},category:"woocommerce",keywords:[Object(r.__)("WooCommerce","woo-gutenberg-products-block")],description:N,supports:{align:["wide","full"],html:!1},example:{attributes:{isPreview:!0}},attributes:{isPreview:{type:"boolean",default:!1,save:!1},productId:{type:"number"}},edit:L,save:e=>{let{attributes:t}=e;return Object(n.createElement)("div",{className:A()("is-loading",t.className)},Object(n.createElement)(d.InnerBlocks.Content,null))}};Object(o.c)(S,M)},46:function(e,t){e.exports=window.wp.a11y},462:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(39),o=c(0),n=c(25);c.p=n.l,Object(r.registerBlockComponent)({blockName:"woocommerce/product-price",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(11)]).then(c.bind(null,259)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-image",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(3),c.e(10)]).then(c.bind(null,495)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-title",component:Object(o.lazy)(()=>Promise.all([c.e(1),c.e(17)]).then(c.bind(null,496)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-rating",component:Object(o.lazy)(()=>c.e(12).then(c.bind(null,260)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-button",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(8)]).then(c.bind(null,261)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-summary",component:Object(o.lazy)(()=>c.e(15).then(c.bind(null,262)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sale-badge",component:Object(o.lazy)(()=>c.e(3).then(c.bind(null,192)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-sku",component:Object(o.lazy)(()=>c.e(13).then(c.bind(null,263)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-category-list",component:Object(o.lazy)(()=>c.e(9).then(c.bind(null,264)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-tag-list",component:Object(o.lazy)(()=>c.e(16).then(c.bind(null,265)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-stock-indicator",component:Object(o.lazy)(()=>c.e(14).then(c.bind(null,266)))}),Object(r.registerBlockComponent)({blockName:"woocommerce/product-add-to-cart",component:Object(o.lazy)(()=>Promise.all([c.e(0),c.e(1),c.e(2),c.e(7)]).then(c.bind(null,497)))});const s=e=>Object(r.getRegisteredBlockComponents)(e)},54:function(e,t){e.exports=window.wc.wcBlocksSharedHocs},6:function(e,t){e.exports=window.lodash},61:function(e,t){e.exports=window.wp.hooks},65:function(e,t){e.exports=window.wp.deprecated},69:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(43),s=c(102),a=c(4),l=c.n(a),i=c(3),u=c(32);c(103),t.a=e=>{let{className:t,error:c,isLoading:a=!1,onRetry:d}=e;return Object(r.createElement)(i.Placeholder,{icon:Object(r.createElement)(n.a,{srcElement:s.a}),label:Object(o.__)("Sorry, an error occurred","woo-gutenberg-products-block"),className:l()("wc-block-api-error",t)},Object(r.createElement)(u.a,{error:c}),d&&Object(r.createElement)(r.Fragment,null,a?Object(r.createElement)(i.Spinner,null):Object(r.createElement)(i.Button,{isSecondary:!0,onClick:d},Object(o.__)("Retry","woo-gutenberg-products-block"))))}},7:function(e,t){e.exports=window.wp.blockEditor},73:function(e,t){e.exports=window.wp.autop},77:function(e,t,c){"use strict";c.d(t,"c",(function(){return n})),c.d(t,"d",(function(){return s})),c.d(t,"a",(function(){return a})),c.d(t,"b",(function(){return l}));var r=c(12),o=c(25);const n=(e,t)=>{if(o.n>2)return Object(r.registerBlockType)(e,t)},s=(e,t)=>{if(o.n>1)return Object(r.registerBlockType)(e,t)},a=()=>o.n>2,l=()=>o.n>1},8:function(e,t){e.exports=window.React},80:function(e,t){e.exports=window.wp.dom},86:function(e,t,c){"use strict";c.d(t,"a",(function(){return v}));var r=c(5),o=c.n(r),n=c(0),s=c(1),a=c(3),l=c(478),i=c(480),u=c(4),d=c.n(u),m=c(9),b=c(17),p=c(34),g=c(479),h=c(14);const w=e=>{let{id:t,label:c,popoverContents:r,remove:o,screenReaderLabel:i,className:u=""}=e;const[b,p]=Object(n.useState)(!1),O=Object(m.useInstanceId)(w);if(i=i||c,!c)return null;c=Object(h.decodeEntities)(c);const j=d()("woocommerce-tag",u,{"has-remove":!!o}),f="woocommerce-tag__label-"+O,E=Object(n.createElement)(n.Fragment,null,Object(n.createElement)("span",{className:"screen-reader-text"},i),Object(n.createElement)("span",{"aria-hidden":"true"},c));return Object(n.createElement)("span",{className:j},r?Object(n.createElement)(a.Button,{className:"woocommerce-tag__text",id:f,onClick:()=>p(!0)},E):Object(n.createElement)("span",{className:"woocommerce-tag__text",id:f},E),r&&b&&Object(n.createElement)(a.Popover,{onClose:()=>p(!1)},r),o&&Object(n.createElement)(a.Button,{className:"woocommerce-tag__remove",onClick:o(t),label:Object(s.sprintf)(// Translators: %s label. +Object(s.__)("Remove %s","woo-gutenberg-products-block"),c),"aria-describedby":f},Object(n.createElement)(l.a,{icon:g.a,size:20,className:"clear-icon"})))};var O=w;const j=e=>Object(n.createElement)(p.b,e),f=e=>{const{list:t,selected:c,renderItem:r,depth:s=0,onSelect:a,instanceId:l,isSingle:i,search:u}=e;return t?Object(n.createElement)(n.Fragment,null,t.map(t=>{const d=-1!==c.findIndex(e=>{let{id:c}=e;return c===t.id});return Object(n.createElement)(n.Fragment,{key:t.id},Object(n.createElement)("li",null,r({item:t,isSelected:d,onSelect:a,isSingle:i,search:u,depth:s,controlId:l})),Object(n.createElement)(f,o()({},e,{list:t.children,depth:s+1})))})):null},E=e=>{let{isLoading:t,isSingle:c,selected:r,messages:o,onChange:l,onRemove:i}=e;if(t||c||!r)return null;const u=r.length;return Object(n.createElement)("div",{className:"woocommerce-search-list__selected"},Object(n.createElement)("div",{className:"woocommerce-search-list__selected-header"},Object(n.createElement)("strong",null,o.selected(u)),u>0?Object(n.createElement)(a.Button,{isLink:!0,isDestructive:!0,onClick:()=>l([]),"aria-label":o.clear},Object(s.__)("Clear all","woo-gutenberg-products-block")):null),u>0?Object(n.createElement)("ul",null,r.map((e,t)=>Object(n.createElement)("li",{key:t},Object(n.createElement)(O,{label:e.name,id:e.id,remove:i})))):null)},k=e=>{let{filteredList:t,search:c,onSelect:r,instanceId:o,...a}=e;const{messages:u,renderItem:d,selected:m,isSingle:b}=a,p=d||j;return 0===t.length?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-not-found"},Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-icon"},Object(n.createElement)(l.a,{icon:i.a})),Object(n.createElement)("span",{className:"woocommerce-search-list__not-found-text"},c?Object(s.sprintf)(u.noResults,c):u.noItems)):Object(n.createElement)("ul",{className:"woocommerce-search-list__list"},Object(n.createElement)(f,{list:t,selected:m,renderItem:p,onSelect:r,instanceId:o,isSingle:b,search:c}))},v=e=>{const{className:t="",isCompact:c,isHierarchical:r,isLoading:s,isSingle:l,list:i,messages:u=b.a,onChange:p,onSearch:g,selected:h,debouncedSpeak:w}=e,[O,j]=Object(n.useState)(""),f=Object(m.useInstanceId)(v),_=Object(n.useMemo)(()=>({...b.a,...u}),[u]),y=Object(n.useMemo)(()=>Object(b.c)(i,O,r),[i,O,r]);Object(n.useEffect)(()=>{w&&w(_.updated)},[w,_]),Object(n.useEffect)(()=>{"function"==typeof g&&g(O)},[O,g]);const S=Object(n.useCallback)(e=>()=>{l&&p([]);const t=h.findIndex(t=>{let{id:c}=t;return c===e});p([...h.slice(0,t),...h.slice(t+1)])},[l,h,p]),x=Object(n.useCallback)(e=>()=>{-1===h.findIndex(t=>{let{id:c}=t;return c===e.id})?p(l?[e]:[...h,e]):S(e.id)()},[l,S,p,h]);return Object(n.createElement)("div",{className:d()("woocommerce-search-list",t,{"is-compact":c})},Object(n.createElement)(E,o()({},e,{onRemove:S,messages:_})),Object(n.createElement)("div",{className:"woocommerce-search-list__search"},Object(n.createElement)(a.TextControl,{label:_.search,type:"search",value:O,onChange:e=>j(e)})),s?Object(n.createElement)("div",{className:"woocommerce-search-list__list is-loading"},Object(n.createElement)(a.Spinner,null)):Object(n.createElement)(k,o()({},e,{search:O,filteredList:y,messages:_,onSelect:x,instanceId:f})))};Object(a.withSpokenMessages)(v)},88:function(e,t,c){"use strict";var r=c(5),o=c.n(r),n=c(0),s=c(34),a=c(3),l=c(4),i=c.n(l);t.a=e=>{let{className:t,item:c,isSelected:r,isLoading:l,onSelect:u,disabled:d,...m}=e;return Object(n.createElement)(n.Fragment,null,Object(n.createElement)(s.a,o()({},m,{key:c.id,className:t,isSelected:r,item:c,onSelect:u,isSingle:!0,disabled:d})),r&&l&&Object(n.createElement)("div",{key:"loading",className:i()("woocommerce-search-list__item","woocommerce-product-attributes__item","depth-1","is-loading","is-not-active")},Object(n.createElement)(a.Spinner,null)))}},9:function(e,t){e.exports=window.wp.compose},91:function(e,t){e.exports=window.wp.warning},92:function(e,t,c){"use strict";var r=c(0),o=c(1),n=c(43),s=c(120),a=c(2),l=c(7),i=c(29);t.a=e=>{const t=(Object(i.useProductDataContext)().product||{}).id||e.productId||0;return t?Object(r.createElement)(l.InspectorControls,null,Object(r.createElement)("div",{className:"wc-block-single-product__edit-card"},Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-title"},Object(r.createElement)("a",{href:`${a.ADMIN_URL}post.php?post=${t}&action=edit`,target:"_blank",rel:"noopener noreferrer"},Object(o.__)("Edit this product's details","woo-gutenberg-products-block"),Object(r.createElement)(n.a,{srcElement:s.a,size:16}))),Object(r.createElement)("div",{className:"wc-block-single-product__edit-card-description"},Object(o.__)("Edit details such as title, price, description and more.","woo-gutenberg-products-block")))):null}}}); \ No newline at end of file diff --git a/build/stock-filter-frontend.asset.php b/build/stock-filter-frontend.asset.php new file mode 100644 index 00000000000..d78551e2d84 --- /dev/null +++ b/build/stock-filter-frontend.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => '80d4318f1226f15f4b30a106c0ce3366'); \ No newline at end of file diff --git a/build/stock-filter-frontend.js b/build/stock-filter-frontend.js new file mode 100644 index 00000000000..dd3bb4c2913 --- /dev/null +++ b/build/stock-filter-frontend.js @@ -0,0 +1,13 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var c=t[n]={i:n,l:!1,exports:{}};return e[n].call(c.exports,c,c.exports,r),c.l=!0,c.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)r.d(n,c,function(t){return e[t]}.bind(null,c));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=185)}({0:function(e,t){e.exports=window.wp.element},1:function(e,t){e.exports=window.wp.i18n},10:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{let{className:t,onChange:r=(()=>{}),options:o=[],checked:s=[],isLoading:a=!1,isDisabled:l=!1,limit:i=10}=e;const[b,p]=Object(n.useState)(!1),f=Object(n.useMemo)(()=>[...Array(5)].map((e,t)=>Object(n.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),d=Object(n.useMemo)(()=>{const e=o.length-i;return!b&&Object(n.createElement)("li",{key:"show-more",className:"show-more"},Object(n.createElement)("button",{onClick:()=>{p(!0)},"aria-expanded":!1,"aria-label":Object(c.sprintf)( +/* translators: %s is referring the remaining count of options */ +Object(c._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(c.sprintf)( +/* translators: %s number of options to reveal. */ +Object(c._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[o,i,b]),O=Object(n.useMemo)(()=>b&&Object(n.createElement)("li",{key:"show-less",className:"show-less"},Object(n.createElement)("button",{onClick:()=>{p(!1)},"aria-expanded":!0,"aria-label":Object(c.__)("Show less options","woo-gutenberg-products-block")},Object(c.__)("Show less","woo-gutenberg-products-block"))),[b]),m=Object(n.useMemo)(()=>{const e=o.length>i+5;return Object(n.createElement)(n.Fragment,null,o.map((t,c)=>Object(n.createElement)(n.Fragment,{key:t.value},Object(n.createElement)("li",e&&!b&&c>=i&&{hidden:!0},Object(n.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{r(e.target.value)},checked:s.includes(t.value),disabled:l}),Object(n.createElement)("label",{htmlFor:t.value},t.label)),e&&c===i-1&&d)),e&&O)},[o,r,s,b,i,O,d,l]),j=u()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":a},t);return Object(n.createElement)("ul",{className:j},a?f:m)}},11:function(e,t){e.exports=window.wp.isShallowEqual},117:function(e,t){},118:function(e,t){},133:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(0),c=r(94),o=r(5),u=r(17),s=r(39),a=r(64),l=r(25);const i=e=>{let{queryAttribute:t,queryPrices:r,queryStock:i,queryState:b}=e,p=Object(l.a)();p+="-collection-data";const[f]=Object(s.a)(p),[d,O]=Object(s.b)("calculate_attribute_counts",[],p),[m,j]=Object(s.b)("calculate_price_range",null,p),[g,w]=Object(s.b)("calculate_stock_status_counts",null,p),E=Object(u.a)(t||{}),_=Object(u.a)(r),h=Object(u.a)(i);Object(n.useEffect)(()=>{"object"==typeof E&&Object.keys(E).length&&(d.find(e=>e.taxonomy===E.taxonomy)||O([...d,E]))},[E,d,O]),Object(n.useEffect)(()=>{m!==_&&void 0!==_&&j(_)},[_,j,m]),Object(n.useEffect)(()=>{g!==h&&void 0!==h&&w(h)},[h,w,g]);const[k,y]=Object(n.useState)(!1),[v]=Object(c.a)(k,200);k||y(!0);const S=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(o.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:r}=e;return{taxonomy:t,query_type:r}}),["taxonomy","query_type"])),t})(f),[f]);return Object(a.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...S},shouldSelect:v})}},15:function(e,t){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.default=e.exports,e.exports.__esModule=!0},16:function(e,t,r){"use strict";var n=r(15),c=r.n(n),o=r(0),u=r(3),s=r(1),a=r(66),l=e=>{let{imageUrl:t=a.l+"/block-error.svg",header:r=Object(s.__)("Oops!","woo-gutenberg-products-block"),text:n=Object(s.__)("There was an error loading the content.","woo-gutenberg-products-block"),errorMessage:c,errorMessagePrefix:u=Object(s.__)("Error:","woo-gutenberg-products-block"),button:l}=e;return Object(o.createElement)("div",{className:"wc-block-error wc-block-components-error"},t&&Object(o.createElement)("img",{className:"wc-block-error__image wc-block-components-error__image",src:t,alt:""}),Object(o.createElement)("div",{className:"wc-block-error__content wc-block-components-error__content"},r&&Object(o.createElement)("p",{className:"wc-block-error__header wc-block-components-error__header"},r),n&&Object(o.createElement)("p",{className:"wc-block-error__text wc-block-components-error__text"},n),c&&Object(o.createElement)("p",{className:"wc-block-error__message wc-block-components-error__message"},u?u+" ":"",c),l&&Object(o.createElement)("p",{className:"wc-block-error__button wc-block-components-error__button"},l)))};r(37);class i extends u.Component{constructor(){super(...arguments),c()(this,"state",{errorMessage:"",hasError:!1})}static getDerivedStateFromError(e){return void 0!==e.statusText&&void 0!==e.status?{errorMessage:Object(o.createElement)(o.Fragment,null,Object(o.createElement)("strong",null,e.status),": ",e.statusText),hasError:!0}:{errorMessage:e.message,hasError:!0}}render(){const{header:e,imageUrl:t,showErrorMessage:r=!0,text:n,errorMessagePrefix:c,renderError:u,button:s}=this.props,{errorMessage:a,hasError:i}=this.state;return i?"function"==typeof u?u({errorMessage:a}):Object(o.createElement)(l,{errorMessage:r?a:null,header:e,imageUrl:t,text:n,errorMessagePrefix:c,button:s}):this.props.children}}t.a=i},17:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(0),c=r(11),o=r.n(c);function u(e){const t=Object(n.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},185:function(e,t,r){e.exports=r(209)},186:function(e,t){},19:function(e,t){e.exports=window.wp.htmlEntities},2:function(e,t){e.exports=window.wc.wcSettings},209:function(e,t,r){"use strict";r.r(t);var n=r(53),c=r(0),o=r(1),u=r(23),s=r(17),a=r(62),l=r(39),i=r(133),b=r(2),p=r(106),f=r(72),d=r(55),O=r(11),m=r.n(O),j=r(19);const g=[{value:"preview-1",name:"In Stock",label:Object(c.createElement)(d.a,{name:"In Stock",count:3})},{value:"preview-2",name:"Out of sotck",label:Object(c.createElement)(d.a,{name:"Out of stock",count:3})},{value:"preview-3",name:"On backorder",label:Object(c.createElement)(d.a,{name:"On backorder",count:2})}];r(186);Object(n.a)({selector:".wp-block-woocommerce-stock-filter",Block:e=>{let{attributes:t,isEditor:r=!1}=e;const[n]=Object(c.useState)(Object(b.getSetting)("hideOutOfStockItems",!1)),[{outofstock:O,...w}]=Object(c.useState)(Object(b.getSetting)("stockStatusOptions",{})),[E]=Object(c.useState)(n?w:{outofstock:O,...w}),[_,h]=Object(c.useState)([]),[k,y]=Object(c.useState)(t.isPreview?g:[]),[v]=Object(c.useState)(Object.entries(E).map(e=>{let[t,r]=e;return{slug:t,name:r}}).filter(e=>!!e.name).sort((e,t)=>e.slug.localeCompare(t.slug))),[S]=Object(l.a)(),[x,P]=Object(l.b)("stock_status",[]),{results:R,isLoading:T}=Object(i.a)({queryStock:!0,queryState:S}),C=Object(c.useCallback)(e=>R.stock_status_counts?R.stock_status_counts.find(t=>{let{status:r,count:n}=t;return r===e&&0!==Number(n)}):null,[R]);Object(c.useEffect)(()=>{if(T||t.isPreview)return;const e=v.map(e=>{const r=C(e.slug);if(!(r||_.includes(e.slug)||(n=e.slug,null!=S&&S.stock_status&&S.stock_status.some(e=>{let{status:t=[]}=e;return t.includes(n)}))))return null;var n;const o=r?Number(r.count):0;return{value:e.slug,name:Object(j.decodeEntities)(e.name),label:Object(c.createElement)(d.a,{name:Object(j.decodeEntities)(e.name),count:t.showCounts?o:null})}}).filter(Boolean);y(e)},[t.showCounts,t.isPreview,T,C,_,S.stock_status,v]);const A=Object(c.useCallback)(e=>{r||e&&P(_)},[r,P,_]);Object(c.useEffect)(()=>{t.showFilterButton||A(_)},[t.showFilterButton,_,A]);const N=Object(c.useMemo)(()=>x,[x]),B=Object(s.a)(N),M=Object(a.a)(B);Object(c.useEffect)(()=>{m()(M,B)||m()(_,B)||h(B)},[_,B,M]);const F=Object(c.useCallback)(e=>{const t=e=>{const{name:t}=k.find(t=>t.value===e);return t},r=e=>{let{filterAdded:r,filterRemoved:n}=e;const c=r?t(r):null,s=n?t(n):null;c?Object(u.speak)(Object(o.sprintf)( +/* translators: %s stock statuses (for example: 'instock'...) */ +Object(o.__)("%s filter added.","woo-gutenberg-products-block"),c)):s&&Object(u.speak)(Object(o.sprintf)( +/* translators: %s stock statuses (for example:'instock'...) */ +Object(o.__)("%s filter removed.","woo-gutenberg-products-block"),s))},n=_.includes(e),c=_.filter(t=>t!==e);n?r({filterRemoved:e}):(c.push(e),c.sort(),r({filterAdded:e})),h(c)},[_,k]);if(0===k.length)return null;const L="h"+t.headingLevel,q=!t.isPreview&&!E,U=!t.isPreview&&T;return Object(c.createElement)(c.Fragment,null,!r&&t.heading&&Object(c.createElement)(L,{className:"wc-block-stock-filter__title"},t.heading),Object(c.createElement)("div",{className:"wc-block-stock-filter"},Object(c.createElement)(p.a,{className:"wc-block-stock-filter-list",options:k,checked:_,onChange:F,isLoading:q,isDisabled:U}),t.showFilterButton&&Object(c.createElement)(f.a,{className:"wc-block-stock-filter__button",disabled:q||U,onClick:()=>A(_)})))},getProps:e=>({attributes:{showCounts:"true"===e.dataset.showCounts,heading:e.dataset.heading,headingLevel:e.dataset.headingLevel||3,showFilterButton:"true"===e.dataset.showFilterButton},isEditor:!1})})},21:function(e,t,r){"use strict";var n=r(0),c=r(4),o=r.n(c);t.a=e=>{let t,{label:r,screenReaderLabel:c,wrapperElement:u,wrapperProps:s={}}=e;const a=null!=r,l=null!=c;return!a&&l?(t=u||"span",s={...s,className:o()(s.className,"screen-reader-text")},Object(n.createElement)(t,s,c)):(t=u||n.Fragment,a&&l&&r!==c?Object(n.createElement)(t,s,Object(n.createElement)("span",{"aria-hidden":"true"},r),Object(n.createElement)("span",{className:"screen-reader-text"},c)):Object(n.createElement)(t,s,r))}},23:function(e,t){e.exports=window.wp.a11y},25:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(0);const c=Object(n.createContext)("page"),o=()=>Object(n.useContext)(c);c.Provider},3:function(e,t){e.exports=window.React},37:function(e,t){},39:function(e,t,r){"use strict";r.d(t,"a",(function(){return b})),r.d(t,"b",(function(){return p})),r.d(t,"c",(function(){return f}));var n=r(6),c=r(9),o=r(0),u=r(11),s=r.n(u),a=r(17),l=r(62),i=r(25);const b=e=>{const t=Object(i.a)();e=e||t;const r=Object(c.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:u}=Object(c.useDispatch)(n.QUERY_STATE_STORE_KEY);return[r,Object(o.useCallback)(t=>{u(e,t)},[e,u])]},p=(e,t,r)=>{const u=Object(i.a)();r=r||u;const s=Object(c.useSelect)(c=>c(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(r,e,t),[r,e]),{setQueryValue:a}=Object(c.useDispatch)(n.QUERY_STATE_STORE_KEY);return[s,Object(o.useCallback)(t=>{a(r,e,t)},[r,e,a])]},f=(e,t)=>{const r=Object(i.a)();t=t||r;const[n,c]=b(t),u=Object(a.a)(n),p=Object(a.a)(e),f=Object(l.a)(p),d=Object(o.useRef)(!1);return Object(o.useEffect)(()=>{s()(f,p)||(c(Object.assign({},u,p)),d.current=!0)},[u,p,f,c]),d.current?[n,c]:[e,c]}},4:function(e,t,r){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t=t||r<0||m&&n>=j},g=function(t){return s.current=null,O&&a.current?e(t):(a.current=l.current=null,i.current)},w=function(){var e=Date.now();if(n(e))return g(e);if(p.current){var c=e-o.current,s=e-u.current,a=t-c,l=m?Math.min(a,j-s):a;r(w,l)}},E=function(){for(var b=[],f=0;f{let{Block:t,containers:r,getProps:n=(()=>({})),getErrorBoundaryProps:s=(()=>({}))}=e;0!==r.length&&Array.prototype.forEach.call(r,(e,r)=>{const a=n(e,r),l=s(e,r),i={...e.dataset,...a.attributes||{}};(e=>{let{Block:t,container:r,attributes:n={},props:s={},errorBoundaryProps:a={}}=e;Object(o.render)(Object(o.createElement)(u.a,a,Object(o.createElement)(o.Suspense,{fallback:Object(o.createElement)("div",{className:"wc-block-placeholder"})},t&&Object(o.createElement)(t,c()({},s,{attributes:n})))),r,()=>{r.classList&&r.classList.remove("is-loading")})})({Block:t,container:e,props:a,attributes:i,errorBoundaryProps:l})})},l=e=>{const t=document.body.querySelectorAll(s.join(",")),{Block:r,getProps:n,getErrorBoundaryProps:c,selector:o}=e;(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:c,wrappers:o}=e;const u=document.body.querySelectorAll(c);o&&o.length>0&&Array.prototype.filter.call(u,e=>!((e,t)=>Array.prototype.some.call(t,t=>t.contains(e)&&!t.isSameNode(e)))(e,o)),a({Block:t,containers:u,getProps:r,getErrorBoundaryProps:n})})({Block:r,getProps:n,getErrorBoundaryProps:c,selector:o,wrappers:t}),Array.prototype.forEach.call(t,t=>{t.addEventListener("wc-blocks_render_blocks_frontend",()=>{(e=>{let{Block:t,getProps:r,getErrorBoundaryProps:n,selector:c,wrapper:o}=e;const u=o.querySelectorAll(c);a({Block:t,containers:u,getProps:r,getErrorBoundaryProps:n})})({...e,wrapper:t})})})}},54:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(0);const c=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},55:function(e,t,r){"use strict";var n=r(0),c=r(1),o=r(21);r(117),t.a=e=>{let{name:t,count:r}=e;return Object(n.createElement)(n.Fragment,null,t,Number.isFinite(r)&&Object(n.createElement)(o.a,{label:r,screenReaderLabel:Object(c.sprintf)( +/* translators: %s number of products. */ +Object(c._n)("%s product","%s products",r,"woo-gutenberg-products-block"),r),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}},6:function(e,t){e.exports=window.wc.wcBlocksData},62:function(e,t,r){"use strict";r.d(t,"a",(function(){return c}));var n=r(3);function c(e,t){const r=Object(n.useRef)();return Object(n.useEffect)(()=>{r.current===e||t&&!t(e,r.current)||(r.current=e)},[e,t]),r.current}},64:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r(6),c=r(9),o=r(0),u=r(17),s=r(54);const a=e=>{const{namespace:t,resourceName:r,resourceValues:a=[],query:l={},shouldSelect:i=!0}=e;if(!t||!r)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(o.useRef)({results:[],isLoading:!0}),p=Object(u.a)(l),f=Object(u.a)(a),d=Object(s.a)(),O=Object(c.useSelect)(e=>{if(!i)return null;const c=e(n.COLLECTIONS_STORE_KEY),o=[t,r,p,f],u=c.getCollectionError(...o);return u&&d(u),{results:c.getCollection(...o),isLoading:!c.hasFinishedResolution("getCollection",o)}},[t,r,f,p,i]);return null!==O&&(b.current=O),b.current}},66:function(e,t,r){"use strict";r.d(t,"n",(function(){return o})),r.d(t,"l",(function(){return u})),r.d(t,"k",(function(){return s})),r.d(t,"m",(function(){return a})),r.d(t,"i",(function(){return l})),r.d(t,"d",(function(){return i})),r.d(t,"f",(function(){return b})),r.d(t,"j",(function(){return p})),r.d(t,"c",(function(){return f})),r.d(t,"e",(function(){return d})),r.d(t,"g",(function(){return O})),r.d(t,"a",(function(){return m})),r.d(t,"h",(function(){return j})),r.d(t,"b",(function(){return g}));var n,c=r(2);const o=Object(c.getSetting)("wcBlocksConfig",{buildPhase:1,pluginUrl:"",productCount:0,defaultAvatar:"",restApiRoutes:{},wordCountType:"words"}),u=o.pluginUrl+"images/",s=o.pluginUrl+"build/",a=o.buildPhase,l=null===(n=c.STORE_PAGES.shop)||void 0===n?void 0:n.permalink,i=(c.STORE_PAGES.checkout.id,c.STORE_PAGES.checkout.permalink),b=c.STORE_PAGES.privacy.permalink,p=(c.STORE_PAGES.privacy.title,c.STORE_PAGES.terms.permalink),f=(c.STORE_PAGES.terms.title,c.STORE_PAGES.cart.id,c.STORE_PAGES.cart.permalink),d=c.STORE_PAGES.myaccount.permalink?c.STORE_PAGES.myaccount.permalink:Object(c.getSetting)("wpLoginUrl","/wp-login.php"),O=Object(c.getSetting)("shippingCountries",{}),m=Object(c.getSetting)("allowedCountries",{}),j=Object(c.getSetting)("shippingStates",{}),g=Object(c.getSetting)("allowedStates",{})},72:function(e,t,r){"use strict";var n=r(0),c=r(1),o=(r(8),r(4)),u=r.n(o),s=r(21);r(102);const a=e=>{let{className:t,disabled:r,label: +/* translators: Submit button text for filters. */ +o=Object(c.__)("Go","woo-gutenberg-products-block"),onClick:a,screenReaderLabel:l=Object(c.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:u()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:r,onClick:a},Object(n.createElement)(s.a,{label:o,screenReaderLabel:l}))};a.defaultProps={disabled:!1},t.a=a},8:function(e,t,r){e.exports=r(42)()},9:function(e,t){e.exports=window.wp.data},94:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(3),c=r(52);function o(e,t){return e===t}function u(e){return"function"==typeof e?function(){return e}:e}function s(e,t,r){var s=r&&r.equalityFn||o,a=function(e){var t=Object(n.useState)(u(e)),r=t[0],c=t[1];return[r,Object(n.useCallback)((function(e){return c(u(e))}),[])]}(e),l=a[0],i=a[1],b=Object(c.a)(Object(n.useCallback)((function(e){return i(e)}),[i]),t,r),p=Object(n.useRef)(e);return s(p.current,e)||(b(e),p.current=e),[l,b]}}}); \ No newline at end of file diff --git a/build/stock-filter.asset.php b/build/stock-filter.asset.php new file mode 100644 index 00000000000..694f4507abb --- /dev/null +++ b/build/stock-filter.asset.php @@ -0,0 +1 @@ + array('lodash', 'react', 'wc-blocks-data-store', 'wc-settings', 'wp-a11y', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-primitives'), 'version' => '5fdba56f4c0bd56e000e63b700b767ca'); \ No newline at end of file diff --git a/build/stock-filter.js b/build/stock-filter.js new file mode 100644 index 00000000000..7f8a60ebf5e --- /dev/null +++ b/build/stock-filter.js @@ -0,0 +1,15 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["stock-filter"]=function(e){function t(t){for(var n,s,l=t[0],a=t[1],u=t[2],b=0,d=[];b{let{className:t,headingLevel:c,onChange:r,heading:l,instanceId:a}=e;const u="h"+c;return Object(n.createElement)(u,{className:t},Object(n.createElement)("label",{className:"screen-reader-text",htmlFor:"block-title-"+a},Object(s.__)("Block title","woo-gutenberg-products-block")),Object(n.createElement)(o.PlainText,{id:"block-title-"+a,className:"wc-block-editor-components-title",value:l,onChange:r}))})},108:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(8);function o(e,t){const c=Object(n.useRef)();return Object(n.useEffect)(()=>{c.current===e||t&&!t(e,c.current)||(c.current=e)},[e,t]),c.current}},113:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var n=c(16),o=c(13),r=c(0),s=c(40),l=c(93);const a=e=>{const{namespace:t,resourceName:c,resourceValues:a=[],query:u={},shouldSelect:i=!0}=e;if(!t||!c)throw new Error("The options object must have valid values for the namespace and the resource properties.");const b=Object(r.useRef)({results:[],isLoading:!0}),d=Object(s.a)(u),p=Object(s.a)(a),m=Object(l.a)(),O=Object(o.useSelect)(e=>{if(!i)return null;const o=e(n.COLLECTIONS_STORE_KEY),r=[t,c,d,p],s=o.getCollectionError(...r);return s&&m(s),{results:o.getCollection(...r),isLoading:!o.hasFinishedResolution("getCollection",r)}},[t,c,p,d,i]);return null!==O&&(b.current=O),b.current}},12:function(e,t){e.exports=window.wp.blocks},13:function(e,t){e.exports=window.wp.data},133:function(e,t,c){"use strict";var n=c(0),o=c(1),r=(c(10),c(4)),s=c.n(r),l=c(30);c(169);const a=e=>{let{className:t,disabled:c,label: +/* translators: Submit button text for filters. */ +r=Object(o.__)("Go","woo-gutenberg-products-block"),onClick:a,screenReaderLabel:u=Object(o.__)("Apply filter","woo-gutenberg-products-block")}=e;return Object(n.createElement)("button",{type:"submit",className:s()("wc-block-filter-submit-button","wc-block-components-filter-submit-button",t),disabled:c,onClick:a},Object(n.createElement)(l.a,{label:r,screenReaderLabel:u}))};a.defaultProps={disabled:!1},t.a=a},14:function(e,t){e.exports=window.wp.htmlEntities},143:function(e,t){},16:function(e,t){e.exports=window.wc.wcBlocksData},169:function(e,t){},177:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(4),s=c.n(r);c(209),t.a=e=>{let{className:t,onChange:c=(()=>{}),options:r=[],checked:l=[],isLoading:a=!1,isDisabled:u=!1,limit:i=10}=e;const[b,d]=Object(n.useState)(!1),p=Object(n.useMemo)(()=>[...Array(5)].map((e,t)=>Object(n.createElement)("li",{key:t,style:{width:Math.floor(75*Math.random())+25+"%"}})),[]),m=Object(n.useMemo)(()=>{const e=r.length-i;return!b&&Object(n.createElement)("li",{key:"show-more",className:"show-more"},Object(n.createElement)("button",{onClick:()=>{d(!0)},"aria-expanded":!1,"aria-label":Object(o.sprintf)( +/* translators: %s is referring the remaining count of options */ +Object(o._n)("Show %s more option","Show %s more options",e,"woo-gutenberg-products-block"),e)},Object(o.sprintf)( +/* translators: %s number of options to reveal. */ +Object(o._n)("Show %s more","Show %s more",e,"woo-gutenberg-products-block"),e)))},[r,i,b]),O=Object(n.useMemo)(()=>b&&Object(n.createElement)("li",{key:"show-less",className:"show-less"},Object(n.createElement)("button",{onClick:()=>{d(!1)},"aria-expanded":!0,"aria-label":Object(o.__)("Show less options","woo-gutenberg-products-block")},Object(o.__)("Show less","woo-gutenberg-products-block"))),[b]),j=Object(n.useMemo)(()=>{const e=r.length>i+5;return Object(n.createElement)(n.Fragment,null,r.map((t,o)=>Object(n.createElement)(n.Fragment,{key:t.value},Object(n.createElement)("li",e&&!b&&o>=i&&{hidden:!0},Object(n.createElement)("input",{type:"checkbox",id:t.value,value:t.value,onChange:e=>{c(e.target.value)},checked:l.includes(t.value),disabled:u}),Object(n.createElement)("label",{htmlFor:t.value},t.label)),e&&o===i-1&&m)),e&&O)},[r,c,l,b,i,O,m,u]),h=s()("wc-block-checkbox-list","wc-block-components-checkbox-list",{"is-loading":a},t);return Object(n.createElement)("ul",{className:h},a?p:j)}},18:function(e,t){e.exports=window.wp.primitives},2:function(e,t){e.exports=window.wc.wcSettings},207:function(e,t){},209:function(e,t){},26:function(e,t){e.exports=window.wp.isShallowEqual},267:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var n=c(0),o=c(243),r=c(6),s=c(40),l=c(71),a=c(113),u=c(48);const i=e=>{let{queryAttribute:t,queryPrices:c,queryStock:i,queryState:b}=e,d=Object(u.a)();d+="-collection-data";const[p]=Object(l.a)(d),[m,O]=Object(l.b)("calculate_attribute_counts",[],d),[j,h]=Object(l.b)("calculate_price_range",null,d),[w,f]=Object(l.b)("calculate_stock_status_counts",null,d),g=Object(s.a)(t||{}),v=Object(s.a)(c),k=Object(s.a)(i);Object(n.useEffect)(()=>{"object"==typeof g&&Object.keys(g).length&&(m.find(e=>e.taxonomy===g.taxonomy)||O([...m,g]))},[g,m,O]),Object(n.useEffect)(()=>{j!==v&&void 0!==v&&h(v)},[v,h,j]),Object(n.useEffect)(()=>{w!==k&&void 0!==k&&f(k)},[k,f,w]);const[E,_]=Object(n.useState)(!1),[y]=Object(o.a)(E,200);E||_(!0);const S=Object(n.useMemo)(()=>(e=>{const t=e;return e.calculate_attribute_counts&&(t.calculate_attribute_counts=Object(r.sortBy)(e.calculate_attribute_counts.map(e=>{let{taxonomy:t,queryType:c}=e;return{taxonomy:t,query_type:c}}),["taxonomy","query_type"])),t})(p),[p]);return Object(a.a)({namespace:"/wc/store",resourceName:"products/collection-data",query:{...b,page:void 0,per_page:void 0,orderby:void 0,order:void 0,...S},shouldSelect:y})}},3:function(e,t){e.exports=window.wp.components},30:function(e,t,c){"use strict";var n=c(0),o=c(4),r=c.n(o);t.a=e=>{let t,{label:c,screenReaderLabel:o,wrapperElement:s,wrapperProps:l={}}=e;const a=null!=c,u=null!=o;return!a&&u?(t=s||"span",l={...l,className:r()(l.className,"screen-reader-text")},Object(n.createElement)(t,l,o)):(t=s||n.Fragment,a&&u&&c!==o?Object(n.createElement)(t,l,Object(n.createElement)("span",{"aria-hidden":"true"},c),Object(n.createElement)("span",{className:"screen-reader-text"},o)):Object(n.createElement)(t,l,c))}},368:function(e,t,c){"use strict";var n=c(0),o=c(18);const r=Object(n.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24"},Object(n.createElement)("path",{fill:"none",d:"M0 0h24v24H0V0z"}),Object(n.createElement)("path",{d:"M19 15v4H5v-4h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 18.5c-.82 0-1.5-.67-1.5-1.5s.68-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5zM19 5v4H5V5h14m1-2H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 8.5c-.82 0-1.5-.67-1.5-1.5S6.18 5.5 7 5.5s1.5.68 1.5 1.5S7.83 8.5 7 8.5z"}));t.a=r},373:function(e,t,c){e.exports=c(450)},374:function(e,t){},375:function(e,t){},40:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var n=c(0),o=c(26),r=c.n(o);function s(e){const t=Object(n.useRef)(e);return r()(e,t.current)||(t.current=e),t.current}},43:function(e,t,c){"use strict";var n=c(0);t.a=function(e){let{srcElement:t,size:c=24,...o}=e;return Object(n.isValidElement)(t)?Object(n.cloneElement)(t,{width:c,height:c,...o}):null}},450:function(e,t,c){"use strict";c.r(t);var n=c(5),o=c.n(n),r=c(0),s=c(1),l=c(12),a=c(43),u=c(368),i=c(4),b=c.n(i),d=c(7),p=c(3),m=c(89),O=c(106),j=c(46),h=c(40),w=c(108),f=c(71),g=c(267),v=c(2),k=c(177),E=c(133),_=c(95),y=c(26),S=c.n(y),C=c(14);const x=[{value:"preview-1",name:"In Stock",label:Object(r.createElement)(_.a,{name:"In Stock",count:3})},{value:"preview-2",name:"Out of sotck",label:Object(r.createElement)(_.a,{name:"Out of stock",count:3})},{value:"preview-3",name:"On backorder",label:Object(r.createElement)(_.a,{name:"On backorder",count:2})}];c(375);var N=e=>{let{attributes:t,isEditor:c=!1}=e;const[n]=Object(r.useState)(Object(v.getSetting)("hideOutOfStockItems",!1)),[{outofstock:o,...l}]=Object(r.useState)(Object(v.getSetting)("stockStatusOptions",{})),[a]=Object(r.useState)(n?l:{outofstock:o,...l}),[u,i]=Object(r.useState)([]),[b,d]=Object(r.useState)(t.isPreview?x:[]),[p]=Object(r.useState)(Object.entries(a).map(e=>{let[t,c]=e;return{slug:t,name:c}}).filter(e=>!!e.name).sort((e,t)=>e.slug.localeCompare(t.slug))),[m]=Object(f.a)(),[O,y]=Object(f.b)("stock_status",[]),{results:N,isLoading:P}=Object(g.a)({queryStock:!0,queryState:m}),H=Object(r.useCallback)(e=>N.stock_status_counts?N.stock_status_counts.find(t=>{let{status:c,count:n}=t;return c===e&&0!==Number(n)}):null,[N]);Object(r.useEffect)(()=>{if(P||t.isPreview)return;const e=p.map(e=>{const c=H(e.slug);if(!(c||u.includes(e.slug)||(n=e.slug,null!=m&&m.stock_status&&m.stock_status.some(e=>{let{status:t=[]}=e;return t.includes(n)}))))return null;var n;const o=c?Number(c.count):0;return{value:e.slug,name:Object(C.decodeEntities)(e.name),label:Object(r.createElement)(_.a,{name:Object(C.decodeEntities)(e.name),count:t.showCounts?o:null})}}).filter(Boolean);d(e)},[t.showCounts,t.isPreview,P,H,u,m.stock_status,p]);const L=Object(r.useCallback)(e=>{c||e&&y(u)},[c,y,u]);Object(r.useEffect)(()=>{t.showFilterButton||L(u)},[t.showFilterButton,u,L]);const V=Object(r.useMemo)(()=>O,[O]),M=Object(h.a)(V),F=Object(w.a)(M);Object(r.useEffect)(()=>{S()(F,M)||S()(u,M)||i(M)},[u,M,F]);const T=Object(r.useCallback)(e=>{const t=e=>{const{name:t}=b.find(t=>t.value===e);return t},c=e=>{let{filterAdded:c,filterRemoved:n}=e;const o=c?t(c):null,r=n?t(n):null;o?Object(j.speak)(Object(s.sprintf)( +/* translators: %s stock statuses (for example: 'instock'...) */ +Object(s.__)("%s filter added.","woo-gutenberg-products-block"),o)):r&&Object(j.speak)(Object(s.sprintf)( +/* translators: %s stock statuses (for example:'instock'...) */ +Object(s.__)("%s filter removed.","woo-gutenberg-products-block"),r))},n=u.includes(e),o=u.filter(t=>t!==e);n?c({filterRemoved:e}):(o.push(e),o.sort(),c({filterAdded:e})),i(o)},[u,b]);if(0===b.length)return null;const R="h"+t.headingLevel,z=!t.isPreview&&!a,B=!t.isPreview&&P;return Object(r.createElement)(r.Fragment,null,!c&&t.heading&&Object(r.createElement)(R,{className:"wc-block-stock-filter__title"},t.heading),Object(r.createElement)("div",{className:"wc-block-stock-filter"},Object(r.createElement)(k.a,{className:"wc-block-stock-filter-list",options:b,checked:u,onChange:T,isLoading:z,isDisabled:B}),t.showFilterButton&&Object(r.createElement)(E.a,{className:"wc-block-stock-filter__button",disabled:z||B,onClick:()=>L(u)})))};c(374);var P=Object(p.withSpokenMessages)(e=>{let{attributes:t,setAttributes:c}=e;const{className:n,heading:o,headingLevel:l,showCounts:a,showFilterButton:u}=t;return Object(r.createElement)(r.Fragment,null,Object(r.createElement)(d.InspectorControls,{key:"inspector"},Object(r.createElement)(p.PanelBody,{title:Object(s.__)("Content","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(s.__)("Product count","woo-gutenberg-products-block"),help:a?Object(s.__)("Product count is visible.","woo-gutenberg-products-block"):Object(s.__)("Product count is hidden.","woo-gutenberg-products-block"),checked:a,onChange:()=>c({showCounts:!a})}),Object(r.createElement)("p",null,Object(s.__)("Heading Level","woo-gutenberg-products-block")),Object(r.createElement)(m.a,{isCollapsed:!1,minLevel:2,maxLevel:7,selectedLevel:l,onChange:e=>c({headingLevel:e})})),Object(r.createElement)(p.PanelBody,{title:Object(s.__)("Block Settings","woo-gutenberg-products-block")},Object(r.createElement)(p.ToggleControl,{label:Object(s.__)("Filter button","woo-gutenberg-products-block"),help:u?Object(s.__)("Products will only update when the button is pressed.","woo-gutenberg-products-block"):Object(s.__)("Products will update as options are selected.","woo-gutenberg-products-block"),checked:u,onChange:e=>c({showFilterButton:e})}))),Object(r.createElement)("div",{className:b()("wc-block-stock-filter",n)},Object(r.createElement)(O.a,{className:"wc-block-stock-filter__title",headingLevel:l,heading:o,onChange:e=>c({heading:e})}),Object(r.createElement)(p.Disabled,null,Object(r.createElement)(N,{attributes:t,isEditor:!0}))))});Object(l.registerBlockType)("woocommerce/stock-filter",{title:Object(s.__)("Filter Products by Stock","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(a.a,{srcElement:u.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(s.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(s.__)("Allow customers to filter the grid by products stock status. Works in combination with the All Products block.","woo-gutenberg-products-block"),supports:{html:!1,multiple:!1},example:{attributes:{isPreview:!0}},attributes:{heading:{type:"string",default:Object(s.__)("Filter by stock status","woo-gutenberg-products-block")},headingLevel:{type:"number",default:3},showCounts:{type:"boolean",default:!0},showFilterButton:{type:"boolean",default:!1},isPreview:{type:"boolean",default:!1}},edit:P,save(e){let{attributes:t}=e;const{className:c,showCounts:n,heading:s,headingLevel:l,showFilterButton:a}=t,u={"data-show-counts":n,"data-heading":s,"data-heading-level":l};return a&&(u["data-show-filter-button"]=a),Object(r.createElement)("div",o()({className:b()("is-loading",c)},u),Object(r.createElement)("span",{"aria-hidden":!0,className:"wc-block-product-stock-filter__placeholder"}))}})},46:function(e,t){e.exports=window.wp.a11y},48:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var n=c(0);const o=Object(n.createContext)("page"),r=()=>Object(n.useContext)(o);o.Provider},6:function(e,t){e.exports=window.lodash},7:function(e,t){e.exports=window.wp.blockEditor},71:function(e,t,c){"use strict";c.d(t,"a",(function(){return b})),c.d(t,"b",(function(){return d})),c.d(t,"c",(function(){return p}));var n=c(16),o=c(13),r=c(0),s=c(26),l=c.n(s),a=c(40),u=c(108),i=c(48);const b=e=>{const t=Object(i.a)();e=e||t;const c=Object(o.useSelect)(t=>t(n.QUERY_STATE_STORE_KEY).getValueForQueryContext(e,void 0),[e]),{setValueForQueryContext:s}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[c,Object(r.useCallback)(t=>{s(e,t)},[e,s])]},d=(e,t,c)=>{const s=Object(i.a)();c=c||s;const l=Object(o.useSelect)(o=>o(n.QUERY_STATE_STORE_KEY).getValueForQueryKey(c,e,t),[c,e]),{setQueryValue:a}=Object(o.useDispatch)(n.QUERY_STATE_STORE_KEY);return[l,Object(r.useCallback)(t=>{a(c,e,t)},[c,e,a])]},p=(e,t)=>{const c=Object(i.a)();t=t||c;const[n,o]=b(t),s=Object(a.a)(n),d=Object(a.a)(e),p=Object(u.a)(d),m=Object(r.useRef)(!1);return Object(r.useEffect)(()=>{l()(p,d)||(o(Object.assign({},s,d)),m.current=!0)},[s,d,p,o]),m.current?[n,o]:[e,o]}},8:function(e,t){e.exports=window.React},89:function(e,t,c){"use strict";var n=c(0),o=c(6),r=c(1),s=c(3);function l(e){let{level:t}=e;const c={1:"M9 5h2v10H9v-4H5v4H3V5h2v4h4V5zm6.6 0c-.6.9-1.5 1.7-2.6 2v1h2v7h2V5h-1.4z",2:"M7 5h2v10H7v-4H3v4H1V5h2v4h4V5zm8 8c.5-.4.6-.6 1.1-1.1.4-.4.8-.8 1.2-1.3.3-.4.6-.8.9-1.3.2-.4.3-.8.3-1.3 0-.4-.1-.9-.3-1.3-.2-.4-.4-.7-.8-1-.3-.3-.7-.5-1.2-.6-.5-.2-1-.2-1.5-.2-.4 0-.7 0-1.1.1-.3.1-.7.2-1 .3-.3.1-.6.3-.9.5-.3.2-.6.4-.8.7l1.2 1.2c.3-.3.6-.5 1-.7.4-.2.7-.3 1.2-.3s.9.1 1.3.4c.3.3.5.7.5 1.1 0 .4-.1.8-.4 1.1-.3.5-.6.9-1 1.2-.4.4-1 .9-1.6 1.4-.6.5-1.4 1.1-2.2 1.6V15h8v-2H15z",3:"M12.1 12.2c.4.3.8.5 1.2.7.4.2.9.3 1.4.3.5 0 1-.1 1.4-.3.3-.1.5-.5.5-.8 0-.2 0-.4-.1-.6-.1-.2-.3-.3-.5-.4-.3-.1-.7-.2-1-.3-.5-.1-1-.1-1.5-.1V9.1c.7.1 1.5-.1 2.2-.4.4-.2.6-.5.6-.9 0-.3-.1-.6-.4-.8-.3-.2-.7-.3-1.1-.3-.4 0-.8.1-1.1.3-.4.2-.7.4-1.1.6l-1.2-1.4c.5-.4 1.1-.7 1.6-.9.5-.2 1.2-.3 1.8-.3.5 0 1 .1 1.6.2.4.1.8.3 1.2.5.3.2.6.5.8.8.2.3.3.7.3 1.1 0 .5-.2.9-.5 1.3-.4.4-.9.7-1.5.9v.1c.6.1 1.2.4 1.6.8.4.4.7.9.7 1.5 0 .4-.1.8-.3 1.2-.2.4-.5.7-.9.9-.4.3-.9.4-1.3.5-.5.1-1 .2-1.6.2-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1l1.1-1.4zM7 9H3V5H1v10h2v-4h4v4h2V5H7v4z",4:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm10-2h-1v2h-2v-2h-5v-2l4-6h3v6h1v2zm-3-2V7l-2.8 4H16z",5:"M12.1 12.2c.4.3.7.5 1.1.7.4.2.9.3 1.3.3.5 0 1-.1 1.4-.4.4-.3.6-.7.6-1.1 0-.4-.2-.9-.6-1.1-.4-.3-.9-.4-1.4-.4H14c-.1 0-.3 0-.4.1l-.4.1-.5.2-1-.6.3-5h6.4v1.9h-4.3L14 8.8c.2-.1.5-.1.7-.2.2 0 .5-.1.7-.1.5 0 .9.1 1.4.2.4.1.8.3 1.1.6.3.2.6.6.8.9.2.4.3.9.3 1.4 0 .5-.1 1-.3 1.4-.2.4-.5.8-.9 1.1-.4.3-.8.5-1.3.7-.5.2-1 .3-1.5.3-.8 0-1.6-.1-2.3-.4-.6-.2-1.1-.6-1.6-1-.1-.1 1-1.5 1-1.5zM9 15H7v-4H3v4H1V5h2v4h4V5h2v10z",6:"M9 15H7v-4H3v4H1V5h2v4h4V5h2v10zm8.6-7.5c-.2-.2-.5-.4-.8-.5-.6-.2-1.3-.2-1.9 0-.3.1-.6.3-.8.5l-.6.9c-.2.5-.2.9-.2 1.4.4-.3.8-.6 1.2-.8.4-.2.8-.3 1.3-.3.4 0 .8 0 1.2.2.4.1.7.3 1 .6.3.3.5.6.7.9.2.4.3.8.3 1.3s-.1.9-.3 1.4c-.2.4-.5.7-.8 1-.4.3-.8.5-1.2.6-1 .3-2 .3-3 0-.5-.2-1-.5-1.4-.9-.4-.4-.8-.9-1-1.5-.2-.6-.3-1.3-.3-2.1s.1-1.6.4-2.3c.2-.6.6-1.2 1-1.6.4-.4.9-.7 1.4-.9.6-.3 1.1-.4 1.7-.4.7 0 1.4.1 2 .3.5.2 1 .5 1.4.8 0 .1-1.3 1.4-1.3 1.4zm-2.4 5.8c.2 0 .4 0 .6-.1.2 0 .4-.1.5-.2.1-.1.3-.3.4-.5.1-.2.1-.5.1-.7 0-.4-.1-.8-.4-1.1-.3-.2-.7-.3-1.1-.3-.3 0-.7.1-1 .2-.4.2-.7.4-1 .7 0 .3.1.7.3 1 .1.2.3.4.4.6.2.1.3.3.5.3.2.1.5.2.7.1z"};return c.hasOwnProperty(t)?Object(n.createElement)(s.SVG,{width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},Object(n.createElement)(s.Path,{d:c[t]})):null}class a extends n.Component{createLevelControl(e,t,c){const o=e===t;return{icon:Object(n.createElement)(l,{level:e}),title:Object(r.sprintf)( +/* translators: %s: heading level e.g: "2", "3", "4" */ +Object(r.__)("Heading %d","woo-gutenberg-products-block"),e),isActive:o,onClick:()=>c(e)}}render(){const{isCollapsed:e=!0,minLevel:t,maxLevel:c,selectedLevel:r,onChange:a}=this.props;return Object(n.createElement)(s.ToolbarGroup,{isCollapsed:e,icon:Object(n.createElement)(l,{level:r}),controls:Object(o.range)(t,c).map(e=>this.createLevelControl(e,r,a))})}}t.a=a},9:function(e,t){e.exports=window.wp.compose},93:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var n=c(0);const o=()=>{const[,e]=Object(n.useState)();return Object(n.useCallback)(t=>{e(()=>{throw t})},[])}},95:function(e,t,c){"use strict";var n=c(0),o=c(1),r=c(30);c(207),t.a=e=>{let{name:t,count:c}=e;return Object(n.createElement)(n.Fragment,null,t,Number.isFinite(c)&&Object(n.createElement)(r.a,{label:c,screenReaderLabel:Object(o.sprintf)( +/* translators: %s number of products. */ +Object(o._n)("%s product","%s products",c,"woo-gutenberg-products-block"),c),wrapperElement:"span",wrapperProps:{className:"wc-filter-element-label-list-count"}}))}}}); \ No newline at end of file diff --git a/build/vendors--atomic-block-components/add-to-cart--cart-blocks/order-summary--checkout-blocks/billing-ad--c5eb4dcd-frontend.js b/build/vendors--atomic-block-components/add-to-cart--cart-blocks/order-summary--checkout-blocks/billing-ad--c5eb4dcd-frontend.js new file mode 100644 index 00000000000..ec0069181f3 --- /dev/null +++ b/build/vendors--atomic-block-components/add-to-cart--cart-blocks/order-summary--checkout-blocks/billing-ad--c5eb4dcd-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[0],{231:function(e,t,r){"use strict";r.d(t,"a",(function(){return p})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return d})),r.d(t,"d",(function(){return s})),r.d(t,"e",(function(){return u}));var n=r(3),a=r(263),i=(r(7),r(269),r(287),r(249)),o=r(257),s={}.hasOwnProperty,c=Object(n.createContext)("undefined"!=typeof HTMLElement?Object(a.a)({key:"css"}):null);c.Provider;var u=function(e){return Object(n.forwardRef)((function(t,r){var a=Object(n.useContext)(c);return e(t,a,r)}))},l=Object(n.createContext)({}),f="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",d=function(e,t){var r={};for(var n in t)s.call(t,n)&&(r[n]=t[n]);return r[f]=e,r},h=function(){return null},p=u((function(e,t,r){var a=e.css;"string"==typeof a&&void 0!==t.registered[a]&&(a=t.registered[a]);var c=e[f],u=[a],d="";"string"==typeof e.className?d=Object(i.a)(t.registered,u,e.className):null!=e.className&&(d=e.className+" ");var p=Object(o.a)(u,void 0,Object(n.useContext)(l));Object(i.b)(t,p,"string"==typeof c),d+=t.key+"-"+p.name;var b={};for(var m in e)s.call(e,m)&&"css"!==m&&m!==f&&(b[m]=e[m]);b.ref=r,b.className=d;var g=Object(n.createElement)(c,b),y=Object(n.createElement)(h,null);return Object(n.createElement)(n.Fragment,null,y,g)}))},234:function(e,t,r){"use strict";r.d(t,"a",(function(){return f})),r.d(t,"b",(function(){return l}));var n=r(263),a=r(257),i=r(249);function o(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function s(e,t,r){var n=[],a=Object(i.a)(e,n,r);return n.length<2?r:a+t(n)}var c=function e(t){for(var r="",n=0;n=4;++n,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(a){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)},a={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=r(268),o=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},l=Object(i.a)((function(e){return c(e)?e:e.replace(o,"-$&").toLowerCase()})),f=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,r){return h={name:t,styles:r,next:h},t}))}return 1===a[e]||c(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return h={name:r.name,styles:r.styles,next:h},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)h={name:n.name,styles:n.styles,next:h},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var a=0;a0?g(S,--j):0,w--,10===A&&(w=1,k--),A}function E(){return A=j2||T(A)>3?"":" "}function I(e,t){for(;--t&&E()&&!(A<48||A>102||A>57&&A<65||A>70&&A<97););return N(e,F()+(t<6&&32==P()&&32==E()))}function D(e,t){for(;E()&&e+A!==57&&(e+A!==84||47!==P()););return"/*"+N(t,j-1)+"*"+d(47===e?e:E())}function q(e){for(;!T(P());)E();return N(e,j)}function G(e,t,r,n,a,i,o,s,u,l,d){for(var h=a-1,m=0===a?i:[""],g=x(m),v=0,_=0,k=0;v0?m[w]+" "+O:b(O,/&\f/g,m[w])))&&(u[k++]=j);return C(e,t,r,0===a?c:s,u,l,d)}function B(e,t,r){return C(e,t,r,s,d(A),y(e,2,-2),0)}function U(e,t,r,n){return C(e,t,r,u,y(e,0,n),y(e,n+1,-1),n)}function W(e,t){for(var r="",n=x(e),a=0;a-1&&!e.return)switch(e.type){case u:e.return=function e(t,r){switch(function(e,t){return(((t<<2^g(e,0))<<2^g(e,1))<<2^g(e,2))<<2^g(e,3)}(t,r)){case 5103:return o+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return o+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return o+t+i+t+a+t+t;case 6828:case 4268:return o+t+a+t+t;case 6165:return o+t+a+"flex-"+t+t;case 5187:return o+t+b(t,/(\w+).+(:[^]+)/,o+"box-$1$2"+a+"flex-$1$2")+t;case 5443:return o+t+a+"flex-item-"+b(t,/flex-|-self/,"")+t;case 4675:return o+t+a+"flex-line-pack"+b(t,/align-content|flex-|-self/,"")+t;case 5548:return o+t+a+b(t,"shrink","negative")+t;case 5292:return o+t+a+b(t,"basis","preferred-size")+t;case 6060:return o+"box-"+b(t,"-grow","")+o+t+a+b(t,"grow","positive")+t;case 4554:return o+b(t,/([^-])(transform)/g,"$1"+o+"$2")+t;case 6187:return b(b(b(t,/(zoom-|grab)/,o+"$1"),/(image-set)/,o+"$1"),t,"")+t;case 5495:case 3959:return b(t,/(image-set\([^]*)/,o+"$1$`$1");case 4968:return b(b(t,/(.+:)(flex-)?(.*)/,o+"box-pack:$3"+a+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+o+t+t;case 4095:case 3583:case 4068:case 2532:return b(t,/(.+)-inline(.+)/,o+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(v(t)-1-r>6)switch(g(t,r+1)){case 109:if(45!==g(t,r+4))break;case 102:return b(t,/(.+:)(.+)-([^]+)/,"$1"+o+"$2-$3$1"+i+(108==g(t,r+3)?"$3":"$2-$3"))+t;case 115:return~m(t,"stretch")?e(b(t,"stretch","fill-available"),r)+t:t}break;case 4949:if(115!==g(t,r+1))break;case 6444:switch(g(t,v(t)-3-(~m(t,"!important")&&10))){case 107:return b(t,":",":"+o)+t;case 101:return b(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o+(45===g(t,14)?"inline-":"")+"box$3$1"+o+"$2$3$1"+a+"$2box$3")+t}break;case 5936:switch(g(t,r+11)){case 114:return o+t+a+b(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return o+t+a+b(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return o+t+a+b(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return o+t+a+t+t}return t}(e.value,e.length);break;case l:return W([$(e,{value:b(e.value,"@","@"+o)})],n);case c:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return W([$(e,{props:[b(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return W([$(e,{props:[b(t,/:(plac\w+)/,":"+o+"input-$1")]}),$(e,{props:[b(t,/:(plac\w+)/,":-moz-$1")]}),$(e,{props:[b(t,/:(plac\w+)/,a+"input-$1")]})],n)}return""}))}}];t.a=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var a,i,o=e.stylisPlugins||Q,s={},c=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r0&&v($)-h&&_(g>32?U($+";",a,n,h-1):U(b($," ","")+";",a,n,h-2),u);break;case 59:$+=";";default:if(_(C=G($,r,n,l,f,i,c,j,A=[],S=[],h),o),123===O)if(0===f)e($,r,C,C,A,o,h,c,S);else switch(p){case 100:case 109:case 115:e(t,C,C,a&&_(G(t,C,C,0,0,i,c,j,i,A=[],h),S),i,S,h,c,a?A:S);break;default:e($,C,C,C,[""],S,0,c,S)}}l=f=g=0,x=w=1,j=$="",h=s;break;case 58:h=1+v($),g=y;default:if(x<1)if(123==O)--x;else if(125==O&&0==x++&&125==R())continue;switch($+=d(O),O*x){case 38:w=f>0?1:($+="\f",-1);break;case 44:c[l++]=(v($)-1)*w,w=1;break;case 64:45===P()&&($+=z(E())),p=P(),f=h=v(j=$+=q(F())),O++;break;case 45:45===y&&2==v($)&&(x=0)}}return o}("",null,null,null,[""],e=M(e),0,[0],e))}(e?e+"{"+t.styles+"}":t.styles),h),n&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new n.a({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return p.sheet.hydrate(c),p}},264:function(e,t,r){"use strict";var n=r(7),a=r(3),i=r(268),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,s=Object(i.a)((function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),c=r(231),u=r(249),l=r(257),f=s,d=function(e){return"theme"!==e},h=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?f:d},p=function(e,t,r){var n;if(t){var a=t.shouldForwardProp;n=e.__emotion_forwardProp&&a?function(t){return e.__emotion_forwardProp(t)&&a(t)}:a}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},b=function(){return null};t.a=function e(t,r){var i,o,s=t.__emotion_real===t,f=s&&t.__emotion_base||t;void 0!==r&&(i=r.label,o=r.target);var d=p(t,r,s),m=d||h(f),g=!m("as");return function(){var y=arguments,v=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&v.push("label:"+i+";"),null==y[0]||void 0===y[0].raw)v.push.apply(v,y);else{v.push(y[0][0]);for(var x=y.length,_=1;_1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=F(e,360),t=F(t,100),r=F(r,100),0===t)n=a=i=r;else{var s=r<.5?r*(1+t):r+t-r*t,c=2*r-s;n=o(c,s,e+1/3),a=o(c,s,e),i=o(c,s,e-1/3)}return{r:255*n,g:255*a,b:255*i}}(e.h,f,h),p=!0,b="hsl"),e.hasOwnProperty("a")&&(c=e.a)),c=P(c),{ok:p,format:e.format||b,r:u(255,l(s.r,0)),g:u(255,l(s.g,0)),b:u(255,l(s.b,0)),a:c}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=c(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=r.ok,this._tc_id=s++}function h(e,t,r){e=F(e,255),t=F(t,255),r=F(r,255);var n,a,i=l(e,t,r),o=u(e,t,r),s=(i+o)/2;if(i==o)n=a=0;else{var c=i-o;switch(a=s>.5?c/(2-i-o):c/(i+o),i){case e:n=(t-r)/c+(t>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(d(n));return i}function $(e,t){t=t||6;for(var r=d(e).toHsv(),n=r.h,a=r.s,i=r.v,o=[],s=1/t;t--;)o.push(d({h:n,s:a,v:i})),i=(i+s)%1;return o}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:a.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:a.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:a.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=P(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),r=c(100*e.s),n=c(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return b(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,n,a){var i=[M(c(e).toString(16)),M(c(t).toString(16)),M(c(r).toString(16)),M(z(n))];return a&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*F(this._r,255))+"%",g:c(100*F(this._g,255))+"%",b:c(100*F(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*F(this._r,255))+"%, "+c(100*F(this._g,255))+"%, "+c(100*F(this._b,255))+"%)":"rgba("+c(100*F(this._r,255))+"%, "+c(100*F(this._g,255))+"%, "+c(100*F(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[b(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var a=d(e);r="#"+m(a._r,a._g,a._b,a._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(x,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(k,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(O,arguments)},monochromatic:function(){return this._applyCombination($,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(j,arguments)},tetrad:function(){return this._applyCombination(A,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:H(e[n]));e=r}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:f(),g:f(),b:f()})},d.mix=function(e,t,r){r=0===r?0:r||50;var n=d(e).toRgb(),a=d(t).toRgb(),i=r/100;return d({r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a})},d.readability=function(e,t){var r=d(e),n=d(t);return(a.max(r.getLuminance(),n.getLuminance())+.05)/(a.min(r.getLuminance(),n.getLuminance())+.05)},d.isReadable=function(e,t,r){var n,a,i,o,s,c=d.readability(e,t);switch(a=!1,(i=r,"AA"!==(o=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(s=(i.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:o,size:s}).level+n.size){case"AAsmall":case"AAAlarge":a=c>=4.5;break;case"AAlarge":a=c>=3;break;case"AAAsmall":a=c>=7}return a},d.mostReadable=function(e,t,r){var n,a,i,o,s=null,c=0;a=(r=r||{}).includeFallbackColors,i=r.level,o=r.size;for(var u=0;uc&&(c=n,s=d(t[u]));return d.isReadable(e,s,{level:i,size:o})||!a?s:(r.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],r))};var R=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},E=d.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(R);function P(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function F(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,l(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),a.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function N(e){return u(1,l(0,e))}function T(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function H(e){return e<=1&&(e=100*e+"%"),e}function z(e){return a.round(255*parseFloat(e)).toString(16)}function L(e){return T(e)/255}var I,D,q,G=(D="[\\s|\\(]+("+(I="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+I+")[,|\\s]+("+I+")\\s*\\)?",q="[\\s|\\(]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")[,|\\s]+("+I+")\\s*\\)?",{CSS_UNIT:new RegExp(I),rgb:new RegExp("rgb"+D),rgba:new RegExp("rgba"+q),hsl:new RegExp("hsl"+D),hsla:new RegExp("hsla"+q),hsv:new RegExp("hsv"+D),hsva:new RegExp("hsva"+q),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function B(e){return!!G.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(n=function(){return d}.call(t,r,t,e))||(e.exports=n)}(Math)},290:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a})),r.d(t,"c",(function(){return i}));const n="data-wp-component",a="data-wp-c16t",i="__contextSystemKey__"},291:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(5),a=r(270);const i=r.n(a)()((function(e){return"components-"+Object(n.kebabCase)(e)}))},292:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i})),r.d(t,"e",(function(){return o})),r.d(t,"c",(function(){return s})),r.d(t,"d",(function(){return c}));var n=r(234);const a=Object(n.a)({name:"zjik7",styles:"display:flex"}),i=Object(n.a)({name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"}),o=Object(n.a)({name:"82a6rk",styles:"flex:1"}),s=Object(n.a)({name:"13nosa1",styles:">*{min-height:0;}"}),c=Object(n.a)({name:"1pwxzk4",styles:">*{min-width:0;}"})},293:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return i}));var n=r(0);const a=Object(n.createContext)({flexItemDisplay:void 0}),i=()=>Object(n.useContext)(a)},306:function(e,t,r){"use strict";var n=r(0),a=r(4),i=r.n(a),o=r(47),s=r(264),c=r(5),u={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function l(e){return Object(c.get)(u,e,"")}var f=r(358),d=r(259);const h=Object(s.a)("div",{target:"e1puf3u3"})("font-family:",l("default.fontFamily"),";font-size:",l("default.fontSize"),";"),p=Object(s.a)("div",{target:"e1puf3u2"})("margin-bottom:",Object(d.a)(2),";.components-panel__row &{margin-bottom:inherit;}"),b=Object(s.a)("label",{target:"e1puf3u1"})("display:inline-block;margin-bottom:",Object(d.a)(2),";"),m=Object(s.a)("p",{target:"e1puf3u0"})("font-size:",l("helpText.fontSize"),";font-style:normal;color:",f.a.mediumGray.text,";");function g({id:e,label:t,hideLabelFromVision:r,help:a,className:s,children:c}){return Object(n.createElement)(h,{className:i()("components-base-control",s)},Object(n.createElement)(p,{className:"components-base-control__field"},t&&e&&(r?Object(n.createElement)(o.a,{as:"label",htmlFor:e},t):Object(n.createElement)(b,{className:"components-base-control__label",htmlFor:e},t)),t&&!e&&(r?Object(n.createElement)(o.a,{as:"label"},t):Object(n.createElement)(g.VisualLabel,null,t)),c),!!a&&Object(n.createElement)(m,{id:e+"__help",className:"components-base-control__help"},a))}g.VisualLabel=({className:e,children:t})=>(e=i()("components-base-control__label",e),Object(n.createElement)("span",{className:e},t)),t.a=g},325:function(e,t,r){"use strict";e.exports=r(326)},326:function(e,t,r){"use strict";var n="function"==typeof Symbol&&Symbol.for,a=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,c=n?Symbol.for("react.profiler"):60114,u=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,f=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,b=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,x=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case f:case d:case o:case c:case s:case p:return e;default:switch(e=e&&e.$$typeof){case l:case h:case g:case m:case u:return e;default:return t}}case i:return t}}}function w(e){return k(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=u,t.Element=a,t.ForwardRef=h,t.Fragment=o,t.Lazy=g,t.Memo=m,t.Portal=i,t.Profiler=c,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return w(e)||k(e)===f},t.isConcurrentMode=w,t.isContextConsumer=function(e){return k(e)===l},t.isContextProvider=function(e){return k(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return k(e)===h},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===g},t.isMemo=function(e){return k(e)===m},t.isPortal=function(e){return k(e)===i},t.isProfiler=function(e){return k(e)===c},t.isStrictMode=function(e){return k(e)===s},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===c||e===s||e===p||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===u||e.$$typeof===l||e.$$typeof===h||e.$$typeof===v||e.$$typeof===x||e.$$typeof===_||e.$$typeof===y)},t.typeOf=k},327:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return o}));var n=r(0),a=r(5);r(45);const i=Object(n.createContext)({}),o=()=>Object(n.useContext)(i);function s({value:t}){const r=o(),i=Object(n.useRef)(t);return function(r,o){const s=Object(n.useRef)(!1);Object(n.useEffect)(()=>{s.current?Object(a.isEqual)(i.current,t)&&i.current!==t&&void 0!==e&&e.env:s.current=!0},o)}(0,[t]),Object(n.useMemo)(()=>Object(a.merge)(Object(a.cloneDeep)(r),t),[r,t])}Object(n.memo)(({children:e,value:t})=>{const r=s({value:t});return Object(n.createElement)(i.Provider,{value:r},e)})}).call(this,r(65))},328:function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return i}));var n=r(290);function a(e){return{[n.a]:e}}function i(){return{[n.b]:!0}}},330:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(234),a=r(370),i=r(293),o=r(292);function s(e){const{className:t,display:r,isBlock:s=!1,...c}=Object(a.a)(e,"FlexItem"),u={},l=Object(i.b)().flexItemDisplay;return u.Base=Object(n.a)({display:r||l},"",""),{...c,className:Object(n.b)(o.b,u.Base,s&&o.e,t)}}},358:function(e,t,r){"use strict";r.d(t,"a",(function(){return g}));var n=r(5),a=r(289),i=r.n(a);function o(e="",t=1){const{r:r,g:n,b:a}=i()(e).toRgb();return`rgba(${r}, ${n}, ${a}, ${t})`}const s={black:"#000",white:"#fff"},c={blue:{medium:{focus:"#007cba",focusDark:"#fff"}},gray:{900:"#1e1e1e",700:"#757575",600:"#949494",400:"#ccc",200:"#ddd",100:"#f0f0f0"},darkGray:{primary:"#1e1e1e",heading:"#050505"},mediumGray:{text:"#757575"},lightGray:{ui:"#949494",secondary:"#ccc",tertiary:"#e7e8e9"}},u={900:"#191e23",800:"#23282d",700:"#32373c",600:"#40464d",500:"#555d66",400:"#606a73",300:"#6c7781",200:"#7e8993",150:"#8d96a0",100:"#8f98a1",placeholder:o(c.gray[900],.62)},l={900:o("#000510",.9),800:o("#00000a",.85),700:o("#06060b",.8),600:o("#000913",.75),500:o("#0a1829",.7),400:o("#0a1829",.65),300:o("#0e1c2e",.62),200:o("#162435",.55),100:o("#223443",.5),backgroundFill:o(u[700],.7)},f={900:o("#304455",.45),800:o("#425863",.4),700:o("#667886",.35),600:o("#7b86a2",.3),500:o("#9197a2",.25),400:o("#95959c",.2),300:o("#829493",.15),200:o("#8b8b96",.1),100:o("#747474",.05)},d={900:"#a2aab2",800:"#b5bcc2",700:"#ccd0d4",600:"#d7dade",500:"#e2e4e7",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5",100:"#f8f9f9",placeholder:o(s.white,.65)},h={900:o(s.white,.5),800:o(s.white,.45),700:o(s.white,.4),600:o(s.white,.35),500:o(s.white,.3),400:o(s.white,.25),300:o(s.white,.2),200:o(s.white,.15),100:o(s.white,.1),backgroundFill:o(d[300],.8)},p={wordpress:{700:"#00669b"},dark:{900:"#0071a1"},medium:{900:"#006589",800:"#00739c",700:"#007fac",600:"#008dbe",500:"#00a0d2",400:"#33b3db",300:"#66c6e4",200:"#bfe7f3",100:"#e5f5fa",highlight:"#b3e7fe",focus:"#007cba"}},b={theme:`var( --wp-admin-theme-color, ${p.wordpress[700]})`,themeDark10:`var( --wp-admin-theme-color-darker-10, ${p.medium.focus})`},m={theme:b.theme,background:s.white,backgroundDisabled:d[200],border:c.gray[700],borderFocus:b.themeDark10,borderDisabled:c.gray[400],borderLight:c.gray[200],label:u[500],textDisabled:u[150],textDark:s.white,textLight:s.black},g={...s,darkGray:Object(n.merge)({},u,c.darkGray),darkOpacity:l,darkOpacityLight:f,mediumGray:c.mediumGray,gray:c.gray,lightGray:Object(n.merge)({},d,c.lightGray),lightGrayLight:h,blue:Object(n.merge)({},p,c.blue),alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},admin:b,ui:m}},370:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return s}));var n=r(234),a=(r(45),r(327)),i=r(328),o=r(291);function s(t,r){const s=Object(a.a)();void 0===r&&void 0!==e&&e.env;const c=(null==s?void 0:s[r])||{},u={...Object(i.a)(),...Object(i.b)(r)},{_overrides:l,...f}=c,d=Object.entries(f).length?Object.assign({},f,t):t,h=Object(n.b)(Object(o.a)(r),t.className),p="function"==typeof d.renderChildren?d.renderChildren(d):d.children;for(const e in d)u[e]=d[e];for(const e in l)u[e]=l[e];return u.children=p,u.className=h,u}}).call(this,r(65))},371:function(e,t,r){"use strict";var n=r(264);const a=Object(n.a)("div",{target:"em57xhy0"})("");a.selector=".components-view",a.displayName="View",t.a=a},372:function(e,t,r){"use strict";(function(e){r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return u}));var n=r(5),a=r(0),i=(r(45),r(290)),o=r(291);function s(t,r,s={}){const{memo:c=!1}=s;let u=Object(a.forwardRef)(t);c&&(u=Object(a.memo)(u)),void 0===r&&void 0!==e&&e.env;let l=u[i.c]||[r];return Array.isArray(r)&&(l=[...l,...r]),"string"==typeof r&&(l=[...l,r]),u.displayName=r,u[i.c]=Object(n.uniq)(l),u.selector="."+Object(o.a)(r),u}function c(e){if(!e)return[];let t=[];return e[i.c]&&(t=e[i.c]),e.type&&e.type[i.c]&&(t=e.type[i.c]),t}function u(e,t){return!!e&&("string"==typeof t?c(e).includes(t):!!Array.isArray(t)&&t.some(t=>c(e).includes(t)))}}).call(this,r(65))},373:function(e,t,r){"use strict";r.d(t,"a",(function(){return s}));var n=r(7),a=r(0),i=r(372),o=r(371);const s=({as:e,name:t,useHook:r,memo:s=!1})=>{function c(t,i){const s=r(t);return Object(a.createElement)(o.a,Object(n.a)({as:e||"div"},s,{ref:i}))}return c.displayName=t,Object(i.a)(c,t,{memo:s})}},374:function(e,t,r){"use strict";var n=r(373),a=r(330);const i=Object(n.a)({as:"div",useHook:a.a,name:"FlexItem"});t.a=i},397:function(e,t,r){"use strict";var n=r(7),a=r(0),i=r(372),o=r(234),s=r(30),c=r.n(s),u=r(370);const l=["40em","52em","64em"];var f=r(259),d=r(292);function h(e){const{align:t="center",className:r,direction:n="row",expanded:i=!0,gap:s=2,justify:h="space-between",wrap:p=!1,...b}=Object(u.a)(function({isReversed:e,...t}){return void 0!==e?(c()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...t,direction:e?"row-reverse":"row"}):t}(e),"Flex"),m=function(e,t={}){const r=((e={})=>{const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>l.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${l.length} breakpoints, got index ${t}`);const[r,n]=Object(a.useState)(t);return Object(a.useEffect)(()=>{const e=()=>{const e=l.filter(e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches).length;r!==e&&n(e)};return e(),"undefined"!=typeof document&&document.addEventListener("resize",e),()=>{"undefined"!=typeof document&&document.removeEventListener("resize",e)}},[r]),r})(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const n=e||[];return n[r>=n.length?n.length-1:r]}(Array.isArray(n)?n:[n]),g="string"==typeof m&&!!m.includes("column"),y="string"==typeof m&&m.includes("reverse");return{...b,className:Object(a.useMemo)(()=>{const e={};return e.Base=Object(o.a)({alignItems:g?"normal":t,flexDirection:m,flexWrap:p?"wrap":void 0,justifyContent:h,height:g&&i?"100%":void 0,width:!g&&i?"100%":void 0,marginBottom:p?`calc(${Object(f.a)(s)} * -1)`:void 0},"",""),e.Items=Object(o.a)({"> * + *:not(marquee)":{marginTop:g?Object(f.a)(s):void 0,marginRight:!g&&y?Object(f.a)(s):void 0,marginLeft:g||y?void 0:Object(f.a)(s)}},"",""),e.WrapItems=Object(o.a)({"> *:not(marquee)":{marginBottom:Object(f.a)(s),marginLeft:!g&&y?Object(f.a)(s):void 0,marginRight:g||y?void 0:Object(f.a)(s)},"> *:last-child:not(marquee)":{marginLeft:!g&&y?0:void 0,marginRight:g||y?void 0:0}},"",""),Object(o.b)(d.a,e.Base,p?e.WrapItems:e.Items,g?d.c:d.d,r)},[t,r,m,i,s,g,y,h,p]),isColumn:g}}var p=r(293),b=r(371);const m=Object(i.a)((function(e,t){const{children:r,isColumn:i,...o}=h(e);return Object(a.createElement)(p.a.Provider,{value:{flexItemDisplay:i?"block":void 0}},Object(a.createElement)(b.a,Object(n.a)({},o,{ref:t}),r))}),"Flex");t.a=m}}]); \ No newline at end of file diff --git a/build/vendors--atomic-block-components/add-to-cart-frontend.js b/build/vendors--atomic-block-components/add-to-cart-frontend.js new file mode 100644 index 00000000000..bc6bf11137a --- /dev/null +++ b/build/vendors--atomic-block-components/add-to-cart-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[49],{260:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n(3),n(263),n(231),n(10),n(269),n(288),n(249);var i=n(257);function r(){for(var e=arguments.length,t=new Array(e),n=0;n=480,"is-medium":g>=160&&g<480,"is-small":g<160});const m=o()("components-placeholder",s,f),x=o()("components-placeholder__fieldset",{"is-column-layout":b});return Object(r.createElement)("div",Object(i.a)({},p,{className:m}),h,d,u&&Object(r.createElement)("div",{className:"components-placeholder__preview"},u),Object(r.createElement)("div",{className:"components-placeholder__label"},Object(r.createElement)(c.a,{icon:e}),n),!!a&&Object(r.createElement)("div",{className:"components-placeholder__instructions"},a),Object(r.createElement)("div",{className:x},t))}},329:function(e,t){e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={exports:{},id:i,loaded:!1};return e[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return i.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return i.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return i.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return i.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=function(e){var t=e.autoEscape,a=e.caseSensitive,o=void 0!==a&&a,l=e.findChunks,c=void 0===l?i:l,s=e.sanitize,d=e.searchWords,u=e.textToHighlight;return r({chunksToHighlight:n({chunks:c({autoEscape:t,caseSensitive:o,sanitize:s,searchWords:d,textToHighlight:u})}),totalLength:u?u.length:0})};var n=t.combineChunks=function(e){var t=e.chunks;return t.sort((function(e,t){return e.start-t.start})).reduce((function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var i=Math.max(n.end,t.end);e.push({highlight:!1,start:n.start,end:i})}else e.push(n,t);return e}),[])},i=function(e){var t=e.autoEscape,n=e.caseSensitive,i=e.sanitize,r=void 0===i?a:i,o=e.searchWords,l=e.textToHighlight;return l=r(l),o.filter((function(e){return e})).reduce((function(e,i){i=r(i),t&&(i=i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var a=new RegExp(i,n?"g":"gi"),o=void 0;o=a.exec(l);){var c=o.index,s=a.lastIndex;s>c&&e.push({highlight:!1,start:c,end:s}),o.index===a.lastIndex&&a.lastIndex++}return e}),[])};t.findChunks=i;var r=t.fillInChunks=function(e){var t=e.chunksToHighlight,n=e.totalLength,i=[],r=function(e,t,n){t-e>0&&i.push({start:e,end:t,highlight:n})};if(0===t.length)r(0,n,!1);else{var a=0;t.forEach((function(e){r(a,e.start,!1),r(e.start,e.end,!0),a=e.end})),r(a,n,!1)}return i};function a(e){return e}}])},383:function(e,t,n){"use strict";var i={};n.r(i),n.d(i,"Text",(function(){return T})),n.d(i,"block",(function(){return P})),n.d(i,"positive",(function(){return $})),n.d(i,"destructive",(function(){return W})),n.d(i,"muted",(function(){return I})),n.d(i,"highlighterText",(function(){return M})),n.d(i,"upperCase",(function(){return R}));var r=n(7),a=n(0),o=n(5),l=n(4),c=n.n(l),s=n(12),d=function({icon:e,size:t=24,...n}){return Object(a.cloneElement)(e,{width:t,height:t,...n})},u=n(24),b=Object(a.createElement)(u.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(a.createElement)(u.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),p=n(306),h=n(264),g=n(260),f=n(397),m=n(374),x=n(373),O=n(234),j=n(370),v=n(372);const y=Object(O.a)({name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"}),k="…",w={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},z={ellipsis:k,ellipsizeMode:w.auto,limit:0,numberOfLines:0};var S=n(270),C=n.n(S),E=n(289),F=n.n(E);let H;const _=C()((function(e){var t,n;if("string"!=typeof e)return"";if("string"==typeof(n=e)&&F()(n).isValid())return e;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const i=function(){if("undefined"!=typeof document){if(!H){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),H=e}return H}}();if(!i)return"";i.style.background=e;const r=null===(t=window)||void 0===t?void 0:t.getComputedStyle(i).background;return i.style.background="",r||""}));var L=n(358),B=n(259),N={colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:"18px",fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",controlPaddingX:"12px",controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:L.a.white,controlBorderRadius:"2px",controlBorderColor:L.a.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:L.a.gray[700],controlBoxShadowFocus:"0 0 0, 0.5px, "+L.a.admin,controlDestructiveBorderColor:L.a.alert.red,controlHeight:"30px",controlHeightLarge:"calc( 30px * 1.2 )",controlHeightSmall:"calc( 30px * 0.8 )",controlHeightXSmall:"calc( 30px * 0.6 )",cardBorderRadius:"2px",cardPaddingXSmall:""+Object(B.a)(2),cardPaddingSmall:""+Object(B.a)(4),cardPaddingMedium:`${Object(B.a)(4)} ${Object(B.a)(6)}`,cardPaddingLarge:`${Object(B.a)(6)} ${Object(B.a)(8)}`,surfaceBackgroundColor:L.a.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:L.a.white,surfaceColor:L.a.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"};const T=Object(O.a)("color:",L.a.black,";line-height:",N.fontLineHeightBase,";margin:0;",""),P=Object(O.a)({name:"4zleql",styles:"display:block"}),$=Object(O.a)("color:",L.a.alert.green,";",""),W=Object(O.a)("color:",L.a.alert.red,";",""),I=Object(O.a)("color:",L.a.mediumGray.text,";",""),M=Object(O.a)("mark{background:",L.a.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),R=Object(O.a)({name:"50zrmy",styles:"text-transform:uppercase"});var D=n(329);const A=C()(e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}),V={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20};function X(e=13){if(e in V)return X(V[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}return`calc((${e} / 13) * ${N.fontSize})`}[1,2,3,4,5,6].flatMap(e=>[e,e.toString()]);var q=Object(x.a)({as:"span",useHook:function(e){const{adjustLineHeightForInnerControls:t,align:n,children:r,className:l,color:c,ellipsizeMode:s,isDestructive:d=!1,display:u,highlightEscape:b=!1,highlightCaseSensitive:p=!1,highlightWords:h,highlightSanitize:g,isBlock:f=!1,letterSpacing:m,lineHeight:x,optimizeReadabilityFor:S,size:C,truncate:E=!1,upperCase:H=!1,variant:$,weight:R=N.fontWeight,...V}=Object(j.a)(e,"Text");let q=r;const G=Array.isArray(h),J="caption"===C;if(G){if("string"!=typeof r)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");q=function({activeClassName:e="",activeIndex:t=-1,activeStyle:n,autoEscape:i,caseSensitive:r=!1,children:o,findChunks:l,highlightClassName:c="",highlightStyle:s={},highlightTag:d="mark",sanitize:u,searchWords:b=[],unhighlightClassName:p="",unhighlightStyle:h}){if(!o)return null;if("string"!=typeof o)return o;const g=o,f=Object(D.findAll)({autoEscape:i,caseSensitive:r,findChunks:l,sanitize:u,searchWords:b,textToHighlight:g}),m=d;let x,O=-1,j="";return f.map((i,o)=>{const l=g.substr(i.start,i.end-i.start);if(i.highlight){let i;O++,i="object"==typeof c?r?c[l]:(c=A(c))[l.toLowerCase()]:c;const d=O===+t;j=`${i} ${d?e:""}`,x=!0===d&&null!==n?Object.assign({},s,n):s;const u={children:l,className:j,key:o,style:x};return"string"!=typeof m&&(u.highlightIndex=O),Object(a.createElement)(m,u)}return Object(a.createElement)("span",{children:l,className:p,key:o,style:h})})}({autoEscape:b,children:r,caseSensitive:p,searchWords:h,sanitize:g})}let K;!0===E&&(K="auto"),!1===E&&(K="none");const U=function(e){const{className:t,children:n,ellipsis:i=k,ellipsizeMode:r=w.auto,limit:l=0,numberOfLines:c=0,...s}=Object(j.a)(e,"Truncate"),d=function(e="",t){const n={...z,...t},{ellipsis:i,ellipsizeMode:r,limit:a}=n;if(r===w.none)return e;let l,c;switch(r){case w.head:l=0,c=a;break;case w.middle:l=Math.floor(a/2),c=Math.floor(a/2);break;default:l=a,c=0}return r!==w.auto?function(e,t,n,i){if("string"!=typeof e)return"";const r=e.length,a=~~t,l=~~n,c=Object(o.isNil)(i)?k:i;return 0===a&&0===l||a>=r||l>=r||a+l>=r?e:0===l?e.slice(0,a)+c:e.slice(0,a)+c+e.slice(r-l)}(e,l,c,i):e}("string"==typeof n?n:"",{ellipsis:i,ellipsizeMode:r,limit:l,numberOfLines:c}),u=r===w.auto;return{...s,className:Object(a.useMemo)(()=>{const e={};return e.numberOfLines=Object(O.a)("-webkit-box-orient:vertical;-webkit-line-clamp:",c,";display:-webkit-box;overflow:hidden;",""),Object(O.b)(u&&!c&&y,u&&!!c&&e.numberOfLines,t)},[t,c,u]),children:d}}({...V,className:Object(a.useMemo)(()=>{const e={},r=function(e,t){if(t)return t;if(!e)return;let n=`calc(${N.controlHeight} + ${Object(B.a)(2)})`;switch(e){case"large":n=`calc(${N.controlHeightLarge} + ${Object(B.a)(2)})`;break;case"small":n=`calc(${N.controlHeightSmall} + ${Object(B.a)(2)})`;break;case"xSmall":n=`calc(${N.controlHeightXSmall} + ${Object(B.a)(2)})`}return n}(t,x);if(e.Base=Object(O.a)({color:c,display:u,fontSize:X(C),fontWeight:R,lineHeight:r,letterSpacing:m,textAlign:n},"",""),e.upperCase=Object(O.a)({name:"50zrmy",styles:"text-transform:uppercase"}),e.optimalTextColor=null,S){const t="dark"==("#000000"===function(e){const t=_(e);return F.a.isReadable(t,"#000000")?"#000000":"#ffffff"}(S)?"dark":"light");e.optimalTextColor=t?Object(O.a)({color:L.a.black},"",""):Object(O.a)({color:L.a.white},"","")}return Object(O.b)(T,e.Base,e.optimalTextColor,d&&W,!!G&&M,f&&P,J&&I,$&&i[$],H&&e.upperCase,l)},[t,n,l,c,u,f,J,d,G,m,x,S,C,H,$,R]),children:r,ellipsizeMode:s||K});return!E&&Array.isArray(r)&&(q=a.Children.map(r,e=>Object(o.isPlainObject)(e)&&"props"in e&&Object(v.b)(e,["Link"])?Object(a.cloneElement)(e,{size:e.props.size||"inherit"}):e)),{...U,children:E?U.children:q}},name:"Text"}),G=n(1);const J=new RegExp(/-left/g),K=new RegExp(/-right/g),U=new RegExp(/Left/g),Q=new RegExp(/Right/g);function Y(e={},t){return()=>t?Object(G.isRTL)()?Object(g.a)(t,""):Object(g.a)(e,""):Object(G.isRTL)()?Object(g.a)(((e={})=>Object(o.mapKeys)(e,(e,t)=>function(e){return"left"===e?"right":"right"===e?"left":J.test(e)?e.replace(J,"-right"):K.test(e)?e.replace(K,"-left"):U.test(e)?e.replace(U,"Right"):Q.test(e)?e.replace(Q,"Left"):e}(t)))(e),""):Object(g.a)(e,"")}var Z={name:"1n8met0",styles:"padding-top:0"};const ee=()=>Z;var te={name:"1739oy8",styles:"z-index:1"};const ne=({isFocused:e})=>e?te:"";var ie={name:"2o6p8u",styles:"justify-content:space-between"},re={name:"14qk3ip",styles:"align-items:flex-start;flex-direction:column-reverse"},ae={name:"hbng6e",styles:"align-items:flex-start;flex-direction:column"};const oe=({labelPosition:e})=>{switch(e){case"top":return ae;case"bottom":return re;case"edge":return ie;default:return""}},le=Object(h.a)(f.a,{target:"e1cr7zh17"})("position:relative;border-radius:2px;",ee," ",ne," ",oe,";");var ce={name:"wyxldh",styles:"margin:0 !important"},se={name:"1d3w5wq",styles:"width:100%"};const de=Object(h.a)("div",{target:"e1cr7zh16"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",({disabled:e})=>{const t=e?L.a.ui.backgroundDisabled:L.a.ui.background;return Object(g.a)({backgroundColor:t},"","")}," ",({hideLabel:e})=>e?ce:null," ",({__unstableInputWidth:e,labelPosition:t})=>e?"side"===t?"":"edge"===t?Object(g.a)({flex:"0 0 "+e},"",""):Object(g.a)({width:e},"",""):se,";");var ue={name:"103r1kr",styles:"&::-webkit-input-placeholder{line-height:normal;}"};Object(h.a)("input",{target:"e1cr7zh15"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",L.a.black,";display:block;margin:0;outline:none;padding-left:8px;padding-right:8px;width:100%;",({isDragging:e,dragCursor:t})=>{let n="",i="";return e&&(n=Object(g.a)("cursor:",t,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),e&&t&&(i=Object(g.a)("&:active{cursor:",t,";}","")),Object(g.a)(n," ",i,";","")}," ",({disabled:e})=>e?Object(g.a)({color:L.a.ui.textDisabled},"",""):""," ",({size:e})=>{const t={default:"13px",small:"11px"}[e];return t?Object(g.a)("font-size:","16px",";@media ( min-width: 600px ){font-size:",t,";}",""):""}," ",({size:e})=>{const t={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},n=t[e]||t.default;return Object(g.a)(n,"","")}," ",()=>ue,";}");var be={name:"1h52dri",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};const pe=()=>be,he=({labelPosition:e})=>{let t=4;return"edge"!==e&&"side"!==e||(t=0),Object(g.a)({paddingTop:0,paddingBottom:t},"","")},ge=Object(h.a)(q,{target:"e1cr7zh14"})("&&&{box-sizing:border-box;color:currentColor;display:block;margin:0;max-width:100%;z-index:1;",he," ",pe,";}"),fe=e=>Object(a.createElement)(ge,Object(r.a)({},e,{as:"label"})),me=Object(h.a)(m.a,{target:"e1cr7zh13"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),xe=Object(h.a)("div",{target:"e1cr7zh12"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",({disabled:e,isFocused:t})=>{let n=t?L.a.ui.borderFocus:L.a.ui.border,i=null;return t&&(i=`0 0 0 1px ${L.a.ui.borderFocus} inset`),e&&(n=L.a.ui.borderDisabled),Object(g.a)({boxShadow:i,borderColor:n,borderStyle:"solid",borderWidth:1},"","")}," ",Y({paddingLeft:2}),";}"),Oe=Object(h.a)("span",{target:"e1cr7zh11"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),je=Object(h.a)("span",{target:"e1cr7zh10"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"});var ve=Object(a.memo)((function({disabled:e=!1,isFocused:t=!1}){return Object(a.createElement)(xe,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:e,isFocused:t})})),ye=n(47);function ke({children:e,hideLabelFromVision:t,htmlFor:n,...i}){return e?t?Object(a.createElement)(ye.a,{as:"label",htmlFor:n},e):Object(a.createElement)(fe,Object(r.a)({htmlFor:n},i),e):null}var we=Object(a.forwardRef)((function e({__unstableInputWidth:t,children:n,className:i,disabled:o=!1,hideLabelFromVision:l=!1,labelPosition:c,id:d,isFocused:u=!1,label:b,prefix:p,size:h="default",suffix:g,...f},m){const x=function(t){const n=Object(s.useInstanceId)(e);return t||"input-base-control-"+n}(d),O=l||!b;return Object(a.createElement)(le,Object(r.a)({},f,function({labelPosition:e}){const t={};switch(e){case"top":t.direction="column",t.gap=0;break;case"bottom":t.direction="column-reverse",t.gap=0;break;case"edge":t.justify="space-between"}return t}({labelPosition:c}),{className:i,isFocused:u,labelPosition:c,ref:m,__unstableVersion:"next"}),Object(a.createElement)(me,null,Object(a.createElement)(ke,{className:"components-input-control__label",hideLabelFromVision:l,labelPosition:c,htmlFor:x,size:h},b)),Object(a.createElement)(de,{__unstableInputWidth:t,className:"components-input-control__container",disabled:o,hideLabel:O,isFocused:u,labelPosition:c},p&&Object(a.createElement)(Oe,{className:"components-input-control__prefix"},p),n,g&&Object(a.createElement)(je,{className:"components-input-control__suffix"},g),Object(a.createElement)(ve,{"aria-hidden":"true",disabled:o,isFocused:u,label:b,size:h})))}));const ze=Object(h.a)("select",{target:"e12x0a391"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",L.a.black,";display:block;margin:0;width:100%;",({disabled:e})=>e?Object(g.a)({color:L.a.ui.textDisabled},"",""):"",";",({size:e})=>{const t={default:"13px",small:"11px"}[e];return t?Object(g.a)("font-size:","16px",";@media ( min-width: 600px ){font-size:",t,";}",""):""},";",({size:e})=>{const t={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},n=t[e]||t.default;return Object(g.a)(n,"","")},";",Y({paddingLeft:8,paddingRight:24})(),";}"),Se=Object(h.a)("div",{target:"e12x0a390"})("align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;top:0;",Y({right:0})()," svg{display:block;}");const Ce=Object(a.forwardRef)((function e({className:t,disabled:n=!1,help:i,hideLabelFromVision:l,id:u,label:h,multiple:g=!1,onBlur:f=o.noop,onChange:m=o.noop,onFocus:x=o.noop,options:O=[],size:j="default",value:v,labelPosition:y="top",...k},w){const[z,S]=Object(a.useState)(!1),C=function(t){const n=Object(s.useInstanceId)(e);return t||"inspector-select-control-"+n}(u),E=i?C+"__help":void 0;if(Object(o.isEmpty)(O))return null;const F=c()("components-select-control",t);return Object(a.createElement)(p.a,{help:i},Object(a.createElement)(we,Object(r.a)({className:F,disabled:n,hideLabelFromVision:l,id:C,isFocused:z,label:h,size:j,suffix:Object(a.createElement)(Se,null,Object(a.createElement)(d,{icon:b,size:18})),labelPosition:y},k),Object(a.createElement)(ze,Object(r.a)({},k,{"aria-describedby":E,className:"components-select-control__input",disabled:n,id:C,multiple:g,onBlur:e=>{f(e),S(!1)},onChange:e=>{if(g){const t=[...e.target.options].filter(({selected:e})=>e).map(({value:e})=>e);m(t)}else m(e.target.value,{event:e})},onFocus:e=>{x(e),S(!0)},ref:w,size:j,value:v}),O.map((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return Object(a.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)}))))}));t.a=Ce}}]); \ No newline at end of file diff --git a/build/vendors--atomic-block-components/price--cart-blocks/line-items--cart-blocks/order-summary--checkout--8a3571de-frontend.js b/build/vendors--atomic-block-components/price--cart-blocks/line-items--cart-blocks/order-summary--checkout--8a3571de-frontend.js new file mode 100644 index 00000000000..9bdb09e0f72 --- /dev/null +++ b/build/vendors--atomic-block-components/price--cart-blocks/line-items--cart-blocks/order-summary--checkout--8a3571de-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[1],{131:function(e,t,r){"use strict";var n=r(3),a=r.n(n);function o(e,t){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],r="-"===e[0],n=r&&t,a=(e=e.replace("-","")).split("."),o=a[0],i=a[1]||"";return{beforeDecimal:o,afterDecimal:i,hasNagation:r,addNegation:n}}function y(e,t,r){for(var n="",a=r?"0":"",o=0;o<=t-1;o++)n+=e[o]||a;return n}function S(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var r=e.createTextRange();return r.move("character",t),r.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}function b(e,t,r){return Math.min(Math.max(e,t),r)}function x(e){return Math.max(e.selectionStart,e.selectionEnd)}var w={thousandSeparator:p.oneOfType([p.string,p.oneOf([!0])]),decimalSeparator:p.string,allowedDecimalSeparators:p.arrayOf(p.string),thousandsGroupStyle:p.oneOf(["thousand","lakh","wan"]),decimalScale:p.number,fixedDecimalScale:p.bool,displayType:p.oneOf(["input","text"]),prefix:p.string,suffix:p.string,format:p.oneOfType([p.string,p.func]),removeFormatting:p.func,mask:p.oneOfType([p.string,p.arrayOf(p.string)]),value:p.oneOfType([p.number,p.string]),defaultValue:p.oneOfType([p.number,p.string]),isNumericString:p.bool,customInput:p.elementType,allowNegative:p.bool,allowEmptyFormatting:p.bool,allowLeadingZeros:p.bool,onValueChange:p.func,onKeyDown:p.func,onMouseUp:p.func,onChange:p.func,onFocus:p.func,onBlur:p.func,type:p.oneOf(["text","tel","password"]),isAllowed:p.func,renderText:p.func,getInputRef:p.oneOfType([p.func,p.shape({current:p.any})])},k={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:h,onChange:h,onKeyDown:h,onMouseUp:h,onFocus:h,onBlur:h,isAllowed:function(){return!0}},O=function(e){function t(e){var r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=!(n=s(t).call(this,e))||"object"!=typeof n&&"function"!=typeof n?l(this):n;var a=e.defaultValue;r.validateProps();var o=r.formatValueProp(a);return r.state={value:o,numAsString:r.removeFormatting(o)},r.selectionBeforeInput={selectionStart:0,selectionEnd:0},r.onChange=r.onChange.bind(l(r)),r.onKeyDown=r.onKeyDown.bind(l(r)),r.onMouseUp=r.onMouseUp.bind(l(r)),r.onFocus=r.onFocus.bind(l(r)),r.onBlur=r.onBlur.bind(l(r)),r}var r,n;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),r=t,(n=[{key:"componentDidUpdate",value:function(e){this.updateValueIfRequired(e)}},{key:"componentWillUnmount",value:function(){clearTimeout(this.focusTimeout)}},{key:"updateValueIfRequired",value:function(e){var t=this.props,r=this.state,n=this.focusedElm,a=r.value,o=r.numAsString,i=void 0===o?"":o;if(e!==t){this.validateProps();var s=this.formatNumString(i),u=m(t.value)?s:this.formatValueProp(),l=this.removeFormatting(u),c=parseFloat(l),f=parseFloat(i);(isNaN(c)&&isNaN(f)||c===f)&&s===a&&(null!==n||u===a)||this.updateValue({formattedValue:u,numAsString:l,input:n})}}},{key:"getFloatString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.decimalScale,r=this.getSeparators(),n=r.decimalSeparator,a=this.getNumberRegex(!0),o="-"===e[0];o&&(e=e.replace("-","")),n&&0===t&&(e=e.split(n)[0]);var i=(e=(e.match(a)||[]).join("").replace(n,".")).indexOf(".");return-1!==i&&(e="".concat(e.substring(0,i),".").concat(e.substring(i+1,e.length).replace(new RegExp(d(n),"g"),""))),o&&(e="-"+e),e}},{key:"getNumberRegex",value:function(e,t){var r=this.props,n=r.format,a=r.decimalScale,o=this.getSeparators().decimalSeparator;return new RegExp("\\d"+(!o||0===a||t||n?"":"|"+d(o)),e?"g":void 0)}},{key:"getSeparators",value:function(){var e=this.props.decimalSeparator,t=this.props,r=t.thousandSeparator,n=t.allowedDecimalSeparators;return!0===r&&(r=","),n||(n=[e,"."]),{decimalSeparator:e,thousandSeparator:r,allowedDecimalSeparators:n}}},{key:"getMaskAtIndex",value:function(e){var t=this.props.mask,r=void 0===t?" ":t;return"string"==typeof r?r:r[e]||" "}},{key:"getValueObject",value:function(e,t){var r=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(r)?void 0:r}}},{key:"validateProps",value:function(){var e=this.props.mask,t=this.getSeparators(),r=t.decimalSeparator,n=t.thousandSeparator;if(r===n)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(n,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(r," (default value for decimalSeparator is .)\n "));if(e&&("string"===e?e:e.toString()).match(/\d/g))throw new Error("\n Mask ".concat(e," should not contain numeric character;\n "))}},{key:"setPatchedCaretPosition",value:function(e,t,r){S(e,t),setTimeout((function(){e.value===r&&S(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,r){var n=this.props,a=n.prefix,o=n.suffix,i=n.format;if(""===e)return 0;if(t=b(t,0,e.length),!i){var s="-"===e[0];return b(t,a.length+(s?1:0),e.length-o.length)}if("function"==typeof i)return t;if("#"===i[t]&&g(e[t]))return t;if("#"===i[t-1]&&g(e[t-1]))return t;var u=i.indexOf("#");t=b(t,u,i.lastIndexOf("#")+1);for(var l=i.substring(t,i.length).indexOf("#"),c=t,f=t+(-1===l?0:l);c>u&&("#"!==i[c]||!g(e[c]));)c-=1;return!g(e[f])||"left"===r&&t!==u||t-c0&&void 0!==arguments[0]?arguments[0]:"",t=this.props,r=t.format,n=t.allowEmptyFormatting,a=e;return""!==e||n?"-"!==e||r?"string"==typeof r?this.formatWithPattern(a):"function"==typeof r?r(a):this.formatAsNumber(a):"-":""}},{key:"formatValueProp",value:function(e){var t=this.props,r=t.format,n=t.decimalScale,a=t.fixedDecimalScale,o=t.allowEmptyFormatting,i=this.props,s=i.value,u=i.isNumericString,l=!(s=m(s)?e:s)&&0!==s;return l&&o&&(s=""),l&&!o?"":("number"==typeof s&&(s=s.toString(),u=!0),"Infinity"===s&&u&&(s=""),u&&!r&&"number"==typeof n&&(s=function(e,t,r){if(-1!==["","-"].indexOf(e))return e;var n=-1!==e.indexOf(".")&&t,a=v(e),o=a.beforeDecimal,i=a.afterDecimal,s=a.hasNagation,u=parseFloat("0.".concat(i||"0")).toFixed(t).split("."),l=o.split("").reverse().reduce((function(e,t,r){return e.length>r?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e}),u[0]),c=y(u[1]||"",Math.min(t,i.length),r),f=n?".":"";return"".concat(s?"-":"").concat(l).concat(f).concat(c)}(s,n,a)),u?this.formatNumString(s):this.formatInput(s))}},{key:"formatNegation",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.allowNegative,r=new RegExp("(-)"),n=new RegExp("(-)(.)*(-)"),a=r.test(e),o=n.test(e);return e=e.replace(/-/g,""),a&&!o&&t&&(e="-"+e),e}},{key:"formatInput",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.props.format;return t||(e=this.removePrefixAndSuffix(e),e=this.formatNegation(e)),e=this.removeFormatting(e),this.formatNumString(e)}},{key:"isCharacterAFormat",value:function(e,t){var r=this.props,n=r.format,a=r.prefix,o=r.suffix,i=r.decimalScale,s=r.fixedDecimalScale,u=this.getSeparators().decimalSeparator;return"string"==typeof n&&"#"!==n[e]||!(n||!(e=t.length-o.length||i&&s&&t[e]===u))}},{key:"checkIfFormatGotDeleted",value:function(e,t,r){for(var n=e;nr&&a-n>r;)n++;return{start:r,end:a-n}}(t,r),y=d.start,S=d.end;if(!a&&y===S&&-1!==c.indexOf(r[g])){var b=0===u?"":f;return r.substr(0,g)+b+r.substr(g+1,r.length)}var x=a?0:i.length,w=t.length-(a?0:s.length);if(r.length>t.length||!r.length||y===S||0===g&&m===t.length||g===x&&m===w)return r;if(this.checkIfFormatGotDeleted(y,S,t)&&(r=t),!a){var k=this.removeFormatting(r),O=v(k,o),P=O.beforeDecimal,F=O.afterDecimal,N=O.addNegation,C=eb;)S--;S=this.correctCaretPosition(s,S,"left")}}else for(;!d.test(s[S])&&Sx)&&(e.preventDefault(),this.setPatchedCaretPosition(r,S,s)),e.isUnitTestRun&&this.setPatchedCaretPosition(r,S,s),g(e)}else g(e)}},{key:"onMouseUp",value:function(e){var t=e.target,r=t.selectionStart,n=t.selectionEnd,a=t.value,o=void 0===a?"":a;if(r===n){var i=this.correctCaretPosition(o,r);i!==r&&this.setPatchedCaretPosition(t,i,o)}this.props.onMouseUp(e)}},{key:"onFocus",value:function(e){var t=this;e.persist(),this.focusedElm=e.target,this.focusTimeout=setTimeout((function(){var r=e.target,n=r.selectionStart,a=r.selectionEnd,o=r.value,i=void 0===o?"":o,s=t.correctCaretPosition(i,n);s===n||0===n&&a===i.length||t.setPatchedCaretPosition(r,s,i),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,r,n=this.props,o=n.type,s=n.displayType,u=n.customInput,l=n.renderText,c=n.getInputRef,f=n.format,p=this.state.value,h=(e=this.props,t=w,r={},Object.keys(e).forEach((function(n){t[n]||(r[n]=e[n])})),r),g=i({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(f)?"numeric":void 0},h,{type:o,value:p,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===s)return l?l(p)||null:a.a.createElement("span",i({},h,{ref:c}),p);if(u){var m=u;return a.a.createElement(m,i({},g,{ref:c}))}return a.a.createElement("input",i({},g,{ref:c}))}}])&&o(r.prototype,n),t}(a.a.Component);O.propTypes=w,O.defaultProps=k,t.a=O}}]); \ No newline at end of file diff --git a/build/vendors--cart-blocks/line-items--checkout-blocks/order-summary-frontend.js b/build/vendors--cart-blocks/line-items--checkout-blocks/order-summary-frontend.js new file mode 100644 index 00000000000..f2e86bedad1 --- /dev/null +++ b/build/vendors--cart-blocks/line-items--checkout-blocks/order-summary-frontend.js @@ -0,0 +1 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[4],{295:function(t,n,r){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if("string"==typeof t)return i(t,void 0);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,void 0):void 0}}(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 i(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r1&&void 0!==arguments[1]?arguments[1]:{};for(var r in n)t.setRequestHeader(r,n[r]);return t}function h(t){return void 0===t}function d(){var t={HALF_ODD:function(t){var n=Math.round(t);return l(t)&&c(n)?n-1:n},HALF_EVEN:function(t){var n=Math.round(t);return l(t)?c(n)?n:n-1:n},HALF_UP:function(t){return Math.round(t)},HALF_DOWN:function(t){return l(t)?Math.floor(t):Math.round(t)},HALF_TOWARDS_ZERO:function(t){return l(t)?Math.sign(t)*Math.floor(Math.abs(t)):Math.round(t)},HALF_AWAY_FROM_ZERO:function(t){return l(t)?Math.sign(t)*Math.ceil(Math.abs(t)):Math.round(t)},DOWN:function(t){return Math.floor(t)}};return{add:function(t,n){return t+n},subtract:function(t,n){return t-n},multiply:function(t,n){return s(t)||s(n)?function(t,n){var r=function(t){return Math.pow(10,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=t.toString();if(n.indexOf("e-")>0)return parseInt(n.split("e-")[1]);var r=n.split(".")[1];return r?r.length:0}(t))},e=Math.max(r(t),r(n));return Math.round(t*e)*Math.round(n*e)/(e*e)}(t,n):t*n},divide:function(t,n){return t/n},modulo:function(t,n){return t%n},round:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HALF_EVEN";return t[r](n)}}}var g=d();function m(t){var n=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(t);return{getMatches:function(){return null!==n?n.slice(1).filter((function(t){return!h(t)})):[]},getMinimumFractionDigits:function(){var t=function(t){return"."===t};return h(this.getMatches().find(t))?0:this.getMatches()[g.add(this.getMatches().findIndex(t),1)].split("").length},getCurrencyDisplay:function(){return{USD:"code",dollar:"name",$:"symbol"}[this.getMatches().find((function(t){return"USD"===t||"dollar"===t||"$"===t}))]},getStyle:function(){return h(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!h(this.getMatches().find((function(t){return","===t})))}}}function v(t){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;for(var r in n)t=t.replace("{{".concat(r,"}}"),n[r]);return t};return{getExchangeRate:function(r,o){return(i=t.endpoint,!Boolean(i)||"object"!==e(i)&&"function"!=typeof i||"function"!=typeof i.then?function(r,e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(r,e){var o=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){4===o.readyState&&(o.status>=200&&o.status<400?r(JSON.parse(o.responseText)):e(new Error(o.statusText)))},onerror:function(){e(new Error("Network error"))}});o.open("GET",t,!0),f(o,n.headers),o.send()}))}(n(t.endpoint,{from:r,to:e}),{headers:t.headers})}(r,o):t.endpoint).then((function(i){return function t(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",o={};return Object.entries(n).forEach((function(n){if("object"===e(n[1])){var i=t(n[1]);Object.entries(i).forEach((function(t){o[n[0]+r+t[0]]=t[1]}))}else o[n[0]]=n[1]})),o}(i)[n(t.propertyPath,{from:r,to:o})]}));var i}}}function p(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!t)throw new r(n)}function y(t){p(function(t){return a(t)&&t<=100&&t>=0}(t),"You must provide a numeric value between 0 and 100.",RangeError)}function b(t){p(Number.isInteger(t),"You must provide an integer.",TypeError)}var A=d(),M=Object.assign((function t(n){var r=Object.assign({},{amount:t.defaultAmount,currency:t.defaultCurrency,precision:t.defaultPrecision},n),e=r.amount,o=r.currency,i=r.precision;b(e),b(i);var u=t.globalLocale,a=t.globalFormat,c=t.globalRoundingMode,s=t.globalFormatRoundingMode,l=Object.assign({},t.globalExchangeRatesApi),f=function(n){var r=Object.assign({},Object.assign({},{amount:e,currency:o,precision:i},n),Object.assign({},{locale:this.locale},n));return Object.assign(t({amount:r.amount,currency:r.currency,precision:r.precision}),{locale:r.locale})},d=function(t){p(this.hasSameCurrency(t),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return e},getCurrency:function(){return o},getLocale:function(){return this.locale||u},setLocale:function(t){return f.call(this,{locale:t})},getPrecision:function(){return i},convertPrecision:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s;b(t);var r=this.getPrecision(),e=t>r,o=e?A.multiply:A.divide,i=e?[t,r]:[r,t],u=Math.pow(10,A.subtract.apply(A,i));return f.call(this,{amount:A.round(o(this.getAmount(),u),n),precision:t})},add:function(n){d.call(this,n);var r=t.normalizePrecision([this,n]);return f.call(this,{amount:A.add(r[0].getAmount(),r[1].getAmount()),precision:r[0].getPrecision()})},subtract:function(n){d.call(this,n);var r=t.normalizePrecision([this,n]);return f.call(this,{amount:A.subtract(r[0].getAmount(),r[1].getAmount()),precision:r[0].getPrecision()})},multiply:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return f.call(this,{amount:A.round(A.multiply(this.getAmount(),t),n)})},divide:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return f.call(this,{amount:A.round(A.divide(this.getAmount(),t),n)})},percentage:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return y(t),this.multiply(A.divide(t,100),n)},allocate:function(t){var n=this;!function(t){p(function(t){return t.length>0&&t.every((function(t){return t>=0}))&&t.some((function(t){return t>0}))}(t),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}(t);for(var r=t.reduce((function(t,n){return A.add(t,n)})),e=this.getAmount(),o=t.map((function(t){var o=Math.floor(A.divide(A.multiply(n.getAmount(),t),r));return e=A.subtract(e,o),f.call(n,{amount:o})})),i=0;e>0;)t[i]>0&&(o[i]=o[i].add(f.call(this,{amount:1})),e=A.subtract(e,1)),i+=1;return o},convert:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=r.endpoint,o=void 0===e?l.endpoint:e,i=r.propertyPath,u=void 0===i?l.propertyPath||"rates.{{to}}":i,a=r.headers,s=void 0===a?l.headers:a,d=r.roundingMode,g=void 0===d?c:d,m=Object.assign({},{endpoint:o,propertyPath:u,headers:s,roundingMode:g});return v(m).getExchangeRate(this.getCurrency(),t).then((function(r){return p(!h(r),'No rate was found for the destination currency "'.concat(t,'".'),TypeError),f.call(n,{amount:A.round(A.multiply(n.getAmount(),parseFloat(r)),m.roundingMode),currency:t})}))},equalsTo:function(t){return this.hasSameAmount(t)&&this.hasSameCurrency(t)},lessThan:function(n){d.call(this,n);var r=t.normalizePrecision([this,n]);return r[0].getAmount()r[1].getAmount()},greaterThanOrEqual:function(n){d.call(this,n);var r=t.normalizePrecision([this,n]);return r[0].getAmount()>=r[1].getAmount()},isZero:function(){return 0===this.getAmount()},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return 0!==A.modulo(this.getAmount(),Math.pow(10,i))},hasCents:function(){return 0!==A.modulo(this.getAmount(),Math.pow(10,i))},hasSameCurrency:function(t){return this.getCurrency()===t.getCurrency()},hasSameAmount:function(n){var r=t.normalizePrecision([this,n]);return r[0].getAmount()===r[1].getAmount()},toFormat:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,r=m(t);return this.toRoundedUnit(r.getMinimumFractionDigits(),n).toLocaleString(this.getLocale(),{currencyDisplay:r.getCurrencyDisplay(),useGrouping:r.getUseGrouping(),minimumFractionDigits:r.getMinimumFractionDigits(),style:r.getStyle(),currency:this.getCurrency()})},toUnit:function(){return A.divide(this.getAmount(),Math.pow(10,i))},toRoundedUnit:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s,r=Math.pow(10,t);return A.divide(A.round(A.multiply(this.toUnit(),r),n),r)},toObject:function(){return{amount:e,currency:o,precision:i}},toJSON:function(){return this.toObject()}}}),{defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},{globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}},u);n.a=M}}]); \ No newline at end of file diff --git a/build/vendors--cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/order-summary---eb4d2cec-frontend.js b/build/vendors--cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/order-summary---eb4d2cec-frontend.js new file mode 100644 index 00000000000..dc4bc3d07eb --- /dev/null +++ b/build/vendors--cart-blocks/order-summary--checkout-blocks/billing-address--checkout-blocks/order-summary---eb4d2cec-frontend.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[2],{338:function(e,t,o){"use strict";e.exports=o(339)},339:function(e,t,o){"use strict";var n=o(340);e.exports=function(e,t,o){o=o||{},9===t.nodeType&&(t=n.getWindow(t));var s=o.allowHorizontalScroll,r=o.onlyScrollIfNeeded,i=o.alignWithTop,l=o.alignWithLeft,c=o.offsetTop||0,a=o.offsetLeft||0,u=o.offsetBottom||0,d=o.offsetRight||0;s=void 0===s||s;var p=n.isWindow(t),f=n.offset(e),h=n.outerHeight(e),m=n.outerWidth(e),b=void 0,v=void 0,g=void 0,w=void 0,O=void 0,y=void 0,j=void 0,x=void 0,L=void 0,k=void 0;p?(j=t,k=n.height(j),L=n.width(j),x={left:n.scrollLeft(j),top:n.scrollTop(j)},O={left:f.left-x.left-a,top:f.top-x.top-c},y={left:f.left+m-(x.left+L)+d,top:f.top+h-(x.top+k)+u},w=x):(b=n.offset(t),v=t.clientHeight,g=t.clientWidth,w={left:t.scrollLeft,top:t.scrollTop},O={left:f.left-(b.left+(parseFloat(n.css(t,"borderLeftWidth"))||0))-a,top:f.top-(b.top+(parseFloat(n.css(t,"borderTopWidth"))||0))-c},y={left:f.left+m-(b.left+g+(parseFloat(n.css(t,"borderRightWidth"))||0))+d,top:f.top+h-(b.top+v+(parseFloat(n.css(t,"borderBottomWidth"))||0))+u}),O.top<0||y.top>0?!0===i?n.scrollTop(t,w.top+O.top):!1===i?n.scrollTop(t,w.top+y.top):O.top<0?n.scrollTop(t,w.top+O.top):n.scrollTop(t,w.top+y.top):r||((i=void 0===i||!!i)?n.scrollTop(t,w.top+O.top):n.scrollTop(t,w.top+y.top)),s&&(O.left<0||y.left>0?!0===l?n.scrollLeft(t,w.left+O.left):!1===l?n.scrollLeft(t,w.left+y.left):O.left<0?n.scrollLeft(t,w.left+O.left):n.scrollLeft(t,w.left+y.left):r||((l=void 0===l||!!l)?n.scrollLeft(t,w.left+O.left):n.scrollLeft(t,w.left+y.left)))}},340:function(e,t,o){"use strict";var n=Object.assign||function(e){for(var t=1;t-1&&this.props.scrollIntoView&&this.list.children[this.props.selectedIndex]&&(this.scrollingIntoView=!0,v()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout(()=>{this.scrollingIntoView=!1},100))}bindList(e){this.list=e}handleHover(e){return()=>{this.scrollingIntoView||this.props.onHover(e)}}handleClick(e){return()=>{this.props.onSelect(e)}}handleMouseDown(e){e.preventDefault()}computeSuggestionMatch(e){const t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;const o=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,o),suggestionMatch:e.substring(o,o+t.length),suggestionAfterMatch:e.substring(o+t.length)}}render(){return Object(n.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:"components-form-token-suggestions-"+this.props.instanceId,role:"listbox"},Object(i.map)(this.props.suggestions,(e,t)=>{const o=this.computeSuggestionMatch(e),s=r()("components-form-token-field__suggestion",{"is-selected":t===this.props.selectedIndex});return Object(n.createElement)("li",{id:`components-form-token-suggestions-${this.props.instanceId}-${t}`,role:"option",className:s,key:null!=e&&e.value?e.value:this.props.displayTransform(e),onMouseDown:this.handleMouseDown,onClick:this.handleClick(e),onMouseEnter:this.handleHover(e),"aria-selected":t===this.props.selectedIndex},o?Object(n.createElement)("span",{"aria-label":this.props.displayTransform(e)},o.suggestionBeforeMatch,Object(n.createElement)("strong",{className:"components-form-token-field__suggestion-match"},o.suggestionMatch),o.suggestionAfterMatch):this.props.displayTransform(e))}))}}g.defaultProps={match:"",onHover:()=>{},onSelect:()=>{},suggestions:Object.freeze([])};var w=Object(c.withSafeTimeout)(g),O=o(306),y=o(56),j=o(397),x=o(373),L=o(370),k=o(330),E=Object(x.a)({as:"div",useHook:function(e){const t=Object(L.a)(e,"FlexBlock");return Object(k.a)({isBlock:!0,...t})},name:"FlexBlock"}),S=o(374);const T=Object(c.createHigherOrderComponent)(e=>t=>{const[o,s]=Object(n.useState)(),r=Object(n.useCallback)(e=>s(()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0),[]);return Object(n.createElement)("div",Object(c.__experimentalUseFocusOutside)(o),Object(n.createElement)(e,Object(f.a)({ref:r},t)))},"withFocusOutside")(class extends n.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}});t.a=function e({value:t,label:o,options:s,onChange:d,onFilterValueChange:f=i.noop,hideLabelFromVision:h,help:b,allowReset:v=!0,className:g,messages:x={selected:Object(l.__)("Item selected.")}}){var L;const k=Object(c.useInstanceId)(e),[C,I]=Object(n.useState)(null),[W,_]=Object(n.useState)(!1),[F,M]=Object(n.useState)(!1),[N,D]=Object(n.useState)(""),H=Object(n.useRef)(),B=s.find(e=>e.value===t),P=null!==(L=null==B?void 0:B.label)&&void 0!==L?L:"",V=Object(n.useMemo)(()=>{const e=[],t=[],o=Object(i.deburr)(N.toLocaleLowerCase());return s.forEach(n=>{const s=Object(i.deburr)(n.label).toLocaleLowerCase().indexOf(o);0===s?e.push(n):s>0&&t.push(n)}),e.concat(t)},[N,s,t]),R=e=>{d(e.value),Object(u.speak)(x.selected,"assertive"),I(e),D(""),_(!1)},$=(e=1)=>{let t=V.indexOf(C)+e;t<0?t=V.length-1:t>=V.length&&(t=0),I(V[t]),_(!0)};return Object(n.useEffect)(()=>{const e=V.length>0;if(W){const t=e?Object(l.sprintf)( +/* translators: %d: number of results. */ +Object(l._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",V.length),V.length):Object(l.__)("No results.");Object(u.speak)(t,"polite")}},[V,W]),Object(n.createElement)(T,{onFocusOutside:()=>{_(!1)}},Object(n.createElement)(O.a,{className:r()(g,"components-combobox-control"),tabIndex:"-1",label:o,id:"components-form-token-input-"+k,hideLabelFromVision:h,help:b},Object(n.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:"-1",onKeyDown:e=>{let t=!1;switch(e.keyCode){case a.ENTER:C&&(R(C),t=!0);break;case a.UP:$(-1),t=!0;break;case a.DOWN:$(1),t=!0;break;case a.ESCAPE:_(!1),I(null),t=!0,e.stopPropagation()}t&&e.preventDefault()}},Object(n.createElement)(j.a,null,Object(n.createElement)(E,null,Object(n.createElement)(m,{className:"components-combobox-control__input",instanceId:k,ref:H,value:W?N:P,"aria-label":P?`${P}, ${o}`:null,onFocus:()=>{M(!0),_(!0),f(""),D("")},onBlur:()=>{M(!1)},isExpanded:W,selectedSuggestionIndex:V.indexOf(C),onChange:e=>{const t=e.value;D(t),f(t),F&&_(!0)}})),v&&Object(n.createElement)(S.a,null,Object(n.createElement)(y.a,{className:"components-combobox-control__reset",icon:p,disabled:!t,onClick:()=>{d(null),H.current.input.focus()},label:Object(l.__)("Reset")}))),W&&Object(n.createElement)(w,{instanceId:k,match:{label:N},displayTransform:e=>e.label,suggestions:V,selectedIndex:V.indexOf(C),onHover:I,onSelect:R,scrollIntoView:!0}))))}}}]); \ No newline at end of file diff --git a/build/wc-blocks-data.asset.php b/build/wc-blocks-data.asset.php new file mode 100644 index 00000000000..d4bbca143b6 --- /dev/null +++ b/build/wc-blocks-data.asset.php @@ -0,0 +1 @@ + array('lodash', 'wc-settings', 'wp-api-fetch', 'wp-data', 'wp-data-controls', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-url'), 'version' => 'b31374ab18608ff3c37bd9450f6e9039'); \ No newline at end of file diff --git a/build/wc-blocks-data.js b/build/wc-blocks-data.js new file mode 100644 index 00000000000..b63e1562ffb --- /dev/null +++ b/build/wc-blocks-data.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksData=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=136)}({1:function(e,t){e.exports=window.wp.i18n},11:function(e,t){e.exports=window.wp.apiFetch},12:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));var r=n(1);const o="wc/store/cart",a={code:"cart_api_error",message:Object(r.__)("Unable to get cart data from the API.","woo-gutenberg-products-block"),data:{status:500}}},122:function(e,t){e.exports=window.wp.notices},123:function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,o=Function.prototype.apply;function a(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new a(o.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new a(o.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(124),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(25))},124:function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,o,a,i,c,s=1,u={},l=!1,d=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(i="setImmediate$"+Math.random()+"$",c=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(i)&&p(+t.data.slice(i.length))},e.addEventListener?e.addEventListener("message",c,!1):e.attachEvent("onmessage",c),r=function(t){e.postMessage(i+t,"*")}):e.MessageChannel?((a=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){a.port2.postMessage(e)}):d&&"onreadystatechange"in d.createElement("script")?(o=d.documentElement,r=function(e){var t=d.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,o.removeChild(t),t=null},o.appendChild(t)}):r=function(e){setTimeout(p,0,e)},f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;nfunction(t,n,r){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const a=e(m).hasFinishedResolution("getRoutes",[n]);let i="";if((t=t.routes)[n]?t[n][r]||(i=Object(g.sprintf)("There is no route for the given resource name (%s) in the store",r)):i=Object(g.sprintf)("There is no route for the given namespace (%s) in the store",n),""!==i){if(a)throw new Error(i);return""}const c=v(t[n][r],o);if(""===c&&a)throw new Error(Object(g.sprintf)("While there is a route for the given namespace (%1$s) and resource name (%2$s), there is no route utilizing the number of ids you included in the select arguments. The available routes are: (%3$s)",n,r,JSON.stringify(t[n][r])));return c}),_=Object(p.createRegistrySelector)(e=>(t,n)=>{const r=e(m).hasFinishedResolution("getRoutes",[n]),o=t.routes[n];if(!o){if(r)throw new Error(Object(g.sprintf)("There is no route for the given namespace (%s) in the store",n));return[]}let a=[];for(const e in o)a=[...a,...Object.keys(o[e])];return a}),v=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=(e=Object.entries(e)).find(e=>{let[,n]=e;return t.length===n.length}),[r,o]=n||[];return r?0===t.length?r:T(r,o,t):""},T=(e,t,n)=>(t.forEach((t,r)=>{e=e.replace(`{${t}}`,n[r])}),e),b="wc/blocks",w=[],C=[],R=[],O=[],I=[],S=[],A=[],D={},P=[];function N(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:b;return{type:"RECEIVE_MODEL_ROUTES",routes:e,namespace:t}}function*M(e){yield Object(y.select)(m,"getRoutes",e)}function*k(e){const t=yield Object(y.apiFetch)({path:e}),n=t&&t.routes?Object.keys(t.routes):[];yield N(n,e)}const j=(e,t)=>(t=t.replace(e+"/","")).replace(/\/\(\?P\<[a-z_]*\>\[\\*[a-z]\]\+\)/g,""),L=e=>{const t=e.match(/\<[a-z_]*\>/g);return Array.isArray(t)&&0!==t.length?t.map(e=>e.replace(/<|>/g,"")):[]},x=(e,t)=>Array.isArray(t)&&0!==t.length?(t.forEach(t=>{const n=`\\(\\?P<${t}>.*?\\)`;e=e.replace(new RegExp(n),`{${t}}`)}),e):e;var F=n(3);function V(e,t){return Object(F.has)(e,t)}function U(e,t,n){return Object(F.setWith)(Object(F.clone)(e),t,n,F.clone)}var G=Object(p.combineReducers)({routes:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{type:n,routes:r,namespace:o}=t;return"RECEIVE_MODEL_ROUTES"===n&&r.forEach(t=>{const n=j(o,t);if(n&&n!==o){const r=L(t),a=x(t,r);V(e,[o,n,a])||(e=U(e,[o,n,a],r))}}),e}});Object(p.registerStore)(m,{reducer:G,actions:o,controls:y.controls,selectors:r,resolvers:a});const Y=m,K=[];var Q=n(19);const H=e=>{let{state:t,namespace:n,resourceName:r,query:o,ids:a,type:i="items",fallback:c=K}=e;return a=JSON.stringify(a),o=null!==o?Object(Q.addQueryArgs)("",o):"",V(t,[n,r,a,o,i])?t[n][r][a][o][i]:c},q=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:K;return H({state:e,namespace:t,resourceName:n,query:r,ids:o,type:"headers",fallback:void 0})},B=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:K;return H({state:e,namespace:t,resourceName:n,query:r,ids:o})},z=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:K;return H({state:e,namespace:t,resourceName:n,query:r,ids:o,type:"error",fallback:null})},J=function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:K;const i=q(e,n,r,o,a);return i&&i.get?i.has(t)?i.get(t):void 0:null},$=e=>e.lastModified||0;let W=window.Headers||null;function X(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{items:[],headers:W},a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];return{type:a?"RESET_COLLECTION":"RECEIVE_COLLECTION",namespace:e,resourceName:t,queryString:n,ids:r,response:o}}function Z(e,t,n,r,o){return{type:"ERROR",namespace:e,resourceName:t,queryString:n,ids:r,response:{items:[],headers:W,error:o}}}function ee(e){return{type:"RECEIVE_LAST_MODIFIED",timestamp:e}}W=W?new W:{get:()=>{},has:()=>{}};var te=n(11),ne=n.n(te),re=n(28),oe=n.n(re),ae=n(4);const ie=e=>({type:"API_FETCH_WITH_HEADERS",options:e}),ce={},se={code:"invalid_json",message:Object(g.__)("The response is not a valid JSON response.","woo-gutenberg-products-block")},ue=e=>{ne.a.setNonce&&"function"==typeof ne.a.setNonce?ne.a.setNonce(e):console.error('The monkey patched function on APIFetch, "setNonce", is not present, likely another plugin or some other code has removed this augmentation')},le=new oe.a(e=>ne()({path:"/wc/store/batch",method:"POST",data:{requests:e.map(e=>({...e,body:null==e?void 0:e.data}))}}).then(t=>(function(e){if("object"!=typeof e||null===e||!e.hasOwnProperty("responses"))throw new Error("Response not valid")}(t),e.map((e,n)=>t.responses[n]||ce))),{batchScheduleFn:e=>setTimeout(e,300),cache:!1,maxBatchSize:25}),de={API_FETCH_WITH_HEADERS:e=>{let{options:t}=e;return new Promise((e,n)=>{!t.method||"GET"===t.method||Object(ae.isWpVersion)("5.6","<")?ne()({...t,parse:!1}).then(t=>{t.json().then(n=>{e({response:n,headers:t.headers}),ue(t.headers)}).catch(()=>{n(se)})}).catch(e=>{ue(e.headers),"function"==typeof e.json?e.json().then(e=>{n(e)}).catch(()=>{n(se)}):n(e.message)}):(async e=>await le.load(e))(t).then(t=>{throw function(e){if("object"!=typeof e||null===e||!e.hasOwnProperty("body")||!e.hasOwnProperty("headers"))throw new Error("Response not valid")}(t),t.status>=200&&t.status<300&&(e({response:t.body,headers:t.headers}),ue(t.headers)),t}).catch(e=>{e.headers&&ue(e.headers),e.body?n(e.body):n()})})}};function*fe(e,t,n,r){const o=yield Object(y.select)(m,"getRoute",e,t,r),a=Object(Q.addQueryArgs)("",n);if(o)try{const{response:n=K,headers:i}=yield ie({path:o+a});i&&i.get&&i.has("last-modified")&&(yield function*(e){const t=yield Object(y.select)("wc/store/collections","getCollectionLastModified");t?e>t&&(yield Object(y.dispatch)("wc/store/collections","invalidateResolutionForStore"),yield Object(y.dispatch)("wc/store/collections","receiveLastModified",e)):yield Object(y.dispatch)("wc/store/collections","receiveLastModified",e)}(parseInt(i.get("last-modified"),10))),yield X(e,t,a,r,{items:n,headers:i})}catch(n){yield Z(e,t,a,r,n)}else yield X(e,t,a,r)}function*he(e,t,n,r,o){const a=[t,n,r,o].filter(e=>void 0!==e);yield Object(y.select)("wc/store/collections","getCollection",...a)}Object(p.registerStore)("wc/store/collections",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if("RECEIVE_LAST_MODIFIED"===t.type)return t.timestamp===e.lastModified?e:{...e,lastModified:t.timestamp};if("INVALIDATE_RESOLUTION_FOR_STORE"===t.type)return{};const{type:n,namespace:r,resourceName:o,queryString:a,response:i}=t,c=t.ids?JSON.stringify(t.ids):"[]";switch(n){case"RECEIVE_COLLECTION":if(V(e,[r,o,c,a]))return e;e=U(e,[r,o,c,a],i);break;case"RESET_COLLECTION":case"ERROR":e=U(e,[r,o,c,a],i)}return e},actions:c,controls:{...y.controls,...de},selectors:i,resolvers:s});const pe="wc/store/collections";var ye=n(12);const me={cartItemsPendingQuantity:[],cartItemsPendingDelete:[],cartData:{coupons:w,shippingRates:S,shippingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},billingAddress:{first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:"",email:""},items:C,itemsCount:0,itemsWeight:0,needsShipping:!0,needsPayment:!1,hasCalculatedShipping:!0,fees:R,totals:{currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"",currency_suffix:"",total_items:"0",total_items_tax:"0",total_fees:"0",total_fees_tax:"0",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_price:"0",total_tax:"0",tax_lines:P},errors:O,paymentRequirements:A,extensions:D},metaData:{updatingCustomerData:!1,updatingSelectedRate:!1,applyingCoupon:"",removingCoupon:"",isCartDataStale:!1},errors:I},ge=e=>e.cartData,Ee=e=>e.cartData.totals||me.cartData.totals,_e=e=>e.metaData||me.metaData,ve=e=>e.errors,Te=e=>!!e.metaData.applyingCoupon,be=e=>e.metaData.isCartDataStale,we=e=>e.metaData.applyingCoupon||"",Ce=e=>!!e.metaData.removingCoupon,Re=e=>e.metaData.removingCoupon||"",Oe=(e,t)=>e.cartData.items.find(e=>e.key===t),Ie=(e,t)=>e.cartItemsPendingQuantity.includes(t),Se=(e,t)=>e.cartItemsPendingDelete.includes(t),Ae=e=>!!e.metaData.updatingCustomerData,De=e=>!!e.metaData.updatingSelectedRate,Pe=e=>({type:"RECEIVE_CART",response:Object(F.mapKeys)(e,(e,t)=>Object(F.camelCase)(t))}),Ne=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:t?"REPLACE_ERRORS":"RECEIVE_ERROR",error:e}},Me=e=>({type:"APPLYING_COUPON",couponCode:e}),ke=e=>({type:"REMOVING_COUPON",couponCode:e}),je=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"RECEIVE_CART_ITEM",cartItem:e}},Le=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"ITEM_PENDING_QUANTITY",cartItemKey:e,isPendingQuantity:t}},xe=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{type:"RECEIVE_REMOVED_ITEM",cartItemKey:e,isPendingDelete:t}},Fe=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"SET_IS_CART_DATA_STALE",isCartDataStale:e}},Ve=e=>({type:"UPDATING_CUSTOMER_DATA",isResolving:e}),Ue=e=>({type:"UPDATING_SELECTED_SHIPPING_RATE",isResolving:e}),Ge=()=>({type:"UPDATE_LEGACY_CART_FRAGMENTS"}),Ye=()=>({type:"TRIGGER_ADDING_TO_CART_EVENT"}),Ke=e=>{let{preserveCartData:t}=e;return{type:"TRIGGER_ADDED_TO_CART_EVENT",preserveCartData:t}};function*Qe(e){try{const{response:t}=yield ie({path:"/wc/store/cart/extensions",method:"POST",data:{namespace:e.namespace,data:e.data},cache:"no-store"});return yield Pe(t),yield Ge(),t}catch(e){var t;throw yield Ne(e),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart)),e}}function*He(e){yield Me(e);try{const{response:t}=yield ie({path:"/wc/store/cart/apply-coupon",method:"POST",data:{code:e},cache:"no-store"});yield Pe(t),yield Me(""),yield Ge()}catch(e){var t;throw yield Ne(e),yield Me(""),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart)),e}return!0}function*qe(e){yield ke(e);try{const{response:t}=yield ie({path:"/wc/store/cart/remove-coupon",method:"POST",data:{code:e},cache:"no-store"});yield Pe(t),yield ke(""),yield Ge()}catch(e){var t;throw yield Ne(e),yield ke(""),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart)),e}return!0}function*Be(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;try{yield Ye();const{response:n}=yield ie({path:"/wc/store/cart/add-item",method:"POST",data:{id:e,quantity:t},cache:"no-store"});yield Pe(n),yield Ke({preserveCartData:!0}),yield Ge()}catch(e){var n;throw yield Ne(e),null!==(n=e.data)&&void 0!==n&&n.cart&&(yield Pe(e.data.cart)),e}}function*ze(e){yield xe(e);try{const{response:t}=yield ie({path:"/wc/store/cart/remove-item",data:{key:e},method:"POST",cache:"no-store"});yield Pe(t),yield Ge()}catch(e){var t;yield Ne(e),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart))}yield xe(e,!1)}function*Je(e,t){const n=yield Object(y.select)(ye.b,"getCartItem",e);if((null==n?void 0:n.quantity)!==t){yield Le(e);try{const{response:n}=yield ie({path:"/wc/store/cart/update-item",method:"POST",data:{key:e,quantity:t},cache:"no-store"});yield Pe(n),yield Ge()}catch(e){var r;yield Ne(e),null!==(r=e.data)&&void 0!==r&&r.cart&&(yield Pe(e.data.cart))}yield Le(e,!1)}}function*$e(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;try{yield Ue(!0);const{response:n}=yield ie({path:"/wc/store/cart/select-shipping-rate",method:"POST",data:{package_id:t,rate_id:e},cache:"no-store"});yield Pe(n)}catch(e){var n;throw yield Ne(e),yield Ue(!1),null!==(n=e.data)&&void 0!==n&&n.cart&&(yield Pe(e.data.cart)),e}return yield Ue(!1),!0}function*We(e){yield Ve(!0);try{const{response:t}=yield ie({path:"/wc/store/cart/update-customer",method:"POST",data:e,cache:"no-store"});yield Pe(t)}catch(e){var t;throw yield Ne(e),yield Ve(!1),null!==(t=e.data)&&void 0!==t&&t.cart&&(yield Pe(e.data.cart)),e}return yield Ve(!1),!0}function*Xe(){const e=yield Object(y.apiFetch)({path:"/wc/store/cart",method:"GET",cache:"no-store"});e?yield Pe(e):yield Ne(ye.a)}function*Ze(){yield Object(y.select)(ye.b,"getCartData")}const et=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_CART_ITEM":return e.map(e=>{var n;return e.key===(null===(n=t.cartItem)||void 0===n?void 0:n.key)?t.cartItem:e})}return e};const tt=window.CustomEvent||null,nt=(e,t)=>{let{bubbles:n=!1,cancelable:r=!1,element:o,detail:a={}}=t;if(!tt)return;o||(o=document.body);const i=new tt(e,{bubbles:n,cancelable:r,detail:a});o.dispatchEvent(i)};let rt;const ot={UPDATE_LEGACY_CART_FRAGMENTS(){rt&&clearTimeout(rt),rt=setTimeout(()=>{nt("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},TRIGGER_ADDING_TO_CART_EVENT(){nt("wc-blocks_adding_to_cart",{bubbles:!0,cancelable:!0})},TRIGGER_ADDED_TO_CART_EVENT(e){(e=>{let{preserveCartData:t=!1}=e;nt("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})})(e)}};Object(p.registerStore)(ye.b,{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:me,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RECEIVE_ERROR":t.error&&(e={...e,errors:e.errors.concat(t.error)});break;case"REPLACE_ERRORS":t.error&&(e={...e,errors:[t.error]});break;case"RECEIVE_CART":t.response&&(e={...e,errors:I,cartData:t.response});break;case"APPLYING_COUPON":(t.couponCode||""===t.couponCode)&&(e={...e,metaData:{...e.metaData,applyingCoupon:t.couponCode}});break;case"REMOVING_COUPON":(t.couponCode||""===t.couponCode)&&(e={...e,metaData:{...e.metaData,removingCoupon:t.couponCode}});break;case"ITEM_PENDING_QUANTITY":const n=e.cartItemsPendingQuantity.filter(e=>e!==t.cartItemKey);t.isPendingQuantity&&t.cartItemKey&&n.push(t.cartItemKey),e={...e,cartItemsPendingQuantity:n};break;case"RECEIVE_REMOVED_ITEM":const r=e.cartItemsPendingDelete.filter(e=>e!==t.cartItemKey);t.isPendingDelete&&t.cartItemKey&&r.push(t.cartItemKey),e={...e,cartItemsPendingDelete:r};break;case"RECEIVE_CART_ITEM":e={...e,errors:I,cartData:{...e.cartData,items:et(e.cartData.items,t)}};break;case"UPDATING_CUSTOMER_DATA":e={...e,metaData:{...e.metaData,updatingCustomerData:!!t.isResolving}};break;case"UPDATING_SELECTED_SHIPPING_RATE":e={...e,metaData:{...e.metaData,updatingSelectedRate:!!t.isResolving}};break;case"SET_IS_CART_DATA_STALE":e={...e,metaData:{...e.metaData,isCartDataStale:t.isCartDataStale}}}return e},actions:l,controls:{...y.controls,...de,...ot},selectors:u,resolvers:d});const at=ye.b,it=(e,t)=>void 0===e[t]?null:e[t],ct=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=it(e,t);return null===o?r:(o=JSON.parse(o),void 0!==o[n]?o[n]:r)},st=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=it(e,t);return null===r?n:JSON.parse(r)},ut=(e,t,n)=>({type:"SET_QUERY_KEY_VALUE",context:e,queryKey:t,value:n}),lt=(e,t)=>({type:"SET_QUERY_CONTEXT_VALUE",context:e,value:t});Object(p.registerStore)("wc/store/query-state",{reducer:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{type:n,context:r,queryKey:o,value:a}=t,i=it(e,r);let c;switch(n){case"SET_QUERY_KEY_VALUE":const t=null!==i?JSON.parse(i):{};t[o]=a,c=JSON.stringify(t),i!==c&&(e={...e,[r]:c});break;case"SET_QUERY_CONTEXT_VALUE":c=JSON.stringify(a),i!==c&&(e={...e,[r]:c})}return e},actions:h,selectors:f});const dt="wc/store/query-state"},18:function(e,t){var n,r,o=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!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:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}}();var s,u=[],l=!1,d=-1;function f(){l&&s&&(l=!1,s.length?u=s.concat(u):d=-1,u.length&&h())}function h(){if(!l){var e=c(f);l=!0;for(var t=u.length;t;){for(s=u,u=[];++d1)for(var n=1;n and returns Promise>, but got: "+e+".");this._batchLoadFn=e,this._maxBatchSize=function(e){if(e&&!1===e.batch)return 1;var t=e&&e.maxBatchSize;if(void 0===t)return 1/0;if("number"!=typeof t||t<1)throw new TypeError("maxBatchSize must be a positive number: "+t);return t}(t),this._batchScheduleFn=function(e){var t=e&&e.batchScheduleFn;if(void 0===t)return a;if("function"!=typeof t)throw new TypeError("batchScheduleFn must be a function: "+t);return t}(t),this._cacheKeyFn=function(e){var t=e&&e.cacheKeyFn;if(void 0===t)return function(e){return e};if("function"!=typeof t)throw new TypeError("cacheKeyFn must be a function: "+t);return t}(t),this._cacheMap=function(e){if(e&&!1===e.cache)return null;var t=e&&e.cacheMap;if(void 0===t)return new Map;if(null!==t){var n=["get","set","delete","clear"].filter((function(e){return t&&"function"!=typeof t[e]}));if(0!==n.length)throw new TypeError("Custom cacheMap missing methods: "+n.join(", "))}return t}(t),this._batch=null}var t=e.prototype;return t.load=function(e){if(null==e)throw new TypeError("The loader.load() function must be called with a value,but got: "+String(e)+".");var t=function(e){var t=e._batch;if(null!==t&&!t.hasDispatched&&t.keys.length and returns Promise>, but the function did not return a Promise: "+String(n)+"."));n.then((function(e){if(!s(e))throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array: "+String(e)+".");if(e.length!==t.keys.length)throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array of the same length as the Array of keys.\n\nKeys:\n"+String(t.keys)+"\n\nValues:\n"+String(e));c(t);for(var n=0;n but got: "+e+".");for(var t=[],n=0;n0&&Object.prototype.hasOwnProperty.call(e,e.length-1))}e.exports=o}).call(this,n(18),n(123).setImmediate)},3:function(e,t){e.exports=window.lodash},4:function(e,t){e.exports=window.wc.wcSettings},5:function(e,t){e.exports=window.wp.dataControls},8:function(e,t){e.exports=window.wp.data}}); \ No newline at end of file diff --git a/build/wc-blocks-editor-style-rtl.css b/build/wc-blocks-editor-style-rtl.css new file mode 100644 index 00000000000..dbb1e575254 --- /dev/null +++ b/build/wc-blocks-editor-style-rtl.css @@ -0,0 +1 @@ +.editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-left:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0 -8px 16px;padding:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wc-block-grid__product{margin:0 0 24px}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block}.components-base-control+.wc-block-base-control-notice{margin:-16px 0 16px}.components-base-control+.wc-block-base-control-notice:last-child{margin:-16px 0 12px}svg.wc-block-editor-components-block-icon{color:#7f54b3}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents svg.wc-block-editor-components-block-icon{color:currentColor}.woocommerce-search-list__list.woocommerce-search-list__list{box-sizing:border-box;margin:0;padding:0}.woocommerce-search-list__selected.woocommerce-search-list__selected>ul{list-style:none;margin:0;padding:0}.theme-twentytwenty .wp-block .wc-block-active-filters__title,.theme-twentytwenty .wp-block .wc-block-attribute-filter__title,.theme-twentytwenty .wp-block .wc-block-grid__product-title,.theme-twentytwenty .wp-block .wc-block-price-filter__title,.theme-twentytwenty .wp-block .wc-block-stock-filter__title{font-size:1em}.wc-atomic-blocks-product__selection{width:100%}.wc-atomic-blocks-product__edit-card{padding:16px;border-top:1px solid #e0e0e0}.wc-atomic-blocks-product__edit-card .wc-atomic-blocks-product__edit-card-title{margin:0 0 16px}.wc-block-cart__page-notice{margin:0}.wp-block-woocommerce-cart-express-payment-block .components-placeholder__label svg{font-size:1em}.wp-block-woocommerce-cart-express-payment-block .wc-block-cart__payment-options{padding:0}.wp-block-woocommerce-cart-express-payment-block .wc-block-cart__payment-options .wc-block-components-express-payment-continue-rule{margin-bottom:-12px}.wp-block-woocommerce-filled-cart-block .wc-block-components-sidebar-layout{display:block}.wp-block-woocommerce-filled-cart-block .block-editor-block-list__layout{display:flex;flex-flow:row wrap;align-items:flex-start}.wp-block-woocommerce-filled-cart-block .block-editor-block-list__layout>:first-child,.wp-block-woocommerce-filled-cart-block .wc-block-components-main>:first-child,.wp-block-woocommerce-filled-cart-block .wc-block-components-sidebar>:first-child{margin-top:0}.wp-block-woocommerce-filled-cart-block .wp-block-woocommerce-cart-items-block .block-editor-block-list__layout,.wp-block-woocommerce-filled-cart-block .wp-block-woocommerce-cart-totals-block .block-editor-block-list__layout{display:block}.wc-block-checkout__additional_fields{margin:1.5em 0 -1.5em}.wc-block-components-checkout-step__description-placeholder{opacity:.5}.wc-block-components-checkout-step__title{display:flex;width:100%}.wp-block-woocommerce-checkout-express-payment-block{margin:14px 0 28px}.wp-block-woocommerce-checkout-express-payment-block .components-placeholder__label svg{font-size:1em}.wp-block-woocommerce-checkout-express-payment-block .wc-block-components-express-payment-continue-rule--checkout{margin-bottom:0}.wp-block-woocommerce-checkout-express-payment-block.wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods{padding:14px 0;margin:-14px 0 14px!important;position:relative}.wp-block-woocommerce-checkout-express-payment-block-placeholder *{pointer-events:all}.wp-block-woocommerce-checkout-express-payment-block-placeholder .wp-block-woocommerce-checkout-express-payment-block-placeholder__description{display:block;margin:0 0 1em}.wp-block-woocommerce-checkout-order-note-block{margin-top:20px;margin-bottom:20px;padding-top:4px;padding-bottom:4px}.wp-block-woocommerce-checkout-order-note-block .wc-block-checkout__add-note{margin-top:0;margin-bottom:0}.wc-block-checkout__terms{margin:20px 0;padding-top:4px;padding-bottom:4px;display:flex;align-items:flex-start}.wc-block-checkout__terms .block-editor-rich-text__editable{vertical-align:middle;line-height:1.5em}.wc-block-components-checkbox{margin-top:0}.wc-block-checkout__terms_notice .components-notice__action{margin-right:0}.wc-block-checkout__terms_notice-button{display:flex;flex-direction:row;align-items:center}.wc-block-checkout__terms_notice-button .wc-block-checkout__terms_notice-button__icon{margin-right:4px}.wp-block-woocommerce-checkout .wc-block-components-sidebar-layout{display:block}.wp-block-woocommerce-checkout .block-editor-block-list__layout{display:flex;flex-flow:row wrap;align-items:flex-start}.wp-block-woocommerce-checkout .block-editor-block-list__layout .wc-block-checkout__additional_fields{padding:0}.wp-block-woocommerce-checkout .block-editor-block-list__layout>:first-child,.wp-block-woocommerce-checkout .wc-block-components-main>:first-child,.wp-block-woocommerce-checkout .wc-block-components-sidebar>:first-child{margin-top:0}.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-fields-block .block-editor-block-list__layout,.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-totals-block .block-editor-block-list__layout{display:block}body.wc-lock-selected-block--move .block-editor-block-mover,body.wc-lock-selected-block--move .block-editor-block-mover__move-button-container,body.wc-lock-selected-block--remove .block-editor-block-settings-menu__popover .components-menu-group:last-child{display:none}body.wc-lock-selected-block--remove .block-editor-block-settings-menu__popover .components-menu-group:nth-last-child(2){margin-bottom:-12px}.wc-block-checkout__controls-text{color:#999;font-style:italic}.components-base-control--nested{padding-right:52px;margin-top:-12px}.wc-block-checkout__page-notice{margin:0}.components-panel__body-title .components-button{opacity:1}.wp-block-woocommerce-checkout.is-editor-preview{max-height:1000px;overflow:hidden}.wp-block-woocommerce-mini-cart-contents{max-width:480px;margin:0 auto!important}.wp-block-woocommerce-filled-mini-cart-contents-block .block-editor-block-list__layout{display:flex;flex-direction:column;min-height:100vh}.wp-block-woocommerce-mini-cart-products-table-block{margin-bottom:auto}.wc-block-products .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-products .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-products .components-placeholder__fieldset{display:block}.wc-block-products .wc-block-products__add-product-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-products .wc-block-products__add-product-button svg{fill:currentColor;margin-right:.5ch;vertical-align:middle}.wc-block-products .wc-block-products__read_more_button{display:block;margin-bottom:1em}.wc-block-all-products .components-placeholder__fieldset{max-width:none;overflow:hidden}.wc-block-all-products .wc-block-all-products-grid-item-template{border-top:1px solid #e0e0e0;margin-top:20px;width:100%;overflow:hidden;text-align:center}.wc-block-all-products .wc-block-all-products-grid-item-template .components-tip{max-width:450px;margin:20px auto;text-align:right}.wc-block-all-products .wc-block-all-products-grid-item-template .components-tip p{margin:1em 0}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions{display:flex;margin:20px auto;padding:1em 0 0;align-items:center;vertical-align:middle;max-width:450px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__done-button{margin:0;order:3;line-height:32px;height:auto}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__cancel-button{margin:0 auto 0 1em;order:2}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__reset-button{margin:0;order:1}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__products{margin:0 auto!important;text-align:center;position:relative;max-width:450px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product{padding:1px 20px;margin:0 auto;background:#fff;box-shadow:0 5px 7px -2px rgba(0,0,0,.2);position:static}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product .wp-block-button__link{margin-top:0}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:after,.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:before{content:"";background:#e0e0e0;display:block;position:absolute;width:100%;top:20px;bottom:20px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:before{left:100%;margin-left:30px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:after{right:100%;margin-right:30px}.components-base-control+.wc-block-reviews-by-product__notice{margin:-16px 0 16px}.components-base-control:nth-last-child(2)+.wc-block-reviews-by-product__notice{margin:-16px 0 12px}.wc-block-single-product__selection{width:100%}.wc-block-single-product__reset-layout{padding:0}.wc-block-single-product__reset-layout svg{margin-left:4px}.wc-block-single-product__edit-card{padding:16px;border-top:1px solid #e0e0e0}.wc-block-single-product__edit-card .wc-block-single-product__edit-card-title{margin:0 0 16px}.wc-block-editor-components-title{background-color:transparent}.wc-block-welcome-guide{width:312px}.wc-block-welcome-guide.components-modal__frame.components-guide{height:auto}.wc-block-welcome-guide__image{background:#00a0d2;margin:0 0 16px}.wc-block-welcome-guide__heading{font-size:24px;line-height:1.4;margin:16px 0;padding:0 24px}.wc-block-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 24px;padding:0 24px}.wc-block-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.wc-block-error-message{margin-bottom:16px;margin-top:8px}.wc-block-api-error .components-placeholder__fieldset{display:block}.wc-block-api-error .wc-block-error-message{margin-top:0}.wc-block-api-error .components-spinner{float:none}.wc-block-editor-components-external-link-card{display:flex;flex-direction:row;text-decoration:none;margin:24px 0;color:inherit;align-items:flex-start}.wc-block-editor-components-external-link-card+.wc-block-editor-components-external-link-card{margin-top:-8px}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__content{flex:1 1 0;padding-left:16px}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__title{font-weight:500;display:block}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__description{color:#757575;display:block;font-size:.875em;margin-top:.5em}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__icon{flex:0 0 24px;margin:0;text-align:left;color:inherit;vertical-align:top}.wc-block-feedback-prompt{background-color:#f7f7f7;border-top:1px solid #e0e0e0;margin:0 -16px;padding:24px;text-align:center}.wc-block-feedback-prompt .wc-block-feedback-prompt__title{margin:0 0 12px}.wc-block-feedback-prompt .wc-block-feedback-prompt__link{color:inherit}.wc-block-feedback-prompt .wc-block-feedback-prompt__link>.gridicon{vertical-align:text-bottom}.woocommerce-product-attributes__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-attributes__operator .components-base-control__label{margin-bottom:0;margin-left:.5em}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{justify-content:center}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0:after{margin-right:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:0;background-size:contain}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0.is-selected:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-search-list__item.woocommerce-product-attributes__item[disabled].depth-0:after{margin-right:0;width:auto;background:none}.woocommerce-product-categories__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-categories__operator .components-base-control__label{margin-bottom:0;margin-left:.5em}.woocommerce-search-product__item .woocommerce-search-list__item-name .description{display:block}.woocommerce-search-product__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-product__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-product__item.is-not-active:active,.woocommerce-search-product__item.is-not-active:focus,.woocommerce-search-product__item.is-not-active:hover{background:#fff}.woocommerce-search-product__item.is-loading{justify-content:center}.woocommerce-search-product__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-product__item.depth-0.is-variable:after{margin-right:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:0;background-size:contain}.woocommerce-search-product__item.depth-0.is-variable.is-selected:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-product-tags__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-tags__operator .components-base-control__label{margin-bottom:0;margin-left:.5em}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:right}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #f0f0f0}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-right:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__selected ul{list-style:none}.woocommerce-search-list__selected ul li{float:right}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #f0f0f0}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{border:1px solid #e0e0e0;padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto}.woocommerce-search-list__list li{margin-bottom:0}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-left:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-search-list__list>[role=menu]{border:1px solid #f0f0f0;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:flex;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #f0f0f0;color:#757575}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f0f0f0}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus{box-shadow:none}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-input{margin:0 0 0 8px}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:flex;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #f0f0f0}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-left:4px;content:str-repeat("— ",5)}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-left:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:str-repeat("— ",1)}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:str-repeat("— ",2)}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:str-repeat("— ",3)}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:str-repeat("— ",4)}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#757575}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-left:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#1e1e1e}.woocommerce-search-list__list .woocommerce-search-list__item.has-count>.components-menu-item__item{width:100%}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{flex:0 1 auto;padding:2px 8px;border:1px solid #f0f0f0;border-radius:12px;font-size:.8em;line-height:1.4;color:#757575;background:#fff;white-space:nowrap}.woocommerce-search-list__list li:last-child .woocommerce-search-list__item{border-bottom:none}.woocommerce-search-list.is-compact .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.woocommerce-search-list.is-compact .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-tag{display:inline-flex;margin:1px 0 1px 4px;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#f0f0f0;transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#757575;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 8px 0 4px;border-radius:0 12px 12px 0}.woocommerce-tag .woocommerce-tag__remove{cursor:pointer;height:inherit;padding:0 2px;border-radius:12px 0 0 12px;color:#757575;line-height:10px;text-indent:0;height:24px}.woocommerce-tag .woocommerce-tag__remove:hover{color:#1e1e1e}.wc-block-text-toolbar-button{align-items:center}.wc-block-text-toolbar-button.is-toggled,.wc-block-text-toolbar-button.is-toggled:focus{background:#757575;color:#fff}.block-editor-block-toolbar__slot{flex-shrink:0}.components-toggle-button-control .components-base-control__field{flex-wrap:wrap}.components-toggle-button-control .components-toggle-button-control__label{width:100%;margin-bottom:8px;display:block}.components-toggle-button-control .components-base-control__help{margin-top:0}.wc-block-view-switch-control{text-align:right;background:#f0f2f3;box-shadow:0 0 0 13px #f0f2f3;margin:0 0 27px;visibility:hidden;color:#757575}.has-child-selected .wc-block-view-switch-control,.is-selected .wc-block-view-switch-control{visibility:visible}.wc-block-handpicked-products__selection,.wc-block-products-category__selection,.wc-block-reviews__selection{width:100%}.wc-block-products-category__cancel-button.is-tertiary{margin:1em auto 0}.wc-block-product-categories.wc-block-product-categories ul{margin-right:20px}.wc-block-product-categories .components-placeholder__label svg,.wc-block-product-on-sale .components-placeholder__label svg{margin-left:1ch;fill:currentColor}.wc-block-products-by-attribute__selection{width:100%}.wc-block-featured-product .components-resizable-box__handle{z-index:10}.wc-block-featured-product__message{margin-bottom:16px}.wc-block-featured-product__selection{width:100%}.wc-block-product-search__field.input-control{color:#828b96!important;padding:0}.wc-block-product-search__field.input-control .components-base-control__field{margin-bottom:0}.wc-block-product-search .wc-block-product-search__fields .block-editor-rich-text{flex-grow:1}.wc-block-product-tag__selection{width:100%}.wc-block-product-tag__cancel-button.is-tertiary{margin:1em auto 0}.wc-block-featured-category .components-resizable-box__handle{z-index:10}.wc-block-featured-category .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-featured-category__selection{width:100%}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-webkit-slider-thumb{pointer-events:none}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-moz-range-thumb{pointer-events:none}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-ms-thumb{pointer-events:none}.wc-block-price-slider .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-price-slider .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-price-slider .components-placeholder__fieldset{display:block}.wc-block-price-slider .wc-block-price-slider__add-product-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-price-slider .wc-block-price-slider__add-product-button svg{fill:currentColor;margin-right:.5ch;vertical-align:middle}.wc-block-price-slider .wc-block-price-slider__read_more_button{display:block;margin-bottom:1em}.wc-block-attribute-filter .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-attribute-filter .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-attribute-filter .components-placeholder__fieldset{display:block}.wc-block-attribute-filter .woocommerce-search-list__search{border-top:0;margin-top:0;padding-top:0}.wc-block-attribute-filter .wc-block-attribute-filter__add-attribute-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-attribute-filter .wc-block-attribute-filter__add-attribute-button svg{fill:currentColor;margin-right:.5ch;vertical-align:middle}.wc-block-attribute-filter .wc-block-attribute-filter__read_more_button{display:block;margin-bottom:1em}.wc-block-stock-filter .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-stock-filter .components-placeholder__label svg{fill:currentColor;margin-left:1ch}.wc-block-stock-filter .components-placeholder__fieldset{display:block}.wc-block-stock-filter .woocommerce-search-list__search{border-top:0;margin-top:0;padding-top:0}.wc-block-stock-filter .wc-block-stock-filter__add-stock-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-stock-filter .wc-block-stock-filter__add-stock-button svg{fill:currentColor;margin-right:.5ch;vertical-align:middle}.wc-block-stock-filter .wc-block-stock-filter__read_more_button{display:block;margin-bottom:1em}@-webkit-keyframes spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(-1turn)}}@-webkit-keyframes loading__animation{to{transform:translateX(-100%)}}@keyframes loading__animation{to{transform:translateX(-100%)}}.wp-block-woocommerce-legacy-template__placeholder-copy{max-width:900px;margin-bottom:30px}.wp-block-woocommerce-legacy-template__placeholder-wireframe{width:100%;height:250px;background:#e5e5e5}@media only screen and (min-width:768px){.wp-block-woocommerce-legacy-template__placeholder-wireframe{height:auto;background:transparent}}.wp-block-woocommerce-legacy-template__placeholder .wp-block-woocommerce-legacy-template__placeholder-image{display:none;width:100%;height:auto}@media only screen and (min-width:768px){.wp-block-woocommerce-legacy-template__placeholder .wp-block-woocommerce-legacy-template__placeholder-image{display:block}} \ No newline at end of file diff --git a/build/wc-blocks-editor-style.css b/build/wc-blocks-editor-style.css new file mode 100644 index 00000000000..cba887db310 --- /dev/null +++ b/build/wc-blocks-editor-style.css @@ -0,0 +1 @@ +.editor-block-preview__content{overflow:hidden}.components-placeholder__label .gridicon,.components-placeholder__label .material-icon{margin-right:1ch;fill:currentColor}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products{list-style:none;margin:0 -8px 16px;padding:0}.editor-styles-wrapper .wc-block-grid .wc-block-grid__products .wc-block-grid__product{margin:0 0 24px}.editor-styles-wrapper .wc-block-grid.components-placeholder{padding:2em 1em}.editor-styles-wrapper .wc-block-grid.is-loading,.editor-styles-wrapper .wc-block-grid.is-not-found{display:block}.components-base-control+.wc-block-base-control-notice{margin:-16px 0 16px}.components-base-control+.wc-block-base-control-notice:last-child{margin:-16px 0 12px}svg.wc-block-editor-components-block-icon{color:#7f54b3}.block-editor-list-view-leaf.is-selected .block-editor-list-view-block-contents svg.wc-block-editor-components-block-icon{color:currentColor}.woocommerce-search-list__list.woocommerce-search-list__list{box-sizing:border-box;margin:0;padding:0}.woocommerce-search-list__selected.woocommerce-search-list__selected>ul{list-style:none;margin:0;padding:0}.theme-twentytwenty .wp-block .wc-block-active-filters__title,.theme-twentytwenty .wp-block .wc-block-attribute-filter__title,.theme-twentytwenty .wp-block .wc-block-grid__product-title,.theme-twentytwenty .wp-block .wc-block-price-filter__title,.theme-twentytwenty .wp-block .wc-block-stock-filter__title{font-size:1em}.wc-atomic-blocks-product__selection{width:100%}.wc-atomic-blocks-product__edit-card{padding:16px;border-top:1px solid #e0e0e0}.wc-atomic-blocks-product__edit-card .wc-atomic-blocks-product__edit-card-title{margin:0 0 16px}.wc-block-cart__page-notice{margin:0}.wp-block-woocommerce-cart-express-payment-block .components-placeholder__label svg{font-size:1em}.wp-block-woocommerce-cart-express-payment-block .wc-block-cart__payment-options{padding:0}.wp-block-woocommerce-cart-express-payment-block .wc-block-cart__payment-options .wc-block-components-express-payment-continue-rule{margin-bottom:-12px}.wp-block-woocommerce-filled-cart-block .wc-block-components-sidebar-layout{display:block}.wp-block-woocommerce-filled-cart-block .block-editor-block-list__layout{display:flex;flex-flow:row wrap;align-items:flex-start}.wp-block-woocommerce-filled-cart-block .block-editor-block-list__layout>:first-child,.wp-block-woocommerce-filled-cart-block .wc-block-components-main>:first-child,.wp-block-woocommerce-filled-cart-block .wc-block-components-sidebar>:first-child{margin-top:0}.wp-block-woocommerce-filled-cart-block .wp-block-woocommerce-cart-items-block .block-editor-block-list__layout,.wp-block-woocommerce-filled-cart-block .wp-block-woocommerce-cart-totals-block .block-editor-block-list__layout{display:block}.wc-block-checkout__additional_fields{margin:1.5em 0 -1.5em}.wc-block-components-checkout-step__description-placeholder{opacity:.5}.wc-block-components-checkout-step__title{display:flex;width:100%}.wp-block-woocommerce-checkout-express-payment-block{margin:14px 0 28px}.wp-block-woocommerce-checkout-express-payment-block .components-placeholder__label svg{font-size:1em}.wp-block-woocommerce-checkout-express-payment-block .wc-block-components-express-payment-continue-rule--checkout{margin-bottom:0}.wp-block-woocommerce-checkout-express-payment-block.wp-block-woocommerce-checkout-express-payment-block--has-express-payment-methods{padding:14px 0;margin:-14px 0 14px!important;position:relative}.wp-block-woocommerce-checkout-express-payment-block-placeholder *{pointer-events:all}.wp-block-woocommerce-checkout-express-payment-block-placeholder .wp-block-woocommerce-checkout-express-payment-block-placeholder__description{display:block;margin:0 0 1em}.wp-block-woocommerce-checkout-order-note-block{margin-top:20px;margin-bottom:20px;padding-top:4px;padding-bottom:4px}.wp-block-woocommerce-checkout-order-note-block .wc-block-checkout__add-note{margin-top:0;margin-bottom:0}.wc-block-checkout__terms{margin:20px 0;padding-top:4px;padding-bottom:4px;display:flex;align-items:flex-start}.wc-block-checkout__terms .block-editor-rich-text__editable{vertical-align:middle;line-height:1.5em}.wc-block-components-checkbox{margin-top:0}.wc-block-checkout__terms_notice .components-notice__action{margin-left:0}.wc-block-checkout__terms_notice-button{display:flex;flex-direction:row;align-items:center}.wc-block-checkout__terms_notice-button .wc-block-checkout__terms_notice-button__icon{margin-left:4px}.wp-block-woocommerce-checkout .wc-block-components-sidebar-layout{display:block}.wp-block-woocommerce-checkout .block-editor-block-list__layout{display:flex;flex-flow:row wrap;align-items:flex-start}.wp-block-woocommerce-checkout .block-editor-block-list__layout .wc-block-checkout__additional_fields{padding:0}.wp-block-woocommerce-checkout .block-editor-block-list__layout>:first-child,.wp-block-woocommerce-checkout .wc-block-components-main>:first-child,.wp-block-woocommerce-checkout .wc-block-components-sidebar>:first-child{margin-top:0}.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-fields-block .block-editor-block-list__layout,.wp-block-woocommerce-checkout .wp-block-woocommerce-checkout-totals-block .block-editor-block-list__layout{display:block}body.wc-lock-selected-block--move .block-editor-block-mover,body.wc-lock-selected-block--move .block-editor-block-mover__move-button-container,body.wc-lock-selected-block--remove .block-editor-block-settings-menu__popover .components-menu-group:last-child{display:none}body.wc-lock-selected-block--remove .block-editor-block-settings-menu__popover .components-menu-group:nth-last-child(2){margin-bottom:-12px}.wc-block-checkout__controls-text{color:#999;font-style:italic}.components-base-control--nested{padding-left:52px;margin-top:-12px}.wc-block-checkout__page-notice{margin:0}.components-panel__body-title .components-button{opacity:1}.wp-block-woocommerce-checkout.is-editor-preview{max-height:1000px;overflow:hidden}.wp-block-woocommerce-mini-cart-contents{max-width:480px;margin:0 auto!important}.wp-block-woocommerce-filled-mini-cart-contents-block .block-editor-block-list__layout{display:flex;flex-direction:column;min-height:100vh}.wp-block-woocommerce-mini-cart-products-table-block{margin-bottom:auto}.wc-block-products .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-products .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-products .components-placeholder__fieldset{display:block}.wc-block-products .wc-block-products__add-product-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-products .wc-block-products__add-product-button svg{fill:currentColor;margin-left:.5ch;vertical-align:middle}.wc-block-products .wc-block-products__read_more_button{display:block;margin-bottom:1em}.wc-block-all-products .components-placeholder__fieldset{max-width:none;overflow:hidden}.wc-block-all-products .wc-block-all-products-grid-item-template{border-top:1px solid #e0e0e0;margin-top:20px;width:100%;overflow:hidden;text-align:center}.wc-block-all-products .wc-block-all-products-grid-item-template .components-tip{max-width:450px;margin:20px auto;text-align:left}.wc-block-all-products .wc-block-all-products-grid-item-template .components-tip p{margin:1em 0}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions{display:flex;margin:20px auto;padding:1em 0 0;align-items:center;vertical-align:middle;max-width:450px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__done-button{margin:0;order:3;line-height:32px;height:auto}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__cancel-button{margin:0 1em 0 auto;order:2}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-all-products__actions .wc-block-all-products__reset-button{margin:0;order:1}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__products{margin:0 auto!important;text-align:center;position:relative;max-width:450px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product{padding:1px 20px;margin:0 auto;background:#fff;box-shadow:0 5px 7px -2px rgba(0,0,0,.2);position:static}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product .wp-block-button__link{margin-top:0}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:after,.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:before{content:"";background:#e0e0e0;display:block;position:absolute;width:100%;top:20px;bottom:20px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:before{right:100%;margin-right:30px}.wc-block-all-products .wc-block-all-products-grid-item-template .wc-block-grid__product:after{left:100%;margin-left:30px}.components-base-control+.wc-block-reviews-by-product__notice{margin:-16px 0 16px}.components-base-control:nth-last-child(2)+.wc-block-reviews-by-product__notice{margin:-16px 0 12px}.wc-block-single-product__selection{width:100%}.wc-block-single-product__reset-layout{padding:0}.wc-block-single-product__reset-layout svg{margin-right:4px}.wc-block-single-product__edit-card{padding:16px;border-top:1px solid #e0e0e0}.wc-block-single-product__edit-card .wc-block-single-product__edit-card-title{margin:0 0 16px}.wc-block-editor-components-title{background-color:transparent}.wc-block-welcome-guide{width:312px}.wc-block-welcome-guide.components-modal__frame.components-guide{height:auto}.wc-block-welcome-guide__image{background:#00a0d2;margin:0 0 16px}.wc-block-welcome-guide__heading{font-size:24px;line-height:1.4;margin:16px 0;padding:0 24px}.wc-block-welcome-guide__text{font-size:13px;line-height:1.4;margin:0 0 24px;padding:0 24px}.wc-block-welcome-guide__inserter-icon{margin:0 4px;vertical-align:text-top}.wc-block-error-message{margin-bottom:16px;margin-top:8px}.wc-block-api-error .components-placeholder__fieldset{display:block}.wc-block-api-error .wc-block-error-message{margin-top:0}.wc-block-api-error .components-spinner{float:none}.wc-block-editor-components-external-link-card{display:flex;flex-direction:row;text-decoration:none;margin:24px 0;color:inherit;align-items:flex-start}.wc-block-editor-components-external-link-card+.wc-block-editor-components-external-link-card{margin-top:-8px}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__content{flex:1 1 0;padding-right:16px}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__title{font-weight:500;display:block}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__description{color:#757575;display:block;font-size:.875em;margin-top:.5em}.wc-block-editor-components-external-link-card .wc-block-editor-components-external-link-card__icon{flex:0 0 24px;margin:0;text-align:right;color:inherit;vertical-align:top}.wc-block-feedback-prompt{background-color:#f7f7f7;border-top:1px solid #e0e0e0;margin:0 -16px;padding:24px;text-align:center}.wc-block-feedback-prompt .wc-block-feedback-prompt__title{margin:0 0 12px}.wc-block-feedback-prompt .wc-block-feedback-prompt__link{color:inherit}.wc-block-feedback-prompt .wc-block-feedback-prompt__link>.gridicon{vertical-align:text-bottom}.woocommerce-product-attributes__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-attributes__operator .components-base-control__label{margin-bottom:0;margin-right:.5em}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:active,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:focus,.woocommerce-search-list__item.woocommerce-product-attributes__item.is-not-active:hover{background:#fff}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading{justify-content:center}.woocommerce-search-list__item.woocommerce-product-attributes__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-list__item.woocommerce-product-attributes__item.depth-0.is-selected:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-search-list__item.woocommerce-product-attributes__item[disabled].depth-0:after{margin-left:0;width:auto;background:none}.woocommerce-product-categories__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-categories__operator .components-base-control__label{margin-bottom:0;margin-right:.5em}.woocommerce-search-product__item .woocommerce-search-list__item-name .description{display:block}.woocommerce-search-product__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-product__item.is-skip-level .woocommerce-search-list__item-prefix:after{content:":"}.woocommerce-search-product__item.is-not-active:active,.woocommerce-search-product__item.is-not-active:focus,.woocommerce-search-product__item.is-not-active:hover{background:#fff}.woocommerce-search-product__item.is-loading{justify-content:center}.woocommerce-search-product__item.is-loading .components-spinner{margin-bottom:12px}.woocommerce-search-product__item.depth-0.is-variable:after{margin-left:8px;content:"";height:24px;width:24px;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-position:100%;background-size:contain}.woocommerce-search-product__item.depth-0.is-variable.is-selected:after{background-image:url('data:image/svg+xml;utf8,')}.woocommerce-product-tags__operator .components-base-control__help{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-product-tags__operator .components-base-control__label{margin-bottom:0;margin-right:.5em}.woocommerce-search-list{width:100%;padding:0 0 16px;text-align:left}.woocommerce-search-list__selected{margin:16px 0;padding:16px 0 0;min-height:76px;border-top:1px solid #f0f0f0}.woocommerce-search-list__selected .woocommerce-search-list__selected-header{margin-bottom:8px}.woocommerce-search-list__selected .woocommerce-search-list__selected-header button{margin-left:12px}.woocommerce-search-list__selected .woocommerce-tag__text{max-width:13em}.woocommerce-search-list__selected ul{list-style:none}.woocommerce-search-list__selected ul li{float:left}.woocommerce-search-list__search{margin:16px 0;padding:16px 0 0;border-top:1px solid #f0f0f0}.woocommerce-search-list__search .components-base-control__field{margin-bottom:16px}.woocommerce-search-list__list{border:1px solid #e0e0e0;padding:0;max-height:17em;overflow-x:hidden;overflow-y:auto}.woocommerce-search-list__list li{margin-bottom:0}.woocommerce-search-list__list.is-loading,.woocommerce-search-list__list.is-not-found{padding:12px 0;text-align:center;border:none}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon,.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-text{display:inline-block}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon{margin-right:16px}.woocommerce-search-list__list.is-not-found .woocommerce-search-list__not-found-icon .gridicon{vertical-align:top;margin-top:-1px}.woocommerce-search-list__list .components-spinner{float:none;margin:0 auto}.woocommerce-search-list__list .components-menu-group__label{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.woocommerce-search-list__list>[role=menu]{border:1px solid #f0f0f0;border-bottom:none}.woocommerce-search-list__list .woocommerce-search-list__item{display:flex;align-items:center;margin-bottom:0;padding:12px 16px;background:#fff;border-bottom:1px solid #f0f0f0;color:#757575}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus,.woocommerce-search-list__list .woocommerce-search-list__item:hover{background:#f0f0f0}.woocommerce-search-list__list .woocommerce-search-list__item:active,.woocommerce-search-list__list .woocommerce-search-list__item:focus{box-shadow:none}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-input{margin:0 8px 0 0}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-label{display:flex;flex:1}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0+.depth-1{margin-top:-1px}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0){border-bottom:0!important}.woocommerce-search-list__list .woocommerce-search-list__item:not(.depth-0)+.depth-0{border-top:1px solid #f0f0f0}.woocommerce-search-list__list .woocommerce-search-list__item[class*=depth-] .woocommerce-search-list__item-label:before{margin-right:4px;content:str-repeat("— ",5)}.woocommerce-search-list__list .woocommerce-search-list__item.depth-0 .woocommerce-search-list__item-label:before{margin-right:0;content:""}.woocommerce-search-list__list .woocommerce-search-list__item.depth-1 .woocommerce-search-list__item-label:before{content:str-repeat("— ",1)}.woocommerce-search-list__list .woocommerce-search-list__item.depth-2 .woocommerce-search-list__item-label:before{content:str-repeat("— ",2)}.woocommerce-search-list__list .woocommerce-search-list__item.depth-3 .woocommerce-search-list__item-label:before{content:str-repeat("— ",3)}.woocommerce-search-list__list .woocommerce-search-list__item.depth-4 .woocommerce-search-list__item-label:before{content:str-repeat("— ",4)}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-name{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-prefix{display:none;color:#757575}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-label,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-label{display:inline-block}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix{display:inline}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-prefix:after,.woocommerce-search-list__list .woocommerce-search-list__item.is-skip-level .woocommerce-search-list__item-prefix:after{margin-right:4px;content:" ›"}.woocommerce-search-list__list .woocommerce-search-list__item.is-searching .woocommerce-search-list__item-name{color:#1e1e1e}.woocommerce-search-list__list .woocommerce-search-list__item.has-count>.components-menu-item__item{width:100%}.woocommerce-search-list__list .woocommerce-search-list__item .woocommerce-search-list__item-count{flex:0 1 auto;padding:2px 8px;border:1px solid #f0f0f0;border-radius:12px;font-size:.8em;line-height:1.4;color:#757575;background:#fff;white-space:nowrap}.woocommerce-search-list__list li:last-child .woocommerce-search-list__item{border-bottom:none}.woocommerce-search-list.is-compact .woocommerce-search-list__selected{margin:0 0 16px;padding:0;border-top:none;min-height:54px}.woocommerce-search-list.is-compact .woocommerce-search-list__search{margin:0 0 16px;padding:0;border-top:none}.woocommerce-tag{display:inline-flex;margin:1px 4px 1px 0;overflow:hidden;vertical-align:middle}.woocommerce-tag .woocommerce-tag__remove,.woocommerce-tag .woocommerce-tag__text{display:inline-block;line-height:24px;background:#f0f0f0;transition:all .2s cubic-bezier(.4,1,.4,1)}.woocommerce-tag .woocommerce-tag__text{-ms-grid-row-align:center;align-self:center;padding:0 8px;border-radius:12px;color:#757575;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.woocommerce-tag.has-remove .woocommerce-tag__text{padding:0 4px 0 8px;border-radius:12px 0 0 12px}.woocommerce-tag .woocommerce-tag__remove{cursor:pointer;height:inherit;padding:0 2px;border-radius:0 12px 12px 0;color:#757575;line-height:10px;text-indent:0;height:24px}.woocommerce-tag .woocommerce-tag__remove:hover{color:#1e1e1e}.wc-block-text-toolbar-button{align-items:center}.wc-block-text-toolbar-button.is-toggled,.wc-block-text-toolbar-button.is-toggled:focus{background:#757575;color:#fff}.block-editor-block-toolbar__slot{flex-shrink:0}.components-toggle-button-control .components-base-control__field{flex-wrap:wrap}.components-toggle-button-control .components-toggle-button-control__label{width:100%;margin-bottom:8px;display:block}.components-toggle-button-control .components-base-control__help{margin-top:0}.wc-block-view-switch-control{text-align:left;background:#f0f2f3;box-shadow:0 0 0 13px #f0f2f3;margin:0 0 27px;visibility:hidden;color:#757575}.has-child-selected .wc-block-view-switch-control,.is-selected .wc-block-view-switch-control{visibility:visible}.wc-block-handpicked-products__selection,.wc-block-products-category__selection,.wc-block-reviews__selection{width:100%}.wc-block-products-category__cancel-button.is-tertiary{margin:1em auto 0}.wc-block-product-categories.wc-block-product-categories ul{margin-left:20px}.wc-block-product-categories .components-placeholder__label svg,.wc-block-product-on-sale .components-placeholder__label svg{margin-right:1ch;fill:currentColor}.wc-block-products-by-attribute__selection{width:100%}.wc-block-featured-product .components-resizable-box__handle{z-index:10}.wc-block-featured-product__message{margin-bottom:16px}.wc-block-featured-product__selection{width:100%}.wc-block-product-search__field.input-control{color:#828b96!important;padding:0}.wc-block-product-search__field.input-control .components-base-control__field{margin-bottom:0}.wc-block-product-search .wc-block-product-search__fields .block-editor-rich-text{flex-grow:1}.wc-block-product-tag__selection{width:100%}.wc-block-product-tag__cancel-button.is-tertiary{margin:1em auto 0}.wc-block-featured-category .components-resizable-box__handle{z-index:10}.wc-block-featured-category .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-featured-category__selection{width:100%}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-webkit-slider-thumb{pointer-events:none}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-moz-range-thumb{pointer-events:none}.components-disabled .wc-block-price-filter__range-input-wrapper .wc-block-price-filter__range-input::-ms-thumb{pointer-events:none}.wc-block-price-slider .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-price-slider .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-price-slider .components-placeholder__fieldset{display:block}.wc-block-price-slider .wc-block-price-slider__add-product-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-price-slider .wc-block-price-slider__add-product-button svg{fill:currentColor;margin-left:.5ch;vertical-align:middle}.wc-block-price-slider .wc-block-price-slider__read_more_button{display:block;margin-bottom:1em}.wc-block-attribute-filter .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-attribute-filter .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-attribute-filter .components-placeholder__fieldset{display:block}.wc-block-attribute-filter .woocommerce-search-list__search{border-top:0;margin-top:0;padding-top:0}.wc-block-attribute-filter .wc-block-attribute-filter__add-attribute-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-attribute-filter .wc-block-attribute-filter__add-attribute-button svg{fill:currentColor;margin-left:.5ch;vertical-align:middle}.wc-block-attribute-filter .wc-block-attribute-filter__read_more_button{display:block;margin-bottom:1em}.wc-block-stock-filter .components-placeholder__instructions{border-bottom:1px solid #e0e2e6;width:100%;padding-bottom:1em;margin-bottom:2em}.wc-block-stock-filter .components-placeholder__label svg{fill:currentColor;margin-right:1ch}.wc-block-stock-filter .components-placeholder__fieldset{display:block}.wc-block-stock-filter .woocommerce-search-list__search{border-top:0;margin-top:0;padding-top:0}.wc-block-stock-filter .wc-block-stock-filter__add-stock-button{margin:0 0 1em;vertical-align:middle;height:auto;padding:.5em 1em}.wc-block-stock-filter .wc-block-stock-filter__add-stock-button svg{fill:currentColor;margin-left:.5ch;vertical-align:middle}.wc-block-stock-filter .wc-block-stock-filter__read_more_button{display:block;margin-bottom:1em}@-webkit-keyframes spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(1turn)}}@-webkit-keyframes loading__animation{to{transform:translateX(100%)}}@keyframes loading__animation{to{transform:translateX(100%)}}.wp-block-woocommerce-legacy-template__placeholder-copy{max-width:900px;margin-bottom:30px}.wp-block-woocommerce-legacy-template__placeholder-wireframe{width:100%;height:250px;background:#e5e5e5}@media only screen and (min-width:768px){.wp-block-woocommerce-legacy-template__placeholder-wireframe{height:auto;background:transparent}}.wp-block-woocommerce-legacy-template__placeholder .wp-block-woocommerce-legacy-template__placeholder-image{display:none;width:100%;height:auto}@media only screen and (min-width:768px){.wp-block-woocommerce-legacy-template__placeholder .wp-block-woocommerce-legacy-template__placeholder-image{display:block}} \ No newline at end of file diff --git a/build/wc-blocks-google-analytics.asset.php b/build/wc-blocks-google-analytics.asset.php new file mode 100644 index 00000000000..ce822c1ec30 --- /dev/null +++ b/build/wc-blocks-google-analytics.asset.php @@ -0,0 +1 @@ + array('wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => 'ca4afc6fb8557d3f4bf744a6446d1b9a'); \ No newline at end of file diff --git a/build/wc-blocks-google-analytics.js b/build/wc-blocks-google-analytics.js new file mode 100644 index 00000000000..7507e2a8dfb --- /dev/null +++ b/build/wc-blocks-google-analytics.js @@ -0,0 +1 @@ +!function(e){var t={};function o(c){if(t[c])return t[c].exports;var n=t[c]={i:c,l:!1,exports:{}};return e[c].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,c){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(c,n,function(t){return e[t]}.bind(null,n));return c},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=2)}([function(e,t){e.exports=window.wp.hooks},function(e,t){e.exports=window.wp.i18n},function(e,t,o){"use strict";o.r(t);var c=o(1),n=o(0);const r="woocommerce-google-analytics",i="experimental__woocommerce_blocks",a=(e,t)=>{const o=e.sku?e.sku:"#"+e.id,c="categories"in e&&e.categories.length?e.categories[0].name:"";return{id:o,name:e.name,quantity:t,category:c,price:(parseInt(e.prices.price,10)/10**e.prices.currency_minor_unit).toString()}},u=(e,t)=>{const o=e.sku?e.sku:"#"+e.id,c=e.categories.length?e.categories[0].name:"";return{id:o,name:e.name,list_name:t,category:c,price:(parseInt(e.prices.price,10)/10**e.prices.currency_minor_unit).toString()}},s=(e,t)=>{if("function"!=typeof gtag)throw new Error("Function gtag not implemented.");console.log("Tracking event "+e),window.gtag("event",e,t)};let d=-1;const l=e=>t=>{var o;let{storeCart:c}=t;d!==e&&(s(0===e?"begin_checkout":"checkout_progress",{items:c.cartItems.map(a),coupon:(null===(o=c.cartCoupons[0])||void 0===o?void 0:o.code)||"",currency:c.cartTotals.currency_code,value:(parseInt(c.cartTotals.total_price,10)/10**c.cartTotals.currency_minor_unit).toString(),checkout_step:e}),d=e)},p=e=>{let{step:t,option:o,value:c}=e;return()=>{s("set_checkout_option",{checkout_step:t,checkout_option:o,value:c}),d=t}};Object(n.addAction)(i+"-checkout-render-checkout-form",r,l(0)),Object(n.addAction)(i+"-checkout-set-email-address",r,l(1)),Object(n.addAction)(i+"-checkout-set-shipping-address",r,l(2)),Object(n.addAction)(i+"-checkout-set-billing-address",r,l(3)),Object(n.addAction)(i+"-checkout-set-phone-number",r,e=>{let{step:t,...o}=e;l("shipping"===t?2:3)(o)}),Object(n.addAction)(i+"-checkout-set-selected-shipping-rate",r,e=>{let{shippingRateId:t}=e;p({step:4,option:Object(c.__)("Shipping Method","woo-gutenberg-products-block"),value:t})()}),Object(n.addAction)(i+"-checkout-set-active-payment-method",r,e=>{let{paymentMethodSlug:t}=e;p({step:5,option:Object(c.__)("Payment Method","woo-gutenberg-products-block"),value:t})()}),Object(n.addAction)(i+"-checkout-submit",r,()=>{s("add_payment_info")}),Object(n.addAction)(i+"-cart-add-item",r,e=>{let{product:t,quantity:o=1}=e;s("add_to_cart",{event_category:"ecommerce",event_label:Object(c.__)("Add to Cart","woo-gutenberg-products-block"),items:[a(t,o)]})}),Object(n.addAction)(i+"-cart-remove-item",r,e=>{let{product:t,quantity:o=1}=e;s("remove_from_cart",{event_category:"ecommerce",event_label:Object(c.__)("Remove Cart Item","woo-gutenberg-products-block"),items:[a(t,o)]})}),Object(n.addAction)(i+"-cart-set-item-quantity",r,e=>{let{product:t,quantity:o=1}=e;s("change_cart_quantity",{event_category:"ecommerce",event_label:Object(c.__)("Change Cart Item Quantity","woo-gutenberg-products-block"),items:[a(t,o)]})}),Object(n.addAction)(i+"-product-list-render",r,e=>{let{products:t,listName:o=Object(c.__)("Product List","woo-gutenberg-products-block")}=e;0!==t.length&&s("view_item_list",{event_category:"engagement",event_label:Object(c.__)("Viewing products","woo-gutenberg-products-block"),items:t.map((e,t)=>({...u(e,o),list_position:t+1}))})}),Object(n.addAction)(i+"-product-view-link",r,e=>{let{product:t,listName:o}=e;s("select_content",{content_type:"product",items:[u(t,o)]})}),Object(n.addAction)(i+"-product-search",r,e=>{let{searchTerm:t}=e;s("search",{search_term:t})}),Object(n.addAction)(i+"-product-render",r,e=>{let{product:t,listName:o}=e;t&&s("view_item",{items:[u(t,o)]})}),Object(n.addAction)(i+"-store-notice-create",r,e=>{let{status:t,content:o}=e;"error"===t&&s("exception",{description:o,fatal:!1})})}]); \ No newline at end of file diff --git a/build/wc-blocks-middleware.asset.php b/build/wc-blocks-middleware.asset.php new file mode 100644 index 00000000000..33363782ddc --- /dev/null +++ b/build/wc-blocks-middleware.asset.php @@ -0,0 +1 @@ + array('wp-api-fetch', 'wp-polyfill'), 'version' => 'f7867bf157944dafb05bb7f1c1ec6b0c'); \ No newline at end of file diff --git a/build/wc-blocks-middleware.js b/build/wc-blocks-middleware.js new file mode 100644 index 00000000000..9c6032bdae3 --- /dev/null +++ b/build/wc-blocks-middleware.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksMiddleware=function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=142)}({11:function(e,t){e.exports=window.wp.apiFetch},142:function(e,t,o){"use strict";o.r(t);var n=o(11),r=o.n(n);let i="",c=0;try{const e=window.localStorage.getItem("storeApiNonce"),t=e?JSON.parse(e):{};i=(null==t?void 0:t.nonce)||"",c=(null==t?void 0:t.timestamp)||0}catch{}const u=(e,t)=>{e!==i&&(c&&t{const t=e.headers||{};return e.headers={...t,"X-WC-Store-API-Nonce":i},e};r.a.use((e,t)=>{var o,n;return(e=>{const t=e.url||e.path;return!(!t||!e.method||"GET"===e.method)&&null!==/wc\/store\//.exec(t)})(e)&&(e=a(e),Array.isArray(null===(o=e)||void 0===o||null===(n=o.data)||void 0===n?void 0:n.requests)&&(e.data.requests=e.data.requests.map(a))),t(e,t)}),r.a.setNonce=e=>{const t="function"==typeof(null==e?void 0:e.get)?e.get("X-WC-Store-API-Nonce"):e["X-WC-Store-API-Nonce"],o="function"==typeof(null==e?void 0:e.get)?e.get("X-WC-Store-API-Nonce-Timestamp"):e["X-WC-Store-API-Nonce-Timestamp"];t&&u(t,o)},u(wcBlocksMiddlewareConfig.storeApiNonce,wcBlocksMiddlewareConfig.storeApiNonceTimestamp)}}); \ No newline at end of file diff --git a/build/wc-blocks-registry.asset.php b/build/wc-blocks-registry.asset.php new file mode 100644 index 00000000000..571710ebd16 --- /dev/null +++ b/build/wc-blocks-registry.asset.php @@ -0,0 +1 @@ + array('wp-deprecated', 'wp-element', 'wp-polyfill'), 'version' => '33084e0ae39059f24e379034789fc3a3'); \ No newline at end of file diff --git a/build/wc-blocks-registry.js b/build/wc-blocks-registry.js new file mode 100644 index 00000000000..7e9e5e31806 --- /dev/null +++ b/build/wc-blocks-registry.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksRegistry=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=137)}({0:function(e,t){e.exports=window.wp.element},137:function(e,t,n){"use strict";n.r(t),n.d(t,"registerPaymentMethod",(function(){return g})),n.d(t,"registerExpressPaymentMethod",(function(){return v})),n.d(t,"registerPaymentMethodExtensionCallbacks",(function(){return w})),n.d(t,"__experimentalDeRegisterPaymentMethod",(function(){return k})),n.d(t,"__experimentalDeRegisterExpressPaymentMethod",(function(){return M})),n.d(t,"getPaymentMethods",(function(){return P})),n.d(t,"getExpressPaymentMethods",(function(){return T})),n.d(t,"getRegisteredBlockComponents",(function(){return C})),n.d(t,"getRegisteredInnerBlocks",(function(){return x})),n.d(t,"registerBlockComponent",(function(){return O})),n.d(t,"registerInnerBlock",(function(){return S}));var o=n(6),r=n.n(o),a=n(15),i=n.n(a),s=n(0);const c={},l=c,u=(e,t,n)=>{const o=((e,t)=>n=>((null==n?void 0:n.paymentRequirements)||[]).every(e=>t.includes(e))&&e(n))(e,t);return Object.values(l).some(e=>n in e)?((e,t,n)=>o=>{let r=e(o);if(r){const e={};Object.entries(t).forEach(t=>{let[o,r]=t;e[o]=r[n]}),r=Object.keys(e).every(t=>{try{return e[t](o)}catch(e){return console.error(`Error when executing callback for ${n} in ${t}`,e),!0}})}return r})(o,l,n):o},p=(e,t)=>{if(null!==e&&!Object(s.isValidElement)(e))throw new TypeError(`The ${t} property for the payment method must be a React element or null.`)},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=t.reduce((t,n)=>(e.hasOwnProperty(n)||t.push(n),t),[]);if(n.length>0)throw new TypeError("The payment method configuration object is missing the following properties:"+n.join(", "))},m=()=>null;class h{constructor(e){var t,n,o,r;h.assertValidConfig(e),this.name=e.name,this.label=e.label,this.placeOrderButtonLabel=e.placeOrderButtonLabel,this.ariaLabel=e.ariaLabel,this.content=e.content,this.savedTokenComponent=e.savedTokenComponent,this.icons=e.icons||null,this.edit=e.edit,this.paymentMethodId=e.paymentMethodId||this.name,this.supports={showSavedCards:(null==e||null===(t=e.supports)||void 0===t?void 0:t.showSavedCards)||(null==e||null===(n=e.supports)||void 0===n?void 0:n.savePaymentInfo)||!1,showSaveOption:(null==e||null===(o=e.supports)||void 0===o?void 0:o.showSaveOption)||!1,features:(null==e||null===(r=e.supports)||void 0===r?void 0:r.features)||["products"]},this.canMakePaymentFromConfig=e.canMakePayment}get canMakePayment(){return u(this.canMakePaymentFromConfig,this.supports.features,this.name)}}i()(h,"assertValidConfig",e=>{var t,n,o,a,i,c,l;if(e.savedTokenComponent=e.savedTokenComponent||Object(s.createElement)(m,null),d(e,["name","label","ariaLabel","content","edit","canMakePayment"]),"string"!=typeof e.name)throw new Error("The name property for the payment method must be a string");if(void 0!==e.icons&&!Array.isArray(e.icons)&&null!==e.icons)throw new Error("The icons property for the payment method must be an array or null.");if("string"!=typeof e.paymentMethodId&&void 0!==e.paymentMethodId)throw new Error("The paymentMethodId property for the payment method must be a string or undefined (in which case it will be the value of the name property).");if("string"!=typeof e.placeOrderButtonLabel&&void 0!==e.placeOrderButtonLabel)throw new TypeError("The placeOrderButtonLabel property for the payment method must be a string");if(((e,t)=>{if(null!==e&&!Object(s.isValidElement)(e)&&"string"!=typeof e)throw new TypeError("The label property for the payment method must be a React element, a string, or null.")})(e.label),p(e.content,"content"),p(e.edit,"edit"),p(e.savedTokenComponent,"savedTokenComponent"),"string"!=typeof e.ariaLabel)throw new TypeError("The ariaLabel property for the payment method must be a string");if("function"!=typeof e.canMakePayment)throw new TypeError("The canMakePayment property for the payment method must be a function.");if(void 0!==(null===(t=e.supports)||void 0===t?void 0:t.showSavedCards)&&"boolean"!=typeof(null===(n=e.supports)||void 0===n?void 0:n.showSavedCards))throw new TypeError("If the payment method includes the `supports.showSavedCards` property, it must be a boolean");if(void 0!==(null===(o=e.supports)||void 0===o?void 0:o.savePaymentInfo)&&r()("Passing savePaymentInfo when registering a payment method.",{alternative:"Pass showSavedCards and showSaveOption",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3686"}),void 0!==(null===(a=e.supports)||void 0===a?void 0:a.features)&&!Array.isArray(null===(i=e.supports)||void 0===i?void 0:i.features))throw new Error("The features property for the payment method must be an array or undefined.");if(void 0!==(null===(c=e.supports)||void 0===c?void 0:c.showSaveOption)&&"boolean"!=typeof(null===(l=e.supports)||void 0===l?void 0:l.showSaveOption))throw new TypeError("If the payment method includes the `supports.showSaveOption` property, it must be a boolean")});class f{constructor(e){var t;f.assertValidConfig(e),this.name=e.name,this.content=e.content,this.edit=e.edit,this.paymentMethodId=e.paymentMethodId||this.name,this.supports={features:(null==e||null===(t=e.supports)||void 0===t?void 0:t.features)||["products"]},this.canMakePaymentFromConfig=e.canMakePayment}get canMakePayment(){return u(this.canMakePaymentFromConfig,this.supports.features,this.name)}}i()(f,"assertValidConfig",e=>{var t,n;if(d(e,["name","content","edit"]),"string"!=typeof e.name)throw new TypeError("The name property for the express payment method must be a string");if("string"!=typeof e.paymentMethodId&&void 0!==e.paymentMethodId)throw new Error("The paymentMethodId property for the payment method must be a string or undefined (in which case it will be the value of the name property).");if(void 0!==(null===(t=e.supports)||void 0===t?void 0:t.features)&&!Array.isArray(null===(n=e.supports)||void 0===n?void 0:n.features))throw new Error("The features property for the payment method must be an array or undefined.");if(p(e.content,"content"),p(e.edit,"edit"),"function"!=typeof e.canMakePayment)throw new TypeError("The canMakePayment property for the express payment method must be a function.")});const y={},b={},g=e=>{let t;"function"==typeof e?(t=e(h),r()("Passing a callback to registerPaymentMethod()",{alternative:"a config options object",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3404"})):t=new h(e),t instanceof h&&(y[t.name]=t)},v=e=>{let t;"function"==typeof e?(t=e(f),r()("Passing a callback to registerExpressPaymentMethod()",{alternative:"a config options object",plugin:"woocommerce-gutenberg-products-block",link:"https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/3404"})):t=new f(e),t instanceof f&&(b[t.name]=t)},w=(e,t)=>{c[e]?console.error(`The namespace provided to registerPaymentMethodExtensionCallbacks must be unique. Callbacks have already been registered for the ${e} namespace.`):(c[e]={},Object.entries(t).forEach(t=>{let[n,o]=t;"function"==typeof o?c[e][n]=o:console.error(`All callbacks provided to registerPaymentMethodExtensionCallbacks must be functions. The callback for the ${n} payment method in the ${e} namespace was not a function.`)}))},k=e=>{delete y[e]},M=e=>{delete b[e]},P=()=>y,T=()=>b,E={};function C(e){return{..."object"==typeof E[e]&&Object.keys(E[e]).length>0?E[e]:{},...E.any}}function x(e){return r()("getRegisteredInnerBlocks",{version:"2.8.0",alternative:"getRegisteredBlockComponents",plugin:"WooCommerce Blocks"}),C(e)}function O(e){e.context||(e.context="any"),j(e,"context","string"),j(e,"blockName","string"),I(e,"component");const{context:t,blockName:n,component:o}=e;E[t]||(E[t]={}),E[t][n]=o}const I=(e,t)=>{if(e[t]){if("function"==typeof e[t])return;if(e[t].$$typeof&&e[t].$$typeof===Symbol.for("react.lazy"))return}throw new Error(`Incorrect value for the ${t} argument when registering a block component. Component must be a valid React Element or Lazy callback.`)},j=(e,t,n)=>{const o=typeof e[t];if(o!==n)throw new Error(`Incorrect value for the ${t} argument when registering a block component. It was a ${o}, but must be a ${n}.`)};function S(e){r()("registerInnerBlock",{version:"2.8.0",alternative:"registerBlockComponent",plugin:"WooCommerce Blocks",hint:'"main" has been replaced with "context" and is now optional.'}),j(e,"main","string"),O({...e,context:e.main})}},15: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},6:function(e,t){e.exports=window.wp.deprecated}}); \ No newline at end of file diff --git a/build/wc-blocks-shared-context.asset.php b/build/wc-blocks-shared-context.asset.php new file mode 100644 index 00000000000..a5103e9f737 --- /dev/null +++ b/build/wc-blocks-shared-context.asset.php @@ -0,0 +1 @@ + array('wp-element', 'wp-polyfill'), 'version' => 'c37d38aefaa9e278c7b8e3d184a7058f'); \ No newline at end of file diff --git a/build/wc-blocks-shared-context.js b/build/wc-blocks-shared-context.js new file mode 100644 index 00000000000..4c46dc4e21b --- /dev/null +++ b/build/wc-blocks-shared-context.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksSharedContext=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=140)}({0:function(e,t){e.exports=window.wp.element},125:function(e,t,r){"use strict";var n=r(126);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,a,c){if(c!==n){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return r.PropTypes=r,r}},126:function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},140:function(e,t,r){"use strict";r.r(t),r.d(t,"useInnerBlockLayoutContext",(function(){return i})),r.d(t,"InnerBlockLayoutContextProvider",(function(){return u})),r.d(t,"useProductDataContext",(function(){return l})),r.d(t,"ProductDataContextProvider",(function(){return d}));var n=r(0),o=r(16),a=r.n(o);const c=Object(n.createContext)({parentName:"",parentClassName:"",isLoading:!1}),i=()=>Object(n.useContext)(c),u=e=>{let{parentName:t="",parentClassName:r="",children:o}=e;const a={parentName:t,parentClassName:r};return Object(n.createElement)(c.Provider,{value:a},o)};u.propTypes={children:a.a.node,parentName:a.a.string,parentClassName:a.a.string};const s={id:0,name:"",parent:0,type:"simple",variation:"",permalink:"",sku:"",short_description:"",description:"",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:"0",regular_price:"0",sale_price:"0",price_range:null},price_html:"",average_rating:"0",review_count:0,images:[],categories:[],tags:[],attributes:[],variations:[],has_options:!1,is_purchasable:!1,is_in_stock:!1,is_on_backorder:!1,low_stock_remaining:null,sold_individually:!1,quantity_limit:99,add_to_cart:{text:"Add to cart",description:"Add to cart",url:""}},p=Object(n.createContext)({product:s,hasContext:!1}),l=()=>Object(n.useContext)(p),d=e=>{let{product:t=null,children:r,isLoading:o=!1}=e;const a={product:t||s,hasContext:!0};return Object(n.createElement)(p.Provider,{value:a},o?Object(n.createElement)("div",{className:"is-loading"},r):r)};d.propTypes={children:a.a.node,product:a.a.object}},16:function(e,t,r){e.exports=r(125)()}}); \ No newline at end of file diff --git a/build/wc-blocks-shared-hocs.asset.php b/build/wc-blocks-shared-hocs.asset.php new file mode 100644 index 00000000000..e255069a0a5 --- /dev/null +++ b/build/wc-blocks-shared-hocs.asset.php @@ -0,0 +1 @@ + array('wc-blocks-shared-context', 'wp-api-fetch', 'wp-element', 'wp-polyfill'), 'version' => '62ad3fdebe194702a0a778770e4d03dd'); \ No newline at end of file diff --git a/build/wc-blocks-shared-hocs.js b/build/wc-blocks-shared-hocs.js new file mode 100644 index 00000000000..192157defe0 --- /dev/null +++ b/build/wc-blocks-shared-hocs.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcBlocksSharedHocs=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=139)}({0:function(e,t){e.exports=window.wp.element},10:function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t{const{productId:t,OriginalComponent:r}=e,[n,o]=Object(c.useState)(null),[u,i]=Object(c.useState)(!0);return Object(c.useEffect)(()=>{e.product&&(o(e.product),i(!1))},[e.product]),Object(c.useEffect)(()=>{t>0&&(i(!0),a()({path:"/wc/store/products/"+t}).then(e=>{o(e)}).catch(async()=>{o(null)}).finally(()=>{i(!1)}))},[t]),u||n?Object(c.createElement)(s.ProductDataContextProvider,{product:n,isLoading:u},Object(c.createElement)(r,e)):null},l=e=>t=>{const r=Object(s.useProductDataContext)();return t.product||!r.hasContext?Object(c.createElement)(i,o()({},t,{OriginalComponent:e})):Object(c.createElement)(e,t)},f=e=>t=>r=>{const n=((e,t)=>{const r=[];return Object.keys(e).forEach(n=>{if(void 0!==t[n])switch(e[n].type){case"boolean":r[n]="false"!==t[n]&&!1!==t[n];break;case"number":r[n]=parseInt(t[n],10);break;case"array":case"object":r[n]=JSON.parse(t[n]);break;default:r[n]=t[n]}else r[n]=e[n].default}),r})(e,r);return Object(c.createElement)(t,o()({},r,n))}},20:function(e,t){e.exports=window.wc.wcBlocksSharedContext}}); \ No newline at end of file diff --git a/build/wc-blocks-style-rtl.css b/build/wc-blocks-style-rtl.css new file mode 100644 index 00000000000..b64180d081d --- /dev/null +++ b/build/wc-blocks-style-rtl.css @@ -0,0 +1 @@ +.wc-block-link-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.wc-block-link-button,.wc-block-link-button:active,.wc-block-link-button:focus,.wc-block-link-button:hover{background:transparent}.wc-block-suspense-placeholder{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.wc-block-suspense-placeholder>*{visibility:hidden}.wc-block-suspense-placeholder:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-suspense-placeholder{-webkit-animation:none;animation:none}}.wc-block-suspense-placeholder:before{content:" "}.wc-block-grid__products .wc-block-grid__product-image{text-decoration:none;display:block;position:relative}.wc-block-grid__products .wc-block-grid__product-image a{text-decoration:none;border:0;outline:0;box-shadow:none}.wc-block-grid__products .wc-block-grid__product-image img{height:auto;width:100%}.wc-block-grid__products .wc-block-grid__product-image img[hidden]{display:none}.wc-block-grid__products .wc-block-grid__product-image img[alt=""]{border:1px solid #f2f2f2}.edit-post-visual-editor .editor-block-list__block .wc-block-grid__product-title,.editor-styles-wrapper .wc-block-grid__product-title,.wc-block-grid__product-title{font-family:inherit;line-height:1.2em;font-weight:700;padding:0;color:inherit;font-size:inherit;display:block}.wc-block-grid__product-price{display:block}.wc-block-grid__product-price .wc-block-grid__product-price__regular{margin-left:.5em}.wc-block-grid__product-add-to-cart.wp-block-button{word-break:break-word;white-space:normal}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link{word-break:break-word;white-space:normal;margin:0 auto!important;display:inline-flex;justify-content:center;text-align:center;padding:.5em 1em;font-size:1em}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.loading{opacity:.25}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.added:after{font-family:WooCommerce;content:"";margin-right:.5em;display:inline-block;width:auto;height:auto}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.loading:after{font-family:WooCommerce;content:"";-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite;margin-right:.5em;display:inline-block;width:auto;height:auto}.has-5-columns:not(.alignfull) .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-6-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-7-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-8-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-9-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after{content:"";margin:0}.wc-block-grid__product-rating{display:block}.wc-block-grid__product-rating .star-rating,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;margin:0 auto;text-align:right}.wc-block-grid__product-rating .star-rating:before,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars:before{content:"SSSSS";top:0;right:0;left:0;position:absolute;opacity:.5;color:#aaa;white-space:nowrap}.wc-block-grid__product-rating .star-rating span,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars span{overflow:hidden;top:0;right:0;left:0;position:absolute;padding-top:1.5em}.wc-block-grid__product-rating .star-rating span:before,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars span:before{content:"SSSSS";top:0;right:0;left:0;position:absolute;color:#000;white-space:nowrap}.wc-block-grid__product-onsale{font-size:.875em;padding:.25em .75em;display:inline-block;width:auto;border:1px solid #43454b;border-radius:3px;color:#43454b;background:#fff;text-align:center;text-transform:uppercase;font-weight:600;z-index:9;position:relative}.wc-block-grid__product .wc-block-grid__product-image,.wc-block-grid__product .wc-block-grid__product-title{margin:0 0 12px}.wc-block-grid__product .wc-block-grid__product-add-to-cart,.wc-block-grid__product .wc-block-grid__product-onsale,.wc-block-grid__product .wc-block-grid__product-price,.wc-block-grid__product .wc-block-grid__product-rating{margin:0 auto 12px}.theme-twentysixteen .wc-block-grid .price ins{color:#77a464}.theme-twentynineteen .wc-block-grid__product{font-size:.88889em}.theme-twentynineteen .wc-block-components-product-sale-badge,.theme-twentynineteen .wc-block-components-product-title,.theme-twentynineteen .wc-block-grid__product-onsale,.theme-twentynineteen .wc-block-grid__product-title{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.theme-twentynineteen .wc-block-grid__product-title:before{display:none}.theme-twentynineteen .wc-block-components-product-sale-badge,.theme-twentynineteen .wc-block-grid__product-onsale{line-height:1}.theme-twentynineteen .editor-styles-wrapper .wp-block-button .wp-block-button__link:not(.has-text-color){color:#fff}.theme-twentytwenty .wc-block-grid__product-link{color:#000}.theme-twentytwenty .wc-block-components-product-title,.theme-twentytwenty .wc-block-grid__product-title{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;color:#cd2653;font-size:1em}.theme-twentytwenty .wp-block-columns .wc-block-components-product-title{margin-top:0}.theme-twentytwenty .wc-block-components-product-price .woocommerce-Price-amount,.theme-twentytwenty .wc-block-components-product-price__value,.theme-twentytwenty .wc-block-grid__product-price .woocommerce-Price-amount,.theme-twentytwenty .wc-block-grid__product-price__value{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;font-size:.9em}.theme-twentytwenty .wc-block-components-product-price del,.theme-twentytwenty .wc-block-grid__product-price del{opacity:.5}.theme-twentytwenty .wc-block-components-product-price ins,.theme-twentytwenty .wc-block-grid__product-price ins{text-decoration:none}.theme-twentytwenty .star-rating,.theme-twentytwenty .wc-block-grid__product-rating{font-size:.7em}.theme-twentytwenty .star-rating .wc-block-components-product-rating__stars,.theme-twentytwenty .star-rating .wc-block-grid__product-rating__stars,.theme-twentytwenty .wc-block-grid__product-rating .wc-block-components-product-rating__stars,.theme-twentytwenty .wc-block-grid__product-rating .wc-block-grid__product-rating__stars{line-height:1}.theme-twentytwenty .wc-block-components-product-button>.wp-block-button__link,.theme-twentytwenty .wc-block-grid__product-add-to-cart>.wp-block-button__link{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif}.theme-twentytwenty .wc-block-components-product-sale-badge,.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{background:#cd2653;color:#fff;font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;font-weight:700;letter-spacing:-.02em;line-height:1.2;text-transform:uppercase}.theme-twentytwenty .wc-block-grid__products .wc-block-components-product-sale-badge{position:static}.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-image .wc-block-components-product-sale-badge{position:absolute}.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale:not(.wc-block-components-product-sale-badge){position:absolute;left:4px;top:4px;z-index:1}.theme-twentytwenty .wc-block-active-filters__title,.theme-twentytwenty .wc-block-attribute-filter__title,.theme-twentytwenty .wc-block-price-filter__title,.theme-twentytwenty .wc-block-stock-filter__title{font-size:1em}.theme-twentytwenty .wc-block-active-filters .wc-block-active-filters__clear-all{font-size:.75em}.theme-twentytwenty .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link{font-size:.75em;padding:.5em}@media only screen and (min-width:768px){.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{font-size:.875em;padding:.5em}}@media only screen and (min-width:1168px){.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{font-size:.875em;padding:.5em}}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.screen-reader-text:focus{background-color:#fff;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#2b2d2f;display:block;font-size:.875rem;font-weight:700;height:auto;right:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.wc-block-components-product-add-to-cart-attribute-picker{margin:0;flex-basis:100%}.wc-block-components-product-add-to-cart-attribute-picker label{display:block;font-size:1em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__container{position:relative}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select{margin:0 0 .75em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select select{min-width:60%;min-height:1.75em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error{margin-bottom:24px}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error select{border-color:#cc1818}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error select:focus{outline-color:#cc1818}.wc-block-components-product-add-to-cart{margin:0;display:flex;flex-wrap:wrap}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button{margin:0 0 .75em}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button .wc-block-components-button__text{display:block}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button .wc-block-components-button__text>svg{fill:currentColor;vertical-align:top;width:1.5em;height:1.5em;margin:-.25em .5em -.25em 0}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity{margin:0 0 .75em 1em;flex-basis:5em;padding:.618em;background:#fff;border:1px solid #ccc;border-radius:2px;color:#43454b;box-shadow:inset 0 1px 1px rgba(0,0,0,.125);text-align:center}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button>*,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity>*,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button>*,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity>*{visibility:hidden}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button:after,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity:after,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button:after,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity{-webkit-animation:none;animation:none}}.wc-block-grid .wc-block-components-product-add-to-cart{justify-content:center}.wc-block-components-product-add-to-cart-notice{margin:0}.wp-block-button.wc-block-components-product-button{word-break:break-word;white-space:normal;margin-top:0;margin-bottom:12px}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button{word-break:break-word;white-space:normal;margin:0 auto;display:inline-flex;justify-content:center}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-width:8em;min-height:3em}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder>*{visibility:hidden}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-width:8em;min-height:3em}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button>*{visibility:hidden}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button{-webkit-animation:none;animation:none}}.theme-twentytwentyone .editor-styles-wrapper .wc-block-components-product-button .wp-block-button__link{background-color:var(--button--color-background);color:var(--button--color-text);border-color:var(--button--color-background)}.wc-block-components-product-category-list{margin-top:0;margin-bottom:.75em}.wc-block-components-product-category-list ul{margin:0;padding:0;display:inline}.wc-block-components-product-category-list ul li{display:inline;list-style:none}.wc-block-components-product-category-list ul li:after{content:", "}.wc-block-components-product-category-list ul li:last-child:after{content:""}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image,.wc-block-components-product-image{margin-top:0;margin-bottom:12px;text-decoration:none;display:block;position:relative}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image a,.wc-block-components-product-image a{text-decoration:none;border:0;outline:0;box-shadow:none}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img,.wc-block-components-product-image img{vertical-align:middle;width:100%}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img[hidden],.wc-block-components-product-image img[hidden]{display:none}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img[alt=""],.wc-block-components-product-image img[alt=""]{border:1px solid #f2f2f2}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-left,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-left{position:absolute;right:4px;top:4px;left:auto;margin:0}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-center,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-center{position:absolute;top:4px;right:50%;left:auto;transform:translateX(50%);margin:0}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-right,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-right{position:absolute;left:4px;top:4px;right:auto;margin:0}.is-loading .wc-block-components-product-image{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.is-loading .wc-block-components-product-image>*{visibility:hidden}.is-loading .wc-block-components-product-image:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-image{-webkit-animation:none;animation:none}}.wc-block-components-product-rating{display:block;margin-top:0;margin-bottom:12px}.wc-block-components-product-rating__stars{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;margin:0 auto;text-align:right}.wc-block-components-product-rating__stars:before{content:"SSSSS";top:0;right:0;left:0;position:absolute;opacity:.5;color:#aaa;white-space:nowrap}.wc-block-components-product-rating__stars span{overflow:hidden;top:0;right:0;left:0;position:absolute;padding-top:1.5em}.wc-block-components-product-rating__stars span:before{content:"SSSSS";top:0;right:0;left:0;position:absolute;color:#000;white-space:nowrap}.wc-block-single-product .wc-block-components-product-rating__stars{margin:0}.wc-block-components-product-sale-badge{margin:0 auto 12px;font-size:.875em;padding:.25em .75em;display:inline-block;width:auto;border:1px solid #43454b;border-radius:3px;color:#43454b;background:#fff;text-align:center;text-transform:uppercase;font-weight:600;z-index:9;position:static}.wc-block-components-product-sku{margin-top:0;margin-bottom:12px;display:block;text-transform:uppercase;font-size:.875em}.wc-block-components-product-stock-indicator{margin-top:0;margin-bottom:.75em;display:block;font-size:.875em}.wc-block-components-product-stock-indicator--in-stock{color:#4ab866}.wc-block-components-product-stock-indicator--out-of-stock{color:#cc1818}.wc-block-components-product-stock-indicator--available-on-backorder,.wc-block-components-product-stock-indicator--low-stock{color:#f0b849}.wc-block-components-product-summary{margin-top:0;margin-bottom:12px}.is-loading .wc-block-components-product-summary:before{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;border-radius:.25rem;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;content:".";display:block;width:100%;height:6em}.is-loading .wc-block-components-product-summary:before>*{visibility:hidden}.is-loading .wc-block-components-product-summary:before:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-summary:before{-webkit-animation:none;animation:none}}.wc-block-components-product-tag-list{margin-top:0;margin-bottom:.75em}.wc-block-components-product-tag-list ul{margin:0;padding:0;display:inline}.wc-block-components-product-tag-list ul li{display:inline;list-style:none}.wc-block-components-product-tag-list ul li:after{content:", "}.wc-block-components-product-tag-list ul li:last-child:after{content:""}.wc-block-components-product-title{margin-top:0;margin-bottom:12px}.wc-block-grid .wc-block-components-product-title{line-height:1.5;font-weight:700;padding:0;color:inherit;font-size:inherit;display:block}.is-loading .wc-block-components-product-title:before{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;content:".";display:inline-block;width:7em}.is-loading .wc-block-components-product-title:before>*{visibility:hidden}.is-loading .wc-block-components-product-title:before:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-title:before{-webkit-animation:none;animation:none}}.is-loading .wc-block-grid .wc-block-components-product-title:before{width:10em}.wc-block-components-product-title--align-left{text-align:right}.wc-block-components-product-title--align-center{text-align:center}.wc-block-components-product-title--align-right{text-align:left}.wc-block-components-error{display:flex;padding:40px 0;margin:40px 0;align-items:center;justify-content:center;flex-direction:column;color:#757575;text-align:center}.wc-block-components-error__header{font-size:2em;margin:0;color:#646970}.wc-block-components-error__image{width:25%;margin:0 0 24px}.wc-block-components-error__text{margin:1em 0 0;color:#8c8f94;font-size:1.25em;max-width:60ch}.wc-block-components-error__message{margin:1em auto 0;font-style:italic;color:#8c8f94;max-width:60ch}.wc-block-error__button{margin:40px 0 0}.wc-block-components-button:not(.is-link){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;align-items:center;background-color:#1e1e1e;color:#fff;display:inline-flex;font-weight:700;min-height:3em;justify-content:center;line-height:1;padding:0 1em;text-align:center;text-decoration:none;text-transform:none;position:relative}.wc-block-components-button:not(.is-link):active,.wc-block-components-button:not(.is-link):disabled,.wc-block-components-button:not(.is-link):focus,.wc-block-components-button:not(.is-link):hover{background-color:#1e1e1e;color:#fff}.wc-block-components-button:not(.is-link) .wc-block-components-button__text{display:block}.wc-block-components-button:not(.is-link) .wc-block-components-button__text>svg{fill:currentColor}.wc-block-components-button:not(.is-link) .wc-block-components-spinner+.wc-block-components-button__text{visibility:hidden}.wc-block-components-form{counter-reset:checkout-step}.wc-block-components-form .wc-block-components-checkout-step{position:relative;border:none;padding:0 24px 0 0;background:none;margin:0}.is-mobile .wc-block-components-form .wc-block-components-checkout-step,.is-small .wc-block-components-form .wc-block-components-checkout-step{padding-right:0}.wc-block-components-checkout-step--disabled{opacity:.6}.wc-block-components-checkout-step__container{position:relative}.wc-block-components-checkout-step__content>*{margin-bottom:1em}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__content>:last-child{margin-bottom:0;padding-bottom:1.5em}.wc-block-components-checkout-step__heading{display:flex;justify-content:space-between;align-content:center;flex-wrap:wrap;margin:.75em 0 1em;position:relative;align-items:center;gap:1em}.wc-block-components-checkout-step:first-child .wc-block-components-checkout-step__heading,.wc-block-components-express-payment-continue-rule+.wc-block-components-checkout-step .wc-block-components-checkout-step__heading{margin-top:0}.wc-block-components-checkout-step__title{margin:0 0 0 12px}.wc-block-components-checkout-step__heading-content{font-size:.75em}.wc-block-components-checkout-step__heading-content a{font-weight:700;color:inherit}.wc-block-components-checkout-step__description{font-size:.875em;line-height:1.25;margin-bottom:16px}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;background:transparent;counter-increment:checkout-step;content:" " counter(checkout-step) ".";content:" " counter(checkout-step) "."/"";position:absolute;width:24px;right:-24px;top:0;text-align:center;transform:translateX(50%)}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after{content:"";height:100%;border-right:1px solid;opacity:.3;position:absolute;right:-24px;top:0}.is-mobile .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before,.is-small .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before{position:static;transform:none;right:auto;top:auto;content:counter(checkout-step) ". ";content:counter(checkout-step) ". "/""}.is-mobile .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after,.is-small .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after{content:unset}.editor-styles-wrapper .wp-block h4.wc-block-components-checkout-step__title{font-size:1em;line-height:24px;margin:0 0 0 12px}.wc-block-components-order-summary .wc-block-components-panel__button{padding-top:0;margin-top:0}.wc-block-components-order-summary .wc-block-components-panel__content{margin-bottom:0}.wc-block-components-order-summary__content{display:table;width:100%}.wc-block-components-order-summary-item{position:relative;font-size:.875em;display:flex;padding-bottom:1px;padding-top:16px;width:100%}.wc-block-components-order-summary-item:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-order-summary-item:first-child{padding-top:0}.wc-block-components-order-summary-item:last-child>div{padding-bottom:0}.wc-block-components-order-summary-item:last-child:after{display:none}.wc-block-components-order-summary-item .wc-block-components-product-metadata{font-size:1em}.wc-block-components-order-summary-item__description,.wc-block-components-order-summary-item__image{display:table-cell;vertical-align:top}.wc-block-components-order-summary-item__image{width:48px;padding-bottom:16px;position:relative}.wc-block-components-order-summary-item__image>img{width:48px;max-width:48px}.wc-block-components-order-summary-item__quantity{align-items:center;background:#fff;border:2px solid;border-radius:1em;box-shadow:0 0 0 2px #fff;color:#000;display:flex;line-height:1;min-height:20px;padding:0 .4em;position:absolute;justify-content:center;min-width:20px;left:0;top:0;transform:translate(-50%,-50%);white-space:nowrap;z-index:1}.wc-block-components-order-summary-item__description{padding-right:24px;padding-left:12px;padding-bottom:16px}.wc-block-components-order-summary-item__description .wc-block-components-product-metadata,.wc-block-components-order-summary-item__description p{line-height:1.375;margin-top:4px}.wc-block-components-order-summary-item__total-price{font-weight:700;margin-right:auto;text-align:left}.wc-block-components-order-summary-item__individual-prices{display:block}.wc-block-components-payment-method-icons{margin:0 0 14px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center}.wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{display:inline-block;margin:0 4px 2px;padding:0;width:auto;max-width:38px;height:24px;max-height:24px}.wc-block-components-payment-method-icons--align-left{justify-content:flex-start}.wc-block-components-payment-method-icons--align-left .wc-block-components-payment-method-icon{margin-right:0;margin-left:8px}.wc-block-components-payment-method-icons--align-right{justify-content:flex-end}.wc-block-components-payment-method-icons--align-right .wc-block-components-payment-method-icon{margin-left:0;margin-right:8px}.wc-block-components-payment-method-icons:last-child{margin-bottom:0}.is-mobile .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon,.is-small .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{height:16px}.wc-block-components-payment-method-label--with-icon{display:inline-block;vertical-align:middle}.wc-block-components-payment-method-label--with-icon>img,.wc-block-components-payment-method-label--with-icon>svg{vertical-align:middle;margin:-2px 0 0 4px}.is-mobile .wc-block-components-payment-method-label--with-icon>img,.is-mobile .wc-block-components-payment-method-label--with-icon>svg,.is-small .wc-block-components-payment-method-label--with-icon>img,.is-small .wc-block-components-payment-method-label--with-icon>svg{display:none}.editor-styles-wrapper .wc-block-components-checkout-policies,.wc-block-components-checkout-policies{font-size:.75em;text-align:center;list-style:none outside;line-height:1;margin:24px 0}.wc-block-components-checkout-policies__item{list-style:none outside;display:inline-block;padding:0 .25em;margin:0}.wc-block-components-checkout-policies__item:not(:first-child){border-right:1px solid #ccc}.wc-block-components-checkout-policies__item>a{color:inherit;padding:0 .25em}.wc-block-components-product-badge{font-size:.75em;border-radius:2px;border:1px solid;display:inline-block;font-weight:600;padding:0 .66em;text-transform:uppercase;white-space:nowrap}.wc-block-components-product-details.wc-block-components-product-details{list-style:none;margin:.5em 0;padding:0}.wc-block-components-product-details.wc-block-components-product-details:last-of-type{margin-bottom:0}.wc-block-components-product-details.wc-block-components-product-details li{margin-right:0}.wc-block-components-product-details__name,.wc-block-components-product-details__value{display:inline-block}.is-large:not(.wc-block-checkout) .wc-block-components-product-details__name{font-weight:700}img.wc-block-components-product-image[alt=""]{border:1px solid #f2f2f2}.wc-block-components-product-metadata{font-size:.75em}.wc-block-components-product-metadata .wc-block-components-product-metadata__description>p,.wc-block-components-product-metadata .wc-block-components-product-metadata__variation-data{margin:.25em 0}.wc-block-components-checkout-return-to-cart-button{box-shadow:none;color:inherit;padding-right:calc(24px + .25em);position:relative;text-decoration:none}.wc-block-components-checkout-return-to-cart-button svg{right:0;position:absolute;transform:translateY(-50%);top:50%}.wc-block-components-shipping-calculator-address{margin-bottom:0}.wc-block-components-shipping-calculator-address__button{width:100%;margin-top:1.5em}.wc-block-components-shipping-calculator{padding:.5em 0 .75em}.wc-block-components-shipping-rates-control__package .wc-block-components-panel__button{margin-bottom:0;margin-top:0;padding-bottom:.75em;padding-top:.75em}.wc-block-components-shipping-rates-control__package .wc-block-components-panel__content,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control .wc-block-components-radio-control__option-layout,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control__option-layout{padding-bottom:0}.wc-block-components-shipping-rates-control__package-items{font-size:.875em;display:block;list-style:none;margin:0;padding:0}.wc-block-components-shipping-rates-control__package-item{overflow-wrap:anywhere;word-break:break-word;-ms-word-break:break-all;display:inline-block;margin:0;padding:0}.wc-block-components-shipping-rates-control__package-item:not(:last-child):after{content:", ";white-space:pre}.wc-block-components-totals-coupon .wc-block-components-panel__button{margin-top:0;padding-top:0}.wc-block-components-totals-coupon .wc-block-components-panel__content{padding-bottom:0}.wc-block-components-totals-coupon__form{display:flex;width:100%;margin-bottom:0}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__input{margin-bottom:0;margin-top:0;flex-grow:1}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button{height:3em;flex-shrink:0;margin-right:8px;padding-right:24px;padding-left:24px;white-space:nowrap}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button.no-margin{margin:0}.wc-block-components-totals-coupon__content{flex-direction:column;position:relative}.wc-block-components-totals-discount__coupon-list{list-style:none;margin:0;padding:0}.wc-block-components-totals-discount .wc-block-components-totals-item__value{color:#4ab866}.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,.wc-block-components-totals-footer-item .wc-block-components-totals-item__value{font-size:1.25em}.wc-block-components-totals-footer-item .wc-block-components-totals-item__label{font-weight:700}.wc-block-components-totals-footer-item .wc-block-components-totals-footer-item-tax{margin-bottom:0}.wc-block-components-totals-shipping fieldset.wc-block-components-totals-shipping__fieldset{background-color:transparent;margin:0;padding:0;border:0}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__via{margin-bottom:16px}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__description,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__label,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__secondary-description,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__secondary-label{flex-basis:100%;text-align:right}.wc-block-components-totals-shipping .wc-block-components-shipping-rates-control__no-results-notice{margin:0 0 .75em}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:active,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:focus,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:hover{background:transparent;opacity:.8}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:active,.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:focus,.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:hover{background:transparent}.editor-styles-wrapper .wc-block-components-checkbox-list,.wc-block-components-checkbox-list{margin:0;padding:0;list-style:none outside}.editor-styles-wrapper .wc-block-components-checkbox-list li,.wc-block-components-checkbox-list li{margin:0 0 4px;padding:0;list-style:none outside}.editor-styles-wrapper .wc-block-components-checkbox-list li.show-less button,.editor-styles-wrapper .wc-block-components-checkbox-list li.show-more button,.wc-block-components-checkbox-list li.show-less button,.wc-block-components-checkbox-list li.show-more button{background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li,.wc-block-components-checkbox-list.is-loading li{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li>*,.wc-block-components-checkbox-list.is-loading li>*{visibility:hidden}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li:after,.wc-block-components-checkbox-list.is-loading li:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li,.wc-block-components-checkbox-list.is-loading li{-webkit-animation:none;animation:none}}.wc-block-components-chip{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;align-items:center;border:0;display:inline-flex;padding:.125em .5em .25em;margin:0 0 .365em .365em;border-radius:0;line-height:1;max-width:100%}.wc-block-components-chip,.wc-block-components-chip:active,.wc-block-components-chip:focus,.wc-block-components-chip:hover{background:#e0e0e0;color:#1e1e1e}.wc-block-components-chip.wc-block-components-chip--radius-small{border-radius:3px}.wc-block-components-chip.wc-block-components-chip--radius-medium{border-radius:.433em}.wc-block-components-chip.wc-block-components-chip--radius-large{border-radius:2em;padding-right:.75em;padding-left:.75em}.wc-block-components-chip .wc-block-components-chip__text{flex-grow:1}.wc-block-components-chip.is-removable{padding-left:.5em}.wc-block-components-chip.is-removable .wc-block-components-chip__text{padding-left:.25em}.wc-block-components-chip .wc-block-components-chip__remove{font-size:.75em;background:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}.wc-block-components-chip .wc-block-components-chip__remove-icon{vertical-align:middle}.theme-twentytwentyone .wc-block-components-chip,.theme-twentytwentyone .wc-block-components-chip:active,.theme-twentytwentyone .wc-block-components-chip:focus,.theme-twentytwentyone .wc-block-components-chip:hover{background:#fff}.theme-twentytwentyone .wc-block-components-chip:active button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip:focus button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip:hover button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background){background:transparent}.wc-block-components-chip__remove:focus,.wc-block-components-chip__remove:hover,button.wc-block-components-chip:focus>.wc-block-components-chip__remove,button.wc-block-components-chip:hover>.wc-block-components-chip__remove{fill:#cc1818}.wc-block-components-chip__remove:disabled,button.wc-block-components-chip:disabled>.wc-block-components-chip__remove{fill:#949494;cursor:not-allowed}.wc-block-components-combobox .wc-block-components-combobox-control,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-combobox .wc-block-components-combobox-control .components-base-control__field,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-base-control__field{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-combobox .wc-block-components-combobox-control .components-combobox-control__suggestions-container,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-combobox-control__suggestions-container{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;position:relative}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;box-sizing:border-box;outline:inherit;border:1px solid #50575e;background:#fff;box-shadow:none;color:#2b2d2f;font-family:inherit;font-weight:400;height:3em;letter-spacing:inherit;line-height:1;padding:1.5em 16px .25em;text-align:right;text-overflow:ellipsis;text-transform:none;white-space:nowrap;width:100%;opacity:1;border-radius:4px}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true],.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true]{background-color:#fff;color:#2b2d2f;outline:0;box-shadow:0 0 0 1px #50575e}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true],.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true]{border-bottom-left-radius:0;border-bottom-right-radius:0}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus{background-color:rgba(0,0,0,.1);color:#fff;box-shadow:0 0 0 1px hsla(0,0%,100%,.4)}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list{position:absolute;z-index:10;background-color:#fff;border:1px solid #50575e;border-top:0;margin:3em 0 0;padding:0;max-height:300px;min-width:100%;overflow:auto;color:#2b2d2f}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list{background-color:#1e1e1e;color:#fff}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion{font-size:1em;color:#757575;cursor:default;list-style:none;margin:0;padding:.25em 16px}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected{background-color:#ddd}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected{background-color:rgba(0,0,0,.4)}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-highlighted,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:active,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:focus,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:hover,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-highlighted,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:active,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:focus,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:hover{background-color:#00669e;color:#fff}.wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;line-height:1.375;position:absolute;transform:translateY(.75em);transform-origin:top right;transition:all .2s ease;color:#757575;z-index:1;margin:0 17px 0 0;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 32px);white-space:nowrap}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{color:hsla(0,0%,100%,.6)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{transition:none}}.wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label{transform:translateY(4px) scale(.75)}.wc-block-components-combobox.has-error .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control label.components-base-control__label{color:#cc1818}.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:active,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:hover,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:active,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:hover{border-color:#cc1818}.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus{box-shadow:0 0 0 1px #cc1818}.wc-block-components-country-input{margin-top:1.5em}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}@-webkit-keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(480px)}}@keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(480px)}}@media only screen and (max-width:480px){@-webkit-keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(100vw)}}@keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(100vw)}}}.wc-block-components-drawer__screen-overlay{background-color:rgba(95,95,95,.35);bottom:0;right:0;position:fixed;left:0;top:0;transition:opacity .3s;z-index:9999;opacity:1}.wc-block-components-drawer__screen-overlay--with-slide-out{transition:opacity .3s}.wc-block-components-drawer__screen-overlay--with-slide-in{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:fadein;animation-name:fadein}.wc-block-components-drawer__screen-overlay--is-hidden{pointer-events:none;opacity:0}.wc-block-components-drawer{position:relative;background:#fff;display:block;height:100%;right:100%;overflow:auto;position:fixed;left:0;top:0;transform:translateX(480px);width:480px}.wc-block-components-drawer:after{border-style:solid;border-width:0 1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}@media only screen and (max-width:480px){.wc-block-components-drawer{transform:translateX(100vw);width:100vw}}.wc-block-components-drawer__screen-overlay--with-slide-out .wc-block-components-drawer{transition:transform .3s}.wc-block-components-drawer__screen-overlay--with-slide-in .wc-block-components-drawer{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:slidein;animation-name:slidein}.wc-block-components-drawer__screen-overlay--is-hidden .wc-block-components-drawer{transform:translateX(0)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-drawer,.wc-block-components-drawer__screen-overlay{-webkit-animation-name:none!important;animation-name:none!important;transition:none!important}}.wc-block-components-drawer .components-modal__content{padding:40px 16px}.wc-block-components-drawer .components-modal__header{position:relative}.wc-block-components-drawer .components-modal__header .components-button{border:0;border-radius:0;vertical-align:baseline;background:transparent;position:absolute;left:0;top:0;padding:1em;margin:-1em}.wc-block-components-drawer .components-modal__header .components-button>span{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.wc-block-components-drawer .components-modal__header-heading{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;font-size:1.25rem;word-break:break-word}.wc-block-components-dropdown-selector{max-width:300px;position:relative;width:100%}.wc-block-components-dropdown-selector__input-wrapper{background:#fff;border:1px solid #50575e;color:#2b2d2f;align-items:center;border-radius:4px;cursor:text;display:flex;flex-wrap:wrap;padding:2px 8px}.is-disabled .wc-block-components-dropdown-selector__input-wrapper{background-color:#e0e0e0}.is-multiple.has-checked>.wc-block-components-dropdown-selector__input-wrapper{padding:2px 4px}.is-open>.wc-block-components-dropdown-selector__input-wrapper{border-radius:4px 4px 0 0}.wc-block-components-dropdown-selector__input{font-size:.875em;line-height:1.2857142857;margin:.1875em 0;min-width:0;padding:.1875em 0}.is-single .wc-block-components-dropdown-selector__input{width:100%}.is-single .wc-block-components-dropdown-selector__input:active,.is-single .wc-block-components-dropdown-selector__input:focus,.is-single .wc-block-components-dropdown-selector__input:hover{outline:0}.is-single.has-checked.is-open .wc-block-components-dropdown-selector__input{margin-bottom:1.5px;margin-top:1.5px}.is-single.has-checked:not(.is-open) .wc-block-components-dropdown-selector__input{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px;position:absolute}.is-multiple .wc-block-components-dropdown-selector__input{flex:1;min-width:0}.is-multiple .wc-block-components-dropdown-selector__input,.is-single .wc-block-components-dropdown-selector__input:first-child{background:transparent;border:0}.is-multiple .wc-block-components-dropdown-selector__input:active,.is-multiple .wc-block-components-dropdown-selector__input:focus,.is-multiple .wc-block-components-dropdown-selector__input:hover,.is-single .wc-block-components-dropdown-selector__input:first-child:active,.is-single .wc-block-components-dropdown-selector__input:first-child:focus,.is-single .wc-block-components-dropdown-selector__input:first-child:hover{outline:0}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove{background-color:transparent;border:0;color:inherit;font-size:inherit;font-weight:inherit;text-transform:none}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:active,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:focus,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:hover,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:active,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:focus,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:hover{background-color:transparent;text-decoration:none}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value{font-size:.875em;align-items:center;color:#757575;display:inline-flex;margin:.1875em 0;padding:.1875em 0;width:100%}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label{flex-grow:1;line-height:1.2857142857;padding:0;text-align:right}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove{background-color:transparent;border:0;display:inline-block;line-height:1;padding:0 .3em 0 0}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove>svg{display:block}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-chip{font-size:.875em;margin-top:.1875em;margin-bottom:.1875em;line-height:1.2857142857}.wc-block-components-dropdown-selector__list{background-color:#fff;margin:-1px 0 0;padding:0;position:absolute;right:0;left:0;top:100%;max-height:300px;overflow-y:auto;z-index:1}.wc-block-components-dropdown-selector__list:not(:empty){border:1px solid #9f9f9f}.wc-block-components-dropdown-selector__list-item{font-size:.875em;color:#757575;cursor:default;list-style:none;margin:0;padding:0 4px}.wc-block-components-dropdown-selector__list-item.is-selected{background-color:#ddd}.wc-block-components-dropdown-selector__list-item.is-highlighted,.wc-block-components-dropdown-selector__list-item:active,.wc-block-components-dropdown-selector__list-item:focus,.wc-block-components-dropdown-selector__list-item:hover{background-color:#00669e;color:#fff}.wc-filter-element-label-list-count{opacity:.6}.wc-filter-element-label-list-count:before{content:" ("}.wc-filter-element-label-list-count:after{content:")"}.wc-block-components-filter-submit-button{display:block;margin-right:auto;white-space:nowrap}.wc-block-components-formatted-money-amount{white-space:nowrap}.wc-block-components-load-more{text-align:center;width:100%}.wc-block-components-loading-mask{position:relative;min-height:34px;pointer-events:none}.wc-block-components-loading-mask .components-spinner{position:absolute;margin:0;top:50%;right:50%;transform:translate(50%,-50%)}.wc-block-components-loading-mask .wc-block-components-loading-mask__children{opacity:.25}.wc-block-components-pagination{margin:0 auto 16px}.wc-block-components-pagination__ellipsis,.wc-block-components-pagination__page{font-size:1em;color:#333;display:inline-block;font-weight:400}.wc-block-components-pagination__page{border-color:transparent;padding:.3em .6em;min-width:2.2em}@media(max-width:782px){.wc-block-components-pagination__page{padding:.1em .2em;min-width:1.6em}}.wc-block-components-pagination__page:not(.toggle){background-color:transparent}.wc-block-components-pagination__ellipsis{padding:.3em}@media(max-width:782px){.wc-block-components-pagination__ellipsis{padding:.1em}}.wc-block-components-pagination__page--active[disabled]{color:#333;font-weight:700;opacity:1!important}.wc-block-components-pagination__page--active[disabled]:focus,.wc-block-components-pagination__page--active[disabled]:hover{background-color:inherit;color:#333;opacity:1!important}html[dir=rtl] .wc-block-components-pagination-page--arrow span{display:inline-block;transform:scaleX(-1)}.wc-block-components-price-slider{margin-bottom:24px}.wc-block-components-price-slider.wc-block-components-price-slider--has-filter-button .wc-block-components-price-slider__controls{justify-content:flex-end}.wc-block-components-price-slider.wc-block-components-price-slider--has-filter-button .wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--max{margin-right:0;margin-left:10px}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;z-index:1;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount>*,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button>*,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount:after,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button:after,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}.wc-block-components-price-slider__range-input-wrapper{padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:9px;clear:both;position:relative;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);background:#e1e1e1;margin:15px 0}.wc-block-components-price-slider__range-input-progress{height:9px;width:100%;position:absolute;right:0;top:0;--track-background:linear-gradient(90deg,transparent var(--low),var(--range-color) 0,var(--range-color) var(--high),transparent 0) no-repeat 0 100%/100% 100%;--range-color:#af7dd1;background:var(--track-background)}.wc-block-components-price-slider__controls{display:flex}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount{margin:0;border-radius:4px;width:auto;max-width:100px;min-width:0}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--min{margin-left:10px}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--max{margin-right:auto}.wc-block-components-price-slider__range-input{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:0;display:block;position:relative;pointer-events:none;outline:none!important;position:absolute;right:0;top:0}.wc-block-components-price-slider__range-input::-webkit-slider-runnable-track{cursor:default;height:1px;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-webkit-slider-thumb{background-color:transparent;background-position:100% 0;width:28px;height:23px;border:0;padding:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:-6px 0 0}.wc-block-components-price-slider__range-input::-webkit-slider-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input::-webkit-slider-progress{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-focus-outer{border:0}.wc-block-components-price-slider__range-input::-moz-range-track{cursor:default;height:1px;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-progress{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-thumb{background-color:transparent;background-position:100% 0;width:28px;height:23px;border:0;padding:0;margin:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input::-ms-thumb{background-color:transparent;background-position:100% 0;width:28px;height:23px;border:0;padding:0;margin:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-ms-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-webkit-slider-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-moz-range-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-ms-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min{z-index:21}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-webkit-slider-thumb{margin-right:-2px;background-position-x:right}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-moz-range-thumb{background-position-x:right;transform:translate(2px,4px)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-ms-thumb{background-position-x:right}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max{z-index:20}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-webkit-slider-thumb{background-position-x:left;margin-right:2px}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-moz-range-thumb{background-position-x:left;transform:translate(-2px,4px)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-ms-thumb{background-position-x:left}.rtl .wc-block-components-price-slider__range-input-progress{--track-background:linear-gradient(270deg,transparent var(--low),var(--range-color) 0,var(--range-color) var(--high),transparent 0) no-repeat 0 100%/100% 100%;--range-color:#af7dd1;background:var(--track-background)}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-price-slider__range-input-wrapper{background:transparent;box-shadow:none;height:24px}.wc-block-components-price-slider__range-input-progress{background:#af7dd1;width:100%;top:7px}.wc-block-components-price-slider__range-input{height:24px;pointer-events:auto}.wc-block-components-price-slider__range-input::-ms-track{background:transparent;border-color:transparent;border-width:7px 0;color:transparent}.wc-block-components-price-slider__range-input::-ms-fill-lower{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input::-ms-fill-upper{background:transparent}.wc-block-components-price-slider__range-input::-ms-tooltip{display:none}.wc-block-components-price-slider__range-input::-ms-thumb{transform:translate(-1px);pointer-events:auto}.wc-block-components-price-slider__range-input--max::-ms-fill-upper{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input--max::-ms-fill-lower{background:transparent}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;z-index:1;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}}@media screen and (-ms-high-contrast:active)and (prefers-reduced-motion:reduce),screen and (-ms-high-contrast:none)and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}@supports(-ms-ime-align:auto){.wc-block-components-price-slider__range-input-wrapper{background:transparent;box-shadow:none;height:24px}.wc-block-components-price-slider__range-input-progress{background:#af7dd1;width:100%;top:7px}.wc-block-components-price-slider__range-input{height:24px;pointer-events:auto}.wc-block-components-price-slider__range-input::-ms-track{background:transparent;border-color:transparent;border-width:7px 0;color:transparent}.wc-block-components-price-slider__range-input::-ms-fill-lower{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input::-ms-fill-upper{background:transparent}.wc-block-components-price-slider__range-input::-ms-tooltip{display:none}.wc-block-components-price-slider__range-input::-ms-thumb{transform:translate(-1px);pointer-events:auto}.wc-block-components-price-slider__range-input--max::-ms-fill-upper{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input--max::-ms-fill-lower{background:transparent}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;z-index:1;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.theme-twentytwentyone .wc-block-components-price-slider__range-input-wrapper{background:transparent;border:3px solid;box-sizing:border-box}.theme-twentytwentyone .wc-block-components-price-slider__range-input-progress{--range-color:currentColor;margin:-3px}.theme-twentytwentyone .wc-block-price-filter__range-input{background:transparent;margin:-3px;width:calc(100% + 6px)}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-webkit-slider-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-webkit-slider-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-moz-range-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-moz-range-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-ms-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-ms-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input::-webkit-slider-thumb{margin-top:-9px}.theme-twentytwentyone .wc-block-price-filter__range-input.wc-block-components-price-slider__range-input--max::-moz-range-thumb{transform:translate(-2px,1px)}.theme-twentytwentyone .wc-block-price-filter__range-input.wc-block-components-price-slider__range-input--min::-moz-range-thumb{transform:translate(2px,1px)}.theme-twentytwentyone .wc-block-price-filter__range-input::-ms-track{border-color:transparent!important}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.theme-twentytwentyone .wc-block-components-price-slider__range-input-wrapper{border:0;height:auto;position:relative;height:50px}.theme-twentytwentyone .wc-block-components-price-slider__range-input-progress{display:none}.theme-twentytwentyone .wc-block-price-filter__range-input{height:100%;margin:0;width:100%}}.wc-block-components-product-sort-select{margin-bottom:24px;text-align:right}@-webkit-keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.wc-block-grid{text-align:center}.wc-block-grid__no-products{padding:40px;text-align:center;width:100%}.wc-block-grid__no-products .wc-block-grid__no-products-image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-grid__no-products .wc-block-grid__no-products-title{display:block;margin:0;font-weight:700}.wc-block-grid__no-products .wc-block-grid__no-products-description{display:block;margin:.25em 0 1em}.wc-block-grid__products{display:flex;flex-wrap:wrap;padding:0;margin:0 -8px 16px;background-clip:padding-box}.wc-block-grid__product{box-sizing:border-box;padding:0;margin:0;float:none;width:auto;position:relative;text-align:center;border-right:8px solid transparent;border-left:8px solid transparent;border-bottom:16px solid transparent;list-style:none}.wc-block-grid__product.wc-block-grid__product{box-sizing:border-box}.theme-twentytwenty .wc-block-grid.has-aligned-buttons .wc-block-grid__product,.wc-block-grid.has-aligned-buttons .wc-block-grid__product{display:flex;flex-direction:column}.theme-twentytwenty .wc-block-grid.has-aligned-buttons .wc-block-grid__product>:last-child,.wc-block-grid.has-aligned-buttons .wc-block-grid__product>:last-child{margin-top:auto;margin-bottom:0;padding-bottom:12px}.theme-twentytwenty .wc-block-grid.has-1-columns .wc-block-grid__product,.wc-block-grid.has-1-columns .wc-block-grid__product{flex:1 0 100%;max-width:100%}.theme-twentytwenty .wc-block-grid.has-2-columns .wc-block-grid__product,.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%}.theme-twentytwenty .wc-block-grid.has-3-columns .wc-block-grid__product,.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 33.33333%;max-width:33.3333333333%}.theme-twentytwenty .wc-block-grid.has-4-columns .wc-block-grid__product,.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 25%;max-width:25%}.theme-twentytwenty .wc-block-grid.has-5-columns .wc-block-grid__product,.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 20%;max-width:20%}.theme-twentytwenty .wc-block-grid.has-6-columns .wc-block-grid__product,.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 16.66667%;max-width:16.6666666667%}.theme-twentytwenty .wc-block-grid.has-7-columns .wc-block-grid__product,.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 14.28571%;max-width:14.2857142857%}.theme-twentytwenty .wc-block-grid.has-8-columns .wc-block-grid__product,.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 12.5%;max-width:12.5%}.theme-twentytwenty .wc-block-grid.has-6-columns .wc-block-grid__product,.wc-block-grid.has-6-columns .wc-block-grid__product{font-size:.5em}.theme-twentytwenty .wc-block-grid.has-5-columns .wc-block-grid__product,.theme-twentytwenty .wc-block-grid.has-6-columns.alignfull .wc-block-grid__product,.wc-block-grid.has-5-columns .wc-block-grid__product,.wc-block-grid.has-6-columns.alignfull .wc-block-grid__product{font-size:.58em}.theme-twentytwenty .wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.theme-twentytwenty .wc-block-grid.has-5-columns.alignfull .wc-block-grid__product,.wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-5-columns.alignfull .wc-block-grid__product{font-size:.75em}.theme-twentytwenty .wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull),.wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull){font-size:.92em}@media(max-width:480px){.wc-block-grid.has-2-columns .wc-block-grid__products{display:block}.wc-block-grid.has-2-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-3-columns .wc-block-grid__products{display:block}.wc-block-grid.has-3-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-4-columns .wc-block-grid__products{display:block}.wc-block-grid.has-4-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-5-columns .wc-block-grid__products{display:block}.wc-block-grid.has-5-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-6-columns .wc-block-grid__products{display:block}.wc-block-grid.has-6-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-7-columns .wc-block-grid__products{display:block}.wc-block-grid.has-7-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-8-columns .wc-block-grid__products{display:block}.wc-block-grid.has-8-columns .wc-block-grid__product{margin-right:auto;margin-left:auto;flex:1 0 100%;max-width:100%;padding:0}}@media(min-width:481px)and (max-width:600px){.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-2-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-2-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-3-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-3-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-4-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-4-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-5-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-5-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-6-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-6-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-7-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-7-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-8-columns .wc-block-grid__product:nth-child(odd){padding-left:8px}.wc-block-grid.has-8-columns .wc-block-grid__product:nth-child(2n){padding-right:8px}}.wc-block-components-product-name{font-size:1em;overflow-wrap:anywhere;word-break:break-word;-ms-word-break:break-all}.wc-block-components-product-price--align-left{display:block;text-align:right}.wc-block-components-product-price--align-center{display:block;text-align:center}.wc-block-components-product-price--align-right{display:block;text-align:left}.wc-block-components-product-price__value.is-discounted{margin-right:.5em}.is-loading .wc-block-components-product-price:before{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;content:".";display:inline-block;width:5em}.is-loading .wc-block-components-product-price:before>*{visibility:hidden}.is-loading .wc-block-components-product-price:before:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-price:before{-webkit-animation:none;animation:none}}.wc-block-components-quantity-selector{display:flex;width:107px;border:1px solid #ddd;background:#fff;border-radius:4px;box-sizing:content-box;margin:0 0 .25em}.has-dark-controls .wc-block-components-quantity-selector{background-color:transparent;border-color:hsla(0,0%,100%,.4)}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{font-size:1em;order:2;min-width:40px;flex:1 1 auto;border:0;padding:.4em 0;margin:0;text-align:center;background:transparent;box-shadow:none;color:#000;line-height:1;vertical-align:middle;-moz-appearance:textfield}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{background:#f0f0f0;outline:1px solid #ddd}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:disabled{color:#949494}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{color:#fff;background:transparent}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{background:transparent}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:disabled{color:hsla(0,0%,100%,.3)}.wc-block-components-quantity-selector input::-webkit-inner-spin-button,.wc-block-components-quantity-selector input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button{border:0;padding:0;margin:0;background:none transparent;box-shadow:none;font-size:1em;min-width:30px;cursor:pointer;color:#1e1e1e;font-style:normal;text-align:center;text-decoration:none}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus{outline:2px solid #ddd}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{border:0;padding:0;margin:0;background:none transparent;box-shadow:none;color:#1e1e1e}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus:focus,.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover:focus{outline:2px solid #ddd}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled{color:#949494;cursor:default;border:0;padding:0;margin:0;background:none transparent;box-shadow:none}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled:focus{outline:2px solid #ddd}.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{color:#fff}.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled{color:hsla(0,0%,100%,.3)}.wc-block-components-quantity-selector>.wc-block-components-quantity-selector__button--minus{order:1}.wc-block-components-quantity-selector>.wc-block-components-quantity-selector__button--plus{order:3}.theme-twentyseventeen .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.theme-twentyseventeen .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{background:none transparent}.wc-block-components-radio-control__option{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;display:block;margin:1em 0;padding:0 2.5em 0 0;position:relative}.wc-block-components-radio-control__option:first-child{margin-top:0}.wc-block-components-radio-control__option:last-child{margin-bottom:0}.wc-block-components-radio-control__option-layout{display:table;width:100%}.wc-block-components-radio-control__option .wc-block-components-radio-control__option-layout:after{display:none}.wc-block-components-radio-control__description-group,.wc-block-components-radio-control__label-group{display:table-row}.wc-block-components-radio-control__description-group>span,.wc-block-components-radio-control__label-group>span{display:table-cell}.wc-block-components-radio-control__description-group .wc-block-components-radio-control__secondary-description,.wc-block-components-radio-control__description-group .wc-block-components-radio-control__secondary-label,.wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-description,.wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-label{text-align:left;min-width:50%}.wc-block-components-radio-control__label,.wc-block-components-radio-control__secondary-label{line-height:max(1.5rem,24px)}.wc-block-components-radio-control__description,.wc-block-components-radio-control__secondary-description{font-size:.875em;line-height:20px}.wc-block-components-radio-control .wc-block-components-radio-control__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:2px solid #50575e;border-radius:50%;display:inline-block;height:1.5em;min-height:24px;min-width:24px;width:1.5em;position:absolute;right:0;top:50%;transform:translateY(-50%)}.wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background:#000;border-radius:50%;content:"";display:block;height:.75em;right:50%;margin:0;min-height:12px;min-width:12px;position:absolute;top:50%;transform:translate(50%,-50%);width:.75em}.has-dark-controls .wc-block-components-radio-control .wc-block-components-radio-control__input{border-color:hsla(0,0%,100%,.6);background-color:rgba(0,0,0,.1)}.has-dark-controls .wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background:#fff}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:checked{border-width:2px}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background-color:var(--form--color-text)}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:after{display:none}.is-loading .wc-block-components-review-list-item__text{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;display:block;width:60%}.is-loading .wc-block-components-review-list-item__text>*{visibility:hidden}.is-loading .wc-block-components-review-list-item__text:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__text{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__text:before{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image>*{visibility:hidden}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image:before{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;font-size:1em;width:80px}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author>*{visibility:hidden}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author:before{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__product,.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__rating .wc-block-components-review-list-item__rating__stars>span{display:none}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;height:1em;width:120px}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date>*{visibility:hidden}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date:before{content:" "}.editor-styles-wrapper .wc-block-components-review-list-item__item,.wc-block-components-review-list-item__item{margin:0 0 48px;list-style:none}.wc-block-components-review-list-item__info{display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr;margin-bottom:24px}.wc-block-components-review-list-item__meta{-ms-grid-column:1;grid-column:1;-ms-grid-row:1;grid-row:1}.wc-block-components-review-list-item__item--has-image .wc-block-components-review-list-item__info{-ms-grid-columns:calc(3em + 16px) 1fr;grid-template-columns:calc(3em + 16px) 1fr}.wc-block-components-review-list-item__item--has-image .wc-block-components-review-list-item__meta{-ms-grid-column:2;grid-column:2}.wc-block-components-review-list-item__image{align-items:center;display:flex;height:3em;-ms-grid-column:1;grid-column:1;-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/3;justify-content:center;position:relative;width:3em}.wc-block-components-review-list-item__image>img{display:block;max-height:100%;-o-object-fit:contain;object-fit:contain}.wc-block-components-review-list-item__verified{width:21px;height:21px;text-indent:21px;margin:0;line-height:21px;overflow:hidden;position:absolute;left:-7px;bottom:-7px}.wc-block-components-review-list-item__verified:before{width:21px;height:21px;background:transparent url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="21" height="21" fill="none"%3E%3Ccircle cx="10.5" cy="10.5" r="10.5" fill="%23fff"/%3E%3Cpath fill="%23008A21" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3Cmask id="a" width="17" height="17" x="2" y="2" maskUnits="userSpaceOnUse"%3E%3Cpath fill="%23fff" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3C/mask%3E%3Cg mask="url(%23a)"%3E%3Cpath fill="%23008A21" d="M.5.5h20v20H.5z"/%3E%3C/g%3E%3C/svg%3E') 50% no-repeat;display:block;content:""}.wc-block-components-review-list-item__meta{display:flex;align-items:center;flex-flow:row wrap}.wc-block-components-review-list-item__meta:after{order:3;content:"";flex-basis:100%}.wc-block-components-review-list-item__author,.wc-block-components-review-list-item__product{display:block;font-weight:700;order:1;margin-left:8px}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author{font-weight:400;order:4}.wc-block-components-review-list-item__published-date{order:5}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date{padding-right:8px;position:relative}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date:before{content:"";display:inline-block;margin-right:-8px;border-left:1px solid;opacity:.5;height:1em;vertical-align:middle;position:absolute;top:calc(50% + .1em);transform:translateY(-50%)}.wc-block-components-review-list-item__author:first-child+.wc-block-components-review-list-item__published-date:before,.wc-block-components-review-list-item__rating+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date:before{display:none}.wc-block-components-review-list-item__rating{order:2}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars{font-size:1em;display:block;top:0;overflow:hidden;position:relative;height:1em;line-height:1;width:5.3em;font-family:star;font-weight:400}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars:before{content:"SSSSS";opacity:.25;float:right;top:0;right:0;position:absolute}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars span{overflow:hidden;float:right;top:0;right:0;position:absolute;padding-top:1.5em}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars span:before{content:"SSSSS";top:0;position:absolute;right:0;color:#e6a237}.wc-block-components-review-list-item__text p{font-size:inherit}.wc-block-components-review-list.wc-block-components-review-list{margin:0}.wc-block-components-review-sort-select{text-align:left}.wc-block-components-sidebar-layout{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wc-block-components-sidebar-layout .wc-block-components-main{box-sizing:border-box;margin:0;padding-left:3.7735849057%;width:65%}.wc-block-components-sidebar{box-sizing:border-box;margin:0;padding-right:2.2641509434%;width:35%}.wc-block-components-sidebar .wc-block-components-panel>h2{font-size:1em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.is-medium.wc-block-components-sidebar-layout,.is-mobile.wc-block-components-sidebar-layout,.is-small.wc-block-components-sidebar-layout{flex-direction:column;margin:0 auto 16px}.is-medium.wc-block-components-sidebar-layout .wc-block-components-main,.is-medium.wc-block-components-sidebar-layout .wc-block-components-sidebar,.is-mobile.wc-block-components-sidebar-layout .wc-block-components-main,.is-mobile.wc-block-components-sidebar-layout .wc-block-components-sidebar,.is-small.wc-block-components-sidebar-layout .wc-block-components-main,.is-small.wc-block-components-sidebar-layout .wc-block-components-sidebar{padding:0;width:100%}.is-large .wc-block-components-sidebar .wc-block-components-panel,.is-large .wc-block-components-sidebar .wc-block-components-totals-item{padding-right:16px;padding-left:16px}.is-large .wc-block-components-sidebar .wc-block-components-panel .wc-block-components-totals-item{padding:0}.wc-block-components-sidebar .wc-block-components-panel>h2{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit}.wc-block-components-sidebar .wc-block-components-panel>h2 .wc-block-components-panel__button{font-weight:400}.theme-twentytwenty .wc-block-components-sidebar .wc-block-components-panel>h2{font-size:1.25em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-sort-select{margin-bottom:12px}.wc-block-components-sort-select__label{margin-left:12px;display:inline-block;font-weight:400}.wc-block-components-sort-select__select{font-size:inherit;width:-webkit-max-content;width:-moz-max-content;width:max-content}.wc-block-components-spinner{position:absolute;width:100%;height:100%;color:inherit;box-sizing:content-box;text-align:center;font-size:1.25em}.wc-block-components-spinner:after{content:" ";position:absolute;top:50%;right:50%;margin:-.5em -.5em 0 0;width:1em;height:1em;box-sizing:border-box;transform-origin:50% 50%;transform:translateZ(0) scale(.5);-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:50%;border:.2em solid;border-right:.2em solid transparent;-webkit-animation:spinner__animation 1s linear infinite;animation:spinner__animation 1s linear infinite}.wc-block-components-state-input{margin-top:1.5em}.wc-block-components-tabs .wc-block-components-tabs__list{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item{border:none;flex:auto;background:transparent;padding:12px 16px;color:inherit;outline-offset:-1px;text-align:center;transition:box-shadow .1s linear;box-shadow:inset 0 -1px currentColor;border-radius:0}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item.is-active{box-shadow:inset 0 -3px currentColor;font-weight:600;position:relative}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:focus{outline-offset:-1px;outline:1px dotted currentColor}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:active,.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:hover{background:transparent}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content{font-size:1em;line-height:1;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:inline-block;font-weight:700}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content>img,.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content>svg{height:1.2em;vertical-align:middle;margin:.2em 0 -.2em}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content .wc-block-components-payment-method-icons{margin:.2em 0 -.2em}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{height:1.2em;vertical-align:middle}.wc-block-components-tabs .wc-block-components-tabs__content{padding:16px 0;text-transform:none}.wc-block-components-form .wc-block-components-text-input,.wc-block-components-text-input{position:relative;margin-top:1.5em;white-space:nowrap}.wc-block-components-form .wc-block-components-text-input label,.wc-block-components-text-input label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;position:absolute;transform:translateY(.75em);right:0;top:0;transform-origin:top right;line-height:1.375;color:#757575;transition:transform .2s ease;margin:0 17px 0 0;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 32px);cursor:text}.has-dark-controls .wc-block-components-form .wc-block-components-text-input label,.has-dark-controls .wc-block-components-text-input label{color:hsla(0,0%,100%,.6)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-form .wc-block-components-text-input label,.wc-block-components-text-input label{transition:none}}.wc-block-components-form .wc-block-components-text-input input:-webkit-autofill+label,.wc-block-components-text-input input:-webkit-autofill+label{transform:translateY(4px) scale(.75)}.wc-block-components-form .wc-block-components-text-input.is-active label,.wc-block-components-text-input.is-active label{transform:translateY(4px) scale(.75)}.wc-block-components-form .wc-block-components-text-input input[type=email],.wc-block-components-form .wc-block-components-text-input input[type=number],.wc-block-components-form .wc-block-components-text-input input[type=tel],.wc-block-components-form .wc-block-components-text-input input[type=text],.wc-block-components-form .wc-block-components-text-input input[type=url],.wc-block-components-text-input input[type=email],.wc-block-components-text-input input[type=number],.wc-block-components-text-input input[type=tel],.wc-block-components-text-input input[type=text],.wc-block-components-text-input input[type=url]{font-size:1em;background-color:#fff;padding:.75em 16px;border-radius:4px;border:1px solid #50575e;width:100%;line-height:1.375;font-family:inherit;margin:0;box-sizing:border-box;height:3em;min-height:0;color:#2b2d2f}.wc-block-components-form .wc-block-components-text-input input[type=email]:focus,.wc-block-components-form .wc-block-components-text-input input[type=number]:focus,.wc-block-components-form .wc-block-components-text-input input[type=tel]:focus,.wc-block-components-form .wc-block-components-text-input input[type=text]:focus,.wc-block-components-form .wc-block-components-text-input input[type=url]:focus,.wc-block-components-text-input input[type=email]:focus,.wc-block-components-text-input input[type=number]:focus,.wc-block-components-text-input input[type=tel]:focus,.wc-block-components-text-input input[type=text]:focus,.wc-block-components-text-input input[type=url]:focus{background-color:#fff;color:#2b2d2f;outline:0;box-shadow:0 0 0 1px #50575e}.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=email],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=number],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=tel],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=text],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=url],.has-dark-controls .wc-block-components-text-input input[type=email],.has-dark-controls .wc-block-components-text-input input[type=number],.has-dark-controls .wc-block-components-text-input input[type=tel],.has-dark-controls .wc-block-components-text-input input[type=text],.has-dark-controls .wc-block-components-text-input input[type=url]{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=email]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=number]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=tel]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=text]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=url]:focus,.has-dark-controls .wc-block-components-text-input input[type=email]:focus,.has-dark-controls .wc-block-components-text-input input[type=number]:focus,.has-dark-controls .wc-block-components-text-input input[type=tel]:focus,.has-dark-controls .wc-block-components-text-input input[type=text]:focus,.has-dark-controls .wc-block-components-text-input input[type=url]:focus{background-color:rgba(0,0,0,.1);color:#fff;box-shadow:0 0 0 1px hsla(0,0%,100%,.4)}.wc-block-components-form .wc-block-components-text-input input[type=number],.wc-block-components-text-input input[type=number]{-moz-appearance:textfield}.wc-block-components-form .wc-block-components-text-input input[type=number]::-webkit-inner-spin-button,.wc-block-components-form .wc-block-components-text-input input[type=number]::-webkit-outer-spin-button,.wc-block-components-text-input input[type=number]::-webkit-inner-spin-button,.wc-block-components-text-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.wc-block-components-form .wc-block-components-text-input.is-active input[type=email],.wc-block-components-form .wc-block-components-text-input.is-active input[type=number],.wc-block-components-form .wc-block-components-text-input.is-active input[type=tel],.wc-block-components-form .wc-block-components-text-input.is-active input[type=text],.wc-block-components-form .wc-block-components-text-input.is-active input[type=url],.wc-block-components-text-input.is-active input[type=email],.wc-block-components-text-input.is-active input[type=number],.wc-block-components-text-input.is-active input[type=tel],.wc-block-components-text-input.is-active input[type=text],.wc-block-components-text-input.is-active input[type=url]{padding:1.5em 16px .25em 0}.wc-block-components-form .wc-block-components-text-input.has-error input,.wc-block-components-form .wc-block-components-text-input.has-error input:active,.wc-block-components-form .wc-block-components-text-input.has-error input:focus,.wc-block-components-form .wc-block-components-text-input.has-error input:hover,.wc-block-components-text-input.has-error input,.wc-block-components-text-input.has-error input:active,.wc-block-components-text-input.has-error input:focus,.wc-block-components-text-input.has-error input:hover{border-color:#cc1818}.wc-block-components-form .wc-block-components-text-input.has-error input:focus,.wc-block-components-text-input.has-error input:focus{box-shadow:0 0 0 1px #cc1818}.wc-block-components-form .wc-block-components-text-input.has-error label,.wc-block-components-text-input.has-error label{color:#cc1818}.wc-block-components-form .wc-block-components-text-input:only-child,.wc-block-components-text-input:only-child{margin-top:0}.wc-block-components-textarea{font-size:1em;background-color:#fff;border:1px solid #50575e;border-radius:4px;color:#2b2d2f;font-family:inherit;line-height:1.375;margin:0;padding:.75em 16px;width:100%}.has-dark-controls .wc-block-components-textarea{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-textarea::-moz-placeholder{color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-textarea:-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-textarea::placeholder{color:hsla(0,0%,100%,.6)}.theme-twentytwentyone .has-dark-controls .wc-block-components-textarea{background-color:rgba(0,0,0,.1);color:#fff}.theme-twentytwenty .wc-block-components-title.wc-block-components-title,.wc-block-components-title.wc-block-components-title{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;font-size:1.25em;word-break:break-word}.wc-block-components-notices{display:block;margin-bottom:2em}.wc-block-components-notices .wc-block-components-notices__notice{margin:0;display:flex;flex-wrap:nowrap}.wc-block-components-notices .wc-block-components-notices__notice .components-notice__dismiss{background:transparent none;padding:0;margin:0 auto 0 0;border:0;outline:0;color:currentColor}.wc-block-components-notices .wc-block-components-notices__notice .components-notice__dismiss svg{fill:currentColor;vertical-align:text-top}.wc-block-components-notices .wc-block-components-notices__notice+.wc-block-components-notices__notice{margin-top:1em}.theme-twentytwenty .wc-block-components-notices__notice,.theme-twentytwentyone .wc-block-components-notices__notice{padding:1.5rem 3rem}.wc-block-components-notices__snackbar{position:fixed;bottom:20px;right:16px;width:auto}@media(max-width:782px){.wc-block-components-notices__snackbar{position:fixed;top:10px;right:0;bottom:auto}}@media(max-width:782px){.wc-block-components-notices__snackbar .components-snackbar-list__notice-container{margin-right:10px;margin-left:10px}}.wc-block-components-validation-error{font-size:.75em;color:#cc1818;max-width:100%;white-space:normal}.wc-block-components-validation-error>p{margin:0;padding:4px 0 0}.wc-block-components-select+.wc-block-components-validation-error{margin-bottom:24px}.with-scroll-to-top__scroll-point{position:relative;top:-36px}.is-medium .wc-block-cart__sidebar,.is-mobile .wc-block-cart__sidebar,.is-small .wc-block-cart__sidebar{margin-bottom:24px;order:0}.editor-styles-wrapper .wc-block-cart__empty-cart__title,.wc-block-cart__empty-cart__title{font-size:inherit}.wc-block-cart__submit{position:relative;margin:0 0 16px}.wc-block-cart__submit-button{width:100%;margin:0}.wc-block-cart .wc-block-cart__submit-container{padding:0}@media(min-width:783px){.wc-block-cart .wc-block-cart__submit-container--sticky{display:none}}@media(max-width:782px){.wc-block-cart .wc-block-cart__submit-container--sticky{background:#fff;bottom:0;right:0;padding:16px;position:fixed;width:100%;z-index:9999}.wc-block-cart .wc-block-cart__submit-container--sticky:before{box-shadow:0 -10px 20px 10px currentColor;color:hsla(0,0%,80%,.5);content:"";height:100%;right:0;position:absolute;left:0;top:0}}.wc-block-cart .wc-block-components-shipping-calculator{white-space:nowrap}.wc-block-cart .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.wc-block-cart .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.wc-block-cart .wc-block-components-address-form .wc-block-components-text-input:first-of-type{margin-top:0}table.wc-block-cart-items,table.wc-block-cart-items td,table.wc-block-cart-items th{background:none!important;border:0;margin:0}.editor-styles-wrapper table.wc-block-cart-items,table.wc-block-cart-items{width:100%}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header,table.wc-block-cart-items .wc-block-cart-items__header{font-size:.75em;text-transform:uppercase}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image{width:100px}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product{visibility:hidden}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total{width:100px;text-align:left}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img{width:100%;margin:0}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline;font-size:.75em;text-transform:none;white-space:nowrap}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:active,.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus,.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:active,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover{background:transparent}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name{display:block;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total{font-size:1em;text-align:left;line-height:inherit}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata{margin-bottom:.75em}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row.is-disabled,table.wc-block-cart-items .wc-block-cart-items__row.is-disabled{opacity:.5;pointer-events:none;transition:opacity .2s ease}.wc-block-cart .wc-block-components-totals-footer-item,.wc-block-cart .wc-block-components-totals-taxes{margin:0}.wc-block-cart--is-loading h2 span,.wc-block-cart--is-loading th span,.wc-block-mini-cart__drawer.is-loading h2 span,.wc-block-mini-cart__drawer.is-loading th span{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-width:84px;display:inline-block}.wc-block-cart--is-loading h2 span>*,.wc-block-cart--is-loading th span>*,.wc-block-mini-cart__drawer.is-loading h2 span>*,.wc-block-mini-cart__drawer.is-loading th span>*{visibility:hidden}.wc-block-cart--is-loading h2 span:after,.wc-block-cart--is-loading th span:after,.wc-block-mini-cart__drawer.is-loading h2 span:after,.wc-block-mini-cart__drawer.is-loading th span:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading h2 span,.wc-block-cart--is-loading th span,.wc-block-mini-cart__drawer.is-loading h2 span,.wc-block-mini-cart__drawer.is-loading th span{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading h2 span:before,.wc-block-cart--is-loading th span:before,.wc-block-mini-cart__drawer.is-loading h2 span:before,.wc-block-mini-cart__drawer.is-loading th span:before{content:" "}.wc-block-cart--is-loading h2 span,.wc-block-mini-cart__drawer.is-loading h2 span{min-width:33%}.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-cart--is-loading .wc-block-components-quantity-selector,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.wc-block-cart--is-loading .wc-block-components-product-metadata>*,.wc-block-cart--is-loading .wc-block-components-product-price>*,.wc-block-cart--is-loading .wc-block-components-quantity-selector>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector>*{visibility:hidden}.wc-block-cart--is-loading .wc-block-components-product-metadata:after,.wc-block-cart--is-loading .wc-block-components-product-price:after,.wc-block-cart--is-loading .wc-block-components-quantity-selector:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-cart--is-loading .wc-block-components-quantity-selector,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-name,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-width:84px;display:inline-block}.wc-block-cart--is-loading .wc-block-components-product-name>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name>*{visibility:hidden}.wc-block-cart--is-loading .wc-block-components-product-name:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-components-product-name,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-name:before,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name:before{content:" "}.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata{margin-top:.25em;min-width:8em}.wc-block-cart--is-loading .wc-block-cart-item__remove-link,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__remove-link{visibility:hidden}.wc-block-cart--is-loading .wc-block-cart-item__image>a,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;display:block}.wc-block-cart--is-loading .wc-block-cart-item__image>a>*,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a>*{visibility:hidden}.wc-block-cart--is-loading .wc-block-cart-item__image>a:after,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-cart-item__image>a,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price{max-width:3em;display:block;margin-top:.25em}.wc-block-cart--is-loading .wc-block-components-product-price:before,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price:before{content:" "}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-height:460px}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card>*,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card>*{visibility:hidden}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card:after,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card:before,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card:before{content:" "}.wc-block-components-sidebar-layout.wc-block-cart--skeleton{display:none}.is-loading+.wc-block-components-sidebar-layout.wc-block-cart--skeleton{display:flex}.wc-block-cart-item__total-price-and-sale-badge-wrapper{display:flex;flex-direction:column;align-items:flex-end}.wc-block-cart-item__total-price-and-sale-badge-wrapper .wc-block-components-sale-badge{margin-top:4px}.is-medium.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,.is-mobile .wc-block-cart-item__total .wc-block-components-sale-badge,.is-mobile.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,.is-small .wc-block-cart-item__total .wc-block-components-sale-badge,.is-small.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title{display:none}.is-medium table.wc-block-cart-items td,.is-mobile table.wc-block-cart-items td,.is-small table.wc-block-cart-items td{padding:0}.is-medium table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-medium table.wc-block-cart-items .wc-block-cart-items__header,.is-mobile table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-mobile table.wc-block-cart-items .wc-block-cart-items__header,.is-small table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-small table.wc-block-cart-items .wc-block-cart-items__header{display:none}.is-medium table.wc-block-cart-items .wc-block-cart-items__row,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row,.is-small table.wc-block-cart-items .wc-block-cart-items__row{position:relative;display:-ms-grid;display:grid;-ms-grid-columns:80px 132px;grid-template-columns:80px 132px;padding:16px 0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row:after,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row:after,.is-small table.wc-block-cart-items .wc-block-cart-items__row:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image{-ms-grid-column:1;grid-column-start:1;-ms-grid-row:1;grid-row-start:1;padding-left:16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product{-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:2;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:stretch;justify-self:stretch;padding:0 0 16px 16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity{-ms-grid-column:1;grid-column-start:1;-ms-grid-row:2;grid-row-start:2;vertical-align:bottom;padding-left:16px;-ms-grid-row-align:end;align-self:end;padding-top:16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total{-ms-grid-row:1;grid-row-start:1}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount{display:inline-block}.is-large.wc-block-cart{margin-bottom:3em}.is-large.wc-block-cart .wc-block-cart-items{position:relative}.is-large.wc-block-cart .wc-block-cart-items:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.is-large.wc-block-cart .wc-block-cart-items th{padding:.25rem 0 .25rem 16px;white-space:nowrap}.is-large.wc-block-cart .wc-block-cart-items td{position:relative;padding:16px 16px 16px 0;vertical-align:top}.is-large.wc-block-cart .wc-block-cart-items td:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.is-large.wc-block-cart .wc-block-cart-items th:last-child{padding-left:0}.is-large.wc-block-cart .wc-block-cart-items td:last-child{padding-left:16px}.is-large.wc-block-cart .wc-block-cart__sidebar>div:not(.wc-block-components-totals-wrapper){margin-right:16px;margin-left:16px}.is-large.wc-block-cart .wc-block-components-radio-control__input{right:0}.is-large.wc-block-cart .wc-block-cart__totals-title{border:0;border-radius:0;margin:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;box-shadow:none;display:inline;background:transparent;font-size:.75em;display:block;font-weight:600;padding:.25rem 0;text-align:left;text-transform:uppercase}.is-large.wc-block-cart .wc-block-components-sidebar .wc-block-components-shipping-calculator,.is-large.wc-block-cart .wc-block-components-sidebar .wc-block-components-shipping-rates-control__package:not(.wc-block-components-panel){padding-right:16px;padding-left:16px}.is-large.wc-block-cart .wc-block-cart__payment-options{padding:16px 0 0}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-empty-cart-block{display:none}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-items-block{box-sizing:border-box;margin:0;padding-left:3.7735849057%;width:65%;min-height:10em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block{min-height:15em;outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block>*{visibility:hidden}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block{-webkit-animation:none;animation:none}}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-totals-block{box-sizing:border-box;margin:0;padding-right:2.2641509434%;width:35%;min-height:12em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block{min-height:3em;outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;margin:0 0 1em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block>*{visibility:hidden}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block:after,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block:after,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block:after,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block{-webkit-animation:none;animation:none}}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block{height:20em}@media only screen and (max-width:700px){.wp-block-woocommerce-cart.is-loading{padding-top:16px}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block{flex-direction:column;margin:0 auto 16px}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-items-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-totals-block{padding:0;width:100%}}.wc-block-checkout-error{padding:40px;text-align:center;width:100%}.wc-block-checkout-error .wc-block-checkout-error__image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-checkout-error .wc-block-checkout-error__title{display:block;margin:0;font-weight:700}.wc-block-checkout-error .wc-block-checkout-error__description{display:block;margin:.25em 0 1em}.wc-block-checkout-empty{padding:40px;text-align:center;width:100%}.wc-block-checkout-empty .wc-block-checkout-empty__image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-checkout-empty .wc-block-checkout-empty__title{display:block;margin:0;font-weight:700}.wc-block-checkout-empty .wc-block-checkout-empty__description{display:block;margin:.25em 0 1em}.wc-block-checkout__actions{display:flex;justify-content:space-between;align-items:center}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:50%;padding:1em;height:auto}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button .wc-block-components-button__text{line-height:24px}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button .wc-block-components-button__text>svg{fill:#fff;vertical-align:top}.is-mobile .wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button{display:none}.is-mobile .wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:100%}.is-large .wc-block-checkout__actions{position:relative;padding:1.5em 0}.is-large .wc-block-checkout__actions:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-checkout__form{margin:0;max-width:100%}.is-medium .wc-block-checkout__main,.is-mobile .wc-block-checkout__main,.is-small .wc-block-checkout__main{order:1}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form{margin-right:-6px;margin-left:-6px}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form:after,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form:after,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form:after{content:"";clear:both;display:block}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input{float:right;margin-right:6px;margin-left:6px;position:relative;width:calc(50% - 12px)}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2){margin-top:0}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company{width:calc(100% - 12px)}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox{clear:both}.components-placeholder.wc-block-checkout__no-shipping-placeholder{margin-bottom:16px}.components-placeholder.wc-block-checkout__no-shipping-placeholder *{pointer-events:all}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset{display:block}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset .components-button{background-color:#1e1e1e;color:#fff}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset .wc-block-checkout__no-shipping-placeholder-description{display:block;margin:.25em 0 1em}.wc-block-checkout__shipping-option .wc-block-components-radio-control__option{position:relative;margin:0;padding:.75em 2.5em .75em 0}.wc-block-checkout__shipping-option .wc-block-components-radio-control__option:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-checkout__shipping-option .wc-block-components-shipping-rates-control__no-results-notice{margin:.75em 0}.wc-block-checkout__terms{margin:1.5em 0}.wc-block-checkout__terms textarea{top:-5px;position:relative}.wc-block-checkout__terms.wc-block-checkout__terms--disabled{opacity:.6}.wc-block-checkout__sidebar .wc-block-components-product-name{display:block;color:inherit;flex-grow:1;flex-basis:0}.wc-block-checkout__sidebar .wc-block-components-totals-footer-item,.wc-block-checkout__sidebar .wc-block-components-totals-taxes{margin:0;padding:0}.is-medium .wc-block-checkout__sidebar,.is-mobile .wc-block-checkout__sidebar,.is-small .wc-block-checkout__sidebar{margin-bottom:24px;order:0}.wc-block-checkout__add-note{margin:1.5em 0}.is-medium .wc-block-checkout__add-note,.is-mobile .wc-block-checkout__add-note,.is-small .wc-block-checkout__add-note{position:relative;margin-bottom:1em;margin-top:1em;padding:1em 0}.is-medium .wc-block-checkout__add-note:after,.is-mobile .wc-block-checkout__add-note:after,.is-small .wc-block-checkout__add-note:after{border-style:solid;border-width:1px 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-checkout__add-note .wc-block-components-textarea{margin-top:16px}.wc-block-checkout__order-notes.wc-block-components-checkout-step{padding-right:0}.wp-block-woocommerce-checkout{margin:0}.wp-block-woocommerce-checkout .with-scroll-to-top__scroll-point{top:-96px}.wp-block-woocommerce-checkout.is-loading{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{width:35%;padding-right:2.2641509434%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block{width:65%;padding-left:3.7735849057%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{box-sizing:border-box;margin:0}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;margin:0 0 1.5em;display:none}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div>*,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div>*{visibility:hidden}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div:after,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div:after{content:" ";display:block;position:absolute;right:0;left:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(-90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div{-webkit-animation:none;animation:none}}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-contact-information-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-payment-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-contact-information-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-payment-block{min-height:10em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-shipping-address-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-shipping-address-block{min-height:24em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-actions-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-actions-block{width:50%;min-height:4em;margin-right:50%;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-order-summary-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-order-summary-block{min-height:47em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel>h2,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2{font-size:1em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel>h2 .wc-block-components-panel__button,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2 .wc-block-components-panel__button{font-weight:400}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-totals-item,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item{padding-right:16px;padding-left:16px}@media only screen and (max-width:700px){.wp-block-woocommerce-checkout.is-loading{flex-direction:column;margin:0 auto 16px}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{padding:0;width:100%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item{padding-right:0;padding-left:0}}.theme-twentytwenty .wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2{font-size:1.25em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-mini-cart__badge,.wc-block-mini-cart__quantity-badge{align-items:center;display:flex}.wc-block-mini-cart__badge{background:#fff;border:.15em solid;border-radius:1em;box-sizing:border-box;color:#000;font-size:.875em;font-weight:600;height:1.4285714286em;justify-content:center;margin-right:-.7142857143em;min-width:1.4285714286em;padding:0 .25em;transform:translateY(-50%);white-space:nowrap;z-index:1}.wc-block-mini-cart__icon{display:block;height:1.5em;width:1.5em;stroke:currentColor}.wc-block-mini-cart{background-color:transparent!important;display:flex;justify-content:flex-end}.wc-block-mini-cart.align-center{justify-content:center}.wc-block-mini-cart.align-left{justify-content:flex-start}.wc-block-mini-cart.is-transparent .wc-block-mini-cart__button{background-color:transparent!important}.wc-block-mini-cart__button{align-items:center;border:none;color:inherit;display:flex;font-weight:400;padding:.75em .5em}.wc-block-mini-cart__button:hover{opacity:.6}.wc-block-mini-cart__amount{display:none}.wc-block-mini-cart__tax-label{margin-left:.5em}@media screen and (min-width:768px){.wc-block-mini-cart__amount{display:initial;font-weight:600;margin-left:8px}}.modal-open .wc-block-mini-cart__button{pointer-events:none}.wc-block-mini-cart__drawer{font-size:1rem}.wc-block-mini-cart__drawer .components-modal__content{padding:0;position:relative}.wc-block-mini-cart__drawer .components-modal__header{position:absolute;top:40px;left:16px}.wc-block-mini-cart__drawer .wc-block-mini-cart__items{flex-grow:1;overflow-y:auto;padding:0 16px}.wc-block-mini-cart__drawer .wc-block-mini-cart__items .wc-block-cart-items__row:last-child:after{content:none}.wp-block-woocommerce-mini-cart-contents{background:#fff;box-sizing:border-box;display:flex;flex-direction:column;height:100vh;padding:0;justify-content:center}.wc-block-mini-cart__title{font-size:1.25em;margin:40px 16px 0}.wc-block-mini-cart__footer{border-top:1px solid #ddd;padding:24px 16px}.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal{font-weight:600;margin-bottom:16px}.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description{display:none;font-size:.75em;font-weight:400}@media only screen and (min-width:480px){.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description{display:unset}}.wc-block-mini-cart__footer-actions{display:flex;gap:16px}.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button{background-color:transparent;border:1px solid #1e1e1e;color:#1e1e1e;display:none;flex-grow:1;font-weight:600}@media only screen and (min-width:480px){.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button{display:inline-flex}}.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout{border:1px solid #1e1e1e;flex-grow:1;font-weight:600}.wc-block-mini-cart__footer .wc-block-components-payment-method-icons{margin-top:16px}.wc-block-components-express-payment{margin:auto;position:relative}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons{list-style:none;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0;margin:0;overflow:hidden;text-align:center}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons>li{margin:0}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons>li>img{width:100%;height:48px}.wc-block-components-express-payment--checkout{margin-top:5px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container{display:flex;flex-direction:row;right:0;position:absolute;left:0;top:-5px;vertical-align:middle}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container:before{border-right:1px solid;border-top:1px solid;border-radius:0 5px 0 0;content:"";display:block;height:4px;margin-left:12px;opacity:.3;pointer-events:none;width:10px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container:after{border-left:1px solid;border-top:1px solid;border-radius:5px 0 0 0;content:"";display:block;height:4px;margin-right:12px;opacity:.3;pointer-events:none;flex-grow:1}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title{flex-grow:0;transform:translateY(-50%)}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content{position:relative;padding:1.5em 23px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content:after{border-style:solid;border-width:0 1px 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0;border-radius:0 0 5px 5px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content>p{margin-bottom:1em}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li{display:inline-block;width:50%}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li:nth-child(2n){padding-right:8px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li:nth-child(odd){padding-left:8px}.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons>li{padding-bottom:16px;text-align:center;width:100%}.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons>li:last-child{padding-bottom:0}.wc-block-components-express-payment-continue-rule{display:flex;align-items:center;text-align:center;padding:0 24px;margin:24px 0}.wc-block-components-express-payment-continue-rule:before{margin-left:10px}.wc-block-components-express-payment-continue-rule:after{margin-right:10px}.wc-block-components-express-payment-continue-rule:after,.wc-block-components-express-payment-continue-rule:before{content:" ";flex:1;border-bottom:1px solid;opacity:.3}.wc-block-components-express-payment-continue-rule--cart{margin:16px 0;text-transform:uppercase}.theme-twentynineteen .wc-block-components-express-payment__title:before{display:none}.theme-twentytwenty .wc-block-components-express-payment .wc-block-components-express-payment__title{padding-right:12px;padding-left:12px}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder{margin-bottom:16px}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder *{pointer-events:all}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset{display:block}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset .components-button{background-color:#1e1e1e;color:#fff}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset .wc-block-checkout__no-payment-methods-placeholder-description{display:block;margin:.25em 0 1em}.components-notice.wc-block-checkout__no-payment-methods-notice{margin-bottom:16px}.wc-block-card-elements{display:flex;width:100%}.wc-block-card-elements .wc-block-components-validation-error{position:static}.wc-block-gateway-container{position:relative;margin-bottom:1.5em;white-space:nowrap}.wc-block-gateway-container.wc-card-number-element{flex-basis:15em;flex-grow:1;min-width:min(15em,60%)}.wc-block-gateway-container.wc-card-expiry-element{flex-basis:7em;margin-right:12px;min-width:min(7em,calc(24% - 12px))}.wc-block-gateway-container.wc-card-cvc-element{flex-basis:7em;margin-right:12px;min-width:min(5em,calc(16% - 12px))}.wc-block-gateway-container .wc-block-gateway-input{font-size:1em;line-height:1.375;background-color:#fff;padding:.75em 16px .75em 0;border-radius:4px;border:1px solid #50575e;width:100%;font-family:inherit;margin:0;box-sizing:border-box;height:3em;color:#2b2d2f;cursor:text}.wc-block-gateway-container .wc-block-gateway-input:focus,.wc-block-gateway-container:focus{background-color:#fff}.wc-block-gateway-container label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;line-height:1.375;position:absolute;transform:translateY(.75em);right:0;top:0;transform-origin:top right;color:#757575;transition:transform .2s ease;margin:0 17px 0 0;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 24px);cursor:text}@media screen and (prefers-reduced-motion:reduce){.wc-block-gateway-container label{transition:none}}.wc-block-gateway-container.wc-inline-card-element label{margin-right:calc(24px + 1.5em)}.wc-block-gateway-container.wc-inline-card-element .wc-block-gateway-input.focused.empty+label,.wc-block-gateway-container.wc-inline-card-element .wc-block-gateway-input:not(.empty)+label{margin-right:16px;transform:translateY(4px) scale(.75)}.wc-block-gateway-container.wc-inline-card-element+.wc-block-components-validation-error{position:static;margin-top:-24px}.wc-block-gateway-container .wc-block-gateway-input.focused.empty,.wc-block-gateway-container .wc-block-gateway-input:not(.empty){padding:1.5em 16px .25em 0}.wc-block-gateway-container .wc-block-gateway-input.focused.empty+label,.wc-block-gateway-container .wc-block-gateway-input:not(.empty)+label{transform:translateY(4px) scale(.75)}.wc-block-gateway-container .wc-block-gateway-input.has-error{border-color:#cc1818}.wc-block-gateway-container .wc-block-gateway-input.has-error:focus{outline-color:#cc1818}.wc-block-gateway-container .wc-block-gateway-input.has-error+label{color:#cc1818}.is-large .wc-card-cvc-element .wc-block-components-validation-error>p,.is-large .wc-card-expiry-element .wc-block-components-validation-error>p,.is-medium .wc-card-cvc-element .wc-block-components-validation-error>p,.is-medium .wc-card-expiry-element .wc-block-components-validation-error>p{line-height:16px;padding-top:4px}.is-mobile .wc-card-cvc-element .wc-block-components-validation-error>p,.is-mobile .wc-card-expiry-element .wc-block-components-validation-error>p,.is-small .wc-card-cvc-element .wc-block-components-validation-error>p,.is-small .wc-card-expiry-element .wc-block-components-validation-error>p{min-height:28px}.wc-block-components-checkout-payment-methods *{pointer-events:all}.is-mobile .wc-block-card-elements,.is-small .wc-block-card-elements{flex-wrap:wrap}.is-mobile .wc-block-gateway-container.wc-card-number-element,.is-small .wc-block-gateway-container.wc-card-number-element{flex-basis:100%}.is-mobile .wc-block-gateway-container.wc-card-expiry-element,.is-small .wc-block-gateway-container.wc-card-expiry-element{flex-basis:calc(50% - 8px);margin-right:0;margin-left:8px}.is-mobile .wc-block-gateway-container.wc-card-cvc-element,.is-small .wc-block-gateway-container.wc-card-cvc-element{flex-basis:calc(50% - 8px);margin-right:8px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option{padding-right:56px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option:after{content:none}.wc-block-checkout__payment-method .wc-block-components-radio-control__option .wc-block-components-radio-control__input{right:16px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:first-child,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:last-child{margin:0;padding-bottom:1em;padding-top:1em}.wc-block-checkout__payment-method .wc-block-components-radio-control__option-checked{font-weight:700}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option,.wc-block-checkout__payment-method .wc-block-components-radio-control__option{position:relative}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:after,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:after{border-style:solid;border-width:1px 1px 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:last-child:after,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:last-child:after{border-width:1px}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option:after{border-width:0}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label{display:flex;align-items:center;justify-content:flex-start}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label img{height:24px;max-height:24px;-o-object-fit:contain;object-fit:contain;-o-object-position:left;object-position:left}.wc-block-checkout__payment-method .wc-block-components-radio-control.disable-radio-control .wc-block-components-radio-control__option{padding-right:16px}.wc-block-checkout__payment-method .wc-block-components-radio-control.disable-radio-control .wc-block-components-radio-control__input{display:none}.wc-block-checkout__payment-method .wc-block-components-checkout-step__description-payments-aligned{padding-top:14px;height:28px}.wc-block-components-radio-control-accordion-content{padding:0 16px 1em}.wc-block-components-radio-control-accordion-content:empty{display:none}.wc-block-checkout__order-notes .wc-block-components-checkout-step__content{padding-bottom:0}.wc-block-components-checkbox{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;margin-top:1.5em}.wc-block-components-checkbox label{align-items:flex-start;display:flex;position:relative}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{font-size:1em;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid #50575e;border-radius:2px;box-sizing:border-box;height:1.5em;width:1.5em;margin:0 0 0 16px;min-height:1.5em;min-width:1.5em;overflow:hidden;position:static;vertical-align:middle;background-color:#fff}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:#fff;border-color:#50575e}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus{outline:2px solid #50575e;outline-offset:2px}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:after,.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:before{content:""}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:not(:checked)+.wc-block-components-checkbox__mark{display:none}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{border-color:hsla(0,0%,100%,.6);background-color:rgba(0,0,0,.1)}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus{outline:2px solid hsla(0,0%,100%,.6);outline-offset:2px}.wc-block-components-checkbox.has-error,.wc-block-components-checkbox.has-error a{color:#cc1818}.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:active,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:hover{border-color:#cc1818}.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus{outline:2px solid #cc1818;outline-offset:2px}.wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#000;position:absolute;margin-right:.1875em;margin-top:.0625em;width:1.125em;height:1.125em;pointer-events:none}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#fff}.wc-block-components-checkbox .wc-block-components-checkbox__label,.wc-block-components-checkbox>span{vertical-align:middle;line-height:1.5em}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-checkbox__mark{display:none}}.theme-twentytwentyone .has-dark-controls .wc-block-components-checkbox__input[type=checkbox],.theme-twentytwentyone .wc-block-components-checkbox__input[type=checkbox]{background-color:#fff;border-color:var(--form--border-color);position:relative}.theme-twentytwentyone .has-dark-controls .wc-block-components-checkbox__input[type=checkbox]:checked,.theme-twentytwentyone .wc-block-components-checkbox__input[type=checkbox]:checked{background-color:#fff;border-color:var(--form--border-color)}.theme-twentytwentyone .wc-block-components-checkbox__mark{display:none}.wc-block-components-panel.has-border{position:relative}.wc-block-components-panel.has-border:after{border-style:solid;border-width:1px 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-panel.has-border+.wc-block-components-panel.has-border:after{border-top-width:0}.wc-block-components-panel.has-border.no-top-border{position:relative}.wc-block-components-panel.has-border.no-top-border:after{border-style:solid;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0;border-width:0 0 1px}.wc-block-components-panel__button{border:0;border-radius:0;vertical-align:baseline;height:auto;line-height:1;margin:.375em 0 0;padding:.375em 0 0 32px;position:relative;text-align:right;width:100%;word-break:break-word}.wc-block-components-panel__button[aria-expanded=true]{padding-bottom:.375em;margin-bottom:.375em}.wc-block-components-panel__button,.wc-block-components-panel__button:active,.wc-block-components-panel__button:focus,.wc-block-components-panel__button:hover{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none}.wc-block-components-panel__button>.wc-block-components-panel__button-icon{fill:currentColor;position:absolute;left:0;top:50%;transform:translateY(-50%);width:auto}.wc-block-components-panel__content{padding-bottom:1em}.wc-block-components-panel__content[hidden]{display:none}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-panel__button{background-color:inherit;color:inherit}.theme-twentyseventeen .wc-block-components-panel__button,.theme-twentytwenty .wc-block-components-panel__button{background:none transparent;color:inherit}.theme-twentyseventeen .wc-block-components-panel__button.wc-block-components-panel__button:focus,.theme-twentyseventeen .wc-block-components-panel__button.wc-block-components-panel__button:hover,.theme-twentytwenty .wc-block-components-panel__button.wc-block-components-panel__button:focus,.theme-twentytwenty .wc-block-components-panel__button.wc-block-components-panel__button:hover{background:none transparent}.wc-block-components-totals-wrapper{position:relative;padding:16px 0}.wc-block-components-totals-wrapper:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-totals-wrapper:last-child{padding-bottom:0}.wc-block-components-totals-wrapper.has-bottom-border:after{border-bottom-width:1px}.wc-block-components-totals-wrapper.slot-wrapper{padding:0}.wc-block-components-totals-wrapper.slot-wrapper>*>*{position:relative;padding:16px 0}.wc-block-components-totals-wrapper.slot-wrapper>*>:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-totals-wrapper.slot-wrapper>*>:last-child:after{border-bottom-width:0}.wc-block-components-discounts-meta .wc-block-components-totals-wrapper:first-child{position:relative}.wc-block-components-discounts-meta .wc-block-components-totals-wrapper:first-child:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;right:0;opacity:.3;pointer-events:none;position:absolute;left:0;top:0}.wc-block-components-totals-item{display:flex;flex-wrap:wrap;margin:.75em 0 0;width:100%}.wc-block-components-totals-item:first-child{margin-top:0}.wc-block-components-totals-item__label{flex-grow:1}.wc-block-components-totals-item__value{font-weight:700;white-space:nowrap}.wc-block-components-totals-item__description{font-size:.875em;width:100%}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate{margin:4px 0}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate:first-child{margin-top:0}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate:last-child{margin-bottom:0}.wc-block-product-categories{margin-bottom:1em}.wc-block-product-categories.is-dropdown{display:flex}.wc-block-product-categories select{margin-left:.5em}.wc-block-product-categories-list--has-images{list-style:none outside}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item{margin:4px 60px 4px 0;list-style:none outside;clear:both}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item ul{margin:4px 0 0}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image{max-width:50px;display:inline-block;padding:0;margin:0 -60px 0 .5em;position:relative;vertical-align:middle;border:1px solid #eee}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image img{display:block;height:auto;margin:0;max-width:100%;padding:0}.wc-block-product-categories-list-item-count:before{content:" ("}.wc-block-product-categories-list-item-count:after{content:")"}.wp-block-woocommerce-product-categories.is-loading .wc-block-product-categories__placeholder{display:inline-block;height:1em;width:50%;min-width:200px;background:currentColor;opacity:.2}.wc-block-product-categories__button{display:flex;align-items:center;margin:0;padding:0 .5em;position:relative;overflow:hidden}.wc-block-product-categories__button svg{fill:currentColor;outline:none}.rtl .wc-block-product-categories__button svg{transform:rotate(-180deg)}.wc-block-product-categories__button:active{color:currentColor}.wc-block-product-categories__button:disabled,.wc-block-product-categories__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-categories__button:disabled:focus,.wc-block-product-categories__button[aria-disabled=true]:focus{box-shadow:none}.wc-block-featured-product{position:relative;background-color:#1e1e1e;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-product .wc-block-featured-product__wrapper{overflow:hidden;height:100%}.wc-block-featured-product.has-left-content{justify-content:flex-start}.wc-block-featured-product.has-left-content .wc-block-featured-product__description,.wc-block-featured-product.has-left-content .wc-block-featured-product__price,.wc-block-featured-product.has-left-content .wc-block-featured-product__title,.wc-block-featured-product.has-left-content .wc-block-featured-product__variation{margin-right:0;text-align:right}.wc-block-featured-product.has-right-content{justify-content:flex-end}.wc-block-featured-product.has-right-content .wc-block-featured-product__description,.wc-block-featured-product.has-right-content .wc-block-featured-product__price,.wc-block-featured-product.has-right-content .wc-block-featured-product__title,.wc-block-featured-product.has-right-content .wc-block-featured-product__variation{margin-left:0;text-align:left}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-product .wc-block-featured-product__description a,.wc-block-featured-product .wc-block-featured-product__description a:active,.wc-block-featured-product .wc-block-featured-product__description a:focus,.wc-block-featured-product .wc-block-featured-product__description a:hover,.wc-block-featured-product .wc-block-featured-product__price a,.wc-block-featured-product .wc-block-featured-product__price a:active,.wc-block-featured-product .wc-block-featured-product__price a:focus,.wc-block-featured-product .wc-block-featured-product__price a:hover,.wc-block-featured-product .wc-block-featured-product__title a,.wc-block-featured-product .wc-block-featured-product__title a:active,.wc-block-featured-product .wc-block-featured-product__title a:focus,.wc-block-featured-product .wc-block-featured-product__title a:hover,.wc-block-featured-product .wc-block-featured-product__variation a,.wc-block-featured-product .wc-block-featured-product__variation a:active,.wc-block-featured-product .wc-block-featured-product__variation a:focus,.wc-block-featured-product .wc-block-featured-product__variation a:hover{color:#fff}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__link,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{width:100%;padding:16px 48px 0;z-index:1}.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{margin-top:0;border:0}.wc-block-featured-product .wc-block-featured-product__title:before,.wc-block-featured-product .wc-block-featured-product__variation:before{display:none}.wc-block-featured-product .wc-block-featured-product__variation{font-style:italic;padding-top:0}.wc-block-featured-product .wc-block-featured-product__description p{margin:0;line-height:1.5em}.wc-block-featured-product .wp-block-button.aligncenter{text-align:center}.wc-block-featured-product.has-background-dim:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-product.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-product.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-product.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-product.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-product.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-product.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-product.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-product.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-product.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-product.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{max-width:420px;width:100%}.wc-block-featured-product:after{display:block;content:"";font-size:0;min-height:inherit}@supports((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-product:after{content:none}}.wc-block-featured-product.aligncenter,.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright,.wc-block-product-search .wc-block-product-search__fields{display:flex}.wc-block-product-search .wc-block-product-search__field{padding:6px 8px;line-height:1.8;flex-grow:1}.wc-block-product-search .wc-block-product-search__button{display:flex;align-items:center;margin:0 6px 0 0;cursor:pointer;padding:0 .5em;position:relative;overflow:hidden}.wc-block-product-search .wc-block-product-search__button svg{fill:currentColor;outline:none}.rtl .wc-block-product-search .wc-block-product-search__button svg{transform:rotate(-180deg)}.wc-block-product-search .wc-block-product-search__button:active{color:currentColor}.wc-block-product-search .wc-block-product-search__button:disabled,.wc-block-product-search .wc-block-product-search__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-search .wc-block-product-search__button:disabled:focus,.wc-block-product-search .wc-block-product-search__button[aria-disabled=true]:focus{box-shadow:none}.wc-block-featured-category{position:relative;background-color:#1e1e1e;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category .wc-block-featured-category__wrapper{overflow:hidden;height:100%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category.has-left-content{justify-content:flex-start}.wc-block-featured-category.has-left-content .wc-block-featured-category__description,.wc-block-featured-category.has-left-content .wc-block-featured-category__price,.wc-block-featured-category.has-left-content .wc-block-featured-category__title{margin-right:0;text-align:right}.wc-block-featured-category.has-right-content{justify-content:flex-end}.wc-block-featured-category.has-right-content .wc-block-featured-category__description,.wc-block-featured-category.has-right-content .wc-block-featured-category__price,.wc-block-featured-category.has-right-content .wc-block-featured-category__title{margin-left:0;text-align:left}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-category .wc-block-featured-category__description a,.wc-block-featured-category .wc-block-featured-category__description a:active,.wc-block-featured-category .wc-block-featured-category__description a:focus,.wc-block-featured-category .wc-block-featured-category__description a:hover,.wc-block-featured-category .wc-block-featured-category__price a,.wc-block-featured-category .wc-block-featured-category__price a:active,.wc-block-featured-category .wc-block-featured-category__price a:focus,.wc-block-featured-category .wc-block-featured-category__price a:hover,.wc-block-featured-category .wc-block-featured-category__title a,.wc-block-featured-category .wc-block-featured-category__title a:active,.wc-block-featured-category .wc-block-featured-category__title a:focus,.wc-block-featured-category .wc-block-featured-category__title a:hover{color:#fff}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__link,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{width:100%;padding:0 48px 16px;z-index:1}.wc-block-featured-category .wc-block-featured-category__title{margin-top:0}.wc-block-featured-category .wc-block-featured-category__title:before{display:none}.wc-block-featured-category .wc-block-featured-category__description p{margin:0}.wc-block-featured-category .wp-block-button.aligncenter{text-align:center}.wc-block-featured-category.has-background-dim:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-category.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-category.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-category.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-category.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-category.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-category.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-category.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-category.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-category.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-category.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{max-width:420px;width:100%}.wc-block-featured-category:after{display:block;content:"";font-size:0;min-height:inherit}@supports((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-category:after{content:none}}.wc-block-featured-category.aligncenter,.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{display:flex}.wc-block-attribute-filter{margin-bottom:24px}.wc-block-attribute-filter.style-dropdown{display:flex;gap:16px}.wc-block-attribute-filter .wc-block-attribute-filter-list{margin:0;width:100%}.wc-block-attribute-filter .wc-block-attribute-filter-list li label{cursor:pointer}.wc-block-attribute-filter .wc-block-attribute-filter-list li input{cursor:pointer;display:inline-block}.wc-block-attribute-filter .wc-block-attribute-filter-dropdown{flex-grow:1;max-width:unset;width:0}.wc-block-attribute-filter .is-single .wc-block-attribute-filter-list-count,.wc-block-attribute-filter .wc-block-dropdown-selector .wc-block-dropdown-selector__list .wc-block-attribute-filter-list-count{opacity:.6}.wc-block-attribute-filter .wc-block-components-dropdown-selector__input-wrapper{height:100%}.wc-block-stock-filter{margin-bottom:24px}.wc-block-stock-filter .wc-block-stock-filter-list{margin:0}.wc-block-stock-filter .wc-block-stock-filter-list li label{cursor:pointer}.wc-block-stock-filter .wc-block-stock-filter-list li input{cursor:pointer;display:inline-block}.wc-block-stock-filter .is-single,.wc-block-stock-filter .wc-block-dropdown-selector .wc-block-dropdown-selector__list{opacity:.6}.wc-block-stock-filter .wc-block-stock-filter__button{margin-top:8px}@-webkit-keyframes spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(-1turn)}}@keyframes spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(-1turn)}}@-webkit-keyframes loading__animation{to{transform:translateX(-100%)}}@keyframes loading__animation{to{transform:translateX(-100%)}}.wc-block-active-filters{margin-bottom:24px;overflow:hidden}.wc-block-active-filters .wc-block-active-filters__clear-all{font-size:1em;float:left;border:none;padding:0;text-decoration:underline;cursor:pointer}.wc-block-active-filters .wc-block-active-filters__clear-all,.wc-block-active-filters .wc-block-active-filters__clear-all:active,.wc-block-active-filters .wc-block-active-filters__clear-all:focus,.wc-block-active-filters .wc-block-active-filters__clear-all:hover{background:transparent;color:inherit}.wc-block-active-filters .wc-block-active-filters__list{margin:0 0 4px;padding:0;list-style:none outside;clear:both}.wc-block-active-filters .wc-block-active-filters__list li{margin:0;padding:0;list-style:none outside;clear:both}.wc-block-active-filters .wc-block-active-filters__list li ul{margin:0;padding:0;list-style:none outside}.wc-block-active-filters .wc-block-active-filters__list li:first-child .wc-block-active-filters__list-item-type{margin:0}.wc-block-active-filters .wc-block-active-filters__list-item-type{font-size:.75em;text-transform:uppercase;letter-spacing:.1em;margin:16px 0 0;display:block}.wc-block-active-filters .wc-block-active-filters__list-item-operator{font-weight:400;font-style:italic}.wc-block-active-filters .wc-block-active-filters__list-item-name{font-weight:700;display:block;position:relative;padding:0 0 0 16px}.wc-block-active-filters .wc-block-active-filters__list-item-remove{background:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;width:16px;padding:0;position:absolute;left:0;top:50%;margin:-8px 0 0;color:currentColor}.wc-block-active-filters .wc-block-active-filters__list--chips li,.wc-block-active-filters .wc-block-active-filters__list--chips ul{display:inline}.wc-block-active-filters .wc-block-active-filters__list--chips .wc-block-active-filters__list-item-type{display:none}.wc-block-active-filters .wc-block-active-filters__list--chips .wc-block-components-chip{font-size:.875em;margin-top:.1875em;margin-bottom:.1875em} \ No newline at end of file diff --git a/build/wc-blocks-style.css b/build/wc-blocks-style.css new file mode 100644 index 00000000000..7ad693a6953 --- /dev/null +++ b/build/wc-blocks-style.css @@ -0,0 +1 @@ +.wc-block-link-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.wc-block-link-button,.wc-block-link-button:active,.wc-block-link-button:focus,.wc-block-link-button:hover{background:transparent}.wc-block-suspense-placeholder{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.wc-block-suspense-placeholder>*{visibility:hidden}.wc-block-suspense-placeholder:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-suspense-placeholder{-webkit-animation:none;animation:none}}.wc-block-suspense-placeholder:before{content:" "}.wc-block-grid__products .wc-block-grid__product-image{text-decoration:none;display:block;position:relative}.wc-block-grid__products .wc-block-grid__product-image a{text-decoration:none;border:0;outline:0;box-shadow:none}.wc-block-grid__products .wc-block-grid__product-image img{height:auto;width:100%}.wc-block-grid__products .wc-block-grid__product-image img[hidden]{display:none}.wc-block-grid__products .wc-block-grid__product-image img[alt=""]{border:1px solid #f2f2f2}.edit-post-visual-editor .editor-block-list__block .wc-block-grid__product-title,.editor-styles-wrapper .wc-block-grid__product-title,.wc-block-grid__product-title{font-family:inherit;line-height:1.2em;font-weight:700;padding:0;color:inherit;font-size:inherit;display:block}.wc-block-grid__product-price{display:block}.wc-block-grid__product-price .wc-block-grid__product-price__regular{margin-right:.5em}.wc-block-grid__product-add-to-cart.wp-block-button{word-break:break-word;white-space:normal}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link{word-break:break-word;white-space:normal;margin:0 auto!important;display:inline-flex;justify-content:center;text-align:center;padding:.5em 1em;font-size:1em}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.loading{opacity:.25}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.added:after{font-family:WooCommerce;content:"";margin-left:.5em;display:inline-block;width:auto;height:auto}.wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link.loading:after{font-family:WooCommerce;content:"";-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite;margin-left:.5em;display:inline-block;width:auto;height:auto}.has-5-columns:not(.alignfull) .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-6-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-7-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-8-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after,.has-9-columns .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link:after{content:"";margin:0}.wc-block-grid__product-rating{display:block}.wc-block-grid__product-rating .star-rating,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;margin:0 auto;text-align:left}.wc-block-grid__product-rating .star-rating:before,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars:before{content:"SSSSS";top:0;left:0;right:0;position:absolute;opacity:.5;color:#aaa;white-space:nowrap}.wc-block-grid__product-rating .star-rating span,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars span{overflow:hidden;top:0;left:0;right:0;position:absolute;padding-top:1.5em}.wc-block-grid__product-rating .star-rating span:before,.wc-block-grid__product-rating .wc-block-grid__product-rating__stars span:before{content:"SSSSS";top:0;left:0;right:0;position:absolute;color:#000;white-space:nowrap}.wc-block-grid__product-onsale{font-size:.875em;padding:.25em .75em;display:inline-block;width:auto;border:1px solid #43454b;border-radius:3px;color:#43454b;background:#fff;text-align:center;text-transform:uppercase;font-weight:600;z-index:9;position:relative}.wc-block-grid__product .wc-block-grid__product-image,.wc-block-grid__product .wc-block-grid__product-title{margin:0 0 12px}.wc-block-grid__product .wc-block-grid__product-add-to-cart,.wc-block-grid__product .wc-block-grid__product-onsale,.wc-block-grid__product .wc-block-grid__product-price,.wc-block-grid__product .wc-block-grid__product-rating{margin:0 auto 12px}.theme-twentysixteen .wc-block-grid .price ins{color:#77a464}.theme-twentynineteen .wc-block-grid__product{font-size:.88889em}.theme-twentynineteen .wc-block-components-product-sale-badge,.theme-twentynineteen .wc-block-components-product-title,.theme-twentynineteen .wc-block-grid__product-onsale,.theme-twentynineteen .wc-block-grid__product-title{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif}.theme-twentynineteen .wc-block-grid__product-title:before{display:none}.theme-twentynineteen .wc-block-components-product-sale-badge,.theme-twentynineteen .wc-block-grid__product-onsale{line-height:1}.theme-twentynineteen .editor-styles-wrapper .wp-block-button .wp-block-button__link:not(.has-text-color){color:#fff}.theme-twentytwenty .wc-block-grid__product-link{color:#000}.theme-twentytwenty .wc-block-components-product-title,.theme-twentytwenty .wc-block-grid__product-title{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;color:#cd2653;font-size:1em}.theme-twentytwenty .wp-block-columns .wc-block-components-product-title{margin-top:0}.theme-twentytwenty .wc-block-components-product-price .woocommerce-Price-amount,.theme-twentytwenty .wc-block-components-product-price__value,.theme-twentytwenty .wc-block-grid__product-price .woocommerce-Price-amount,.theme-twentytwenty .wc-block-grid__product-price__value{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;font-size:.9em}.theme-twentytwenty .wc-block-components-product-price del,.theme-twentytwenty .wc-block-grid__product-price del{opacity:.5}.theme-twentytwenty .wc-block-components-product-price ins,.theme-twentytwenty .wc-block-grid__product-price ins{text-decoration:none}.theme-twentytwenty .star-rating,.theme-twentytwenty .wc-block-grid__product-rating{font-size:.7em}.theme-twentytwenty .star-rating .wc-block-components-product-rating__stars,.theme-twentytwenty .star-rating .wc-block-grid__product-rating__stars,.theme-twentytwenty .wc-block-grid__product-rating .wc-block-components-product-rating__stars,.theme-twentytwenty .wc-block-grid__product-rating .wc-block-grid__product-rating__stars{line-height:1}.theme-twentytwenty .wc-block-components-product-button>.wp-block-button__link,.theme-twentytwenty .wc-block-grid__product-add-to-cart>.wp-block-button__link{font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif}.theme-twentytwenty .wc-block-components-product-sale-badge,.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{background:#cd2653;color:#fff;font-family:-apple-system,blinkmacsystemfont,Helvetica Neue,helvetica,sans-serif;font-weight:700;letter-spacing:-.02em;line-height:1.2;text-transform:uppercase}.theme-twentytwenty .wc-block-grid__products .wc-block-components-product-sale-badge{position:static}.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-image .wc-block-components-product-sale-badge{position:absolute}.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale:not(.wc-block-components-product-sale-badge){position:absolute;right:4px;top:4px;z-index:1}.theme-twentytwenty .wc-block-active-filters__title,.theme-twentytwenty .wc-block-attribute-filter__title,.theme-twentytwenty .wc-block-price-filter__title,.theme-twentytwenty .wc-block-stock-filter__title{font-size:1em}.theme-twentytwenty .wc-block-active-filters .wc-block-active-filters__clear-all{font-size:.75em}.theme-twentytwenty .wc-block-grid__product-add-to-cart.wp-block-button .wp-block-button__link{font-size:.75em;padding:.5em}@media only screen and (min-width:768px){.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{font-size:.875em;padding:.5em}}@media only screen and (min-width:1168px){.theme-twentytwenty .wc-block-grid__products .wc-block-grid__product-onsale{font-size:.875em;padding:.5em}}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.screen-reader-text:focus{background-color:#fff;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#2b2d2f;display:block;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}.wc-block-components-product-add-to-cart-attribute-picker{margin:0;flex-basis:100%}.wc-block-components-product-add-to-cart-attribute-picker label{display:block;font-size:1em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__container{position:relative}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select{margin:0 0 .75em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select select{min-width:60%;min-height:1.75em}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error{margin-bottom:24px}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error select{border-color:#cc1818}.wc-block-components-product-add-to-cart-attribute-picker .wc-block-components-product-add-to-cart-attribute-picker__select.has-error select:focus{outline-color:#cc1818}.wc-block-components-product-add-to-cart{margin:0;display:flex;flex-wrap:wrap}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button{margin:0 0 .75em}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button .wc-block-components-button__text{display:block}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button .wc-block-components-button__text>svg{fill:currentColor;vertical-align:top;width:1.5em;height:1.5em;margin:-.25em 0 -.25em .5em}.wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity{margin:0 1em .75em 0;flex-basis:5em;padding:.618em;background:#fff;border:1px solid #ccc;border-radius:2px;color:#43454b;box-shadow:inset 0 1px 1px rgba(0,0,0,.125);text-align:center}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button>*,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity>*,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button>*,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity>*{visibility:hidden}.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button:after,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity:after,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button:after,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-button,.is-loading .wc-block-components-product-add-to-cart .wc-block-components-product-add-to-cart-quantity,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-button,.wc-block-components-product-add-to-cart--placeholder .wc-block-components-product-add-to-cart-quantity{-webkit-animation:none;animation:none}}.wc-block-grid .wc-block-components-product-add-to-cart{justify-content:center}.wc-block-components-product-add-to-cart-notice{margin:0}.wp-block-button.wc-block-components-product-button{word-break:break-word;white-space:normal;margin-top:0;margin-bottom:12px}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button{word-break:break-word;white-space:normal;margin:0 auto;display:inline-flex;justify-content:center}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-width:8em;min-height:3em}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder>*{visibility:hidden}.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button--placeholder{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-width:8em;min-height:3em}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button>*{visibility:hidden}.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-button>.wc-block-components-product-button__button{-webkit-animation:none;animation:none}}.theme-twentytwentyone .editor-styles-wrapper .wc-block-components-product-button .wp-block-button__link{background-color:var(--button--color-background);color:var(--button--color-text);border-color:var(--button--color-background)}.wc-block-components-product-category-list{margin-top:0;margin-bottom:.75em}.wc-block-components-product-category-list ul{margin:0;padding:0;display:inline}.wc-block-components-product-category-list ul li{display:inline;list-style:none}.wc-block-components-product-category-list ul li:after{content:", "}.wc-block-components-product-category-list ul li:last-child:after{content:""}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image,.wc-block-components-product-image{margin-top:0;margin-bottom:12px;text-decoration:none;display:block;position:relative}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image a,.wc-block-components-product-image a{text-decoration:none;border:0;outline:0;box-shadow:none}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img,.wc-block-components-product-image img{vertical-align:middle;width:100%}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img[hidden],.wc-block-components-product-image img[hidden]{display:none}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image img[alt=""],.wc-block-components-product-image img[alt=""]{border:1px solid #f2f2f2}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-left,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-left{position:absolute;left:4px;top:4px;right:auto;margin:0}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-center,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-center{position:absolute;top:4px;left:50%;right:auto;transform:translateX(-50%);margin:0}.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-right,.wc-block-components-product-image .wc-block-components-product-sale-badge--align-right{position:absolute;right:4px;top:4px;left:auto;margin:0}.is-loading .wc-block-components-product-image{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.is-loading .wc-block-components-product-image>*{visibility:hidden}.is-loading .wc-block-components-product-image:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-image{-webkit-animation:none;animation:none}}.wc-block-components-product-rating{display:block;margin-top:0;margin-bottom:12px}.wc-block-components-product-rating__stars{overflow:hidden;position:relative;width:5.3em;height:1.618em;line-height:1.618;font-size:1em;font-family:star;font-weight:400;margin:0 auto;text-align:left}.wc-block-components-product-rating__stars:before{content:"SSSSS";top:0;left:0;right:0;position:absolute;opacity:.5;color:#aaa;white-space:nowrap}.wc-block-components-product-rating__stars span{overflow:hidden;top:0;left:0;right:0;position:absolute;padding-top:1.5em}.wc-block-components-product-rating__stars span:before{content:"SSSSS";top:0;left:0;right:0;position:absolute;color:#000;white-space:nowrap}.wc-block-single-product .wc-block-components-product-rating__stars{margin:0}.wc-block-components-product-sale-badge{margin:0 auto 12px;font-size:.875em;padding:.25em .75em;display:inline-block;width:auto;border:1px solid #43454b;border-radius:3px;color:#43454b;background:#fff;text-align:center;text-transform:uppercase;font-weight:600;z-index:9;position:static}.wc-block-components-product-sku{margin-top:0;margin-bottom:12px;display:block;text-transform:uppercase;font-size:.875em}.wc-block-components-product-stock-indicator{margin-top:0;margin-bottom:.75em;display:block;font-size:.875em}.wc-block-components-product-stock-indicator--in-stock{color:#4ab866}.wc-block-components-product-stock-indicator--out-of-stock{color:#cc1818}.wc-block-components-product-stock-indicator--available-on-backorder,.wc-block-components-product-stock-indicator--low-stock{color:#f0b849}.wc-block-components-product-summary{margin-top:0;margin-bottom:12px}.is-loading .wc-block-components-product-summary:before{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;border-radius:.25rem;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;content:".";display:block;width:100%;height:6em}.is-loading .wc-block-components-product-summary:before>*{visibility:hidden}.is-loading .wc-block-components-product-summary:before:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-summary:before{-webkit-animation:none;animation:none}}.wc-block-components-product-tag-list{margin-top:0;margin-bottom:.75em}.wc-block-components-product-tag-list ul{margin:0;padding:0;display:inline}.wc-block-components-product-tag-list ul li{display:inline;list-style:none}.wc-block-components-product-tag-list ul li:after{content:", "}.wc-block-components-product-tag-list ul li:last-child:after{content:""}.wc-block-components-product-title{margin-top:0;margin-bottom:12px}.wc-block-grid .wc-block-components-product-title{line-height:1.5;font-weight:700;padding:0;color:inherit;font-size:inherit;display:block}.is-loading .wc-block-components-product-title:before{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;content:".";display:inline-block;width:7em}.is-loading .wc-block-components-product-title:before>*{visibility:hidden}.is-loading .wc-block-components-product-title:before:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-title:before{-webkit-animation:none;animation:none}}.is-loading .wc-block-grid .wc-block-components-product-title:before{width:10em}.wc-block-components-product-title--align-left{text-align:left}.wc-block-components-product-title--align-center{text-align:center}.wc-block-components-product-title--align-right{text-align:right}.wc-block-components-error{display:flex;padding:40px 0;margin:40px 0;align-items:center;justify-content:center;flex-direction:column;color:#757575;text-align:center}.wc-block-components-error__header{font-size:2em;margin:0;color:#646970}.wc-block-components-error__image{width:25%;margin:0 0 24px}.wc-block-components-error__text{margin:1em 0 0;color:#8c8f94;font-size:1.25em;max-width:60ch}.wc-block-components-error__message{margin:1em auto 0;font-style:italic;color:#8c8f94;max-width:60ch}.wc-block-error__button{margin:40px 0 0}.wc-block-components-button:not(.is-link){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;align-items:center;background-color:#1e1e1e;color:#fff;display:inline-flex;font-weight:700;min-height:3em;justify-content:center;line-height:1;padding:0 1em;text-align:center;text-decoration:none;text-transform:none;position:relative}.wc-block-components-button:not(.is-link):active,.wc-block-components-button:not(.is-link):disabled,.wc-block-components-button:not(.is-link):focus,.wc-block-components-button:not(.is-link):hover{background-color:#1e1e1e;color:#fff}.wc-block-components-button:not(.is-link) .wc-block-components-button__text{display:block}.wc-block-components-button:not(.is-link) .wc-block-components-button__text>svg{fill:currentColor}.wc-block-components-button:not(.is-link) .wc-block-components-spinner+.wc-block-components-button__text{visibility:hidden}.wc-block-components-form{counter-reset:checkout-step}.wc-block-components-form .wc-block-components-checkout-step{position:relative;border:none;padding:0 0 0 24px;background:none;margin:0}.is-mobile .wc-block-components-form .wc-block-components-checkout-step,.is-small .wc-block-components-form .wc-block-components-checkout-step{padding-left:0}.wc-block-components-checkout-step--disabled{opacity:.6}.wc-block-components-checkout-step__container{position:relative}.wc-block-components-checkout-step__content>*{margin-bottom:1em}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__content>:last-child{margin-bottom:0;padding-bottom:1.5em}.wc-block-components-checkout-step__heading{display:flex;justify-content:space-between;align-content:center;flex-wrap:wrap;margin:.75em 0 1em;position:relative;align-items:center;gap:1em}.wc-block-components-checkout-step:first-child .wc-block-components-checkout-step__heading,.wc-block-components-express-payment-continue-rule+.wc-block-components-checkout-step .wc-block-components-checkout-step__heading{margin-top:0}.wc-block-components-checkout-step__title{margin:0 12px 0 0}.wc-block-components-checkout-step__heading-content{font-size:.75em}.wc-block-components-checkout-step__heading-content a{font-weight:700;color:inherit}.wc-block-components-checkout-step__description{font-size:.875em;line-height:1.25;margin-bottom:16px}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;background:transparent;counter-increment:checkout-step;content:" " counter(checkout-step) ".";content:" " counter(checkout-step) "."/"";position:absolute;width:24px;left:-24px;top:0;text-align:center;transform:translateX(-50%)}.wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after{content:"";height:100%;border-left:1px solid;opacity:.3;position:absolute;left:-24px;top:0}.is-mobile .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before,.is-small .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title:before{position:static;transform:none;left:auto;top:auto;content:counter(checkout-step) ". ";content:counter(checkout-step) ". "/""}.is-mobile .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after,.is-small .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__container:after{content:unset}.editor-styles-wrapper .wp-block h4.wc-block-components-checkout-step__title{font-size:1em;line-height:24px;margin:0 12px 0 0}.wc-block-components-order-summary .wc-block-components-panel__button{padding-top:0;margin-top:0}.wc-block-components-order-summary .wc-block-components-panel__content{margin-bottom:0}.wc-block-components-order-summary__content{display:table;width:100%}.wc-block-components-order-summary-item{position:relative;font-size:.875em;display:flex;padding-bottom:1px;padding-top:16px;width:100%}.wc-block-components-order-summary-item:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-order-summary-item:first-child{padding-top:0}.wc-block-components-order-summary-item:last-child>div{padding-bottom:0}.wc-block-components-order-summary-item:last-child:after{display:none}.wc-block-components-order-summary-item .wc-block-components-product-metadata{font-size:1em}.wc-block-components-order-summary-item__description,.wc-block-components-order-summary-item__image{display:table-cell;vertical-align:top}.wc-block-components-order-summary-item__image{width:48px;padding-bottom:16px;position:relative}.wc-block-components-order-summary-item__image>img{width:48px;max-width:48px}.wc-block-components-order-summary-item__quantity{align-items:center;background:#fff;border:2px solid;border-radius:1em;box-shadow:0 0 0 2px #fff;color:#000;display:flex;line-height:1;min-height:20px;padding:0 .4em;position:absolute;justify-content:center;min-width:20px;right:0;top:0;transform:translate(50%,-50%);white-space:nowrap;z-index:1}.wc-block-components-order-summary-item__description{padding-left:24px;padding-right:12px;padding-bottom:16px}.wc-block-components-order-summary-item__description .wc-block-components-product-metadata,.wc-block-components-order-summary-item__description p{line-height:1.375;margin-top:4px}.wc-block-components-order-summary-item__total-price{font-weight:700;margin-left:auto;text-align:right}.wc-block-components-order-summary-item__individual-prices{display:block}.wc-block-components-payment-method-icons{margin:0 0 14px;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center}.wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{display:inline-block;margin:0 4px 2px;padding:0;width:auto;max-width:38px;height:24px;max-height:24px}.wc-block-components-payment-method-icons--align-left{justify-content:flex-start}.wc-block-components-payment-method-icons--align-left .wc-block-components-payment-method-icon{margin-left:0;margin-right:8px}.wc-block-components-payment-method-icons--align-right{justify-content:flex-end}.wc-block-components-payment-method-icons--align-right .wc-block-components-payment-method-icon{margin-right:0;margin-left:8px}.wc-block-components-payment-method-icons:last-child{margin-bottom:0}.is-mobile .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon,.is-small .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{height:16px}.wc-block-components-payment-method-label--with-icon{display:inline-block;vertical-align:middle}.wc-block-components-payment-method-label--with-icon>img,.wc-block-components-payment-method-label--with-icon>svg{vertical-align:middle;margin:-2px 4px 0 0}.is-mobile .wc-block-components-payment-method-label--with-icon>img,.is-mobile .wc-block-components-payment-method-label--with-icon>svg,.is-small .wc-block-components-payment-method-label--with-icon>img,.is-small .wc-block-components-payment-method-label--with-icon>svg{display:none}.editor-styles-wrapper .wc-block-components-checkout-policies,.wc-block-components-checkout-policies{font-size:.75em;text-align:center;list-style:none outside;line-height:1;margin:24px 0}.wc-block-components-checkout-policies__item{list-style:none outside;display:inline-block;padding:0 .25em;margin:0}.wc-block-components-checkout-policies__item:not(:first-child){border-left:1px solid #ccc}.wc-block-components-checkout-policies__item>a{color:inherit;padding:0 .25em}.wc-block-components-product-badge{font-size:.75em;border-radius:2px;border:1px solid;display:inline-block;font-weight:600;padding:0 .66em;text-transform:uppercase;white-space:nowrap}.wc-block-components-product-details.wc-block-components-product-details{list-style:none;margin:.5em 0;padding:0}.wc-block-components-product-details.wc-block-components-product-details:last-of-type{margin-bottom:0}.wc-block-components-product-details.wc-block-components-product-details li{margin-left:0}.wc-block-components-product-details__name,.wc-block-components-product-details__value{display:inline-block}.is-large:not(.wc-block-checkout) .wc-block-components-product-details__name{font-weight:700}img.wc-block-components-product-image[alt=""]{border:1px solid #f2f2f2}.wc-block-components-product-metadata{font-size:.75em}.wc-block-components-product-metadata .wc-block-components-product-metadata__description>p,.wc-block-components-product-metadata .wc-block-components-product-metadata__variation-data{margin:.25em 0}.wc-block-components-checkout-return-to-cart-button{box-shadow:none;color:inherit;padding-left:calc(24px + .25em);position:relative;text-decoration:none}.wc-block-components-checkout-return-to-cart-button svg{left:0;position:absolute;transform:translateY(-50%);top:50%}.wc-block-components-shipping-calculator-address{margin-bottom:0}.wc-block-components-shipping-calculator-address__button{width:100%;margin-top:1.5em}.wc-block-components-shipping-calculator{padding:.5em 0 .75em}.wc-block-components-shipping-rates-control__package .wc-block-components-panel__button{margin-bottom:0;margin-top:0;padding-bottom:.75em;padding-top:.75em}.wc-block-components-shipping-rates-control__package .wc-block-components-panel__content,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control .wc-block-components-radio-control__option-layout,.wc-block-components-shipping-rates-control__package .wc-block-components-radio-control__option-layout{padding-bottom:0}.wc-block-components-shipping-rates-control__package-items{font-size:.875em;display:block;list-style:none;margin:0;padding:0}.wc-block-components-shipping-rates-control__package-item{overflow-wrap:anywhere;word-break:break-word;-ms-word-break:break-all;display:inline-block;margin:0;padding:0}.wc-block-components-shipping-rates-control__package-item:not(:last-child):after{content:", ";white-space:pre}.wc-block-components-totals-coupon .wc-block-components-panel__button{margin-top:0;padding-top:0}.wc-block-components-totals-coupon .wc-block-components-panel__content{padding-bottom:0}.wc-block-components-totals-coupon__form{display:flex;width:100%;margin-bottom:0}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__input{margin-bottom:0;margin-top:0;flex-grow:1}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button{height:3em;flex-shrink:0;margin-left:8px;padding-left:24px;padding-right:24px;white-space:nowrap}.wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button.no-margin{margin:0}.wc-block-components-totals-coupon__content{flex-direction:column;position:relative}.wc-block-components-totals-discount__coupon-list{list-style:none;margin:0;padding:0}.wc-block-components-totals-discount .wc-block-components-totals-item__value{color:#4ab866}.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,.wc-block-components-totals-footer-item .wc-block-components-totals-item__value{font-size:1.25em}.wc-block-components-totals-footer-item .wc-block-components-totals-item__label{font-weight:700}.wc-block-components-totals-footer-item .wc-block-components-totals-footer-item-tax{margin-bottom:0}.wc-block-components-totals-shipping fieldset.wc-block-components-totals-shipping__fieldset{background-color:transparent;margin:0;padding:0;border:0}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__via{margin-bottom:16px}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__description,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__label,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__secondary-description,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__options .wc-block-components-radio-control__secondary-label{flex-basis:100%;text-align:left}.wc-block-components-totals-shipping .wc-block-components-shipping-rates-control__no-results-notice{margin:0 0 .75em}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:active,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:focus,.wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address-button:hover{background:transparent;opacity:.8}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:active,.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:focus,.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-totals-shipping__change-address-button:hover{background:transparent}.editor-styles-wrapper .wc-block-components-checkbox-list,.wc-block-components-checkbox-list{margin:0;padding:0;list-style:none outside}.editor-styles-wrapper .wc-block-components-checkbox-list li,.wc-block-components-checkbox-list li{margin:0 0 4px;padding:0;list-style:none outside}.editor-styles-wrapper .wc-block-components-checkbox-list li.show-less button,.editor-styles-wrapper .wc-block-components-checkbox-list li.show-more button,.wc-block-components-checkbox-list li.show-less button,.wc-block-components-checkbox-list li.show-more button{background:none;border:none;padding:0;text-decoration:underline;cursor:pointer}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li,.wc-block-components-checkbox-list.is-loading li{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li>*,.wc-block-components-checkbox-list.is-loading li>*{visibility:hidden}.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li:after,.wc-block-components-checkbox-list.is-loading li:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.editor-styles-wrapper .wc-block-components-checkbox-list.is-loading li,.wc-block-components-checkbox-list.is-loading li{-webkit-animation:none;animation:none}}.wc-block-components-chip{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;align-items:center;border:0;display:inline-flex;padding:.125em .5em .25em;margin:0 .365em .365em 0;border-radius:0;line-height:1;max-width:100%}.wc-block-components-chip,.wc-block-components-chip:active,.wc-block-components-chip:focus,.wc-block-components-chip:hover{background:#e0e0e0;color:#1e1e1e}.wc-block-components-chip.wc-block-components-chip--radius-small{border-radius:3px}.wc-block-components-chip.wc-block-components-chip--radius-medium{border-radius:.433em}.wc-block-components-chip.wc-block-components-chip--radius-large{border-radius:2em;padding-left:.75em;padding-right:.75em}.wc-block-components-chip .wc-block-components-chip__text{flex-grow:1}.wc-block-components-chip.is-removable{padding-right:.5em}.wc-block-components-chip.is-removable .wc-block-components-chip__text{padding-right:.25em}.wc-block-components-chip .wc-block-components-chip__remove{font-size:.75em;background:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0}.wc-block-components-chip .wc-block-components-chip__remove-icon{vertical-align:middle}.theme-twentytwentyone .wc-block-components-chip,.theme-twentytwentyone .wc-block-components-chip:active,.theme-twentytwentyone .wc-block-components-chip:focus,.theme-twentytwentyone .wc-block-components-chip:hover{background:#fff}.theme-twentytwentyone .wc-block-components-chip:active button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip:focus button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip:hover button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background),.theme-twentytwentyone .wc-block-components-chip button.wc-block-components-chip__remove:not(:hover):not(:active):not(.has-background){background:transparent}.wc-block-components-chip__remove:focus,.wc-block-components-chip__remove:hover,button.wc-block-components-chip:focus>.wc-block-components-chip__remove,button.wc-block-components-chip:hover>.wc-block-components-chip__remove{fill:#cc1818}.wc-block-components-chip__remove:disabled,button.wc-block-components-chip:disabled>.wc-block-components-chip__remove{fill:#949494;cursor:not-allowed}.wc-block-components-combobox .wc-block-components-combobox-control,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-combobox .wc-block-components-combobox-control .components-base-control__field,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-base-control__field{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-combobox .wc-block-components-combobox-control .components-combobox-control__suggestions-container,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-combobox-control__suggestions-container{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;position:relative}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{color:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;box-sizing:border-box;outline:inherit;border:1px solid #50575e;background:#fff;box-shadow:none;color:#2b2d2f;font-family:inherit;font-weight:400;height:3em;letter-spacing:inherit;line-height:1;padding:1.5em 16px .25em;text-align:left;text-overflow:ellipsis;text-transform:none;white-space:nowrap;width:100%;opacity:1;border-radius:4px}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true],.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true]{background-color:#fff;color:#2b2d2f;outline:0;box-shadow:0 0 0 1px #50575e}.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true],.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input[aria-expanded=true]{border-bottom-right-radius:0;border-bottom-left-radius:0}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input:focus{background-color:rgba(0,0,0,.1);color:#fff;box-shadow:0 0 0 1px hsla(0,0%,100%,.4)}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list{position:absolute;z-index:10;background-color:#fff;border:1px solid #50575e;border-top:0;margin:3em 0 0;padding:0;max-height:300px;min-width:100%;overflow:auto;color:#2b2d2f}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list{background-color:#1e1e1e;color:#fff}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion{font-size:1em;color:#757575;cursor:default;list-style:none;margin:0;padding:.25em 16px}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected{background-color:#ddd}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-selected{background-color:rgba(0,0,0,.4)}.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-highlighted,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:active,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:focus,.wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:hover,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion.is-highlighted,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:active,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:focus,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control .components-form-token-field__suggestions-list .components-form-token-field__suggestion:hover{background-color:#00669e;color:#fff}.wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;line-height:1.375;position:absolute;transform:translateY(.75em);transform-origin:top left;transition:all .2s ease;color:#757575;z-index:1;margin:0 0 0 17px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 32px);white-space:nowrap}.has-dark-controls .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.has-dark-controls .wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{color:hsla(0,0%,100%,.6)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox .wc-block-components-combobox-control label.components-base-control__label{transition:none}}.wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox.is-active .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox:focus-within .wc-block-components-combobox-control label.components-base-control__label{transform:translateY(4px) scale(.75)}.wc-block-components-combobox.has-error .wc-block-components-combobox-control label.components-base-control__label,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control label.components-base-control__label{color:#cc1818}.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:active,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:hover,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:active,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:hover{border-color:#cc1818}.wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus,.wc-block-components-form .wc-block-components-combobox.has-error .wc-block-components-combobox-control input.components-combobox-control__input:focus{box-shadow:0 0 0 1px #cc1818}.wc-block-components-country-input{margin-top:1.5em}@-webkit-keyframes fadein{0%{opacity:0}to{opacity:1}}@keyframes fadein{0%{opacity:0}to{opacity:1}}@-webkit-keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(-480px)}}@keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(-480px)}}@media only screen and (max-width:480px){@-webkit-keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(-100vw)}}@keyframes slidein{0%{transform:translateX(0)}to{transform:translateX(-100vw)}}}.wc-block-components-drawer__screen-overlay{background-color:rgba(95,95,95,.35);bottom:0;left:0;position:fixed;right:0;top:0;transition:opacity .3s;z-index:9999;opacity:1}.wc-block-components-drawer__screen-overlay--with-slide-out{transition:opacity .3s}.wc-block-components-drawer__screen-overlay--with-slide-in{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:fadein;animation-name:fadein}.wc-block-components-drawer__screen-overlay--is-hidden{pointer-events:none;opacity:0}.wc-block-components-drawer{position:relative;background:#fff;display:block;height:100%;left:100%;overflow:auto;position:fixed;right:0;top:0;transform:translateX(-480px);width:480px}.wc-block-components-drawer:after{border-style:solid;border-width:0 0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}@media only screen and (max-width:480px){.wc-block-components-drawer{transform:translateX(-100vw);width:100vw}}.wc-block-components-drawer__screen-overlay--with-slide-out .wc-block-components-drawer{transition:transform .3s}.wc-block-components-drawer__screen-overlay--with-slide-in .wc-block-components-drawer{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-name:slidein;animation-name:slidein}.wc-block-components-drawer__screen-overlay--is-hidden .wc-block-components-drawer{transform:translateX(0)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-drawer,.wc-block-components-drawer__screen-overlay{-webkit-animation-name:none!important;animation-name:none!important;transition:none!important}}.wc-block-components-drawer .components-modal__content{padding:40px 16px}.wc-block-components-drawer .components-modal__header{position:relative}.wc-block-components-drawer .components-modal__header .components-button{border:0;border-radius:0;vertical-align:baseline;background:transparent;position:absolute;right:0;top:0;padding:1em;margin:-1em}.wc-block-components-drawer .components-modal__header .components-button>span{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px}.wc-block-components-drawer .components-modal__header-heading{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;font-size:1.25rem;word-break:break-word}.wc-block-components-dropdown-selector{max-width:300px;position:relative;width:100%}.wc-block-components-dropdown-selector__input-wrapper{background:#fff;border:1px solid #50575e;color:#2b2d2f;align-items:center;border-radius:4px;cursor:text;display:flex;flex-wrap:wrap;padding:2px 8px}.is-disabled .wc-block-components-dropdown-selector__input-wrapper{background-color:#e0e0e0}.is-multiple.has-checked>.wc-block-components-dropdown-selector__input-wrapper{padding:2px 4px}.is-open>.wc-block-components-dropdown-selector__input-wrapper{border-radius:4px 4px 0 0}.wc-block-components-dropdown-selector__input{font-size:.875em;line-height:1.2857142857;margin:.1875em 0;min-width:0;padding:.1875em 0}.is-single .wc-block-components-dropdown-selector__input{width:100%}.is-single .wc-block-components-dropdown-selector__input:active,.is-single .wc-block-components-dropdown-selector__input:focus,.is-single .wc-block-components-dropdown-selector__input:hover{outline:0}.is-single.has-checked.is-open .wc-block-components-dropdown-selector__input{margin-bottom:1.5px;margin-top:1.5px}.is-single.has-checked:not(.is-open) .wc-block-components-dropdown-selector__input{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;overflow-wrap:normal!important;word-wrap:normal!important;padding:0;position:absolute!important;width:1px;position:absolute}.is-multiple .wc-block-components-dropdown-selector__input{flex:1;min-width:0}.is-multiple .wc-block-components-dropdown-selector__input,.is-single .wc-block-components-dropdown-selector__input:first-child{background:transparent;border:0}.is-multiple .wc-block-components-dropdown-selector__input:active,.is-multiple .wc-block-components-dropdown-selector__input:focus,.is-multiple .wc-block-components-dropdown-selector__input:hover,.is-single .wc-block-components-dropdown-selector__input:first-child:active,.is-single .wc-block-components-dropdown-selector__input:first-child:focus,.is-single .wc-block-components-dropdown-selector__input:first-child:hover{outline:0}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove{background-color:transparent;border:0;color:inherit;font-size:inherit;font-weight:inherit;text-transform:none}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:active,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:focus,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label:hover,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:active,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:focus,.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove:hover{background-color:transparent;text-decoration:none}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value{font-size:.875em;align-items:center;color:#757575;display:inline-flex;margin:.1875em 0;padding:.1875em 0;width:100%}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__label{flex-grow:1;line-height:1.2857142857;padding:0;text-align:left}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove{background-color:transparent;border:0;display:inline-block;line-height:1;padding:0 0 0 .3em}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-value__remove>svg{display:block}.wc-block-components-dropdown-selector .wc-block-components-dropdown-selector__selected-chip{font-size:.875em;margin-top:.1875em;margin-bottom:.1875em;line-height:1.2857142857}.wc-block-components-dropdown-selector__list{background-color:#fff;margin:-1px 0 0;padding:0;position:absolute;left:0;right:0;top:100%;max-height:300px;overflow-y:auto;z-index:1}.wc-block-components-dropdown-selector__list:not(:empty){border:1px solid #9f9f9f}.wc-block-components-dropdown-selector__list-item{font-size:.875em;color:#757575;cursor:default;list-style:none;margin:0;padding:0 4px}.wc-block-components-dropdown-selector__list-item.is-selected{background-color:#ddd}.wc-block-components-dropdown-selector__list-item.is-highlighted,.wc-block-components-dropdown-selector__list-item:active,.wc-block-components-dropdown-selector__list-item:focus,.wc-block-components-dropdown-selector__list-item:hover{background-color:#00669e;color:#fff}.wc-filter-element-label-list-count{opacity:.6}.wc-filter-element-label-list-count:before{content:" ("}.wc-filter-element-label-list-count:after{content:")"}.wc-block-components-filter-submit-button{display:block;margin-left:auto;white-space:nowrap}.wc-block-components-formatted-money-amount{white-space:nowrap}.wc-block-components-load-more{text-align:center;width:100%}.wc-block-components-loading-mask{position:relative;min-height:34px;pointer-events:none}.wc-block-components-loading-mask .components-spinner{position:absolute;margin:0;top:50%;left:50%;transform:translate(-50%,-50%)}.wc-block-components-loading-mask .wc-block-components-loading-mask__children{opacity:.25}.wc-block-components-pagination{margin:0 auto 16px}.wc-block-components-pagination__ellipsis,.wc-block-components-pagination__page{font-size:1em;color:#333;display:inline-block;font-weight:400}.wc-block-components-pagination__page{border-color:transparent;padding:.3em .6em;min-width:2.2em}@media(max-width:782px){.wc-block-components-pagination__page{padding:.1em .2em;min-width:1.6em}}.wc-block-components-pagination__page:not(.toggle){background-color:transparent}.wc-block-components-pagination__ellipsis{padding:.3em}@media(max-width:782px){.wc-block-components-pagination__ellipsis{padding:.1em}}.wc-block-components-pagination__page--active[disabled]{color:#333;font-weight:700;opacity:1!important}.wc-block-components-pagination__page--active[disabled]:focus,.wc-block-components-pagination__page--active[disabled]:hover{background-color:inherit;color:#333;opacity:1!important}html[dir=rtl] .wc-block-components-pagination-page--arrow span{display:inline-block;transform:scaleX(-1)}.wc-block-components-price-slider{margin-bottom:24px}.wc-block-components-price-slider.wc-block-components-price-slider--has-filter-button .wc-block-components-price-slider__controls{justify-content:flex-end}.wc-block-components-price-slider.wc-block-components-price-slider--has-filter-button .wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--max{margin-left:0;margin-right:10px}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;z-index:1;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount>*,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button>*,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount:after,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button:after,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__amount,.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__button,.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}.wc-block-components-price-slider__range-input-wrapper{padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:9px;clear:both;position:relative;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1);background:#e1e1e1;margin:15px 0}.wc-block-components-price-slider__range-input-progress{height:9px;width:100%;position:absolute;left:0;top:0;--track-background:linear-gradient(90deg,transparent var(--low),var(--range-color) 0,var(--range-color) var(--high),transparent 0) no-repeat 0 100%/100% 100%;--range-color:#af7dd1;background:var(--track-background)}.wc-block-components-price-slider__controls{display:flex}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount{margin:0;border-radius:4px;width:auto;max-width:100px;min-width:0}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--min{margin-right:10px}.wc-block-components-price-slider__controls .wc-block-components-price-slider__amount.wc-block-components-price-slider__amount--max{margin-left:auto}.wc-block-components-price-slider__range-input{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;height:0;display:block;position:relative;pointer-events:none;outline:none!important;position:absolute;left:0;top:0}.wc-block-components-price-slider__range-input::-webkit-slider-runnable-track{cursor:default;height:1px;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-webkit-slider-thumb{background-color:transparent;background-position:0 0;width:28px;height:23px;border:0;padding:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-webkit-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none;margin:-6px 0 0}.wc-block-components-price-slider__range-input::-webkit-slider-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input::-webkit-slider-progress{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-focus-outer{border:0}.wc-block-components-price-slider__range-input::-moz-range-track{cursor:default;height:1px;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-progress{margin:0;padding:0!important;border:0!important;outline:none;background:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-thumb{background-color:transparent;background-position:0 0;width:28px;height:23px;border:0;padding:0;margin:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-moz-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-moz-range-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input::-ms-thumb{background-color:transparent;background-position:0 0;width:28px;height:23px;border:0;padding:0;margin:0;vertical-align:top;cursor:pointer;z-index:20;pointer-events:auto;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width='56' height='46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0)'%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 9.942L16.9 3.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 16.645 6.21 21 11.67 21h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M13 7v9m-3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M25.318 32.942L16.9 26.8c-1.706-1.228-3.64-1.899-5.686-1.787H11.1c-4.89.335-8.985 4.356-9.099 9.27C1.888 39.645 6.21 44 11.67 44h.113c1.82 0 3.64-.67 5.118-1.787l8.417-6.255c.91-.893.91-2.234 0-3.016v0zM13 30v9m-3-9v9-9z' stroke='%23757575'/%3E%3Cpath d='M30.682 9.942L39.1 3.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 16.645 49.79 21 44.33 21h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23fff' stroke='%23757575'/%3E%3Cpath d='M43 7v9m3-9v9-9z' stroke='%23B8B8B8'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0z' fill='%23F8F3F7' stroke='%23fff' stroke-opacity='.75' stroke-width='3'/%3E%3Cpath d='M30.682 32.942L39.1 26.8c1.706-1.228 3.64-1.899 5.686-1.787h.114c4.89.335 8.985 4.356 9.099 9.27C54.112 39.645 49.79 44 44.33 44h-.113c-1.82 0-3.64-.67-5.118-1.787l-8.417-6.255c-.91-.893-.91-2.234 0-3.016v0zM43 30v9m3-9v9-9z' stroke='%23757575'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0'%3E%3Cpath fill='%23fff' d='M0 0h56v46H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");-ms-transition:transform .2s ease-in-out;transition:transform .2s ease-in-out;-webkit-appearance:none;-moz-appearance:none;appearance:none}.wc-block-components-price-slider__range-input::-ms-thumb:hover{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-webkit-slider-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-moz-range-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input:focus::-ms-thumb{background-position-y:-23px;transform:scale(1.1)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min{z-index:21}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-webkit-slider-thumb{margin-left:-2px;background-position-x:left}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-moz-range-thumb{background-position-x:left;transform:translate(-2px,4px)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--min::-ms-thumb{background-position-x:left}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max{z-index:20}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-webkit-slider-thumb{background-position-x:right;margin-left:2px}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-moz-range-thumb{background-position-x:right;transform:translate(2px,4px)}.wc-block-components-price-slider__range-input.wc-block-components-price-slider__range-input--max::-ms-thumb{background-position-x:right}.rtl .wc-block-components-price-slider__range-input-progress{--track-background:linear-gradient(270deg,transparent var(--low),var(--range-color) 0,var(--range-color) var(--high),transparent 0) no-repeat 0 100%/100% 100%;--range-color:#af7dd1;background:var(--track-background)}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-price-slider__range-input-wrapper{background:transparent;box-shadow:none;height:24px}.wc-block-components-price-slider__range-input-progress{background:#af7dd1;width:100%;top:7px}.wc-block-components-price-slider__range-input{height:24px;pointer-events:auto}.wc-block-components-price-slider__range-input::-ms-track{background:transparent;border-color:transparent;border-width:7px 0;color:transparent}.wc-block-components-price-slider__range-input::-ms-fill-lower{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input::-ms-fill-upper{background:transparent}.wc-block-components-price-slider__range-input::-ms-tooltip{display:none}.wc-block-components-price-slider__range-input::-ms-thumb{transform:translate(1px);pointer-events:auto}.wc-block-components-price-slider__range-input--max::-ms-fill-upper{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input--max::-ms-fill-lower{background:transparent}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;z-index:1;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}}@media screen and (-ms-high-contrast:active)and (prefers-reduced-motion:reduce),screen and (-ms-high-contrast:none)and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}@supports(-ms-ime-align:auto){.wc-block-components-price-slider__range-input-wrapper{background:transparent;box-shadow:none;height:24px}.wc-block-components-price-slider__range-input-progress{background:#af7dd1;width:100%;top:7px}.wc-block-components-price-slider__range-input{height:24px;pointer-events:auto}.wc-block-components-price-slider__range-input::-ms-track{background:transparent;border-color:transparent;border-width:7px 0;color:transparent}.wc-block-components-price-slider__range-input::-ms-fill-lower{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input::-ms-fill-upper{background:transparent}.wc-block-components-price-slider__range-input::-ms-tooltip{display:none}.wc-block-components-price-slider__range-input::-ms-thumb{transform:translate(1px);pointer-events:auto}.wc-block-components-price-slider__range-input--max::-ms-fill-upper{background:#e1e1e1;box-shadow:inset 0 0 0 1px #b8b8b8}.wc-block-components-price-slider__range-input--max::-ms-fill-lower{background:transparent}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;z-index:1;box-shadow:none}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper>*,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper>*{visibility:hidden}.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper:after,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-price-slider.is-disabled .wc-block-components-price-slider__range-input-wrapper,.wc-block-components-price-slider.is-loading .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.wc-block-components-price-slider.is-disabled:not(.is-loading) .wc-block-components-price-slider__range-input-wrapper{-webkit-animation:none;animation:none}}.theme-twentytwentyone .wc-block-components-price-slider__range-input-wrapper{background:transparent;border:3px solid;box-sizing:border-box}.theme-twentytwentyone .wc-block-components-price-slider__range-input-progress{--range-color:currentColor;margin:-3px}.theme-twentytwentyone .wc-block-price-filter__range-input{background:transparent;margin:-3px;width:calc(100% + 6px)}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-webkit-slider-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-webkit-slider-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-moz-range-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-moz-range-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input:focus::-ms-thumb,.theme-twentytwentyone .wc-block-price-filter__range-input:hover::-ms-thumb{filter:none}.theme-twentytwentyone .wc-block-price-filter__range-input::-webkit-slider-thumb{margin-top:-9px}.theme-twentytwentyone .wc-block-price-filter__range-input.wc-block-components-price-slider__range-input--max::-moz-range-thumb{transform:translate(2px,1px)}.theme-twentytwentyone .wc-block-price-filter__range-input.wc-block-components-price-slider__range-input--min::-moz-range-thumb{transform:translate(-2px,1px)}.theme-twentytwentyone .wc-block-price-filter__range-input::-ms-track{border-color:transparent!important}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.theme-twentytwentyone .wc-block-components-price-slider__range-input-wrapper{border:0;height:auto;position:relative;height:50px}.theme-twentytwentyone .wc-block-components-price-slider__range-input-progress{display:none}.theme-twentytwentyone .wc-block-price-filter__range-input{height:100%;margin:0;width:100%}}.wc-block-components-product-sort-select{margin-bottom:24px;text-align:left}@-webkit-keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.wc-block-grid{text-align:center}.wc-block-grid__no-products{padding:40px;text-align:center;width:100%}.wc-block-grid__no-products .wc-block-grid__no-products-image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-grid__no-products .wc-block-grid__no-products-title{display:block;margin:0;font-weight:700}.wc-block-grid__no-products .wc-block-grid__no-products-description{display:block;margin:.25em 0 1em}.wc-block-grid__products{display:flex;flex-wrap:wrap;padding:0;margin:0 -8px 16px;background-clip:padding-box}.wc-block-grid__product{box-sizing:border-box;padding:0;margin:0;float:none;width:auto;position:relative;text-align:center;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:16px solid transparent;list-style:none}.wc-block-grid__product.wc-block-grid__product{box-sizing:border-box}.theme-twentytwenty .wc-block-grid.has-aligned-buttons .wc-block-grid__product,.wc-block-grid.has-aligned-buttons .wc-block-grid__product{display:flex;flex-direction:column}.theme-twentytwenty .wc-block-grid.has-aligned-buttons .wc-block-grid__product>:last-child,.wc-block-grid.has-aligned-buttons .wc-block-grid__product>:last-child{margin-top:auto;margin-bottom:0;padding-bottom:12px}.theme-twentytwenty .wc-block-grid.has-1-columns .wc-block-grid__product,.wc-block-grid.has-1-columns .wc-block-grid__product{flex:1 0 100%;max-width:100%}.theme-twentytwenty .wc-block-grid.has-2-columns .wc-block-grid__product,.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%}.theme-twentytwenty .wc-block-grid.has-3-columns .wc-block-grid__product,.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 33.33333%;max-width:33.3333333333%}.theme-twentytwenty .wc-block-grid.has-4-columns .wc-block-grid__product,.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 25%;max-width:25%}.theme-twentytwenty .wc-block-grid.has-5-columns .wc-block-grid__product,.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 20%;max-width:20%}.theme-twentytwenty .wc-block-grid.has-6-columns .wc-block-grid__product,.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 16.66667%;max-width:16.6666666667%}.theme-twentytwenty .wc-block-grid.has-7-columns .wc-block-grid__product,.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 14.28571%;max-width:14.2857142857%}.theme-twentytwenty .wc-block-grid.has-8-columns .wc-block-grid__product,.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 12.5%;max-width:12.5%}.theme-twentytwenty .wc-block-grid.has-6-columns .wc-block-grid__product,.wc-block-grid.has-6-columns .wc-block-grid__product{font-size:.5em}.theme-twentytwenty .wc-block-grid.has-5-columns .wc-block-grid__product,.theme-twentytwenty .wc-block-grid.has-6-columns.alignfull .wc-block-grid__product,.wc-block-grid.has-5-columns .wc-block-grid__product,.wc-block-grid.has-6-columns.alignfull .wc-block-grid__product{font-size:.58em}.theme-twentytwenty .wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.theme-twentytwenty .wc-block-grid.has-5-columns.alignfull .wc-block-grid__product,.wc-block-grid.has-4-columns:not(.alignwide):not(.alignfull) .wc-block-grid__product,.wc-block-grid.has-5-columns.alignfull .wc-block-grid__product{font-size:.75em}.theme-twentytwenty .wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull),.wc-block-grid.has-3-columns:not(.alignwide):not(.alignfull){font-size:.92em}@media(max-width:480px){.wc-block-grid.has-2-columns .wc-block-grid__products{display:block}.wc-block-grid.has-2-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-3-columns .wc-block-grid__products{display:block}.wc-block-grid.has-3-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-4-columns .wc-block-grid__products{display:block}.wc-block-grid.has-4-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-5-columns .wc-block-grid__products{display:block}.wc-block-grid.has-5-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-6-columns .wc-block-grid__products{display:block}.wc-block-grid.has-6-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-7-columns .wc-block-grid__products{display:block}.wc-block-grid.has-7-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}.wc-block-grid.has-8-columns .wc-block-grid__products{display:block}.wc-block-grid.has-8-columns .wc-block-grid__product{margin-left:auto;margin-right:auto;flex:1 0 100%;max-width:100%;padding:0}}@media(min-width:481px)and (max-width:600px){.wc-block-grid.has-2-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-2-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-2-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-3-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-3-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-3-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-4-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-4-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-4-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-5-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-5-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-5-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-6-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-6-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-6-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-7-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-7-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-7-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}.wc-block-grid.has-8-columns .wc-block-grid__product{flex:1 0 50%;max-width:50%;padding:0;margin:0 0 24px}.wc-block-grid.has-8-columns .wc-block-grid__product:nth-child(odd){padding-right:8px}.wc-block-grid.has-8-columns .wc-block-grid__product:nth-child(2n){padding-left:8px}}.wc-block-components-product-name{font-size:1em;overflow-wrap:anywhere;word-break:break-word;-ms-word-break:break-all}.wc-block-components-product-price--align-left{display:block;text-align:left}.wc-block-components-product-price--align-center{display:block;text-align:center}.wc-block-components-product-price--align-right{display:block;text-align:right}.wc-block-components-product-price__value.is-discounted{margin-left:.5em}.is-loading .wc-block-components-product-price:before{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;content:".";display:inline-block;width:5em}.is-loading .wc-block-components-product-price:before>*{visibility:hidden}.is-loading .wc-block-components-product-price:before:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-product-price:before{-webkit-animation:none;animation:none}}.wc-block-components-quantity-selector{display:flex;width:107px;border:1px solid #ddd;background:#fff;border-radius:4px;box-sizing:content-box;margin:0 0 .25em}.has-dark-controls .wc-block-components-quantity-selector{background-color:transparent;border-color:hsla(0,0%,100%,.4)}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{font-size:1em;order:2;min-width:40px;flex:1 1 auto;border:0;padding:.4em 0;margin:0;text-align:center;background:transparent;box-shadow:none;color:#000;line-height:1;vertical-align:middle;-moz-appearance:textfield}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{background:#f0f0f0;outline:1px solid #ddd}.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:disabled{color:#949494}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input{color:#fff;background:transparent}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus{background:transparent}.has-dark-controls .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:disabled{color:hsla(0,0%,100%,.3)}.wc-block-components-quantity-selector input::-webkit-inner-spin-button,.wc-block-components-quantity-selector input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button{border:0;padding:0;margin:0;background:none transparent;box-shadow:none;font-size:1em;min-width:30px;cursor:pointer;color:#1e1e1e;font-style:normal;text-align:center;text-decoration:none}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus{outline:2px solid #ddd}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{border:0;padding:0;margin:0;background:none transparent;box-shadow:none;color:#1e1e1e}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus:focus,.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover:focus{outline:2px solid #ddd}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled{color:#949494;cursor:default;border:0;padding:0;margin:0;background:none transparent;box-shadow:none}.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled:focus{outline:2px solid #ddd}.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{color:#fff}.has-dark-controls .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled{color:hsla(0,0%,100%,.3)}.wc-block-components-quantity-selector>.wc-block-components-quantity-selector__button--minus{order:1}.wc-block-components-quantity-selector>.wc-block-components-quantity-selector__button--plus{order:3}.theme-twentyseventeen .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus,.theme-twentyseventeen .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover{background:none transparent}.wc-block-components-radio-control__option{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;display:block;margin:1em 0;padding:0 0 0 2.5em;position:relative}.wc-block-components-radio-control__option:first-child{margin-top:0}.wc-block-components-radio-control__option:last-child{margin-bottom:0}.wc-block-components-radio-control__option-layout{display:table;width:100%}.wc-block-components-radio-control__option .wc-block-components-radio-control__option-layout:after{display:none}.wc-block-components-radio-control__description-group,.wc-block-components-radio-control__label-group{display:table-row}.wc-block-components-radio-control__description-group>span,.wc-block-components-radio-control__label-group>span{display:table-cell}.wc-block-components-radio-control__description-group .wc-block-components-radio-control__secondary-description,.wc-block-components-radio-control__description-group .wc-block-components-radio-control__secondary-label,.wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-description,.wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-label{text-align:right;min-width:50%}.wc-block-components-radio-control__label,.wc-block-components-radio-control__secondary-label{line-height:max(1.5rem,24px)}.wc-block-components-radio-control__description,.wc-block-components-radio-control__secondary-description{font-size:.875em;line-height:20px}.wc-block-components-radio-control .wc-block-components-radio-control__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:#fff;border:2px solid #50575e;border-radius:50%;display:inline-block;height:1.5em;min-height:24px;min-width:24px;width:1.5em;position:absolute;left:0;top:50%;transform:translateY(-50%)}.wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background:#000;border-radius:50%;content:"";display:block;height:.75em;left:50%;margin:0;min-height:12px;min-width:12px;position:absolute;top:50%;transform:translate(-50%,-50%);width:.75em}.has-dark-controls .wc-block-components-radio-control .wc-block-components-radio-control__input{border-color:hsla(0,0%,100%,.6);background-color:rgba(0,0,0,.1)}.has-dark-controls .wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background:#fff}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:checked{border-width:2px}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:checked:before{background-color:var(--form--color-text)}.theme-twentytwentyone .wc-block-components-radio-control .wc-block-components-radio-control__input:after{display:none}.is-loading .wc-block-components-review-list-item__text{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;display:block;width:60%}.is-loading .wc-block-components-review-list-item__text>*{visibility:hidden}.is-loading .wc-block-components-review-list-item__text:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__text{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__text:before{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image>*{visibility:hidden}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__image:before{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;font-size:1em;width:80px}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author>*{visibility:hidden}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__author:before{content:" "}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__product,.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__meta .wc-block-components-review-list-item__rating .wc-block-components-review-list-item__rating__stars>span{display:none}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;height:1em;width:120px}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date>*{visibility:hidden}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date{-webkit-animation:none;animation:none}}.is-loading .wc-block-components-review-list-item__info .wc-block-components-review-list-item__published-date:before{content:" "}.editor-styles-wrapper .wc-block-components-review-list-item__item,.wc-block-components-review-list-item__item{margin:0 0 48px;list-style:none}.wc-block-components-review-list-item__info{display:-ms-grid;display:grid;-ms-grid-columns:1fr;grid-template-columns:1fr;margin-bottom:24px}.wc-block-components-review-list-item__meta{-ms-grid-column:1;grid-column:1;-ms-grid-row:1;grid-row:1}.wc-block-components-review-list-item__item--has-image .wc-block-components-review-list-item__info{-ms-grid-columns:calc(3em + 16px) 1fr;grid-template-columns:calc(3em + 16px) 1fr}.wc-block-components-review-list-item__item--has-image .wc-block-components-review-list-item__meta{-ms-grid-column:2;grid-column:2}.wc-block-components-review-list-item__image{align-items:center;display:flex;height:3em;-ms-grid-column:1;grid-column:1;-ms-grid-row:1;-ms-grid-row-span:2;grid-row:1/3;justify-content:center;position:relative;width:3em}.wc-block-components-review-list-item__image>img{display:block;max-height:100%;-o-object-fit:contain;object-fit:contain}.wc-block-components-review-list-item__verified{width:21px;height:21px;text-indent:21px;margin:0;line-height:21px;overflow:hidden;position:absolute;right:-7px;bottom:-7px}.wc-block-components-review-list-item__verified:before{width:21px;height:21px;background:transparent url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="21" height="21" fill="none"%3E%3Ccircle cx="10.5" cy="10.5" r="10.5" fill="%23fff"/%3E%3Cpath fill="%23008A21" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3Cmask id="a" width="17" height="17" x="2" y="2" maskUnits="userSpaceOnUse"%3E%3Cpath fill="%23fff" fill-rule="evenodd" d="M2.1667 10.5003c0-4.6 3.7333-8.3333 8.3333-8.3333s8.3334 3.7333 8.3334 8.3333S15.1 18.8337 10.5 18.8337s-8.3333-3.7334-8.3333-8.3334zm2.5 0l4.1666 4.1667 7.5001-7.5-1.175-1.1833-6.325 6.325-2.9917-2.9834-1.175 1.175z" clip-rule="evenodd"/%3E%3C/mask%3E%3Cg mask="url(%23a)"%3E%3Cpath fill="%23008A21" d="M.5.5h20v20H.5z"/%3E%3C/g%3E%3C/svg%3E') 50% no-repeat;display:block;content:""}.wc-block-components-review-list-item__meta{display:flex;align-items:center;flex-flow:row wrap}.wc-block-components-review-list-item__meta:after{order:3;content:"";flex-basis:100%}.wc-block-components-review-list-item__author,.wc-block-components-review-list-item__product{display:block;font-weight:700;order:1;margin-right:8px}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author{font-weight:400;order:4}.wc-block-components-review-list-item__published-date{order:5}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date{padding-left:8px;position:relative}.wc-block-components-review-list-item__product+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date:before{content:"";display:inline-block;margin-left:-8px;border-right:1px solid;opacity:.5;height:1em;vertical-align:middle;position:absolute;top:calc(50% + .1em);transform:translateY(-50%)}.wc-block-components-review-list-item__author:first-child+.wc-block-components-review-list-item__published-date:before,.wc-block-components-review-list-item__rating+.wc-block-components-review-list-item__author+.wc-block-components-review-list-item__published-date:before{display:none}.wc-block-components-review-list-item__rating{order:2}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars{font-size:1em;display:block;top:0;overflow:hidden;position:relative;height:1em;line-height:1;width:5.3em;font-family:star;font-weight:400}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars:before{content:"SSSSS";opacity:.25;float:left;top:0;left:0;position:absolute}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}.wc-block-components-review-list-item__rating>.wc-block-components-review-list-item__rating__stars span:before{content:"SSSSS";top:0;position:absolute;left:0;color:#e6a237}.wc-block-components-review-list-item__text p{font-size:inherit}.wc-block-components-review-list.wc-block-components-review-list{margin:0}.wc-block-components-review-sort-select{text-align:right}.wc-block-components-sidebar-layout{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wc-block-components-sidebar-layout .wc-block-components-main{box-sizing:border-box;margin:0;padding-right:3.7735849057%;width:65%}.wc-block-components-sidebar{box-sizing:border-box;margin:0;padding-left:2.2641509434%;width:35%}.wc-block-components-sidebar .wc-block-components-panel>h2{font-size:1em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.is-medium.wc-block-components-sidebar-layout,.is-mobile.wc-block-components-sidebar-layout,.is-small.wc-block-components-sidebar-layout{flex-direction:column;margin:0 auto 16px}.is-medium.wc-block-components-sidebar-layout .wc-block-components-main,.is-medium.wc-block-components-sidebar-layout .wc-block-components-sidebar,.is-mobile.wc-block-components-sidebar-layout .wc-block-components-main,.is-mobile.wc-block-components-sidebar-layout .wc-block-components-sidebar,.is-small.wc-block-components-sidebar-layout .wc-block-components-main,.is-small.wc-block-components-sidebar-layout .wc-block-components-sidebar{padding:0;width:100%}.is-large .wc-block-components-sidebar .wc-block-components-panel,.is-large .wc-block-components-sidebar .wc-block-components-totals-item{padding-left:16px;padding-right:16px}.is-large .wc-block-components-sidebar .wc-block-components-panel .wc-block-components-totals-item{padding:0}.wc-block-components-sidebar .wc-block-components-panel>h2{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit}.wc-block-components-sidebar .wc-block-components-panel>h2 .wc-block-components-panel__button{font-weight:400}.theme-twentytwenty .wc-block-components-sidebar .wc-block-components-panel>h2{font-size:1.25em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-components-sort-select{margin-bottom:12px}.wc-block-components-sort-select__label{margin-right:12px;display:inline-block;font-weight:400}.wc-block-components-sort-select__select{font-size:inherit;width:-webkit-max-content;width:-moz-max-content;width:max-content}.wc-block-components-spinner{position:absolute;width:100%;height:100%;color:inherit;box-sizing:content-box;text-align:center;font-size:1.25em}.wc-block-components-spinner:after{content:" ";position:absolute;top:50%;left:50%;margin:-.5em 0 0 -.5em;width:1em;height:1em;box-sizing:border-box;transform-origin:50% 50%;transform:translateZ(0) scale(.5);-webkit-backface-visibility:hidden;backface-visibility:hidden;border-radius:50%;border:.2em solid;border-left:.2em solid transparent;-webkit-animation:spinner__animation 1s linear infinite;animation:spinner__animation 1s linear infinite}.wc-block-components-state-input{margin-top:1.5em}.wc-block-components-tabs .wc-block-components-tabs__list{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item{border:none;flex:auto;background:transparent;padding:12px 16px;color:inherit;outline-offset:-1px;text-align:center;transition:box-shadow .1s linear;box-shadow:inset 0 -1px currentColor;border-radius:0}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item.is-active{box-shadow:inset 0 -3px currentColor;font-weight:600;position:relative}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:focus{outline-offset:-1px;outline:1px dotted currentColor}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:active,.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item:hover{background:transparent}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content{font-size:1em;line-height:1;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;display:inline-block;font-weight:700}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content>img,.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content>svg{height:1.2em;vertical-align:middle;margin:.2em 0 -.2em}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content .wc-block-components-payment-method-icons{margin:.2em 0 -.2em}.wc-block-components-tabs .wc-block-components-tabs__list>.wc-block-components-tabs__item .wc-block-components-tabs__item-content .wc-block-components-payment-method-icons .wc-block-components-payment-method-icon{height:1.2em;vertical-align:middle}.wc-block-components-tabs .wc-block-components-tabs__content{padding:16px 0;text-transform:none}.wc-block-components-form .wc-block-components-text-input,.wc-block-components-text-input{position:relative;margin-top:1.5em;white-space:nowrap}.wc-block-components-form .wc-block-components-text-input label,.wc-block-components-text-input label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;position:absolute;transform:translateY(.75em);left:0;top:0;transform-origin:top left;line-height:1.375;color:#757575;transition:transform .2s ease;margin:0 0 0 17px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 32px);cursor:text}.has-dark-controls .wc-block-components-form .wc-block-components-text-input label,.has-dark-controls .wc-block-components-text-input label{color:hsla(0,0%,100%,.6)}@media screen and (prefers-reduced-motion:reduce){.wc-block-components-form .wc-block-components-text-input label,.wc-block-components-text-input label{transition:none}}.wc-block-components-form .wc-block-components-text-input input:-webkit-autofill+label,.wc-block-components-text-input input:-webkit-autofill+label{transform:translateY(4px) scale(.75)}.wc-block-components-form .wc-block-components-text-input.is-active label,.wc-block-components-text-input.is-active label{transform:translateY(4px) scale(.75)}.wc-block-components-form .wc-block-components-text-input input[type=email],.wc-block-components-form .wc-block-components-text-input input[type=number],.wc-block-components-form .wc-block-components-text-input input[type=tel],.wc-block-components-form .wc-block-components-text-input input[type=text],.wc-block-components-form .wc-block-components-text-input input[type=url],.wc-block-components-text-input input[type=email],.wc-block-components-text-input input[type=number],.wc-block-components-text-input input[type=tel],.wc-block-components-text-input input[type=text],.wc-block-components-text-input input[type=url]{font-size:1em;background-color:#fff;padding:.75em 16px;border-radius:4px;border:1px solid #50575e;width:100%;line-height:1.375;font-family:inherit;margin:0;box-sizing:border-box;height:3em;min-height:0;color:#2b2d2f}.wc-block-components-form .wc-block-components-text-input input[type=email]:focus,.wc-block-components-form .wc-block-components-text-input input[type=number]:focus,.wc-block-components-form .wc-block-components-text-input input[type=tel]:focus,.wc-block-components-form .wc-block-components-text-input input[type=text]:focus,.wc-block-components-form .wc-block-components-text-input input[type=url]:focus,.wc-block-components-text-input input[type=email]:focus,.wc-block-components-text-input input[type=number]:focus,.wc-block-components-text-input input[type=tel]:focus,.wc-block-components-text-input input[type=text]:focus,.wc-block-components-text-input input[type=url]:focus{background-color:#fff;color:#2b2d2f;outline:0;box-shadow:0 0 0 1px #50575e}.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=email],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=number],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=tel],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=text],.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=url],.has-dark-controls .wc-block-components-text-input input[type=email],.has-dark-controls .wc-block-components-text-input input[type=number],.has-dark-controls .wc-block-components-text-input input[type=tel],.has-dark-controls .wc-block-components-text-input input[type=text],.has-dark-controls .wc-block-components-text-input input[type=url]{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=email]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=number]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=tel]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=text]:focus,.has-dark-controls .wc-block-components-form .wc-block-components-text-input input[type=url]:focus,.has-dark-controls .wc-block-components-text-input input[type=email]:focus,.has-dark-controls .wc-block-components-text-input input[type=number]:focus,.has-dark-controls .wc-block-components-text-input input[type=tel]:focus,.has-dark-controls .wc-block-components-text-input input[type=text]:focus,.has-dark-controls .wc-block-components-text-input input[type=url]:focus{background-color:rgba(0,0,0,.1);color:#fff;box-shadow:0 0 0 1px hsla(0,0%,100%,.4)}.wc-block-components-form .wc-block-components-text-input input[type=number],.wc-block-components-text-input input[type=number]{-moz-appearance:textfield}.wc-block-components-form .wc-block-components-text-input input[type=number]::-webkit-inner-spin-button,.wc-block-components-form .wc-block-components-text-input input[type=number]::-webkit-outer-spin-button,.wc-block-components-text-input input[type=number]::-webkit-inner-spin-button,.wc-block-components-text-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.wc-block-components-form .wc-block-components-text-input.is-active input[type=email],.wc-block-components-form .wc-block-components-text-input.is-active input[type=number],.wc-block-components-form .wc-block-components-text-input.is-active input[type=tel],.wc-block-components-form .wc-block-components-text-input.is-active input[type=text],.wc-block-components-form .wc-block-components-text-input.is-active input[type=url],.wc-block-components-text-input.is-active input[type=email],.wc-block-components-text-input.is-active input[type=number],.wc-block-components-text-input.is-active input[type=tel],.wc-block-components-text-input.is-active input[type=text],.wc-block-components-text-input.is-active input[type=url]{padding:1.5em 0 .25em 16px}.wc-block-components-form .wc-block-components-text-input.has-error input,.wc-block-components-form .wc-block-components-text-input.has-error input:active,.wc-block-components-form .wc-block-components-text-input.has-error input:focus,.wc-block-components-form .wc-block-components-text-input.has-error input:hover,.wc-block-components-text-input.has-error input,.wc-block-components-text-input.has-error input:active,.wc-block-components-text-input.has-error input:focus,.wc-block-components-text-input.has-error input:hover{border-color:#cc1818}.wc-block-components-form .wc-block-components-text-input.has-error input:focus,.wc-block-components-text-input.has-error input:focus{box-shadow:0 0 0 1px #cc1818}.wc-block-components-form .wc-block-components-text-input.has-error label,.wc-block-components-text-input.has-error label{color:#cc1818}.wc-block-components-form .wc-block-components-text-input:only-child,.wc-block-components-text-input:only-child{margin-top:0}.wc-block-components-textarea{font-size:1em;background-color:#fff;border:1px solid #50575e;border-radius:4px;color:#2b2d2f;font-family:inherit;line-height:1.375;margin:0;padding:.75em 16px;width:100%}.has-dark-controls .wc-block-components-textarea{background-color:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.4);color:#fff}.has-dark-controls .wc-block-components-textarea::-moz-placeholder{color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-textarea:-ms-input-placeholder{color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-textarea::placeholder{color:hsla(0,0%,100%,.6)}.theme-twentytwentyone .has-dark-controls .wc-block-components-textarea{background-color:rgba(0,0,0,.1);color:#fff}.theme-twentytwenty .wc-block-components-title.wc-block-components-title,.wc-block-components-title.wc-block-components-title{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;font-size:1.25em;word-break:break-word}.wc-block-components-notices{display:block;margin-bottom:2em}.wc-block-components-notices .wc-block-components-notices__notice{margin:0;display:flex;flex-wrap:nowrap}.wc-block-components-notices .wc-block-components-notices__notice .components-notice__dismiss{background:transparent none;padding:0;margin:0 0 0 auto;border:0;outline:0;color:currentColor}.wc-block-components-notices .wc-block-components-notices__notice .components-notice__dismiss svg{fill:currentColor;vertical-align:text-top}.wc-block-components-notices .wc-block-components-notices__notice+.wc-block-components-notices__notice{margin-top:1em}.theme-twentytwenty .wc-block-components-notices__notice,.theme-twentytwentyone .wc-block-components-notices__notice{padding:1.5rem 3rem}.wc-block-components-notices__snackbar{position:fixed;bottom:20px;left:16px;width:auto}@media(max-width:782px){.wc-block-components-notices__snackbar{position:fixed;top:10px;left:0;bottom:auto}}@media(max-width:782px){.wc-block-components-notices__snackbar .components-snackbar-list__notice-container{margin-left:10px;margin-right:10px}}.wc-block-components-validation-error{font-size:.75em;color:#cc1818;max-width:100%;white-space:normal}.wc-block-components-validation-error>p{margin:0;padding:4px 0 0}.wc-block-components-select+.wc-block-components-validation-error{margin-bottom:24px}.with-scroll-to-top__scroll-point{position:relative;top:-36px}.is-medium .wc-block-cart__sidebar,.is-mobile .wc-block-cart__sidebar,.is-small .wc-block-cart__sidebar{margin-bottom:24px;order:0}.editor-styles-wrapper .wc-block-cart__empty-cart__title,.wc-block-cart__empty-cart__title{font-size:inherit}.wc-block-cart__submit{position:relative;margin:0 0 16px}.wc-block-cart__submit-button{width:100%;margin:0}.wc-block-cart .wc-block-cart__submit-container{padding:0}@media(min-width:783px){.wc-block-cart .wc-block-cart__submit-container--sticky{display:none}}@media(max-width:782px){.wc-block-cart .wc-block-cart__submit-container--sticky{background:#fff;bottom:0;left:0;padding:16px;position:fixed;width:100%;z-index:9999}.wc-block-cart .wc-block-cart__submit-container--sticky:before{box-shadow:0 -10px 20px 10px currentColor;color:hsla(0,0%,80%,.5);content:"";height:100%;left:0;position:absolute;right:0;top:0}}.wc-block-cart .wc-block-components-shipping-calculator{white-space:nowrap}.wc-block-cart .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.wc-block-cart .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.wc-block-cart .wc-block-components-address-form .wc-block-components-text-input:first-of-type{margin-top:0}table.wc-block-cart-items,table.wc-block-cart-items td,table.wc-block-cart-items th{background:none!important;border:0;margin:0}.editor-styles-wrapper table.wc-block-cart-items,table.wc-block-cart-items{width:100%}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header,table.wc-block-cart-items .wc-block-cart-items__header{font-size:.75em;text-transform:uppercase}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-image{width:100px}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-product{visibility:hidden}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total,table.wc-block-cart-items .wc-block-cart-items__header .wc-block-cart-items__header-total{width:100px;text-align:right}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image img{width:100%;margin:0}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link{border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none;display:inline;text-shadow:none;text-decoration:underline;font-size:.75em;text-transform:none;white-space:nowrap}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:active,.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus,.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:active,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover{background:transparent}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name{display:block;max-width:-webkit-max-content;max-width:-moz-max-content;max-width:max-content}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total{font-size:1em;text-align:right;line-height:inherit}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata,table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata{margin-bottom:.75em}.editor-styles-wrapper table.wc-block-cart-items .wc-block-cart-items__row.is-disabled,table.wc-block-cart-items .wc-block-cart-items__row.is-disabled{opacity:.5;pointer-events:none;transition:opacity .2s ease}.wc-block-cart .wc-block-components-totals-footer-item,.wc-block-cart .wc-block-components-totals-taxes{margin:0}.wc-block-cart--is-loading h2 span,.wc-block-cart--is-loading th span,.wc-block-mini-cart__drawer.is-loading h2 span,.wc-block-mini-cart__drawer.is-loading th span{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-width:84px;display:inline-block}.wc-block-cart--is-loading h2 span>*,.wc-block-cart--is-loading th span>*,.wc-block-mini-cart__drawer.is-loading h2 span>*,.wc-block-mini-cart__drawer.is-loading th span>*{visibility:hidden}.wc-block-cart--is-loading h2 span:after,.wc-block-cart--is-loading th span:after,.wc-block-mini-cart__drawer.is-loading h2 span:after,.wc-block-mini-cart__drawer.is-loading th span:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading h2 span,.wc-block-cart--is-loading th span,.wc-block-mini-cart__drawer.is-loading h2 span,.wc-block-mini-cart__drawer.is-loading th span{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading h2 span:before,.wc-block-cart--is-loading th span:before,.wc-block-mini-cart__drawer.is-loading h2 span:before,.wc-block-mini-cart__drawer.is-loading th span:before{content:" "}.wc-block-cart--is-loading h2 span,.wc-block-mini-cart__drawer.is-loading h2 span{min-width:33%}.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-cart--is-loading .wc-block-components-quantity-selector,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.wc-block-cart--is-loading .wc-block-components-product-metadata>*,.wc-block-cart--is-loading .wc-block-components-product-price>*,.wc-block-cart--is-loading .wc-block-components-quantity-selector>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector>*{visibility:hidden}.wc-block-cart--is-loading .wc-block-components-product-metadata:after,.wc-block-cart--is-loading .wc-block-components-product-price:after,.wc-block-cart--is-loading .wc-block-components-quantity-selector:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-cart--is-loading .wc-block-components-quantity-selector,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-quantity-selector{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-name,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-width:84px;display:inline-block}.wc-block-cart--is-loading .wc-block-components-product-name>*,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name>*{visibility:hidden}.wc-block-cart--is-loading .wc-block-components-product-name:after,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-components-product-name,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-name:before,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-name:before{content:" "}.wc-block-cart--is-loading .wc-block-components-product-metadata,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-metadata{margin-top:.25em;min-width:8em}.wc-block-cart--is-loading .wc-block-cart-item__remove-link,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__remove-link{visibility:hidden}.wc-block-cart--is-loading .wc-block-cart-item__image>a,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;display:block}.wc-block-cart--is-loading .wc-block-cart-item__image>a>*,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a>*{visibility:hidden}.wc-block-cart--is-loading .wc-block-cart-item__image>a:after,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-cart-item__image>a,.wc-block-mini-cart__drawer.is-loading .wc-block-cart-item__image>a{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-components-product-price,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price{max-width:3em;display:block;margin-top:.25em}.wc-block-cart--is-loading .wc-block-components-product-price:before,.wc-block-mini-cart__drawer.is-loading .wc-block-components-product-price:before{content:" "}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;min-height:460px}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card>*,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card>*{visibility:hidden}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card:after,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card{-webkit-animation:none;animation:none}}.wc-block-cart--is-loading .wc-block-cart__sidebar .components-card:before,.wc-block-mini-cart__drawer.is-loading .wc-block-cart__sidebar .components-card:before{content:" "}.wc-block-components-sidebar-layout.wc-block-cart--skeleton{display:none}.is-loading+.wc-block-components-sidebar-layout.wc-block-cart--skeleton{display:flex}.wc-block-cart-item__total-price-and-sale-badge-wrapper{display:flex;flex-direction:column;align-items:flex-end}.wc-block-cart-item__total-price-and-sale-badge-wrapper .wc-block-components-sale-badge{margin-top:4px}.is-medium.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,.is-mobile .wc-block-cart-item__total .wc-block-components-sale-badge,.is-mobile.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title,.is-small .wc-block-cart-item__total .wc-block-components-sale-badge,.is-small.wc-block-cart .wc-block-components-sidebar .wc-block-cart__totals-title{display:none}.is-medium table.wc-block-cart-items td,.is-mobile table.wc-block-cart-items td,.is-small table.wc-block-cart-items td{padding:0}.is-medium table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-medium table.wc-block-cart-items .wc-block-cart-items__header,.is-mobile table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-mobile table.wc-block-cart-items .wc-block-cart-items__header,.is-small table.wc-block-cart-items .wc-block-cart-item__remove-link,.is-small table.wc-block-cart-items .wc-block-cart-items__header{display:none}.is-medium table.wc-block-cart-items .wc-block-cart-items__row,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row,.is-small table.wc-block-cart-items .wc-block-cart-items__row{position:relative;display:-ms-grid;display:grid;-ms-grid-columns:80px 132px;grid-template-columns:80px 132px;padding:16px 0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row:after,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row:after,.is-small table.wc-block-cart-items .wc-block-cart-items__row:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image{-ms-grid-column:1;grid-column-start:1;-ms-grid-row:1;grid-row-start:1;padding-right:16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product{-ms-grid-column:2;grid-column-start:2;-ms-grid-column-span:2;grid-column-end:4;-ms-grid-row:1;grid-row-start:1;-ms-grid-column-align:stretch;justify-self:stretch;padding:0 16px 16px 0}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity{-ms-grid-column:1;grid-column-start:1;-ms-grid-row:2;grid-row-start:2;vertical-align:bottom;padding-right:16px;-ms-grid-row-align:end;align-self:end;padding-top:16px}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total{-ms-grid-row:1;grid-row-start:1}.is-medium table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount,.is-mobile table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount,.is-small table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total .wc-block-components-formatted-money-amount{display:inline-block}.is-large.wc-block-cart{margin-bottom:3em}.is-large.wc-block-cart .wc-block-cart-items{position:relative}.is-large.wc-block-cart .wc-block-cart-items:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.is-large.wc-block-cart .wc-block-cart-items th{padding:.25rem 16px .25rem 0;white-space:nowrap}.is-large.wc-block-cart .wc-block-cart-items td{position:relative;padding:16px 0 16px 16px;vertical-align:top}.is-large.wc-block-cart .wc-block-cart-items td:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.is-large.wc-block-cart .wc-block-cart-items th:last-child{padding-right:0}.is-large.wc-block-cart .wc-block-cart-items td:last-child{padding-right:16px}.is-large.wc-block-cart .wc-block-cart__sidebar>div:not(.wc-block-components-totals-wrapper){margin-left:16px;margin-right:16px}.is-large.wc-block-cart .wc-block-components-radio-control__input{left:0}.is-large.wc-block-cart .wc-block-cart__totals-title{border:0;border-radius:0;margin:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;box-shadow:none;display:inline;background:transparent;font-size:.75em;display:block;font-weight:600;padding:.25rem 0;text-align:right;text-transform:uppercase}.is-large.wc-block-cart .wc-block-components-sidebar .wc-block-components-shipping-calculator,.is-large.wc-block-cart .wc-block-components-sidebar .wc-block-components-shipping-rates-control__package:not(.wc-block-components-panel){padding-left:16px;padding-right:16px}.is-large.wc-block-cart .wc-block-cart__payment-options{padding:16px 0 0}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-empty-cart-block{display:none}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-items-block{box-sizing:border-box;margin:0;padding-right:3.7735849057%;width:65%;min-height:10em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block{min-height:15em;outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block>*{visibility:hidden}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-line-items-block{-webkit-animation:none;animation:none}}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-totals-block{box-sizing:border-box;margin:0;padding-left:2.2641509434%;width:35%;min-height:12em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block{min-height:3em;outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;margin:0 0 1em}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block>*,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block>*{visibility:hidden}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block:after,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block:after,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block:after,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-accepted-payment-methods-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-express-payment-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-proceed-to-checkout-block{-webkit-animation:none;animation:none}}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-order-summary-block{height:20em}@media only screen and (max-width:700px){.wp-block-woocommerce-cart.is-loading{padding-top:16px}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-filled-cart-block{flex-direction:column;margin:0 auto 16px}.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-items-block,.wp-block-woocommerce-cart.is-loading .wp-block-woocommerce-cart-totals-block{padding:0;width:100%}}.wc-block-checkout-error{padding:40px;text-align:center;width:100%}.wc-block-checkout-error .wc-block-checkout-error__image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-checkout-error .wc-block-checkout-error__title{display:block;margin:0;font-weight:700}.wc-block-checkout-error .wc-block-checkout-error__description{display:block;margin:.25em 0 1em}.wc-block-checkout-empty{padding:40px;text-align:center;width:100%}.wc-block-checkout-empty .wc-block-checkout-empty__image{max-width:150px;margin:0 auto 1em;display:block;color:inherit}.wc-block-checkout-empty .wc-block-checkout-empty__title{display:block;margin:0;font-weight:700}.wc-block-checkout-empty .wc-block-checkout-empty__description{display:block;margin:.25em 0 1em}.wc-block-checkout__actions{display:flex;justify-content:space-between;align-items:center}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:50%;padding:1em;height:auto}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button .wc-block-components-button__text{line-height:24px}.wc-block-checkout__actions .wc-block-components-checkout-place-order-button .wc-block-components-button__text>svg{fill:#fff;vertical-align:top}.is-mobile .wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button{display:none}.is-mobile .wc-block-checkout__actions .wc-block-components-checkout-place-order-button{width:100%}.is-large .wc-block-checkout__actions{position:relative;padding:1.5em 0}.is-large .wc-block-checkout__actions:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-checkout__form{margin:0;max-width:100%}.is-medium .wc-block-checkout__main,.is-mobile .wc-block-checkout__main,.is-small .wc-block-checkout__main{order:1}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form{margin-left:-6px;margin-right:-6px}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form:after,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form:after,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form:after,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form:after{content:"";clear:both;display:block}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input{float:left;margin-left:6px;margin-right:6px;position:relative;width:calc(50% - 12px)}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-country-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-state-input:nth-of-type(2),.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:first-of-type,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-text-input:nth-of-type(2){margin-top:0}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-address-form__company,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_1,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__address_2,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-address-form__company{width:calc(100% - 12px)}.is-large .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-large .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-medium .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-medium .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-small .wc-block-checkout__billing-fields .wc-block-components-address-form .wc-block-components-checkbox,.is-small .wc-block-checkout__shipping-fields .wc-block-components-address-form .wc-block-components-checkbox{clear:both}.components-placeholder.wc-block-checkout__no-shipping-placeholder{margin-bottom:16px}.components-placeholder.wc-block-checkout__no-shipping-placeholder *{pointer-events:all}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset{display:block}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset .components-button{background-color:#1e1e1e;color:#fff}.components-placeholder.wc-block-checkout__no-shipping-placeholder .components-placeholder__fieldset .wc-block-checkout__no-shipping-placeholder-description{display:block;margin:.25em 0 1em}.wc-block-checkout__shipping-option .wc-block-components-radio-control__option{position:relative;margin:0;padding:.75em 0 .75em 2.5em}.wc-block-checkout__shipping-option .wc-block-components-radio-control__option:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-checkout__shipping-option .wc-block-components-shipping-rates-control__no-results-notice{margin:.75em 0}.wc-block-checkout__terms{margin:1.5em 0}.wc-block-checkout__terms textarea{top:-5px;position:relative}.wc-block-checkout__terms.wc-block-checkout__terms--disabled{opacity:.6}.wc-block-checkout__sidebar .wc-block-components-product-name{display:block;color:inherit;flex-grow:1;flex-basis:0}.wc-block-checkout__sidebar .wc-block-components-totals-footer-item,.wc-block-checkout__sidebar .wc-block-components-totals-taxes{margin:0;padding:0}.is-medium .wc-block-checkout__sidebar,.is-mobile .wc-block-checkout__sidebar,.is-small .wc-block-checkout__sidebar{margin-bottom:24px;order:0}.wc-block-checkout__add-note{margin:1.5em 0}.is-medium .wc-block-checkout__add-note,.is-mobile .wc-block-checkout__add-note,.is-small .wc-block-checkout__add-note{position:relative;margin-bottom:1em;margin-top:1em;padding:1em 0}.is-medium .wc-block-checkout__add-note:after,.is-mobile .wc-block-checkout__add-note:after,.is-small .wc-block-checkout__add-note:after{border-style:solid;border-width:1px 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-checkout__add-note .wc-block-components-textarea{margin-top:16px}.wc-block-checkout__order-notes.wc-block-components-checkout-step{padding-left:0}.wp-block-woocommerce-checkout{margin:0}.wp-block-woocommerce-checkout .with-scroll-to-top__scroll-point{top:-96px}.wp-block-woocommerce-checkout.is-loading{display:flex;flex-wrap:wrap;margin:0 auto 16px;position:relative}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{width:35%;padding-left:2.2641509434%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block{width:65%;padding-right:3.7735849057%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{box-sizing:border-box;margin:0}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div{outline:0!important;border:0!important;background-color:#ebebeb!important;color:transparent!important;width:100%;border-radius:.25rem;display:block;line-height:1;position:relative!important;overflow:hidden!important;max-width:100%!important;pointer-events:none;box-shadow:none;z-index:1;margin:0 0 1.5em;display:none}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div>*,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div>*{visibility:hidden}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div:after,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div:after{content:" ";display:block;position:absolute;left:0;right:0;top:0;height:100%;background-repeat:no-repeat;background-image:linear-gradient(90deg,#ebebeb,#f5f5f5,#ebebeb);transform:translateX(-100%);-webkit-animation:loading__animation 1.5s ease-in-out infinite;animation:loading__animation 1.5s ease-in-out infinite}@media screen and (prefers-reduced-motion:reduce){.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block>div,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block>div{-webkit-animation:none;animation:none}}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-contact-information-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-payment-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-contact-information-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-payment-block{min-height:10em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-shipping-address-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-shipping-address-block{min-height:24em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-actions-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-actions-block{width:50%;min-height:4em;margin-left:50%;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wp-block-woocommerce-checkout-order-summary-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wp-block-woocommerce-checkout-order-summary-block{min-height:47em;display:block}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel>h2,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2{font-size:1em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline;color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel>h2 .wc-block-components-panel__button,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2 .wc-block-components-panel__button{font-weight:400}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block .wc-block-components-totals-item,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item{padding-left:16px;padding-right:16px}@media only screen and (max-width:700px){.wp-block-woocommerce-checkout.is-loading{flex-direction:column;margin:0 auto 16px}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-fields-block,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block{padding:0;width:100%}.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel,.wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-totals-item{padding-left:0;padding-right:0}}.theme-twentytwenty .wp-block-woocommerce-checkout.is-loading .wp-block-woocommerce-checkout-totals-block .wc-block-components-panel>h2{font-size:1.25em;border:0;border-radius:0;margin:0;padding:0;vertical-align:baseline}.wc-block-mini-cart__badge,.wc-block-mini-cart__quantity-badge{align-items:center;display:flex}.wc-block-mini-cart__badge{background:#fff;border:.15em solid;border-radius:1em;box-sizing:border-box;color:#000;font-size:.875em;font-weight:600;height:1.4285714286em;justify-content:center;margin-left:-.7142857143em;min-width:1.4285714286em;padding:0 .25em;transform:translateY(-50%);white-space:nowrap;z-index:1}.wc-block-mini-cart__icon{display:block;height:1.5em;width:1.5em;stroke:currentColor}.wc-block-mini-cart{background-color:transparent!important;display:flex;justify-content:flex-end}.wc-block-mini-cart.align-center{justify-content:center}.wc-block-mini-cart.align-left{justify-content:flex-start}.wc-block-mini-cart.is-transparent .wc-block-mini-cart__button{background-color:transparent!important}.wc-block-mini-cart__button{align-items:center;border:none;color:inherit;display:flex;font-weight:400;padding:.75em .5em}.wc-block-mini-cart__button:hover{opacity:.6}.wc-block-mini-cart__amount{display:none}.wc-block-mini-cart__tax-label{margin-right:.5em}@media screen and (min-width:768px){.wc-block-mini-cart__amount{display:initial;font-weight:600;margin-right:8px}}.modal-open .wc-block-mini-cart__button{pointer-events:none}.wc-block-mini-cart__drawer{font-size:1rem}.wc-block-mini-cart__drawer .components-modal__content{padding:0;position:relative}.wc-block-mini-cart__drawer .components-modal__header{position:absolute;top:40px;right:16px}.wc-block-mini-cart__drawer .wc-block-mini-cart__items{flex-grow:1;overflow-y:auto;padding:0 16px}.wc-block-mini-cart__drawer .wc-block-mini-cart__items .wc-block-cart-items__row:last-child:after{content:none}.wp-block-woocommerce-mini-cart-contents{background:#fff;box-sizing:border-box;display:flex;flex-direction:column;height:100vh;padding:0;justify-content:center}.wc-block-mini-cart__title{font-size:1.25em;margin:40px 16px 0}.wc-block-mini-cart__footer{border-top:1px solid #ddd;padding:24px 16px}.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal{font-weight:600;margin-bottom:16px}.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description{display:none;font-size:.75em;font-weight:400}@media only screen and (min-width:480px){.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal .wc-block-components-totals-item__description{display:unset}}.wc-block-mini-cart__footer-actions{display:flex;gap:16px}.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button{background-color:transparent;border:1px solid #1e1e1e;color:#1e1e1e;display:none;flex-grow:1;font-weight:600}@media only screen and (min-width:480px){.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-cart.wc-block-components-button{display:inline-flex}}.wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout{border:1px solid #1e1e1e;flex-grow:1;font-weight:600}.wc-block-mini-cart__footer .wc-block-components-payment-method-icons{margin-top:16px}.wc-block-components-express-payment{margin:auto;position:relative}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons{list-style:none;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;padding:0;margin:0;overflow:hidden;text-align:center}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons>li{margin:0}.wc-block-components-express-payment .wc-block-components-express-payment__event-buttons>li>img{width:100%;height:48px}.wc-block-components-express-payment--checkout{margin-top:5px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container{display:flex;flex-direction:row;left:0;position:absolute;right:0;top:-5px;vertical-align:middle}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container:before{border-left:1px solid;border-top:1px solid;border-radius:5px 0 0 0;content:"";display:block;height:4px;margin-right:12px;opacity:.3;pointer-events:none;width:10px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container:after{border-right:1px solid;border-top:1px solid;border-radius:0 5px 0 0;content:"";display:block;height:4px;margin-left:12px;opacity:.3;pointer-events:none;flex-grow:1}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title{flex-grow:0;transform:translateY(-50%)}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content{position:relative;padding:1.5em 23px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content:after{border-style:solid;border-width:0 1px 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0;border-radius:0 0 5px 5px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__content>p{margin-bottom:1em}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li{display:inline-block;width:50%}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li:nth-child(2n){padding-left:8px}.wc-block-components-express-payment--checkout .wc-block-components-express-payment__event-buttons>li:nth-child(odd){padding-right:8px}.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons>li{padding-bottom:16px;text-align:center;width:100%}.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons>li:last-child{padding-bottom:0}.wc-block-components-express-payment-continue-rule{display:flex;align-items:center;text-align:center;padding:0 24px;margin:24px 0}.wc-block-components-express-payment-continue-rule:before{margin-right:10px}.wc-block-components-express-payment-continue-rule:after{margin-left:10px}.wc-block-components-express-payment-continue-rule:after,.wc-block-components-express-payment-continue-rule:before{content:" ";flex:1;border-bottom:1px solid;opacity:.3}.wc-block-components-express-payment-continue-rule--cart{margin:16px 0;text-transform:uppercase}.theme-twentynineteen .wc-block-components-express-payment__title:before{display:none}.theme-twentytwenty .wc-block-components-express-payment .wc-block-components-express-payment__title{padding-left:12px;padding-right:12px}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder{margin-bottom:16px}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder *{pointer-events:all}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset{display:block}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset .components-button{background-color:#1e1e1e;color:#fff}.components-placeholder.wc-block-checkout__no-payment-methods-placeholder .components-placeholder__fieldset .wc-block-checkout__no-payment-methods-placeholder-description{display:block;margin:.25em 0 1em}.components-notice.wc-block-checkout__no-payment-methods-notice{margin-bottom:16px}.wc-block-card-elements{display:flex;width:100%}.wc-block-card-elements .wc-block-components-validation-error{position:static}.wc-block-gateway-container{position:relative;margin-bottom:1.5em;white-space:nowrap}.wc-block-gateway-container.wc-card-number-element{flex-basis:15em;flex-grow:1;min-width:min(15em,60%)}.wc-block-gateway-container.wc-card-expiry-element{flex-basis:7em;margin-left:12px;min-width:min(7em,calc(24% - 12px))}.wc-block-gateway-container.wc-card-cvc-element{flex-basis:7em;margin-left:12px;min-width:min(5em,calc(16% - 12px))}.wc-block-gateway-container .wc-block-gateway-input{font-size:1em;line-height:1.375;background-color:#fff;padding:.75em 0 .75em 16px;border-radius:4px;border:1px solid #50575e;width:100%;font-family:inherit;margin:0;box-sizing:border-box;height:3em;color:#2b2d2f;cursor:text}.wc-block-gateway-container .wc-block-gateway-input:focus,.wc-block-gateway-container:focus{background-color:#fff}.wc-block-gateway-container label{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;font-size:1em;line-height:1.375;position:absolute;transform:translateY(.75em);left:0;top:0;transform-origin:top left;color:#757575;transition:transform .2s ease;margin:0 0 0 17px;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 24px);cursor:text}@media screen and (prefers-reduced-motion:reduce){.wc-block-gateway-container label{transition:none}}.wc-block-gateway-container.wc-inline-card-element label{margin-left:calc(24px + 1.5em)}.wc-block-gateway-container.wc-inline-card-element .wc-block-gateway-input.focused.empty+label,.wc-block-gateway-container.wc-inline-card-element .wc-block-gateway-input:not(.empty)+label{margin-left:16px;transform:translateY(4px) scale(.75)}.wc-block-gateway-container.wc-inline-card-element+.wc-block-components-validation-error{position:static;margin-top:-24px}.wc-block-gateway-container .wc-block-gateway-input.focused.empty,.wc-block-gateway-container .wc-block-gateway-input:not(.empty){padding:1.5em 0 .25em 16px}.wc-block-gateway-container .wc-block-gateway-input.focused.empty+label,.wc-block-gateway-container .wc-block-gateway-input:not(.empty)+label{transform:translateY(4px) scale(.75)}.wc-block-gateway-container .wc-block-gateway-input.has-error{border-color:#cc1818}.wc-block-gateway-container .wc-block-gateway-input.has-error:focus{outline-color:#cc1818}.wc-block-gateway-container .wc-block-gateway-input.has-error+label{color:#cc1818}.is-large .wc-card-cvc-element .wc-block-components-validation-error>p,.is-large .wc-card-expiry-element .wc-block-components-validation-error>p,.is-medium .wc-card-cvc-element .wc-block-components-validation-error>p,.is-medium .wc-card-expiry-element .wc-block-components-validation-error>p{line-height:16px;padding-top:4px}.is-mobile .wc-card-cvc-element .wc-block-components-validation-error>p,.is-mobile .wc-card-expiry-element .wc-block-components-validation-error>p,.is-small .wc-card-cvc-element .wc-block-components-validation-error>p,.is-small .wc-card-expiry-element .wc-block-components-validation-error>p{min-height:28px}.wc-block-components-checkout-payment-methods *{pointer-events:all}.is-mobile .wc-block-card-elements,.is-small .wc-block-card-elements{flex-wrap:wrap}.is-mobile .wc-block-gateway-container.wc-card-number-element,.is-small .wc-block-gateway-container.wc-card-number-element{flex-basis:100%}.is-mobile .wc-block-gateway-container.wc-card-expiry-element,.is-small .wc-block-gateway-container.wc-card-expiry-element{flex-basis:calc(50% - 8px);margin-left:0;margin-right:8px}.is-mobile .wc-block-gateway-container.wc-card-cvc-element,.is-small .wc-block-gateway-container.wc-card-cvc-element{flex-basis:calc(50% - 8px);margin-left:8px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option{padding-left:56px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option:after{content:none}.wc-block-checkout__payment-method .wc-block-components-radio-control__option .wc-block-components-radio-control__input{left:16px}.wc-block-checkout__payment-method .wc-block-components-radio-control__option,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:first-child,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:last-child{margin:0;padding-bottom:1em;padding-top:1em}.wc-block-checkout__payment-method .wc-block-components-radio-control__option-checked{font-weight:700}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option,.wc-block-checkout__payment-method .wc-block-components-radio-control__option{position:relative}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:after,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:after{border-style:solid;border-width:1px 1px 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option:last-child:after,.wc-block-checkout__payment-method .wc-block-components-radio-control__option:last-child:after{border-width:1px}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option:after{border-width:0}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label{display:flex;align-items:center;justify-content:flex-start}.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__label img{height:24px;max-height:24px;-o-object-fit:contain;object-fit:contain;-o-object-position:left;object-position:left}.wc-block-checkout__payment-method .wc-block-components-radio-control.disable-radio-control .wc-block-components-radio-control__option{padding-left:16px}.wc-block-checkout__payment-method .wc-block-components-radio-control.disable-radio-control .wc-block-components-radio-control__input{display:none}.wc-block-checkout__payment-method .wc-block-components-checkout-step__description-payments-aligned{padding-top:14px;height:28px}.wc-block-components-radio-control-accordion-content{padding:0 16px 1em}.wc-block-components-radio-control-accordion-content:empty{display:none}.wc-block-checkout__order-notes .wc-block-components-checkout-step__content{padding-bottom:0}.wc-block-components-checkbox{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;margin-top:1.5em}.wc-block-components-checkbox label{align-items:flex-start;display:flex;position:relative}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{font-size:1em;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:2px solid #50575e;border-radius:2px;box-sizing:border-box;height:1.5em;width:1.5em;margin:0 16px 0 0;min-height:1.5em;min-width:1.5em;overflow:hidden;position:static;vertical-align:middle;background-color:#fff}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:#fff;border-color:#50575e}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus{outline:2px solid #50575e;outline-offset:2px}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:after,.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:before{content:""}.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:not(:checked)+.wc-block-components-checkbox__mark{display:none}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{border-color:hsla(0,0%,100%,.6);background-color:rgba(0,0,0,.1)}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:rgba(0,0,0,.1);border-color:hsla(0,0%,100%,.6)}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus{outline:2px solid hsla(0,0%,100%,.6);outline-offset:2px}.wc-block-components-checkbox.has-error,.wc-block-components-checkbox.has-error a{color:#cc1818}.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:active,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus,.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:hover{border-color:#cc1818}.wc-block-components-checkbox.has-error .wc-block-components-checkbox__input:focus{outline:2px solid #cc1818;outline-offset:2px}.wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#000;position:absolute;margin-left:.1875em;margin-top:.0625em;width:1.125em;height:1.125em;pointer-events:none}.has-dark-controls .wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#fff}.wc-block-components-checkbox .wc-block-components-checkbox__label,.wc-block-components-checkbox>span{vertical-align:middle;line-height:1.5em}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.wc-block-components-checkbox__mark{display:none}}.theme-twentytwentyone .has-dark-controls .wc-block-components-checkbox__input[type=checkbox],.theme-twentytwentyone .wc-block-components-checkbox__input[type=checkbox]{background-color:#fff;border-color:var(--form--border-color);position:relative}.theme-twentytwentyone .has-dark-controls .wc-block-components-checkbox__input[type=checkbox]:checked,.theme-twentytwentyone .wc-block-components-checkbox__input[type=checkbox]:checked{background-color:#fff;border-color:var(--form--border-color)}.theme-twentytwentyone .wc-block-components-checkbox__mark{display:none}.wc-block-components-panel.has-border{position:relative}.wc-block-components-panel.has-border:after{border-style:solid;border-width:1px 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-panel.has-border+.wc-block-components-panel.has-border:after{border-top-width:0}.wc-block-components-panel.has-border.no-top-border{position:relative}.wc-block-components-panel.has-border.no-top-border:after{border-style:solid;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0;border-width:0 0 1px}.wc-block-components-panel__button{border:0;border-radius:0;vertical-align:baseline;height:auto;line-height:1;margin:.375em 0 0;padding:.375em 32px 0 0;position:relative;text-align:left;width:100%;word-break:break-word}.wc-block-components-panel__button[aria-expanded=true]{padding-bottom:.375em;margin-bottom:.375em}.wc-block-components-panel__button,.wc-block-components-panel__button:active,.wc-block-components-panel__button:focus,.wc-block-components-panel__button:hover{color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit;text-transform:inherit;background:transparent;box-shadow:none}.wc-block-components-panel__button>.wc-block-components-panel__button-icon{fill:currentColor;position:absolute;right:0;top:50%;transform:translateY(-50%);width:auto}.wc-block-components-panel__content{padding-bottom:1em}.wc-block-components-panel__content[hidden]{display:none}.theme-twentytwentyone.theme-twentytwentyone.theme-twentytwentyone .wc-block-components-panel__button{background-color:inherit;color:inherit}.theme-twentyseventeen .wc-block-components-panel__button,.theme-twentytwenty .wc-block-components-panel__button{background:none transparent;color:inherit}.theme-twentyseventeen .wc-block-components-panel__button.wc-block-components-panel__button:focus,.theme-twentyseventeen .wc-block-components-panel__button.wc-block-components-panel__button:hover,.theme-twentytwenty .wc-block-components-panel__button.wc-block-components-panel__button:focus,.theme-twentytwenty .wc-block-components-panel__button.wc-block-components-panel__button:hover{background:none transparent}.wc-block-components-totals-wrapper{position:relative;padding:16px 0}.wc-block-components-totals-wrapper:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-totals-wrapper:last-child{padding-bottom:0}.wc-block-components-totals-wrapper.has-bottom-border:after{border-bottom-width:1px}.wc-block-components-totals-wrapper.slot-wrapper{padding:0}.wc-block-components-totals-wrapper.slot-wrapper>*>*{position:relative;padding:16px 0}.wc-block-components-totals-wrapper.slot-wrapper>*>:after{border-style:solid;border-width:0 0 1px;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-totals-wrapper.slot-wrapper>*>:last-child:after{border-bottom-width:0}.wc-block-components-discounts-meta .wc-block-components-totals-wrapper:first-child{position:relative}.wc-block-components-discounts-meta .wc-block-components-totals-wrapper:first-child:after{border-style:solid;border-width:1px 0 0;bottom:0;content:"";display:block;left:0;opacity:.3;pointer-events:none;position:absolute;right:0;top:0}.wc-block-components-totals-item{display:flex;flex-wrap:wrap;margin:.75em 0 0;width:100%}.wc-block-components-totals-item:first-child{margin-top:0}.wc-block-components-totals-item__label{flex-grow:1}.wc-block-components-totals-item__value{font-weight:700;white-space:nowrap}.wc-block-components-totals-item__description{font-size:.875em;width:100%}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate{margin:4px 0}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate:first-child{margin-top:0}.wc-block-components-totals-item.wc-block-components-totals-taxes__grouped-rate:last-child{margin-bottom:0}.wc-block-product-categories{margin-bottom:1em}.wc-block-product-categories.is-dropdown{display:flex}.wc-block-product-categories select{margin-right:.5em}.wc-block-product-categories-list--has-images{list-style:none outside}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item{margin:4px 0 4px 60px;list-style:none outside;clear:both}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item ul{margin:4px 0 0}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image{max-width:50px;display:inline-block;padding:0;margin:0 .5em 0 -60px;position:relative;vertical-align:middle;border:1px solid #eee}.wc-block-product-categories-list--has-images .wc-block-product-categories-list-item__image img{display:block;height:auto;margin:0;max-width:100%;padding:0}.wc-block-product-categories-list-item-count:before{content:" ("}.wc-block-product-categories-list-item-count:after{content:")"}.wp-block-woocommerce-product-categories.is-loading .wc-block-product-categories__placeholder{display:inline-block;height:1em;width:50%;min-width:200px;background:currentColor;opacity:.2}.wc-block-product-categories__button{display:flex;align-items:center;margin:0;padding:0 .5em;position:relative;overflow:hidden}.wc-block-product-categories__button svg{fill:currentColor;outline:none}.rtl .wc-block-product-categories__button svg{transform:rotate(180deg)}.wc-block-product-categories__button:active{color:currentColor}.wc-block-product-categories__button:disabled,.wc-block-product-categories__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-categories__button:disabled:focus,.wc-block-product-categories__button[aria-disabled=true]:focus{box-shadow:none}.wc-block-featured-product{position:relative;background-color:#1e1e1e;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em}.wc-block-featured-product,.wc-block-featured-product .wc-block-featured-product__wrapper{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-product .wc-block-featured-product__wrapper{overflow:hidden;height:100%}.wc-block-featured-product.has-left-content{justify-content:flex-start}.wc-block-featured-product.has-left-content .wc-block-featured-product__description,.wc-block-featured-product.has-left-content .wc-block-featured-product__price,.wc-block-featured-product.has-left-content .wc-block-featured-product__title,.wc-block-featured-product.has-left-content .wc-block-featured-product__variation{margin-left:0;text-align:left}.wc-block-featured-product.has-right-content{justify-content:flex-end}.wc-block-featured-product.has-right-content .wc-block-featured-product__description,.wc-block-featured-product.has-right-content .wc-block-featured-product__price,.wc-block-featured-product.has-right-content .wc-block-featured-product__title,.wc-block-featured-product.has-right-content .wc-block-featured-product__variation{margin-right:0;text-align:right}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-product .wc-block-featured-product__description a,.wc-block-featured-product .wc-block-featured-product__description a:active,.wc-block-featured-product .wc-block-featured-product__description a:focus,.wc-block-featured-product .wc-block-featured-product__description a:hover,.wc-block-featured-product .wc-block-featured-product__price a,.wc-block-featured-product .wc-block-featured-product__price a:active,.wc-block-featured-product .wc-block-featured-product__price a:focus,.wc-block-featured-product .wc-block-featured-product__price a:hover,.wc-block-featured-product .wc-block-featured-product__title a,.wc-block-featured-product .wc-block-featured-product__title a:active,.wc-block-featured-product .wc-block-featured-product__title a:focus,.wc-block-featured-product .wc-block-featured-product__title a:hover,.wc-block-featured-product .wc-block-featured-product__variation a,.wc-block-featured-product .wc-block-featured-product__variation a:active,.wc-block-featured-product .wc-block-featured-product__variation a:focus,.wc-block-featured-product .wc-block-featured-product__variation a:hover{color:#fff}.wc-block-featured-product .wc-block-featured-product__description,.wc-block-featured-product .wc-block-featured-product__link,.wc-block-featured-product .wc-block-featured-product__price,.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{width:100%;padding:16px 48px 0;z-index:1}.wc-block-featured-product .wc-block-featured-product__title,.wc-block-featured-product .wc-block-featured-product__variation{margin-top:0;border:0}.wc-block-featured-product .wc-block-featured-product__title:before,.wc-block-featured-product .wc-block-featured-product__variation:before{display:none}.wc-block-featured-product .wc-block-featured-product__variation{font-style:italic;padding-top:0}.wc-block-featured-product .wc-block-featured-product__description p{margin:0;line-height:1.5em}.wc-block-featured-product .wp-block-button.aligncenter{text-align:center}.wc-block-featured-product.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-product.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-product.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-product.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-product.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-product.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-product.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-product.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-product.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-product.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-product.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright{max-width:420px;width:100%}.wc-block-featured-product:after{display:block;content:"";font-size:0;min-height:inherit}@supports((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-product:after{content:none}}.wc-block-featured-product.aligncenter,.wc-block-featured-product.alignleft,.wc-block-featured-product.alignright,.wc-block-product-search .wc-block-product-search__fields{display:flex}.wc-block-product-search .wc-block-product-search__field{padding:6px 8px;line-height:1.8;flex-grow:1}.wc-block-product-search .wc-block-product-search__button{display:flex;align-items:center;margin:0 0 0 6px;cursor:pointer;padding:0 .5em;position:relative;overflow:hidden}.wc-block-product-search .wc-block-product-search__button svg{fill:currentColor;outline:none}.rtl .wc-block-product-search .wc-block-product-search__button svg{transform:rotate(180deg)}.wc-block-product-search .wc-block-product-search__button:active{color:currentColor}.wc-block-product-search .wc-block-product-search__button:disabled,.wc-block-product-search .wc-block-product-search__button[aria-disabled=true]{cursor:default;opacity:.3}.wc-block-product-search .wc-block-product-search__button:disabled:focus,.wc-block-product-search .wc-block-product-search__button[aria-disabled=true]:focus{box-shadow:none}.wc-block-featured-category{position:relative;background-color:#1e1e1e;background-size:cover;background-position:50%;width:100%;margin:0 0 1.5em;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category .wc-block-featured-category__wrapper{overflow:hidden;height:100%;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;align-content:center}.wc-block-featured-category.has-left-content{justify-content:flex-start}.wc-block-featured-category.has-left-content .wc-block-featured-category__description,.wc-block-featured-category.has-left-content .wc-block-featured-category__price,.wc-block-featured-category.has-left-content .wc-block-featured-category__title{margin-left:0;text-align:left}.wc-block-featured-category.has-right-content{justify-content:flex-end}.wc-block-featured-category.has-right-content .wc-block-featured-category__description,.wc-block-featured-category.has-right-content .wc-block-featured-category__price,.wc-block-featured-category.has-right-content .wc-block-featured-category__title{margin-right:0;text-align:right}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{color:#fff;line-height:1.25;margin-bottom:0;text-align:center}.wc-block-featured-category .wc-block-featured-category__description a,.wc-block-featured-category .wc-block-featured-category__description a:active,.wc-block-featured-category .wc-block-featured-category__description a:focus,.wc-block-featured-category .wc-block-featured-category__description a:hover,.wc-block-featured-category .wc-block-featured-category__price a,.wc-block-featured-category .wc-block-featured-category__price a:active,.wc-block-featured-category .wc-block-featured-category__price a:focus,.wc-block-featured-category .wc-block-featured-category__price a:hover,.wc-block-featured-category .wc-block-featured-category__title a,.wc-block-featured-category .wc-block-featured-category__title a:active,.wc-block-featured-category .wc-block-featured-category__title a:focus,.wc-block-featured-category .wc-block-featured-category__title a:hover{color:#fff}.wc-block-featured-category .wc-block-featured-category__description,.wc-block-featured-category .wc-block-featured-category__link,.wc-block-featured-category .wc-block-featured-category__price,.wc-block-featured-category .wc-block-featured-category__title{width:100%;padding:0 48px 16px;z-index:1}.wc-block-featured-category .wc-block-featured-category__title{margin-top:0}.wc-block-featured-category .wc-block-featured-category__title:before{display:none}.wc-block-featured-category .wc-block-featured-category__description p{margin:0}.wc-block-featured-category .wp-block-button.aligncenter{text-align:center}.wc-block-featured-category.has-background-dim:before{content:"";position:absolute;top:0;left:0;bottom:0;right:0;background-color:inherit;opacity:.5;z-index:1}.wc-block-featured-category.has-background-dim.has-background-dim-10:before{opacity:.1}.wc-block-featured-category.has-background-dim.has-background-dim-20:before{opacity:.2}.wc-block-featured-category.has-background-dim.has-background-dim-30:before{opacity:.3}.wc-block-featured-category.has-background-dim.has-background-dim-40:before{opacity:.4}.wc-block-featured-category.has-background-dim.has-background-dim-50:before{opacity:.5}.wc-block-featured-category.has-background-dim.has-background-dim-60:before{opacity:.6}.wc-block-featured-category.has-background-dim.has-background-dim-70:before{opacity:.7}.wc-block-featured-category.has-background-dim.has-background-dim-80:before{opacity:.8}.wc-block-featured-category.has-background-dim.has-background-dim-90:before{opacity:.9}.wc-block-featured-category.has-background-dim.has-background-dim-100:before{opacity:1}.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{max-width:420px;width:100%}.wc-block-featured-category:after{display:block;content:"";font-size:0;min-height:inherit}@supports((position:-webkit-sticky) or (position:sticky)){.wc-block-featured-category:after{content:none}}.wc-block-featured-category.aligncenter,.wc-block-featured-category.alignleft,.wc-block-featured-category.alignright{display:flex}.wc-block-attribute-filter{margin-bottom:24px}.wc-block-attribute-filter.style-dropdown{display:flex;gap:16px}.wc-block-attribute-filter .wc-block-attribute-filter-list{margin:0;width:100%}.wc-block-attribute-filter .wc-block-attribute-filter-list li label{cursor:pointer}.wc-block-attribute-filter .wc-block-attribute-filter-list li input{cursor:pointer;display:inline-block}.wc-block-attribute-filter .wc-block-attribute-filter-dropdown{flex-grow:1;max-width:unset;width:0}.wc-block-attribute-filter .is-single .wc-block-attribute-filter-list-count,.wc-block-attribute-filter .wc-block-dropdown-selector .wc-block-dropdown-selector__list .wc-block-attribute-filter-list-count{opacity:.6}.wc-block-attribute-filter .wc-block-components-dropdown-selector__input-wrapper{height:100%}.wc-block-stock-filter{margin-bottom:24px}.wc-block-stock-filter .wc-block-stock-filter-list{margin:0}.wc-block-stock-filter .wc-block-stock-filter-list li label{cursor:pointer}.wc-block-stock-filter .wc-block-stock-filter-list li input{cursor:pointer;display:inline-block}.wc-block-stock-filter .is-single,.wc-block-stock-filter .wc-block-dropdown-selector .wc-block-dropdown-selector__list{opacity:.6}.wc-block-stock-filter .wc-block-stock-filter__button{margin-top:8px}@-webkit-keyframes spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes spinner__animation{0%{-webkit-animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);animation-timing-function:cubic-bezier(.5856,.0703,.4143,.9297);transform:rotate(0deg)}to{transform:rotate(1turn)}}@-webkit-keyframes loading__animation{to{transform:translateX(100%)}}@keyframes loading__animation{to{transform:translateX(100%)}}.wc-block-active-filters{margin-bottom:24px;overflow:hidden}.wc-block-active-filters .wc-block-active-filters__clear-all{font-size:1em;float:right;border:none;padding:0;text-decoration:underline;cursor:pointer}.wc-block-active-filters .wc-block-active-filters__clear-all,.wc-block-active-filters .wc-block-active-filters__clear-all:active,.wc-block-active-filters .wc-block-active-filters__clear-all:focus,.wc-block-active-filters .wc-block-active-filters__clear-all:hover{background:transparent;color:inherit}.wc-block-active-filters .wc-block-active-filters__list{margin:0 0 4px;padding:0;list-style:none outside;clear:both}.wc-block-active-filters .wc-block-active-filters__list li{margin:0;padding:0;list-style:none outside;clear:both}.wc-block-active-filters .wc-block-active-filters__list li ul{margin:0;padding:0;list-style:none outside}.wc-block-active-filters .wc-block-active-filters__list li:first-child .wc-block-active-filters__list-item-type{margin:0}.wc-block-active-filters .wc-block-active-filters__list-item-type{font-size:.75em;text-transform:uppercase;letter-spacing:.1em;margin:16px 0 0;display:block}.wc-block-active-filters .wc-block-active-filters__list-item-operator{font-weight:400;font-style:italic}.wc-block-active-filters .wc-block-active-filters__list-item-name{font-weight:700;display:block;position:relative;padding:0 16px 0 0}.wc-block-active-filters .wc-block-active-filters__list-item-remove{background:transparent;border:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;width:16px;padding:0;position:absolute;right:0;top:50%;margin:-8px 0 0;color:currentColor}.wc-block-active-filters .wc-block-active-filters__list--chips li,.wc-block-active-filters .wc-block-active-filters__list--chips ul{display:inline}.wc-block-active-filters .wc-block-active-filters__list--chips .wc-block-active-filters__list-item-type{display:none}.wc-block-active-filters .wc-block-active-filters__list--chips .wc-block-components-chip{font-size:.875em;margin-top:.1875em;margin-bottom:.1875em} \ No newline at end of file diff --git a/build/wc-blocks-vendors-style-rtl.css b/build/wc-blocks-vendors-style-rtl.css new file mode 100644 index 00000000000..b1c01643e3f --- /dev/null +++ b/build/wc-blocks-vendors-style-rtl.css @@ -0,0 +1 @@ +.components-custom-select-control{position:relative}.components-custom-select-control__label{display:block;margin-bottom:8px}.components-custom-select-control__button{border:1px solid #757575;border-radius:2px;min-height:30px;min-width:130px;position:relative;text-align:right}.components-custom-select-control__button.components-custom-select-control__button{padding-left:24px}.components-custom-select-control__button:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.components-custom-select-control__button .components-custom-select-control__button-icon{height:100%;padding:0;position:absolute;left:0;top:0}.components-custom-select-control__menu{border:1px solid #1e1e1e;background-color:#fff;border-radius:2px;outline:none;transition:none;max-height:400px;min-width:100%;overflow:auto;padding:0;position:absolute;z-index:1000000}.components-custom-select-control__menu[aria-hidden=true]{display:none}.components-custom-select-control__item{align-items:center;display:flex;list-style-type:none;padding:8px;cursor:default;line-height:28px}.components-custom-select-control__item.is-highlighted{background:#ddd}.components-custom-select-control__item .components-custom-select-control__item-icon{margin-left:0;margin-right:auto}.components-custom-select-control__item:last-child{margin-bottom:0}.components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#1e1e1e;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.3);color:#fff;padding:16px 24px;width:100%;max-width:600px;box-sizing:border-box;cursor:pointer;pointer-events:auto}@media(min-width:600px){.components-snackbar{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}.components-snackbar:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-snackbar.components-snackbar-explicit-dismiss{cursor:default}.components-snackbar .components-snackbar__content-with-icon{margin-right:24px}.components-snackbar .components-snackbar__icon{position:absolute;top:24px;right:28px}.components-snackbar .components-snackbar__dismiss-button{margin-right:32px;cursor:pointer}.components-snackbar__action.components-button{margin-right:32px;color:#fff;height:auto;flex-shrink:0;line-height:1.4;padding:0}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary){text-decoration:underline;background-color:transparent}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus{color:#fff;box-shadow:none;outline:1px dotted #fff}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:var(--wp-admin-theme-color)}.components-snackbar__content{display:flex;align-items:baseline;justify-content:space-between;line-height:1.4}.components-snackbar-list{position:absolute;z-index:100000;width:100%;box-sizing:border-box;pointer-events:none}.components-snackbar-list__notice-container{position:relative;padding-top:8px}.components-combobox-control{width:100%}input.components-combobox-control__input[type=text]{width:100%;border:none;box-shadow:none;font-size:16px;padding:2px;margin:0;line-height:inherit;min-height:auto}@media(min-width:600px){input.components-combobox-control__input[type=text]{font-size:13px}}input.components-combobox-control__input[type=text]:focus{outline:none;box-shadow:none}.components-combobox-control__suggestions-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:flex;flex-wrap:wrap;align-items:flex-start;width:100%;margin:0 0 8px;padding:4px}@media(prefers-reduced-motion:reduce){.components-combobox-control__suggestions-container{transition-duration:0s;transition-delay:0s}}@media(min-width:600px){.components-combobox-control__suggestions-container{font-size:13px;line-height:normal}}.components-combobox-control__suggestions-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__suggestions-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__reset.components-button{display:flex;height:24px;min-width:24px;padding:0} \ No newline at end of file diff --git a/build/wc-blocks-vendors-style.css b/build/wc-blocks-vendors-style.css new file mode 100644 index 00000000000..af80ca33ae6 --- /dev/null +++ b/build/wc-blocks-vendors-style.css @@ -0,0 +1 @@ +.components-custom-select-control{position:relative}.components-custom-select-control__label{display:block;margin-bottom:8px}.components-custom-select-control__button{border:1px solid #757575;border-radius:2px;min-height:30px;min-width:130px;position:relative;text-align:left}.components-custom-select-control__button.components-custom-select-control__button{padding-right:24px}.components-custom-select-control__button:focus:not(:disabled){border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color)}.components-custom-select-control__button .components-custom-select-control__button-icon{height:100%;padding:0;position:absolute;right:0;top:0}.components-custom-select-control__menu{border:1px solid #1e1e1e;background-color:#fff;border-radius:2px;outline:none;transition:none;max-height:400px;min-width:100%;overflow:auto;padding:0;position:absolute;z-index:1000000}.components-custom-select-control__menu[aria-hidden=true]{display:none}.components-custom-select-control__item{align-items:center;display:flex;list-style-type:none;padding:8px;cursor:default;line-height:28px}.components-custom-select-control__item.is-highlighted{background:#ddd}.components-custom-select-control__item .components-custom-select-control__item-icon{margin-right:0;margin-left:auto}.components-custom-select-control__item:last-child{margin-bottom:0}.components-snackbar{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;font-size:13px;background-color:#1e1e1e;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.3);color:#fff;padding:16px 24px;width:100%;max-width:600px;box-sizing:border-box;cursor:pointer;pointer-events:auto}@media(min-width:600px){.components-snackbar{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}}.components-snackbar:focus{box-shadow:0 0 0 1px #fff,0 0 0 3px var(--wp-admin-theme-color)}.components-snackbar.components-snackbar-explicit-dismiss{cursor:default}.components-snackbar .components-snackbar__content-with-icon{margin-left:24px}.components-snackbar .components-snackbar__icon{position:absolute;top:24px;left:28px}.components-snackbar .components-snackbar__dismiss-button{margin-left:32px;cursor:pointer}.components-snackbar__action.components-button{margin-left:32px;color:#fff;height:auto;flex-shrink:0;line-height:1.4;padding:0}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary){text-decoration:underline;background-color:transparent}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):focus{color:#fff;box-shadow:none;outline:1px dotted #fff}.components-snackbar__action.components-button:not(:disabled):not([aria-disabled=true]):not(.is-secondary):hover{color:var(--wp-admin-theme-color)}.components-snackbar__content{display:flex;align-items:baseline;justify-content:space-between;line-height:1.4}.components-snackbar-list{position:absolute;z-index:100000;width:100%;box-sizing:border-box;pointer-events:none}.components-snackbar-list__notice-container{position:relative;padding-top:8px}.components-combobox-control{width:100%}input.components-combobox-control__input[type=text]{width:100%;border:none;box-shadow:none;font-size:16px;padding:2px;margin:0;line-height:inherit;min-height:auto}@media(min-width:600px){input.components-combobox-control__input[type=text]{font-size:13px}}input.components-combobox-control__input[type=text]:focus{outline:none;box-shadow:none}.components-combobox-control__suggestions-container{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;box-shadow:0 0 0 transparent;transition:box-shadow .1s linear;border-radius:2px;border:1px solid #757575;font-size:16px;line-height:normal;display:flex;flex-wrap:wrap;align-items:flex-start;width:100%;margin:0 0 8px;padding:4px}@media(prefers-reduced-motion:reduce){.components-combobox-control__suggestions-container{transition-duration:0s;transition-delay:0s}}@media(min-width:600px){.components-combobox-control__suggestions-container{font-size:13px;line-height:normal}}.components-combobox-control__suggestions-container:focus{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__suggestions-container::-webkit-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container::-moz-placeholder{opacity:1;color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:-ms-input-placeholder{color:rgba(30,30,30,.62)}.components-combobox-control__suggestions-container:focus-within{border-color:var(--wp-admin-theme-color);box-shadow:0 0 0 1px var(--wp-admin-theme-color);outline:2px solid transparent}.components-combobox-control__reset.components-button{display:flex;height:24px;min-width:24px;padding:0} \ No newline at end of file diff --git a/build/wc-blocks-vendors.js b/build/wc-blocks-vendors.js new file mode 100644 index 00000000000..6b52375f020 --- /dev/null +++ b/build/wc-blocks-vendors.js @@ -0,0 +1,3 @@ +(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[0],{10:function(e,t,n){e.exports=n(319)()},115:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));const r="data-wp-component",o="data-wp-c16t",i="__contextSystemKey__"},116:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(8);function o(e,t,n){var o=this,i=Object(r.useRef)(null),a=Object(r.useRef)(0),s=Object(r.useRef)(null),c=Object(r.useRef)([]),u=Object(r.useRef)(),l=Object(r.useRef)(),f=Object(r.useRef)(e),d=Object(r.useRef)(!0);f.current=e;var p=!t&&0!==t&&"undefined"!=typeof window;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,m=!("trailing"in n)||!!n.trailing,g="maxWait"in n,b=g?Math.max(+n.maxWait||0,t):null;return Object(r.useEffect)((function(){return d.current=!0,function(){d.current=!1}}),[]),Object(r.useMemo)((function(){var e=function(e){var t=c.current,n=u.current;return c.current=u.current=null,a.current=e,l.current=f.current.apply(n,t)},n=function(e,t){p&&cancelAnimationFrame(s.current),s.current=p?requestAnimationFrame(e):setTimeout(e,t)},r=function(e){if(!d.current)return!1;var n=e-i.current,r=e-a.current;return!i.current||n>=t||n<0||g&&r>=b},v=function(t){return s.current=null,m&&c.current?e(t):(c.current=u.current=null,l.current)},y=function(){var e=Date.now();if(r(e))return v(e);if(d.current){var o=e-i.current,s=e-a.current,c=t-o,u=g?Math.min(c,b-s):c;n(y,u)}},w=function(){for(var f=[],p=0;p1&&void 0!==arguments[1])||arguments[1],n="-"===e[0],r=n&&t,o=(e=e.replace("-","")).split("."),i=o[0],a=o[1]||"";return{beforeDecimal:i,afterDecimal:a,hasNagation:n,addNegation:r}}function v(e,t,n){for(var r="",o=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||o;return r}function y(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 w(e,t,n){return Math.min(Math.max(e,t),n)}function O(e){return Math.max(e.selectionStart,e.selectionEnd)}var x={thousandSeparator:d.oneOfType([d.string,d.oneOf([!0])]),decimalSeparator:d.string,allowedDecimalSeparators:d.arrayOf(d.string),thousandsGroupStyle:d.oneOf(["thousand","lakh","wan"]),decimalScale:d.number,fixedDecimalScale:d.bool,displayType:d.oneOf(["input","text"]),prefix:d.string,suffix:d.string,format:d.oneOfType([d.string,d.func]),removeFormatting:d.func,mask:d.oneOfType([d.string,d.arrayOf(d.string)]),value:d.oneOfType([d.number,d.string]),defaultValue:d.oneOfType([d.number,d.string]),isNumericString:d.bool,customInput:d.elementType,allowNegative:d.bool,allowEmptyFormatting:d.bool,allowLeadingZeros:d.bool,onValueChange:d.func,onKeyDown:d.func,onMouseUp:d.func,onChange:d.func,onFocus:d.func,onBlur:d.func,type:d.oneOf(["text","tel","password"]),isAllowed:d.func,renderText:d.func,getInputRef:d.oneOfType([d.func,d.shape({current:d.any})])},j={displayType:"input",decimalSeparator:".",thousandsGroupStyle:"thousand",fixedDecimalScale:!1,prefix:"",suffix:"",allowNegative:!0,allowEmptyFormatting:!1,allowLeadingZeros:!1,isNumericString:!1,type:"text",onValueChange:p,onChange:p,onKeyDown:p,onMouseUp:p,onFocus:p,onBlur:p,isAllowed:function(){return!0}},S=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=s(t).call(this,e))||"object"!=typeof r&&"function"!=typeof r?u(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(u(n)),n.onKeyDown=n.onKeyDown.bind(u(n)),n.onMouseUp=n.onMouseUp.bind(u(n)),n.onFocus=n.onFocus.bind(u(n)),n.onBlur=n.onBlur.bind(u(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&&c(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,a=void 0===i?"":i;if(e!==t){this.validateProps();var s=this.formatNumString(a),c=m(t.value)?s:this.formatValueProp(),u=this.removeFormatting(c),l=parseFloat(u),f=parseFloat(a);(isNaN(l)&&isNaN(f)||l===f)&&s===o&&(null!==r||c===o)||this.updateValue({formattedValue:c,numAsString:u,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 a=(e=(e.match(o)||[]).join("").replace(r,".")).indexOf(".");return-1!==a&&(e="".concat(e.substring(0,a),".").concat(e.substring(a+1,e.length).replace(new RegExp(g(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?"":"|"+g(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){y(e,t),setTimeout((function(){e.value===n&&y(e,t)}),0)}},{key:"correctCaretPosition",value:function(e,t,n){var r=this.props,o=r.prefix,i=r.suffix,a=r.format;if(""===e)return 0;if(t=w(t,0,e.length),!a){var s="-"===e[0];return w(t,o.length+(s?1:0),e.length-i.length)}if("function"==typeof a)return t;if("#"===a[t]&&h(e[t]))return t;if("#"===a[t-1]&&h(e[t-1]))return t;var c=a.indexOf("#");t=w(t,c,a.lastIndexOf("#")+1);for(var u=a.substring(t,a.length).indexOf("#"),l=t,f=t+(-1===u?0:u);l>c&&("#"!==a[l]||!h(e[l]));)l-=1;return!h(e[f])||"left"===n&&t!==c||t-l0&&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,a=this.props,s=a.value,c=a.isNumericString,u=!(s=m(s)?e:s)&&0!==s;return u&&i&&(s=""),u&&!i?"":("number"==typeof s&&(s=s.toString(),c=!0),"Infinity"===s&&c&&(s=""),c&&!n&&"number"==typeof r&&(s=function(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=-1!==e.indexOf(".")&&t,o=b(e),i=o.beforeDecimal,a=o.afterDecimal,s=o.hasNagation,c=parseFloat("0.".concat(a||"0")).toFixed(t).split("."),u=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}),c[0]),l=v(c[1]||"",Math.min(t,a.length),n),f=r?".":"";return"".concat(s?"-":"").concat(u).concat(f).concat(l)}(s,r,o)),c?this.formatNumString(s):this.formatInput(s))}},{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,a=n.decimalScale,s=n.fixedDecimalScale,c=this.getSeparators().decimalSeparator;return"string"==typeof r&&"#"!==r[e]||!(r||!(e=t.length-i.length||a&&s&&t[e]===c))}},{key:"checkIfFormatGotDeleted",value:function(e,t,n){for(var r=e;rn&&o-r>n;)r++;return{start:n,end:o-r}}(t,n),v=g.start,y=g.end;if(!o&&v===y&&-1!==l.indexOf(n[h])){var w=0===c?"":f;return n.substr(0,h)+w+n.substr(h+1,n.length)}var O=o?0:a.length,x=t.length-(o?0:s.length);if(n.length>t.length||!n.length||v===y||0===h&&m===t.length||h===O&&m===x)return n;if(this.checkIfFormatGotDeleted(v,y,t)&&(n=t),!o){var j=this.removeFormatting(n),S=b(j,i),k=S.beforeDecimal,E=S.afterDecimal,C=S.addNegation,_=ew;)y--;y=this.correctCaretPosition(s,y,"left")}}else for(;!g.test(s[y])&&yO)&&(e.preventDefault(),this.setPatchedCaretPosition(n,y,s)),e.isUnitTestRun&&this.setPatchedCaretPosition(n,y,s),h(e)}else h(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 a=this.correctCaretPosition(i,n);a!==n&&this.setPatchedCaretPosition(t,a,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,a=void 0===i?"":i,s=t.correctCaretPosition(a,r);s===r||0===r&&o===a.length||t.setPatchedCaretPosition(n,s,a),t.props.onFocus(e)}),0)}},{key:"render",value:function(){var e,t,n,r=this.props,i=r.type,s=r.displayType,c=r.customInput,u=r.renderText,l=r.getInputRef,f=r.format,d=this.state.value,p=(e=this.props,t=x,n={},Object.keys(e).forEach((function(r){t[r]||(n[r]=e[r])})),n),h=a({inputMode:function(e){return e||!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}(f)?"numeric":void 0},p,{type:i,value:d,onChange:this.onChange,onKeyDown:this.onKeyDown,onMouseUp:this.onMouseUp,onFocus:this.onFocus,onBlur:this.onBlur});if("text"===s)return u?u(d)||null:o.a.createElement("span",a({},p,{ref:l}),d);if(c){var m=c;return o.a.createElement(m,a({},h,{ref:l}))}return o.a.createElement("input",a({},h,{ref:l}))}}])&&i(n.prototype,r),t}(o.a.Component);S.propTypes=x,S.defaultProps=j,t.a=S},135:function(e,t,n){"use strict";var r=n(4),o=n.n(r),i=n(0);t.a=Object(i.forwardRef)((function({as:e="div",className:t,...n},r){return function({as:e="div",...t}){return"function"==typeof t.children?t.children(t):Object(i.createElement)(e,t)}({as:e,className:o()("components-visually-hidden",t),...n,ref:r})}))},136:function(e,t,n){"use strict";function r(e){return(r="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)}function o(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))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 destructure 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);n1&&void 0!==arguments[1]?arguments[1]:{};for(var n in t)e.setRequestHeader(n,t[n]);return e}function d(e){return void 0===e}function p(){var e={HALF_ODD:function(e){var t=Math.round(e);return l(e)&&c(t)?t-1:t},HALF_EVEN:function(e){var t=Math.round(e);return l(e)?c(t)?t:t-1:t},HALF_UP:function(e){return Math.round(e)},HALF_DOWN:function(e){return l(e)?Math.floor(e):Math.round(e)},HALF_TOWARDS_ZERO:function(e){return l(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e)},HALF_AWAY_FROM_ZERO:function(e){return l(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e)},DOWN:function(e){return Math.floor(e)}};return{add:function(e,t){return e+t},subtract:function(e,t){return e-t},multiply:function(e,t){return u(e)||u(t)?function(e,t){var n=function(e){return Math.pow(10,function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=e.toString();if(t.indexOf("e-")>0)return parseInt(t.split("e-")[1]);var n=t.split(".")[1];return n?n.length:0}(e))},r=Math.max(n(e),n(t));return Math.round(e*r)*Math.round(t*r)/(r*r)}(e,t):e*t},divide:function(e,t){return e/t},modulo:function(e,t){return e%t},round:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"HALF_EVEN";return e[n](t)}}}var h=p();function m(e){var t=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(e);return{getMatches:function(){return null!==t?t.slice(1).filter((function(e){return!d(e)})):[]},getMinimumFractionDigits:function(){var e=function(e){return"."===e};return d(this.getMatches().find(e))?0:this.getMatches()[h.add(this.getMatches().findIndex(e),1)].split("").length},getCurrencyDisplay:function(){return{USD:"code",dollar:"name",$:"symbol"}[this.getMatches().find((function(e){return"USD"===e||"dollar"===e||"$"===e}))]},getStyle:function(){return d(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!d(this.getMatches().find((function(e){return","===e})))}}}function g(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;for(var n in t)e=e.replace("{{".concat(n,"}}"),t[n]);return e};return{getExchangeRate:function(n,o){return(i=e.endpoint,!Boolean(i)||"object"!==r(i)&&"function"!=typeof i||"function"!=typeof i.then?function(n,r){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){var o=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){4===o.readyState&&(o.status>=200&&o.status<400?n(JSON.parse(o.responseText)):r(new Error(o.statusText)))},onerror:function(){r(new Error("Network error"))}});o.open("GET",e,!0),f(o,t.headers),o.send()}))}(t(e.endpoint,{from:n,to:r}),{headers:e.headers})}(n,o):e.endpoint).then((function(i){return function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".",o={};return Object.entries(t).forEach((function(t){if("object"===r(t[1])){var i=e(t[1]);Object.entries(i).forEach((function(e){o[t[0]+n+e[0]]=e[1]}))}else o[t[0]]=t[1]})),o}(i)[t(e.propertyPath,{from:n,to:o})]}));var i}}}function b(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Error;if(!e)throw new n(t)}function v(e){b(function(e){return s(e)&&e<=100&&e>=0}(e),"You must provide a numeric value between 0 and 100.",RangeError)}function y(e){b(Number.isInteger(e),"You must provide an integer.",TypeError)}var w=p(),O=Object.assign((function e(t){var n=Object.assign({},{amount:e.defaultAmount,currency:e.defaultCurrency,precision:e.defaultPrecision},t),r=n.amount,o=n.currency,i=n.precision;y(r),y(i);var a=e.globalLocale,s=e.globalFormat,c=e.globalRoundingMode,u=e.globalFormatRoundingMode,l=Object.assign({},e.globalExchangeRatesApi),f=function(t){var n=Object.assign({},Object.assign({},{amount:r,currency:o,precision:i},t),Object.assign({},{locale:this.locale},t));return Object.assign(e({amount:n.amount,currency:n.currency,precision:n.precision}),{locale:n.locale})},p=function(e){b(this.hasSameCurrency(e),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return r},getCurrency:function(){return o},getLocale:function(){return this.locale||a},setLocale:function(e){return f.call(this,{locale:e})},getPrecision:function(){return i},convertPrecision:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;y(e);var n=this.getPrecision(),r=e>n,o=r?w.multiply:w.divide,i=r?[e,n]:[n,e],a=Math.pow(10,w.subtract.apply(w,i));return f.call(this,{amount:w.round(o(this.getAmount(),a),t),precision:e})},add:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return f.call(this,{amount:w.add(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},subtract:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return f.call(this,{amount:w.subtract(n[0].getAmount(),n[1].getAmount()),precision:n[0].getPrecision()})},multiply:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return f.call(this,{amount:w.round(w.multiply(this.getAmount(),e),t)})},divide:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return f.call(this,{amount:w.round(w.divide(this.getAmount(),e),t)})},percentage:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;return v(e),this.multiply(w.divide(e,100),t)},allocate:function(e){var t=this;!function(e){b(function(e){return e.length>0&&e.every((function(e){return e>=0}))&&e.some((function(e){return e>0}))}(e),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}(e);for(var n=e.reduce((function(e,t){return w.add(e,t)})),r=this.getAmount(),o=e.map((function(e){var o=Math.floor(w.divide(w.multiply(t.getAmount(),e),n));return r=w.subtract(r,o),f.call(t,{amount:o})})),i=0;r>0;)e[i]>0&&(o[i]=o[i].add(f.call(this,{amount:1})),r=w.subtract(r,1)),i+=1;return o},convert:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.endpoint,o=void 0===r?l.endpoint:r,i=n.propertyPath,a=void 0===i?l.propertyPath||"rates.{{to}}":i,s=n.headers,u=void 0===s?l.headers:s,p=n.roundingMode,h=void 0===p?c:p,m=Object.assign({},{endpoint:o,propertyPath:a,headers:u,roundingMode:h});return g(m).getExchangeRate(this.getCurrency(),e).then((function(n){return b(!d(n),'No rate was found for the destination currency "'.concat(e,'".'),TypeError),f.call(t,{amount:w.round(w.multiply(t.getAmount(),parseFloat(n)),m.roundingMode),currency:e})}))},equalsTo:function(e){return this.hasSameAmount(e)&&this.hasSameCurrency(e)},lessThan:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()n[1].getAmount()},greaterThanOrEqual:function(t){p.call(this,t);var n=e.normalizePrecision([this,t]);return n[0].getAmount()>=n[1].getAmount()},isZero:function(){return 0===this.getAmount()},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return 0!==w.modulo(this.getAmount(),Math.pow(10,i))},hasCents:function(){return 0!==w.modulo(this.getAmount(),Math.pow(10,i))},hasSameCurrency:function(e){return this.getCurrency()===e.getCurrency()},hasSameAmount:function(t){var n=e.normalizePrecision([this,t]);return n[0].getAmount()===n[1].getAmount()},toFormat:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,n=m(e);return this.toRoundedUnit(n.getMinimumFractionDigits(),t).toLocaleString(this.getLocale(),{currencyDisplay:n.getCurrencyDisplay(),useGrouping:n.getUseGrouping(),minimumFractionDigits:n.getMinimumFractionDigits(),style:n.getStyle(),currency:this.getCurrency()})},toUnit:function(){return w.divide(this.getAmount(),Math.pow(10,i))},toRoundedUnit:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u,n=Math.pow(10,e);return w.divide(w.round(w.multiply(this.toUnit(),n),t),n)},toObject:function(){return{amount:r,currency:o,precision:i}},toJSON:function(){return this.toObject()}}}),{defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},{globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}},a);t.a=O},137:function(e,t,n){"use strict";var r=n(22),o=n(0),i=n(4),a=n.n(i),s=n(6),c=n(65),u=n.n(c),l=n(9),f=n(80),d=n(465),p=n(1);function h(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 m=0;function g(e){const t=document.scrollingElement||document.body;e&&(m=t.scrollTop);const n=e?"add":"remove";t.classList[n]("lockscroll"),document.documentElement.classList[n]("lockscroll"),e||(t.scrollTop=m)}let b=0;function v(){return Object(o.useEffect)(()=>(0===b&&g(!0),++b,()=>{1===b&&g(!1),--b}),[]),null}var y=n(152);function w(e){const t=Object(o.useContext)(y.a),n=t.slots[e]||{},r=t.fills[e],i=Object(o.useMemo)(()=>r||[],[r]);return{...n,updateSlot:Object(o.useCallback)(n=>{t.updateSlot(e,n)},[e,t.updateSlot]),unregisterSlot:Object(o.useCallback)(n=>{t.unregisterSlot(e,n)},[e,t.unregisterSlot]),fills:i,registerFill:Object(o.useCallback)(n=>{t.registerFill(e,n)},[e,t.registerFill]),unregisterFill:Object(o.useCallback)(n=>{t.unregisterFill(e,n)},[e,t.unregisterFill])}}var O=Object(o.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function x({name:e,children:t,registerFill:n,unregisterFill:r}){const i=(e=>{const{getSlot:t,subscribe:n}=Object(o.useContext)(O),[r,i]=Object(o.useState)(t(e));return Object(o.useEffect)(()=>(i(t(e)),n(()=>{i(t(e))})),[e]),r})(e),a=Object(o.useRef)({name:e,children:t});return Object(o.useLayoutEffect)(()=>(n(e,a.current),()=>r(e,a.current)),[]),Object(o.useLayoutEffect)(()=>{a.current.children=t,i&&i.forceUpdate()},[t]),Object(o.useLayoutEffect)(()=>{e!==a.current.name&&(r(a.current.name,a.current),a.current.name=e,n(e,a.current))},[e]),i&&i.node?(Object(s.isFunction)(t)&&(t=t(i.props.fillProps)),Object(o.createPortal)(t,i.node)):null}var j=e=>Object(o.createElement)(O.Consumer,null,({registerFill:t,unregisterFill:n})=>Object(o.createElement)(x,Object(r.a)({},e,{registerFill:t,unregisterFill:n})));class S extends o.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:r}=this.props,i=Object(s.map)(r(t,this),e=>{const t=Object(s.isFunction)(e.children)?e.children(n):e.children;return o.Children.map(t,(e,t)=>{if(!e||Object(s.isString)(e))return e;const n=e.key||t;return Object(o.cloneElement)(e,{key:n})})}).filter(Object(s.negate)(o.isEmptyElement));return Object(o.createElement)(o.Fragment,null,Object(s.isFunction)(e)?e(i):i)}}var k=e=>Object(o.createElement)(O.Consumer,null,({registerSlot:t,unregisterSlot:n,getFills:i})=>Object(o.createElement)(S,Object(r.a)({},e,{registerSlot:t,unregisterSlot:n,getFills:i})));function E(){const[,e]=Object(o.useState)({}),t=Object(o.useRef)(!0);return Object(o.useEffect)(()=>()=>{t.current=!1},[]),()=>{t.current&&e({})}}function C({name:e,children:t}){const n=w(e),r=Object(o.useRef)({rerender:E()});return Object(o.useEffect)(()=>(n.registerFill(r),()=>{n.unregisterFill(r)}),[n.registerFill,n.unregisterFill]),n.ref&&n.ref.current?("function"==typeof t&&(t=t(n.fillProps)),Object(o.createPortal)(t,n.ref.current)):null}var _=Object(o.forwardRef)((function({name:e,fillProps:t={},as:n="div",...i},a){const s=Object(o.useContext)(y.a),c=Object(o.useRef)();return Object(o.useLayoutEffect)(()=>(s.registerSlot(e,c,t),()=>{s.unregisterSlot(e,c)}),[s.registerSlot,s.unregisterSlot,e]),Object(o.useLayoutEffect)(()=>{s.updateSlot(e,t)}),Object(o.createElement)(n,Object(r.a)({ref:Object(l.useMergeRefs)([a,c])},i))}));function A(e){return Object(o.createElement)(o.Fragment,null,Object(o.createElement)(j,e),Object(o.createElement)(C,e))}n(26),o.Component;const I=Object(o.forwardRef)(({bubblesVirtually:e,...t},n)=>e?Object(o.createElement)(_,Object(r.a)({},t,{ref:n})):Object(o.createElement)(k,t));function P(e){return"appear"===e?"top":"left"}function M(e,t){const{paddingTop:n,paddingBottom:r,paddingLeft:o,paddingRight:i}=(a=t).ownerDocument.defaultView.getComputedStyle(a);var a;const s=n?parseInt(n,10):0,c=r?parseInt(r,10):0,u=o?parseInt(o,10):0,l=i?parseInt(i,10):0;return{x:e.left+u,y:e.top+s,width:e.width-u-l,height:e.height-s-c,left:e.left+u,right:e.right-l,top:e.top+s,bottom:e.bottom-c}}function T(e,t,n){n?e.getAttribute(t)!==n&&e.setAttribute(t,n):e.hasAttribute(t)&&e.removeAttribute(t)}function R(e,t,n=""){e.style[t]!==n&&(e.style[t]=n)}function F(e,t,n){n?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const L=Object(o.forwardRef)(({headerTitle:e,onClose:t,children:n,className:i,noArrow:s=!0,isAlternate:c,position:m="bottom right",range:g,focusOnMount:b="firstElement",anchorRef:y,shouldAnchorIncludePadding:O,anchorRect:x,getAnchorRect:j,expandOnMobile:S,animate:k=!0,onClickOutside:E,onFocusOutside:C,__unstableStickyBoundaryElement:_,__unstableSlotName:I="Popover",__unstableObserveElement:L,__unstableBoundaryParent:H,__unstableForcePosition:N,__unstableForceXAlignment:D,...V},z)=>{const $=Object(o.useRef)(null),B=Object(o.useRef)(null),W=Object(o.useRef)(),U=Object(l.useViewportMatch)("medium","<"),[q,K]=Object(o.useState)(),X=w(I),Y=S&&U,[Z,J]=Object(l.useResizeObserver)();s=Y||s,Object(o.useLayoutEffect)(()=>{if(Y)return F(W.current,"is-without-arrow",s),F(W.current,"is-alternate",c),T(W.current,"data-x-axis"),T(W.current,"data-y-axis"),R(W.current,"top"),R(W.current,"left"),R(B.current,"maxHeight"),void R(B.current,"maxWidth");const e=()=>{if(!W.current||!B.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 h(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 h(Object(f.getRectangleFromRange)(r),r.endContainer.ownerDocument,i);if("function"==typeof(null==r?void 0:r.getBoundingClientRect)){const e=h(r.getBoundingClientRect(),r.ownerDocument,i);return o?e:M(e,r)}const{top:e,bottom:t}=r,n=e.getBoundingClientRect(),a=t.getBoundingClientRect(),s=h(new window.DOMRect(n.left,n.top,n.width,a.bottom-n.top),e.ownerDocument,i);return o?s:M(s,r)}if(!e.current)return;const{parentNode:a}=e.current,s=a.getBoundingClientRect();return o?s:M(s,a)}($,x,j,y,O,W.current);if(!e)return;const{offsetParent:t,ownerDocument:n}=W.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;H&&(r=null===(i=W.current.closest(".popover-slot"))||void 0===i?void 0:i.parentNode);const a=J.height?J:B.current.getBoundingClientRect(),{popoverTop:u,popoverLeft:l,xAxis:d,yAxis:g,contentHeight:b,contentWidth:v}=function(e,t,n="top",r,o,i,a,s,c){const[u,l="center",f]=n.split(" "),d=function(e,t,n,r,o,i,a,s){const{height:c}=t;if(o){const t=o.getBoundingClientRect().top+c-a;if(e.top<=t)return{yAxis:n,popoverTop:Math.min(e.bottom,t)}}let u=e.top+e.height/2;"bottom"===r?u=e.bottom:"top"===r&&(u=e.top);const l={popoverTop:u,contentHeight:(u-c/2>0?c/2:u)+(u+c/2>window.innerHeight?window.innerHeight-u:c/2)},f={popoverTop:e.top,contentHeight:e.top-10-c>0?c:e.top-10},d={popoverTop:e.bottom,contentHeight:e.bottom+10+c>window.innerHeight?window.innerHeight-10-e.bottom:c};let p,h=n,m=null;if(!o&&!s)if("middle"===n&&l.contentHeight===c)h="middle";else if("top"===n&&f.contentHeight===c)h="top";else if("bottom"===n&&d.contentHeight===c)h="bottom";else{h=f.contentHeight>d.contentHeight?"top":"bottom";const e="top"===h?f.contentHeight:d.contentHeight;m=e!==c?e:null}return p="middle"===h?l.popoverTop:"top"===h?f.popoverTop:d.popoverTop,{yAxis:h,popoverTop:p,contentHeight:m}}(e,t,u,f,r,0,i,s);return{...function(e,t,n,r,o,i,a,s,c){const{width:u}=t;"left"===n&&Object(p.isRTL)()?n="right":"right"===n&&Object(p.isRTL)()&&(n="left"),"left"===r&&Object(p.isRTL)()?r="right":"right"===r&&Object(p.isRTL)()&&(r="left");const l=Math.round(e.left+e.width/2),f={popoverLeft:l,contentWidth:(l-u/2>0?u/2:l)+(l+u/2>window.innerWidth?window.innerWidth-l:u/2)};let d=e.left;"right"===r?d=e.right:"middle"===i||c||(d=l);let h=e.right;"left"===r?h=e.left:"middle"===i||c||(h=l);const m={popoverLeft:d,contentWidth:d-u>0?u:d},g={popoverLeft:h,contentWidth:h+u>window.innerWidth?window.innerWidth-h:u};let b,v=n,y=null;if(!o&&!s)if("center"===n&&f.contentWidth===u)v="center";else if("left"===n&&m.contentWidth===u)v="left";else if("right"===n&&g.contentWidth===u)v="right";else{v=m.contentWidth>g.contentWidth?"left":"right";const e="left"===v?m.contentWidth:g.contentWidth;u>window.innerWidth&&(y=window.innerWidth),e!==u&&(v="center",f.popoverLeft=window.innerWidth/2)}if(b="center"===v?f.popoverLeft:"left"===v?m.popoverLeft:g.popoverLeft,a){const e=a.getBoundingClientRect();b=Math.min(b,e.right-u),Object(p.isRTL)()||(b=Math.max(b,0))}return{xAxis:v,popoverLeft:b,contentWidth:y}}(e,t,l,f,r,d.yAxis,a,s,c),...d}}(e,a,m,_,W.current,o,r,N,D);"number"==typeof u&&"number"==typeof l&&(R(W.current,"top",u+"px"),R(W.current,"left",l+"px")),F(W.current,"is-without-arrow",s||"center"===d&&"middle"===g),F(W.current,"is-alternate",c),T(W.current,"data-x-axis",d),T(W.current,"data-y-axis",g),R(B.current,"maxHeight","number"==typeof b?b+"px":""),R(B.current,"maxWidth","number"==typeof v?v+"px":""),K(({left:"right",right:"left"}[d]||"center")+" "+({top:"bottom",bottom:"top"}[g]||"middle"))};e();const{ownerDocument:t}=W.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 a=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(y);let u;return a&&a!==t&&(a.defaultView.addEventListener("resize",e),a.defaultView.addEventListener("scroll",e,!0)),L&&(u=new n.MutationObserver(e),u.observe(L,{attributes:!0})),()=>{n.clearInterval(r),n.removeEventListener("resize",e),n.removeEventListener("scroll",e,!0),n.removeEventListener("click",i),n.cancelAnimationFrame(o),a&&a!==t&&(a.defaultView.removeEventListener("resize",e),a.defaultView.removeEventListener("scroll",e,!0)),u&&u.disconnect()}},[Y,x,j,y,O,m,J,_,L,H]);const Q=(e,n)=>{if("focus-outside"===e&&C)C(n);else if("focus-outside"===e&&E){const e=new window.MouseEvent("click");Object.defineProperty(e,"target",{get:()=>n.relatedTarget}),u()("Popover onClickOutside prop",{since:"5.3",alternative:"onFocusOutside"}),E(e)}else t&&t()},[ee,te]=Object(l.__experimentalUseDialog)({focusOnMount:b,__unstableOnClose:Q,onClose:Q}),ne=Object(l.useMergeRefs)([W,ee,z]),re=Boolean(k&&q)&&function(e){if("loading"===e.type)return a()("components-animate__loading");const{type:t,origin:n=P(t)}=e;if("appear"===t){const[e,t="center"]=n.split(" ");return a()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?a()("components-animate__slide-in","is-from-"+n):void 0}({type:"appear",origin:q});let oe=Object(o.createElement)("div",Object(r.a)({className:a()("components-popover",i,re,{"is-expanded":Y,"is-without-arrow":s,"is-alternate":c})},V,{ref:ne},te,{tabIndex:"-1"}),Y&&Object(o.createElement)(v,null),Y&&Object(o.createElement)("div",{className:"components-popover__header"},Object(o.createElement)("span",{className:"components-popover__header-title"},e),Object(o.createElement)(G,{className:"components-popover__close",icon:d.a,onClick:t})),Object(o.createElement)("div",{ref:B,className:"components-popover__content"},Object(o.createElement)("div",{style:{position:"relative"}},Z,n)));return X.ref&&(oe=Object(o.createElement)(A,{name:I},oe)),y||x?oe:Object(o.createElement)("span",{ref:$},oe)});L.Slot=Object(o.forwardRef)((function({name:e="Popover"},t){return Object(o.createElement)(I,{bubblesVirtually:!0,name:e,className:"popover-slot",ref:t})}));var H=L,N=function({shortcut:e,className:t}){if(!e)return null;let n,r;return Object(s.isString)(e)&&(n=e),Object(s.isObject)(e)&&(n=e.display,r=e.ariaLabel),Object(o.createElement)("span",{className:t,"aria-label":r},n)};const D=Object(o.createElement)("div",{className:"event-catcher"}),V=({eventHandlers:e,child:t,childrenWithPopover:n})=>Object(o.cloneElement)(Object(o.createElement)("span",{className:"disabled-element-wrapper"},Object(o.cloneElement)(D,e),Object(o.cloneElement)(t,{children:n}),","),e),z=({child:e,eventHandlers:t,childrenWithPopover:n})=>Object(o.cloneElement)(e,{...t,children:n}),$=(e,t,n)=>{if(1!==o.Children.count(e))return;const r=o.Children.only(e);"function"==typeof r.props[t]&&r.props[t](n)};var B=function({children:e,position:t,text:n,shortcut:r}){const[i,a]=Object(o.useState)(!1),[c,u]=Object(o.useState)(!1),f=Object(l.useDebounce)(u,700),d=t=>{$(e,"onMouseDown",t),document.addEventListener("mouseup",m),a(!0)},p=t=>{$(e,"onMouseUp",t),document.removeEventListener("mouseup",m),a(!1)},h=e=>"mouseUp"===e?p:"mouseDown"===e?d:void 0,m=h("mouseUp"),g=(t,n)=>r=>{if($(e,t,r),r.currentTarget.disabled)return;if("focus"===r.type&&i)return;f.cancel();const o=Object(s.includes)(["focus","mouseenter"],r.type);o!==c&&(n?f(o):u(o))},b=()=>{f.cancel(),document.removeEventListener("mouseup",m)};if(Object(o.useEffect)(()=>b,[]),1!==o.Children.count(e))return e;const v={onMouseEnter:g("onMouseEnter",!0),onMouseLeave:g("onMouseLeave"),onClick:g("onClick"),onFocus:g("onFocus"),onBlur:g("onBlur"),onMouseDown:h("mouseDown")},y=o.Children.only(e),{children:w,disabled:O}=y.props;return(O?V:z)({child:y,eventHandlers:v,childrenWithPopover:(({grandchildren:e,isOver:t,position:n,text:r,shortcut:i})=>Object(o.concatChildren)(e,t&&Object(o.createElement)(H,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},r,Object(o.createElement)(N,{className:"components-tooltip__shortcut",shortcut:i}))))({grandchildren:w,isOver:c,position:t,text:n,shortcut:r})})},W=n(188),U=n(135);const q=["onMouseDown","onClick"];var G=t.a=Object(o.forwardRef)((function(e,t){const{href:n,target:i,isSmall:c,isPressed:l,isBusy:f,isDestructive:d,className:p,disabled:h,icon:m,iconPosition:g="left",iconSize:b,showTooltip:v,tooltipPosition:y,shortcut:w,label:O,children:x,text:j,variant:S,__experimentalIsFocusable:k,describedBy:E,...C}=function({isDefault:e,isPrimary:t,isSecondary:n,isTertiary:r,isLink:o,variant:i,...a}){let s=i;var c,l,f,d,p;return t&&(null!==(c=s)&&void 0!==c||(s="primary")),r&&(null!==(l=s)&&void 0!==l||(s="tertiary")),n&&(null!==(f=s)&&void 0!==f||(s="secondary")),e&&(u()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"'}),null!==(d=s)&&void 0!==d||(s="secondary")),o&&(null!==(p=s)&&void 0!==p||(s="link")),{...a,variant:s}}(e),_=a()("components-button",p,{"is-secondary":"secondary"===S,"is-primary":"primary"===S,"is-small":c,"is-tertiary":"tertiary"===S,"is-pressed":l,"is-busy":f,"is-link":"link"===S,"is-destructive":d,"has-text":!!m&&!!x,"has-icon":!!m}),A=h&&!k,I=void 0===n||A?"button":"a",P="a"===I?{href:n,target:i}:{type:"button",disabled:A,"aria-pressed":l};if(h&&k){P["aria-disabled"]=!0;for(const e of q)C[e]=e=>{e.stopPropagation(),e.preventDefault()}}const M=!A&&(v&&O||w||!!O&&(!x||Object(s.isArray)(x)&&!x.length)&&!1!==v),T=E?Object(s.uniqueId)():null,R=C["aria-describedby"]||T,F=Object(o.createElement)(I,Object(r.a)({},P,C,{className:_,"aria-label":C["aria-label"]||O,"aria-describedby":R,ref:t}),m&&"left"===g&&Object(o.createElement)(W.a,{icon:m,size:b}),j&&Object(o.createElement)(o.Fragment,null,j),m&&"right"===g&&Object(o.createElement)(W.a,{icon:m,size:b}),x);return M?Object(o.createElement)(o.Fragment,null,Object(o.createElement)(B,{text:E||O,shortcut:w,position:y},F),E&&Object(o.createElement)(U.a,null,Object(o.createElement)("span",{id:T},E))):Object(o.createElement)(o.Fragment,null,F,E&&Object(o.createElement)(U.a,null,Object(o.createElement)("span",{id:T},E)))}))},147:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"e",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return c}));var r=n(45);const o=Object(r.a)({name:"zjik7",styles:"display:flex"}),i=Object(r.a)({name:"qgaee5",styles:"display:block;max-height:100%;max-width:100%;min-height:0;min-width:0"}),a=Object(r.a)({name:"82a6rk",styles:"flex:1"}),s=Object(r.a)({name:"13nosa1",styles:">*{min-height:0;}"}),c=Object(r.a)({name:"1pwxzk4",styles:">*{min-width:0;}"})},150:function(e,t,n){"use strict";var r=n(195),o="-ms-",i="-moz-",a="-webkit-",s="comm",c="rule",u="decl",l="@keyframes",f=Math.abs,d=String.fromCharCode,p=Object.assign;function h(e){return e.trim()}function m(e,t,n){return e.replace(t,n)}function g(e,t){return e.indexOf(t)}function b(e,t){return 0|e.charCodeAt(t)}function v(e,t,n){return e.slice(t,n)}function y(e){return e.length}function w(e){return e.length}function O(e,t){return t.push(e),e}var x=1,j=1,S=0,k=0,E=0,C="";function _(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:x,column:j,length:a,return:""}}function A(e,t){return p(_("",null,null,"",null,null,0),e,{length:-e.length},t)}function I(){return E=k>0?b(C,--k):0,j--,10===E&&(j=1,x--),E}function P(){return E=k2||F(E)>3?"":" "}function V(e,t){for(;--t&&P()&&!(E<48||E>102||E>57&&E<65||E>70&&E<97););return R(e,T()+(t<6&&32==M()&&32==P()))}function z(e,t){for(;P()&&e+E!==57&&(e+E!==84||47!==M()););return"/*"+R(t,k-1)+"*"+d(47===e?e:P())}function $(e){for(;!F(M());)P();return R(e,k)}function B(e,t,n,r,o,i,a,s,u,l,d){for(var p=o-1,g=0===o?i:[""],b=w(g),y=0,O=0,x=0;y0?g[j]+" "+S:m(S,/&\f/g,g[j])))&&(u[x++]=k);return _(e,t,n,0===o?c:s,u,l,d)}function W(e,t,n){return _(e,t,n,s,d(E),v(e,2,-2),0)}function U(e,t,n,r){return _(e,t,n,u,v(e,0,r),v(e,r+1,-1),r)}function q(e,t){for(var n="",r=w(e),o=0;o-1&&!e.return)switch(e.type){case u:e.return=function e(t,n){switch(function(e,t){return(((t<<2^b(e,0))<<2^b(e,1))<<2^b(e,2))<<2^b(e,3)}(t,n)){case 5103:return a+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return a+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return a+t+i+t+o+t+t;case 6828:case 4268:return a+t+o+t+t;case 6165:return a+t+o+"flex-"+t+t;case 5187:return a+t+m(t,/(\w+).+(:[^]+)/,a+"box-$1$2"+o+"flex-$1$2")+t;case 5443:return a+t+o+"flex-item-"+m(t,/flex-|-self/,"")+t;case 4675:return a+t+o+"flex-line-pack"+m(t,/align-content|flex-|-self/,"")+t;case 5548:return a+t+o+m(t,"shrink","negative")+t;case 5292:return a+t+o+m(t,"basis","preferred-size")+t;case 6060:return a+"box-"+m(t,"-grow","")+a+t+o+m(t,"grow","positive")+t;case 4554:return a+m(t,/([^-])(transform)/g,"$1"+a+"$2")+t;case 6187:return m(m(m(t,/(zoom-|grab)/,a+"$1"),/(image-set)/,a+"$1"),t,"")+t;case 5495:case 3959:return m(t,/(image-set\([^]*)/,a+"$1$`$1");case 4968:return m(m(t,/(.+:)(flex-)?(.*)/,a+"box-pack:$3"+o+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+a+t+t;case 4095:case 3583:case 4068:case 2532:return m(t,/(.+)-inline(.+)/,a+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(y(t)-1-n>6)switch(b(t,n+1)){case 109:if(45!==b(t,n+4))break;case 102:return m(t,/(.+:)(.+)-([^]+)/,"$1"+a+"$2-$3$1"+i+(108==b(t,n+3)?"$3":"$2-$3"))+t;case 115:return~g(t,"stretch")?e(m(t,"stretch","fill-available"),n)+t:t}break;case 4949:if(115!==b(t,n+1))break;case 6444:switch(b(t,y(t)-3-(~g(t,"!important")&&10))){case 107:return m(t,":",":"+a)+t;case 101:return m(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+a+(45===b(t,14)?"inline-":"")+"box$3$1"+a+"$2$3$1"+o+"$2box$3")+t}break;case 5936:switch(b(t,n+11)){case 114:return a+t+o+m(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return a+t+o+m(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return a+t+o+m(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return a+t+o+t+t}return t}(e.value,e.length);break;case l:return q([A(e,{value:m(e.value,"@","@"+a)})],r);case c:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return q([A(e,{props:[m(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return q([A(e,{props:[m(t,/:(plac\w+)/,":"+a+"input-$1")]}),A(e,{props:[m(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[m(t,/:(plac\w+)/,o+"input-$1")]})],r)}return""}))}}];t.a=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||Q,s={},c=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n0&&y(A)-p&&O(b>32?U(A+";",o,r,p-1):U(m(A," ","")+";",o,r,p-2),u);break;case 59:A+=";";default:if(O(_=B(A,n,r,l,f,i,c,k,E=[],C=[],p),a),123===S)if(0===f)e(A,n,_,_,E,a,p,c,C);else switch(h){case 100:case 109:case 115:e(t,_,_,o&&O(B(t,_,_,0,0,i,c,k,i,E=[],p),C),i,C,p,c,o?E:C);break;default:e(A,_,_,_,[""],C,0,c,C)}}l=f=b=0,w=j=1,k=A="",p=s;break;case 58:p=1+y(A),b=v;default:if(w<1)if(123==S)--w;else if(125==S&&0==w++&&125==I())continue;switch(A+=d(S),S*w){case 38:j=f>0?1:(A+="\f",-1);break;case 44:c[l++]=(y(A)-1)*j,j=1;break;case 64:45===M()&&(A+=N(P())),h=M(),f=p=y(k=A+=$(T())),S++;break;case 45:45===v&&2==y(A)&&(w=0)}}return a}("",null,null,null,[""],e=L(e),0,[0],e))}(e?e+"{"+t.styles+"}":t.styles),p),r&&(h.inserted[t.name]=!0)};var h={key:t,sheet:new r.a({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:i};return h.sheet.hydrate(c),h}},151:function(e,t,n){function r(e){for(var t,n,r=[],o=0;o/g,">\n").replace(/\n\n/g,"\n").replace(/^\n/g,"").replace(/\n$/g,"").split("\n"),g=0,b=[],v=!1,y=0;y=c)n="";else if(g+w.length>=c){if(" "===w[(o=c-g)-1])for(;o&&" "===w[(o-=1)-1];);else i=w.slice(o).indexOf(" "),l||(-1!==i?o+=i:o=n.length);n=w.slice(0,o).join("")+f,d&&(n+=''+p+""),g=c,v=!0}else g+=w.length;else if(u){if(g>=c)if(s=(a=n.match(/[a-zA-Z]+/))?a[0]:"")if("{void 0!==e&&e.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});t.a=o}).call(this,n(168))},153:function(e,t,n){e.exports=function(e,t){var n,r,o=0;function i(){var i,a,s=n,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(a=0;a=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return z}));var o=n(22);function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var s=n(10),c=n.n(s),u=n(8);function l(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function f(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function d(e,t){if(e.clientHeightt||i>e&&a=t&&s>=n?i-e-r:a>t&&sn?a-t+o:0}n(238);var h=function(){return(h=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&k>=0&&S<=g&&j<=m&&x>=R&&S<=L&&k>=H&&j<=F)return _;var N=getComputedStyle(I),D=parseInt(N.borderLeftWidth,10),V=parseInt(N.borderTopWidth,10),z=parseInt(N.borderRightWidth,10),$=parseInt(N.borderBottomWidth,10),B=0,W=0,U="offsetWidth"in I?I.offsetWidth-I.clientWidth-D-z:0,q="offsetHeight"in I?I.offsetHeight-I.clientHeight-V-$:0;if(u===I)B="start"===o?E:"end"===o?E-g:"nearest"===o?p(v,v+g,g,V,$,v+E,v+E+w,w):E-g/2,W="start"===i?C:"center"===i?C-m/2:"end"===i?C-m:p(b,b+m,m,D,z,b+C,b+C+O,O),B=Math.max(0,B+v),W=Math.max(0,W+b);else{B="start"===o?E-R-V:"end"===o?E-L+$+q:"nearest"===o?p(R,L,M,V,$+q,E,E+w,w):E-(R+M/2)+q/2,W="start"===i?C-H-D:"center"===i?C-(H+T/2)+U/2:"end"===i?C-F+z+U:p(H,F,T,D,z+U,C,C+O,O);var G=I.scrollLeft,K=I.scrollTop;E+=K-(B=Math.max(0,Math.min(K+B,I.scrollHeight-M+q))),C+=G-(W=Math.max(0,Math.min(G+W,I.scrollWidth-T+U)))}_.push({el:I,top:B,left:W})}return _}(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,n=e.top,r=e.left;t.scrollTop=n,t.scrollLeft=r}))}function y(e,t,n){return e===t||t instanceof n.Node&&e.contains&&e.contains(t)}function w(e,t){var n;function r(){n&&clearTimeout(n)}function o(){for(var o=arguments.length,i=new Array(o),a=0;a1?n-1:0),o=1;o=37&&n<=40&&0!==t.indexOf("Arrow")?"Arrow"+t:t}function A(e,t,n,r,o){if(void 0===o&&(o=!0),0===n)return-1;var i=n-1;("number"!=typeof t||t<0||t>=n)&&(t=e>0?-1:i+1);var a=t+e;a<0?a=o?i:0:a>i&&(a=o?0:i);var s=I(e,a,n,r,o);return-1===s?t>=n?-1:t:s}function I(e,t,n,r,o){var i=r(t);if(!i||!i.hasAttribute("disabled"))return t;if(e>0){for(var a=t+1;a=0;s--)if(!r(s).hasAttribute("disabled"))return s;return o?e>0?I(1,0,n,r,!1):I(-1,n-1,n,r,!1):-1}function P(e,t,n,r){return void 0===r&&(r=!0),t.some((function(t){return t&&(y(t,e,n)||r&&y(t,n.document.activeElement,n))}))}var M=w((function(e){R(e).textContent=""}),500);function T(e,t){var n=R(t);e&&(n.textContent=e,M(t))}function R(e){void 0===e&&(e=document);var t=e.getElementById("a11y-status-message");return t||((t=e.createElement("div")).setAttribute("id","a11y-status-message"),t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-relevant","additions text"),Object.assign(t.style,{border:"0",clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:"0",position:"absolute",width:"1px"}),e.body.appendChild(t),t)}var F=Object.freeze({__proto__:null,unknown:0,mouseUp:1,itemMouseEnter:2,keyDownArrowUp:3,keyDownArrowDown:4,keyDownEscape:5,keyDownEnter:6,keyDownHome:7,keyDownEnd:8,clickItem:9,blurInput:10,changeInput:11,keyDownSpaceButton:12,clickButton:13,blurButton:14,controlledPropUpdatedSelectedItem:15,touchEnd:16}),L=["refKey","ref"],H=["onClick","onPress","onKeyDown","onKeyUp","onBlur"],N=["onKeyDown","onBlur","onChange","onInput","onChangeText"],D=["refKey","ref"],V=["onMouseMove","onMouseDown","onClick","onPress","index","item"],z=function(){var e=function(e){var t,n;function s(t){var n;(n=e.call(this,t)||this).id=n.props.id||"downshift-"+String(m++),n.menuId=n.props.menuId||n.id+"-menu",n.labelId=n.props.labelId||n.id+"-label",n.inputId=n.props.inputId||n.id+"-input",n.getItemId=n.props.getItemId||function(e){return n.id+"-item-"+e},n.input=null,n.items=[],n.itemCount=null,n.previousResultCount=0,n.timeoutIds=[],n.internalSetTimeout=function(e,t){var r=setTimeout((function(){n.timeoutIds=n.timeoutIds.filter((function(e){return e!==r})),e()}),t);n.timeoutIds.push(r)},n.setItemCount=function(e){n.itemCount=e},n.unsetItemCount=function(){n.itemCount=null},n.setHighlightedIndex=function(e,t){void 0===e&&(e=n.props.defaultHighlightedIndex),void 0===t&&(t={}),t=E(t),n.internalSetState(Object(o.a)({highlightedIndex:e},t))},n.clearSelection=function(e){n.internalSetState({selectedItem:null,inputValue:"",highlightedIndex:n.props.defaultHighlightedIndex,isOpen:n.props.defaultIsOpen},e)},n.selectItem=function(e,t,r){t=E(t),n.internalSetState(Object(o.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,selectedItem:e,inputValue:n.props.itemToString(e)},t),r)},n.selectItemAtIndex=function(e,t,r){var o=n.items[e];null!=o&&n.selectItem(o,t,r)},n.selectHighlightedItem=function(e,t){return n.selectItemAtIndex(n.getState().highlightedIndex,e,t)},n.internalSetState=function(e,t){var r,i,a={},s="function"==typeof e;return!s&&e.hasOwnProperty("inputValue")&&n.props.onInputValueChange(e.inputValue,Object(o.a)({},n.getStateAndHelpers(),e)),n.setState((function(t){t=n.getState(t);var c=s?e(t):e;c=n.props.stateReducer(t,c),r=c.hasOwnProperty("selectedItem");var u={},l={};return r&&c.selectedItem!==t.selectedItem&&(i=c.selectedItem),c.type=c.type||0,Object.keys(c).forEach((function(e){t[e]!==c[e]&&(a[e]=c[e]),"type"!==e&&(l[e]=c[e],C(n.props,e)||(u[e]=c[e]))})),s&&c.hasOwnProperty("inputValue")&&n.props.onInputValueChange(c.inputValue,Object(o.a)({},n.getStateAndHelpers(),c)),u}),(function(){g(t)(),Object.keys(a).length>1&&n.props.onStateChange(a,n.getStateAndHelpers()),r&&n.props.onSelect(e.selectedItem,n.getStateAndHelpers()),void 0!==i&&n.props.onChange(i,n.getStateAndHelpers()),n.props.onUserAction(a,n.getStateAndHelpers())}))},n.rootRef=function(e){return n._rootNode=e},n.getRootProps=function(e,t){var i,a=void 0===e?{}:e,s=a.refKey,c=void 0===s?"ref":s,u=a.ref,l=r(a,L),f=(void 0===t?{}:t).suppressRefError,d=void 0!==f&&f;n.getRootProps.called=!0,n.getRootProps.refKey=c,n.getRootProps.suppressRefError=d;var p=n.getState().isOpen;return Object(o.a)(((i={})[c]=x(u,n.rootRef),i.role="combobox",i["aria-expanded"]=p,i["aria-haspopup"]="listbox",i["aria-owns"]=p?n.menuId:null,i["aria-labelledby"]=n.labelId,i),l)},n.keyDownHandlers={ArrowDown:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?5:1;this.moveHighlightedIndex(n,{type:4})}else this.internalSetState({isOpen:!0,type:4},(function(){var e=t.getItemCount();if(e>0){var n=A(1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:4})}}))},ArrowUp:function(e){var t=this;if(e.preventDefault(),this.getState().isOpen){var n=e.shiftKey?-5:-1;this.moveHighlightedIndex(n,{type:3})}else this.internalSetState({isOpen:!0,type:3},(function(){var e=t.getItemCount();if(e>0){var n=A(-1,t.getState().highlightedIndex,e,(function(e){return t.getItemNodeFromIndex(e)}));t.setHighlightedIndex(n,{type:3})}}))},Enter:function(e){if(229!==e.which){var t=this.getState(),n=t.isOpen,r=t.highlightedIndex;if(n&&null!=r){e.preventDefault();var o=this.items[r],i=this.getItemNodeFromIndex(r);if(null==o||i&&i.hasAttribute("disabled"))return;this.selectHighlightedItem({type:6})}}},Escape:function(e){e.preventDefault(),this.reset(Object(o.a)({type:5},!this.state.isOpen&&{selectedItem:null,inputValue:""}))}},n.buttonKeyDownHandlers=Object(o.a)({},n.keyDownHandlers,{" ":function(e){e.preventDefault(),this.toggleMenu({type:12})}}),n.inputKeyDownHandlers=Object(o.a)({},n.keyDownHandlers,{Home:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=I(1,0,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:7})}}},End:function(e){var t=this,n=this.getState().isOpen;if(n){e.preventDefault();var r=this.getItemCount();if(!(r<=0)&&n){var o=I(-1,r-1,r,(function(e){return t.getItemNodeFromIndex(e)}),!1);this.setHighlightedIndex(o,{type:8})}}}}),n.getToggleButtonProps=function(e){var t=void 0===e?{}:e,i=t.onClick;t.onPress;var a=t.onKeyDown,s=t.onKeyUp,c=t.onBlur,u=r(t,H),l=n.getState().isOpen,f={onClick:O(i,n.buttonHandleClick),onKeyDown:O(a,n.buttonHandleKeyDown),onKeyUp:O(s,n.buttonHandleKeyUp),onBlur:O(c,n.buttonHandleBlur)},d=u.disabled?{}:f;return Object(o.a)({type:"button",role:"button","aria-label":l?"close menu":"open menu","aria-haspopup":!0,"data-toggle":!0},d,u)},n.buttonHandleKeyUp=function(e){e.preventDefault()},n.buttonHandleKeyDown=function(e){var t=_(e);n.buttonKeyDownHandlers[t]&&n.buttonKeyDownHandlers[t].call(i(n),e)},n.buttonHandleClick=function(e){e.preventDefault(),n.props.environment.document.activeElement===n.props.environment.document.body&&e.target.focus(),n.internalSetTimeout((function(){return n.toggleMenu({type:13})}))},n.buttonHandleBlur=function(e){var t=e.target;n.internalSetTimeout((function(){n.isMouseDown||null!=n.props.environment.document.activeElement&&n.props.environment.document.activeElement.id===n.inputId||n.props.environment.document.activeElement===t||n.reset({type:14})}))},n.getLabelProps=function(e){return Object(o.a)({htmlFor:n.inputId,id:n.labelId},e)},n.getInputProps=function(e){var t=void 0===e?{}:e,i=t.onKeyDown,a=t.onBlur,s=t.onChange,c=t.onInput;t.onChangeText;var u,l=r(t,N),f={},d=n.getState(),p=d.inputValue,h=d.isOpen,m=d.highlightedIndex;return l.disabled||((u={}).onChange=O(s,c,n.inputHandleChange),u.onKeyDown=O(i,n.inputHandleKeyDown),u.onBlur=O(a,n.inputHandleBlur),f=u),Object(o.a)({"aria-autocomplete":"list","aria-activedescendant":h&&"number"==typeof m&&m>=0?n.getItemId(m):null,"aria-controls":h?n.menuId:null,"aria-labelledby":n.labelId,autoComplete:"off",value:p,id:n.inputId},f,l)},n.inputHandleKeyDown=function(e){var t=_(e);t&&n.inputKeyDownHandlers[t]&&n.inputKeyDownHandlers[t].call(i(n),e)},n.inputHandleChange=function(e){n.internalSetState({type:11,isOpen:!0,inputValue:e.target.value,highlightedIndex:n.props.defaultHighlightedIndex})},n.inputHandleBlur=function(){n.internalSetTimeout((function(){var e=n.props.environment.document&&!!n.props.environment.document.activeElement&&!!n.props.environment.document.activeElement.dataset&&n.props.environment.document.activeElement.dataset.toggle&&n._rootNode&&n._rootNode.contains(n.props.environment.document.activeElement);n.isMouseDown||e||n.reset({type:10})}))},n.menuRef=function(e){n._menuNode=e},n.getMenuProps=function(e,t){var i,a=void 0===e?{}:e,s=a.refKey,c=void 0===s?"ref":s,u=a.ref,l=r(a,D),f=(void 0===t?{}:t).suppressRefError,d=void 0!==f&&f;return n.getMenuProps.called=!0,n.getMenuProps.refKey=c,n.getMenuProps.suppressRefError=d,Object(o.a)(((i={})[c]=x(u,n.menuRef),i.role="listbox",i["aria-labelledby"]=l&&l["aria-label"]?null:n.labelId,i.id=n.menuId,i),l)},n.getItemProps=function(e){var t,i=void 0===e?{}:e,a=i.onMouseMove,s=i.onMouseDown,c=i.onClick;i.onPress;var u=i.index,l=i.item,f=void 0===l?void 0:l,d=r(i,V);void 0===u?(n.items.push(f),u=n.items.indexOf(f)):n.items[u]=f;var p=c,h=((t={onMouseMove:O(a,(function(){u!==n.getState().highlightedIndex&&(n.setHighlightedIndex(u,{type:2}),n.avoidScrolling=!0,n.internalSetTimeout((function(){return n.avoidScrolling=!1}),250))})),onMouseDown:O(s,(function(e){e.preventDefault()}))}).onClick=O(p,(function(){n.selectItemAtIndex(u,{type:9})})),t),m=d.disabled?{onMouseDown:h.onMouseDown}:h;return Object(o.a)({id:n.getItemId(u),role:"option","aria-selected":n.getState().highlightedIndex===u},m,d)},n.clearItems=function(){n.items=[]},n.reset=function(e,t){void 0===e&&(e={}),e=E(e),n.internalSetState((function(t){var r=t.selectedItem;return Object(o.a)({isOpen:n.props.defaultIsOpen,highlightedIndex:n.props.defaultHighlightedIndex,inputValue:n.props.itemToString(r)},e)}),t)},n.toggleMenu=function(e,t){void 0===e&&(e={}),e=E(e),n.internalSetState((function(t){var r=t.isOpen;return Object(o.a)({isOpen:!r},r&&{highlightedIndex:n.props.defaultHighlightedIndex},e)}),(function(){var r=n.getState(),o=r.isOpen,i=r.highlightedIndex;o&&n.getItemCount()>0&&"number"==typeof i&&n.setHighlightedIndex(i,e),g(t)()}))},n.openMenu=function(e){n.internalSetState({isOpen:!0},e)},n.closeMenu=function(e){n.internalSetState({isOpen:!1},e)},n.updateStatus=w((function(){var e=n.getState(),t=n.items[e.highlightedIndex],r=n.getItemCount(),i=n.props.getA11yStatusMessage(Object(o.a)({itemToString:n.props.itemToString,previousResultCount:n.previousResultCount,resultCount:r,highlightedItem:t},e));n.previousResultCount=r,T(i,n.props.environment.document)}),200);var a=n.props,s=a.defaultHighlightedIndex,c=a.initialHighlightedIndex,u=void 0===c?s:c,l=a.defaultIsOpen,f=a.initialIsOpen,d=void 0===f?l:f,p=a.initialInputValue,h=void 0===p?"":p,b=a.initialSelectedItem,v=void 0===b?null:b,y=n.getState({highlightedIndex:u,isOpen:d,inputValue:h,selectedItem:v});return null!=y.selectedItem&&void 0===n.props.initialInputValue&&(y.inputValue=n.props.itemToString(y.selectedItem)),n.state=y,n}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var c=s.prototype;return c.internalClearTimeouts=function(){this.timeoutIds.forEach((function(e){clearTimeout(e)})),this.timeoutIds=[]},c.getState=function(e){return void 0===e&&(e=this.state),t=e,n=this.props,Object.keys(t).reduce((function(e,r){return e[r]=C(n,r)?n[r]:t[r],e}),{});var t,n},c.getItemCount=function(){var e=this.items.length;return null!=this.itemCount?e=this.itemCount:void 0!==this.props.itemCount&&(e=this.props.itemCount),e},c.getItemNodeFromIndex=function(e){return this.props.environment.document.getElementById(this.getItemId(e))},c.scrollHighlightedItemIntoView=function(){var e=this.getItemNodeFromIndex(this.getState().highlightedIndex);this.props.scrollIntoView(e,this._menuNode)},c.moveHighlightedIndex=function(e,t){var n=this,r=this.getItemCount(),o=this.getState().highlightedIndex;if(r>0){var i=A(e,o,r,(function(e){return n.getItemNodeFromIndex(e)}));this.setHighlightedIndex(i,t)}},c.getStateAndHelpers=function(){var e=this.getState(),t=e.highlightedIndex,n=e.inputValue,r=e.selectedItem,o=e.isOpen,i=this.props.itemToString,a=this.id,s=this.getRootProps,c=this.getToggleButtonProps,u=this.getLabelProps,l=this.getMenuProps,f=this.getInputProps,d=this.getItemProps,p=this.openMenu,h=this.closeMenu,m=this.toggleMenu,g=this.selectItem,b=this.selectItemAtIndex,v=this.selectHighlightedItem,y=this.setHighlightedIndex,w=this.clearSelection,O=this.clearItems;return{getRootProps:s,getToggleButtonProps:c,getLabelProps:u,getMenuProps:l,getInputProps:f,getItemProps:d,reset:this.reset,openMenu:p,closeMenu:h,toggleMenu:m,selectItem:g,selectItemAtIndex:b,selectHighlightedItem:v,setHighlightedIndex:y,clearSelection:w,clearItems:O,setItemCount:this.setItemCount,unsetItemCount:this.unsetItemCount,setState:this.internalSetState,itemToString:i,id:a,highlightedIndex:t,inputValue:n,isOpen:o,selectedItem:r}},c.componentDidMount=function(){var e=this,t=function(){e.isMouseDown=!0},n=function(t){e.isMouseDown=!1,!P(t.target,[e._rootNode,e._menuNode],e.props.environment)&&e.getState().isOpen&&e.reset({type:1},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},r=function(){e.isTouchMove=!1},o=function(){e.isTouchMove=!0},i=function(t){var n=P(t.target,[e._rootNode,e._menuNode],e.props.environment,!1);e.isTouchMove||n||!e.getState().isOpen||e.reset({type:16},(function(){return e.props.onOuterClick(e.getStateAndHelpers())}))},a=this.props.environment;a.addEventListener("mousedown",t),a.addEventListener("mouseup",n),a.addEventListener("touchstart",r),a.addEventListener("touchmove",o),a.addEventListener("touchend",i),this.cleanup=function(){e.internalClearTimeouts(),e.updateStatus.cancel(),a.removeEventListener("mousedown",t),a.removeEventListener("mouseup",n),a.removeEventListener("touchstart",r),a.removeEventListener("touchmove",o),a.removeEventListener("touchend",i)}},c.shouldScroll=function(e,t){var n=(void 0===this.props.highlightedIndex?this.getState():this.props).highlightedIndex,r=(void 0===t.highlightedIndex?e:t).highlightedIndex;return n&&this.getState().isOpen&&!e.isOpen||n!==r},c.componentDidUpdate=function(e,t){C(this.props,"selectedItem")&&this.props.selectedItemChanged(e.selectedItem,this.props.selectedItem)&&this.internalSetState({type:15,inputValue:this.props.itemToString(this.props.selectedItem)}),!this.avoidScrolling&&this.shouldScroll(t,e)&&this.scrollHighlightedItemIntoView(),this.updateStatus()},c.componentWillUnmount=function(){this.cleanup()},c.render=function(){var e=S(this.props.children,b);this.clearItems(),this.getRootProps.called=!1,this.getRootProps.refKey=void 0,this.getRootProps.suppressRefError=void 0,this.getMenuProps.called=!1,this.getMenuProps.refKey=void 0,this.getMenuProps.suppressRefError=void 0,this.getLabelProps.called=!1,this.getInputProps.called=!1;var t=S(e(this.getStateAndHelpers()));return t?this.getRootProps.called||this.props.suppressRefError?t:function(e){return"string"==typeof e.type}(t)?Object(u.cloneElement)(t,this.getRootProps(function(e){return e.props}(t))):void 0:null},s}(u.Component);return e.defaultProps={defaultHighlightedIndex:null,defaultIsOpen:!1,getA11yStatusMessage:j,itemToString:function(e){return null==e?"":String(e)},onStateChange:b,onInputValueChange:b,onUserAction:b,onChange:b,onSelect:b,onOuterClick:b,selectedItemChanged:function(e,t){return e!==t},environment:"undefined"==typeof window?{}:window,stateReducer:function(e,t){return t},suppressRefError:!1,scrollIntoView:v},e.stateChangeTypes=F,e}();w((function(e,t){T(e(),t)}),200),"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?u.useLayoutEffect:u.useEffect;var $={itemToString:function(e){return e?String(e):""},stateReducer:function(e,t){return t.changes},getA11ySelectionMessage:function(e){var t=e.selectedItem,n=e.itemToString;return t?n(t)+" has been selected.":""},scrollIntoView:v,circularNavigation:!1,environment:"undefined"==typeof window?{}:window};c.a.array.isRequired,c.a.func,c.a.func,c.a.func,c.a.bool,c.a.number,c.a.number,c.a.number,c.a.bool,c.a.bool,c.a.bool,c.a.any,c.a.any,c.a.any,c.a.string,c.a.string,c.a.string,c.a.func,c.a.string,c.a.func,c.a.func,c.a.func,c.a.func,c.a.func,c.a.shape({addEventListener:c.a.func,removeEventListener:c.a.func,document:c.a.shape({getElementById:c.a.func,activeElement:c.a.any,body:c.a.any})}),h(h({},$),{getA11yStatusMessage:function(e){var t=e.isOpen,n=e.resultCount,r=e.previousResultCount;return t?n?n!==r?n+" result"+(1===n?" is":"s are")+" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.":"":"No results are available.":""}}),c.a.array.isRequired,c.a.func,c.a.func,c.a.func,c.a.bool,c.a.number,c.a.number,c.a.number,c.a.bool,c.a.bool,c.a.bool,c.a.any,c.a.any,c.a.any,c.a.string,c.a.string,c.a.string,c.a.string,c.a.string,c.a.string,c.a.func,c.a.string,c.a.string,c.a.func,c.a.func,c.a.func,c.a.func,c.a.func,c.a.func,c.a.shape({addEventListener:c.a.func,removeEventListener:c.a.func,document:c.a.shape({getElementById:c.a.func,activeElement:c.a.any,body:c.a.any})}),Object(o.a)({},$,{getA11yStatusMessage:j,circularNavigation:!0}),c.a.array,c.a.array,c.a.array,c.a.func,c.a.func,c.a.func,c.a.number,c.a.number,c.a.number,c.a.func,c.a.func,c.a.string,c.a.string,c.a.shape({addEventListener:c.a.func,removeEventListener:c.a.func,document:c.a.shape({getElementById:c.a.func,activeElement:c.a.any,body:c.a.any})})},168: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 s(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 c,u=[],l=!1,f=-1;function d(){l&&c&&(l=!1,c.length?u=c.concat(u):f=-1,u.length&&p())}function p(){if(!l){var e=s(d);l=!0;for(var t=u.length;t;){for(c=u,u=[];++f1)for(var n=1;n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=T(e,360),t=T(t,100),n=T(n,100),0===t)r=o=i=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=a(c,s,e+1/3),o=a(c,s,e),i=a(c,s,e-1/3)}return{r:255*r,g:255*o,b:255*i}}(e.h,f,p),h=!0,m="hsl"),e.hasOwnProperty("a")&&(c=e.a)),c=M(c),{ok:h,format:e.format||m,r:u(255,l(s.r,0)),g:u(255,l(s.g,0)),b:u(255,l(s.b,0)),a:c}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=c(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=c(this._r)),this._g<1&&(this._g=c(this._g)),this._b<1&&(this._b=c(this._b)),this._ok=n.ok,this._tc_id=s++}function p(e,t,n){e=T(e,255),t=T(t,255),n=T(n,255);var r,o,i=l(e,t,n),a=u(e,t,n),s=(i+a)/2;if(i==a)r=o=0;else{var c=i-a;switch(o=s>.5?c/(2-i-a):c/(i+a),i){case e:r=(t-n)/c+(t>1)+720)%360;--t;)r.h=(r.h+o)%360,i.push(d(r));return i}function A(e,t){t=t||6;for(var n=d(e).toHsv(),r=n.h,o=n.s,i=n.v,a=[],s=1/t;t--;)a.push(d({h:r,s:o,v:i})),i=(i+s)%1;return a}d.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:o.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:o.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:o.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=M(e),this._roundA=c(100*this._a)/100,this},toHsv:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=h(this._r,this._g,this._b),t=c(360*e.h),n=c(100*e.s),r=c(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=p(this._r,this._g,this._b),t=c(360*e.h),n=c(100*e.s),r=c(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return m(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var i=[L(c(e).toString(16)),L(c(t).toString(16)),L(c(n).toString(16)),L(N(r))];return o&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)&&i[3].charAt(0)==i[3].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:c(this._r),g:c(this._g),b:c(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+c(this._r)+", "+c(this._g)+", "+c(this._b)+")":"rgba("+c(this._r)+", "+c(this._g)+", "+c(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:c(100*T(this._r,255))+"%",g:c(100*T(this._g,255))+"%",b:c(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+c(100*T(this._r,255))+"%, "+c(100*T(this._g,255))+"%, "+c(100*T(this._b,255))+"%)":"rgba("+c(100*T(this._r,255))+"%, "+c(100*T(this._g,255))+"%, "+c(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=d(e);n="#"+g(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return d(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(w,arguments)},brighten:function(){return this._applyModification(O,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(j,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(C,arguments)},triad:function(){return this._applyCombination(k,arguments)},tetrad:function(){return this._applyCombination(E,arguments)}},d.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:H(e[r]));e=n}return d(e,t)},d.equals=function(e,t){return!(!e||!t)&&d(e).toRgbString()==d(t).toRgbString()},d.random=function(){return d.fromRatio({r:f(),g:f(),b:f()})},d.mix=function(e,t,n){n=0===n?0:n||50;var r=d(e).toRgb(),o=d(t).toRgb(),i=n/100;return d({r:(o.r-r.r)*i+r.r,g:(o.g-r.g)*i+r.g,b:(o.b-r.b)*i+r.b,a:(o.a-r.a)*i+r.a})},d.readability=function(e,t){var n=d(e),r=d(t);return(o.max(n.getLuminance(),r.getLuminance())+.05)/(o.min(n.getLuminance(),r.getLuminance())+.05)},d.isReadable=function(e,t,n){var r,o,i,a,s,c=d.readability(e,t);switch(o=!1,(i=n,"AA"!==(a=((i=i||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(i.size||"small").toLowerCase())&&"large"!==s&&(s="small"),r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":o=c>=4.5;break;case"AAlarge":o=c>=3;break;case"AAAsmall":o=c>=7}return o},d.mostReadable=function(e,t,n){var r,o,i,a,s=null,c=0;o=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;for(var u=0;uc&&(c=r,s=d(t[u]));return d.isReadable(e,s,{level:i,size:a})||!o?s:(n.includeFallbackColors=!1,d.mostReadable(e,["#fff","#000"],n))};var I=d.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},P=d.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(I);function M(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=u(t,l(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),o.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function R(e){return u(1,l(0,e))}function F(e){return parseInt(e,16)}function L(e){return 1==e.length?"0"+e:""+e}function H(e){return e<=1&&(e=100*e+"%"),e}function N(e){return o.round(255*parseFloat(e)).toString(16)}function D(e){return F(e)/255}var V,z,$,B=(z="[\\s|\\(]+("+(V="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",$="[\\s|\\(]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")[,|\\s]+("+V+")\\s*\\)?",{CSS_UNIT:new RegExp(V),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+$),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+$),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+$),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function W(e){return!!B.CSS_UNIT.exec(e)}e.exports?e.exports=d:void 0===(r=function(){return d}.call(t,n,t,e))||(e.exports=r)}(Math)},188:function(e,t,n){"use strict";var r=n(22),o=n(0),i=n(18),a=function({icon:e,className:t,...n}){const i=["dashicon","dashicons","dashicons-"+e,t].filter(Boolean).join(" ");return Object(o.createElement)("span",Object(r.a)({className:i},n))};t.a=function({icon:e=null,size:t=24,...n}){if("string"==typeof e)return Object(o.createElement)(a,Object(r.a)({icon:e},n));if(Object(o.isValidElement)(e)&&a===e.type)return Object(o.cloneElement)(e,{...n});if("function"==typeof e)return e.prototype instanceof o.Component?Object(o.createElement)(e,{size:t,...n}):e({size:t,...n});if(e&&("svg"===e.type||e.type===i.SVG)){const r={width:t,height:t,...e.props,...n};return Object(o.createElement)(i.SVG,r)}return Object(o.isValidElement)(e)?Object(o.cloneElement)(e,{size:t,...n}):e}},195:function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;tObject(r.useContext)(o)},198:function(e,t,n){"use strict";var r=n(0),o=n(4),i=n.n(o),a=n(135),s=n(72),c=n(6),u={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function l(e){return Object(c.get)(u,e,"")}var f=n(123),d=n(62);const p=Object(s.a)("div",{target:"e1puf3u3"})("font-family:",l("default.fontFamily"),";font-size:",l("default.fontSize"),";"),h=Object(s.a)("div",{target:"e1puf3u2"})("margin-bottom:",Object(d.a)(2),";.components-panel__row &{margin-bottom:inherit;}"),m=Object(s.a)("label",{target:"e1puf3u1"})("display:inline-block;margin-bottom:",Object(d.a)(2),";"),g=Object(s.a)("p",{target:"e1puf3u0"})("font-size:",l("helpText.fontSize"),";font-style:normal;color:",f.a.mediumGray.text,";");function b({id:e,label:t,hideLabelFromVision:n,help:o,className:s,children:c}){return Object(r.createElement)(p,{className:i()("components-base-control",s)},Object(r.createElement)(h,{className:"components-base-control__field"},t&&e&&(n?Object(r.createElement)(a.a,{as:"label",htmlFor:e},t):Object(r.createElement)(m,{className:"components-base-control__label",htmlFor:e},t)),t&&!e&&(n?Object(r.createElement)(a.a,{as:"label"},t):Object(r.createElement)(b.VisualLabel,null,t)),c),!!o&&Object(r.createElement)(g,{id:e+"__help",className:"components-base-control__help"},o))}b.VisualLabel=({className:e,children:t})=>(e=i()("components-base-control__label",e),Object(r.createElement)("span",{className:e},t)),t.a=b},22:function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}for(var a=i,s=!1,c=0;c=p.startTime+u.duration;else if(u.decay)g=h+y/(1-.998)*(1-Math.exp(-(1-.998)*(t-p.startTime))),(l=Math.abs(p.lastPosition-g)<.1)&&(m=g);else{f=void 0!==p.lastTime?p.lastTime:t,y=void 0!==p.lastVelocity?p.lastVelocity:u.initialVelocity,t>f+64&&(f=t);for(var w=Math.floor(t-f),O=0;Om:g=e);++n);return n-1}(e,i);return function(e,t,n,r,o,i,a,s,c){var u=c?c(e):e;if(un){if("identity"===s)return u;"clamp"===s&&(u=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?u=-u:n===1/0?u-=t:u=(u-t)/(n-t),u=i(u),r===-1/0?u=-u:o===1/0?u+=r:u=u*(o-r)+r,u)}(e,i[t],i[t+1],o[t],o[t+1],c,a,s,r.map)}}var V=function(e){function t(n,r,o,i){var a;return(a=e.call(this)||this).calc=void 0,a.payload=n instanceof y&&!(n instanceof t)?n.getPayload():Array.isArray(n)?n:[n],a.calc=D(r,o,i),a}c(t,e);var n=t.prototype;return n.getValue=function(){return this.calc.apply(this,this.payload.map((function(e){return e.getValue()})))},n.updateConfig=function(e,t,n){this.calc=D(e,t,n)},n.interpolate=function(e,n,r){return new t(this,e,n,r)},t}(y),z=function(e){function t(t){var n;return(n=e.call(this)||this).animatedStyles=new Set,n.value=void 0,n.startPosition=void 0,n.lastPosition=void 0,n.lastVelocity=void 0,n.startTime=void 0,n.lastTime=void 0,n.done=!1,n.setValue=function(e,t){void 0===t&&(t=!0),n.value=e,t&&n.flush()},n.value=t,n.startPosition=t,n.lastPosition=t,n}c(t,e);var n=t.prototype;return n.flush=function(){0===this.animatedStyles.size&&function e(t,n){"update"in t?n.add(t):t.getChildren().forEach((function(t){return e(t,n)}))}(this,this.animatedStyles),this.animatedStyles.forEach((function(e){return e.update()}))},n.clearStyles=function(){this.animatedStyles.clear()},n.getValue=function(){return this.value},n.interpolate=function(e,t,n){return new V(this,e,t,n)},t}(v),$=function(e){function t(t){var n;return(n=e.call(this)||this).payload=t.map((function(e){return new z(e)})),n}c(t,e);var n=t.prototype;return n.setValue=function(e,t){var n=this;void 0===t&&(t=!0),Array.isArray(e)?e.length===this.payload.length&&e.forEach((function(e,r){return n.payload[r].setValue(e,t)})):this.payload.forEach((function(n){return n.setValue(e,t)}))},n.getValue=function(){return this.payload.map((function(e){return e.getValue()}))},n.interpolate=function(e,t){return new V(this,e,t)},t}(y),B=0,W=function(){function e(){var e=this;this.id=void 0,this.idle=!0,this.hasChanged=!1,this.guid=0,this.local=0,this.props={},this.merged={},this.animations={},this.interpolations={},this.values={},this.configs=[],this.listeners=[],this.queue=[],this.localQueue=void 0,this.getValues=function(){return e.interpolations},this.id=B++}var t=e.prototype;return t.update=function(e){if(!e)return this;var t=m(e),n=t.delay,r=void 0===n?0:n,a=t.to,s=i(t,["delay","to"]);if(l.arr(a)||l.fun(a))this.queue.push(o({},s,{delay:r,to:a}));else if(a){var c={};Object.entries(a).forEach((function(e){var t,n=e[0],i=e[1],a=o({to:(t={},t[n]=i,t),delay:h(r,n)},s),u=c[a.delay]&&c[a.delay].to;c[a.delay]=o({},c[a.delay],a,{to:o({},u,a.to)})})),this.queue=Object.values(c)}return this.queue=this.queue.sort((function(e,t){return e.delay-t.delay})),this.diff(s),this},t.start=function(e){var t=this;if(this.queue.length){this.idle=!1,this.localQueue&&this.localQueue.forEach((function(e){var n=e.from,r=void 0===n?{}:n,i=e.to,a=void 0===i?{}:i;l.obj(r)&&(t.merged=o({},r,t.merged)),l.obj(a)&&(t.merged=o({},t.merged,a))}));var n=this.local=++this.guid,r=this.localQueue=this.queue;this.queue=[],r.forEach((function(o,a){var s=o.delay,c=i(o,["delay"]),u=function(o){a===r.length-1&&n===t.guid&&o&&(t.idle=!0,t.props.onRest&&t.props.onRest(t.merged)),e&&e()},f=l.arr(c.to)||l.fun(c.to);s?setTimeout((function(){n===t.guid&&(f?t.runAsync(c,u):t.diff(c).start(u))}),s):f?t.runAsync(c,u):t.diff(c).start(u)}))}else l.fun(e)&&this.listeners.push(e),this.props.onStart&&this.props.onStart(),this,H.has(this)||H.add(this),L||(L=!0,S(P||N));return this},t.stop=function(e){return this.listeners.forEach((function(t){return t(e)})),this.listeners=[],this},t.pause=function(e){return this.stop(!0),e&&(this,H.has(this)&&H.delete(this)),this},t.runAsync=function(e,t){var n=this,r=(e.delay,i(e,["delay"])),a=this.local,s=Promise.resolve(void 0);if(l.arr(r.to))for(var c=function(e){var t=e,i=o({},r,m(r.to[t]));l.arr(i.config)&&(i.config=i.config[t]),s=s.then((function(){if(a===n.guid)return new Promise((function(e){return n.diff(i).start(e)}))}))},u=0;u=r.length)return"break";a=r[i++]}else{if((i=r.next()).done)return"break";a=i.value}var n=a.key,s=function(e){return e.key!==n};(l.und(t)||t===n)&&(e.current.instances.delete(n),e.current.transitions=e.current.transitions.filter(s),e.current.deleted=e.current.deleted.filter(s))},r=e.current.deleted,o=Array.isArray(r),i=0;for(r=o?r:r[Symbol.iterator]();;){var a;if("break"===n())break}e.current.forceUpdate()}var Y=function(e){function t(t){var n;return void 0===t&&(t={}),n=e.call(this)||this,!t.transform||t.transform instanceof v||(t=g.transform(t)),n.payload=t,n}return c(t,e),t}(w),Z={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},J="[-+]?\\d*\\.?\\d+";function Q(){for(var e=arguments.length,t=new Array(e),n=0;n1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ue(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=ce(o,r,e+1/3),a=ce(o,r,e),s=ce(o,r,e-1/3);return Math.round(255*i)<<24|Math.round(255*a)<<16|Math.round(255*s)<<8}function le(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function fe(e){return(parseFloat(e)%360+360)%360/360}function de(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function pe(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function he(e){var t,n,r="number"==typeof(t=e)?t>>>0===t&&t>=0&&t<=4294967295?t:null:(n=ae.exec(t))?parseInt(n[1]+"ff",16)>>>0:Z.hasOwnProperty(t)?Z[t]:(n=ee.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|255)>>>0:(n=te.exec(t))?(le(n[1])<<24|le(n[2])<<16|le(n[3])<<8|de(n[4]))>>>0:(n=oe.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+"ff",16)>>>0:(n=se.exec(t))?parseInt(n[1],16)>>>0:(n=ie.exec(t))?parseInt(n[1]+n[1]+n[2]+n[2]+n[3]+n[3]+n[4]+n[4],16)>>>0:(n=ne.exec(t))?(255|ue(fe(n[1]),pe(n[2]),pe(n[3])))>>>0:(n=re.exec(t))?(ue(fe(n[1]),pe(n[2]),pe(n[3]))|de(n[4]))>>>0:null;return null===r?e:"rgba("+((4278190080&(r=r||0))>>>24)+", "+((16711680&r)>>>16)+", "+((65280&r)>>>8)+", "+(255&r)/255+")"}var me=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,ge=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,be=new RegExp("("+Object.keys(Z).join("|")+")","g"),ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ye=["Webkit","Ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ve.hasOwnProperty(e)&&ve[e]?(""+t).trim():t+"px"}ve=Object.keys(ve).reduce((function(e,t){return ye.forEach((function(n){return e[function(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}(n,t)]=e[t]})),e}),ve);var Oe={};T((function(e){return new Y(e)})),A("div"),E((function(e){var t=e.output.map((function(e){return e.replace(ge,he)})).map((function(e){return e.replace(be,he)})),n=t[0].match(me).map((function(){return[]}));t.forEach((function(e){e.match(me).forEach((function(e,t){return n[t].push(+e)}))}));var r=t[0].match(me).map((function(t,r){return D(o({},e,{output:n[r]}))}));return function(e){var n=0;return t[0].replace(me,(function(){return r[n++](e)})).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(function(e,t,n,r,o){return"rgba("+Math.round(t)+", "+Math.round(n)+", "+Math.round(r)+", "+o+")"}))}})),x(Z),O((function(e,t){if(!e.nodeType||void 0===e.setAttribute)return!1;var n=t.style,r=t.children,o=t.scrollTop,a=t.scrollLeft,s=i(t,["style","children","scrollTop","scrollLeft"]),c="filter"===e.nodeName||e.parentNode&&"filter"===e.parentNode.nodeName;for(var u in void 0!==o&&(e.scrollTop=o),void 0!==a&&(e.scrollLeft=a),void 0!==r&&(e.textContent=r),n)if(n.hasOwnProperty(u)){var l=0===u.indexOf("--"),f=we(u,n[u],l);"float"===u&&(u="cssFloat"),l?e.style.setProperty(u,f):e.style[u]=f}for(var d in s){var p=c?d:Oe[d]||(Oe[d]=d.replace(/([A-Z])/g,(function(e){return"-"+e.toLowerCase()})));void 0!==e.getAttribute(p)&&e.setAttribute(p,s[d])}}),(function(e){return e}));var xe,je,Se=(xe=function(e){return a.forwardRef((function(t,n){var r=f(),c=a.useRef(!0),u=a.useRef(null),d=a.useRef(null),p=a.useCallback((function(e){var t=u.current;u.current=new F(e,(function(){var e=!1;d.current&&(e=g.fn(d.current,u.current.getAnimatedValue())),d.current&&!1!==e||r()})),t&&t.detach()}),[]);a.useEffect((function(){return function(){c.current=!1,u.current&&u.current.detach()}}),[]),a.useImperativeHandle(n,(function(){return M(d,c,r)})),p(t);var h,m=u.current.getValue(),b=(m.scrollTop,m.scrollLeft,i(m,["scrollTop","scrollLeft"])),v=(h=e,!l.fun(h)||h.prototype instanceof s.Component?function(e){return d.current=function(e,t){return t&&(l.fun(t)?t(e):l.obj(t)&&(t.current=e)),e}(e,n)}:void 0);return s.createElement(e,o({},b,{ref:v}))}))},void 0===(je=!1)&&(je=!0),function(e){return(l.arr(e)?e:Object.keys(e)).reduce((function(e,t){var n=je?t[0].toLowerCase()+t.substring(1):t;return e[n]=xe(n),e}),xe)}),ke=Se(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]);t.apply=Se,t.config={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},t.update=N,t.animated=ke,t.a=ke,t.interpolate=function(e,t,n){return e&&new V(e,t,n)},t.Globals=R,t.useSpring=function(e){var t=l.fun(e),n=U(1,t?e:[e]),r=n[0],o=n[1],i=n[2];return t?[r[0],o,i]:r},t.useTrail=function(e,t){var n=a.useRef(!1),r=l.fun(t),i=h(t),s=a.useRef(),c=U(e,(function(e,t){return 0===e&&(s.current=[]),s.current.push(t),o({},i,{config:h(i.config,e),attach:e>0&&function(){return s.current[e-1]}})})),u=c[0],f=c[1],d=c[2],p=a.useMemo((function(){return function(e){return f((function(t,n){e.reverse;var r=e.reverse?t+1:t-1,a=s.current[r];return o({},e,{config:h(e.config||i.config,t),attach:a&&function(){return a}})}))}}),[e,i.reverse]);return a.useEffect((function(){n.current&&!r&&p(t)})),a.useEffect((function(){n.current=!0}),[]),r?[u,p,d]:u},t.useTransition=function(e,t,n){var r=o({items:e,keys:t||function(e){return e}},n),s=K(r),c=s.lazy,u=void 0!==c&&c,l=(s.unique,s.reset),d=void 0!==l&&l,p=(s.enter,s.leave,s.update,s.onDestroyed),m=(s.keys,s.items,s.onFrame),g=s.onRest,b=s.onStart,v=s.ref,y=i(s,["lazy","unique","reset","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","ref"]),w=f(),O=a.useRef(!1),x=a.useRef({mounted:!1,first:!0,deleted:[],current:{},transitions:[],prevProps:{},paused:!!r.ref,instances:!O.current&&new Map,forceUpdate:w});return a.useImperativeHandle(r.ref,(function(){return{start:function(){return Promise.all(Array.from(x.current.instances).map((function(e){var t=e[1];return new Promise((function(e){return t.start(e)}))})))},stop:function(e){return Array.from(x.current.instances).forEach((function(t){return t[1].stop(e)}))},get controllers(){return Array.from(x.current.instances).map((function(e){return e[1]}))}}})),x.current=function(e,t){for(var n=e.first,r=e.prevProps,a=i(e,["first","prevProps"]),s=K(t),c=s.items,u=s.keys,l=s.initial,f=s.from,d=s.enter,p=s.leave,m=s.update,g=s.trail,b=void 0===g?0:g,v=s.unique,y=s.config,w=s.order,O=void 0===w?["enter","leave","update"]:w,x=K(r),j=x.keys,S=x.items,k=o({},a.current),E=[].concat(a.deleted),C=Object.keys(k),_=new Set(C),A=new Set(u),I=u.filter((function(e){return!_.has(e)})),P=a.transitions.filter((function(e){return!e.destroyed&&!A.has(e.originalKey)})).map((function(e){return e.originalKey})),M=u.filter((function(e){return _.has(e)})),T=-b;O.length;)switch(O.shift()){case"enter":I.forEach((function(e,t){v&&E.find((function(t){return t.originalKey===e}))&&(E=E.filter((function(t){return t.originalKey!==e})));var r=u.indexOf(e),o=c[r],i=n&&void 0!==l?"initial":"enter";k[e]={slot:i,originalKey:e,key:v?String(e):q++,item:o,trail:T+=b,config:h(y,o,i),from:h(n&&void 0!==l?l||{}:f,o),to:h(d,o)}}));break;case"leave":P.forEach((function(e){var t=j.indexOf(e),n=S[t];E.unshift(o({},k[e],{slot:"leave",destroyed:!0,left:j[Math.max(0,t-1)],right:j[Math.min(j.length,t+1)],trail:T+=b,config:h(y,n,"leave"),to:h(p,n)})),delete k[e]}));break;case"update":M.forEach((function(e){var t=u.indexOf(e),n=c[t];k[e]=o({},k[e],{item:n,slot:"update",trail:T+=b,config:h(y,n,"update"),to:h(m,n)})}))}var R=u.map((function(e){return k[e]}));return E.forEach((function(e){var t,n=e.left,r=(e.right,i(e,["left","right"]));-1!==(t=R.findIndex((function(e){return e.originalKey===n})))&&(t+=1),t=Math.max(0,t),R=[].concat(R.slice(0,t),[r],R.slice(t))})),o({},a,{changed:I.length||P.length||M.length,first:n&&0===I.length,transitions:R,current:k,deleted:E,prevProps:t})}(x.current,r),x.current.changed&&x.current.transitions.forEach((function(e){var t=e.slot,n=e.from,r=e.to,i=e.config,a=e.trail,s=e.key,c=e.item;x.current.instances.has(s)||x.current.instances.set(s,new W);var l=x.current.instances.get(s),f=o({},y,{to:r,from:n,config:i,ref:v,onRest:function(n){x.current.mounted&&(e.destroyed&&(v||u||X(x,s),p&&p(c)),!Array.from(x.current.instances).some((function(e){return!e[1].idle}))&&(v||u)&&x.current.deleted.length>0&&X(x),g&&g(c,t,n))},onStart:b&&function(){return b(c,t)},onFrame:m&&function(e){return m(c,t,e)},delay:a,reset:d&&"enter"===t});l.update(f),x.current.paused||l.start()})),a.useEffect((function(){return x.current.mounted=O.current=!0,function(){x.current.mounted=O.current=!1,Array.from(x.current.instances).map((function(e){return e[1].destroy()})),x.current.instances.clear()}}),[]),x.current.transitions.map((function(e){var t=e.item,n=e.slot,r=e.key;return{item:t,key:r,state:n,props:x.current.instances.get(r).getValues()}}))},t.useChain=function(e,t,n){void 0===n&&(n=1e3);var r=a.useRef();a.useEffect((function(){l.equ(e,r.current)?e.forEach((function(e){var t=e.current;return t&&t.start()})):t?e.forEach((function(e,r){var i=e.current;if(i){var a=i.controllers;if(a.length){var s=n*t[r];a.forEach((function(e){e.queue=e.queue.map((function(e){return o({},e,{delay:e.delay+s})})),e.start()}))}}})):e.reduce((function(e,t,n){var r=t.current;return e.then((function(){return r.start()}))}),Promise.resolve()),r.current=e}))},t.useSprings=U},24: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},243:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(8),o=n(116);function i(e,t){return e===t}function a(e){return"function"==typeof e?function(){return e}:e}function s(e,t,n){var s=n&&n.equalityFn||i,c=function(e){var t=Object(r.useState)(a(e)),n=t[0],o=t[1];return[n,Object(r.useCallback)((function(e){return o(a(e))}),[])]}(e),u=c[0],l=c[1],f=Object(o.a)(Object(r.useCallback)((function(e){return l(e)}),[l]),t,n),d=Object(r.useRef)(e);return s(d.current,e)||(f(e),d.current=e),[u,f]}},270:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(0),o=n(6);n(91);const i=Object(r.createContext)({}),a=()=>Object(r.useContext)(i);function s({value:t}){const n=a(),i=Object(r.useRef)(t);return function(n,a){const s=Object(r.useRef)(!1);Object(r.useEffect)(()=>{s.current?Object(o.isEqual)(i.current,t)&&i.current!==t&&void 0!==e&&e.env:s.current=!0},a)}(0,[t]),Object(r.useMemo)(()=>Object(o.merge)(Object(o.cloneDeep)(n),t),[n,t])}Object(r.memo)(({children:e,value:t})=>{const n=s({value:t});return Object(r.createElement)(i.Provider,{value:n},e)})}).call(this,n(168))},271:function(e,t){e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.defineProperty(t,"combineChunks",{enumerable:!0,get:function(){return r.combineChunks}}),Object.defineProperty(t,"fillInChunks",{enumerable:!0,get:function(){return r.fillInChunks}}),Object.defineProperty(t,"findAll",{enumerable:!0,get:function(){return r.findAll}}),Object.defineProperty(t,"findChunks",{enumerable:!0,get:function(){return r.findChunks}})},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=function(e){var t=e.autoEscape,i=e.caseSensitive,a=void 0!==i&&i,s=e.findChunks,c=void 0===s?r:s,u=e.sanitize,l=e.searchWords,f=e.textToHighlight;return o({chunksToHighlight:n({chunks:c({autoEscape:t,caseSensitive:a,sanitize:u,searchWords:l,textToHighlight:f})}),totalLength:f?f.length:0})};var n=t.combineChunks=function(e){var t=e.chunks;return t.sort((function(e,t){return e.start-t.start})).reduce((function(e,t){if(0===e.length)return[t];var n=e.pop();if(t.start<=n.end){var r=Math.max(n.end,t.end);e.push({highlight:!1,start:n.start,end:r})}else e.push(n,t);return e}),[])},r=function(e){var t=e.autoEscape,n=e.caseSensitive,r=e.sanitize,o=void 0===r?i:r,a=e.searchWords,s=e.textToHighlight;return s=o(s),a.filter((function(e){return e})).reduce((function(e,r){r=o(r),t&&(r=r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"));for(var i=new RegExp(r,n?"g":"gi"),a=void 0;a=i.exec(s);){var c=a.index,u=i.lastIndex;u>c&&e.push({highlight:!1,start:c,end:u}),a.index===i.lastIndex&&i.lastIndex++}return e}),[])};t.findChunks=r;var o=t.fillInChunks=function(e){var t=e.chunksToHighlight,n=e.totalLength,r=[],o=function(e,t,n){t-e>0&&r.push({start:e,end:t,highlight:n})};if(0===t.length)o(0,n,!1);else{var i=0;t.forEach((function(e){o(i,e.start,!1),o(e.start,e.end,!0),i=e.end})),o(i,n,!1)}return r};function i(e){return e}}])},272:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(45),o=n(466),i=n(197),a=n(147);function s(e){const{className:t,display:n,isBlock:s=!1,...c}=Object(o.a)(e,"FlexItem"),u={},l=Object(i.b)().flexItemDisplay;return u.Base=Object(r.a)({display:n||l},"",""),{...c,className:Object(r.b)(a.b,u.Base,s&&a.e,t)}}},278:function(e,t,n){"use strict";(function(e){var r=n(0),o=n(6),i=n(4),a=n.n(i),s=n(46),c=n(1),u=(n(91),n(137));t.a=Object(r.forwardRef)((function({className:t,children:n,spokenMessage:i=n,politeness:l="polite",actions:f=[],onRemove:d=o.noop,icon:p=null,explicitDismiss:h=!1,onDismiss:m=o.noop},g){function b(e){e&&e.preventDefault&&e.preventDefault(),m(),d()}m=m||o.noop,function(e,t){const n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)(()=>{n&&Object(s.speak)(n,t)},[n,t])}(i,l),Object(r.useEffect)(()=>{const e=setTimeout(()=>{h||(m(),d())},1e4);return()=>clearTimeout(e)},[m,d]);const v=a()(t,"components-snackbar",{"components-snackbar-explicit-dismiss":!!h});f&&f.length>1&&(void 0!==e&&e.env,f=[f[0]]);const y=a()("components-snackbar__content",{"components-snackbar__content-with-icon":!!p});return Object(r.createElement)("div",{ref:g,className:v,onClick:h?o.noop:b,tabIndex:"0",role:h?"":"button",onKeyPress:h?o.noop:b,"aria-label":h?"":Object(c.__)("Dismiss this notice")},Object(r.createElement)("div",{className:y},p&&Object(r.createElement)("div",{className:"components-snackbar__icon"},p),n,f.map(({label:e,onClick:t,url:n},o)=>Object(r.createElement)(u.a,{key:o,href:n,variant:"tertiary",onClick:e=>function(e,t){e.stopPropagation(),d(),t&&t(e)}(e,t),className:"components-snackbar__action"},e)),h&&Object(r.createElement)("span",{role:"button","aria-label":"Dismiss this notice",tabIndex:"0",className:"components-snackbar__dismiss-button",onClick:b,onKeyPress:b},"✕")))}))}).call(this,n(168))},279:function(e,t,n){"use strict";e.exports=n(395)},319:function(e,t,n){"use strict";var r=n(320);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var s=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 s.name="Invariant Violation",s}}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:i,resetWarningCache:o};return n.PropTypes=n,n}},320:function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},357:function(e,t,n){"use strict";e.exports=n(358)},358:function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,m=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,b=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case d:case a:case c:case s:case h:return e;default:switch(e=e&&e.$$typeof){case l:case p:case b:case g:case u:return e;default:return t}}case i:return t}}}function j(e){return x(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=u,t.Element=o,t.ForwardRef=p,t.Fragment=a,t.Lazy=b,t.Memo=g,t.Portal=i,t.Profiler=c,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return j(e)||x(e)===f},t.isConcurrentMode=j,t.isContextConsumer=function(e){return x(e)===l},t.isContextProvider=function(e){return x(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return x(e)===p},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===b},t.isMemo=function(e){return x(e)===g},t.isPortal=function(e){return x(e)===i},t.isProfiler=function(e){return x(e)===c},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===c||e===s||e===h||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===b||e.$$typeof===g||e.$$typeof===u||e.$$typeof===l||e.$$typeof===p||e.$$typeof===y||e.$$typeof===w||e.$$typeof===O||e.$$typeof===v)},t.typeOf=x},372:function(e,t,n){"use strict";var r=60103,o=60106,i=60107,a=60108,s=60114,c=60109,u=60110,l=60112,f=60113,d=60120,p=60115,h=60116,m=60121,g=60122,b=60117,v=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),i=w("react.fragment"),a=w("react.strict_mode"),s=w("react.profiler"),c=w("react.provider"),u=w("react.context"),l=w("react.forward_ref"),f=w("react.suspense"),d=w("react.suspense_list"),p=w("react.memo"),h=w("react.lazy"),m=w("react.block"),g=w("react.server.block"),b=w("react.fundamental"),v=w("react.debug_trace_mode"),y=w("react.legacy_hidden")}function O(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case f:case d:return e;default:switch(e=e&&e.$$typeof){case u:case l:case h:case p:case c:return e;default:return t}}case o:return t}}}var x=c,j=r,S=l,k=i,E=h,C=p,_=o,A=s,I=a,P=f;t.ContextConsumer=u,t.ContextProvider=x,t.Element=j,t.ForwardRef=S,t.Fragment=k,t.Lazy=E,t.Memo=C,t.Portal=_,t.Profiler=A,t.StrictMode=I,t.Suspense=P,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return O(e)===u},t.isContextProvider=function(e){return O(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return O(e)===l},t.isFragment=function(e){return O(e)===i},t.isLazy=function(e){return O(e)===h},t.isMemo=function(e){return O(e)===p},t.isPortal=function(e){return O(e)===o},t.isProfiler=function(e){return O(e)===s},t.isStrictMode=function(e){return O(e)===a},t.isSuspense=function(e){return O(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===s||e===v||e===a||e===f||e===d||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===c||e.$$typeof===u||e.$$typeof===l||e.$$typeof===b||e.$$typeof===m||e[0]===g)},t.typeOf=O},389:function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0},390:function(e,t,n){var r=n(391);e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},391: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},392: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},395:function(e,t,n){"use strict";var r=n(396);e.exports=function(e,t,n){n=n||{},9===t.nodeType&&(t=r.getWindow(t));var o=n.allowHorizontalScroll,i=n.onlyScrollIfNeeded,a=n.alignWithTop,s=n.alignWithLeft,c=n.offsetTop||0,u=n.offsetLeft||0,l=n.offsetBottom||0,f=n.offsetRight||0;o=void 0===o||o;var d=r.isWindow(t),p=r.offset(e),h=r.outerHeight(e),m=r.outerWidth(e),g=void 0,b=void 0,v=void 0,y=void 0,w=void 0,O=void 0,x=void 0,j=void 0,S=void 0,k=void 0;d?(x=t,k=r.height(x),S=r.width(x),j={left:r.scrollLeft(x),top:r.scrollTop(x)},w={left:p.left-j.left-u,top:p.top-j.top-c},O={left:p.left+m-(j.left+S)+f,top:p.top+h-(j.top+k)+l},y=j):(g=r.offset(t),b=t.clientHeight,v=t.clientWidth,y={left:t.scrollLeft,top:t.scrollTop},w={left:p.left-(g.left+(parseFloat(r.css(t,"borderLeftWidth"))||0))-u,top:p.top-(g.top+(parseFloat(r.css(t,"borderTopWidth"))||0))-c},O={left:p.left+m-(g.left+v+(parseFloat(r.css(t,"borderRightWidth"))||0))+f,top:p.top+h-(g.top+b+(parseFloat(r.css(t,"borderBottomWidth"))||0))+l}),w.top<0||O.top>0?!0===a?r.scrollTop(t,y.top+w.top):!1===a?r.scrollTop(t,y.top+O.top):w.top<0?r.scrollTop(t,y.top+w.top):r.scrollTop(t,y.top+O.top):i||((a=void 0===a||!!a)?r.scrollTop(t,y.top+w.top):r.scrollTop(t,y.top+O.top)),o&&(w.left<0||O.left>0?!0===s?r.scrollLeft(t,y.left+w.left):!1===s?r.scrollLeft(t,y.left+O.left):w.left<0?r.scrollLeft(t,y.left+w.left):r.scrollLeft(t,y.left+O.left):i||((s=void 0===s||!!s)?r.scrollLeft(t,y.left+w.left):r.scrollLeft(t,y.left+O.left)))}},396:function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;tc(e).includes(t)))}}).call(this,n(168))},469:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(22),o=n(0),i=n(468),a=n(467);const s=({as:e,name:t,useHook:n,memo:s=!1})=>{function c(t,i){const s=n(t);return Object(o.createElement)(a.a,Object(r.a)({as:e||"div"},s,{ref:i}))}return c.displayName=t,Object(i.a)(c,t,{memo:s})}},478:function(e,t,n){"use strict";var r=n(0);t.a=function(e){let{icon:t,size:n=24,...o}=e;return Object(r.cloneElement)(t,{width:n,height:n,...o})}},479:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21ZM15.5303 8.46967C15.8232 8.76256 15.8232 9.23744 15.5303 9.53033L13.0607 12L15.5303 14.4697C15.8232 14.7626 15.8232 15.2374 15.5303 15.5303C15.2374 15.8232 14.7626 15.8232 14.4697 15.5303L12 13.0607L9.53033 15.5303C9.23744 15.8232 8.76256 15.8232 8.46967 15.5303C8.17678 15.2374 8.17678 14.7626 8.46967 14.4697L10.9393 12L8.46967 9.53033C8.17678 9.23744 8.17678 8.76256 8.46967 8.46967C8.76256 8.17678 9.23744 8.17678 9.53033 8.46967L12 10.9393L14.4697 8.46967C14.7626 8.17678 15.2374 8.17678 15.5303 8.46967Z"}));t.a=i},480:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"}));t.a=i},481:function(e,t,n){"use strict";var r=n(0),o=n(6),i=n(4),a=n.n(i),s=n(1),c=n(46),u=n(465),l=n(137);function f(e){switch(e){case"success":case"warning":case"info":return"polite";case"error":default:return"assertive"}}t.a=function({className:e,status:t="info",children:n,spokenMessage:i=n,onRemove:d=o.noop,isDismissible:p=!0,actions:h=[],politeness:m=f(t),__unstableHTML:g,onDismiss:b=o.noop}){!function(e,t){const n="string"==typeof e?e:Object(r.renderToString)(e);Object(r.useEffect)(()=>{n&&Object(c.speak)(n,t)},[n,t])}(i,m);const v=a()(e,"components-notice","is-"+t,{"is-dismissible":p});return g&&(n=Object(r.createElement)(r.RawHTML,null,n)),Object(r.createElement)("div",{className:v},Object(r.createElement)("div",{className:"components-notice__content"},n,Object(r.createElement)("div",{className:"components-notice__actions"},h.map(({className:e,label:t,isPrimary:n,variant:o,noDefaultClasses:i=!1,onClick:s,url:c},u)=>{let f=o;return"primary"===o||i||(f=c?"link":"secondary"),void 0===f&&n&&(f="primary"),Object(r.createElement)(l.a,{key:u,href:c,variant:f,onClick:c?void 0:s,className:a()("components-notice__action",e)},t)}))),p&&Object(r.createElement)(l.a,{className:"components-notice__dismiss",icon:u.a,label:Object(s.__)("Dismiss this notice"),onClick:e=>{var t;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),b(),d()},showTooltip:!1}))}},482:function(e,t,n){"use strict";var r=n(469),o=n(272);const i=Object(r.a)({as:"div",useHook:o.a,name:"FlexItem"});t.a=i},483:function(e,t,n){"use strict";var r=n(22),o=n(0),i=n(4),a=n.n(i),s=n(9),c=n(188);t.a=function({icon:e,children:t,label:n,instructions:i,className:u,notices:l,preview:f,isColumnLayout:d,...p}){const[h,{width:m}]=Object(s.useResizeObserver)();let g;"number"==typeof m&&(g={"is-large":m>=480,"is-medium":m>=160&&m<480,"is-small":m<160});const b=a()("components-placeholder",u,g),v=a()("components-placeholder__fieldset",{"is-column-layout":d});return Object(o.createElement)("div",Object(r.a)({},p,{className:b}),h,l,f&&Object(o.createElement)("div",{className:"components-placeholder__preview"},f),Object(o.createElement)("div",{className:"components-placeholder__label"},Object(o.createElement)(c.a,{icon:e}),n),!!i&&Object(o.createElement)("div",{className:"components-placeholder__instructions"},i),Object(o.createElement)("div",{className:v},t))}},484:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M19 6H6c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM6 17.5c-.3 0-.5-.2-.5-.5V8c0-.3.2-.5.5-.5h3v10H6zm13.5-.5c0 .3-.2.5-.5.5h-3v-10h3c.3 0 .5.2.5.5v9z"}));t.a=i},485:function(e,t,n){"use strict";var r=n(22),o=n(0),i=n(4),a=n.n(i),s=n(6),c=n(239),u=n(9),l=n(278);t.a=function({notices:e,className:t,children:n,onRemove:i=s.noop}){const f=Object(u.useReducedMotion)(),[d]=Object(o.useState)(()=>new WeakMap),p=Object(c.useTransition)(e,e=>e.id,{from:{opacity:0,height:0},enter:e=>async t=>await t({opacity:1,height:d.get(e).offsetHeight}),leave:()=>async e=>{await e({opacity:0}),await e({height:0})},immediate:f});t=a()("components-snackbar-list",t);const h=e=>()=>i(e.id);return Object(o.createElement)("div",{className:t},n,p.map(({item:e,key:t,props:n})=>Object(o.createElement)(c.animated.div,{key:t,style:n},Object(o.createElement)("div",{className:"components-snackbar-list__notice-container",ref:t=>t&&d.set(e,t)},Object(o.createElement)(l.a,Object(r.a)({},Object(s.omit)(e,["content"]),{onRemove:h(e)}),e.content)))))}},486:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(r.createElement)(o.Path,{d:"M19 6.5H5c-1.1 0-2 .9-2 2v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7c0-1.1-.9-2-2-2zm.5 9c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-7c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v7zM8 12.8h8v-1.5H8v1.5z"}));t.a=i},487:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M18.2 17c0 .7-.6 1.2-1.2 1.2H7c-.7 0-1.2-.6-1.2-1.2V7c0-.7.6-1.2 1.2-1.2h3.2V4.2H7C5.5 4.2 4.2 5.5 4.2 7v10c0 1.5 1.2 2.8 2.8 2.8h10c1.5 0 2.8-1.2 2.8-2.8v-3.6h-1.5V17zM14.9 3v1.5h3.7l-6.4 6.4 1.1 1.1 6.4-6.4v3.7h1.5V3h-6.3z"}));t.a=i},488:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M4 9v6h14V9H4zm8-4.8H4v1.5h8V4.2zM4 19.8h8v-1.5H4v1.5z"}));t.a=i},489:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M7 9v6h10V9H7zM5 19.8h14v-1.5H5v1.5zM5 4.3v1.5h14V4.3H5z"}));t.a=i},490:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{d:"M6 15h14V9H6v6zm6-10.8v1.5h8V4.2h-8zm0 15.6h8v-1.5h-8v1.5z"}));t.a=i},491:function(e,t,n){"use strict";var r=n(0),o=n(18);const i=Object(r.createElement)(o.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(o.Path,{fillRule:"evenodd",d:"M5 5.5h14a.5.5 0 01.5.5v1.5a.5.5 0 01-.5.5H5a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM4 9.232A2 2 0 013 7.5V6a2 2 0 012-2h14a2 2 0 012 2v1.5a2 2 0 01-1 1.732V18a2 2 0 01-2 2H6a2 2 0 01-2-2V9.232zm1.5.268V18a.5.5 0 00.5.5h12a.5.5 0 00.5-.5V9.5h-13z",clipRule:"evenodd"}));t.a=i},492:function(e,t,n){"use strict";var r={};n.r(r),n.d(r,"Text",(function(){return F})),n.d(r,"block",(function(){return L})),n.d(r,"positive",(function(){return H})),n.d(r,"destructive",(function(){return N})),n.d(r,"muted",(function(){return D})),n.d(r,"highlighterText",(function(){return V})),n.d(r,"upperCase",(function(){return z}));var o=n(22),i=n(0),a=n(6),s=n(4),c=n.n(s),u=n(9),l=function({icon:e,size:t=24,...n}){return Object(i.cloneElement)(e,{width:t,height:t,...n})},f=n(18),d=Object(i.createElement)(f.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Object(i.createElement)(f.Path,{d:"M17.5 11.6L12 16l-5.5-4.4.9-1.2L12 14l4.5-3.6 1 1.2z"})),p=n(198),h=n(72),m=n(64),g=n(494),b=n(482),v=n(469),y=n(45),w=n(466),O=n(468);const x=Object(y.a)({name:"hdknak",styles:"display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap"}),j="…",S={auto:"auto",head:"head",middle:"middle",tail:"tail",none:"none"},k={ellipsis:j,ellipsizeMode:S.auto,limit:0,numberOfLines:0};var E=n(153),C=n.n(E),_=n(186),A=n.n(_);let I;const P=C()((function(e){var t,n;if("string"!=typeof e)return"";if("string"==typeof(n=e)&&A()(n).isValid())return e;if(!e.includes("var("))return"";if("undefined"==typeof document)return"";const r=function(){if("undefined"!=typeof document){if(!I){const e=document.createElement("div");e.setAttribute("data-g2-color-computation-node",""),document.body.appendChild(e),I=e}return I}}();if(!r)return"";r.style.background=e;const o=null===(t=window)||void 0===t?void 0:t.getComputedStyle(r).background;return r.style.background="",o||""}));var M=n(123),T=n(62),R={colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:"18px",fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",controlPaddingX:"12px",controlPaddingXLarge:"calc(12px * 1.3334)",controlPaddingXSmall:"calc(12px / 1.3334)",controlBackgroundColor:M.a.white,controlBorderRadius:"2px",controlBorderColor:M.a.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:M.a.gray[700],controlBoxShadowFocus:"0 0 0, 0.5px, "+M.a.admin,controlDestructiveBorderColor:M.a.alert.red,controlHeight:"30px",controlHeightLarge:"calc( 30px * 1.2 )",controlHeightSmall:"calc( 30px * 0.8 )",controlHeightXSmall:"calc( 30px * 0.6 )",cardBorderRadius:"2px",cardPaddingXSmall:""+Object(T.a)(2),cardPaddingSmall:""+Object(T.a)(4),cardPaddingMedium:`${Object(T.a)(4)} ${Object(T.a)(6)}`,cardPaddingLarge:`${Object(T.a)(6)} ${Object(T.a)(8)}`,surfaceBackgroundColor:M.a.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:M.a.white,surfaceColor:M.a.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"};const F=Object(y.a)("color:",M.a.black,";line-height:",R.fontLineHeightBase,";margin:0;",""),L=Object(y.a)({name:"4zleql",styles:"display:block"}),H=Object(y.a)("color:",M.a.alert.green,";",""),N=Object(y.a)("color:",M.a.alert.red,";",""),D=Object(y.a)("color:",M.a.mediumGray.text,";",""),V=Object(y.a)("mark{background:",M.a.alert.yellow,";border-radius:2px;box-shadow:0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;}",""),z=Object(y.a)({name:"50zrmy",styles:"text-transform:uppercase"});var $=n(271);const B=C()(e=>{const t={};for(const n in e)t[n.toLowerCase()]=e[n];return t}),W={body:13,caption:10,footnote:11,largeTitle:28,subheadline:12,title:20};function U(e=13){if(e in W)return U(W[e]);if("number"!=typeof e){const t=parseFloat(e);if(Number.isNaN(t))return e;e=t}return`calc((${e} / 13) * ${R.fontSize})`}[1,2,3,4,5,6].flatMap(e=>[e,e.toString()]);var q=Object(v.a)({as:"span",useHook:function(e){const{adjustLineHeightForInnerControls:t,align:n,children:o,className:s,color:c,ellipsizeMode:u,isDestructive:l=!1,display:f,highlightEscape:d=!1,highlightCaseSensitive:p=!1,highlightWords:h,highlightSanitize:m,isBlock:g=!1,letterSpacing:b,lineHeight:v,optimizeReadabilityFor:E,size:C,truncate:_=!1,upperCase:I=!1,variant:H,weight:z=R.fontWeight,...W}=Object(w.a)(e,"Text");let q=o;const G=Array.isArray(h),K="caption"===C;if(G){if("string"!=typeof o)throw new TypeError("`children` of `Text` must only be `string` types when `highlightWords` is defined");q=function({activeClassName:e="",activeIndex:t=-1,activeStyle:n,autoEscape:r,caseSensitive:o=!1,children:a,findChunks:s,highlightClassName:c="",highlightStyle:u={},highlightTag:l="mark",sanitize:f,searchWords:d=[],unhighlightClassName:p="",unhighlightStyle:h}){if(!a)return null;if("string"!=typeof a)return a;const m=a,g=Object($.findAll)({autoEscape:r,caseSensitive:o,findChunks:s,sanitize:f,searchWords:d,textToHighlight:m}),b=l;let v,y=-1,w="";return g.map((r,a)=>{const s=m.substr(r.start,r.end-r.start);if(r.highlight){let r;y++,r="object"==typeof c?o?c[s]:(c=B(c))[s.toLowerCase()]:c;const l=y===+t;w=`${r} ${l?e:""}`,v=!0===l&&null!==n?Object.assign({},u,n):u;const f={children:s,className:w,key:a,style:v};return"string"!=typeof b&&(f.highlightIndex=y),Object(i.createElement)(b,f)}return Object(i.createElement)("span",{children:s,className:p,key:a,style:h})})}({autoEscape:d,children:o,caseSensitive:p,searchWords:h,sanitize:m})}let X;!0===_&&(X="auto"),!1===_&&(X="none");const Y=function(e){const{className:t,children:n,ellipsis:r=j,ellipsizeMode:o=S.auto,limit:s=0,numberOfLines:c=0,...u}=Object(w.a)(e,"Truncate"),l=function(e="",t){const n={...k,...t},{ellipsis:r,ellipsizeMode:o,limit:i}=n;if(o===S.none)return e;let s,c;switch(o){case S.head:s=0,c=i;break;case S.middle:s=Math.floor(i/2),c=Math.floor(i/2);break;default:s=i,c=0}return o!==S.auto?function(e,t,n,r){if("string"!=typeof e)return"";const o=e.length,i=~~t,s=~~n,c=Object(a.isNil)(r)?j:r;return 0===i&&0===s||i>=o||s>=o||i+s>=o?e:0===s?e.slice(0,i)+c:e.slice(0,i)+c+e.slice(o-s)}(e,s,c,r):e}("string"==typeof n?n:"",{ellipsis:r,ellipsizeMode:o,limit:s,numberOfLines:c}),f=o===S.auto;return{...u,className:Object(i.useMemo)(()=>{const e={};return e.numberOfLines=Object(y.a)("-webkit-box-orient:vertical;-webkit-line-clamp:",c,";display:-webkit-box;overflow:hidden;",""),Object(y.b)(f&&!c&&x,f&&!!c&&e.numberOfLines,t)},[t,c,f]),children:l}}({...W,className:Object(i.useMemo)(()=>{const e={},o=function(e,t){if(t)return t;if(!e)return;let n=`calc(${R.controlHeight} + ${Object(T.a)(2)})`;switch(e){case"large":n=`calc(${R.controlHeightLarge} + ${Object(T.a)(2)})`;break;case"small":n=`calc(${R.controlHeightSmall} + ${Object(T.a)(2)})`;break;case"xSmall":n=`calc(${R.controlHeightXSmall} + ${Object(T.a)(2)})`}return n}(t,v);if(e.Base=Object(y.a)({color:c,display:f,fontSize:U(C),fontWeight:z,lineHeight:o,letterSpacing:b,textAlign:n},"",""),e.upperCase=Object(y.a)({name:"50zrmy",styles:"text-transform:uppercase"}),e.optimalTextColor=null,E){const t="dark"==("#000000"===function(e){const t=P(e);return A.a.isReadable(t,"#000000")?"#000000":"#ffffff"}(E)?"dark":"light");e.optimalTextColor=t?Object(y.a)({color:M.a.black},"",""):Object(y.a)({color:M.a.white},"","")}return Object(y.b)(F,e.Base,e.optimalTextColor,l&&N,!!G&&V,g&&L,K&&D,H&&r[H],I&&e.upperCase,s)},[t,n,s,c,f,g,K,l,G,b,v,E,C,I,H,z]),children:o,ellipsizeMode:u||X});return!_&&Array.isArray(o)&&(q=i.Children.map(o,e=>Object(a.isPlainObject)(e)&&"props"in e&&Object(O.b)(e,["Link"])?Object(i.cloneElement)(e,{size:e.props.size||"inherit"}):e)),{...Y,children:_?Y.children:q}},name:"Text"}),G=n(1);const K=new RegExp(/-left/g),X=new RegExp(/-right/g),Y=new RegExp(/Left/g),Z=new RegExp(/Right/g);function J(e={},t){return()=>t?Object(G.isRTL)()?Object(m.a)(t,""):Object(m.a)(e,""):Object(G.isRTL)()?Object(m.a)(((e={})=>Object(a.mapKeys)(e,(e,t)=>function(e){return"left"===e?"right":"right"===e?"left":K.test(e)?e.replace(K,"-right"):X.test(e)?e.replace(X,"-left"):Y.test(e)?e.replace(Y,"Right"):Z.test(e)?e.replace(Z,"Left"):e}(t)))(e),""):Object(m.a)(e,"")}var Q={name:"1n8met0",styles:"padding-top:0"};const ee=()=>Q;var te={name:"1739oy8",styles:"z-index:1"};const ne=({isFocused:e})=>e?te:"";var re={name:"2o6p8u",styles:"justify-content:space-between"},oe={name:"14qk3ip",styles:"align-items:flex-start;flex-direction:column-reverse"},ie={name:"hbng6e",styles:"align-items:flex-start;flex-direction:column"};const ae=({labelPosition:e})=>{switch(e){case"top":return ie;case"bottom":return oe;case"edge":return re;default:return""}},se=Object(h.a)(g.a,{target:"e1cr7zh17"})("position:relative;border-radius:2px;",ee," ",ne," ",ae,";");var ce={name:"wyxldh",styles:"margin:0 !important"},ue={name:"1d3w5wq",styles:"width:100%"};const le=Object(h.a)("div",{target:"e1cr7zh16"})("align-items:center;box-sizing:border-box;border-radius:inherit;display:flex;flex:1;position:relative;",({disabled:e})=>{const t=e?M.a.ui.backgroundDisabled:M.a.ui.background;return Object(m.a)({backgroundColor:t},"","")}," ",({hideLabel:e})=>e?ce:null," ",({__unstableInputWidth:e,labelPosition:t})=>e?"side"===t?"":"edge"===t?Object(m.a)({flex:"0 0 "+e},"",""):Object(m.a)({width:e},"",""):ue,";");var fe={name:"103r1kr",styles:"&::-webkit-input-placeholder{line-height:normal;}"};Object(h.a)("input",{target:"e1cr7zh15"})("&&&{background-color:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",M.a.black,";display:block;margin:0;outline:none;padding-left:8px;padding-right:8px;width:100%;",({isDragging:e,dragCursor:t})=>{let n="",r="";return e&&(n=Object(m.a)("cursor:",t,";user-select:none;&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none!important;margin:0!important;}","")),e&&t&&(r=Object(m.a)("&:active{cursor:",t,";}","")),Object(m.a)(n," ",r,";","")}," ",({disabled:e})=>e?Object(m.a)({color:M.a.ui.textDisabled},"",""):""," ",({size:e})=>{const t={default:"13px",small:"11px"}[e];return t?Object(m.a)("font-size:","16px",";@media ( min-width: 600px ){font-size:",t,";}",""):""}," ",({size:e})=>{const t={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},n=t[e]||t.default;return Object(m.a)(n,"","")}," ",()=>fe,";}");var de={name:"1h52dri",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap"};const pe=()=>de,he=({labelPosition:e})=>{let t=4;return"edge"!==e&&"side"!==e||(t=0),Object(m.a)({paddingTop:0,paddingBottom:t},"","")},me=Object(h.a)(q,{target:"e1cr7zh14"})("&&&{box-sizing:border-box;color:currentColor;display:block;margin:0;max-width:100%;z-index:1;",he," ",pe,";}"),ge=e=>Object(i.createElement)(me,Object(o.a)({},e,{as:"label"})),be=Object(h.a)(b.a,{target:"e1cr7zh13"})({name:"1b6uupn",styles:"max-width:calc( 100% - 10px )"}),ve=Object(h.a)("div",{target:"e1cr7zh12"})("&&&{box-sizing:border-box;border-radius:inherit;bottom:0;left:0;margin:0;padding:0;pointer-events:none;position:absolute;right:0;top:0;",({disabled:e,isFocused:t})=>{let n=t?M.a.ui.borderFocus:M.a.ui.border,r=null;return t&&(r=`0 0 0 1px ${M.a.ui.borderFocus} inset`),e&&(n=M.a.ui.borderDisabled),Object(m.a)({boxShadow:r,borderColor:n,borderStyle:"solid",borderWidth:1},"","")}," ",J({paddingLeft:2}),";}"),ye=Object(h.a)("span",{target:"e1cr7zh11"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"}),we=Object(h.a)("span",{target:"e1cr7zh10"})({name:"pvvbxf",styles:"box-sizing:border-box;display:block"});var Oe=Object(i.memo)((function({disabled:e=!1,isFocused:t=!1}){return Object(i.createElement)(ve,{"aria-hidden":"true",className:"components-input-control__backdrop",disabled:e,isFocused:t})})),xe=n(135);function je({children:e,hideLabelFromVision:t,htmlFor:n,...r}){return e?t?Object(i.createElement)(xe.a,{as:"label",htmlFor:n},e):Object(i.createElement)(ge,Object(o.a)({htmlFor:n},r),e):null}var Se=Object(i.forwardRef)((function e({__unstableInputWidth:t,children:n,className:r,disabled:a=!1,hideLabelFromVision:s=!1,labelPosition:c,id:l,isFocused:f=!1,label:d,prefix:p,size:h="default",suffix:m,...g},b){const v=function(t){const n=Object(u.useInstanceId)(e);return t||"input-base-control-"+n}(l),y=s||!d;return Object(i.createElement)(se,Object(o.a)({},g,function({labelPosition:e}){const t={};switch(e){case"top":t.direction="column",t.gap=0;break;case"bottom":t.direction="column-reverse",t.gap=0;break;case"edge":t.justify="space-between"}return t}({labelPosition:c}),{className:r,isFocused:f,labelPosition:c,ref:b,__unstableVersion:"next"}),Object(i.createElement)(be,null,Object(i.createElement)(je,{className:"components-input-control__label",hideLabelFromVision:s,labelPosition:c,htmlFor:v,size:h},d)),Object(i.createElement)(le,{__unstableInputWidth:t,className:"components-input-control__container",disabled:a,hideLabel:y,isFocused:f,labelPosition:c},p&&Object(i.createElement)(ye,{className:"components-input-control__prefix"},p),n,m&&Object(i.createElement)(we,{className:"components-input-control__suffix"},m),Object(i.createElement)(Oe,{"aria-hidden":"true",disabled:a,isFocused:f,label:d,size:h})))}));const ke=Object(h.a)("select",{target:"e12x0a391"})("&&&{appearance:none;background:transparent;box-sizing:border-box;border:none;box-shadow:none!important;color:",M.a.black,";display:block;margin:0;width:100%;",({disabled:e})=>e?Object(m.a)({color:M.a.ui.textDisabled},"",""):"",";",({size:e})=>{const t={default:"13px",small:"11px"}[e];return t?Object(m.a)("font-size:","16px",";@media ( min-width: 600px ){font-size:",t,";}",""):""},";",({size:e})=>{const t={default:{height:30,lineHeight:1,minHeight:30},small:{height:24,lineHeight:1,minHeight:24}},n=t[e]||t.default;return Object(m.a)(n,"","")},";",J({paddingLeft:8,paddingRight:24})(),";}"),Ee=Object(h.a)("div",{target:"e12x0a390"})("align-items:center;bottom:0;box-sizing:border-box;display:flex;padding:0 4px;pointer-events:none;position:absolute;top:0;",J({right:0})()," svg{display:block;}");const Ce=Object(i.forwardRef)((function e({className:t,disabled:n=!1,help:r,hideLabelFromVision:s,id:f,label:h,multiple:m=!1,onBlur:g=a.noop,onChange:b=a.noop,onFocus:v=a.noop,options:y=[],size:w="default",value:O,labelPosition:x="top",...j},S){const[k,E]=Object(i.useState)(!1),C=function(t){const n=Object(u.useInstanceId)(e);return t||"inspector-select-control-"+n}(f),_=r?C+"__help":void 0;if(Object(a.isEmpty)(y))return null;const A=c()("components-select-control",t);return Object(i.createElement)(p.a,{help:r},Object(i.createElement)(Se,Object(o.a)({className:A,disabled:n,hideLabelFromVision:s,id:C,isFocused:k,label:h,size:w,suffix:Object(i.createElement)(Ee,null,Object(i.createElement)(l,{icon:d,size:18})),labelPosition:x},j),Object(i.createElement)(ke,Object(o.a)({},j,{"aria-describedby":_,className:"components-select-control__input",disabled:n,id:C,multiple:m,onBlur:e=>{g(e),E(!1)},onChange:e=>{if(m){const t=[...e.target.options].filter(({selected:e})=>e).map(({value:e})=>e);b(t)}else b(e.target.value,{event:e})},onFocus:e=>{v(e),E(!0)},ref:S,size:w,value:O}),y.map((e,t)=>{const n=e.id||`${e.label}-${e.value}-${t}`;return Object(i.createElement)("option",{key:n,value:e.value,disabled:e.disabled},e.label)}))))}));t.a=Ce},493:function(e,t,n){"use strict";var r=n(0),o=n(4),i=n.n(o),a=n(6),s=n(1),c=n(9),u=n(84),l=n(46),f=n(18),d=Object(r.createElement)(f.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(r.createElement)(f.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),p=n(22);class h extends r.Component{constructor(){super(...arguments),this.onChange=this.onChange.bind(this),this.bindInput=this.bindInput.bind(this)}focus(){this.input.focus()}hasFocus(){return this.input===this.input.ownerDocument.activeElement}bindInput(e){this.input=e}onChange(e){this.props.onChange({value:e.target.value})}render(){const{value:e,isExpanded:t,instanceId:n,selectedSuggestionIndex:o,className:a,...s}=this.props,c=e?e.length+1:0;return Object(r.createElement)("input",Object(p.a)({ref:this.bindInput,id:"components-form-token-input-"+n,type:"text"},s,{value:e||"",onChange:this.onChange,size:c,className:i()(a,"components-form-token-field__input"),autoComplete:"off",role:"combobox","aria-expanded":t,"aria-autocomplete":"list","aria-owns":t?"components-form-token-suggestions-"+n:void 0,"aria-activedescendant":-1!==o?`components-form-token-suggestions-${n}-${o}`:void 0,"aria-describedby":"components-form-token-suggestions-howto-"+n}))}}var m=h,g=n(279),b=n.n(g);class v extends r.Component{constructor(){super(...arguments),this.handleMouseDown=this.handleMouseDown.bind(this),this.bindList=this.bindList.bind(this)}componentDidUpdate(){this.props.selectedIndex>-1&&this.props.scrollIntoView&&this.list.children[this.props.selectedIndex]&&(this.scrollingIntoView=!0,b()(this.list.children[this.props.selectedIndex],this.list,{onlyScrollIfNeeded:!0}),this.props.setTimeout(()=>{this.scrollingIntoView=!1},100))}bindList(e){this.list=e}handleHover(e){return()=>{this.scrollingIntoView||this.props.onHover(e)}}handleClick(e){return()=>{this.props.onSelect(e)}}handleMouseDown(e){e.preventDefault()}computeSuggestionMatch(e){const t=this.props.displayTransform(this.props.match||"").toLocaleLowerCase();if(0===t.length)return null;const n=(e=this.props.displayTransform(e)).toLocaleLowerCase().indexOf(t);return{suggestionBeforeMatch:e.substring(0,n),suggestionMatch:e.substring(n,n+t.length),suggestionAfterMatch:e.substring(n+t.length)}}render(){return Object(r.createElement)("ul",{ref:this.bindList,className:"components-form-token-field__suggestions-list",id:"components-form-token-suggestions-"+this.props.instanceId,role:"listbox"},Object(a.map)(this.props.suggestions,(e,t)=>{const n=this.computeSuggestionMatch(e),o=i()("components-form-token-field__suggestion",{"is-selected":t===this.props.selectedIndex});return Object(r.createElement)("li",{id:`components-form-token-suggestions-${this.props.instanceId}-${t}`,role:"option",className:o,key:null!=e&&e.value?e.value:this.props.displayTransform(e),onMouseDown:this.handleMouseDown,onClick:this.handleClick(e),onMouseEnter:this.handleHover(e),"aria-selected":t===this.props.selectedIndex},n?Object(r.createElement)("span",{"aria-label":this.props.displayTransform(e)},n.suggestionBeforeMatch,Object(r.createElement)("strong",{className:"components-form-token-field__suggestion-match"},n.suggestionMatch),n.suggestionAfterMatch):this.props.displayTransform(e))}))}}v.defaultProps={match:"",onHover:()=>{},onSelect:()=>{},suggestions:Object.freeze([])};var y=Object(c.withSafeTimeout)(v),w=n(198),O=n(137),x=n(494),j=n(469),S=n(466),k=n(272),E=Object(j.a)({as:"div",useHook:function(e){const t=Object(S.a)(e,"FlexBlock");return Object(k.a)({isBlock:!0,...t})},name:"FlexBlock"}),C=n(482);const _=Object(c.createHigherOrderComponent)(e=>t=>{const[n,o]=Object(r.useState)(),i=Object(r.useCallback)(e=>o(()=>null!=e&&e.handleFocusOutside?e.handleFocusOutside.bind(e):void 0),[]);return Object(r.createElement)("div",Object(c.__experimentalUseFocusOutside)(n),Object(r.createElement)(e,Object(p.a)({ref:i},t)))},"withFocusOutside")(class extends r.Component{handleFocusOutside(e){this.props.onFocusOutside(e)}render(){return this.props.children}});t.a=function e({value:t,label:n,options:o,onChange:f,onFilterValueChange:p=a.noop,hideLabelFromVision:h,help:g,allowReset:b=!0,className:v,messages:j={selected:Object(s.__)("Item selected.")}}){var S;const k=Object(c.useInstanceId)(e),[A,I]=Object(r.useState)(null),[P,M]=Object(r.useState)(!1),[T,R]=Object(r.useState)(!1),[F,L]=Object(r.useState)(""),H=Object(r.useRef)(),N=o.find(e=>e.value===t),D=null!==(S=null==N?void 0:N.label)&&void 0!==S?S:"",V=Object(r.useMemo)(()=>{const e=[],t=[],n=Object(a.deburr)(F.toLocaleLowerCase());return o.forEach(r=>{const o=Object(a.deburr)(r.label).toLocaleLowerCase().indexOf(n);0===o?e.push(r):o>0&&t.push(r)}),e.concat(t)},[F,o,t]),z=e=>{f(e.value),Object(l.speak)(j.selected,"assertive"),I(e),L(""),M(!1)},$=(e=1)=>{let t=V.indexOf(A)+e;t<0?t=V.length-1:t>=V.length&&(t=0),I(V[t]),M(!0)};return Object(r.useEffect)(()=>{const e=V.length>0;if(P){const t=e?Object(s.sprintf)( +/* translators: %d: number of results. */ +Object(s._n)("%d result found, use up and down arrow keys to navigate.","%d results found, use up and down arrow keys to navigate.",V.length),V.length):Object(s.__)("No results.");Object(l.speak)(t,"polite")}},[V,P]),Object(r.createElement)(_,{onFocusOutside:()=>{M(!1)}},Object(r.createElement)(w.a,{className:i()(v,"components-combobox-control"),tabIndex:"-1",label:n,id:"components-form-token-input-"+k,hideLabelFromVision:h,help:g},Object(r.createElement)("div",{className:"components-combobox-control__suggestions-container",tabIndex:"-1",onKeyDown:e=>{let t=!1;switch(e.keyCode){case u.ENTER:A&&(z(A),t=!0);break;case u.UP:$(-1),t=!0;break;case u.DOWN:$(1),t=!0;break;case u.ESCAPE:M(!1),I(null),t=!0,e.stopPropagation()}t&&e.preventDefault()}},Object(r.createElement)(x.a,null,Object(r.createElement)(E,null,Object(r.createElement)(m,{className:"components-combobox-control__input",instanceId:k,ref:H,value:P?F:D,"aria-label":D?`${D}, ${n}`:null,onFocus:()=>{R(!0),M(!0),p(""),L("")},onBlur:()=>{R(!1)},isExpanded:P,selectedSuggestionIndex:V.indexOf(A),onChange:e=>{const t=e.value;L(t),p(t),T&&M(!0)}})),b&&Object(r.createElement)(C.a,null,Object(r.createElement)(O.a,{className:"components-combobox-control__reset",icon:d,disabled:!t,onClick:()=>{f(null),H.current.input.focus()},label:Object(s.__)("Reset")}))),P&&Object(r.createElement)(y,{instanceId:k,match:{label:F},displayTransform:e=>e.label,suggestions:V,selectedIndex:V.indexOf(A),onHover:I,onSelect:z,scrollIntoView:!0}))))}},494:function(e,t,n){"use strict";var r=n(22),o=n(0),i=n(468),a=n(45),s=n(65),c=n.n(s),u=n(466);const l=["40em","52em","64em"];var f=n(62),d=n(147);function p(e){const{align:t="center",className:n,direction:r="row",expanded:i=!0,gap:s=2,justify:p="space-between",wrap:h=!1,...m}=Object(u.a)(function({isReversed:e,...t}){return void 0!==e?(c()("Flex isReversed",{alternative:'Flex direction="row-reverse" or "column-reverse"',since:"5.9"}),{...t,direction:e?"row-reverse":"row"}):t}(e),"Flex"),g=function(e,t={}){const n=((e={})=>{const{defaultIndex:t=0}=e;if("number"!=typeof t)throw new TypeError(`Default breakpoint index should be a number. Got: ${t}, ${typeof t}`);if(t<0||t>l.length-1)throw new RangeError(`Default breakpoint index out of range. Theme has ${l.length} breakpoints, got index ${t}`);const[n,r]=Object(o.useState)(t);return Object(o.useEffect)(()=>{const e=()=>{const e=l.filter(e=>"undefined"!=typeof window&&window.matchMedia(`screen and (min-width: ${e})`).matches).length;n!==e&&r(e)};return e(),"undefined"!=typeof document&&document.addEventListener("resize",e),()=>{"undefined"!=typeof document&&document.removeEventListener("resize",e)}},[n]),n})(t);if(!Array.isArray(e)&&"function"!=typeof e)return e;const r=e||[];return r[n>=r.length?r.length-1:n]}(Array.isArray(r)?r:[r]),b="string"==typeof g&&!!g.includes("column"),v="string"==typeof g&&g.includes("reverse");return{...m,className:Object(o.useMemo)(()=>{const e={};return e.Base=Object(a.a)({alignItems:b?"normal":t,flexDirection:g,flexWrap:h?"wrap":void 0,justifyContent:p,height:b&&i?"100%":void 0,width:!b&&i?"100%":void 0,marginBottom:h?`calc(${Object(f.a)(s)} * -1)`:void 0},"",""),e.Items=Object(a.a)({"> * + *:not(marquee)":{marginTop:b?Object(f.a)(s):void 0,marginRight:!b&&v?Object(f.a)(s):void 0,marginLeft:b||v?void 0:Object(f.a)(s)}},"",""),e.WrapItems=Object(a.a)({"> *:not(marquee)":{marginBottom:Object(f.a)(s),marginLeft:!b&&v?Object(f.a)(s):void 0,marginRight:b||v?void 0:Object(f.a)(s)},"> *:last-child:not(marquee)":{marginLeft:!b&&v?0:void 0,marginRight:b||v?void 0:0}},"",""),Object(a.b)(d.a,e.Base,h?e.WrapItems:e.Items,b?d.c:d.d,n)},[t,n,g,i,s,b,v,p,h]),isColumn:b}}var h=n(197),m=n(467);const g=Object(i.a)((function(e,t){const{children:n,isColumn:i,...a}=p(e);return Object(o.createElement)(h.a.Provider,{value:{flexItemDisplay:i?"block":void 0}},Object(o.createElement)(m.a,Object(r.a)({},a,{ref:t}),n))}),"Flex");t.a=g},5:function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t96?f:d},h=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},m=function(){return null};t.a=function e(t,n){var i,a,s=t.__emotion_real===t,f=s&&t.__emotion_base||t;void 0!==n&&(i=n.label,a=n.target);var d=h(t,n,s),g=d||p(f),b=!g("as");return function(){var v=arguments,y=s&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&y.push("label:"+i+";"),null==v[0]||void 0===v[0].raw)y.push.apply(y,v);else{y.push(v[0][0]);for(var w=v.length,O=1;O=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)},o={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},i=n(173),a=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},l=Object(i.a)((function(e){return c(e)?e:e.replace(a,"-$&").toLowerCase()})),f=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(s,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===o[e]||c(e)||"number"!=typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return p={name:n.name,styles:n.styles,next:p},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)p={name:r.name,styles:r.styles,next:p},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o array('wp-blocks', 'wp-compose', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '7a1d0f01ca6b936ace4d27c2d2b41b1b'); \ No newline at end of file diff --git a/build/wc-blocks.js b/build/wc-blocks.js new file mode 100644 index 00000000000..eb65413a03f --- /dev/null +++ b/build/wc-blocks.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.blocks=this.wc.blocks||{},this.wc.blocks["wc-blocks"]=function(t){function e(e){for(var c,s,i=e[0],l=e[1],a=e[2],p=0,m=[];p{let{className:e,height:o,width:r,...n}=t;return Object(c.createElement)(a.SVG,l()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 245 145",className:p()("woo-icon",e),width:r,height:o},n),Object(c.createElement)("path",{fill:"#7f54b3",d:"M22.76 0h199.1a22.77 22.77 0 0 1 22.8 22.76v75.92a22.77 22.77 0 0 1-22.78 22.78h-71.41l9.77 24-43.13-24H22.76C10.1946 121.449.011 111.2654 0 98.7V22.76C.011 10.1946 10.1946.011 22.76 0z"}),Object(c.createElement)("path",{fill:"#FFF",fillRule:"nonzero",d:"M12.32 20.63a8.16 8.16 0 0 1 6.25-3.09c5.0733-.36 7.9867 2.0333 8.74 7.18 3.14 20.86 6.4933 38.5633 10.06 53.11l21.92-41.69c2-3.76 4.49-5.76 7.52-6 4.3867-.3067 7.13 2.49 8.23 8.39a186 186 0 0 0 9.47 34.23c2.62-25.38 7.0133-43.7133 13.18-55a7.73 7.73 0 0 1 6.6-4.43 8.8 8.8 0 0 1 6.32 2 7.75 7.75 0 0 1 3.05 5.74 8.52 8.52 0 0 1-1 4.77c-3.9 7.24-7.12 19.28-9.66 36.12-2.48 16.2533-3.3967 28.9633-2.75 38.13a12.25 12.25 0 0 1-1.16 6.56 6.32 6.32 0 0 1-5.33 3.53c-2.6667.18-5.3033-1.0567-7.91-3.71-9.2933-9.54-16.6567-23.7267-22.09-42.56C57.3 76.7167 52.48 86.3333 49.3 92.76c-5.86 11.3333-10.89 17.13-15.09 17.39-2.7333.1933-5.0667-2.0933-7-6.86-5.1-13.0933-10.5833-38.4033-16.45-75.93a8.56 8.56 0 0 1 1.56-6.73zM227.23 36.34a23.17 23.17 0 0 0-16-11.59 26.25 26.25 0 0 0-5.42-.58c-9.5867 0-17.41 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6167 14.3333 4.85 19.8a23.15 23.15 0 0 0 16 11.59 26.28 26.28 0 0 0 5.42.59c9.68 0 17.5033-5 23.47-15A53.89 53.89 0 0 0 232.08 56c0-7.7333-1.6167-14.2867-4.85-19.66zm-12.61 27.72c-1.3733 6.56-3.9167 11.5-7.63 14.82-2.9267 2.6667-5.6133 3.7433-8.06 3.23-2.4467-.5133-4.4033-2.6667-5.87-6.46a25.68 25.68 0 0 1-1.76-9.09 35.9 35.9 0 0 1 .73-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.68 25.68 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03zM164.57 36.34a23.2 23.2 0 0 0-16-11.59 26.42 26.42 0 0 0-5.43-.58c-9.5933 0-17.4167 5-23.47 15a53 53 0 0 0-7.78 28.16c0 7.7333 1.6133 14.3333 4.84 19.8a23.19 23.19 0 0 0 16 11.59 26.44 26.44 0 0 0 5.43.59c9.68 0 17.5033-5 23.47-15A53.88 53.88 0 0 0 169.4 56c0-7.7333-1.6133-14.2867-4.84-19.66h.01zm-12.61 27.72c-1.3667 6.56-3.91 11.5-7.63 14.82-2.93 2.64-5.63 3.72-8.07 3.23-2.44-.49-4.4-2.64-5.86-6.46a25.7 25.7 0 0 1-1.77-9.09 35.9 35.9 0 0 1 .74-7.34 33 33 0 0 1 5.28-11.88c3.3333-4.8933 6.8067-6.9467 10.42-6.16 2.44.4867 4.3933 2.64 5.86 6.46a25.91 25.91 0 0 1 1.76 9.12 35.73 35.73 0 0 1-.73 7.33v-.03z"}))},null),b=Object(c.createElement)(a.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(c.createElement)("path",{d:"M12 11a1 1 0 011 1 1 1 0 01-1 1 1 1 0 01-1-1 1 1 0 011-1M4.2 4.2c1.5-1.4 4.5-.8 7.8 1.4 3.3-2.2 6.4-2.8 7.8-1.4 1.4 1.5.8 4.5-1.4 7.8 2.2 3.3 2.8 6.4 1.4 7.8-1.4 1.4-4.6.8-7.8-1.4-3.3 2.2-6.3 2.8-7.8 1.4-1.4-1.4-.8-4.6 1.4-7.8-2.2-3.3-2.8-6.3-1.4-7.8m11.3 4.3a29 29 0 011.7 1.8c1.4-2 2-4 1.2-4.7-.8-.7-2.6-.2-4.7 1.2l1.8 1.7m-7 7a29 29 0 01-1.7-1.8c-1.4 2-2 4-1.2 4.7.8.7 2.6.2 4.7-1.2a29 29 0 01-1.8-1.7M5.6 5.6c-.7.8-.2 2.6 1.2 4.7a29 29 0 013.5-3.5c-2-1.4-4-2-4.7-1.2m4.3 8.5l2.1 2a28.1 28.1 0 004-4.1 28.1 28.1 0 00-4-4 28.1 28.1 0 00-4 4l1.9 2.1m8.5 4.3c.7-.8.2-2.6-1.2-4.7a29 29 0 01-3.5 3.5c2 1.4 4 2 4.7 1.2z"})),d=(o(315),o(316),o(24)),w=o.n(d),f=o(9),h=o(61);const g=Object(f.createHigherOrderComponent)(t=>{class e extends c.Component{constructor(){super(...arguments),w()(this,"mounted",!1)}componentDidMount(){const{block:t,setAttributes:e}=this.props;t.name.startsWith("woocommerce/")&&e(this.getAttributesWithDefaults())}componentDidUpdate(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}getAttributesWithDefaults(){const t=Object(r.getBlockType)(this.props.block.name);let e=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==t.attributes&&void 0!==t.defaults&&(e=Object.assign({},this.props.attributes||{}),Object.keys(t.attributes).map(o=>(void 0===e[o]&&void 0!==t.defaults[o]&&(e[o]=t.defaults[o]),o))),e}render(){return Object(c.createElement)(t,l()({},this.props,{attributes:this.getAttributesWithDefaults()}))}}return e},"withDefaultAttributes");Object(h.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",g),Object(h.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",(t,e)=>(e.name.startsWith("woocommerce/")&&Object.keys(e.attributes).map(o=>(void 0===t[o]&&void 0!==e.defaults&&void 0!==e.defaults[o]&&(t[o]=e.defaults[o]),o)),t)),Object(r.setCategories)([...Object(r.getCategories)().filter(t=>{let{slug:e}=t;return"woocommerce"!==e&&"woocommerce-product-elements"!==e}),{slug:"woocommerce",title:Object(n.__)("WooCommerce","woo-gutenberg-products-block"),icon:Object(c.createElement)(s.a,{srcElement:m})},{slug:"woocommerce-product-elements",title:Object(n.__)("WooCommerce Product Elements","woo-gutenberg-products-block"),icon:Object(c.createElement)(s.a,{srcElement:b,className:"wc-block-editor-components-block-icon"})}])},61:function(t,e){t.exports=window.wp.hooks},9:function(t,e){t.exports=window.wp.compose}}); \ No newline at end of file diff --git a/build/wc-payment-method-bacs.asset.php b/build/wc-payment-method-bacs.asset.php new file mode 100644 index 00000000000..6bee4a7d876 --- /dev/null +++ b/build/wc-payment-method-bacs.asset.php @@ -0,0 +1 @@ + array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '12164700b4362384a793873f3c668ea1'); \ No newline at end of file diff --git a/build/wc-payment-method-bacs.js b/build/wc-payment-method-bacs.js new file mode 100644 index 00000000000..775727ab897 --- /dev/null +++ b/build/wc-payment-method-bacs.js @@ -0,0 +1 @@ +!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}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=13)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},,function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wc.wcBlocksRegistry},,,,,,,,function(e,t,n){"use strict";n.r(t);var r,o=n(0),c=n(5),i=n(1),u=n(2),l=n(4);const a=Object(u.getSetting)("bacs_data",{}),s=Object(i.__)("Direct bank transfer","woo-gutenberg-products-block"),d=Object(l.decodeEntities)(a.title)||s,f=()=>Object(l.decodeEntities)(a.description||""),p={name:"bacs",label:Object(o.createElement)(e=>{const{PaymentMethodLabel:t}=e.components;return Object(o.createElement)(t,{text:d})},null),content:Object(o.createElement)(f,null),edit:Object(o.createElement)(f,null),canMakePayment:()=>!0,ariaLabel:d,supports:{features:null!==(r=null==a?void 0:a.supports)&&void 0!==r?r:[]}};Object(c.registerPaymentMethod)(p)}]); \ No newline at end of file diff --git a/build/wc-payment-method-cheque.asset.php b/build/wc-payment-method-cheque.asset.php new file mode 100644 index 00000000000..76489ef2be8 --- /dev/null +++ b/build/wc-payment-method-cheque.asset.php @@ -0,0 +1 @@ + array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '6ec2d03b8084c591592bf133a931390e'); \ No newline at end of file diff --git a/build/wc-payment-method-cheque.js b/build/wc-payment-method-cheque.js new file mode 100644 index 00000000000..ca1417ab7a7 --- /dev/null +++ b/build/wc-payment-method-cheque.js @@ -0,0 +1 @@ +!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}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=11)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},,function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wc.wcBlocksRegistry},,,,,,function(e,t,n){"use strict";n.r(t);var r,o=n(0),c=n(5),i=n(1),u=n(2),l=n(4);const a=Object(u.getSetting)("cheque_data",{}),s=Object(i.__)("Check payment","woo-gutenberg-products-block"),d=Object(l.decodeEntities)(a.title)||s,f=()=>Object(l.decodeEntities)(a.description||""),p={name:"cheque",label:Object(o.createElement)(e=>{const{PaymentMethodLabel:t}=e.components;return Object(o.createElement)(t,{text:d})},null),content:Object(o.createElement)(f,null),edit:Object(o.createElement)(f,null),canMakePayment:()=>!0,ariaLabel:d,supports:{features:null!==(r=null==a?void 0:a.supports)&&void 0!==r?r:[]}};Object(c.registerPaymentMethod)(p)}]); \ No newline at end of file diff --git a/build/wc-payment-method-cod.asset.php b/build/wc-payment-method-cod.asset.php new file mode 100644 index 00000000000..f89999acfb3 --- /dev/null +++ b/build/wc-payment-method-cod.asset.php @@ -0,0 +1 @@ + array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => '22259d174e269c925100d5d10f1a221f'); \ No newline at end of file diff --git a/build/wc-payment-method-cod.js b/build/wc-payment-method-cod.js new file mode 100644 index 00000000000..ceecdff54ef --- /dev/null +++ b/build/wc-payment-method-cod.js @@ -0,0 +1 @@ +!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}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=14)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},,function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wc.wcBlocksRegistry},,,,,,,,,function(e,t,n){"use strict";n.r(t);var r,o=n(0),i=n(5),c=n(1),u=n(2),l=n(4);const s=Object(u.getSetting)("cod_data",{}),a=Object(c.__)("Cash on delivery","woo-gutenberg-products-block"),d=Object(l.decodeEntities)(s.title)||a,p=()=>Object(l.decodeEntities)(s.description||""),f={name:"cod",label:Object(o.createElement)(e=>{const{PaymentMethodLabel:t}=e.components;return Object(o.createElement)(t,{text:d})},null),content:Object(o.createElement)(p,null),edit:Object(o.createElement)(p,null),canMakePayment:e=>{let{cartNeedsShipping:t,selectedShippingMethods:n}=e;if(!s.enableForVirtual&&!t)return!1;if(!s.enableForShippingMethods.length)return!0;const r=Object.values(n);return s.enableForShippingMethods.some(e=>r.some(t=>t.includes(e)))},ariaLabel:d,supports:{features:null!==(r=null==s?void 0:s.supports)&&void 0!==r?r:[]}};Object(i.registerPaymentMethod)(f)}]); \ No newline at end of file diff --git a/build/wc-payment-method-paypal.asset.php b/build/wc-payment-method-paypal.asset.php new file mode 100644 index 00000000000..255ecb56d9e --- /dev/null +++ b/build/wc-payment-method-paypal.asset.php @@ -0,0 +1 @@ + array('wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill'), 'version' => 'ad4e2d066d4992844240f21579395580'); \ No newline at end of file diff --git a/build/wc-payment-method-paypal.js b/build/wc-payment-method-paypal.js new file mode 100644 index 00000000000..932469398b7 --- /dev/null +++ b/build/wc-payment-method-paypal.js @@ -0,0 +1 @@ +!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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=12)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},,function(e,t){e.exports=window.wp.htmlEntities},function(e,t){e.exports=window.wc.wcBlocksRegistry},,,,,,,function(e,t,n){"use strict";n.r(t);var o,r=n(0),c=n(5),i=n(1),u=n(2),a=n(4);const l=Object(u.getSetting)("paypal_data",{}),p=()=>Object(a.decodeEntities)(l.description||""),s={name:"paypal",label:Object(r.createElement)("img",{src:u.WC_ASSET_URL+"/images/paypal.png",alt:Object(a.decodeEntities)(l.title||Object(i.__)("PayPal","woo-gutenberg-products-block"))}),placeOrderButtonLabel:Object(i.__)("Proceed to PayPal","woo-gutenberg-products-block"),content:Object(r.createElement)(p,null),edit:Object(r.createElement)(p,null),canMakePayment:()=>!0,ariaLabel:Object(a.decodeEntities)(l.title||Object(i.__)("Payment via PayPal","woo-gutenberg-products-block")),supports:{features:null!==(o=l.supports)&&void 0!==o?o:[]}};Object(c.registerPaymentMethod)(s)}]); \ No newline at end of file diff --git a/build/wc-payment-method-stripe.asset.php b/build/wc-payment-method-stripe.asset.php new file mode 100644 index 00000000000..39cbcbdb270 --- /dev/null +++ b/build/wc-payment-method-stripe.asset.php @@ -0,0 +1 @@ + array('react', 'wc-blocks-registry', 'wc-settings', 'wp-element', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill'), 'version' => 'da6ade98c419502082c436cd6414e9f9'); \ No newline at end of file diff --git a/build/wc-payment-method-stripe.js b/build/wc-payment-method-stripe.js new file mode 100644 index 00000000000..1181cf6302b --- /dev/null +++ b/build/wc-payment-method-stripe.js @@ -0,0 +1 @@ +!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=10)}([function(e,t){e.exports=window.wp.element},function(e,t){e.exports=window.wp.i18n},function(e,t){e.exports=window.wc.wcSettings},function(e,t,r){!function(e,t){"use strict";function r(){}function n(){}t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,n.resetWarningCache=r;var o=function(e,t){return function(e){e.exports=function(){function e(e,t,r,n,o,a){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==a){var 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 o={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:n,resetWarningCache:r};return o.PropTypes=o,o}()}(t={exports:{}}),t.exports}();function a(e){return(a="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)}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r provider."));return e}(t.useContext(y),e)},g=function(e){return(0,e.children)(b("mounts "))};g.propTypes={children:o.func.isRequired};var h=function(e){var r=t.useRef(e);return t.useEffect((function(){r.current=e}),[e]),function(){r.current&&r.current.apply(r,arguments)}},E=function(){},v=function(e,r){var n,a="".concat((n=e).charAt(0).toUpperCase()+n.slice(1),"Element"),c=r?function(e){b("mounts <".concat(a,">"));var r=e.id,n=e.className;return t.createElement("div",{id:r,className:n})}:function(r){var n=r.id,o=r.className,c=r.options,s=void 0===c?{}:c,i=r.onBlur,l=void 0===i?E:i,p=r.onFocus,m=void 0===p?E:p,y=r.onReady,f=void 0===y?E:y,g=r.onChange,v=void 0===g?E:g,O=r.onEscape,w=void 0===O?E:O,C=r.onClick,_=void 0===C?E:C,j=b("mounts <".concat(a,">")).elements,R=t.useRef(null),S=t.useRef(null),P=h(f),T=h(l),A=h(m),x=h(_),k=h(v),I=h(w);t.useLayoutEffect((function(){if(null==R.current&&j&&null!=S.current){var t=j.create(e,s);R.current=t,t.mount(S.current),t.on("ready",(function(){return P(t)})),t.on("change",k),t.on("blur",T),t.on("focus",A),t.on("escape",I),t.on("click",x)}}));var M=u(s);return t.useEffect((function(){if(R.current){var e=d(s,M,["paymentRequest"]);e&&R.current.update(e)}}),[s,M]),t.useLayoutEffect((function(){return function(){R.current&&R.current.destroy()}}),[]),t.createElement("div",{id:n,className:o,ref:S})};return c.propTypes={id:o.string,className:o.string,onChange:o.func,onBlur:o.func,onFocus:o.func,onReady:o.func,onClick:o.func,options:o.object},c.displayName=a,c.__elementType=e,c},O="undefined"==typeof window,w=v("auBankAccount",O),C=v("card",O),_=v("cardNumber",O),j=v("cardExpiry",O),R=v("cardCvc",O),S=v("fpxBank",O),P=v("iban",O),T=v("idealBank",O),A=v("p24Bank",O),x=v("epsBank",O),k=v("payment",O),I=v("paymentRequestButton",O),M=v("linkAuthentication",O),q=v("shippingAddress",O),N=v("afterpayClearpayMessage",O);e.AfterpayClearpayMessageElement=N,e.AuBankAccountElement=w,e.CardCvcElement=R,e.CardElement=C,e.CardExpiryElement=j,e.CardNumberElement=_,e.Elements=f,e.ElementsConsumer=g,e.EpsBankElement=x,e.FpxBankElement=S,e.IbanElement=P,e.IdealBankElement=T,e.LinkAuthenticationElement=M,e.P24BankElement=A,e.PaymentElement=k,e.PaymentRequestButtonElement=I,e.ShippingAddressElement=q,e.useElements=function(){return b("calls useElements()").elements},e.useStripe=function(){return b("calls useStripe()").stripe},Object.defineProperty(e,"__esModule",{value:!0})}(t,r(9))},,function(e,t){e.exports=window.wc.wcBlocksRegistry},,function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t element.");return n.appendChild(r),r}(e)),n.addEventListener("load",(function(){window.Stripe?t(window.Stripe):r(new Error("Stripe.js not available"))})),n.addEventListener("error",(function(){r(new Error("Failed to load Stripe.js"))}))}catch(e){return void r(e)}else t(null)}));var e})),y=!1;m.catch((function(e){y||console.warn(e)}));var f=r(2);const b=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.map(e=>!!e.value&&{amount:e.value,label:e.label,pending:t}).filter(Boolean)},g=e=>e[0].shipping_rates.map(e=>({id:e.rate_id,label:e.name,detail:e.description,amount:parseInt(e.price,10)})),h=e=>({first_name:e.recipient.split(" ").slice(0,1).join(" "),last_name:e.recipient.split(" ").slice(1).join(" "),company:"",address_1:void 0===e.addressLine[0]?"":e.addressLine[0],address_2:void 0===e.addressLine[1]?"":e.addressLine[1],city:e.city,state:e.region,country:e.country,postcode:e.postalCode.replace(" ","")}),E=e=>{const t=e.source,r=t&&t.owner.name,n=t&&t.owner.address,o=e.payerEmail||"",a=e.payerPhone||"";return{first_name:r?r.split(" ").slice(0,1).join(" "):"",last_name:r?r.split(" ").slice(1).join(" "):"",email:t&&t.owner.email||o,phone:t&&t.owner.phone||a.replace("/[() -]/g",""),country:n&&n.country||"",address_1:n&&n.line1||"",address_2:n&&n.line2||"",city:n&&n.city||"",state:n&&n.state||"",postcode:n&&n.postal_code||"",company:""}},v=(e,t)=>({payment_method:"stripe",stripe_source:e.source?e.source.id:null,payment_request_type:t}),O={INVALID_EMAIL:"email_invalid",INVALID_REQUEST:"invalid_request_error",API_CONNECTION:"api_connection_error",API_ERROR:"api_error",AUTHENTICATION_ERROR:"authentication_error",RATE_LIMIT_ERROR:"rate_limit_error",CARD_ERROR:"card_error",VALIDATION_ERROR:"validation_error"},w=()=>{const e=Object(f.getSetting)("stripe_data",null);if(!e)throw new Error("Stripe initialization data is not available");return e},C=e=>({label:w().stripeTotalLabel||Object(s.__)("Total","woo-gutenberg-products-block"),amount:e.value}),_=e=>[O.INVALID_REQUEST,O.API_CONNECTION,O.API_ERROR,O.AUTHENTICATION_ERROR,O.RATE_LIMIT_ERROR].includes(e),j=e=>({invalid_number:Object(s.__)("The card number is not a valid credit card number.","woocommerce-gateway-stripe"),invalid_expiry_month:Object(s.__)("The card expiration month is invalid.","woocommerce-gateway-stripe"),invalid_expiry_year:Object(s.__)("The card expiration year is invalid.","woocommerce-gateway-stripe"),invalid_cvc:Object(s.__)("The card security code is invalid.","woocommerce-gateway-stripe"),incorrect_number:Object(s.__)("The card number is incorrect.","woocommerce-gateway-stripe"),incomplete_number:Object(s.__)("The card number is incomplete.","woocommerce-gateway-stripe"),incomplete_cvc:Object(s.__)("The card security code is incomplete.","woocommerce-gateway-stripe"),incomplete_expiry:Object(s.__)("The card expiration date is incomplete.","woocommerce-gateway-stripe"),expired_card:Object(s.__)("The card has expired.","woocommerce-gateway-stripe"),incorrect_cvc:Object(s.__)("The card security code is incorrect.","woocommerce-gateway-stripe"),incorrect_zip:Object(s.__)("The card zip code failed validation.","woocommerce-gateway-stripe"),invalid_expiry_year_past:Object(s.__)("The card expiration year is in the past","woocommerce-gateway-stripe"),card_declined:Object(s.__)("The card was declined.","woocommerce-gateway-stripe"),missing:Object(s.__)("There is no card on a customer that is being charged.","woocommerce-gateway-stripe"),processing_error:Object(s.__)("An error occurred while processing the card.","woocommerce-gateway-stripe")}[e]||null),R=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";switch(e){case O.INVALID_EMAIL:return Object(s.__)("Invalid email address, please correct and try again.","woo-gutenberg-products-block");case _(e):return Object(s.__)("Unable to process this payment, please try again or use alternative method.","woo-gutenberg-products-block");case O.CARD_ERROR:return j(t);case O.VALIDATION_ERROR:return""}return null},S=e=>{let{country:t,state:r,city:n,postcode:o}=e;return{country:t,state:r,city:n,postcode:o.replace(" ","").toUpperCase()}},P=()=>new Promise(e=>{try{e(function(){for(var e=arguments.length,t=new Array(e),r=0;r{const e=w().publicKey;if(!e)throw new Error("There is no api key available for stripe. Make sure it is available on the wc.stripe_data.stripe.key property.");return e})()))}catch(t){e({error:t})}});var T=r(3);const A={style:{base:{iconColor:"#666EE8",color:"#31325F",fontSize:((e,t,r)=>{let n={};if("object"==typeof document&&"function"==typeof document.querySelector&&"function"==typeof window.getComputedStyle){const e=document.querySelector(".wc-block-checkout");e&&(n=window.getComputedStyle(e))}return n.fontSize||"16px"})(),lineHeight:1.375,"::placeholder":{color:"#fff"}}},classes:{focus:"focused",empty:"empty",invalid:"has-error"}},x=e=>{const[t,r]=Object(c.useState)(!1),[n,o]=Object(c.useState)({...A,...e}),[a,s]=Object(c.useState)("");return Object(c.useEffect)(()=>{const e=t?"#CFD7E0":"#fff";o(r=>{const n=void 0!==r.showIcon?{showIcon:t}:{};return{...r,style:{...r.style,base:{...r.style.base,"::placeholder":{color:e}}},...n}})},[t]),{options:n,onActive:Object(c.useCallback)(e=>{r(!e||(e=>!e))},[r]),error:a,setError:s}},k=e=>{let{inputErrorComponent:t,onChange:r}=e;const[n,o]=Object(c.useState)(!0),{options:a,onActive:i,error:l,setError:u}=x({hidePostalCode:!0});return Object(c.createElement)(c.Fragment,null,Object(c.createElement)("div",{className:"wc-block-gateway-container wc-inline-card-element"},Object(c.createElement)(T.CardElement,{id:"wc-stripe-inline-card-element",className:"wc-block-gateway-input",options:a,onBlur:()=>i(n),onFocus:()=>i(n),onChange:e=>{e.error?u(e.error.message):u(""),o(e.empty),r(e)}}),Object(c.createElement)("label",{htmlFor:"wc-stripe-inline-card-element"},Object(s.__)("Credit Card Information","woo-gutenberg-products-block"))),Object(c.createElement)(t,{errorMessage:l}))},I=e=>{let{onChange:t,inputErrorComponent:r}=e;const[n,o]=Object(c.useState)({cardNumber:!0,cardExpiry:!0,cardCvc:!0}),{options:a,onActive:i,error:l,setError:u}=x({showIcon:!1}),{options:p,onActive:d,error:m,setError:y}=x(),{options:f,onActive:b,error:g,setError:h}=x(),E=(e,r)=>a=>{a.error?e(a.error.message):e(""),o({...n,[r]:a.empty}),t(a)};return Object(c.createElement)("div",{className:"wc-block-card-elements"},Object(c.createElement)("div",{className:"wc-block-gateway-container wc-card-number-element"},Object(c.createElement)(T.CardNumberElement,{onChange:E(u,"cardNumber"),options:a,className:"wc-block-gateway-input",id:"wc-stripe-card-number-element",onFocus:()=>i(n.cardNumber),onBlur:()=>i(n.cardNumber)}),Object(c.createElement)("label",{htmlFor:"wc-stripe-card-number-element"},Object(s.__)("Card Number","woo-gutenberg-products-block")),Object(c.createElement)(r,{errorMessage:l})),Object(c.createElement)("div",{className:"wc-block-gateway-container wc-card-expiry-element"},Object(c.createElement)(T.CardExpiryElement,{onChange:E(y,"cardExpiry"),options:p,className:"wc-block-gateway-input",onFocus:()=>d(n.cardExpiry),onBlur:()=>d(n.cardExpiry),id:"wc-stripe-card-expiry-element"}),Object(c.createElement)("label",{htmlFor:"wc-stripe-card-expiry-element"},Object(s.__)("Expiry Date","woo-gutenberg-products-block")),Object(c.createElement)(r,{errorMessage:m})),Object(c.createElement)("div",{className:"wc-block-gateway-container wc-card-cvc-element"},Object(c.createElement)(T.CardCvcElement,{onChange:E(h,"cardCvc"),options:f,className:"wc-block-gateway-input",onFocus:()=>b(n.cardCvc),onBlur:()=>b(n.cardCvc),id:"wc-stripe-card-code-element"}),Object(c.createElement)("label",{htmlFor:"wc-stripe-card-code-element"},Object(s.__)("CVV/CVC","woo-gutenberg-products-block")),Object(c.createElement)(r,{errorMessage:g})))},M=()=>Object.entries(w().icons).map(e=>{let[t,{src:r,alt:n}]=e;return{id:t,src:r,alt:n}}),q=e=>{let{billing:t,eventRegistration:r,emitResponse:n,components:o}=e;const{ValidationInputError:a,PaymentMethodIcons:s}=o,[i,l]=Object(c.useState)(""),u=Object(T.useStripe)(),p=((e,t,r,n,o,a)=>{const[s,i]=Object(c.useState)(""),l=Object(c.useCallback)(e=>{var t;const r=e.error.type,n=e.error.code||"",o=null!==(t=R(r,n))&&void 0!==t?t:e.error.message;return i(o),o},[]),{onCheckoutAfterProcessingWithSuccess:u,onPaymentProcessing:p,onCheckoutAfterProcessingWithError:d}=e;return((e,t,r,n)=>{Object(c.useEffect)(()=>{const o=t(async t=>{let{processingResponse:o}=t;const a=o.paymentDetails||{},c=await(e=>{let{stripe:t,paymentDetails:r,errorContext:n,errorType:o,successType:a}=e;const c={type:a};if(!r.setup_intent&&!r.payment_intent_secret)return c;const s=!!r.setupIntent,i=r.verification_endpoint,l=s?r.setup_intent:r.payment_intent_secret;return t[s?"confirmCardSetup":"confirmCardPayment"](l).then((function(e){if(e.error)throw e.error;const t=e[s?"setupIntent":"paymentIntent"];return"requires_capture"!==t.status&&"succeeded"!==t.status||(c.redirectUrl=i),c})).catch((function(e){return c.type=o,c.message=e.message,c.retry=!0,c.messageContext=n,window.fetch(i+"&is_ajax"),c}))})({stripe:e,paymentDetails:a,errorContext:n.noticeContexts.PAYMENTS,errorType:n.responseTypes.ERROR,successType:n.responseTypes.SUCCESS});return c.type===n.responseTypes.ERROR&&c.retry&&r("0"),c});return()=>o()},[t,n.noticeContexts.PAYMENTS,n.responseTypes.ERROR,n.responseTypes.SUCCESS,r,e])})(a,u,n,o),((e,t,r,n,o,a,s,i)=>{const l=Object(T.useElements)();Object(c.useEffect)(()=>{const c=i(async()=>{try{const c=n.billingData;if(t)return{type:o.responseTypes.ERROR,message:t};if(""!==a&&"0"!==a)return{type:o.responseTypes.SUCCESS,meta:{paymentMethodData:{paymentMethod:"stripe",paymentRequestType:"cc",stripe_source:a},billingData:c}};const i={address:{line1:c.address_1,line2:c.address_2,city:c.city,state:c.state,postal_code:c.postcode,country:c.country}};c.phone&&(i.phone=c.phone),c.email&&(i.email=c.email),(c.first_name||c.last_name)&&(i.name=`${c.first_name} ${c.last_name}`);const u=await(async e=>{const t=w().inline_cc_form?T.CardElement:T.CardNumberElement;return await r.createSource(null==l?void 0:l.getElement(t),{type:"card",owner:e})})(i);if(u.error)return{type:o.responseTypes.ERROR,message:e(u)};if(!u.source||!u.source.id)throw new Error(R(O.API_ERROR));return s(u.source.id),{type:o.responseTypes.SUCCESS,meta:{paymentMethodData:{stripe_source:u.source.id,paymentMethod:"stripe",paymentRequestType:"cc"},billingData:c}}}catch(e){return{type:o.responseTypes.ERROR,message:e}}});return()=>{c()}},[i,n.billingData,r,a,s,e,t,o.noticeContexts.PAYMENTS,o.responseTypes.ERROR,o.responseTypes.SUCCESS,l])})(l,s,a,t,o,r,n,p),Object(c.useEffect)(()=>{const e=d(e=>{var t;let{processingResponse:r}=e;return null==r||null===(t=r.paymentDetails)||void 0===t||!t.errorMessage||{type:o.responseTypes.ERROR,message:r.paymentDetails.errorMessage,messageContext:o.noticeContexts.PAYMENTS}});return()=>{e()}},[d,o.noticeContexts.PAYMENTS,o.responseTypes.ERROR]),l})(r,t,i,l,n,u),d=e=>{e.error&&p(e),l("0")},m=M(),y=w().inline_cc_form?Object(c.createElement)(k,{onChange:d,inputErrorComponent:a}):Object(c.createElement)(I,{onChange:d,inputErrorComponent:a});return Object(c.createElement)(c.Fragment,null,y,s&&m.length&&Object(c.createElement)(s,{icons:m,align:"left"}))},N=e=>{const{locale:t}=w().button,{stripe:r}=e;return Object(c.createElement)(T.Elements,{stripe:r,locale:t},Object(c.createElement)(q,e))};var L,D;const H=P(),B=e=>{const[t,r]=Object(c.useState)("");return Object(c.useEffect)(()=>{Promise.resolve(H).then(e=>{let{error:t}=e;t&&r(t.message)})},[r]),Object(c.useEffect)(()=>{if(t)throw new Error(t)},[t]),Object(c.createElement)(N,a()({stripe:H},e))},U=M();var F={name:"stripe",label:Object(c.createElement)(e=>{const{PaymentMethodLabel:t}=e.components,r=w().title?w().title:Object(s.__)("Credit / Debit Card","woo-gutenberg-products-block");return Object(c.createElement)(t,{text:r})},null),content:Object(c.createElement)(B,null),edit:Object(c.createElement)(B,null),icons:U,canMakePayment:()=>H,ariaLabel:Object(s.__)("Stripe Credit Card payment method","woo-gutenberg-products-block"),supports:{showSavedCards:w().showSavedCards,showSaveOption:w().showSaveOption,features:null!==(L=null===(D=w())||void 0===D?void 0:D.supports)&&void 0!==L?L:[]}};const V={shippingAddressChange:null,shippingOptionChange:null,source:null};var W=r(8),Y=r.n(W);const Z=e=>{let{shippingData:t,billing:r,eventRegistration:n,onSubmit:o,setExpressPaymentError:a,emitResponse:i,onClick:l,onClose:u}=e;const{paymentRequest:p,paymentRequestEventHandlers:d,clearPaymentRequestEventHandler:m,isProcessing:y,canMakePayment:O,onButtonClick:_,abortPayment:j,completePayment:R,paymentRequestType:P}=(e=>{let{billing:t,shippingData:r,setExpressPaymentError:n,onClick:o,onClose:a,onSubmit:i}=e;const l=Object(T.useStripe)(),[u,p]=Object(c.useState)(null),[d,m]=Object(c.useState)(!1),[y,E]=Object(c.useState)(!1),[v,O]=Object(c.useState)(!1),[_,j]=Object(c.useState)(""),R=Object(c.useRef)(r),{paymentRequestEventHandlers:P,clearPaymentRequestEventHandler:A,setPaymentRequestEventHandler:x}=(()=>{const[e,t]=Object(c.useState)(V);return{paymentRequestEventHandlers:e,setPaymentRequestEventHandler:Object(c.useCallback)((e,r)=>{t(t=>({...t,[e]:r}))},[t]),clearPaymentRequestEventHandler:Object(c.useCallback)(e=>{t(t=>{const{[e]:__,...r}=t;return r})},[t])}})();Object(c.useEffect)(()=>{R.current=r},[r]),Object(c.useEffect)(()=>{var e;if(!l||!t.cartTotal.value||d||y||u)return;const n=(e=>{let{stripe:t,total:r,currencyCode:n,countryCode:o,shippingRequired:a,cartTotalItems:c}=e;const s={total:C(r),currency:n,country:o||"US",requestPayerName:!0,requestPayerEmail:!0,requestPayerPhone:!0,requestShipping:a,displayItems:b(c)};return t.paymentRequest(s)})({total:t.cartTotal,currencyCode:t.currency.code.toLowerCase(),countryCode:null===(e=Object(f.getSetting)("baseLocation",{}))||void 0===e?void 0:e.country,shippingRequired:r.needsShipping,cartTotalItems:t.cartTotalItems,stripe:l});(e=>new Promise(t=>{e.canMakePayment().then(e=>{if(e){const r=e.applePay?"apple_pay":"payment_request_api";t({canPay:!0,requestType:r})}else t({canPay:!1})})}))(n).then(e=>{p(n),j(e.requestType||""),O(e.canPay)})},[t.cartTotal,t.currency.code,r.needsShipping,t.cartTotalItems,l,y,d,u]);const k=Object(c.useCallback)(()=>{E(!0),m(!1),n(""),(e=>{let{paymentRequest:t,total:r,currencyCode:n,cartTotalItems:o}=e;t.update({total:C(r),currency:n,displayItems:b(o)})})({paymentRequest:u,total:t.cartTotal,currencyCode:t.currency.code.toLowerCase(),cartTotalItems:t.cartTotalItems}),o()},[o,u,n,t.cartTotal,t.currency.code,t.cartTotalItems]),I=Object(c.useCallback)(e=>{e.complete("fail"),E(!1),m(!0)},[]),M=Object(c.useCallback)(e=>{e.complete("success"),m(!0),E(!1)},[]);return Object(c.useEffect)(()=>{const e={removeAllListeners:()=>{}};let t=e,r=e,o=e,c=e;if(u){const e=()=>{m(!1),E(!1),p(null),a()},l=e=>{const t=h(e.shippingAddress);Y()(S(t),S(R.current.shippingAddress))?e.updateWith({status:"success",shippingOptions:g(R.current.shippingRates)}):(R.current.setShippingAddress(h(e.shippingAddress)),x("shippingAddressChange",e))},d=e=>{R.current.setSelectedRates(e.shippingOption.id),x("shippingOptionChange",e)},y=e=>{w().allowPrepaidCard||!e.source.card.funding?(x("sourceEvent",e),i()):n(Object(s.__)("Sorry, we're not accepting prepaid cards at this time.","woocommerce-gateway-stripe"))};t=u.on("shippingaddresschange",l),r=u.on("shippingoptionchange",d),o=u.on("source",y),c=u.on("cancel",e)}return()=>{u&&(t.removeAllListeners(),r.removeAllListeners(),o.removeAllListeners(),c.removeAllListeners())}},[u,v,y,x,n,i,a]),{paymentRequest:u,paymentRequestEventHandlers:P,clearPaymentRequestEventHandler:A,isProcessing:y,canMakePayment:v,onButtonClick:k,abortPayment:I,completePayment:M,paymentRequestType:_}})({billing:r,shippingData:t,setExpressPaymentError:a,onClick:l,onClose:u,onSubmit:o});(e=>{let{canMakePayment:t,isProcessing:r,eventRegistration:n,paymentRequestEventHandlers:o,clearPaymentRequestEventHandler:a,billing:s,shippingData:i,emitResponse:l,paymentRequestType:u,completePayment:p,abortPayment:d}=e;const{onShippingRateSuccess:m,onShippingRateFail:y,onShippingRateSelectSuccess:f,onShippingRateSelectFail:O,onPaymentProcessing:w,onCheckoutAfterProcessingWithSuccess:_,onCheckoutAfterProcessingWithError:j}=n,{noticeContexts:R,responseTypes:S}=l,P=Object(c.useRef)(o),T=Object(c.useRef)(s),A=Object(c.useRef)(i),x=Object(c.useRef)(u);Object(c.useEffect)(()=>{P.current=o,T.current=s,A.current=i,x.current=u},[o,s,i,u]),Object(c.useEffect)(()=>{const e=e=>{const t=P.current;t.shippingAddressChange&&r&&t.shippingAddressChange.updateWith({status:e.hasInvalidAddress?"invalid_shipping_address":"fail",shippingOptions:[]}),a("shippingAddressChange")},n=()=>{const e=P.current;return e.sourceEvent&&r?{type:S.SUCCESS,meta:{billingData:E(e.sourceEvent),paymentMethodData:v(e.sourceEvent,x.current),shippingData:(t=e.sourceEvent,t.shippingAddress?{address:h(t.shippingAddress)}:null)}}:{type:S.SUCCESS};var t},o=e=>{const t=P.current;let n={type:S.SUCCESS};if(t.sourceEvent&&r){const{paymentStatus:r,paymentDetails:o}=e.processingResponse;r===S.SUCCESS&&p(t.sourceEvent),r!==S.ERROR&&r!==S.FAIL||(d(t.sourceEvent),n={type:S.ERROR,message:null==o?void 0:o.errorMessage,messageContext:R.EXPRESS_PAYMENTS,retry:!0}),a("sourceEvent")}return n};if(t&&r){const t=m(e=>{const t=P.current,n=T.current;t.shippingAddressChange&&r&&(t.shippingAddressChange.updateWith({status:"success",shippingOptions:g(e),total:C(n.cartTotal),displayItems:b(n.cartTotalItems)}),a("shippingAddressChange"))}),c=y(e),s=f(function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return()=>{const t=P.current,n=A.current,o=T.current;if(t.shippingOptionChange&&!n.isSelectingRate&&r){const r=e?{status:"success",total:C(o.cartTotal),displayItems:b(o.cartTotalItems)}:{status:"fail"};t.shippingOptionChange.updateWith(r),a("shippingOptionChange")}}}()),i=O(e),l=w(n),u=_(o),p=j(o);return()=>{p(),u(),l(),c(),t(),s(),i()}}},[t,r,m,y,f,O,w,_,j,S,R,p,d,a])})({canMakePayment:O,isProcessing:y,eventRegistration:n,paymentRequestEventHandlers:d,clearPaymentRequestEventHandler:m,billing:r,shippingData:t,emitResponse:i,paymentRequestType:P,completePayment:R,abortPayment:j});const{theme:A}=w().button,x={paymentRequestButton:{type:"default",theme:A,height:"48px"}};return O&&p?Object(c.createElement)(T.PaymentRequestButtonElement,{onClick:_,options:{style:x,paymentRequest:p}}):null};var z,$;const Q=P(),K=P();let X=!1,G=!1;var J={name:"payment_request",content:Object(c.createElement)(e=>{const{locale:t}=w().button,{stripe:r}=e;return Object(c.createElement)(T.Elements,{stripe:r,locale:t},Object(c.createElement)(Z,e))},{stripe:K}),edit:Object(c.createElement)(()=>Object(c.createElement)("img",{src:"data:image/svg+xml,%3Csvg width='264' height='48' viewBox='0 0 264 48' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='264' height='48' rx='3' fill='black'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M125.114 16.6407C125.682 15.93 126.067 14.9756 125.966 14C125.135 14.0415 124.121 14.549 123.533 15.2602C123.006 15.8693 122.539 16.8641 122.661 17.7983C123.594 17.8797 124.526 17.3317 125.114 16.6407Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M125.955 17.982C124.601 17.9011 123.448 18.7518 122.801 18.7518C122.154 18.7518 121.163 18.0224 120.092 18.0421C118.696 18.0629 117.402 18.8524 116.694 20.1079C115.238 22.6196 116.31 26.3453 117.726 28.3909C118.414 29.4028 119.242 30.5174 120.334 30.4769C121.366 30.4365 121.77 29.8087 123.024 29.8087C124.277 29.8087 124.641 30.4769 125.733 30.4567C126.865 30.4365 127.573 29.4443 128.261 28.4313C129.049 27.2779 129.373 26.1639 129.393 26.1027C129.373 26.0825 127.209 25.2515 127.189 22.7606C127.169 20.6751 128.888 19.6834 128.969 19.6217C127.998 18.1847 126.481 18.0224 125.955 17.982Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M136.131 23.1804H138.834C140.886 23.1804 142.053 22.0752 142.053 20.1592C142.053 18.2432 140.886 17.1478 138.845 17.1478H136.131V23.1804ZM139.466 15.1582C142.411 15.1582 144.461 17.1903 144.461 20.1483C144.461 23.1172 142.369 25.1596 139.392 25.1596H136.131V30.3498H133.775V15.1582H139.466Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M152.198 26.224V25.3712L149.579 25.5397C148.106 25.6341 147.339 26.182 147.339 27.14C147.339 28.0664 148.138 28.6667 149.39 28.6667C150.988 28.6667 152.198 27.6449 152.198 26.224ZM145.046 27.2032C145.046 25.2551 146.529 24.1395 149.263 23.971L152.198 23.7922V22.9498C152.198 21.7181 151.388 21.0442 149.947 21.0442C148.758 21.0442 147.896 21.6548 147.717 22.5916H145.592C145.656 20.6232 147.507 19.1914 150.01 19.1914C152.703 19.1914 154.459 20.602 154.459 22.7917V30.351H152.282V28.5298H152.229C151.609 29.719 150.241 30.4666 148.758 30.4666C146.571 30.4666 145.046 29.1612 145.046 27.2032Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M156.461 34.4145V32.5934C156.608 32.6141 156.965 32.6354 157.155 32.6354C158.196 32.6354 158.785 32.1932 159.142 31.0564L159.353 30.3824L155.366 19.3281H157.827L160.604 28.298H160.657L163.434 19.3281H165.832L161.698 30.9402C160.752 33.6038 159.668 34.4778 157.376 34.4778C157.197 34.4778 156.618 34.4565 156.461 34.4145Z' fill='white'/%3E%3C/svg%3E%0A",alt:""}),null),canMakePayment:e=>{var t,r,n;return function(e){let{currencyCode:t,totalPrice:r}=e;return!(r<30)&&(X?G:Q.then(e=>{var n;if(null===e)return X=!0,G;if(e.error&&e.error instanceof Error)throw e.error;return e.paymentRequest({total:{label:"Total",amount:r,pending:!0},country:null===(n=Object(f.getSetting)("baseLocation",{}))||void 0===n?void 0:n.country,currency:t}).canMakePayment().then(e=>(G=!!e,X=!0,G))}))}({currencyCode:null==e||null===(t=e.cartTotals)||void 0===t||null===(r=t.currency_code)||void 0===r?void 0:r.toLowerCase(),totalPrice:parseInt((null==e||null===(n=e.cartTotals)||void 0===n?void 0:n.total_price)||0,10)})},paymentMethodId:"stripe",supports:{features:null!==(z=null===($=w())||void 0===$?void 0:$.supports)&&void 0!==z?z:[]}};Object(n.registerPaymentMethod)(F),w().allowPaymentRequest&&Object(n.registerExpressPaymentMethod)(J)}]); \ No newline at end of file diff --git a/build/wc-settings.asset.php b/build/wc-settings.asset.php new file mode 100644 index 00000000000..e29911d1083 --- /dev/null +++ b/build/wc-settings.asset.php @@ -0,0 +1 @@ + array('wp-hooks', 'wp-i18n', 'wp-polyfill'), 'version' => '7b4e33e844ee129c6a464625c2e3f392'); \ No newline at end of file diff --git a/build/wc-settings.js b/build/wc-settings.js new file mode 100644 index 00000000000..eb802acd4d7 --- /dev/null +++ b/build/wc-settings.js @@ -0,0 +1 @@ +this.wc=this.wc||{},this.wc.wcSettings=function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=138)}({1:function(e,t){e.exports=window.wp.i18n},138:function(e,t,o){"use strict";o.r(t),o.d(t,"ADMIN_URL",(function(){return u})),o.d(t,"COUNTRIES",(function(){return a})),o.d(t,"CURRENCY",(function(){return s})),o.d(t,"CURRENT_USER_IS_ADMIN",(function(){return l})),o.d(t,"HOME_URL",(function(){return d})),o.d(t,"LOCALE",(function(){return p})),o.d(t,"ORDER_STATUSES",(function(){return b})),o.d(t,"PLACEHOLDER_IMG_SRC",(function(){return f})),o.d(t,"SITE_TITLE",(function(){return _})),o.d(t,"STORE_PAGES",(function(){return g})),o.d(t,"WC_ASSET_URL",(function(){return m})),o.d(t,"WC_VERSION",(function(){return w})),o.d(t,"WP_LOGIN_URL",(function(){return y})),o.d(t,"WP_VERSION",(function(){return h})),o.d(t,"defaultAddressFields",(function(){return S})),o.d(t,"getSetting",(function(){return j})),o.d(t,"getSettingWithCoercion",(function(){return L})),o.d(t,"isWpVersion",(function(){return U})),o.d(t,"isWcVersion",(function(){return E})),o.d(t,"getAdminLink",(function(){return I})),o.d(t,"allSettings",(function(){return c}));var n=o(26);Object(n.addFilter)("woocommerce_admin_analytics_settings","woocommerce-blocks/exclude-draft-status-from-analytics",e=>{const t=e=>"customStatuses"===e.key?{...e,options:e.options.filter(e=>"checkout-draft"!==e.value)}:e,o=e.woocommerce_actionable_order_statuses.options.map(t),n=e.woocommerce_excluded_report_order_statuses.options.map(t);return{...e,woocommerce_actionable_order_statuses:{...e.woocommerce_actionable_order_statuses,options:o},woocommerce_excluded_report_order_statuses:{...e.woocommerce_excluded_report_order_statuses,options:n}}});const r={adminUrl:"",countries:[],currency:{code:"USD",precision:2,symbol:"$",symbolPosition:"left",decimalSeparator:".",priceFormat:"%1$s%2$s",thousandSeparator:","},currentUserIsAdmin:!1,homeUrl:"",locale:{siteLocale:"en_US",userLocale:"en_US",weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},orderStatuses:[],placeholderImgSrc:"",siteTitle:"",storePages:[],wcAssetUrl:"",wcVersion:"",wpLoginUrl:"",wpVersion:""},i="object"==typeof window.wcSettings?window.wcSettings:{},c={...r,...i};c.currency={...r.currency,...c.currency},c.locale={...r.locale,...c.locale};const u=c.adminUrl,a=c.countries,s=c.currency,l=c.currentUserIsAdmin,d=c.homeUrl,p=c.locale,b=c.orderStatuses,f=c.placeholderImgSrc,_=c.siteTitle,g=c.storePages,m=c.wcAssetUrl,w=c.wcVersion,y=c.wpLoginUrl,h=c.wpVersion;var v=o(1);const S={first_name:{label:Object(v.__)("First name","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("First name (optional)","woo-gutenberg-products-block"),autocomplete:"given-name",autocapitalize:"sentences",required:!0,hidden:!1,index:10},last_name:{label:Object(v.__)("Last name","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("Last name (optional)","woo-gutenberg-products-block"),autocomplete:"family-name",autocapitalize:"sentences",required:!0,hidden:!1,index:20},company:{label:Object(v.__)("Company","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("Company (optional)","woo-gutenberg-products-block"),autocomplete:"organization",autocapitalize:"sentences",required:!1,hidden:!1,index:30},address_1:{label:Object(v.__)("Address","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("Address (optional)","woo-gutenberg-products-block"),autocomplete:"address-line1",autocapitalize:"sentences",required:!0,hidden:!1,index:40},address_2:{label:Object(v.__)("Apartment, suite, etc.","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("Apartment, suite, etc. (optional)","woo-gutenberg-products-block"),autocomplete:"address-line2",autocapitalize:"sentences",required:!1,hidden:!1,index:50},country:{label:Object(v.__)("Country/Region","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("Country/Region (optional)","woo-gutenberg-products-block"),autocomplete:"country",required:!0,hidden:!1,index:60},city:{label:Object(v.__)("City","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("City (optional)","woo-gutenberg-products-block"),autocomplete:"address-level2",autocapitalize:"sentences",required:!0,hidden:!1,index:70},state:{label:Object(v.__)("State/County","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("State/County (optional)","woo-gutenberg-products-block"),autocomplete:"address-level1",autocapitalize:"sentences",required:!0,hidden:!1,index:80},postcode:{label:Object(v.__)("Postal code","woo-gutenberg-products-block"),optionalLabel:Object(v.__)("Postal code (optional)","woo-gutenberg-products-block"),autocomplete:"postal-code",autocapitalize:"characters",required:!0,hidden:!1,index:90}};var O=o(27),x=o.n(O);const j=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(e,t)=>void 0!==e?e:t;const n=e in c?c[e]:t;return o(n,t)},L=(e,t,o)=>{const n=e in c?c[e]:t;return o(n,t)?n:t},k=(e,t,o)=>{let n=j(e,"").replace(/-[a-zA-Z0-9]*[\-]*/,".0-rc.");return n=n.endsWith(".")?n.substring(0,n.length-1):n,x.a.compare(n,t,o)},U=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=";return k("wpVersion",e,t)},E=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"=";return k("wcVersion",e,t)},I=e=>j("adminUrl")+e},26:function(e,t){e.exports=window.wp.hooks},27:function(e,t,o){var n,r;void 0===(r="function"==typeof(n=function(){var e=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;function t(e){var t,o=e.replace(/^v/,"").replace(/\+.*$/,""),n=("-",-1===(t=o).indexOf("-")?t.length:t.indexOf("-")),r=o.substring(0,n).split(".");return r.push(o.substring(n+1)),r}function o(e){return isNaN(Number(e))?e:Number(e)}function n(t){if("string"!=typeof t)throw new TypeError("Invalid argument expected string");if(!e.test(t))throw new Error("Invalid argument not valid semver ('"+t+"' received)")}function r(e,r){[e,r].forEach(n);for(var i=t(e),c=t(r),u=0;us)return 1;if(s>a)return-1}var l=i[i.length-1],d=c[c.length-1];if(l&&d){var p=l.split(".").map(o),b=d.split(".").map(o);for(u=0;ub[u])return 1;if(b[u]>p[u])return-1}}else if(l||d)return l?-1:1;return 0}var i=[">",">=","=","<","<="],c={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};return r.validate=function(t){return"string"==typeof t&&e.test(t)},r.compare=function(e,t,o){!function(e){if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===i.indexOf(e))throw new TypeError("Invalid operator, expected one of "+i.join("|"))}(o);var n=r(e,t);return c[o].indexOf(n)>-1},r})?n.apply(t,[]):n)||(e.exports=r)}}); \ No newline at end of file