laipower/wp-content/plugins/easy-digital-downloads/includes/blocks/build/downloads/index.js

1 line
15 KiB
JavaScript
Raw Normal View History

(()=>{"use strict";var e,a={349:(e,a,l)=>{const o=window.wp.blocks,t=window.wp.element,n=window.wp.i18n,s=window.wp.components,d=window.wp.serverSideRender;var r=l.n(d);const i=[{value:"none",label:(0,n.__)("None","easy-digital-downloads")},{value:"center",label:(0,n.__)("Center","easy-digital-downloads")},{value:"left",label:(0,n.__)("Left","easy-digital-downloads")},{value:"right",label:(0,n.__)("Right","easy-digital-downloads")}],c=[{value:"ASC",label:(0,n.__)("Ascending","easy-digital-downloads")},{value:"DESC",label:(0,n.__)("Descending","easy-digital-downloads")}],_=[{value:"thumbnail",label:(0,n.__)("Thumbnail","easy-digital-downloads")},{value:"medium",label:(0,n.__)("Medium","easy-digital-downloads")},{value:"large",label:(0,n.__)("Large","easy-digital-downloads")}],g=window.wp.blockEditor,w=[{value:"",label:(0,n.__)("Default","easy-digital-downloads")},{value:"center",label:(0,n.__)("Center","easy-digital-downloads")},{value:"left",label:(0,n.__)("Left","easy-digital-downloads")},{value:"right",label:(0,n.__)("Right","easy-digital-downloads")},{value:"wide",label:(0,n.__)("Wide","easy-digital-downloads")}],m=[{value:"date",label:(0,n.__)("Date Published","easy-digital-downloads")},{value:"price",label:(0,n.__)("Price","easy-digital-downloads")},{value:"ID",label:(0,n.__)("ID","easy-digital-downloads")},{value:"title",label:(0,n.__)("Title","easy-digital-downloads")},{value:"sales",label:(0,n.__)("Sales","easy-digital-downloads")},{value:"earnings",label:(0,n.__)("Earnings","easy-digital-downloads")},{value:"modified",label:(0,n.__)("Date Modified","easy-digital-downloads")},{value:"rand",label:(0,n.__)("Random","easy-digital-downloads")}],u=window.wp.data,h=(e,a)=>{const l=[{value:"",label:a}],o=(0,u.useSelect)((a=>a("core").getEntityRecords("taxonomy",e,{per_page:-1})));return(0,u.useSelect)((a=>a("core/data").isResolving("core","getEntityRecords",["taxonomy",e])))||o&&o.map((e=>{let{id:a,name:o}=e;l.push({value:a,label:o})})),l},v=[{value:"",label:(0,n.__)("No Content","easy-digital-downloads")},{value:"content",label:(0,n.__)("Full Content","easy-digital-downloads")},{value:"excerpt",label:(0,n.__)("Excerpt","easy-digital-downloads")}],p=[{value:"",label:(0,n.__)("No Image","easy-digital-downloads")},{value:"before_entry_title",label:(0,n.__)("Before Title","easy-digital-downloads")},{value:"after_entry_title",label:(0,n.__)("After Title","easy-digital-downloads")}],b={edd_blocks_is_block_editor:EDDBlocks.current_user};function k(){return k=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var o in l)Object.prototype.hasOwnProperty.call(l,o)&&(e[o]=l[o])}return e},k.apply(this,arguments)}const y=JSON.parse('{"u2":"edd/downloads","qv":"download"}'),E={button:(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"edd-blocks__icon"},(0,t.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5z"})),cart:(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"edd-blocks__icon"},(0,t.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z"})),products:(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"edd-blocks__icon"},(0,t.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125