40167-vm/wp-content/plugins/woocommerce/assets/client/blocks/order-confirmation-downloads-wrapper.js
2026-05-30 14:06:18 +00:00

1 line
3.6 KiB
JavaScript

(()=>{var e,o,t,r={2e3:(e,o,t)=>{"use strict";const r=window.wp.blocks,n=window.wp.blockEditor;var i=t(7871),s=t(3229);const a=window.wc.wcSettings;var c=t(4921),l=(t(4968),t(790));const d=JSON.parse('{"name":"woocommerce/order-confirmation-downloads-wrapper","version":"1.0.0","title":"Downloads Section","description":"Display the downloadable products section.","category":"woocommerce","keywords":["WooCommerce"],"attributes":{"heading":{"type":"string"}},"supports":{"multiple":false,"align":["wide","full"],"html":false,"spacing":{"padding":true,"margin":true,"__experimentalDefaultControls":{"margin":false,"padding":false}}},"textdomain":"woocommerce","apiVersion":3,"$schema":"https://schemas.wp.org/trunk/block.json"}'),p={heading:{type:"string",default:(0,t(7723).__)("Downloads","woocommerce")}};(0,r.registerBlockType)(d,{icon:{src:(0,l.jsx)(i.A,{icon:s.A,className:"wc-block-editor-components-block-icon"})},edit:({attributes:e,setAttributes:o})=>{const t=(0,n.useBlockProps)(),r=(0,a.getSetting)("storeHasDownloadableProducts");return(0,l.jsx)("div",{...t,className:(0,c.A)(t.className,{"store-has-downloads":r}),children:(0,l.jsx)(n.InnerBlocks,{allowedBlocks:["core/heading"],template:[["core/heading",{level:2,style:{typography:{fontSize:"24px"}},content:e.heading||"",onChangeContent:e=>o({heading:e})}],["woocommerce/order-confirmation-downloads",{lock:{remove:!0}}]]})})},save:()=>(0,l.jsx)(n.InnerBlocks.Content,{}),attributes:p})},4968:()=>{},790:e=>{"use strict";e.exports=window.ReactJSXRuntime},6087:e=>{"use strict";e.exports=window.wp.element},7723:e=>{"use strict";e.exports=window.wp.i18n},5573:e=>{"use strict";e.exports=window.wp.primitives}},n={};function i(e){var o=n[e];if(void 0!==o)return o.exports;var t=n[e]={exports:{}};return r[e](t,t.exports,i),t.exports}i.m=r,e=[],i.O=(o,t,r,n)=>{if(!t){var s=1/0;for(d=0;d<e.length;d++){for(var[t,r,n]=e[d],a=!0,c=0;c<t.length;c++)(!1&n||s>=n)&&Object.keys(i.O).every(e=>i.O[e](t[c]))?t.splice(c--,1):(a=!1,n<s&&(s=n));if(a){e.splice(d--,1);var l=r();void 0!==l&&(o=l)}}return o}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[t,r,n]},i.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return i.d(o,{a:o}),o},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var n=Object.create(null);i.r(n);var s={};o=o||[null,t({}),t([]),t(t)];for(var a=2&r&&e;"object"==typeof a&&!~o.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(o=>s[o]=()=>e[o]);return s.default=()=>e,i.d(n,s),n},i.d=(e,o)=>{for(var t in o)i.o(o,t)&&!i.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=1323,(()=>{var e={1323:0};i.O.j=o=>0===e[o];var o=(o,t)=>{var r,n,[s,a,c]=t,l=0;if(s.some(o=>0!==e[o])){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(c)var d=c(i)}for(o&&o(t);l<s.length;l++)n=s[l],i.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return i.O(d)},t=globalThis.webpackChunkwebpackWcBlocksMainJsonp=globalThis.webpackChunkwebpackWcBlocksMainJsonp||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var s=i.O(void 0,[94],()=>i(2e3));s=i.O(s),((this.wc=this.wc||{}).blocks=this.wc.blocks||{})["order-confirmation-downloads-wrapper"]=s})();