Version Description
- 2022-10-21 =
Bug fixes
- Compatibility fix for Cart and Checkout inner blocks for WordPress 6.1. (7447)
Download this release
Release Info
Developer | automattic |
Plugin | WooCommerce Gutenberg Products Block |
Version | 8.7.4 |
Comparing to | |
See all releases |
Code changes from version 8.7.3 to 8.7.4
- assets/js/blocks/cart-checkout-shared/use-forced-layout.ts +2 -6
- build/cart.asset.php +1 -1
- build/cart.js +1 -1
- build/checkout.asset.php +1 -1
- build/checkout.js +1 -1
- build/mini-cart-contents.asset.php +1 -1
- build/mini-cart-contents.js +1 -1
- readme.txt +7 -2
- src/Package.php +1 -1
- vendor/autoload.php +1 -1
- vendor/autoload_packages.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +4 -4
- vendor/composer/installed.php +2 -2
- vendor/composer/jetpack_autoload_filemap.php +2 -2
- vendor/composer/jetpack_autoload_psr4.php +3 -3
- vendor/jetpack-autoloader/class-autoloader-handler.php +1 -1
- vendor/jetpack-autoloader/class-autoloader-locator.php +1 -1
- vendor/jetpack-autoloader/class-autoloader.php +1 -1
- vendor/jetpack-autoloader/class-container.php +1 -1
- vendor/jetpack-autoloader/class-hook-manager.php +1 -1
- vendor/jetpack-autoloader/class-latest-autoloader-guard.php +1 -1
- vendor/jetpack-autoloader/class-manifest-reader.php +1 -1
- vendor/jetpack-autoloader/class-path-processor.php +1 -1
- vendor/jetpack-autoloader/class-php-autoloader.php +1 -1
- vendor/jetpack-autoloader/class-plugin-locator.php +1 -1
- vendor/jetpack-autoloader/class-plugins-handler.php +1 -1
- vendor/jetpack-autoloader/class-shutdown-handler.php +1 -1
- vendor/jetpack-autoloader/class-version-loader.php +1 -1
- vendor/jetpack-autoloader/class-version-selector.php +1 -1
- woocommerce-gutenberg-products-block.php +1 -1
assets/js/blocks/cart-checkout-shared/use-forced-layout.ts
CHANGED
@@ -6,7 +6,6 @@ import {
|
|
6 |
useRef,
|
7 |
useCallback,
|
8 |
useMemo,
|
9 |
-
useState,
|
10 |
} from '@wordpress/element';
|
11 |
import { useSelect, useDispatch } from '@wordpress/data';
|
12 |
import {
|
@@ -42,8 +41,6 @@ export const useForcedLayout = ( {
|
|
42 |
} ): void => {
|
43 |
const currentRegisteredBlocks = useRef( registeredBlocks );
|
44 |
const currentDefaultTemplate = useRef( defaultTemplate );
|
45 |
-
const [ forcedBlocksInserted, setForcedBlocksInserted ] =
|
46 |
-
useState< number >( 0 );
|
47 |
|
48 |
const { insertBlock, replaceInnerBlocks } =
|
49 |
useDispatch( 'core/block-editor' );
|
@@ -58,18 +55,17 @@ export const useForcedLayout = ( {
|
|
58 |
),
|
59 |
};
|
60 |
},
|
61 |
-
[ clientId, currentRegisteredBlocks.current
|
62 |
);
|
63 |
|
64 |
const appendBlock = useCallback(
|
65 |
( block, position ) => {
|
66 |
const newBlock = createBlock( block.name );
|
67 |
insertBlock( newBlock, position, clientId, false );
|
68 |
-
setForcedBlocksInserted( forcedBlocksInserted + 1 );
|
69 |
},
|
70 |
// We need to skip insertBlock here due to a cache issue in wordpress.com that causes an inifinite loop, see https://github.com/Automattic/wp-calypso/issues/66092 for an expanded doc.
|
71 |
// eslint-disable-next-line react-hooks/exhaustive-deps
|
72 |
-
[ clientId
|
73 |
);
|
74 |
|
75 |
const lockedBlockTypes = useMemo(
|
6 |
useRef,
|
7 |
useCallback,
|
8 |
useMemo,
|
|
|
9 |
} from '@wordpress/element';
|
10 |
import { useSelect, useDispatch } from '@wordpress/data';
|
11 |
import {
|
41 |
} ): void => {
|
42 |
const currentRegisteredBlocks = useRef( registeredBlocks );
|
43 |
const currentDefaultTemplate = useRef( defaultTemplate );
|
|
|
|
|
44 |
|
45 |
const { insertBlock, replaceInnerBlocks } =
|
46 |
useDispatch( 'core/block-editor' );
|
55 |
),
|
56 |
};
|
57 |
},
|
58 |
+
[ clientId, currentRegisteredBlocks.current ]
|
59 |
);
|
60 |
|
61 |
const appendBlock = useCallback(
|
62 |
( block, position ) => {
|
63 |
const newBlock = createBlock( block.name );
|
64 |
insertBlock( newBlock, position, clientId, false );
|
|
|
65 |
},
|
66 |
// We need to skip insertBlock here due to a cache issue in wordpress.com that causes an inifinite loop, see https://github.com/Automattic/wp-calypso/issues/66092 for an expanded doc.
|
67 |
// eslint-disable-next-line react-hooks/exhaustive-deps
|
68 |
+
[ clientId ]
|
69 |
);
|
70 |
|
71 |
const lockedBlockTypes = useMemo(
|
build/cart.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => 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-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', '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' => '
|
1 |
+
<?php return array('dependencies' => 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-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', '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' => '025a1b893f3aec006651b734794cae21');
|
build/cart.js
CHANGED
@@ -43,7 +43,7 @@ Object(i.__)("Remove","woo-gutenberg-products-block"):Object(i.sprintf)(
|
|
43 |
Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},h=p?j:{},_=p?{"aria-hidden":!0}:j;return Object(o.createElement)(d,n()({},g,h,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(o.createElement)(O,n()({className:"wc-block-components-chip__remove"},_),Object(o.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},,,,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.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return i}));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=e=>{let{preserveCartData:t=!1}=e;n("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},i=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,"a",(function(){return o}));var r=c(95),n=(c(16),c(2));const o=e=>{const t=Object.keys(n.defaultAddressFields),c=Object(r.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(98);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";var r=c(0),n=c(13);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){},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(0),n=c(11),o=c(5),a=c(46),s=c(3),i=c(1),l=c(4),u=c.n(l);c(297);const d=[],p=e=>{let{block:t}=e;const[c,n]=(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_sidebar_compatibility_notices",d),[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),o=Object(r.createInterpolateElement)(Object(i.__)("The Cart & Checkout Blocks are a beta feature to optimize for faster checkout. To make sure this feature is right for your store, <a>review the list of compatible extensions</a>.","woo-gutenberg-products-block"),{a:Object(r.createElement)(s.ExternalLink,{href:"https://woocommerce.com/document/cart-checkout-blocks-support-status/#section-3"})});return Object(r.createElement)(s.Notice,{onRemove:n,className:u()(["wc-blocks-sidebar-compatibility-notice",{"is-hidden":!c}])},o)};var b=c(172),m=c(14),g=c.n(m),O=c(173),j=c(7),h=c(22),_=c(2);function E(e){let{block:t}=e;const c="checkout"===t?h.e:h.c,n="checkout"===t?"woocommerce_checkout_page_id":"woocommerce_cart_page_id",o="checkout"===t?Object(i.__)("If you would like to use this block as your default checkout, update your page settings","woo-gutenberg-products-block"):Object(i.__)("If you would like to use this block as your default cart, update your page settings","woo-gutenberg-products-block"),{saveEntityRecord:a}=Object(j.useDispatch)(O.store),{editPost:l,savePost:u}=Object(j.useDispatch)(b.store),{slug:d,isLoadingPage:p,postPublished:m,currentPostId:_}=Object(j.useSelect)(e=>{var r;const{getEntityRecord:n,isResolving:o}=e(O.store),{isCurrentPostPublished:a,getCurrentPostId:s}=e(b.store);return{slug:(null===(r=n("postType","page",c))||void 0===r?void 0:r.slug)||t,isLoadingPage:o("getEntityRecord",["postType","page",c]),postPublished:a(),currentPostId:s()}},[]),[E,f]=Object(r.useState)("pristine"),y=Object(r.useCallback)(()=>{f("updating"),Promise.resolve().then(()=>g()({path:"/wc/v3/settings/advanced/"+n,method:"GET"})).catch(e=>{"rest_setting_setting_invalid"===e.code&&f("error")}).then(()=>{if(!m)return l({status:"publish"}),u()}).then(()=>g()({path:"/wc/v3/settings/advanced/"+n,method:"POST",data:{value:_.toString()}})).then(()=>{if(0!==c)return a("postType","page",{id:c,slug:d+"-2"})}).then(()=>l({slug:d})).then(()=>u()).then(()=>f("updated"))},[m,l,u,n,_,c,a,d]);return _===c||"dismissed"===E?null:Object(r.createElement)(s.Notice,{className:"wc-default-page-notice",status:"updated"===E?"success":"warning",onRemove:()=>f("dismissed"),spokenMessage:"updated"===E?Object(i.__)("Page settings updated","woo-gutenberg-products-block"):o},"updated"===E?Object(i.__)("Page settings updated","woo-gutenberg-products-block"):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,o),Object(r.createElement)(s.Button,{onClick:y,variant:"secondary",isBusy:"updating"===E,disabled:p,isSmall:!0},Object(i.__)("update your page settings","woo-gutenberg-products-block"))))}function f(e){let{block:t}=e;return Object(r.createElement)(s.Notice,{className:"wc-blocks-legacy-page-notice",isDismissible:!1,status:"warning"},Object(r.createInterpolateElement)(Object(i.sprintf)(
|
44 |
/* translators: %s is the block name. It will be cart or checkout. */
|
45 |
Object(i.__)("If you would like to use this block as your default %s you must update your <a>page settings in WooCommerce</a>.","woo-gutenberg-products-block"),t),{a:Object(r.createElement)("a",{href:Object(_.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})}))}c(296);var y=c(160);const k=Object(n.createHigherOrderComponent)(e=>t=>{const c=["woocommerce/checkout-shipping-address-block","woocommerce/checkout-billing-address-block","woocommerce/checkout-contact-information-block","woocommerce/checkout-fields-block"],{clientId:n}=t,{isCart:a,isCheckout:s,isAddressFieldBlock:i}=Object(j.useSelect)(e=>{const{getBlockParentsByBlockName:t,getBlockName:r}=e(o.store),a=t(n,["woocommerce/cart","woocommerce/checkout"]).map(r),s=r(n);return{isCart:a.includes("woocommerce/cart")||"woocommerce/cart"===s,isCheckout:a.includes("woocommerce/checkout")||"woocommerce/checkout"===s,isAddressFieldBlock:c.includes(s)}});return Object(r.createElement)(r.Fragment,null,(a||s)&&Object(r.createElement)(o.InspectorControls,null,Object(_.isWcVersion)("6.9.0",">=")?Object(r.createElement)(E,{block:s?"checkout":"cart"}):Object(r.createElement)(f,{block:s?"checkout":"cart"}),Object(r.createElement)(p,{block:s?"checkout":"cart"}),i?null:Object(r.createElement)(y.a,null)),Object(r.createElement)(e,t))},"withSidebarNotices");Object(a.hasFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice")||Object(a.addFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice",k,11)},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(0),n=c(227),o=c(2),a=c(132),s=c(133),i=c(110),l=c(111),u=c(105),d=c(1),p=c(14),b=c.n(p),m=c(267),g=c(28),O=c(7),j=c(9),h=c(36);const _=(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},E=e=>{const{__internalSetCustomerId:t}=Object(O.dispatch)(j.CHECKOUT_STORE_KEY);b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("User-ID")&&t(parseInt(e.get("User-ID")||"0",10))};var f=c(41),y=()=>{const{onCheckoutValidationBeforeProcessing:e}=Object(u.b)(),{hasError:t,redirectUrl:c,isProcessing:n,isBeforeProcessing:o,isComplete:a,orderNotes:s,shouldCreateAccount:p,extensionData:y}=Object(O.useSelect)(e=>{const t=e(j.CHECKOUT_STORE_KEY);return{...t.getCheckoutState(),isProcessing:t.isProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete()}}),{__internalSetHasError:k,__internalProcessCheckoutResponse:v}=Object(O.useDispatch)(j.CHECKOUT_STORE_KEY),w=Object(O.useSelect)(e=>e(j.VALIDATION_STORE_KEY).hasValidationErrors),{shippingErrorStatus:S}=Object(i.b)(),{billingAddress:C,shippingAddress:N}=Object(l.b)(),{cartNeedsPayment:P,cartNeedsShipping:I,receiveCart:T}=Object(f.a)(),{createErrorNotice:x,removeNotice:R}=Object(O.useDispatch)("core/notices"),{activePaymentMethod:A,paymentMethodData:M,isExpressPaymentMethodActive:D,currentPaymentStatus:B,shouldSavePayment:L}=Object(O.useSelect)(e=>{const t=e(j.PAYMENT_STORE_KEY);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),currentPaymentStatus:t.getCurrentStatus(),shouldSavePayment:t.shouldSavePaymentMethod()}},[]),F=Object(h.getPaymentMethods)(),z=Object(h.getExpressPaymentMethods)(),V=Object(r.useRef)(C),Y=Object(r.useRef)(N),U=Object(r.useRef)(c),[q,H]=Object(r.useState)(!1),K=Object(r.useMemo)(()=>{var e;const t={...z,...F};return null==t||null===(e=t[A])||void 0===e?void 0:e.paymentMethodId},[A,z,F]),$=w()&&!D||B.hasError||S.hasError,G=!t&&!$&&(B.isSuccessful||!P)&&n;Object(r.useEffect)(()=>{$===t||!n&&!o||D||k($)},[$,t,n,o,D,k]),Object(r.useEffect)(()=>{V.current=C,Y.current=N,U.current=c},[C,N,c]);const Q=Object(r.useCallback)(()=>!w()&&(B.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!S.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,B.hasError,S.hasError]);Object(r.useEffect)(()=>{let t;return D||(t=e(Q,0)),()=>{D||t()}},[e,Q,D]),Object(r.useEffect)(()=>{U.current&&(window.location.href=U.current)},[a]);const W=Object(r.useCallback)(async()=>{if(q)return;H(!0),R("checkout");const e=P?{payment_method:K,payment_data:_(M,L,A)}:{},t={billing_address:Object(m.a)(V.current),customer_note:s,create_account:p,...e,extensions:{...y}};I&&(t.shipping_address=Object(m.a)(Y.current)),b()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(E(e.headers),!e.ok)throw new Error(e);return e.json()}).then(e=>{v(e),H(!1)}).catch(e=>{try{null!=e&&e.headers&&E(e.headers),e.json().then(e=>{var t,c,r;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),x(Object(g.b)(e),{id:"checkout",context:"wc/checkout",__unstableHTML:!0}),null==e||null===(c=e.additional_errors)||void 0===c||null===(r=c.forEach)||void 0===r||r.call(c,e=>{x(e.message,{id:e.error_code,context:"wc/checkout",__unstableHTML:!0})}),v(e)})}catch{var t;x(Object(d.sprintf)(// Translators: %s Error text.
|
46 |
-
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. Please contact us for assistance.","woo-gutenberg-products-block")),{id:"checkout",context:"wc/checkout",__unstableHTML:!0})}k(!0),H(!1)})},[q,R,P,K,M,L,A,s,p,y,I,x,T,k,v]);return Object(r.useEffect)(()=>{G&&!q&&W()},[W,G,q]),null};const k=e=>{let{children:t,redirectUrl:c}=e;return Object(r.createElement)(u.a,{redirectUrl: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)(y,null)))))}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return M}));var r=c(1),n=c(26),o=c(0),a=c(4),s=c.n(a),i=c(13),l=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"}))),u=c(554),d=c(540),p=c(553),b=c(119),m=c(86),g=c(33);c(285);const O={bank:u.a,bill:d.a,card:p.a,checkPayment:l};var j=e=>{let{icon:t="",text:c=""}=e;const r=!!t,n=Object(o.useCallback)(e=>r&&Object(m.a)(e)&&Object(g.b)(O,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,{icon:O[t]}):t,c)},h=c(159),_=c(2),E=c(52),f=c.n(E),y=c(71),k=c(7),v=c(9),w=c(67),S=c(41),C=c(225),N=c(58),P=c(105),I=c(133),T=c(110),x=c(111);const R=(e,t)=>{const c=[],n=(t,c)=>{const r=c+"_tax",n=Object(g.b)(e,c)&&Object(m.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:n,valueWithTax:n+(Object(g.b)(e,r)&&Object(m.a)(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};var A=c(128);const M=()=>{const{onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutAfterProcessingWithSuccess:c,onCheckoutAfterProcessingWithError:a,onSubmit:s}=Object(P.b)(),{isCalculating:i,isComplete:l,isIdle:u,isProcessing:d,customerId:p}=Object(k.useSelect)(e=>{const t=e(v.CHECKOUT_STORE_KEY);return{isComplete:t.isComplete(),isIdle:t.isIdle(),isProcessing:t.isProcessing(),customerId:t.getCustomerId(),isCalculating:t.isCalculating()}}),{currentStatus:b,activePaymentMethod:m,shouldSavePayment:g}=Object(k.useSelect)(e=>{const t=e(v.PAYMENT_STORE_KEY);return{currentStatus:t.getCurrentStatus(),activePaymentMethod:t.getActivePaymentMethod(),shouldSavePayment:t.getShouldSavePaymentMethod()}}),{__internalSetExpressPaymentError:O}=Object(k.useDispatch)(v.PAYMENT_STORE_KEY),{onPaymentProcessing:E}=Object(I.b)(),{shippingErrorStatus:M,shippingErrorTypes:D,onShippingRateSuccess:B,onShippingRateFail:L,onShippingRateSelectSuccess:F,onShippingRateSelectFail:z}=Object(T.b)(),{shippingRates:V,isLoadingRates:Y,selectedRates:U,isSelectingRate:q,selectShippingRate:H,needsShipping:K}=Object(A.a)(),{billingAddress:$,shippingAddress:G,setShippingAddress:Q}=Object(x.b)(),{cartItems:W,cartFees:Z,cartTotals:J,extensions:X}=Object(S.a)(),{appliedCoupons:ee}=Object(C.a)(),te=Object(o.useRef)(R(J,K)),ce=Object(o.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)});Object(o.useEffect)(()=>{te.current=R(J,K),ce.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)}},[J,K]);const re=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";f()("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:m,billing:{appliedCoupons:ee,billingAddress:$,billingData:$,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(n.getCurrencyFromPriceResponse)(J),customerId:p,displayPricesIncludingTax:Object(_.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:W,cartFees:Z,extensions:X},checkoutStatus:{isCalculating:i,isComplete:l,isIdle:u,isProcessing:d},components:{LoadingMask:y.a,PaymentMethodIcons:h.a,PaymentMethodLabel:j,ValidationInputError:w.a},emitResponse:{noticeContexts:N.d,responseTypes:N.e},eventRegistration:{onCheckoutAfterProcessingWithError:a,onCheckoutAfterProcessingWithSuccess:c,onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onPaymentProcessing:E,onShippingRateFail:L,onShippingRateSelectFail:z,onShippingRateSelectSuccess:F,onShippingRateSuccess:B},onSubmit:s,paymentStatus:b,setExpressPaymentError:re,shippingData:{isSelectingRate:q,needsShipping:K,selectedRates:U,setSelectedRates:H,setShippingAddress:Q,shippingAddress:G,shippingRates:V,shippingRatesLoading:Y},shippingStatus:{shippingErrorStatus:M,shippingErrorTypes:D},shouldSavePayment:g}}},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(11),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(6),n=c.n(r),o=c(0),a=c(1),s=c(12),i=c(4),l=c.n(i),u=c(11),d=c(86),p=c(7),b=c(9),m=c(29);c(207);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:O="off",value:j="",onChange:h,required:_=!1,onBlur:E=(()=>{}),feedback:f,...y}=e;const[k,v]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":k||j})},Object(o.createElement)("input",n()({type:a,id:r,value:j,ref:t,autoCapitalize:g,autoComplete:O,onChange:e=>{h(e.target.value)},onFocus:()=>v(!0),onBlur:e=>{E(e.target.value),v(!1)},"aria-label":s||u,disabled:p,"aria-describedby":b&&!i?r+"__help":i,required:_},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)}),O=c(67);t.a=Object(u.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:i,errorId:u,focusOnMount:m=!1,onChange:j,showError:h=!0,errorMessage:_="",value:E="",...f}=e;const[y,k]=Object(s.useState)(!0),v=Object(s.useRef)(null),{setValidationErrors:w,hideValidationError:S,clearValidationError:C}=Object(p.dispatch)(b.VALIDATION_STORE_KEY),N=void 0!==r?r:"textinput-"+c,P=void 0!==u?u:N,{validationError:I,validationErrorId:T}=Object(p.useSelect)(e=>{const t=e(b.VALIDATION_STORE_KEY);return{validationError:t.getValidationError(P),validationErrorId:t.getValidationErrorId(P)}}),x=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();if(c)C(P);else{const c={[P]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}};w(c)}}),[C,P,w]);Object(s.useEffect)(()=>{var e;y&&m&&(null===(e=v.current)||void 0===e||e.focus()),k(!1)},[m,y,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&&x(!0)},[E,x]),Object(s.useEffect)(()=>()=>{C(P)},[C,P]),Object(d.a)(_)&&""!==_&&(I.message=_);const R=(null==I?void 0:I.message)&&!(null!=I&&I.hidden),A=h&&R&&T?T:i;return Object(o.createElement)(g,n()({className:l()(t,{"has-error":R}),"aria-invalid":!0===R,id:N,onBlur:()=>{x(!1)},feedback:h&&Object(o.createElement)(O.a,{errorMessage:_,propertyName:P}),ref:v,onChange:e=>{S(P),j(e)},ariaDescribedBy:A,value:E},f))})},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(58);const n=async(e,t,c)=>{const n=Object(r.a)(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},o=async(e,t,c)=>{const n=[],o=Object(r.a)(e,t);for(const e of o)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.b)(t)||Object(r.c)(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 o}));var r=c(10);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";c.d(t,"a",(function(){return s}));var r=c(0),n=c(7),o=c(10),a=c(8);const s=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:s=[]}=e;const i=Object(r.useRef)(c),l=Object(r.useRef)(s),[u,d]=Object(r.useState)(0),{insertBlock:p,replaceInnerBlocks:b}=Object(n.useDispatch)("core/block-editor"),{innerBlocks:m,registeredBlockTypes:g}=Object(n.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:i.current.map(e=>Object(o.getBlockType)(e))}),[t,i.current,u]),O=Object(r.useCallback)((e,c)=>{const r=Object(o.createBlock)(e.name);p(r,c,t,!1),d(u+1)},[t,u]),j=Object(r.useMemo)(()=>g.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)),[g]);Object(r.useLayoutEffect)(()=>{if(t){if(0===m.length&&l.current.length>0){const e=Object(o.createBlocksFromInnerBlocksTemplate)(l.current);if(!Object(a.isEqual)(e,m))return void b(t,e)}j.forEach(e=>{if(m.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:O(e,m.length);break;case 0:O(e,0);break;default:const c=l.current[t-1],r=m.findIndex(e=>{let{name:t}=e;return t===c[0]});O(e,-1===r?t:r+1)}})}},[t,m,j,O])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(1),n=c(22),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:{}}],cross_sells:[{id:1,name:Object(r.__)("Polo","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"24000":"20000",regular_price:s?"24000":"20000",sale_price:s?"12000":"10000",raw_prices:{precision:6,price:s?"24000000":"20000000",regular_price:s?"24000000":"20000000",sale_price:s?"12000000":"10000000"}},images:[{id:17,src:n.m+"previews/polo.jpg",thumbnail:n.m+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4.5},{id:2,name:Object(r.__)("Long Sleeve Tee","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"30000":"25000",regular_price:s?"30000":"25000",sale_price:s?"30000":"25000",raw_prices:{precision:6,price:s?"30000000":"25000000",regular_price:s?"30000000":"25000000",sale_price:s?"30000000":"25000000"}},images:[{id:17,src:n.m+"previews/long-sleeve-tee.jpg",thumbnail:n.m+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4},{id:3,name:Object(r.__)("Hoodie with Zipper","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"15000":"12500",regular_price:s?"30000":"25000",sale_price:s?"15000":"12500",raw_prices:{precision:6,price:s?"15000000":"12500000",regular_price:s?"30000000":"25000000",sale_price:s?"15000000":"12500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-zipper.jpg",thumbnail:n.m+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:1},{id:4,name:Object(r.__)("Hoodie with Logo","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"4500":"4250",regular_price:s?"4500":"4250",sale_price:s?"4500":"4250",raw_prices:{precision:6,price:s?"45000000":"42500000",regular_price:s?"45000000":"42500000",sale_price:s?"45000000":"42500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-logo.jpg",thumbnail:n.m+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:5},{id:5,name:Object(r.__)("Hoodie with Pocket","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"3500":"3250",regular_price:s?"4500":"4250",sale_price:s?"3500":"3250",raw_prices:{precision:6,price:s?"35000000":"32500000",regular_price:s?"45000000":"42500000",sale_price:s?"35000000":"32500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-pocket.jpg",thumbnail:n.m+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3.75},{id:6,name:Object(r.__)("T-Shirt","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"1800":"1500",regular_price:s?"1800":"1500",sale_price:s?"1800":"1500",raw_prices:{precision:6,price:s?"1800000":"1500000",regular_price:s?"1800000":"1500000",sale_price:s?"1800000":"1500000"}},images:[{id:17,src:n.m+"previews/tshirt.jpg",thumbnail:n.m+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3}],fees:[{id:"fee",name:Object(r.__)("Fee","woo-gutenberg-products-block"),totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total:"100",total_tax:"20",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"20"}]}}],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:"100",total_fees_tax:"20",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"820",total_price:"4920",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"820"}]},errors:[],payment_requirements:["products"],extensions:{}}},,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-cross-sells-block","version":"1.0.0","title":"Cart Cross-Sells","description":"Shows the Cross-Sells block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-items-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(59),i=c(22),l=c(516),u=c(2),d=c(7),p=c(9);c(435),t.a=t=>{let{checkoutPageId:c,className:o}=t;const b=Object(u.getSetting)("page-"+c,!1),m=Object(d.useSelect)(e=>e(p.CHECKOUT_STORE_KEY).isCalculating()),[g,O]=Object(l.a)(),[j,h]=Object(r.useState)(!1);Object(r.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{h(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const _=Object(r.createElement)(s.a,{className:"wc-block-cart__submit-button",href:b||i.f,disabled:m,onClick:()=>h(!0),showSpinner:j},Object(n.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(r.createElement)("div",{className:a()("wc-block-cart__submit",o)},g,Object(r.createElement)("div",{className:"wc-block-cart__submit-container"},_),"below"===O&&Object(r.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},_))}}).call(this,c(434))},,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));const r=e=>e.is_purchasable||!1,n=e=>["simple","variable"].includes(e.type||"simple")},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){e.exports=c(480)},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(13);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";var r=c(0),n=c(4),o=c.n(n),a=c(312);c(281),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(12),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(12),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){},,function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(13);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,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[])},function(e,t,c){"use strict";var r=c(0),n=c(13);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(4),a=c.n(o),s=c(38),i=c(18),l=c(41),u=c(2);c(286),t.a=e=>{let{currency:t,values:c,className:o}=e;const d=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:b}=c,{receiveCart:m,...g}=Object(l.a)(),O=Object(i.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(n.__)("Total","woo-gutenberg-products-block"),extensions:g.extensions,arg:{cart:g}}),j=parseInt(b,10);return Object(r.createElement)(i.TotalsItem,{className:a()("wc-block-components-totals-footer-item",o),currency:t,label:O,value:parseInt(p,10),description:d&&0!==j&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(r.createInterpolateElement)(Object(n.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:j})}))})}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(71),a=c(256),s=c(18),i=c(2);c(287);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 O=parseInt(m,10),j=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+O:g,h=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!==h.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"},h.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)(
|
47 |
/* translators: %s Coupon code. */
|
48 |
Object(n.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(n.sprintf)(
|
49 |
/* translators: %s is a coupon code. */
|
43 |
Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const j={"aria-label":t,disabled:r,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},h=p?j:{},_=p?{"aria-hidden":!0}:j;return Object(o.createElement)(d,n()({},g,h,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(o.createElement)(O,n()({className:"wc-block-components-chip__remove"},_),Object(o.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},,,,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.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return i}));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=e=>{let{preserveCartData:t=!1}=e;n("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},i=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,"a",(function(){return o}));var r=c(95),n=(c(16),c(2));const o=e=>{const t=Object.keys(n.defaultAddressFields),c=Object(r.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(98);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";var r=c(0),n=c(13);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){},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(0),n=c(11),o=c(5),a=c(46),s=c(3),i=c(1),l=c(4),u=c.n(l);c(297);const d=[],p=e=>{let{block:t}=e;const[c,n]=(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_sidebar_compatibility_notices",d),[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),o=Object(r.createInterpolateElement)(Object(i.__)("The Cart & Checkout Blocks are a beta feature to optimize for faster checkout. To make sure this feature is right for your store, <a>review the list of compatible extensions</a>.","woo-gutenberg-products-block"),{a:Object(r.createElement)(s.ExternalLink,{href:"https://woocommerce.com/document/cart-checkout-blocks-support-status/#section-3"})});return Object(r.createElement)(s.Notice,{onRemove:n,className:u()(["wc-blocks-sidebar-compatibility-notice",{"is-hidden":!c}])},o)};var b=c(172),m=c(14),g=c.n(m),O=c(173),j=c(7),h=c(22),_=c(2);function E(e){let{block:t}=e;const c="checkout"===t?h.e:h.c,n="checkout"===t?"woocommerce_checkout_page_id":"woocommerce_cart_page_id",o="checkout"===t?Object(i.__)("If you would like to use this block as your default checkout, update your page settings","woo-gutenberg-products-block"):Object(i.__)("If you would like to use this block as your default cart, update your page settings","woo-gutenberg-products-block"),{saveEntityRecord:a}=Object(j.useDispatch)(O.store),{editPost:l,savePost:u}=Object(j.useDispatch)(b.store),{slug:d,isLoadingPage:p,postPublished:m,currentPostId:_}=Object(j.useSelect)(e=>{var r;const{getEntityRecord:n,isResolving:o}=e(O.store),{isCurrentPostPublished:a,getCurrentPostId:s}=e(b.store);return{slug:(null===(r=n("postType","page",c))||void 0===r?void 0:r.slug)||t,isLoadingPage:o("getEntityRecord",["postType","page",c]),postPublished:a(),currentPostId:s()}},[]),[E,f]=Object(r.useState)("pristine"),y=Object(r.useCallback)(()=>{f("updating"),Promise.resolve().then(()=>g()({path:"/wc/v3/settings/advanced/"+n,method:"GET"})).catch(e=>{"rest_setting_setting_invalid"===e.code&&f("error")}).then(()=>{if(!m)return l({status:"publish"}),u()}).then(()=>g()({path:"/wc/v3/settings/advanced/"+n,method:"POST",data:{value:_.toString()}})).then(()=>{if(0!==c)return a("postType","page",{id:c,slug:d+"-2"})}).then(()=>l({slug:d})).then(()=>u()).then(()=>f("updated"))},[m,l,u,n,_,c,a,d]);return _===c||"dismissed"===E?null:Object(r.createElement)(s.Notice,{className:"wc-default-page-notice",status:"updated"===E?"success":"warning",onRemove:()=>f("dismissed"),spokenMessage:"updated"===E?Object(i.__)("Page settings updated","woo-gutenberg-products-block"):o},"updated"===E?Object(i.__)("Page settings updated","woo-gutenberg-products-block"):Object(r.createElement)(r.Fragment,null,Object(r.createElement)("p",null,o),Object(r.createElement)(s.Button,{onClick:y,variant:"secondary",isBusy:"updating"===E,disabled:p,isSmall:!0},Object(i.__)("update your page settings","woo-gutenberg-products-block"))))}function f(e){let{block:t}=e;return Object(r.createElement)(s.Notice,{className:"wc-blocks-legacy-page-notice",isDismissible:!1,status:"warning"},Object(r.createInterpolateElement)(Object(i.sprintf)(
|
44 |
/* translators: %s is the block name. It will be cart or checkout. */
|
45 |
Object(i.__)("If you would like to use this block as your default %s you must update your <a>page settings in WooCommerce</a>.","woo-gutenberg-products-block"),t),{a:Object(r.createElement)("a",{href:Object(_.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})}))}c(296);var y=c(160);const k=Object(n.createHigherOrderComponent)(e=>t=>{const c=["woocommerce/checkout-shipping-address-block","woocommerce/checkout-billing-address-block","woocommerce/checkout-contact-information-block","woocommerce/checkout-fields-block"],{clientId:n}=t,{isCart:a,isCheckout:s,isAddressFieldBlock:i}=Object(j.useSelect)(e=>{const{getBlockParentsByBlockName:t,getBlockName:r}=e(o.store),a=t(n,["woocommerce/cart","woocommerce/checkout"]).map(r),s=r(n);return{isCart:a.includes("woocommerce/cart")||"woocommerce/cart"===s,isCheckout:a.includes("woocommerce/checkout")||"woocommerce/checkout"===s,isAddressFieldBlock:c.includes(s)}});return Object(r.createElement)(r.Fragment,null,(a||s)&&Object(r.createElement)(o.InspectorControls,null,Object(_.isWcVersion)("6.9.0",">=")?Object(r.createElement)(E,{block:s?"checkout":"cart"}):Object(r.createElement)(f,{block:s?"checkout":"cart"}),Object(r.createElement)(p,{block:s?"checkout":"cart"}),i?null:Object(r.createElement)(y.a,null)),Object(r.createElement)(e,t))},"withSidebarNotices");Object(a.hasFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice")||Object(a.addFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice",k,11)},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return k}));var r=c(0),n=c(227),o=c(2),a=c(132),s=c(133),i=c(110),l=c(111),u=c(105),d=c(1),p=c(14),b=c.n(p),m=c(267),g=c(28),O=c(7),j=c(9),h=c(36);const _=(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},E=e=>{const{__internalSetCustomerId:t}=Object(O.dispatch)(j.CHECKOUT_STORE_KEY);b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("User-ID")&&t(parseInt(e.get("User-ID")||"0",10))};var f=c(41),y=()=>{const{onCheckoutValidationBeforeProcessing:e}=Object(u.b)(),{hasError:t,redirectUrl:c,isProcessing:n,isBeforeProcessing:o,isComplete:a,orderNotes:s,shouldCreateAccount:p,extensionData:y}=Object(O.useSelect)(e=>{const t=e(j.CHECKOUT_STORE_KEY);return{...t.getCheckoutState(),isProcessing:t.isProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete()}}),{__internalSetHasError:k,__internalProcessCheckoutResponse:v}=Object(O.useDispatch)(j.CHECKOUT_STORE_KEY),w=Object(O.useSelect)(e=>e(j.VALIDATION_STORE_KEY).hasValidationErrors),{shippingErrorStatus:S}=Object(i.b)(),{billingAddress:C,shippingAddress:N}=Object(l.b)(),{cartNeedsPayment:P,cartNeedsShipping:I,receiveCart:T}=Object(f.a)(),{createErrorNotice:x,removeNotice:R}=Object(O.useDispatch)("core/notices"),{activePaymentMethod:A,paymentMethodData:M,isExpressPaymentMethodActive:D,currentPaymentStatus:B,shouldSavePayment:L}=Object(O.useSelect)(e=>{const t=e(j.PAYMENT_STORE_KEY);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),currentPaymentStatus:t.getCurrentStatus(),shouldSavePayment:t.shouldSavePaymentMethod()}},[]),F=Object(h.getPaymentMethods)(),z=Object(h.getExpressPaymentMethods)(),V=Object(r.useRef)(C),Y=Object(r.useRef)(N),U=Object(r.useRef)(c),[q,H]=Object(r.useState)(!1),K=Object(r.useMemo)(()=>{var e;const t={...z,...F};return null==t||null===(e=t[A])||void 0===e?void 0:e.paymentMethodId},[A,z,F]),$=w()&&!D||B.hasError||S.hasError,G=!t&&!$&&(B.isSuccessful||!P)&&n;Object(r.useEffect)(()=>{$===t||!n&&!o||D||k($)},[$,t,n,o,D,k]),Object(r.useEffect)(()=>{V.current=C,Y.current=N,U.current=c},[C,N,c]);const Q=Object(r.useCallback)(()=>!w()&&(B.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!S.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[w,B.hasError,S.hasError]);Object(r.useEffect)(()=>{let t;return D||(t=e(Q,0)),()=>{D||t()}},[e,Q,D]),Object(r.useEffect)(()=>{U.current&&(window.location.href=U.current)},[a]);const W=Object(r.useCallback)(async()=>{if(q)return;H(!0),R("checkout");const e=P?{payment_method:K,payment_data:_(M,L,A)}:{},t={billing_address:Object(m.a)(V.current),customer_note:s,create_account:p,...e,extensions:{...y}};I&&(t.shipping_address=Object(m.a)(Y.current)),b()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(E(e.headers),!e.ok)throw new Error(e);return e.json()}).then(e=>{v(e),H(!1)}).catch(e=>{try{null!=e&&e.headers&&E(e.headers),e.json().then(e=>{var t,c,r;null!==(t=e.data)&&void 0!==t&&t.cart&&T(e.data.cart),x(Object(g.b)(e),{id:"checkout",context:"wc/checkout",__unstableHTML:!0}),null==e||null===(c=e.additional_errors)||void 0===c||null===(r=c.forEach)||void 0===r||r.call(c,e=>{x(e.message,{id:e.error_code,context:"wc/checkout",__unstableHTML:!0})}),v(e)})}catch{var t;x(Object(d.sprintf)(// Translators: %s Error text.
|
46 |
+
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. Please contact us for assistance.","woo-gutenberg-products-block")),{id:"checkout",context:"wc/checkout",__unstableHTML:!0})}k(!0),H(!1)})},[q,R,P,K,M,L,A,s,p,y,I,x,T,k,v]);return Object(r.useEffect)(()=>{G&&!q&&W()},[W,G,q]),null};const k=e=>{let{children:t,redirectUrl:c}=e;return Object(r.createElement)(u.a,{redirectUrl: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)(y,null)))))}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return M}));var r=c(1),n=c(26),o=c(0),a=c(4),s=c.n(a),i=c(13),l=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"}))),u=c(554),d=c(540),p=c(553),b=c(119),m=c(86),g=c(33);c(285);const O={bank:u.a,bill:d.a,card:p.a,checkPayment:l};var j=e=>{let{icon:t="",text:c=""}=e;const r=!!t,n=Object(o.useCallback)(e=>r&&Object(m.a)(e)&&Object(g.b)(O,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,{icon:O[t]}):t,c)},h=c(159),_=c(2),E=c(52),f=c.n(E),y=c(71),k=c(7),v=c(9),w=c(67),S=c(41),C=c(225),N=c(58),P=c(105),I=c(133),T=c(110),x=c(111);const R=(e,t)=>{const c=[],n=(t,c)=>{const r=c+"_tax",n=Object(g.b)(e,c)&&Object(m.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:n,valueWithTax:n+(Object(g.b)(e,r)&&Object(m.a)(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};var A=c(128);const M=()=>{const{onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutAfterProcessingWithSuccess:c,onCheckoutAfterProcessingWithError:a,onSubmit:s}=Object(P.b)(),{isCalculating:i,isComplete:l,isIdle:u,isProcessing:d,customerId:p}=Object(k.useSelect)(e=>{const t=e(v.CHECKOUT_STORE_KEY);return{isComplete:t.isComplete(),isIdle:t.isIdle(),isProcessing:t.isProcessing(),customerId:t.getCustomerId(),isCalculating:t.isCalculating()}}),{currentStatus:b,activePaymentMethod:m,shouldSavePayment:g}=Object(k.useSelect)(e=>{const t=e(v.PAYMENT_STORE_KEY);return{currentStatus:t.getCurrentStatus(),activePaymentMethod:t.getActivePaymentMethod(),shouldSavePayment:t.getShouldSavePaymentMethod()}}),{__internalSetExpressPaymentError:O}=Object(k.useDispatch)(v.PAYMENT_STORE_KEY),{onPaymentProcessing:E}=Object(I.b)(),{shippingErrorStatus:M,shippingErrorTypes:D,onShippingRateSuccess:B,onShippingRateFail:L,onShippingRateSelectSuccess:F,onShippingRateSelectFail:z}=Object(T.b)(),{shippingRates:V,isLoadingRates:Y,selectedRates:U,isSelectingRate:q,selectShippingRate:H,needsShipping:K}=Object(A.a)(),{billingAddress:$,shippingAddress:G,setShippingAddress:Q}=Object(x.b)(),{cartItems:W,cartFees:Z,cartTotals:J,extensions:X}=Object(S.a)(),{appliedCoupons:ee}=Object(C.a)(),te=Object(o.useRef)(R(J,K)),ce=Object(o.useRef)({label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)});Object(o.useEffect)(()=>{te.current=R(J,K),ce.current={label:Object(r.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)}},[J,K]);const re=Object(o.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";f()("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:m,billing:{appliedCoupons:ee,billingAddress:$,billingData:$,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(n.getCurrencyFromPriceResponse)(J),customerId:p,displayPricesIncludingTax:Object(_.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:W,cartFees:Z,extensions:X},checkoutStatus:{isCalculating:i,isComplete:l,isIdle:u,isProcessing:d},components:{LoadingMask:y.a,PaymentMethodIcons:h.a,PaymentMethodLabel:j,ValidationInputError:w.a},emitResponse:{noticeContexts:N.d,responseTypes:N.e},eventRegistration:{onCheckoutAfterProcessingWithError:a,onCheckoutAfterProcessingWithSuccess:c,onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onPaymentProcessing:E,onShippingRateFail:L,onShippingRateSelectFail:z,onShippingRateSelectSuccess:F,onShippingRateSuccess:B},onSubmit:s,paymentStatus:b,setExpressPaymentError:re,shippingData:{isSelectingRate:q,needsShipping:K,selectedRates:U,setSelectedRates:H,setShippingAddress:Q,shippingAddress:G,shippingRates:V,shippingRatesLoading:Y},shippingStatus:{shippingErrorStatus:M,shippingErrorTypes:D},shouldSavePayment:g}}},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(11),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(6),n=c.n(r),o=c(0),a=c(1),s=c(12),i=c(4),l=c.n(i),u=c(11),d=c(86),p=c(7),b=c(9),m=c(29);c(207);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:O="off",value:j="",onChange:h,required:_=!1,onBlur:E=(()=>{}),feedback:f,...y}=e;const[k,v]=Object(o.useState)(!1);return Object(o.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":k||j})},Object(o.createElement)("input",n()({type:a,id:r,value:j,ref:t,autoCapitalize:g,autoComplete:O,onChange:e=>{h(e.target.value)},onFocus:()=>v(!0),onBlur:e=>{E(e.target.value),v(!1)},"aria-label":s||u,disabled:p,"aria-describedby":b&&!i?r+"__help":i,required:_},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)}),O=c(67);t.a=Object(u.withInstanceId)(e=>{let{className:t,instanceId:c,id:r,ariaDescribedBy:i,errorId:u,focusOnMount:m=!1,onChange:j,showError:h=!0,errorMessage:_="",value:E="",...f}=e;const[y,k]=Object(s.useState)(!0),v=Object(s.useRef)(null),{setValidationErrors:w,hideValidationError:S,clearValidationError:C}=Object(p.dispatch)(b.VALIDATION_STORE_KEY),N=void 0!==r?r:"textinput-"+c,P=void 0!==u?u:N,{validationError:I,validationErrorId:T}=Object(p.useSelect)(e=>{const t=e(b.VALIDATION_STORE_KEY);return{validationError:t.getValidationError(P),validationErrorId:t.getValidationErrorId(P)}}),x=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();if(c)C(P);else{const c={[P]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}};w(c)}}),[C,P,w]);Object(s.useEffect)(()=>{var e;y&&m&&(null===(e=v.current)||void 0===e||e.focus()),k(!1)},[m,y,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&&x(!0)},[E,x]),Object(s.useEffect)(()=>()=>{C(P)},[C,P]),Object(d.a)(_)&&""!==_&&(I.message=_);const R=(null==I?void 0:I.message)&&!(null!=I&&I.hidden),A=h&&R&&T?T:i;return Object(o.createElement)(g,n()({className:l()(t,{"has-error":R}),"aria-invalid":!0===R,id:N,onBlur:()=>{x(!1)},feedback:h&&Object(o.createElement)(O.a,{errorMessage:_,propertyName:P}),ref:v,onChange:e=>{S(P),j(e)},ariaDescribedBy:A,value:E},f))})},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n})),c.d(t,"b",(function(){return o}));var r=c(58);const n=async(e,t,c)=>{const n=Object(r.a)(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},o=async(e,t,c)=>{const n=[],o=Object(r.a)(e,t);for(const e of o)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.b)(t)||Object(r.c)(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 o}));var r=c(10);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";c.d(t,"a",(function(){return s}));var r=c(0),n=c(7),o=c(10),a=c(8);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]),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,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(1),n=c(22),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:{}}],cross_sells:[{id:1,name:Object(r.__)("Polo","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"24000":"20000",regular_price:s?"24000":"20000",sale_price:s?"12000":"10000",raw_prices:{precision:6,price:s?"24000000":"20000000",regular_price:s?"24000000":"20000000",sale_price:s?"12000000":"10000000"}},images:[{id:17,src:n.m+"previews/polo.jpg",thumbnail:n.m+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4.5},{id:2,name:Object(r.__)("Long Sleeve Tee","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"30000":"25000",regular_price:s?"30000":"25000",sale_price:s?"30000":"25000",raw_prices:{precision:6,price:s?"30000000":"25000000",regular_price:s?"30000000":"25000000",sale_price:s?"30000000":"25000000"}},images:[{id:17,src:n.m+"previews/long-sleeve-tee.jpg",thumbnail:n.m+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4},{id:3,name:Object(r.__)("Hoodie with Zipper","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"15000":"12500",regular_price:s?"30000":"25000",sale_price:s?"15000":"12500",raw_prices:{precision:6,price:s?"15000000":"12500000",regular_price:s?"30000000":"25000000",sale_price:s?"15000000":"12500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-zipper.jpg",thumbnail:n.m+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:1},{id:4,name:Object(r.__)("Hoodie with Logo","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"4500":"4250",regular_price:s?"4500":"4250",sale_price:s?"4500":"4250",raw_prices:{precision:6,price:s?"45000000":"42500000",regular_price:s?"45000000":"42500000",sale_price:s?"45000000":"42500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-logo.jpg",thumbnail:n.m+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:5},{id:5,name:Object(r.__)("Hoodie with Pocket","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"3500":"3250",regular_price:s?"4500":"4250",sale_price:s?"3500":"3250",raw_prices:{precision:6,price:s?"35000000":"32500000",regular_price:s?"45000000":"42500000",sale_price:s?"35000000":"32500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-pocket.jpg",thumbnail:n.m+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3.75},{id:6,name:Object(r.__)("T-Shirt","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"1800":"1500",regular_price:s?"1800":"1500",sale_price:s?"1800":"1500",raw_prices:{precision:6,price:s?"1800000":"1500000",regular_price:s?"1800000":"1500000",sale_price:s?"1800000":"1500000"}},images:[{id:17,src:n.m+"previews/tshirt.jpg",thumbnail:n.m+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3}],fees:[{id:"fee",name:Object(r.__)("Fee","woo-gutenberg-products-block"),totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total:"100",total_tax:"20",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"20"}]}}],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:"100",total_fees_tax:"20",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"820",total_price:"4920",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"820"}]},errors:[],payment_requirements:["products"],extensions:{}}},,,,,,,,function(e){e.exports=JSON.parse('{"name":"woocommerce/cart-cross-sells-block","version":"1.0.0","title":"Cart Cross-Sells","description":"Shows the Cross-Sells block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"parent":["woocommerce/cart-items-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(59),i=c(22),l=c(516),u=c(2),d=c(7),p=c(9);c(435),t.a=t=>{let{checkoutPageId:c,className:o}=t;const b=Object(u.getSetting)("page-"+c,!1),m=Object(d.useSelect)(e=>e(p.CHECKOUT_STORE_KEY).isCalculating()),[g,O]=Object(l.a)(),[j,h]=Object(r.useState)(!1);Object(r.useEffect)(()=>{if("function"!=typeof e.addEventListener||"function"!=typeof e.removeEventListener)return;const t=()=>{h(!1)};return e.addEventListener("pageshow",t),()=>{e.removeEventListener("pageshow",t)}},[]);const _=Object(r.createElement)(s.a,{className:"wc-block-cart__submit-button",href:b||i.f,disabled:m,onClick:()=>h(!0),showSpinner:j},Object(n.__)("Proceed to Checkout","woo-gutenberg-products-block"));return Object(r.createElement)("div",{className:a()("wc-block-cart__submit",o)},g,Object(r.createElement)("div",{className:"wc-block-cart__submit-container"},_),"below"===O&&Object(r.createElement)("div",{className:"wc-block-cart__submit-container wc-block-cart__submit-container--sticky"},_))}}).call(this,c(434))},,,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));const r=e=>e.is_purchasable||!1,n=e=>["simple","variable"].includes(e.type||"simple")},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){e.exports=c(480)},function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(13);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";var r=c(0),n=c(4),o=c.n(n),a=c(312);c(281),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(12),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(12),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){},,function(e,t){},function(e,t,c){"use strict";var r=c(0),n=c(13);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,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[])},function(e,t,c){"use strict";var r=c(0),n=c(13);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(4),a=c.n(o),s=c(38),i=c(18),l=c(41),u=c(2);c(286),t.a=e=>{let{currency:t,values:c,className:o}=e;const d=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:b}=c,{receiveCart:m,...g}=Object(l.a)(),O=Object(i.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(n.__)("Total","woo-gutenberg-products-block"),extensions:g.extensions,arg:{cart:g}}),j=parseInt(b,10);return Object(r.createElement)(i.TotalsItem,{className:a()("wc-block-components-totals-footer-item",o),currency:t,label:O,value:parseInt(p,10),description:d&&0!==j&&Object(r.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(r.createInterpolateElement)(Object(n.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(r.createElement)(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:j})}))})}},function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(71),a=c(256),s=c(18),i=c(2);c(287);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 O=parseInt(m,10),j=Object(i.getSetting)("displayCartPricesIncludingTax",!1)?g+O:g,h=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!==h.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"},h.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)(
|
47 |
/* translators: %s Coupon code. */
|
48 |
Object(n.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(n.sprintf)(
|
49 |
/* translators: %s is a coupon code. */
|
build/checkout.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => 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-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', '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' => '
|
1 |
+
<?php return array('dependencies' => 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-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-editor', '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' => 'd7cb8fc9de538e1e07e71e316ba69281');
|
build/checkout.js
CHANGED
@@ -23,7 +23,7 @@ Object(i.__)("Remove","woo-gutenberg-products-block"):Object(i.sprintf)(
|
|
23 |
Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:o,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},_=p?O:{},j=p?{"aria-hidden":!0}:O;return Object(n.createElement)(d,r()({},g,_,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(n.createElement)(h,r()({className:"wc-block-components-chip__remove"},j),Object(n.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"attributes":{"isPreview":{"type":"boolean","default":false,"save":false},"showCompanyField":{"type":"boolean","default":false},"requireCompanyField":{"type":"boolean","default":false},"allowCreateAccount":{"type":"boolean","default":false},"showApartmentField":{"type":"boolean","default":true},"showPhoneField":{"type":"boolean","default":true},"requirePhoneField":{"type":"boolean","default":false}},"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,function(e,t,c){"use strict";c.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return i}));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=e=>{let{preserveCartData:t=!1}=e;r("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},i=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,"a",(function(){return n}));var o=c(95),r=(c(16),c(2));const n=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:o=!1}=t;o&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(98);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";var o=c(0),r=c(13);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){},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 o=c(0),r=c(11),n=c(5),a=c(46),s=c(3),i=c(1),l=c(4),u=c.n(l);c(297);const d=[],p=e=>{let{block:t}=e;const[c,r]=(e=>{const[t,c]=((e,t)=>{const[c,r]=Object(o.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(o.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,r]})("wc-blocks_dismissed_sidebar_compatibility_notices",d),[r,n]=Object(o.useState)(!1),a=t.includes(e);return Object(o.useEffect)(()=>{n(!a)},[a]),[r,()=>{const o=new Set(t);o.add(e),c([...o])}]})(t),n=Object(o.createInterpolateElement)(Object(i.__)("The Cart & Checkout Blocks are a beta feature to optimize for faster checkout. To make sure this feature is right for your store, <a>review the list of compatible extensions</a>.","woo-gutenberg-products-block"),{a:Object(o.createElement)(s.ExternalLink,{href:"https://woocommerce.com/document/cart-checkout-blocks-support-status/#section-3"})});return Object(o.createElement)(s.Notice,{onRemove:r,className:u()(["wc-blocks-sidebar-compatibility-notice",{"is-hidden":!c}])},n)};var b=c(172),m=c(14),g=c.n(m),h=c(173),O=c(7),_=c(22),j=c(2);function k(e){let{block:t}=e;const c="checkout"===t?_.e:_.c,r="checkout"===t?"woocommerce_checkout_page_id":"woocommerce_cart_page_id",n="checkout"===t?Object(i.__)("If you would like to use this block as your default checkout, update your page settings","woo-gutenberg-products-block"):Object(i.__)("If you would like to use this block as your default cart, update your page settings","woo-gutenberg-products-block"),{saveEntityRecord:a}=Object(O.useDispatch)(h.store),{editPost:l,savePost:u}=Object(O.useDispatch)(b.store),{slug:d,isLoadingPage:p,postPublished:m,currentPostId:j}=Object(O.useSelect)(e=>{var o;const{getEntityRecord:r,isResolving:n}=e(h.store),{isCurrentPostPublished:a,getCurrentPostId:s}=e(b.store);return{slug:(null===(o=r("postType","page",c))||void 0===o?void 0:o.slug)||t,isLoadingPage:n("getEntityRecord",["postType","page",c]),postPublished:a(),currentPostId:s()}},[]),[k,E]=Object(o.useState)("pristine"),f=Object(o.useCallback)(()=>{E("updating"),Promise.resolve().then(()=>g()({path:"/wc/v3/settings/advanced/"+r,method:"GET"})).catch(e=>{"rest_setting_setting_invalid"===e.code&&E("error")}).then(()=>{if(!m)return l({status:"publish"}),u()}).then(()=>g()({path:"/wc/v3/settings/advanced/"+r,method:"POST",data:{value:j.toString()}})).then(()=>{if(0!==c)return a("postType","page",{id:c,slug:d+"-2"})}).then(()=>l({slug:d})).then(()=>u()).then(()=>E("updated"))},[m,l,u,r,j,c,a,d]);return j===c||"dismissed"===k?null:Object(o.createElement)(s.Notice,{className:"wc-default-page-notice",status:"updated"===k?"success":"warning",onRemove:()=>E("dismissed"),spokenMessage:"updated"===k?Object(i.__)("Page settings updated","woo-gutenberg-products-block"):n},"updated"===k?Object(i.__)("Page settings updated","woo-gutenberg-products-block"):Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null,n),Object(o.createElement)(s.Button,{onClick:f,variant:"secondary",isBusy:"updating"===k,disabled:p,isSmall:!0},Object(i.__)("update your page settings","woo-gutenberg-products-block"))))}function E(e){let{block:t}=e;return Object(o.createElement)(s.Notice,{className:"wc-blocks-legacy-page-notice",isDismissible:!1,status:"warning"},Object(o.createInterpolateElement)(Object(i.sprintf)(
|
24 |
/* translators: %s is the block name. It will be cart or checkout. */
|
25 |
Object(i.__)("If you would like to use this block as your default %s you must update your <a>page settings in WooCommerce</a>.","woo-gutenberg-products-block"),t),{a:Object(o.createElement)("a",{href:Object(j.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})}))}c(296);var f=c(160);const y=Object(r.createHigherOrderComponent)(e=>t=>{const c=["woocommerce/checkout-shipping-address-block","woocommerce/checkout-billing-address-block","woocommerce/checkout-contact-information-block","woocommerce/checkout-fields-block"],{clientId:r}=t,{isCart:a,isCheckout:s,isAddressFieldBlock:i}=Object(O.useSelect)(e=>{const{getBlockParentsByBlockName:t,getBlockName:o}=e(n.store),a=t(r,["woocommerce/cart","woocommerce/checkout"]).map(o),s=o(r);return{isCart:a.includes("woocommerce/cart")||"woocommerce/cart"===s,isCheckout:a.includes("woocommerce/checkout")||"woocommerce/checkout"===s,isAddressFieldBlock:c.includes(s)}});return Object(o.createElement)(o.Fragment,null,(a||s)&&Object(o.createElement)(n.InspectorControls,null,Object(j.isWcVersion)("6.9.0",">=")?Object(o.createElement)(k,{block:s?"checkout":"cart"}):Object(o.createElement)(E,{block:s?"checkout":"cart"}),Object(o.createElement)(p,{block:s?"checkout":"cart"}),i?null:Object(o.createElement)(f.a,null)),Object(o.createElement)(e,t))},"withSidebarNotices");Object(a.hasFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice")||Object(a.addFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice",y,11)},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var o=c(0),r=c(227),n=c(2),a=c(132),s=c(133),i=c(110),l=c(111),u=c(105),d=c(1),p=c(14),b=c.n(p),m=c(267),g=c(28),h=c(7),O=c(9),_=c(36);const j=(e,t,c)=>{const o=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),r=`wc-${c}-new-payment-method`;return o.push({key:r,value:t}),o},k=e=>{const{__internalSetCustomerId:t}=Object(h.dispatch)(O.CHECKOUT_STORE_KEY);b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("User-ID")&&t(parseInt(e.get("User-ID")||"0",10))};var E=c(41),f=()=>{const{onCheckoutValidationBeforeProcessing:e}=Object(u.b)(),{hasError:t,redirectUrl:c,isProcessing:r,isBeforeProcessing:n,isComplete:a,orderNotes:s,shouldCreateAccount:p,extensionData:f}=Object(h.useSelect)(e=>{const t=e(O.CHECKOUT_STORE_KEY);return{...t.getCheckoutState(),isProcessing:t.isProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete()}}),{__internalSetHasError:y,__internalProcessCheckoutResponse:w}=Object(h.useDispatch)(O.CHECKOUT_STORE_KEY),v=Object(h.useSelect)(e=>e(O.VALIDATION_STORE_KEY).hasValidationErrors),{shippingErrorStatus:C}=Object(i.b)(),{billingAddress:S,shippingAddress:P}=Object(l.b)(),{cartNeedsPayment:N,cartNeedsShipping:T,receiveCart:x}=Object(E.a)(),{createErrorNotice:R,removeNotice:A}=Object(h.useDispatch)("core/notices"),{activePaymentMethod:I,paymentMethodData:M,isExpressPaymentMethodActive:B,currentPaymentStatus:D,shouldSavePayment:L}=Object(h.useSelect)(e=>{const t=e(O.PAYMENT_STORE_KEY);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),currentPaymentStatus:t.getCurrentStatus(),shouldSavePayment:t.shouldSavePaymentMethod()}},[]),F=Object(_.getPaymentMethods)(),U=Object(_.getExpressPaymentMethods)(),Y=Object(o.useRef)(S),V=Object(o.useRef)(P),$=Object(o.useRef)(c),[K,q]=Object(o.useState)(!1),z=Object(o.useMemo)(()=>{var e;const t={...U,...F};return null==t||null===(e=t[I])||void 0===e?void 0:e.paymentMethodId},[I,U,F]),H=v()&&!B||D.hasError||C.hasError,W=!t&&!H&&(D.isSuccessful||!N)&&r;Object(o.useEffect)(()=>{H===t||!r&&!n||B||y(H)},[H,t,r,n,B,y]),Object(o.useEffect)(()=>{Y.current=S,V.current=P,$.current=c},[S,P,c]);const G=Object(o.useCallback)(()=>!v()&&(D.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!C.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[v,D.hasError,C.hasError]);Object(o.useEffect)(()=>{let t;return B||(t=e(G,0)),()=>{B||t()}},[e,G,B]),Object(o.useEffect)(()=>{$.current&&(window.location.href=$.current)},[a]);const Q=Object(o.useCallback)(async()=>{if(K)return;q(!0),A("checkout");const e=N?{payment_method:z,payment_data:j(M,L,I)}:{},t={billing_address:Object(m.a)(Y.current),customer_note:s,create_account:p,...e,extensions:{...f}};T&&(t.shipping_address=Object(m.a)(V.current)),b()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(k(e.headers),!e.ok)throw new Error(e);return e.json()}).then(e=>{w(e),q(!1)}).catch(e=>{try{null!=e&&e.headers&&k(e.headers),e.json().then(e=>{var t,c,o;null!==(t=e.data)&&void 0!==t&&t.cart&&x(e.data.cart),R(Object(g.b)(e),{id:"checkout",context:"wc/checkout",__unstableHTML:!0}),null==e||null===(c=e.additional_errors)||void 0===c||null===(o=c.forEach)||void 0===o||o.call(c,e=>{R(e.message,{id:e.error_code,context:"wc/checkout",__unstableHTML:!0})}),w(e)})}catch{var t;R(Object(d.sprintf)(// Translators: %s Error text.
|
26 |
-
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. Please contact us for assistance.","woo-gutenberg-products-block")),{id:"checkout",context:"wc/checkout",__unstableHTML:!0})}y(!0),q(!1)})},[K,A,N,z,M,L,I,s,p,f,T,R,x,y,w]);return Object(o.useEffect)(()=>{W&&!K&&Q()},[Q,W,K]),null};const y=e=>{let{children:t,redirectUrl:c}=e;return Object(o.createElement)(u.a,{redirectUrl:c},Object(o.createElement)(l.a,null,Object(o.createElement)(i.a,null,Object(o.createElement)(s.a,null,t,Object(o.createElement)(a.a,{renderError:n.CURRENT_USER_IS_ADMIN?null:()=>null},Object(o.createElement)(r.PluginArea,{scope:"woocommerce-checkout"})),Object(o.createElement)(f,null)))))}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return M}));var o=c(1),r=c(26),n=c(0),a=c(4),s=c.n(a),i=c(13),l=Object(n.createElement)(i.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"}))),u=c(554),d=c(540),p=c(553),b=c(119),m=c(86),g=c(33);c(285);const h={bank:u.a,bill:d.a,card:p.a,checkPayment:l};var O=e=>{let{icon:t="",text:c=""}=e;const o=!!t,r=Object(n.useCallback)(e=>o&&Object(m.a)(e)&&Object(g.b)(h,e),[o]),a=s()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return Object(n.createElement)("span",{className:a},r(t)?Object(n.createElement)(b.a,{icon:h[t]}):t,c)},_=c(159),j=c(2),k=c(52),E=c.n(k),f=c(71),y=c(7),w=c(9),v=c(67),C=c(41),S=c(225),P=c(58),N=c(105),T=c(133),x=c(110),R=c(111);const A=(e,t)=>{const c=[],r=(t,c)=>{const o=c+"_tax",r=Object(g.b)(e,c)&&Object(m.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:r,valueWithTax:r+(Object(g.b)(e,o)&&Object(m.a)(e[o])?parseInt(e[o],10):0)}};return c.push(r(Object(o.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(r(Object(o.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(r(Object(o.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(o.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(r(Object(o.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c};var I=c(128);const M=()=>{const{onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutAfterProcessingWithSuccess:c,onCheckoutAfterProcessingWithError:a,onSubmit:s}=Object(N.b)(),{isCalculating:i,isComplete:l,isIdle:u,isProcessing:d,customerId:p}=Object(y.useSelect)(e=>{const t=e(w.CHECKOUT_STORE_KEY);return{isComplete:t.isComplete(),isIdle:t.isIdle(),isProcessing:t.isProcessing(),customerId:t.getCustomerId(),isCalculating:t.isCalculating()}}),{currentStatus:b,activePaymentMethod:m,shouldSavePayment:g}=Object(y.useSelect)(e=>{const t=e(w.PAYMENT_STORE_KEY);return{currentStatus:t.getCurrentStatus(),activePaymentMethod:t.getActivePaymentMethod(),shouldSavePayment:t.getShouldSavePaymentMethod()}}),{__internalSetExpressPaymentError:h}=Object(y.useDispatch)(w.PAYMENT_STORE_KEY),{onPaymentProcessing:k}=Object(T.b)(),{shippingErrorStatus:M,shippingErrorTypes:B,onShippingRateSuccess:D,onShippingRateFail:L,onShippingRateSelectSuccess:F,onShippingRateSelectFail:U}=Object(x.b)(),{shippingRates:Y,isLoadingRates:V,selectedRates:$,isSelectingRate:K,selectShippingRate:q,needsShipping:z}=Object(I.a)(),{billingAddress:H,shippingAddress:W,setShippingAddress:G}=Object(R.b)(),{cartItems:Q,cartFees:X,cartTotals:J,extensions:Z}=Object(C.a)(),{appliedCoupons:ee}=Object(S.a)(),te=Object(n.useRef)(A(J,z)),ce=Object(n.useRef)({label:Object(o.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)});Object(n.useEffect)(()=>{te.current=A(J,z),ce.current={label:Object(o.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)}},[J,z]);const oe=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";E()("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"}),h(e)}),[h]);return{activePaymentMethod:m,billing:{appliedCoupons:ee,billingAddress:H,billingData:H,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(r.getCurrencyFromPriceResponse)(J),customerId:p,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:Q,cartFees:X,extensions:Z},checkoutStatus:{isCalculating:i,isComplete:l,isIdle:u,isProcessing:d},components:{LoadingMask:f.a,PaymentMethodIcons:_.a,PaymentMethodLabel:O,ValidationInputError:v.a},emitResponse:{noticeContexts:P.d,responseTypes:P.e},eventRegistration:{onCheckoutAfterProcessingWithError:a,onCheckoutAfterProcessingWithSuccess:c,onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onPaymentProcessing:k,onShippingRateFail:L,onShippingRateSelectFail:U,onShippingRateSelectSuccess:F,onShippingRateSuccess:D},onSubmit:s,paymentStatus:b,setExpressPaymentError:oe,shippingData:{isSelectingRate:K,needsShipping:z,selectedRates:$,setSelectedRates:q,setShippingAddress:G,shippingAddress:W,shippingRates:Y,shippingRatesLoading:V},shippingStatus:{shippingErrorStatus:M,shippingErrorTypes:B},shouldSavePayment:g}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var o=c(0),r=c(11),n=c(4),a=c.n(n);const s=Object(o.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(o.useContext)(s),l=e=>{let{children:t,className:c=""}=e;const[n,i]=(()=>{const[e,{width:t}]=Object(r.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(o.createElement)(s.Provider,{value:l},Object(o.createElement)("div",{className:a()(c,i)},n,t))}},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),a=c(1),s=c(12),i=c(4),l=c.n(i),u=c(11),d=c(86),p=c(7),b=c(9),m=c(29);c(207);var g=Object(s.forwardRef)((e,t)=>{let{className:c,id:o,type:a="text",ariaLabel:s,ariaDescribedBy:i,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:_,required:j=!1,onBlur:k=(()=>{}),feedback:E,...f}=e;const[y,w]=Object(n.useState)(!1);return Object(n.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":y||O})},Object(n.createElement)("input",r()({type:a,id:o,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{_(e.target.value)},onFocus:()=>w(!0),onBlur:e=>{k(e.target.value),w(!1)},"aria-label":s||u,disabled:p,"aria-describedby":b&&!i?o+"__help":i,required:j},f)),Object(n.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:o},htmlFor:o}),!!b&&Object(n.createElement)("p",{id:o+"__help",className:"wc-block-components-text-input__help"},b),E)}),h=c(67);t.a=Object(u.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,ariaDescribedBy:i,errorId:u,focusOnMount:m=!1,onChange:O,showError:_=!0,errorMessage:j="",value:k="",...E}=e;const[f,y]=Object(s.useState)(!0),w=Object(s.useRef)(null),{setValidationErrors:v,hideValidationError:C,clearValidationError:S}=Object(p.dispatch)(b.VALIDATION_STORE_KEY),P=void 0!==o?o:"textinput-"+c,N=void 0!==u?u:P,{validationError:T,validationErrorId:x}=Object(p.useSelect)(e=>{const t=e(b.VALIDATION_STORE_KEY);return{validationError:t.getValidationError(N),validationErrorId:t.getValidationErrorId(N)}}),R=Object(s.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();if(c)S(N);else{const c={[N]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}};v(c)}}),[S,N,v]);Object(s.useEffect)(()=>{var e;f&&m&&(null===(e=w.current)||void 0===e||e.focus()),y(!1)},[m,f,y]),Object(s.useEffect)(()=>{var e,t;(null===(e=w.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==w.current&&R(!0)},[k,R]),Object(s.useEffect)(()=>()=>{S(N)},[S,N]),Object(d.a)(j)&&""!==j&&(T.message=j);const A=(null==T?void 0:T.message)&&!(null!=T&&T.hidden),I=_&&A&&x?x:i;return Object(n.createElement)(g,r()({className:l()(t,{"has-error":A}),"aria-invalid":!0===A,id:P,onBlur:()=>{R(!1)},feedback:_&&Object(n.createElement)(h.a,{errorMessage:j,propertyName:N}),ref:w,onChange:e=>{C(N),O(e)},ariaDescribedBy:I,value:k},E))})},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));var o=c(58);const r=async(e,t,c)=>{const r=Object(o.a)(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},n=async(e,t,c)=>{const r=[],n=Object(o.a)(e,t);for(const e of n)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.b)(t)||Object(o.c)(t))return r.push(t),r;r.push(t)}catch(e){return console.error(e),r.push({type:"error"}),r}return r}},,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(10);const r=["core/paragraph","core/image","core/separator"],n=e=>[...Object(o.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...r]},function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var o=c(0),r=c(7),n=c(10),a=c(8);const s=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:s=[]}=e;const i=Object(o.useRef)(c),l=Object(o.useRef)(s),[u,d]=Object(o.useState)(0),{insertBlock:p,replaceInnerBlocks:b}=Object(r.useDispatch)("core/block-editor"),{innerBlocks:m,registeredBlockTypes:g}=Object(r.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:i.current.map(e=>Object(n.getBlockType)(e))}),[t,i.current,u]),h=Object(o.useCallback)((e,c)=>{const o=Object(n.createBlock)(e.name);p(o,c,t,!1),d(u+1)},[t,u]),O=Object(o.useMemo)(()=>g.filter(e=>e&&(e=>{var t,c,o;let{attributes:r}=e;return Boolean((null===(t=r.lock)||void 0===t?void 0:t.remove)||(null===(c=r.lock)||void 0===c||null===(o=c.default)||void 0===o?void 0:o.remove))})(e)),[g]);Object(o.useLayoutEffect)(()=>{if(t){if(0===m.length&&l.current.length>0){const e=Object(n.createBlocksFromInnerBlocksTemplate)(l.current);if(!Object(a.isEqual)(e,m))return void b(t,e)}O.forEach(e=>{if(m.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:h(e,m.length);break;case 0:h(e,0);break;default:const c=l.current[t-1],o=m.findIndex(e=>{let{name:t}=e;return t===c[0]});h(e,-1===o?t:o+1)}})}},[t,m,O,h])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var o=c(1),r=c(22),n=c(2);const a=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:Object(o.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(o._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(o._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(o.__)("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(o.__)("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(n.getSetting)("displayCartPricesIncludingTax",!1),i={coupons:[],shipping_rates:Object(n.getSetting)("shippingMethodsExist",!1)?a:[],items:[{key:"1",id:1,quantity:2,name:Object(o.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(o.__)("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:r.m+"previews/beanie.jpg",thumbnail:r.m+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(o.__)("Color","woo-gutenberg-products-block"),value:Object(o.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(o.__)("Size","woo-gutenberg-products-block"),value:Object(o.__)("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(o.__)("Cap","woo-gutenberg-products-block"),short_description:Object(o.__)("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:r.m+"previews/cap.jpg",thumbnail:r.m+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(o.__)("Color","woo-gutenberg-products-block"),value:Object(o.__)("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:{}}],cross_sells:[{id:1,name:Object(o.__)("Polo","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"24000":"20000",regular_price:s?"24000":"20000",sale_price:s?"12000":"10000",raw_prices:{precision:6,price:s?"24000000":"20000000",regular_price:s?"24000000":"20000000",sale_price:s?"12000000":"10000000"}},images:[{id:17,src:r.m+"previews/polo.jpg",thumbnail:r.m+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4.5},{id:2,name:Object(o.__)("Long Sleeve Tee","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"30000":"25000",regular_price:s?"30000":"25000",sale_price:s?"30000":"25000",raw_prices:{precision:6,price:s?"30000000":"25000000",regular_price:s?"30000000":"25000000",sale_price:s?"30000000":"25000000"}},images:[{id:17,src:r.m+"previews/long-sleeve-tee.jpg",thumbnail:r.m+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4},{id:3,name:Object(o.__)("Hoodie with Zipper","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"15000":"12500",regular_price:s?"30000":"25000",sale_price:s?"15000":"12500",raw_prices:{precision:6,price:s?"15000000":"12500000",regular_price:s?"30000000":"25000000",sale_price:s?"15000000":"12500000"}},images:[{id:17,src:r.m+"previews/hoodie-with-zipper.jpg",thumbnail:r.m+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:1},{id:4,name:Object(o.__)("Hoodie with Logo","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"4500":"4250",regular_price:s?"4500":"4250",sale_price:s?"4500":"4250",raw_prices:{precision:6,price:s?"45000000":"42500000",regular_price:s?"45000000":"42500000",sale_price:s?"45000000":"42500000"}},images:[{id:17,src:r.m+"previews/hoodie-with-logo.jpg",thumbnail:r.m+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:5},{id:5,name:Object(o.__)("Hoodie with Pocket","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"3500":"3250",regular_price:s?"4500":"4250",sale_price:s?"3500":"3250",raw_prices:{precision:6,price:s?"35000000":"32500000",regular_price:s?"45000000":"42500000",sale_price:s?"35000000":"32500000"}},images:[{id:17,src:r.m+"previews/hoodie-with-pocket.jpg",thumbnail:r.m+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3.75},{id:6,name:Object(o.__)("T-Shirt","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"1800":"1500",regular_price:s?"1800":"1500",sale_price:s?"1800":"1500",raw_prices:{precision:6,price:s?"1800000":"1500000",regular_price:s?"1800000":"1500000",sale_price:s?"1800000":"1500000"}},images:[{id:17,src:r.m+"previews/tshirt.jpg",thumbnail:r.m+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3}],fees:[{id:"fee",name:Object(o.__)("Fee","woo-gutenberg-products-block"),totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total:"100",total_tax:"20",tax_lines:[{name:Object(o.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"20"}]}}],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:"100",total_fees_tax:"20",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"820",total_price:"4920",tax_lines:[{name:Object(o.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"820"}]},errors:[],payment_requirements:["products"],extensions:{}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),a=c(312);c(281),t.a=e=>{let{children:t,className:c}=e;return Object(o.createElement)(a.a,{className:n()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var o=c(0),r=c(12),n=c(4),a=c.n(n);const s=Object(r.forwardRef)((e,t)=>{let{children:c,className:r=""}=e;return Object(o.createElement)("div",{ref:t,className:a()("wc-block-components-main",r)},c)});t.a=s},,,function(e,t,c){"use strict";var o=c(0),r=c(12),n=c(4),a=c.n(n);const s=Object(r.forwardRef)((e,t)=>{let{children:c,className:r=""}=e;return Object(o.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",r)},c)});t.a=s},,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(13);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(o.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(o.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(o.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 o=c(0),r=c(1),n=c(4),a=c.n(n),s=c(38),i=c(18),l=c(41),u=c(2);c(286),t.a=e=>{let{currency:t,values:c,className:n}=e;const d=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:b}=c,{receiveCart:m,...g}=Object(l.a)(),h=Object(i.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(r.__)("Total","woo-gutenberg-products-block"),extensions:g.extensions,arg:{cart:g}}),O=parseInt(b,10);return Object(o.createElement)(i.TotalsItem,{className:a()("wc-block-components-totals-footer-item",n),currency:t,label:h,value:parseInt(p,10),description:d&&0!==O&&Object(o.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(o.createInterpolateElement)(Object(r.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(o.createElement)(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:O})}))})}},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(71),a=c(256),s=c(18),i=c(2);c(287);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,_=Object(s.__experimentalApplyCheckoutFilter)({arg:l,filterName:"coupons",defaultValue:t});return Object(o.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==_.length&&Object(o.createElement)(n.a,{screenReaderLabel:Object(r.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(o.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},_.map(e=>Object(o.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(r.sprintf)(
|
27 |
/* translators: %s Coupon code. */
|
28 |
Object(r.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(r.sprintf)(
|
29 |
/* translators: %s is a coupon code. */
|
23 |
Object(i.__)('Remove "%s"',"woo-gutenberg-products-block"),e)}const O={"aria-label":t,disabled:o,onClick:a,onKeyDown:e=>{"Backspace"!==e.key&&"Delete"!==e.key||a()}},_=p?O:{},j=p?{"aria-hidden":!0}:O;return Object(n.createElement)(d,r()({},g,_,{className:s()(c,"is-removable"),element:p?"button":g.element,screenReaderText:m,text:b}),Object(n.createElement)(h,r()({className:"wc-block-components-chip__remove"},j),Object(n.createElement)(l.a,{className:"wc-block-components-chip__remove-icon",icon:u.a,size:16})))}},function(e){e.exports=JSON.parse('{"name":"woocommerce/checkout","version":"1.0.0","title":"Checkout","description":"Display a checkout form so your customers can submit orders.","category":"woocommerce","keywords":["WooCommerce"],"supports":{"align":["wide"],"html":false,"multiple":false},"attributes":{"isPreview":{"type":"boolean","default":false,"save":false},"showCompanyField":{"type":"boolean","default":false},"requireCompanyField":{"type":"boolean","default":false},"allowCreateAccount":{"type":"boolean","default":false},"showApartmentField":{"type":"boolean","default":true},"showPhoneField":{"type":"boolean","default":true},"requirePhoneField":{"type":"boolean","default":false}},"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},,,,,,,,,function(e,t,c){"use strict";c.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return s})),c.d(t,"a",(function(){return i}));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=e=>{let{preserveCartData:t=!1}=e;r("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},i=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,"a",(function(){return n}));var o=c(95),r=(c(16),c(2));const n=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:o=!1}=t;o&&((e,t)=>e in t)(c,e)&&(n[c]="")}),n}},function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));var o=c(98);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";var o=c(0),r=c(13);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){},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 o=c(0),r=c(11),n=c(5),a=c(46),s=c(3),i=c(1),l=c(4),u=c.n(l);c(297);const d=[],p=e=>{let{block:t}=e;const[c,r]=(e=>{const[t,c]=((e,t)=>{const[c,r]=Object(o.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(o.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,r]})("wc-blocks_dismissed_sidebar_compatibility_notices",d),[r,n]=Object(o.useState)(!1),a=t.includes(e);return Object(o.useEffect)(()=>{n(!a)},[a]),[r,()=>{const o=new Set(t);o.add(e),c([...o])}]})(t),n=Object(o.createInterpolateElement)(Object(i.__)("The Cart & Checkout Blocks are a beta feature to optimize for faster checkout. To make sure this feature is right for your store, <a>review the list of compatible extensions</a>.","woo-gutenberg-products-block"),{a:Object(o.createElement)(s.ExternalLink,{href:"https://woocommerce.com/document/cart-checkout-blocks-support-status/#section-3"})});return Object(o.createElement)(s.Notice,{onRemove:r,className:u()(["wc-blocks-sidebar-compatibility-notice",{"is-hidden":!c}])},n)};var b=c(172),m=c(14),g=c.n(m),h=c(173),O=c(7),_=c(22),j=c(2);function k(e){let{block:t}=e;const c="checkout"===t?_.e:_.c,r="checkout"===t?"woocommerce_checkout_page_id":"woocommerce_cart_page_id",n="checkout"===t?Object(i.__)("If you would like to use this block as your default checkout, update your page settings","woo-gutenberg-products-block"):Object(i.__)("If you would like to use this block as your default cart, update your page settings","woo-gutenberg-products-block"),{saveEntityRecord:a}=Object(O.useDispatch)(h.store),{editPost:l,savePost:u}=Object(O.useDispatch)(b.store),{slug:d,isLoadingPage:p,postPublished:m,currentPostId:j}=Object(O.useSelect)(e=>{var o;const{getEntityRecord:r,isResolving:n}=e(h.store),{isCurrentPostPublished:a,getCurrentPostId:s}=e(b.store);return{slug:(null===(o=r("postType","page",c))||void 0===o?void 0:o.slug)||t,isLoadingPage:n("getEntityRecord",["postType","page",c]),postPublished:a(),currentPostId:s()}},[]),[k,E]=Object(o.useState)("pristine"),f=Object(o.useCallback)(()=>{E("updating"),Promise.resolve().then(()=>g()({path:"/wc/v3/settings/advanced/"+r,method:"GET"})).catch(e=>{"rest_setting_setting_invalid"===e.code&&E("error")}).then(()=>{if(!m)return l({status:"publish"}),u()}).then(()=>g()({path:"/wc/v3/settings/advanced/"+r,method:"POST",data:{value:j.toString()}})).then(()=>{if(0!==c)return a("postType","page",{id:c,slug:d+"-2"})}).then(()=>l({slug:d})).then(()=>u()).then(()=>E("updated"))},[m,l,u,r,j,c,a,d]);return j===c||"dismissed"===k?null:Object(o.createElement)(s.Notice,{className:"wc-default-page-notice",status:"updated"===k?"success":"warning",onRemove:()=>E("dismissed"),spokenMessage:"updated"===k?Object(i.__)("Page settings updated","woo-gutenberg-products-block"):n},"updated"===k?Object(i.__)("Page settings updated","woo-gutenberg-products-block"):Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",null,n),Object(o.createElement)(s.Button,{onClick:f,variant:"secondary",isBusy:"updating"===k,disabled:p,isSmall:!0},Object(i.__)("update your page settings","woo-gutenberg-products-block"))))}function E(e){let{block:t}=e;return Object(o.createElement)(s.Notice,{className:"wc-blocks-legacy-page-notice",isDismissible:!1,status:"warning"},Object(o.createInterpolateElement)(Object(i.sprintf)(
|
24 |
/* translators: %s is the block name. It will be cart or checkout. */
|
25 |
Object(i.__)("If you would like to use this block as your default %s you must update your <a>page settings in WooCommerce</a>.","woo-gutenberg-products-block"),t),{a:Object(o.createElement)("a",{href:Object(j.getAdminLink)("admin.php?page=wc-settings&tab=advanced"),target:"_blank",rel:"noopener noreferrer"})}))}c(296);var f=c(160);const y=Object(r.createHigherOrderComponent)(e=>t=>{const c=["woocommerce/checkout-shipping-address-block","woocommerce/checkout-billing-address-block","woocommerce/checkout-contact-information-block","woocommerce/checkout-fields-block"],{clientId:r}=t,{isCart:a,isCheckout:s,isAddressFieldBlock:i}=Object(O.useSelect)(e=>{const{getBlockParentsByBlockName:t,getBlockName:o}=e(n.store),a=t(r,["woocommerce/cart","woocommerce/checkout"]).map(o),s=o(r);return{isCart:a.includes("woocommerce/cart")||"woocommerce/cart"===s,isCheckout:a.includes("woocommerce/checkout")||"woocommerce/checkout"===s,isAddressFieldBlock:c.includes(s)}});return Object(o.createElement)(o.Fragment,null,(a||s)&&Object(o.createElement)(n.InspectorControls,null,Object(j.isWcVersion)("6.9.0",">=")?Object(o.createElement)(k,{block:s?"checkout":"cart"}):Object(o.createElement)(E,{block:s?"checkout":"cart"}),Object(o.createElement)(p,{block:s?"checkout":"cart"}),i?null:Object(o.createElement)(f.a,null)),Object(o.createElement)(e,t))},"withSidebarNotices");Object(a.hasFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice")||Object(a.addFilter)("editor.BlockEdit","woocommerce/add/sidebar-compatibility-notice",y,11)},,,function(e,t,c){"use strict";c.d(t,"a",(function(){return y}));var o=c(0),r=c(227),n=c(2),a=c(132),s=c(133),i=c(110),l=c(111),u=c(105),d=c(1),p=c(14),b=c.n(p),m=c(267),g=c(28),h=c(7),O=c(9),_=c(36);const j=(e,t,c)=>{const o=Object.keys(e).map(t=>({key:t,value:e[t]}),[]),r=`wc-${c}-new-payment-method`;return o.push({key:r,value:t}),o},k=e=>{const{__internalSetCustomerId:t}=Object(h.dispatch)(O.CHECKOUT_STORE_KEY);b.a.setNonce&&"function"==typeof b.a.setNonce&&b.a.setNonce(e),null!=e&&e.get("User-ID")&&t(parseInt(e.get("User-ID")||"0",10))};var E=c(41),f=()=>{const{onCheckoutValidationBeforeProcessing:e}=Object(u.b)(),{hasError:t,redirectUrl:c,isProcessing:r,isBeforeProcessing:n,isComplete:a,orderNotes:s,shouldCreateAccount:p,extensionData:f}=Object(h.useSelect)(e=>{const t=e(O.CHECKOUT_STORE_KEY);return{...t.getCheckoutState(),isProcessing:t.isProcessing(),isBeforeProcessing:t.isBeforeProcessing(),isComplete:t.isComplete()}}),{__internalSetHasError:y,__internalProcessCheckoutResponse:w}=Object(h.useDispatch)(O.CHECKOUT_STORE_KEY),v=Object(h.useSelect)(e=>e(O.VALIDATION_STORE_KEY).hasValidationErrors),{shippingErrorStatus:C}=Object(i.b)(),{billingAddress:S,shippingAddress:P}=Object(l.b)(),{cartNeedsPayment:N,cartNeedsShipping:T,receiveCart:x}=Object(E.a)(),{createErrorNotice:R,removeNotice:A}=Object(h.useDispatch)("core/notices"),{activePaymentMethod:I,paymentMethodData:M,isExpressPaymentMethodActive:B,currentPaymentStatus:D,shouldSavePayment:L}=Object(h.useSelect)(e=>{const t=e(O.PAYMENT_STORE_KEY);return{activePaymentMethod:t.getActivePaymentMethod(),paymentMethodData:t.getPaymentMethodData(),isExpressPaymentMethodActive:t.isExpressPaymentMethodActive(),currentPaymentStatus:t.getCurrentStatus(),shouldSavePayment:t.shouldSavePaymentMethod()}},[]),F=Object(_.getPaymentMethods)(),U=Object(_.getExpressPaymentMethods)(),Y=Object(o.useRef)(S),V=Object(o.useRef)(P),$=Object(o.useRef)(c),[K,q]=Object(o.useState)(!1),z=Object(o.useMemo)(()=>{var e;const t={...U,...F};return null==t||null===(e=t[I])||void 0===e?void 0:e.paymentMethodId},[I,U,F]),H=v()&&!B||D.hasError||C.hasError,W=!t&&!H&&(D.isSuccessful||!N)&&r;Object(o.useEffect)(()=>{H===t||!r&&!n||B||y(H)},[H,t,r,n,B,y]),Object(o.useEffect)(()=>{Y.current=S,V.current=P,$.current=c},[S,P,c]);const G=Object(o.useCallback)(()=>!v()&&(D.hasError?{errorMessage:Object(d.__)("There was a problem with your payment option.","woo-gutenberg-products-block")}:!C.hasError||{errorMessage:Object(d.__)("There was a problem with your shipping option.","woo-gutenberg-products-block")}),[v,D.hasError,C.hasError]);Object(o.useEffect)(()=>{let t;return B||(t=e(G,0)),()=>{B||t()}},[e,G,B]),Object(o.useEffect)(()=>{$.current&&(window.location.href=$.current)},[a]);const Q=Object(o.useCallback)(async()=>{if(K)return;q(!0),A("checkout");const e=N?{payment_method:z,payment_data:j(M,L,I)}:{},t={billing_address:Object(m.a)(Y.current),customer_note:s,create_account:p,...e,extensions:{...f}};T&&(t.shipping_address=Object(m.a)(V.current)),b()({path:"/wc/store/v1/checkout",method:"POST",data:t,cache:"no-store",parse:!1}).then(e=>{if(k(e.headers),!e.ok)throw new Error(e);return e.json()}).then(e=>{w(e),q(!1)}).catch(e=>{try{null!=e&&e.headers&&k(e.headers),e.json().then(e=>{var t,c,o;null!==(t=e.data)&&void 0!==t&&t.cart&&x(e.data.cart),R(Object(g.b)(e),{id:"checkout",context:"wc/checkout",__unstableHTML:!0}),null==e||null===(c=e.additional_errors)||void 0===c||null===(o=c.forEach)||void 0===o||o.call(c,e=>{R(e.message,{id:e.error_code,context:"wc/checkout",__unstableHTML:!0})}),w(e)})}catch{var t;R(Object(d.sprintf)(// Translators: %s Error text.
|
26 |
+
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. Please contact us for assistance.","woo-gutenberg-products-block")),{id:"checkout",context:"wc/checkout",__unstableHTML:!0})}y(!0),q(!1)})},[K,A,N,z,M,L,I,s,p,f,T,R,x,y,w]);return Object(o.useEffect)(()=>{W&&!K&&Q()},[Q,W,K]),null};const y=e=>{let{children:t,redirectUrl:c}=e;return Object(o.createElement)(u.a,{redirectUrl:c},Object(o.createElement)(l.a,null,Object(o.createElement)(i.a,null,Object(o.createElement)(s.a,null,t,Object(o.createElement)(a.a,{renderError:n.CURRENT_USER_IS_ADMIN?null:()=>null},Object(o.createElement)(r.PluginArea,{scope:"woocommerce-checkout"})),Object(o.createElement)(f,null)))))}},,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return M}));var o=c(1),r=c(26),n=c(0),a=c(4),s=c.n(a),i=c(13),l=Object(n.createElement)(i.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"}))),u=c(554),d=c(540),p=c(553),b=c(119),m=c(86),g=c(33);c(285);const h={bank:u.a,bill:d.a,card:p.a,checkPayment:l};var O=e=>{let{icon:t="",text:c=""}=e;const o=!!t,r=Object(n.useCallback)(e=>o&&Object(m.a)(e)&&Object(g.b)(h,e),[o]),a=s()("wc-block-components-payment-method-label",{"wc-block-components-payment-method-label--with-icon":o});return Object(n.createElement)("span",{className:a},r(t)?Object(n.createElement)(b.a,{icon:h[t]}):t,c)},_=c(159),j=c(2),k=c(52),E=c.n(k),f=c(71),y=c(7),w=c(9),v=c(67),C=c(41),S=c(225),P=c(58),N=c(105),T=c(133),x=c(110),R=c(111);const A=(e,t)=>{const c=[],r=(t,c)=>{const o=c+"_tax",r=Object(g.b)(e,c)&&Object(m.a)(e[c])?parseInt(e[c],10):0;return{key:c,label:t,value:r,valueWithTax:r+(Object(g.b)(e,o)&&Object(m.a)(e[o])?parseInt(e[o],10):0)}};return c.push(r(Object(o.__)("Subtotal:","woo-gutenberg-products-block"),"total_items")),c.push(r(Object(o.__)("Fees:","woo-gutenberg-products-block"),"total_fees")),c.push(r(Object(o.__)("Discount:","woo-gutenberg-products-block"),"total_discount")),c.push({key:"total_tax",label:Object(o.__)("Taxes:","woo-gutenberg-products-block"),value:parseInt(e.total_tax,10),valueWithTax:parseInt(e.total_tax,10)}),t&&c.push(r(Object(o.__)("Shipping:","woo-gutenberg-products-block"),"total_shipping")),c};var I=c(128);const M=()=>{const{onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onCheckoutAfterProcessingWithSuccess:c,onCheckoutAfterProcessingWithError:a,onSubmit:s}=Object(N.b)(),{isCalculating:i,isComplete:l,isIdle:u,isProcessing:d,customerId:p}=Object(y.useSelect)(e=>{const t=e(w.CHECKOUT_STORE_KEY);return{isComplete:t.isComplete(),isIdle:t.isIdle(),isProcessing:t.isProcessing(),customerId:t.getCustomerId(),isCalculating:t.isCalculating()}}),{currentStatus:b,activePaymentMethod:m,shouldSavePayment:g}=Object(y.useSelect)(e=>{const t=e(w.PAYMENT_STORE_KEY);return{currentStatus:t.getCurrentStatus(),activePaymentMethod:t.getActivePaymentMethod(),shouldSavePayment:t.getShouldSavePaymentMethod()}}),{__internalSetExpressPaymentError:h}=Object(y.useDispatch)(w.PAYMENT_STORE_KEY),{onPaymentProcessing:k}=Object(T.b)(),{shippingErrorStatus:M,shippingErrorTypes:B,onShippingRateSuccess:D,onShippingRateFail:L,onShippingRateSelectSuccess:F,onShippingRateSelectFail:U}=Object(x.b)(),{shippingRates:Y,isLoadingRates:V,selectedRates:$,isSelectingRate:K,selectShippingRate:q,needsShipping:z}=Object(I.a)(),{billingAddress:H,shippingAddress:W,setShippingAddress:G}=Object(R.b)(),{cartItems:Q,cartFees:X,cartTotals:J,extensions:Z}=Object(C.a)(),{appliedCoupons:ee}=Object(S.a)(),te=Object(n.useRef)(A(J,z)),ce=Object(n.useRef)({label:Object(o.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)});Object(n.useEffect)(()=>{te.current=A(J,z),ce.current={label:Object(o.__)("Total","woo-gutenberg-products-block"),value:parseInt(J.total_price,10)}},[J,z]);const oe=Object(n.useCallback)((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";E()("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"}),h(e)}),[h]);return{activePaymentMethod:m,billing:{appliedCoupons:ee,billingAddress:H,billingData:H,cartTotal:ce.current,cartTotalItems:te.current,currency:Object(r.getCurrencyFromPriceResponse)(J),customerId:p,displayPricesIncludingTax:Object(j.getSetting)("displayCartPricesIncludingTax",!1)},cartData:{cartItems:Q,cartFees:X,extensions:Z},checkoutStatus:{isCalculating:i,isComplete:l,isIdle:u,isProcessing:d},components:{LoadingMask:f.a,PaymentMethodIcons:_.a,PaymentMethodLabel:O,ValidationInputError:v.a},emitResponse:{noticeContexts:P.d,responseTypes:P.e},eventRegistration:{onCheckoutAfterProcessingWithError:a,onCheckoutAfterProcessingWithSuccess:c,onCheckoutBeforeProcessing:e,onCheckoutValidationBeforeProcessing:t,onPaymentProcessing:k,onShippingRateFail:L,onShippingRateSelectFail:U,onShippingRateSelectSuccess:F,onShippingRateSuccess:D},onSubmit:s,paymentStatus:b,setExpressPaymentError:oe,shippingData:{isSelectingRate:K,needsShipping:z,selectedRates:$,setSelectedRates:q,setShippingAddress:G,shippingAddress:W,shippingRates:Y,shippingRatesLoading:V},shippingStatus:{shippingErrorStatus:M,shippingErrorTypes:B},shouldSavePayment:g}}},function(e,t,c){"use strict";c.d(t,"b",(function(){return i})),c.d(t,"a",(function(){return l}));var o=c(0),r=c(11),n=c(4),a=c.n(n);const s=Object(o.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),i=()=>Object(o.useContext)(s),l=e=>{let{children:t,className:c=""}=e;const[n,i]=(()=>{const[e,{width:t}]=Object(r.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(o.createElement)(s.Provider,{value:l},Object(o.createElement)("div",{className:a()(c,i)},n,t))}},function(e,t,c){"use strict";var o=c(6),r=c.n(o),n=c(0),a=c(1),s=c(12),i=c(4),l=c.n(i),u=c(11),d=c(86),p=c(7),b=c(9),m=c(29);c(207);var g=Object(s.forwardRef)((e,t)=>{let{className:c,id:o,type:a="text",ariaLabel:s,ariaDescribedBy:i,label:u,screenReaderLabel:d,disabled:p,help:b,autoCapitalize:g="off",autoComplete:h="off",value:O="",onChange:_,required:j=!1,onBlur:k=(()=>{}),feedback:E,...f}=e;const[y,w]=Object(n.useState)(!1);return Object(n.createElement)("div",{className:l()("wc-block-components-text-input",c,{"is-active":y||O})},Object(n.createElement)("input",r()({type:a,id:o,value:O,ref:t,autoCapitalize:g,autoComplete:h,onChange:e=>{_(e.target.value)},onFocus:()=>w(!0),onBlur:e=>{k(e.target.value),w(!1)},"aria-label":s||u,disabled:p,"aria-describedby":b&&!i?o+"__help":i,required:j},f)),Object(n.createElement)(m.a,{label:u,screenReaderLabel:d||u,wrapperElement:"label",wrapperProps:{htmlFor:o},htmlFor:o}),!!b&&Object(n.createElement)("p",{id:o+"__help",className:"wc-block-components-text-input__help"},b),E)}),h=c(67);t.a=Object(u.withInstanceId)(e=>{let{className:t,instanceId:c,id:o,ariaDescribedBy:i,errorId:u,focusOnMount:m=!1,onChange:O,showError:_=!0,errorMessage:j="",value:k="",...E}=e;const[f,y]=Object(s.useState)(!0),w=Object(s.useRef)(null),{setValidationErrors:v,hideValidationError:C,clearValidationError:S}=Object(p.dispatch)(b.VALIDATION_STORE_KEY),P=void 0!==o?o:"textinput-"+c,N=void 0!==u?u:P,{validationError:T,validationErrorId:x}=Object(p.useSelect)(e=>{const t=e(b.VALIDATION_STORE_KEY);return{validationError:t.getValidationError(N),validationErrorId:t.getValidationErrorId(N)}}),R=Object(s.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();if(c)S(N);else{const c={[N]:{message:t.validationMessage||Object(a.__)("Invalid value.","woo-gutenberg-products-block"),hidden:e}};v(c)}}),[S,N,v]);Object(s.useEffect)(()=>{var e;f&&m&&(null===(e=w.current)||void 0===e||e.focus()),y(!1)},[m,f,y]),Object(s.useEffect)(()=>{var e,t;(null===(e=w.current)||void 0===e||null===(t=e.ownerDocument)||void 0===t?void 0:t.activeElement)!==w.current&&R(!0)},[k,R]),Object(s.useEffect)(()=>()=>{S(N)},[S,N]),Object(d.a)(j)&&""!==j&&(T.message=j);const A=(null==T?void 0:T.message)&&!(null!=T&&T.hidden),I=_&&A&&x?x:i;return Object(n.createElement)(g,r()({className:l()(t,{"has-error":A}),"aria-invalid":!0===A,id:P,onBlur:()=>{R(!1)},feedback:_&&Object(n.createElement)(h.a,{errorMessage:j,propertyName:N}),ref:w,onChange:e=>{C(N),O(e)},ariaDescribedBy:I,value:k},E))})},,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));var o=c(58);const r=async(e,t,c)=>{const r=Object(o.a)(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},n=async(e,t,c)=>{const r=[],n=Object(o.a)(e,t);for(const e of n)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.b)(t)||Object(o.c)(t))return r.push(t),r;r.push(t)}catch(e){return console.error(e),r.push({type:"error"}),r}return r}},,,,,,,,,,,,,,,function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var o=c(10);const r=["core/paragraph","core/image","core/separator"],n=e=>[...Object(o.getBlockTypes)().filter(t=>((null==t?void 0:t.parent)||[]).includes(e)).map(e=>{let{name:t}=e;return t}),...r]},function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var o=c(0),r=c(7),n=c(10),a=c(8);const s=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:s=[]}=e;const i=Object(o.useRef)(c),l=Object(o.useRef)(s),{insertBlock:u,replaceInnerBlocks:d}=Object(r.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:b}=Object(r.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:i.current.map(e=>Object(n.getBlockType)(e))}),[t,i.current]),m=Object(o.useCallback)((e,c)=>{const o=Object(n.createBlock)(e.name);u(o,c,t,!1)},[t]),g=Object(o.useMemo)(()=>b.filter(e=>e&&(e=>{var t,c,o;let{attributes:r}=e;return Boolean((null===(t=r.lock)||void 0===t?void 0:t.remove)||(null===(c=r.lock)||void 0===c||null===(o=c.default)||void 0===o?void 0:o.remove))})(e)),[b]);Object(o.useLayoutEffect)(()=>{if(t){if(0===p.length&&l.current.length>0){const e=Object(n.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],o=p.findIndex(e=>{let{name:t}=e;return t===c[0]});m(e,-1===o?t:o+1)}})}},[t,p,g,m])}},function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var o=c(1),r=c(22),n=c(2);const a=[{destination:{address_1:"",address_2:"",city:"",state:"",postcode:"",country:""},package_id:0,name:Object(o.__)("Shipping","woo-gutenberg-products-block"),items:[{key:"33e75ff09dd601bbe69f351039152189",name:Object(o._x)("Beanie with Logo","example product in Cart Block","woo-gutenberg-products-block"),quantity:2},{key:"6512bd43d9caa6e02c990b0a82652dca",name:Object(o._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(o.__)("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(o.__)("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(n.getSetting)("displayCartPricesIncludingTax",!1),i={coupons:[],shipping_rates:Object(n.getSetting)("shippingMethodsExist",!1)?a:[],items:[{key:"1",id:1,quantity:2,name:Object(o.__)("Beanie","woo-gutenberg-products-block"),short_description:Object(o.__)("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:r.m+"previews/beanie.jpg",thumbnail:r.m+"previews/beanie.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(o.__)("Color","woo-gutenberg-products-block"),value:Object(o.__)("Yellow","woo-gutenberg-products-block")},{attribute:Object(o.__)("Size","woo-gutenberg-products-block"),value:Object(o.__)("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(o.__)("Cap","woo-gutenberg-products-block"),short_description:Object(o.__)("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:r.m+"previews/cap.jpg",thumbnail:r.m+"previews/cap.jpg",srcset:"",sizes:"",name:"",alt:""}],variation:[{attribute:Object(o.__)("Color","woo-gutenberg-products-block"),value:Object(o.__)("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:{}}],cross_sells:[{id:1,name:Object(o.__)("Polo","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"24000":"20000",regular_price:s?"24000":"20000",sale_price:s?"12000":"10000",raw_prices:{precision:6,price:s?"24000000":"20000000",regular_price:s?"24000000":"20000000",sale_price:s?"12000000":"10000000"}},images:[{id:17,src:r.m+"previews/polo.jpg",thumbnail:r.m+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4.5},{id:2,name:Object(o.__)("Long Sleeve Tee","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"30000":"25000",regular_price:s?"30000":"25000",sale_price:s?"30000":"25000",raw_prices:{precision:6,price:s?"30000000":"25000000",regular_price:s?"30000000":"25000000",sale_price:s?"30000000":"25000000"}},images:[{id:17,src:r.m+"previews/long-sleeve-tee.jpg",thumbnail:r.m+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4},{id:3,name:Object(o.__)("Hoodie with Zipper","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"15000":"12500",regular_price:s?"30000":"25000",sale_price:s?"15000":"12500",raw_prices:{precision:6,price:s?"15000000":"12500000",regular_price:s?"30000000":"25000000",sale_price:s?"15000000":"12500000"}},images:[{id:17,src:r.m+"previews/hoodie-with-zipper.jpg",thumbnail:r.m+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:1},{id:4,name:Object(o.__)("Hoodie with Logo","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"4500":"4250",regular_price:s?"4500":"4250",sale_price:s?"4500":"4250",raw_prices:{precision:6,price:s?"45000000":"42500000",regular_price:s?"45000000":"42500000",sale_price:s?"45000000":"42500000"}},images:[{id:17,src:r.m+"previews/hoodie-with-logo.jpg",thumbnail:r.m+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:5},{id:5,name:Object(o.__)("Hoodie with Pocket","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"3500":"3250",regular_price:s?"4500":"4250",sale_price:s?"3500":"3250",raw_prices:{precision:6,price:s?"35000000":"32500000",regular_price:s?"45000000":"42500000",sale_price:s?"35000000":"32500000"}},images:[{id:17,src:r.m+"previews/hoodie-with-pocket.jpg",thumbnail:r.m+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3.75},{id:6,name:Object(o.__)("T-Shirt","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:s?"1800":"1500",regular_price:s?"1800":"1500",sale_price:s?"1800":"1500",raw_prices:{precision:6,price:s?"1800000":"1500000",regular_price:s?"1800000":"1500000",sale_price:s?"1800000":"1500000"}},images:[{id:17,src:r.m+"previews/tshirt.jpg",thumbnail:r.m+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3}],fees:[{id:"fee",name:Object(o.__)("Fee","woo-gutenberg-products-block"),totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total:"100",total_tax:"20",tax_lines:[{name:Object(o.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"20"}]}}],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:"100",total_fees_tax:"20",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"820",total_price:"4920",tax_lines:[{name:Object(o.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"820"}]},errors:[],payment_requirements:["products"],extensions:{}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(4),n=c.n(r),a=c(312);c(281),t.a=e=>{let{children:t,className:c}=e;return Object(o.createElement)(a.a,{className:n()("wc-block-components-sidebar-layout",c)},t)}},function(e,t,c){"use strict";var o=c(0),r=c(12),n=c(4),a=c.n(n);const s=Object(r.forwardRef)((e,t)=>{let{children:c,className:r=""}=e;return Object(o.createElement)("div",{ref:t,className:a()("wc-block-components-main",r)},c)});t.a=s},,,function(e,t,c){"use strict";var o=c(0),r=c(12),n=c(4),a=c.n(n);const s=Object(r.forwardRef)((e,t)=>{let{children:c,className:r=""}=e;return Object(o.createElement)("div",{ref:t,className:a()("wc-block-components-sidebar",r)},c)});t.a=s},,,,,,,function(e,t,c){"use strict";var o=c(0),r=c(13);const n=Object(o.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/SVG",viewBox:"0 0 24 24",fill:"none"},Object(o.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(o.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(o.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 o=c(0),r=c(1),n=c(4),a=c.n(n),s=c(38),i=c(18),l=c(41),u=c(2);c(286),t.a=e=>{let{currency:t,values:c,className:n}=e;const d=Object(u.getSetting)("taxesEnabled",!0)&&Object(u.getSetting)("displayCartPricesIncludingTax",!1),{total_price:p,total_tax:b}=c,{receiveCart:m,...g}=Object(l.a)(),h=Object(i.__experimentalApplyCheckoutFilter)({filterName:"totalLabel",defaultValue:Object(r.__)("Total","woo-gutenberg-products-block"),extensions:g.extensions,arg:{cart:g}}),O=parseInt(b,10);return Object(o.createElement)(i.TotalsItem,{className:a()("wc-block-components-totals-footer-item",n),currency:t,label:h,value:parseInt(p,10),description:d&&0!==O&&Object(o.createElement)("p",{className:"wc-block-components-totals-footer-item-tax"},Object(o.createInterpolateElement)(Object(r.__)("Including <TaxAmount/> in taxes","woo-gutenberg-products-block"),{TaxAmount:Object(o.createElement)(s.a,{className:"wc-block-components-totals-footer-item-tax-value",currency:t,value:O})}))})}},function(e,t,c){"use strict";var o=c(0),r=c(1),n=c(71),a=c(256),s=c(18),i=c(2);c(287);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,_=Object(s.__experimentalApplyCheckoutFilter)({arg:l,filterName:"coupons",defaultValue:t});return Object(o.createElement)(s.TotalsItem,{className:"wc-block-components-totals-discount",currency:c,description:0!==_.length&&Object(o.createElement)(n.a,{screenReaderLabel:Object(r.__)("Removing coupon…","woo-gutenberg-products-block"),isLoading:u,showSpinner:!1},Object(o.createElement)("ul",{className:"wc-block-components-totals-discount__coupon-list"},_.map(e=>Object(o.createElement)(a.a,{key:"coupon-"+e.code,className:"wc-block-components-totals-discount__coupon-list-item",text:e.label,screenReaderText:Object(r.sprintf)(
|
27 |
/* translators: %s Coupon code. */
|
28 |
Object(r.__)("Coupon: %s","woo-gutenberg-products-block"),e.label),disabled:u,onRemove:()=>{d(e.code)},radius:"large",ariaLabel:Object(r.sprintf)(
|
29 |
/* translators: %s is a coupon code. */
|
build/mini-cart-contents.asset.php
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', '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-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '
|
1 |
+
<?php return array('dependencies' => array('lodash', 'react', 'wc-blocks-checkout', 'wc-blocks-data-store', 'wc-blocks-registry', 'wc-price-format', 'wc-settings', 'wp-a11y', '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-polyfill', 'wp-primitives', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '4f5888944db1a6de5480421f3348970a');
|
build/mini-cart-contents.js
CHANGED
@@ -10,7 +10,7 @@ Object(a.__)("Save %s","woo-gutenberg-products-block"),n);return Object(r.create
|
|
10 |
/* translators: %s refers to the item name in the cart. */
|
11 |
Object(a.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),re))},disabled:W},Object(a.__)("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:se,format:be,price:ue.getAmount()}),G>1&&Object(r.createElement)(C,{currency:ce,saleAmount:B(ie,ce),format:ge}))))});const D=[...Array(3)].map((_x,e)=>Object(r.createElement)(M,{lineItem:{},key:e})),L=e=>{const t={};return e.forEach(e=>{let{key:c}=e;t[c]=Object(r.createRef)()}),t};t.a=e=>{let{lineItems:t=[],isLoading:c=!1,className:n}=e;const i=Object(r.useRef)(null),s=Object(r.useRef)(L(t));Object(r.useEffect)(()=>{s.current=L(t)},[t]);const l=e=>()=>{null!=s&&s.current&&e&&s.current[e].current instanceof HTMLElement?s.current[e].current.focus():i.current instanceof HTMLElement&&i.current.focus()},u=c?D:t.map((e,c)=>{const n=t.length>c+1?t[c+1].key:null;return Object(r.createElement)(M,{key:e.key,lineItem:e,onRemove:l(n),ref:s.current[e.key],tabIndex:-1})});return Object(r.createElement)("table",{className:o()("wc-block-cart-items",n),ref:i,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(a.__)("Product","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(r.createElement)("span",null,Object(a.__)("Details","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(r.createElement)("span",null,Object(a.__)("Total","woo-gutenberg-products-block"))))),Object(r.createElement)("tbody",null,u))}},245:function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(15),i=c(2);c(201),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:i.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",n()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},246:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(81);t.a=()=>Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(n.__)("Available on backorder","woo-gutenberg-products-block"))},247:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(81);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)(
|
12 |
/* translators: %d stock amount (number of items in stock for product) */
|
13 |
-
Object(n.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},248:function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(15);c(204);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},i=c(121),s=c(22),l=e=>{let{className:t,shortDescription:c="",fullDescription:n=""}=e;const o=c||n;return o?Object(r.createElement)(i.a,{className:t,source:o,maxLength:15,countType:s.o.wordCountType||"words"}):null};c(203),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}})}))}},25:function(e,t){e.exports=window.wp.isShallowEqual},26:function(e,t){e.exports=window.wc.priceFormat},266:function(e,t,c){"use strict";c.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return i})),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 i=new r(e,{bubbles:c,cancelable:n,detail:a});o.dispatchEvent(i)};let o;const a=()=>{o&&clearTimeout(o),o=setTimeout(()=>{n("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=e=>{let{preserveCartData:t=!1}=e;n("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},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)}},267:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(95),n=(c(16),c(2));const o=e=>{const t=Object.keys(n.defaultAddressFields),c=Object(r.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}},268:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(98);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))}}},278:function(e,t,c){"use strict";var r=c(0),n=c(13);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},282:function(e,t){},3:function(e,t){e.exports=window.wp.components},33:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));const r=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function n(e,t){return r(e)&&t in e}},332:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(10);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]},333:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(0),n=c(7),o=c(10),a=c(8);const i=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:i=[]}=e;const s=Object(r.useRef)(c),l=Object(r.useRef)(i),[u,m]=Object(r.useState)(0),{insertBlock:p,replaceInnerBlocks:d}=Object(n.useDispatch)("core/block-editor"),{innerBlocks:b,registeredBlockTypes:_}=Object(n.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:s.current.map(e=>Object(o.getBlockType)(e))}),[t,s.current,u]),g=Object(r.useCallback)((e,c)=>{const r=Object(o.createBlock)(e.name);p(r,c,t,!1),m(u+1)},[t,u]),f=Object(r.useMemo)(()=>_.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)),[_]);Object(r.useLayoutEffect)(()=>{if(t){if(0===b.length&&l.current.length>0){const e=Object(o.createBlocksFromInnerBlocksTemplate)(l.current);if(!Object(a.isEqual)(e,b))return void d(t,e)}f.forEach(e=>{if(b.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:g(e,b.length);break;case 0:g(e,0);break;default:const c=l.current[t-1],r=b.findIndex(e=>{let{name:t}=e;return t===c[0]});g(e,-1===r?t:r+1)}})}},[t,b,f,g])}},334:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(1),n=c(22),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}]}],i=Object(o.getSetting)("displayCartPricesIncludingTax",!1),s={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:i?"12000":"10000",regular_price:i?"12000":"10000",sale_price:i?"12000":"10000",raw_prices:{precision:6,price:i?"12000000":"10000000",regular_price:i?"12000000":"10000000",sale_price:i?"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:i?"2400":"2000",regular_price:i?"2400":"2000",sale_price:i?"2400":"2000",raw_prices:{precision:6,price:i?"24000000":"20000000",regular_price:i?"24000000":"20000000",sale_price:i?"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:{}}],cross_sells:[{id:1,name:Object(r.__)("Polo","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"24000":"20000",regular_price:i?"24000":"20000",sale_price:i?"12000":"10000",raw_prices:{precision:6,price:i?"24000000":"20000000",regular_price:i?"24000000":"20000000",sale_price:i?"12000000":"10000000"}},images:[{id:17,src:n.m+"previews/polo.jpg",thumbnail:n.m+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4.5},{id:2,name:Object(r.__)("Long Sleeve Tee","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"30000":"25000",regular_price:i?"30000":"25000",sale_price:i?"30000":"25000",raw_prices:{precision:6,price:i?"30000000":"25000000",regular_price:i?"30000000":"25000000",sale_price:i?"30000000":"25000000"}},images:[{id:17,src:n.m+"previews/long-sleeve-tee.jpg",thumbnail:n.m+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4},{id:3,name:Object(r.__)("Hoodie with Zipper","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"15000":"12500",regular_price:i?"30000":"25000",sale_price:i?"15000":"12500",raw_prices:{precision:6,price:i?"15000000":"12500000",regular_price:i?"30000000":"25000000",sale_price:i?"15000000":"12500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-zipper.jpg",thumbnail:n.m+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:1},{id:4,name:Object(r.__)("Hoodie with Logo","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"4500":"4250",regular_price:i?"4500":"4250",sale_price:i?"4500":"4250",raw_prices:{precision:6,price:i?"45000000":"42500000",regular_price:i?"45000000":"42500000",sale_price:i?"45000000":"42500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-logo.jpg",thumbnail:n.m+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:5},{id:5,name:Object(r.__)("Hoodie with Pocket","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"3500":"3250",regular_price:i?"4500":"4250",sale_price:i?"3500":"3250",raw_prices:{precision:6,price:i?"35000000":"32500000",regular_price:i?"45000000":"42500000",sale_price:i?"35000000":"32500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-pocket.jpg",thumbnail:n.m+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3.75},{id:6,name:Object(r.__)("T-Shirt","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"1800":"1500",regular_price:i?"1800":"1500",sale_price:i?"1800":"1500",raw_prices:{precision:6,price:i?"1800000":"1500000",regular_price:i?"1800000":"1500000",sale_price:i?"1800000":"1500000"}},images:[{id:17,src:n.m+"previews/tshirt.jpg",thumbnail:n.m+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3}],fees:[{id:"fee",name:Object(r.__)("Fee","woo-gutenberg-products-block"),totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total:"100",total_tax:"20",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"20"}]}}],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:"100",total_fees_tax:"20",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"820",total_price:"4920",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"820"}]},errors:[],payment_requirements:["products"],extensions:{}}},344:function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-mini-cart-contents-block","version":"1.0.0","title":"Empty Mini Cart view.","description":"Blocks that are displayed when the Mini Cart is empty.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/mini-cart-contents"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},345:function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-mini-cart-contents-block","version":"1.0.0","title":"Filled Mini Cart view","description":"Contains blocks that display the content of the Mini Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/mini-cart-contents"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},346:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-title-block","version":"1.0.0","title":"Mini Cart Title","description":"Block that displays the title of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},347:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-items-block","version":"1.0.0","title":"Mini Cart Items","description":"Contains the products table and other custom blocks of filled mini cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},348:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-products-table-block","version":"1.0.0","title":"Mini Cart Products Table","description":"Block that displays the products table of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/mini-cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},349:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-footer-block","version":"1.0.0","title":"Mini Cart Footer","description":"Block that displays the footer of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},350:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-shopping-button-block","version":"1.0.0","title":"Mini Cart Shopping Button","description":"Block that displays the shopping button when the Mini Cart is empty.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"attributes":{"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/empty-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},36:function(e,t){e.exports=window.wc.wcBlocksRegistry},38:function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(131),i=c(4),s=c.n(i);c(137);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:i,displayType:u="text",...m}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const d=p/10**r.minorUnit;if(!Number.isFinite(d))return null;const b=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),_={...m,...l(r),value:void 0,currency:void 0,onValueChange:void 0},g=i?e=>{const t=+e.value*10**r.minorUnit;i(t)}:()=>{};return Object(o.createElement)(a.a,n()({className:b,displayType:u},_,{value:d,onValueChange:g}))}},40:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),n=c(25),o=c.n(n);function a(e){const t=Object(r.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},41:function(e,t,c){"use strict";c.d(t,"a",(function(){return O}));var r=c(8),n=c(0),o=c(9),a=c(7),i=c(15),s=c(267),l=c(85),u=c(266);const m=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(o.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},d=()=>{Object(n.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",m),document.body.addEventListener("wc-blocks_removed_from_cart",m),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",m),document.body.removeEventListener("wc-blocks_removed_from_cart",m)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},b={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},_={...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:o.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},f=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(i.decodeEntities)(c)]})),y={cartCoupons:o.EMPTY_CART_COUPONS,cartItems:o.EMPTY_CART_ITEMS,cartFees:o.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,crossSellsProducts:o.EMPTY_CART_CROSS_SELLS,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:_,shippingAddress:b,shippingRates:o.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:o.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:o.EMPTY_EXTENSIONS},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(l.b)(),i=null==c?void 0:c.previewCart,{shouldSelect:u}=e,m=Object(n.useRef)();d();const p=Object(a.useSelect)((e,c)=>{let{dispatch:r}=c;if(!u)return y;if(t)return{cartCoupons:i.coupons,cartItems:i.items,crossSellsProducts:i.cross_sells,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,billingData:_,billingAddress:_,shippingAddress:b,extensions:o.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const n=e(o.CART_STORE_KEY),a=n.getCartData(),l=n.getCartErrors(),m=n.getCartTotals(),p=!n.hasFinishedResolution("getCartData"),d=n.isCustomerDataUpdating(),{receiveCart:g}=r(o.CART_STORE_KEY),O=f(a.billingAddress),w=a.needsShipping?f(a.shippingAddress):O,j=a.fees.length>0?a.fees.map(e=>f(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,crossSellsProducts:a.crossSells,cartFees:j,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:m,cartIsLoading:p,cartErrors:l,billingData:Object(s.a)(O),billingAddress:Object(s.a)(O),shippingAddress:Object(s.a)(w),extensions:a.extensions,shippingRates:a.shippingRates,isLoadingRates:d,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:g}},[u]);return m.current&&Object(r.isEqual)(m.current,p)||(m.current=p),m.current}},426:function(e,t,c){"use strict";var r=c(0),n=c(13);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},43:function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(73),i=c(118);const s=["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=>{s.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},m=Object(i.a)(u,0,{leading:!0});return Object(o.useLayoutEffect)(()=>{let e;return u(),l.current&&(e=new window.MutationObserver(m),e.observe(l.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),m.cancel()}},[m]),Object(o.createElement)("div",n()({ref:l,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...c}},r),t)}},436:function(e,t,c){"use strict";var r=c(0),n=c(13);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},438:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[])},46:function(e,t){e.exports=window.wp.hooks},468:function(e,t,c){e.exports=c(481)},469:function(e,t){},48:function(e,t){e.exports=window.wp.a11y},481:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(278),a=c(119),i=c(10),s=c(5),l=c(426),u=c(436),m=c(85),p=c(510),d=c(333);const b=e=>{let{style:t}=e;const c=[{selector:".wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout",properties:[{property:"color",value:t.backgroundColor},{property:"background-color",value:t.color},{property:"border-color",value:t.color}]}].map(e=>{let{selector:t,properties:c}=e;const r=c.filter(e=>{let{value:t}=e;return t}).map(e=>{let{property:t,value:c}=e;return`${t}: ${c};`}).join("");return r?`${t} { ${r} }`:""}).join("").trim();return c?Object(r.createElement)("style",null,c," "):Object(r.createElement)(r.Fragment,null)};c(469);const _=["woocommerce/filled-mini-cart-contents-block","woocommerce/empty-mini-cart-contents-block"],g=[{view:"woocommerce/filled-mini-cart-contents-block",label:Object(n.__)("Filled Mini Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(a.a,{icon:l.a})},{view:"woocommerce/empty-mini-cart-contents-block",label:Object(n.__)("Empty Mini Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(a.a,{icon:u.a})}];var f=c(6),y=c.n(f);const O=["woocommerce/mini-cart","woocommerce/checkout","woocommerce/cart","woocommerce/single-product","woocommerce/cart-totals-block","woocommerce/checkout-fields-block","core/post-template","core/comment-template","core/query-pagination","core/comments-query-loop","core/post-comments-form","core/post-comments-link","core/post-comments-count","core/comments-pagination","core/post-navigation-link","core/button"],w=()=>Object(i.getBlockTypes)().filter(e=>!(O.includes(e.name)||e.parent&&e.parent.filter(e=>O.includes(e)).length>0)).map(e=>{let{name:t}=e;return t});var j=c(344);Object(i.registerBlockType)(j,{icon:{src:Object(r.createElement)(a.a,{icon:u.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)(),{currentView:t}=Object(m.b)();return Object(r.createElement)("div",y()({},e,{hidden:"woocommerce/empty-mini-cart-contents-block"!==t}),Object(r.createElement)(s.InnerBlocks,{allowedBlocks:w(),renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var k=c(18),v=c(334),h=c(332),E=c(345);Object(i.registerBlockType)(E,{icon:{src:Object(r.createElement)(a.a,{icon:l.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),n=Object(h.a)(k.innerBlockAreas.FILLED_MINI_CART),{currentView:o}=Object(m.b)(),a=[["woocommerce/mini-cart-title-block",{}],["woocommerce/mini-cart-items-block",{}],["woocommerce/mini-cart-footer-block",{}]].filter(Boolean);return Object(d.a)({clientId:t,registeredBlocks:n,defaultTemplate:a}),Object(r.createElement)("div",y()({},c,{hidden:"woocommerce/filled-mini-cart-contents-block"!==o}),Object(r.createElement)(m.a,{currentView:o,previewData:{previewCart:v.a}},Object(r.createElement)(s.InnerBlocks,{template:a,allowedBlocks:n,templateLock:"insert"})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var x=c(539),S=c(41),C=c(4),P=c.n(C),N=e=>{let{className:t}=e;const{cartItemsCount:c,cartIsLoading:o}=Object(S.a)();return Object(r.createElement)("h2",{className:P()(t,"wc-block-mini-cart__title")},o?Object(n.__)("Your cart","woo-gutenberg-products-block"):Object(n.sprintf)(
|
14 |
/* translators: %d is the count of items in the cart. */
|
15 |
Object(n._n)("Your cart (%d item)","Your cart (%d items)",c,"woo-gutenberg-products-block"),c))},T=c(346);Object(i.registerBlockType)(T,{icon:{src:Object(r.createElement)(a.a,{icon:x.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(N,null))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var I=c(538),A=c(347);Object(i.registerBlockType)(A,{icon:{src:Object(r.createElement)(a.a,{icon:I.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)({className:"wc-block-mini-cart__items"}),t=[["woocommerce/mini-cart-products-table-block",{}]].filter(Boolean);return Object(r.createElement)("div",e,Object(r.createElement)(s.InnerBlocks,{template:t,renderAppender:s.InnerBlocks.ButtonBlockAppender,templateLock:!1,allowedBlocks:w()}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var B=c(560),R=c(43),M=c(228),D=e=>{let{className:t}=e;const{cartItems:c,cartIsLoading:n}=Object(S.a)();return Object(r.createElement)("div",{className:P()(t,"wc-block-mini-cart__products-table")},Object(r.createElement)(M.a,{lineItems:c,isLoading:n,className:"wc-block-mini-cart-items"}))},L=c(348);Object(i.registerBlockType)(L,{icon:Object(r.createElement)(a.a,{icon:B.a,className:"wc-block-editor-components-block-icon"}),edit:()=>{const e=Object(s.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(R.a,null,Object(r.createElement)(D,null)))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var q=c(553),V=c(26),F=c(182),$=c(159),z=c(438),U=c(2),Y=c(22),H=c(59),K=c(133);const G=()=>{const{paymentMethods:e}=Object(F.b)();return Object(r.createElement)($.a,{icons:Object(z.a)(e)})};var Q=e=>{let{className:t}=e;const{cartTotals:c}=Object(S.a)(),o=Object(U.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_items,10)+parseInt(c.total_items_tax,10):parseInt(c.total_items,10);return Object(r.createElement)("div",{className:P()(t,"wc-block-mini-cart__footer")},Object(r.createElement)(k.TotalsItem,{className:"wc-block-mini-cart__footer-subtotal",currency:Object(V.getCurrencyFromPriceResponse)(c),label:Object(n.__)("Subtotal","woo-gutenberg-products-block"),value:o,description:Object(n.__)("Shipping, taxes, and discounts calculated at checkout.","woo-gutenberg-products-block")}),Object(r.createElement)("div",{className:"wc-block-mini-cart__footer-actions"},Y.d&&Object(r.createElement)(H.a,{className:"wc-block-mini-cart__footer-cart",href:Y.d,variant:"outlined"},Object(n.__)("View my cart","woo-gutenberg-products-block")),Y.f&&Object(r.createElement)(H.a,{className:"wc-block-mini-cart__footer-checkout",href:Y.f},Object(n.__)("Go to checkout","woo-gutenberg-products-block"))),Object(r.createElement)(K.a,null,Object(r.createElement)(G,null)))},J=c(349);Object(i.registerBlockType)(J,{icon:{src:Object(r.createElement)(a.a,{icon:q.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(R.a,null,Object(r.createElement)(Q,null)))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var W=c(542),X=e=>{let{className:t}=e;return Y.j?Object(r.createElement)("div",{className:P()(t,"wc-block-mini-cart__shopping-button")},Object(r.createElement)("a",{href:Y.j},Object(n.__)("Start shopping","woo-gutenberg-products-block"))):null},Z=c(350);Object(i.registerBlockType)(Z,{icon:{src:Object(r.createElement)(a.a,{icon:W.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(R.a,null,Object(r.createElement)(X,null)))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});const ee={apiVersion:2,title:Object(n.__)("Mini Cart Contents","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(a.a,{icon:o.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a mini cart widget.","woo-gutenberg-products-block"),supports:{align:!1,html:!1,multiple:!1,reusable:!1,inserter:!1,color:{link:!0},lock:!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 c=Object(s.useBlockProps)({style:{minHeight:"100vh"}}),n=[["woocommerce/filled-mini-cart-contents-block",{},[]],["woocommerce/empty-mini-cart-contents-block",{},[]]],{currentView:o,component:a}=Object(p.a)(t,g);return Object(d.a)({clientId:t,registeredBlocks:_,defaultTemplate:n}),Object(r.createElement)("div",c,Object(r.createElement)(m.a,{currentView:o},Object(r.createElement)(s.BlockControls,null,a),Object(r.createElement)(s.InnerBlocks,{allowedBlocks:_,template:n,templateLock:!1})),Object(r.createElement)(b,{style:c.style}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))};Object(i.registerBlockType)("woocommerce/mini-cart-contents",ee)},5:function(e,t){e.exports=window.wp.blockEditor},510:function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(0),n=c(1),o=c(7),a=c(3),i=c(13),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:"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"})),l=c(119),u=c(5);function m(e,t){return t.find(t=>t.view===e)}const p=(e,t)=>{const c=t[0],[i,p]=Object(r.useState)(c),{selectBlock:d}=Object(o.useDispatch)("core/block-editor"),{getBlock:b,getSelectedBlockClientId:_,getBlockParentsByBlockName:g}=Object(o.select)(u.store),f=_();Object(r.useEffect)(()=>{const e=b(f);if(!e)return;if(i.view===e.name)return;const c=t.map(e=>{let{view:t}=e;return t});if(c.includes(e.name)){const c=m(e.name,t);if(c)return p(c)}const r=g(f,c);if(1!==r.length)return;const n=b(r[0]);if(i.view===n.name)return;const o=m(n.name,t);o&&p(o)},[g,f,b,i.view,t]);const y=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)(l.a,{icon:s,style:{marginRight:"8px"}}),controls:t.map(t=>({...t,title:Object(r.createElement)("span",null,t.label),isActive:t.view===i.view,onClick:()=>{var c;p(t),d((null===(c=b(e).innerBlocks.find(e=>e.name===t.view))||void 0===c?void 0:c.clientId)||e)}}))}));return{currentView:i.view,component:y}}},52:function(e,t){e.exports=window.wp.deprecated},54:function(e,t){e.exports=window.wp.keycodes},59:function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(136),i=c(4),s=c.n(i),l=c(96);c(163),t.a=e=>{let{className:t,showSpinner:c=!1,children:r,variant:i="contained",...u}=e;const m=s()("wc-block-components-button",t,i,{"wc-block-components-button--loading":c});return Object(o.createElement)(a.a,n()({className:m},u),c&&Object(o.createElement)(l.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},r))}},60:function(e,t){e.exports=window.wp.autop},7:function(e,t){e.exports=window.wp.data},70:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(46),n=c(0),o=c(41);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)}}),[])}}},73:function(e,t){e.exports=window.wp.dom},79:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(7),n=c(9);const o=()=>{const{customerData:e,isInitialized:t}=Object(r.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:c,setBillingAddress:o}=Object(r.useDispatch)(n.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:o,setShippingAddress:c}}},8:function(e,t){e.exports=window.lodash},80:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(38),a=c(4),i=c.n(a),s=c(26);c(162);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)(
|
16 |
/* translators: %1$s min price, %2$s max price */
|
10 |
/* translators: %s refers to the item name in the cart. */
|
11 |
Object(a.__)("%s has been removed from your cart.","woo-gutenberg-products-block"),re))},disabled:W},Object(a.__)("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:se,format:be,price:ue.getAmount()}),G>1&&Object(r.createElement)(C,{currency:ce,saleAmount:B(ie,ce),format:ge}))))});const D=[...Array(3)].map((_x,e)=>Object(r.createElement)(M,{lineItem:{},key:e})),L=e=>{const t={};return e.forEach(e=>{let{key:c}=e;t[c]=Object(r.createRef)()}),t};t.a=e=>{let{lineItems:t=[],isLoading:c=!1,className:n}=e;const i=Object(r.useRef)(null),s=Object(r.useRef)(L(t));Object(r.useEffect)(()=>{s.current=L(t)},[t]);const l=e=>()=>{null!=s&&s.current&&e&&s.current[e].current instanceof HTMLElement?s.current[e].current.focus():i.current instanceof HTMLElement&&i.current.focus()},u=c?D:t.map((e,c)=>{const n=t.length>c+1?t[c+1].key:null;return Object(r.createElement)(M,{key:e.key,lineItem:e,onRemove:l(n),ref:s.current[e.key],tabIndex:-1})});return Object(r.createElement)("table",{className:o()("wc-block-cart-items",n),ref:i,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(a.__)("Product","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-product"},Object(r.createElement)("span",null,Object(a.__)("Details","woo-gutenberg-products-block"))),Object(r.createElement)("th",{className:"wc-block-cart-items__header-total"},Object(r.createElement)("span",null,Object(a.__)("Total","woo-gutenberg-products-block"))))),Object(r.createElement)("tbody",null,u))}},245:function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(15),i=c(2);c(201),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:i.PLACEHOLDER_IMG_SRC,alt:""};return Object(o.createElement)("img",n()({className:"wc-block-components-product-image"},r,{alt:r.alt}))}},246:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(81);t.a=()=>Object(r.createElement)(o.a,{className:"wc-block-components-product-backorder-badge"},Object(n.__)("Available on backorder","woo-gutenberg-products-block"))},247:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(81);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)(
|
12 |
/* translators: %d stock amount (number of items in stock for product) */
|
13 |
+
Object(n.__)("%d left in stock","woo-gutenberg-products-block"),t)):null}},248:function(e,t,c){"use strict";var r=c(0),n=c(8),o=c(15);c(204);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},i=c(121),s=c(22),l=e=>{let{className:t,shortDescription:c="",fullDescription:n=""}=e;const o=c||n;return o?Object(r.createElement)(i.a,{className:t,source:o,maxLength:15,countType:s.o.wordCountType||"words"}):null};c(203),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}})}))}},25:function(e,t){e.exports=window.wp.isShallowEqual},26:function(e,t){e.exports=window.wc.priceFormat},266:function(e,t,c){"use strict";c.d(t,"c",(function(){return a})),c.d(t,"b",(function(){return i})),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 i=new r(e,{bubbles:c,cancelable:n,detail:a});o.dispatchEvent(i)};let o;const a=()=>{o&&clearTimeout(o),o=setTimeout(()=>{n("wc_fragment_refresh",{bubbles:!0,cancelable:!0})},50)},i=e=>{let{preserveCartData:t=!1}=e;n("wc-blocks_added_to_cart",{bubbles:!0,cancelable:!0,detail:{preserveCartData:t}})},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)}},267:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(95),n=(c(16),c(2));const o=e=>{const t=Object.keys(n.defaultAddressFields),c=Object(r.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}},268:function(e,t,c){"use strict";c.d(t,"a",(function(){return n}));var r=c(98);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))}}},278:function(e,t,c){"use strict";var r=c(0),n=c(13);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},282:function(e,t){},3:function(e,t){e.exports=window.wp.components},33:function(e,t,c){"use strict";c.d(t,"a",(function(){return r})),c.d(t,"b",(function(){return n}));const r=e=>!(e=>null===e)(e)&&e instanceof Object&&e.constructor===Object;function n(e,t){return r(e)&&t in e}},332:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(10);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]},333:function(e,t,c){"use strict";c.d(t,"a",(function(){return i}));var r=c(0),n=c(7),o=c(10),a=c(8);const i=e=>{let{clientId:t,registeredBlocks:c,defaultTemplate:i=[]}=e;const s=Object(r.useRef)(c),l=Object(r.useRef)(i),{insertBlock:u,replaceInnerBlocks:m}=Object(n.useDispatch)("core/block-editor"),{innerBlocks:p,registeredBlockTypes:d}=Object(n.useSelect)(e=>({innerBlocks:e("core/block-editor").getBlocks(t),registeredBlockTypes:s.current.map(e=>Object(o.getBlockType)(e))}),[t,s.current]),b=Object(r.useCallback)((e,c)=>{const r=Object(o.createBlock)(e.name);u(r,c,t,!1)},[t]),_=Object(r.useMemo)(()=>d.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)),[d]);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 m(t,e)}_.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:b(e,p.length);break;case 0:b(e,0);break;default:const c=l.current[t-1],r=p.findIndex(e=>{let{name:t}=e;return t===c[0]});b(e,-1===r?t:r+1)}})}},[t,p,_,b])}},334:function(e,t,c){"use strict";c.d(t,"a",(function(){return s}));var r=c(1),n=c(22),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}]}],i=Object(o.getSetting)("displayCartPricesIncludingTax",!1),s={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:i?"12000":"10000",regular_price:i?"12000":"10000",sale_price:i?"12000":"10000",raw_prices:{precision:6,price:i?"12000000":"10000000",regular_price:i?"12000000":"10000000",sale_price:i?"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:i?"2400":"2000",regular_price:i?"2400":"2000",sale_price:i?"2400":"2000",raw_prices:{precision:6,price:i?"24000000":"20000000",regular_price:i?"24000000":"20000000",sale_price:i?"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:{}}],cross_sells:[{id:1,name:Object(r.__)("Polo","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"24000":"20000",regular_price:i?"24000":"20000",sale_price:i?"12000":"10000",raw_prices:{precision:6,price:i?"24000000":"20000000",regular_price:i?"24000000":"20000000",sale_price:i?"12000000":"10000000"}},images:[{id:17,src:n.m+"previews/polo.jpg",thumbnail:n.m+"previews/polo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4.5},{id:2,name:Object(r.__)("Long Sleeve Tee","woo-gutenberg-products-block"),permalink:"https://example.org",prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"30000":"25000",regular_price:i?"30000":"25000",sale_price:i?"30000":"25000",raw_prices:{precision:6,price:i?"30000000":"25000000",regular_price:i?"30000000":"25000000",sale_price:i?"30000000":"25000000"}},images:[{id:17,src:n.m+"previews/long-sleeve-tee.jpg",thumbnail:n.m+"previews/long-sleeve-tee.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:4},{id:3,name:Object(r.__)("Hoodie with Zipper","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"15000":"12500",regular_price:i?"30000":"25000",sale_price:i?"15000":"12500",raw_prices:{precision:6,price:i?"15000000":"12500000",regular_price:i?"30000000":"25000000",sale_price:i?"15000000":"12500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-zipper.jpg",thumbnail:n.m+"previews/hoodie-with-zipper.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:1},{id:4,name:Object(r.__)("Hoodie with Logo","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"4500":"4250",regular_price:i?"4500":"4250",sale_price:i?"4500":"4250",raw_prices:{precision:6,price:i?"45000000":"42500000",regular_price:i?"45000000":"42500000",sale_price:i?"45000000":"42500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-logo.jpg",thumbnail:n.m+"previews/hoodie-with-logo.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:5},{id:5,name:Object(r.__)("Hoodie with Pocket","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!0,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"3500":"3250",regular_price:i?"4500":"4250",sale_price:i?"3500":"3250",raw_prices:{precision:6,price:i?"35000000":"32500000",regular_price:i?"45000000":"42500000",sale_price:i?"35000000":"32500000"}},images:[{id:17,src:n.m+"previews/hoodie-with-pocket.jpg",thumbnail:n.m+"previews/hoodie-with-pocket.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3.75},{id:6,name:Object(r.__)("T-Shirt","woo-gutenberg-products-block"),permalink:"https://example.org",on_sale:!1,prices:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",price:i?"1800":"1500",regular_price:i?"1800":"1500",sale_price:i?"1800":"1500",raw_prices:{precision:6,price:i?"1800000":"1500000",regular_price:i?"1800000":"1500000",sale_price:i?"1800000":"1500000"}},images:[{id:17,src:n.m+"previews/tshirt.jpg",thumbnail:n.m+"previews/tshirt.jpg",srcset:"",sizes:"",name:"",alt:""}],average_rating:3}],fees:[{id:"fee",name:Object(r.__)("Fee","woo-gutenberg-products-block"),totals:{currency_code:"USD",currency_symbol:"$",currency_minor_unit:2,currency_decimal_separator:".",currency_thousand_separator:",",currency_prefix:"$",currency_suffix:"",total:"100",total_tax:"20",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"20"}]}}],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:"100",total_fees_tax:"20",total_discount:"0",total_discount_tax:"0",total_shipping:"0",total_shipping_tax:"0",total_tax:"820",total_price:"4920",tax_lines:[{name:Object(r.__)("Sales tax","woo-gutenberg-products-block"),rate:"20%",price:"820"}]},errors:[],payment_requirements:["products"],extensions:{}}},344:function(e){e.exports=JSON.parse('{"name":"woocommerce/empty-mini-cart-contents-block","version":"1.0.0","title":"Empty Mini Cart view.","description":"Blocks that are displayed when the Mini Cart is empty.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/mini-cart-contents"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},345:function(e){e.exports=JSON.parse('{"name":"woocommerce/filled-mini-cart-contents-block","version":"1.0.0","title":"Filled Mini Cart view","description":"Contains blocks that display the content of the Mini Cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/mini-cart-contents"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},346:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-title-block","version":"1.0.0","title":"Mini Cart Title","description":"Block that displays the title of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},347:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-items-block","version":"1.0.0","title":"Mini Cart Items","description":"Contains the products table and other custom blocks of filled mini cart.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},348:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-products-table-block","version":"1.0.0","title":"Mini Cart Products Table","description":"Block that displays the products table of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":false}}},"parent":["woocommerce/mini-cart-items-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},349:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-footer-block","version":"1.0.0","title":"Mini Cart Footer","description":"Block that displays the footer of the Mini Cart block.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"parent":["woocommerce/filled-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},350:function(e){e.exports=JSON.parse('{"name":"woocommerce/mini-cart-shopping-button-block","version":"1.0.0","title":"Mini Cart Shopping Button","description":"Block that displays the shopping button when the Mini Cart is empty.","category":"woocommerce","supports":{"align":false,"html":false,"multiple":false,"reusable":false,"inserter":true},"attributes":{"lock":{"type":"object","default":{"remove":false,"move":false}}},"parent":["woocommerce/empty-mini-cart-contents-block"],"textdomain":"woo-gutenberg-products-block","apiVersion":2}')},36:function(e,t){e.exports=window.wc.wcBlocksRegistry},38:function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(131),i=c(4),s=c.n(i);c(137);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:i,displayType:u="text",...m}=e;const p="string"==typeof c?parseInt(c,10):c;if(!Number.isFinite(p))return null;const d=p/10**r.minorUnit;if(!Number.isFinite(d))return null;const b=s()("wc-block-formatted-money-amount","wc-block-components-formatted-money-amount",t),_={...m,...l(r),value:void 0,currency:void 0,onValueChange:void 0},g=i?e=>{const t=+e.value*10**r.minorUnit;i(t)}:()=>{};return Object(o.createElement)(a.a,n()({className:b,displayType:u},_,{value:d,onValueChange:g}))}},40:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(0),n=c(25),o=c.n(n);function a(e){const t=Object(r.useRef)(e);return o()(e,t.current)||(t.current=e),t.current}},41:function(e,t,c){"use strict";c.d(t,"a",(function(){return O}));var r=c(8),n=c(0),o=c(9),a=c(7),i=c(15),s=c(267),l=c(85),u=c(266);const m=e=>{const t=e.detail;t&&t.preserveCartData||Object(a.dispatch)(o.CART_STORE_KEY).invalidateResolutionForStore()},p=()=>{1===window.wcBlocksStoreCartListeners.count&&window.wcBlocksStoreCartListeners.remove(),window.wcBlocksStoreCartListeners.count--},d=()=>{Object(n.useEffect)(()=>((()=>{if(window.wcBlocksStoreCartListeners||(window.wcBlocksStoreCartListeners={count:0,remove:()=>{}}),0===window.wcBlocksStoreCartListeners.count){const e=Object(u.a)("added_to_cart","wc-blocks_added_to_cart"),t=Object(u.a)("removed_from_cart","wc-blocks_removed_from_cart");document.body.addEventListener("wc-blocks_added_to_cart",m),document.body.addEventListener("wc-blocks_removed_from_cart",m),window.wcBlocksStoreCartListeners.count=0,window.wcBlocksStoreCartListeners.remove=()=>{e(),t(),document.body.removeEventListener("wc-blocks_added_to_cart",m),document.body.removeEventListener("wc-blocks_removed_from_cart",m)}}window.wcBlocksStoreCartListeners.count++})(),p),[])},b={first_name:"",last_name:"",company:"",address_1:"",address_2:"",city:"",state:"",postcode:"",country:"",phone:""},_={...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:o.EMPTY_TAX_LINES,currency_code:"",currency_symbol:"",currency_minor_unit:2,currency_decimal_separator:"",currency_thousand_separator:"",currency_prefix:"",currency_suffix:""},f=e=>Object.fromEntries(Object.entries(e).map(e=>{let[t,c]=e;return[t,Object(i.decodeEntities)(c)]})),y={cartCoupons:o.EMPTY_CART_COUPONS,cartItems:o.EMPTY_CART_ITEMS,cartFees:o.EMPTY_CART_FEES,cartItemsCount:0,cartItemsWeight:0,crossSellsProducts:o.EMPTY_CART_CROSS_SELLS,cartNeedsPayment:!0,cartNeedsShipping:!0,cartItemErrors:o.EMPTY_CART_ITEM_ERRORS,cartTotals:g,cartIsLoading:!0,cartErrors:o.EMPTY_CART_ERRORS,billingAddress:_,shippingAddress:b,shippingRates:o.EMPTY_SHIPPING_RATES,isLoadingRates:!1,cartHasCalculatedShipping:!1,paymentRequirements:o.EMPTY_PAYMENT_REQUIREMENTS,receiveCart:()=>{},extensions:o.EMPTY_EXTENSIONS},O=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shouldSelect:!0};const{isEditor:t,previewData:c}=Object(l.b)(),i=null==c?void 0:c.previewCart,{shouldSelect:u}=e,m=Object(n.useRef)();d();const p=Object(a.useSelect)((e,c)=>{let{dispatch:r}=c;if(!u)return y;if(t)return{cartCoupons:i.coupons,cartItems:i.items,crossSellsProducts:i.cross_sells,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,billingData:_,billingAddress:_,shippingAddress:b,extensions:o.EMPTY_EXTENSIONS,shippingRates:i.shipping_rates,isLoadingRates:!1,cartHasCalculatedShipping:i.has_calculated_shipping,paymentRequirements:i.paymentRequirements,receiveCart:"function"==typeof(null==i?void 0:i.receiveCart)?i.receiveCart:()=>{}};const n=e(o.CART_STORE_KEY),a=n.getCartData(),l=n.getCartErrors(),m=n.getCartTotals(),p=!n.hasFinishedResolution("getCartData"),d=n.isCustomerDataUpdating(),{receiveCart:g}=r(o.CART_STORE_KEY),O=f(a.billingAddress),w=a.needsShipping?f(a.shippingAddress):O,j=a.fees.length>0?a.fees.map(e=>f(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,crossSellsProducts:a.crossSells,cartFees:j,cartItemsCount:a.itemsCount,cartItemsWeight:a.itemsWeight,cartNeedsPayment:a.needsPayment,cartNeedsShipping:a.needsShipping,cartItemErrors:a.errors,cartTotals:m,cartIsLoading:p,cartErrors:l,billingData:Object(s.a)(O),billingAddress:Object(s.a)(O),shippingAddress:Object(s.a)(w),extensions:a.extensions,shippingRates:a.shippingRates,isLoadingRates:d,cartHasCalculatedShipping:a.hasCalculatedShipping,paymentRequirements:a.paymentRequirements,receiveCart:g}},[u]);return m.current&&Object(r.isEqual)(m.current,p)||(m.current=p),m.current}},426:function(e,t,c){"use strict";var r=c(0),n=c(13);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},43:function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(73),i=c(118);const s=["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=>{s.includes(e.nodeName)&&e.setAttribute("tabindex","-1"),e.hasAttribute("contenteditable")&&e.setAttribute("contenteditable","false")})},m=Object(i.a)(u,0,{leading:!0});return Object(o.useLayoutEffect)(()=>{let e;return u(),l.current&&(e=new window.MutationObserver(m),e.observe(l.current,{childList:!0,attributes:!0,subtree:!0})),()=>{e&&e.disconnect(),m.cancel()}},[m]),Object(o.createElement)("div",n()({ref:l,"aria-disabled":"true",style:{userSelect:"none",pointerEvents:"none",cursor:"normal",...c}},r),t)}},436:function(e,t,c){"use strict";var r=c(0),n=c(13);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},438:function(e,t,c){"use strict";c.d(t,"a",(function(){return r}));const r=e=>Object.values(e).reduce((e,t)=>(null!==t.icons&&(e=e.concat(t.icons)),e),[])},46:function(e,t){e.exports=window.wp.hooks},468:function(e,t,c){e.exports=c(481)},469:function(e,t){},48:function(e,t){e.exports=window.wp.a11y},481:function(e,t,c){"use strict";c.r(t);var r=c(0),n=c(1),o=c(278),a=c(119),i=c(10),s=c(5),l=c(426),u=c(436),m=c(85),p=c(510),d=c(333);const b=e=>{let{style:t}=e;const c=[{selector:".wc-block-mini-cart__footer .wc-block-mini-cart__footer-actions .wc-block-mini-cart__footer-checkout",properties:[{property:"color",value:t.backgroundColor},{property:"background-color",value:t.color},{property:"border-color",value:t.color}]}].map(e=>{let{selector:t,properties:c}=e;const r=c.filter(e=>{let{value:t}=e;return t}).map(e=>{let{property:t,value:c}=e;return`${t}: ${c};`}).join("");return r?`${t} { ${r} }`:""}).join("").trim();return c?Object(r.createElement)("style",null,c," "):Object(r.createElement)(r.Fragment,null)};c(469);const _=["woocommerce/filled-mini-cart-contents-block","woocommerce/empty-mini-cart-contents-block"],g=[{view:"woocommerce/filled-mini-cart-contents-block",label:Object(n.__)("Filled Mini Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(a.a,{icon:l.a})},{view:"woocommerce/empty-mini-cart-contents-block",label:Object(n.__)("Empty Mini Cart","woo-gutenberg-products-block"),icon:Object(r.createElement)(a.a,{icon:u.a})}];var f=c(6),y=c.n(f);const O=["woocommerce/mini-cart","woocommerce/checkout","woocommerce/cart","woocommerce/single-product","woocommerce/cart-totals-block","woocommerce/checkout-fields-block","core/post-template","core/comment-template","core/query-pagination","core/comments-query-loop","core/post-comments-form","core/post-comments-link","core/post-comments-count","core/comments-pagination","core/post-navigation-link","core/button"],w=()=>Object(i.getBlockTypes)().filter(e=>!(O.includes(e.name)||e.parent&&e.parent.filter(e=>O.includes(e)).length>0)).map(e=>{let{name:t}=e;return t});var j=c(344);Object(i.registerBlockType)(j,{icon:{src:Object(r.createElement)(a.a,{icon:u.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)(),{currentView:t}=Object(m.b)();return Object(r.createElement)("div",y()({},e,{hidden:"woocommerce/empty-mini-cart-contents-block"!==t}),Object(r.createElement)(s.InnerBlocks,{allowedBlocks:w(),renderAppender:s.InnerBlocks.ButtonBlockAppender}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var k=c(18),v=c(334),h=c(332),E=c(345);Object(i.registerBlockType)(E,{icon:{src:Object(r.createElement)(a.a,{icon:l.a,className:"wc-block-editor-components-block-icon"})},edit:e=>{let{clientId:t}=e;const c=Object(s.useBlockProps)(),n=Object(h.a)(k.innerBlockAreas.FILLED_MINI_CART),{currentView:o}=Object(m.b)(),a=[["woocommerce/mini-cart-title-block",{}],["woocommerce/mini-cart-items-block",{}],["woocommerce/mini-cart-footer-block",{}]].filter(Boolean);return Object(d.a)({clientId:t,registeredBlocks:n,defaultTemplate:a}),Object(r.createElement)("div",y()({},c,{hidden:"woocommerce/filled-mini-cart-contents-block"!==o}),Object(r.createElement)(m.a,{currentView:o,previewData:{previewCart:v.a}},Object(r.createElement)(s.InnerBlocks,{template:a,allowedBlocks:n,templateLock:"insert"})))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var x=c(539),S=c(41),C=c(4),P=c.n(C),N=e=>{let{className:t}=e;const{cartItemsCount:c,cartIsLoading:o}=Object(S.a)();return Object(r.createElement)("h2",{className:P()(t,"wc-block-mini-cart__title")},o?Object(n.__)("Your cart","woo-gutenberg-products-block"):Object(n.sprintf)(
|
14 |
/* translators: %d is the count of items in the cart. */
|
15 |
Object(n._n)("Your cart (%d item)","Your cart (%d items)",c,"woo-gutenberg-products-block"),c))},T=c(346);Object(i.registerBlockType)(T,{icon:{src:Object(r.createElement)(a.a,{icon:x.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(N,null))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var I=c(538),A=c(347);Object(i.registerBlockType)(A,{icon:{src:Object(r.createElement)(a.a,{icon:I.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)({className:"wc-block-mini-cart__items"}),t=[["woocommerce/mini-cart-products-table-block",{}]].filter(Boolean);return Object(r.createElement)("div",e,Object(r.createElement)(s.InnerBlocks,{template:t,renderAppender:s.InnerBlocks.ButtonBlockAppender,templateLock:!1,allowedBlocks:w()}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))});var B=c(560),R=c(43),M=c(228),D=e=>{let{className:t}=e;const{cartItems:c,cartIsLoading:n}=Object(S.a)();return Object(r.createElement)("div",{className:P()(t,"wc-block-mini-cart__products-table")},Object(r.createElement)(M.a,{lineItems:c,isLoading:n,className:"wc-block-mini-cart-items"}))},L=c(348);Object(i.registerBlockType)(L,{icon:Object(r.createElement)(a.a,{icon:B.a,className:"wc-block-editor-components-block-icon"}),edit:()=>{const e=Object(s.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(R.a,null,Object(r.createElement)(D,null)))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var q=c(553),V=c(26),F=c(182),$=c(159),z=c(438),U=c(2),Y=c(22),H=c(59),K=c(133);const G=()=>{const{paymentMethods:e}=Object(F.b)();return Object(r.createElement)($.a,{icons:Object(z.a)(e)})};var Q=e=>{let{className:t}=e;const{cartTotals:c}=Object(S.a)(),o=Object(U.getSetting)("displayCartPricesIncludingTax",!1)?parseInt(c.total_items,10)+parseInt(c.total_items_tax,10):parseInt(c.total_items,10);return Object(r.createElement)("div",{className:P()(t,"wc-block-mini-cart__footer")},Object(r.createElement)(k.TotalsItem,{className:"wc-block-mini-cart__footer-subtotal",currency:Object(V.getCurrencyFromPriceResponse)(c),label:Object(n.__)("Subtotal","woo-gutenberg-products-block"),value:o,description:Object(n.__)("Shipping, taxes, and discounts calculated at checkout.","woo-gutenberg-products-block")}),Object(r.createElement)("div",{className:"wc-block-mini-cart__footer-actions"},Y.d&&Object(r.createElement)(H.a,{className:"wc-block-mini-cart__footer-cart",href:Y.d,variant:"outlined"},Object(n.__)("View my cart","woo-gutenberg-products-block")),Y.f&&Object(r.createElement)(H.a,{className:"wc-block-mini-cart__footer-checkout",href:Y.f},Object(n.__)("Go to checkout","woo-gutenberg-products-block"))),Object(r.createElement)(K.a,null,Object(r.createElement)(G,null)))},J=c(349);Object(i.registerBlockType)(J,{icon:{src:Object(r.createElement)(a.a,{icon:q.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(R.a,null,Object(r.createElement)(Q,null)))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});var W=c(542),X=e=>{let{className:t}=e;return Y.j?Object(r.createElement)("div",{className:P()(t,"wc-block-mini-cart__shopping-button")},Object(r.createElement)("a",{href:Y.j},Object(n.__)("Start shopping","woo-gutenberg-products-block"))):null},Z=c(350);Object(i.registerBlockType)(Z,{icon:{src:Object(r.createElement)(a.a,{icon:W.a,className:"wc-block-editor-components-block-icon"})},edit:()=>{const e=Object(s.useBlockProps)();return Object(r.createElement)("div",e,Object(r.createElement)(R.a,null,Object(r.createElement)(X,null)))},save:()=>Object(r.createElement)("div",s.useBlockProps.save())});const ee={apiVersion:2,title:Object(n.__)("Mini Cart Contents","woo-gutenberg-products-block"),icon:{src:Object(r.createElement)(a.a,{icon:o.a,className:"wc-block-editor-components-block-icon"})},category:"woocommerce",keywords:[Object(n.__)("WooCommerce","woo-gutenberg-products-block")],description:Object(n.__)("Display a mini cart widget.","woo-gutenberg-products-block"),supports:{align:!1,html:!1,multiple:!1,reusable:!1,inserter:!1,color:{link:!0},lock:!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 c=Object(s.useBlockProps)({style:{minHeight:"100vh"}}),n=[["woocommerce/filled-mini-cart-contents-block",{},[]],["woocommerce/empty-mini-cart-contents-block",{},[]]],{currentView:o,component:a}=Object(p.a)(t,g);return Object(d.a)({clientId:t,registeredBlocks:_,defaultTemplate:n}),Object(r.createElement)("div",c,Object(r.createElement)(m.a,{currentView:o},Object(r.createElement)(s.BlockControls,null,a),Object(r.createElement)(s.InnerBlocks,{allowedBlocks:_,template:n,templateLock:!1})),Object(r.createElement)(b,{style:c.style}))},save:()=>Object(r.createElement)("div",s.useBlockProps.save(),Object(r.createElement)(s.InnerBlocks.Content,null))};Object(i.registerBlockType)("woocommerce/mini-cart-contents",ee)},5:function(e,t){e.exports=window.wp.blockEditor},510:function(e,t,c){"use strict";c.d(t,"a",(function(){return p}));var r=c(0),n=c(1),o=c(7),a=c(3),i=c(13),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:"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"})),l=c(119),u=c(5);function m(e,t){return t.find(t=>t.view===e)}const p=(e,t)=>{const c=t[0],[i,p]=Object(r.useState)(c),{selectBlock:d}=Object(o.useDispatch)("core/block-editor"),{getBlock:b,getSelectedBlockClientId:_,getBlockParentsByBlockName:g}=Object(o.select)(u.store),f=_();Object(r.useEffect)(()=>{const e=b(f);if(!e)return;if(i.view===e.name)return;const c=t.map(e=>{let{view:t}=e;return t});if(c.includes(e.name)){const c=m(e.name,t);if(c)return p(c)}const r=g(f,c);if(1!==r.length)return;const n=b(r[0]);if(i.view===n.name)return;const o=m(n.name,t);o&&p(o)},[g,f,b,i.view,t]);const y=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)(l.a,{icon:s,style:{marginRight:"8px"}}),controls:t.map(t=>({...t,title:Object(r.createElement)("span",null,t.label),isActive:t.view===i.view,onClick:()=>{var c;p(t),d((null===(c=b(e).innerBlocks.find(e=>e.name===t.view))||void 0===c?void 0:c.clientId)||e)}}))}));return{currentView:i.view,component:y}}},52:function(e,t){e.exports=window.wp.deprecated},54:function(e,t){e.exports=window.wp.keycodes},59:function(e,t,c){"use strict";var r=c(6),n=c.n(r),o=c(0),a=c(136),i=c(4),s=c.n(i),l=c(96);c(163),t.a=e=>{let{className:t,showSpinner:c=!1,children:r,variant:i="contained",...u}=e;const m=s()("wc-block-components-button",t,i,{"wc-block-components-button--loading":c});return Object(o.createElement)(a.a,n()({className:m},u),c&&Object(o.createElement)(l.a,null),Object(o.createElement)("span",{className:"wc-block-components-button__text"},r))}},60:function(e,t){e.exports=window.wp.autop},7:function(e,t){e.exports=window.wp.data},70:function(e,t,c){"use strict";c.d(t,"a",(function(){return a}));var r=c(46),n=c(0),o=c(41);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)}}),[])}}},73:function(e,t){e.exports=window.wp.dom},79:function(e,t,c){"use strict";c.d(t,"a",(function(){return o}));var r=c(7),n=c(9);const o=()=>{const{customerData:e,isInitialized:t}=Object(r.useSelect)(e=>{const t=e(n.CART_STORE_KEY);return{customerData:t.getCustomerData(),isInitialized:t.hasFinishedResolution("getCartData")}}),{setShippingAddress:c,setBillingAddress:o}=Object(r.useDispatch)(n.CART_STORE_KEY);return{isInitialized:t,billingAddress:e.billingAddress,shippingAddress:e.shippingAddress,setBillingAddress:o,setShippingAddress:c}}},8:function(e,t){e.exports=window.lodash},80:function(e,t,c){"use strict";var r=c(0),n=c(1),o=c(38),a=c(4),i=c.n(a),s=c(26);c(162);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)(
|
16 |
/* translators: %1$s min price, %2$s max price */
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
|
|
4 |
Requires at least: 6.0
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 7.0
|
7 |
-
Stable tag: 8.7.
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -80,10 +80,15 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
|
|
80 |
|
81 |
== Changelog ==
|
82 |
|
|
|
|
|
|
|
|
|
|
|
83 |
= 8.7.3 - 2022-10-20 =
|
84 |
|
85 |
#### Bug fixes
|
86 |
-
- Fixed an issue where the argument passed to `canMakePayment` contained the incorrect keys. Also fixed the current user's customer data appearing in the editor when editing the Checkout block.
|
87 |
|
88 |
= 8.7.2 - 2022-10-13 =
|
89 |
|
4 |
Requires at least: 6.0
|
5 |
Tested up to: 6.0
|
6 |
Requires PHP: 7.0
|
7 |
+
Stable tag: 8.7.4
|
8 |
License: GPLv3
|
9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
80 |
|
81 |
== Changelog ==
|
82 |
|
83 |
+
= 8.7.4 - 2022-10-21 =
|
84 |
+
|
85 |
+
#### Bug fixes
|
86 |
+
- Compatibility fix for Cart and Checkout inner blocks for WordPress 6.1. ([7447](https://github.com/woocommerce/woocommerce-blocks/pull/7447))
|
87 |
+
|
88 |
= 8.7.3 - 2022-10-20 =
|
89 |
|
90 |
#### Bug fixes
|
91 |
+
- Fixed an issue where the argument passed to `canMakePayment` contained the incorrect keys. Also fixed the current user's customer data appearing in the editor when editing the Checkout block. ([7434](https://github.com/woocommerce/woocommerce-blocks/pull/7434))
|
92 |
|
93 |
= 8.7.2 - 2022-10-13 =
|
94 |
|
src/Package.php
CHANGED
@@ -109,7 +109,7 @@ class Package {
|
|
109 |
NewPackage::class,
|
110 |
function ( $container ) {
|
111 |
// leave for automated version bumping.
|
112 |
-
$version = '8.7.
|
113 |
return new NewPackage(
|
114 |
$version,
|
115 |
dirname( __DIR__ ),
|
109 |
NewPackage::class,
|
110 |
function ( $container ) {
|
111 |
// leave for automated version bumping.
|
112 |
+
$version = '8.7.4';
|
113 |
return new NewPackage(
|
114 |
$version,
|
115 |
dirname( __DIR__ ),
|
vendor/autoload.php
CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
-
return
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInit20f52a55f54c8468194e2401811120a2::getLoader();
|
vendor/autoload_packages.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,18 +22,18 @@ class ComposerAutoloaderInit3c718b3534de82b4437cbb3b157da522
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
-
$includeFiles = \Composer\Autoload\
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
-
|
37 |
}
|
38 |
|
39 |
return $loader;
|
@@ -45,7 +45,7 @@ class ComposerAutoloaderInit3c718b3534de82b4437cbb3b157da522
|
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
-
function
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit20f52a55f54c8468194e2401811120a2
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit20f52a55f54c8468194e2401811120a2', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit20f52a55f54c8468194e2401811120a2', 'loadClassLoader'));
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit20f52a55f54c8468194e2401811120a2::getInitializer($loader));
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
+
$includeFiles = \Composer\Autoload\ComposerStaticInit20f52a55f54c8468194e2401811120a2::$files;
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
+
composerRequire20f52a55f54c8468194e2401811120a2($fileIdentifier, $file);
|
37 |
}
|
38 |
|
39 |
return $loader;
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
+
function composerRequire20f52a55f54c8468194e2401811120a2($fileIdentifier, $file)
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'fcd5d7d87e03ff4f5b5a66c2b8968671' => __DIR__ . '/../..' . '/src/StoreApi/deprecated.php',
|
@@ -51,9 +51,9 @@ class ComposerStaticInit3c718b3534de82b4437cbb3b157da522
|
|
51 |
public static function getInitializer(ClassLoader $loader)
|
52 |
{
|
53 |
return \Closure::bind(function () use ($loader) {
|
54 |
-
$loader->prefixLengthsPsr4 =
|
55 |
-
$loader->prefixDirsPsr4 =
|
56 |
-
$loader->classMap =
|
57 |
|
58 |
}, null, ClassLoader::class);
|
59 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit20f52a55f54c8468194e2401811120a2
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'fcd5d7d87e03ff4f5b5a66c2b8968671' => __DIR__ . '/../..' . '/src/StoreApi/deprecated.php',
|
51 |
public static function getInitializer(ClassLoader $loader)
|
52 |
{
|
53 |
return \Closure::bind(function () use ($loader) {
|
54 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit20f52a55f54c8468194e2401811120a2::$prefixLengthsPsr4;
|
55 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit20f52a55f54c8468194e2401811120a2::$prefixDirsPsr4;
|
56 |
+
$loader->classMap = ComposerStaticInit20f52a55f54c8468194e2401811120a2::$classMap;
|
57 |
|
58 |
}, null, ClassLoader::class);
|
59 |
}
|
vendor/composer/installed.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
'name' => 'woocommerce/woocommerce-blocks',
|
4 |
'pretty_version' => 'dev-trunk',
|
5 |
'version' => 'dev-trunk',
|
6 |
-
'reference' => '
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
@@ -43,7 +43,7 @@
|
|
43 |
'woocommerce/woocommerce-blocks' => array(
|
44 |
'pretty_version' => 'dev-trunk',
|
45 |
'version' => 'dev-trunk',
|
46 |
-
'reference' => '
|
47 |
'type' => 'wordpress-plugin',
|
48 |
'install_path' => __DIR__ . '/../../',
|
49 |
'aliases' => array(),
|
3 |
'name' => 'woocommerce/woocommerce-blocks',
|
4 |
'pretty_version' => 'dev-trunk',
|
5 |
'version' => 'dev-trunk',
|
6 |
+
'reference' => '87bf5b885ff98df0bee89edd6b611b62632ead34',
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
43 |
'woocommerce/woocommerce-blocks' => array(
|
44 |
'pretty_version' => 'dev-trunk',
|
45 |
'version' => 'dev-trunk',
|
46 |
+
'reference' => '87bf5b885ff98df0bee89edd6b611b62632ead34',
|
47 |
'type' => 'wordpress-plugin',
|
48 |
'install_path' => __DIR__ . '/../../',
|
49 |
'aliases' => array(),
|
vendor/composer/jetpack_autoload_filemap.php
CHANGED
@@ -7,11 +7,11 @@ $baseDir = dirname($vendorDir);
|
|
7 |
|
8 |
return array(
|
9 |
'fcd5d7d87e03ff4f5b5a66c2b8968671' => array(
|
10 |
-
'version' => '8.7.
|
11 |
'path' => $baseDir . '/src/StoreApi/deprecated.php'
|
12 |
),
|
13 |
'd0f16a186498c2ba04f1d0064fecf9cf' => array(
|
14 |
-
'version' => '8.7.
|
15 |
'path' => $baseDir . '/src/StoreApi/functions.php'
|
16 |
),
|
17 |
);
|
7 |
|
8 |
return array(
|
9 |
'fcd5d7d87e03ff4f5b5a66c2b8968671' => array(
|
10 |
+
'version' => '8.7.4.0',
|
11 |
'path' => $baseDir . '/src/StoreApi/deprecated.php'
|
12 |
),
|
13 |
'd0f16a186498c2ba04f1d0064fecf9cf' => array(
|
14 |
+
'version' => '8.7.4.0',
|
15 |
'path' => $baseDir . '/src/StoreApi/functions.php'
|
16 |
),
|
17 |
);
|
vendor/composer/jetpack_autoload_psr4.php
CHANGED
@@ -11,15 +11,15 @@ return array(
|
|
11 |
'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
|
12 |
),
|
13 |
'Automattic\\WooCommerce\\StoreApi\\' => array(
|
14 |
-
'version' => '8.7.
|
15 |
'path' => array( $baseDir . '/src/StoreApi' )
|
16 |
),
|
17 |
'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
|
18 |
-
'version' => '8.7.
|
19 |
'path' => array( $baseDir . '/tests/php' )
|
20 |
),
|
21 |
'Automattic\\WooCommerce\\Blocks\\' => array(
|
22 |
-
'version' => '8.7.
|
23 |
'path' => array( $baseDir . '/src' )
|
24 |
),
|
25 |
'Automattic\\Jetpack\\Autoloader\\' => array(
|
11 |
'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
|
12 |
),
|
13 |
'Automattic\\WooCommerce\\StoreApi\\' => array(
|
14 |
+
'version' => '8.7.4.0',
|
15 |
'path' => array( $baseDir . '/src/StoreApi' )
|
16 |
),
|
17 |
'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
|
18 |
+
'version' => '8.7.4.0',
|
19 |
'path' => array( $baseDir . '/tests/php' )
|
20 |
),
|
21 |
'Automattic\\WooCommerce\\Blocks\\' => array(
|
22 |
+
'version' => '8.7.4.0',
|
23 |
'path' => array( $baseDir . '/src' )
|
24 |
),
|
25 |
'Automattic\\Jetpack\\Autoloader\\' => array(
|
vendor/jetpack-autoloader/class-autoloader-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-autoloader-locator.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-autoloader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-container.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-hook-manager.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-latest-autoloader-guard.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-manifest-reader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-path-processor.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-php-autoloader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-plugin-locator.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-plugins-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-shutdown-handler.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-version-loader.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
vendor/jetpack-autoloader/class-version-selector.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
-
namespace Automattic\Jetpack\Autoloader\
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
5 |
* @package automattic/jetpack-autoloader
|
6 |
*/
|
7 |
|
8 |
+
namespace Automattic\Jetpack\Autoloader\jp20f52a55f54c8468194e2401811120a2;
|
9 |
|
10 |
// phpcs:ignore
|
11 |
|
woocommerce-gutenberg-products-block.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce Blocks
|
4 |
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
|
5 |
* Description: WooCommerce blocks for the Gutenberg editor.
|
6 |
-
* Version: 8.7.
|
7 |
* Author: Automattic
|
8 |
* Author URI: https://woocommerce.com
|
9 |
* Text Domain: woo-gutenberg-products-block
|
3 |
* Plugin Name: WooCommerce Blocks
|
4 |
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
|
5 |
* Description: WooCommerce blocks for the Gutenberg editor.
|
6 |
+
* Version: 8.7.4
|
7 |
* Author: Automattic
|
8 |
* Author URI: https://woocommerce.com
|
9 |
* Text Domain: woo-gutenberg-products-block
|