JezK
Edit File: wc-blocks.js
(()=>{var o={50364:()=>{},38878:()=>{},97575:()=>{}},e={};function r(t){var c=e[t];if(void 0!==c)return c.exports;var m=e[t]={exports:{}};return o[t](m,m.exports,r),m.exports}r.n=o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return r.d(e,{a:e}),e},r.d=(o,e)=>{for(var t in e)r.o(e,t)&&!r.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:e[t]})},r.o=(o,e)=>Object.prototype.hasOwnProperty.call(o,e),(()=>{"use strict";r(50364),r(38878);const o=window.wp.element,e=window.wp.compose,t=window.wp.blocks,c=window.wp.hooks,m=window.ReactJSXRuntime,i=(0,e.createHigherOrderComponent)(e=>{class r extends o.Component{mounted=!1;componentDidMount(){const{block:o,setAttributes:e}=this.props;o.name.startsWith("woocommerce/")&&e(this.getAttributesWithDefaults())}componentDidUpdate(){this.props.block.name.startsWith("woocommerce/")&&!this.mounted&&(this.mounted=!0)}getAttributesWithDefaults(){const o=(0,t.getBlockType)(this.props.block.name);let e=this.props.attributes;return!this.mounted&&this.props.block.name.startsWith("woocommerce/")&&void 0!==o.attributes&&void 0!==o.defaults&&(e=Object.assign({},this.props.attributes||{}),Object.keys(o.attributes).map(r=>(void 0===e[r]&&void 0!==o.defaults[r]&&(e[r]=o.defaults[r]),r))),e}render(){return(0,m.jsx)(e,{...this.props,attributes:this.getAttributesWithDefaults()})}}return r},"withDefaultAttributes");(0,c.addFilter)("editor.BlockListBlock","woocommerce-blocks/block-list-block",i),(0,c.addFilter)("blocks.getBlockAttributes","woocommerce-blocks/get-block-attributes",(o,e)=>(e.name.startsWith("woocommerce/")&&Object.keys(e.attributes).map(r=>(void 0===o[r]&&void 0!==e.defaults&&void 0!==e.defaults[r]&&(o[r]=e.defaults[r]),r)),o));const s=window.wp.domReady,a=["woocommerce/breadcrumbs","woocommerce/catalog-sorting","woocommerce/legacy-template","woocommerce/product-results-count","woocommerce/product-reviews","woocommerce/order-confirmation-status","woocommerce/order-confirmation-summary","woocommerce/order-confirmation-totals","woocommerce/order-confirmation-totals-wrapper","woocommerce/order-confirmation-downloads","woocommerce/order-confirmation-downloads-wrapper","woocommerce/order-confirmation-billing-address","woocommerce/order-confirmation-shipping-address","woocommerce/order-confirmation-billing-wrapper","woocommerce/order-confirmation-shipping-wrapper","woocommerce/order-confirmation-additional-information","woocommerce/order-confirmation-additional-fields-wrapper","woocommerce/order-confirmation-additional-fields"],d=["woocommerce/all-reviews","woocommerce/breadcrumbs","woocommerce/cart-link","woocommerce/catalog-sorting","woocommerce/classic-shortcode","woocommerce/customer-account","woocommerce/dropdown","woocommerce/featured-category","woocommerce/featured-product","woocommerce/mini-cart","woocommerce/product-categories","woocommerce/product-results-count","woocommerce/product-search","woocommerce/reviews-by-category","woocommerce/reviews-by-product","woocommerce/product-filters","woocommerce/product-filter-status","woocommerce/product-filter-price","woocommerce/product-filter-price-slider","woocommerce/product-filter-attribute","woocommerce/product-filter-rating","woocommerce/product-filter-active","woocommerce/product-filter-removable-chips","woocommerce/product-filter-clear-button","woocommerce/product-filter-checkbox-list","woocommerce/product-filter-chips","woocommerce/product-filter-taxonomy","woocommerce/active-filters","woocommerce/attribute-filter","woocommerce/filter-wrapper","woocommerce/price-filter","woocommerce/rating-filter","woocommerce/stock-filter","woocommerce/handpicked-products","woocommerce/product-best-sellers","woocommerce/product-new","woocommerce/product-on-sale","woocommerce/product-top-rated","woocommerce/products-by-attribute","woocommerce/product-category","woocommerce/product-tag"];r.n(s)()(()=>{(()=>{const o=(0,t.getBlockTypes)().map(({name:o})=>o),e=(()=>{const o=window,e=o.adminpage;return["post-php","post-new-php"].includes(e??"")?"post":["widgets-php","customize-php"].includes(e??"")||"customize"===o.pagenow?"widgets":"other"})();return"post"===e?a.filter(e=>o.includes(e)):"widgets"===e?o.filter(o=>o.startsWith("woocommerce/")&&!d.includes(o)):[]})().forEach(o=>{(0,t.unregisterBlockType)(o)})}),r(97575)})(),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["wc-blocks"]={}})();