golden hour
/var/www/html/wp-includes/js/dist
⬆️ Go Up
Upload
File/Folder
Size
Actions
a11y.js
10.34 KB
Del
OK
a11y.min.js
2.94 KB
Del
OK
annotations.js
34.16 KB
Del
OK
annotations.min.js
7.93 KB
Del
OK
api-fetch.js
23.4 KB
Del
OK
api-fetch.min.js
5.62 KB
Del
OK
autop.js
17.99 KB
Del
OK
autop.min.js
6.1 KB
Del
OK
blob.js
6.02 KB
Del
OK
blob.min.js
1.54 KB
Del
OK
block-directory.js
60.92 KB
Del
OK
block-directory.min.js
21.07 KB
Del
OK
block-editor.js
1.24 MB
Del
OK
block-editor.min.js
413.39 KB
Del
OK
block-library.js
1.04 MB
Del
OK
block-library.min.js
471.67 KB
Del
OK
block-serialization-default-parser.js
14.7 KB
Del
OK
block-serialization-default-parser.min.js
2.94 KB
Del
OK
blocks.js
482.72 KB
Del
OK
blocks.min.js
154.34 KB
Del
OK
components.js
1.8 MB
Del
OK
components.min.js
630.23 KB
Del
OK
compose.js
131.06 KB
Del
OK
compose.min.js
31.67 KB
Del
OK
core-data.js
161.01 KB
Del
OK
core-data.min.js
40.67 KB
Del
OK
customize-widgets.js
98.34 KB
Del
OK
customize-widgets.min.js
36.28 KB
Del
OK
data-controls.js
9.3 KB
Del
OK
data-controls.min.js
2.19 KB
Del
OK
data.js
124.08 KB
Del
OK
data.min.js
22.03 KB
Del
OK
date.js
231.67 KB
Del
OK
date.min.js
198.64 KB
Del
OK
deprecated.js
7.58 KB
Del
OK
deprecated.min.js
1.53 KB
Del
OK
dom-ready.js
5.02 KB
Del
OK
dom-ready.min.js
1.23 KB
Del
OK
dom.js
61.81 KB
Del
OK
dom.min.js
13.29 KB
Del
OK
edit-post.js
665.91 KB
Del
OK
edit-post.min.js
198.1 KB
Del
OK
edit-widgets.js
164.19 KB
Del
OK
edit-widgets.min.js
58.32 KB
Del
OK
editor.js
383.84 KB
Del
OK
editor.min.js
139.08 KB
Del
OK
element.js
42.34 KB
Del
OK
element.min.js
9.02 KB
Del
OK
escape-html.js
8.59 KB
Del
OK
escape-html.min.js
1.74 KB
Del
OK
format-library.js
49.85 KB
Del
OK
format-library.min.js
18 KB
Del
OK
hooks.js
22.63 KB
Del
OK
hooks.min.js
5.31 KB
Del
OK
html-entities.js
5.7 KB
Del
OK
html-entities.min.js
1.38 KB
Del
OK
i18n.js
49.58 KB
Del
OK
i18n.min.js
9.63 KB
Del
OK
is-shallow-equal.js
6.53 KB
Del
OK
is-shallow-equal.min.js
1.66 KB
Del
OK
keyboard-shortcuts.js
22.87 KB
Del
OK
keyboard-shortcuts.min.js
4.51 KB
Del
OK
keycodes.js
15.01 KB
Del
OK
keycodes.min.js
3.33 KB
Del
OK
list-reusable-blocks.js
13.83 KB
Del
OK
list-reusable-blocks.min.js
5.14 KB
Del
OK
media-utils.js
23.65 KB
Del
OK
media-utils.min.js
7.86 KB
Del
OK
notices.js
16.32 KB
Del
OK
notices.min.js
2.57 KB
Del
OK
nux.js
23.94 KB
Del
OK
nux.min.js
5.73 KB
Del
OK
plugins.js
20.63 KB
Del
OK
plugins.min.js
5.21 KB
Del
OK
primitives.js
10.2 KB
Del
OK
primitives.min.js
2.83 KB
Del
OK
priority-queue.js
8.73 KB
Del
OK
priority-queue.min.js
1.6 KB
Del
OK
redux-routine.js
24.62 KB
Del
OK
redux-routine.min.js
9.38 KB
Del
OK
reusable-blocks.js
21.65 KB
Del
OK
reusable-blocks.min.js
6.91 KB
Del
OK
rich-text.js
134.28 KB
Del
OK
rich-text.min.js
33.3 KB
Del
OK
server-side-render.js
13.45 KB
Del
OK
server-side-render.min.js
4.03 KB
Del
OK
shortcode.js
18.93 KB
Del
OK
shortcode.min.js
3.9 KB
Del
OK
token-list.js
9.56 KB
Del
OK
token-list.min.js
2.07 KB
Del
OK
url.js
26.51 KB
Del
OK
url.min.js
4.97 KB
Del
OK
vendor
-
Del
OK
viewport.js
13.47 KB
Del
OK
viewport.min.js
2.96 KB
Del
OK
warning.js
10.14 KB
Del
OK
warning.min.js
2.77 KB
Del
OK
widgets.js
46.43 KB
Del
OK
widgets.min.js
18.62 KB
Del
OK
wordcount.js
17.32 KB
Del
OK
wordcount.min.js
3.18 KB
Del
OK
Edit: block-directory.min.js
/*! This file is auto-generated */ this.wp=this.wp||{},this.wp.blockDirectory=function(e){var t={};function n(l){if(t[l])return t[l].exports;var c=t[l]={i:l,l:!1,exports:{}};return e[l].call(c.exports,c,c.exports,n),c.l=!0,c.exports}return n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(l,c,function(t){return e[t]}.bind(null,c));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="7f3f")}({"//Lo":function(e,t,n){"use strict";var l=n("GRId"),c=n("Tqx9");const o=Object(l.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(c.Path,{d:"M19 8h-1V6h-5v2h-2V6H6v2H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8c0-1.1-.9-2-2-2zm.5 10c0 .3-.2.5-.5.5H5c-.3 0-.5-.2-.5-.5v-8c0-.3.2-.5.5-.5h14c.3 0 .5.2.5.5v8z"}));t.a=o},"1ZqX":function(e,t){e.exports=window.wp.data},"51Zz":function(e,t){e.exports=window.wp.dataControls},"7f3f":function(e,t,n){"use strict";n.r(t),n.d(t,"store",(function(){return V}));var l={};n.r(l),n.d(l,"isRequestingDownloadableBlocks",(function(){return j})),n.d(l,"getDownloadableBlocks",(function(){return k})),n.d(l,"getInstalledBlockTypes",(function(){return f})),n.d(l,"getNewBlockTypes",(function(){return y})),n.d(l,"getUnusedBlockTypes",(function(){return _})),n.d(l,"isInstalling",(function(){return w})),n.d(l,"getErrorNotices",(function(){return E})),n.d(l,"getErrorNoticeForBlock",(function(){return g}));var c={};n.r(c),n.d(c,"fetchDownloadableBlocks",(function(){return S})),n.d(c,"receiveDownloadableBlocks",(function(){return x})),n.d(c,"installBlockType",(function(){return C})),n.d(c,"uninstallBlockType",(function(){return R})),n.d(c,"addInstalledBlockType",(function(){return D})),n.d(c,"removeInstalledBlockType",(function(){return P})),n.d(c,"setIsInstalling",(function(){return A})),n.d(c,"setErrorNotice",(function(){return M})),n.d(c,"clearErrorNotice",(function(){return F}));var o=n("GRId"),r=n("TvNi"),a=n("g56x"),i=n("HSyU"),s=n("1ZqX"),d=n("jSdM"),b=n("51Zz"),u=n("YLtl");var m=Object(s.combineReducers)({downloadableBlocks:(e={},t)=>{switch(t.type){case"FETCH_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{isRequesting:!0}};case"RECEIVE_DOWNLOADABLE_BLOCKS":return{...e,[t.filterValue]:{results:t.downloadableBlocks,isRequesting:!1}}}return e},blockManagement:(e={installedBlockTypes:[],isInstalling:{}},t)=>{switch(t.type){case"ADD_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:[...e.installedBlockTypes,t.item]};case"REMOVE_INSTALLED_BLOCK_TYPE":return{...e,installedBlockTypes:e.installedBlockTypes.filter(e=>e.name!==t.item.name)};case"SET_INSTALLING_BLOCK":return{...e,isInstalling:{...e.isInstalling,[t.blockId]:t.isInstalling}}}return e},errorNotices:(e={},t)=>{switch(t.type){case"SET_ERROR_NOTICE":return{...e,[t.blockId]:{message:t.message,isFatal:t.isFatal}};case"CLEAR_ERROR_NOTICE":return Object(u.omit)(e,t.blockId)}return e}}),p=n("axFQ");function O(e,t=[]){if(!t.length)return!1;if(t.some(({name:t})=>t===e.name))return!0;for(let n=0;n<t.length;n++)if(O(e,t[n].innerBlocks))return!0;return!1}function j(e,t){return!(!e.downloadableBlocks[t]||!e.downloadableBlocks[t].isRequesting)&&e.downloadableBlocks[t].isRequesting}function k(e,t){return e.downloadableBlocks[t]&&e.downloadableBlocks[t].results?e.downloadableBlocks[t].results:[]}function f(e){return e.blockManagement.installedBlockTypes}const y=Object(s.createRegistrySelector)(e=>t=>{const n=e(p.store).getBlocks();return f(t).filter(e=>O(e,n))}),_=Object(s.createRegistrySelector)(e=>t=>{const n=e(p.store).getBlocks();return f(t).filter(e=>!O(e,n))});function w(e,t){return e.blockManagement.isInstalling[t]||!1}function E(e){return e.errorNotices}function g(e,t){return e.errorNotices[t]}var h=n("l3Sj"),v=n("onLe"),B=n("ywyh"),N=n.n(B);const T=e=>new Promise((t,n)=>{const l=document.createElement(e.nodeName);["id","rel","src","href","type"].forEach(t=>{e[t]&&(l[t]=e[t])}),e.innerHTML&&l.appendChild(document.createTextNode(e.innerHTML)),l.onload=()=>t(!0),l.onerror=()=>n(new Error("Error loading asset.")),document.body.appendChild(l),("link"===l.nodeName.toLowerCase()||"script"===l.nodeName.toLowerCase()&&!l.src)&&t()});var I={async LOAD_ASSETS(){const e=await N()({url:document.location.href,parse:!1}),t=await e.text(),n=(new window.DOMParser).parseFromString(t,"text/html"),l=Array.from(n.querySelectorAll('link[rel="stylesheet"],script')).filter(e=>e.id&&!document.getElementById(e.id));for(const e of l)await T(e)}};function L(e){if(!e)return!1;const t=e.links["wp:plugin"]||e.links.self;return!(!t||!t.length)&&t[0].href}function S(e){return{type:"FETCH_DOWNLOADABLE_BLOCKS",filterValue:e}}function x(e,t){return{type:"RECEIVE_DOWNLOADABLE_BLOCKS",downloadableBlocks:e,filterValue:t}}function*C(e){const{id:t,assets:n}=e;let l=!1;yield F(t);try{yield A(e.id,!0);const t=L(e);let c={};if(t)yield Object(b.apiFetch)({url:t,data:{status:"active"},method:"PUT"});else{c=(yield Object(b.apiFetch)({path:"wp/v2/plugins",data:{slug:e.id,status:"active"},method:"POST"}))._links}yield D({...e,links:{...e.links,...c}}),yield function(e){return{type:"LOAD_ASSETS",assets:e}}(n);if(!(yield s.controls.select(i.store.name,"getBlockTypes")).some(t=>t.name===e.name))throw new Error(Object(h.__)("Error registering block. Try reloading the page."));yield s.controls.dispatch(v.store,"createInfoNotice",Object(h.sprintf)(Object(h.__)("Block %s installed and added."),e.title),{speak:!0,type:"snackbar"}),l=!0}catch(e){let n=e.message||Object(h.__)("An error occurred."),l=e instanceof Error;const c={folder_exists:Object(h.__)("This block is already installed. Try reloading the page."),unable_to_connect_to_filesystem:Object(h.__)("Error installing block. You can reload the page and try again.")};c[e.code]&&(l=!0,n=c[e.code]),yield M(t,n,l),yield s.controls.dispatch(v.store,"createErrorNotice",n,{speak:!0,isDismissible:!0})}return yield A(e.id,!1),l}function*R(e){try{yield Object(b.apiFetch)({url:L(e),data:{status:"inactive"},method:"PUT"}),yield Object(b.apiFetch)({url:L(e),method:"DELETE"}),yield P(e)}catch(e){yield s.controls.dispatch(v.store,"createErrorNotice",e.message||Object(h.__)("An error occurred."))}}function D(e){return{type:"ADD_INSTALLED_BLOCK_TYPE",item:e}}function P(e){return{type:"REMOVE_INSTALLED_BLOCK_TYPE",item:e}}function A(e,t){return{type:"SET_INSTALLING_BLOCK",blockId:e,isInstalling:t}}function M(e,t,n=!1){return{type:"SET_ERROR_NOTICE",blockId:e,message:t,isFatal:n}}function F(e){return{type:"CLEAR_ERROR_NOTICE",blockId:e}}var H={*getDownloadableBlocks(e){if(e)try{yield S(e);const t=(yield Object(b.apiFetch)({path:"wp/v2/block-directory/search?term="+e})).map(e=>Object(u.mapKeys)(e,(e,t)=>Object(u.camelCase)(t)));yield x(t,e)}catch(e){}}};const q={reducer:m,selectors:l,actions:c,controls:{...b.controls,...I},resolvers:H},V=Object(s.createReduxStore)("core/block-directory",q);function K(){const{uninstallBlockType:e}=Object(s.useDispatch)(V),t=Object(s.useSelect)(e=>{const{isAutosavingPost:t,isSavingPost:n}=e(d.store);return n()&&!t()},[]),n=Object(s.useSelect)(e=>e(V).getUnusedBlockTypes(),[]);return Object(o.useEffect)(()=>{t&&n.length&&n.forEach(t=>{e(t),Object(i.unregisterBlockType)(t.name)})},[t]),null}Object(s.register)(V);var U=n("tI+e"),z=n("K9lf"),G=n("jZUy"),Y=n("wx14"),$=n("rmEH"),Z=n("iClF"),W=n("URob"),X=n("Tqx9");var Q=Object(o.createElement)(X.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(o.createElement)(X.Path,{d:"M9.518 8.783a.25.25 0 00.188-.137l2.069-4.192a.25.25 0 01.448 0l2.07 4.192a.25.25 0 00.187.137l4.626.672a.25.25 0 01.139.427l-3.347 3.262a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.363.264l-4.137-2.176a.25.25 0 00-.233 0l-4.138 2.175a.25.25 0 01-.362-.263l.79-4.607a.25.25 0 00-.072-.222L4.753 9.882a.25.25 0 01.14-.427l4.625-.672zM12 14.533c.28 0 .559.067.814.2l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39v7.143z"})),J=n("Xxwi");var ee=function({rating:e}){const t=.5*Math.round(e/.5),n=Math.floor(e),l=Math.ceil(e-n),c=5-(n+l);return Object(o.createElement)("span",{"aria-label":Object(h.sprintf)(Object(h.__)("%s out of 5 stars"),t)},Object(u.times)(n,e=>Object(o.createElement)(Z.a,{key:"full_stars_"+e,className:"block-directory-block-ratings__star-full",icon:W.a,size:16})),Object(u.times)(l,e=>Object(o.createElement)(Z.a,{key:"half_stars_"+e,className:"block-directory-block-ratings__star-half-full",icon:Q,size:16})),Object(u.times)(c,e=>Object(o.createElement)(Z.a,{key:"empty_stars_"+e,className:"block-directory-block-ratings__star-empty",icon:J.a,size:16})))};var te=({rating:e})=>Object(o.createElement)("span",{className:"block-directory-block-ratings"},Object(o.createElement)(ee,{rating:e}));var ne=function({icon:e}){const t="block-directory-downloadable-block-icon";return null!==e.match(/\.(jpeg|jpg|gif|png|svg)(?:\?.*)?$/)?Object(o.createElement)("img",{className:t,src:e,alt:""}):Object(o.createElement)(p.BlockIcon,{className:t,icon:e,showColors:!0})};var le=({block:e})=>{const t=Object(s.useSelect)(t=>t(V).getErrorNoticeForBlock(e.id),[e]);return t?Object(o.createElement)("div",{className:"block-directory-downloadable-block-notice"},Object(o.createElement)("div",{className:"block-directory-downloadable-block-notice__content"},t.message,t.isFatal?" "+Object(h.__)("Try reloading the page."):null)):null};function ce({title:e,rating:t,ratingCount:n},{hasNotice:l,isInstalled:c,isInstalling:o}){const r=.5*Math.round(t/.5);return!c&&l?Object(h.sprintf)("Retry installing %s.",Object($.decodeEntities)(e)):c?Object(h.sprintf)("Add %s.",Object($.decodeEntities)(e)):o?Object(h.sprintf)("Installing %s.",Object($.decodeEntities)(e)):n<1?Object(h.sprintf)("Install %s.",Object($.decodeEntities)(e)):Object(h.sprintf)(Object(h._n)("Install %1$s. %2$s stars with %3$s review.","Install %1$s. %2$s stars with %3$s reviews.",n),Object($.decodeEntities)(e),r,n)}var oe=function({composite:e,item:t,onClick:n}){const{author:l,description:c,icon:r,rating:a,title:d}=t,b=!!Object(i.getBlockType)(t.name),{hasNotice:u,isInstalling:m,isInstallable:p}=Object(s.useSelect)(e=>{const{getErrorNoticeForBlock:n,isInstalling:l}=e(V),c=n(t.id),o=c&&c.isFatal;return{hasNotice:!!c,isInstalling:l(t.id),isInstallable:!o}},[t]);let O="";return b?O=Object(h.__)("Installed!"):m&&(O=Object(h.__)("Installing…")),Object(o.createElement)(U.__unstableCompositeItem,Object(Y.a)({role:"option",as:U.Button},e,{className:"block-directory-downloadable-block-list-item",onClick:e=>{e.preventDefault(),n()},isBusy:m,disabled:m||!p,label:ce(t,{hasNotice:u,isInstalled:b,isInstalling:m}),showTooltip:!0,tooltipPosition:"top center"}),Object(o.createElement)("div",{className:"block-directory-downloadable-block-list-item__icon"},Object(o.createElement)(ne,{icon:r,title:d}),m?Object(o.createElement)("span",{className:"block-directory-downloadable-block-list-item__spinner"},Object(o.createElement)(U.Spinner,null)):Object(o.createElement)(te,{rating:a})),Object(o.createElement)("span",{className:"block-directory-downloadable-block-list-item__details"},Object(o.createElement)("span",{className:"block-directory-downloadable-block-list-item__title"},Object(o.createInterpolateElement)(Object(h.sprintf)(Object(h.__)("%1$s <span>by %2$s</span>"),Object($.decodeEntities)(d),l),{span:Object(o.createElement)("span",{className:"block-directory-downloadable-block-list-item__author"})})),u?Object(o.createElement)(le,{block:t}):Object(o.createElement)(o.Fragment,null,Object(o.createElement)("span",{className:"block-directory-downloadable-block-list-item__desc"},O||Object($.decodeEntities)(c)),p&&!(b||m)&&Object(o.createElement)(U.VisuallyHidden,null,Object(h.__)("Install block")))))};var re=function({items:e,onHover:t=u.noop,onSelect:n}){const l=Object(U.__unstableUseCompositeState)(),{installBlockType:c}=Object(s.useDispatch)(V);return e.length?Object(o.createElement)(U.__unstableComposite,Object(Y.a)({},l,{role:"listbox",className:"block-directory-downloadable-blocks-list","aria-label":Object(h.__)("Blocks available for install")}),e.map(e=>Object(o.createElement)(oe,{key:e.id,composite:l,onClick:()=>{Object(i.getBlockType)(e.name)?n(e):c(e).then(t=>{t&&n(e)}),t(null)},onHover:t,item:e}))):null},ae=n("gdqT");var ie=function({children:e,downloadableItems:t,hasLocalBlocks:n}){const l=t.length;return Object(o.useEffect)(()=>{Object(ae.speak)(Object(h.sprintf)(Object(h._n)("%d additional block is available to install.","%d additional blocks are available to install.",l),l))},[l]),Object(o.createElement)(o.Fragment,null,!n&&Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__no-local"},Object(h.__)("No results available from your installed blocks.")),Object(o.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"}),Object(o.createElement)("div",{className:"block-directory-downloadable-blocks-panel"},Object(o.createElement)("div",{className:"block-directory-downloadable-blocks-panel__header"},Object(o.createElement)("h2",{className:"block-directory-downloadable-blocks-panel__title"},Object(h.__)("Available to install")),Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__description"},Object(h.__)("Select a block to install and add it to your post."))),e))},se=n("//Lo");var de=function(){return Object(o.createElement)("div",{className:"block-editor-inserter__no-results"},Object(o.createElement)(Z.a,{className:"block-editor-inserter__no-results-icon",icon:se.a}),Object(o.createElement)("p",null,Object(h.__)("No results found.")))};var be=Object(z.compose)([Object(s.withSelect)((e,{filterValue:t,rootClientId:n=null})=>{const{getDownloadableBlocks:l,isRequestingDownloadableBlocks:c}=e(V),{canInsertBlockType:o}=e(p.store),r=e(G.store).canUser("read","block-directory/search");return{downloadableItems:r?l(t).filter(e=>o(e,n,!0)):[],hasPermission:r,isLoading:c(t)}})])((function({downloadableItems:e,onSelect:t,onHover:n,hasLocalBlocks:l,hasPermission:c,isLoading:r,isTyping:a}){return void 0===c||r||a?Object(o.createElement)(o.Fragment,null,c&&!l&&Object(o.createElement)(o.Fragment,null,Object(o.createElement)("p",{className:"block-directory-downloadable-blocks-panel__no-local"},Object(h.__)("No results available from your installed blocks.")),Object(o.createElement)("div",{className:"block-editor-inserter__quick-inserter-separator"})),Object(o.createElement)("div",{className:"block-directory-downloadable-blocks-panel has-blocks-loading"},Object(o.createElement)(U.Spinner,null))):!1===c?l?null:Object(o.createElement)(de,null):e.length?Object(o.createElement)(ie,{downloadableItems:e,hasLocalBlocks:l},Object(o.createElement)(re,{items:e,onSelect:t,onHover:n})):!l&&Object(o.createElement)(de,null)}));var ue=function(){const[e,t]=Object(o.useState)(""),n=Object(u.debounce)(t,400);return Object(o.createElement)(p.__unstableInserterMenuExtension,null,({onSelect:t,onHover:l,filterValue:c,hasItems:r,rootClientId:a})=>(e!==c&&n(c),e?Object(o.createElement)(be,{onSelect:t,onHover:l,rootClientId:a,filterValue:e,hasLocalBlocks:r,isTyping:c!==e}):null))},me=n("BLhE");function pe({items:e}){return e.length?Object(o.createElement)("ul",{className:"block-directory-compact-list"},e.map(({icon:e,id:t,title:n,author:l})=>Object(o.createElement)("li",{key:t,className:"block-directory-compact-list__item"},Object(o.createElement)(ne,{icon:e,title:n}),Object(o.createElement)("div",{className:"block-directory-compact-list__item-details"},Object(o.createElement)("div",{className:"block-directory-compact-list__item-title"},n),Object(o.createElement)("div",{className:"block-directory-compact-list__item-author"},Object(h.sprintf)(Object(h.__)("By %s"),l)))))):null}function Oe(){const e=Object(s.useSelect)(e=>e(V).getNewBlockTypes(),[]);return e.length?Object(o.createElement)(me.PluginPrePublishPanel,{icon:se.a,title:Object(h.sprintf)(Object(h._n)("Added: %d block","Added: %d blocks",e.length),e.length),initialOpen:!0},Object(o.createElement)("p",{className:"installed-blocks-pre-publish-panel__copy"},Object(h._n)("The following block has been added to your site.","The following blocks have been added to your site.",e.length)),Object(o.createElement)(pe,{items:e})):null}function je({attributes:e,block:t,clientId:n}){const l=Object(s.useSelect)(e=>e(V).isInstalling(t.id)),{installBlockType:c}=Object(s.useDispatch)(V),{replaceBlock:r}=Object(s.useDispatch)(p.store);return Object(o.createElement)(U.Button,{onClick:()=>c(t).then(l=>{if(l){const l=Object(i.getBlockType)(t.name),[c]=Object(i.parse)(e.originalContent);c&&r(n,Object(i.createBlock)(l.name,c.attributes,c.innerBlocks))}}),disabled:l,isBusy:l,isPrimary:!0},Object(h.sprintf)(Object(h.__)("Install %s"),t.title))}const ke=({originalBlock:e,...t})=>{const{originalName:n,originalUndelimitedContent:l}=t.attributes,{replaceBlock:c}=Object(s.useDispatch)(p.store),r=()=>{c(t.clientId,Object(i.createBlock)("core/html",{content:l}))},a=!!l,d=Object(i.getBlockType)("core/html");let b=Object(h.sprintf)(Object(h.__)("Your site doesn’t include support for the %s block. You can try installing the block or remove it entirely."),e.title||n);const u=[Object(o.createElement)(je,{key:"install",block:e,attributes:t.attributes,clientId:t.clientId})];return a&&d&&(b=Object(h.sprintf)(Object(h.__)("Your site doesn’t include support for the %s block. You can try installing the block, convert it to a Custom HTML block, or remove it entirely."),e.title||n),u.push(Object(o.createElement)(U.Button,{key:"convert",onClick:r,isLink:!0},Object(h.__)("Keep as HTML")))),Object(o.createElement)("div",Object(p.useBlockProps)(),Object(o.createElement)(p.Warning,{actions:u},b),Object(o.createElement)(o.RawHTML,null,l))};var fe=e=>t=>{const{originalName:n}=t.attributes,{block:l,hasPermission:c}=Object(s.useSelect)(e=>{const{getDownloadableBlocks:t}=e(V),l=t("block:"+n).filter(({name:e})=>n===e);return{hasPermission:e(G.store).canUser("read","block-directory/search"),block:l.length&&l[0]}},[n]);return c&&l?Object(o.createElement)(ke,Object(Y.a)({},t,{originalBlock:l})):Object(o.createElement)(e,t)};Object(r.registerPlugin)("block-directory",{render:()=>Object(o.createElement)(o.Fragment,null,Object(o.createElement)(K,null),Object(o.createElement)(ue,null),Object(o.createElement)(Oe,null))}),Object(a.addFilter)("blocks.registerBlockType","block-directory/fallback",(e,t)=>("core/missing"!==t||(e.edit=fe(e.edit)),e))},BLhE:function(e,t){e.exports=window.wp.editPost},GRId:function(e,t){e.exports=window.wp.element},HSyU:function(e,t){e.exports=window.wp.blocks},K9lf:function(e,t){e.exports=window.wp.compose},Tqx9:function(e,t){e.exports=window.wp.primitives},TvNi:function(e,t){e.exports=window.wp.plugins},URob:function(e,t,n){"use strict";var l=n("GRId"),c=n("Tqx9");const o=Object(l.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(c.Path,{d:"M11.776 4.454a.25.25 0 01.448 0l2.069 4.192a.25.25 0 00.188.137l4.626.672a.25.25 0 01.139.426l-3.348 3.263a.25.25 0 00-.072.222l.79 4.607a.25.25 0 01-.362.263l-4.138-2.175a.25.25 0 00-.232 0l-4.138 2.175a.25.25 0 01-.363-.263l.79-4.607a.25.25 0 00-.071-.222L4.754 9.881a.25.25 0 01.139-.426l4.626-.672a.25.25 0 00.188-.137l2.069-4.192z"}));t.a=o},Xxwi:function(e,t,n){"use strict";var l=n("GRId"),c=n("Tqx9");const o=Object(l.createElement)(c.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Object(l.createElement)(c.Path,{fillRule:"evenodd",d:"M9.706 8.646a.25.25 0 01-.188.137l-4.626.672a.25.25 0 00-.139.427l3.348 3.262a.25.25 0 01.072.222l-.79 4.607a.25.25 0 00.362.264l4.138-2.176a.25.25 0 01.233 0l4.137 2.175a.25.25 0 00.363-.263l-.79-4.607a.25.25 0 01.072-.222l3.347-3.262a.25.25 0 00-.139-.427l-4.626-.672a.25.25 0 01-.188-.137l-2.069-4.192a.25.25 0 00-.448 0L9.706 8.646zM12 7.39l-.948 1.921a1.75 1.75 0 01-1.317.957l-2.12.308 1.534 1.495c.412.402.6.982.503 1.55l-.362 2.11 1.896-.997a1.75 1.75 0 011.629 0l1.895.997-.362-2.11a1.75 1.75 0 01.504-1.55l1.533-1.495-2.12-.308a1.75 1.75 0 01-1.317-.957L12 7.39z",clipRule:"evenodd"}));t.a=o},YLtl:function(e,t){e.exports=window.lodash},axFQ:function(e,t){e.exports=window.wp.blockEditor},g56x:function(e,t){e.exports=window.wp.hooks},gdqT:function(e,t){e.exports=window.wp.a11y},iClF:function(e,t,n){"use strict";var l=n("GRId");t.a=function({icon:e,size:t=24,...n}){return Object(l.cloneElement)(e,{width:t,height:t,...n})}},jSdM:function(e,t){e.exports=window.wp.editor},jZUy:function(e,t){e.exports=window.wp.coreData},l3Sj:function(e,t){e.exports=window.wp.i18n},onLe:function(e,t){e.exports=window.wp.notices},rmEH:function(e,t){e.exports=window.wp.htmlEntities},"tI+e":function(e,t){e.exports=window.wp.components},wx14:function(e,t,n){"use strict";function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return l}))},ywyh:function(e,t){e.exports=window.wp.apiFetch}});
Save