Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: block-directory.js
/******/ (() => { // webpackBootstrap
[0] Fix | Delete
/******/ "use strict";
[1] Fix | Delete
/******/ // The require scope
[2] Fix | Delete
/******/ var __webpack_require__ = {};
[3] Fix | Delete
/******/
[4] Fix | Delete
/************************************************************************/
[5] Fix | Delete
/******/ /* webpack/runtime/compat get default export */
[6] Fix | Delete
/******/ (() => {
[7] Fix | Delete
/******/ // getDefaultExport function for compatibility with non-harmony modules
[8] Fix | Delete
/******/ __webpack_require__.n = (module) => {
[9] Fix | Delete
/******/ var getter = module && module.__esModule ?
[10] Fix | Delete
/******/ () => (module['default']) :
[11] Fix | Delete
/******/ () => (module);
[12] Fix | Delete
/******/ __webpack_require__.d(getter, { a: getter });
[13] Fix | Delete
/******/ return getter;
[14] Fix | Delete
/******/ };
[15] Fix | Delete
/******/ })();
[16] Fix | Delete
/******/
[17] Fix | Delete
/******/ /* webpack/runtime/define property getters */
[18] Fix | Delete
/******/ (() => {
[19] Fix | Delete
/******/ // define getter functions for harmony exports
[20] Fix | Delete
/******/ __webpack_require__.d = (exports, definition) => {
[21] Fix | Delete
/******/ for(var key in definition) {
[22] Fix | Delete
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
[23] Fix | Delete
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
[24] Fix | Delete
/******/ }
[25] Fix | Delete
/******/ }
[26] Fix | Delete
/******/ };
[27] Fix | Delete
/******/ })();
[28] Fix | Delete
/******/
[29] Fix | Delete
/******/ /* webpack/runtime/hasOwnProperty shorthand */
[30] Fix | Delete
/******/ (() => {
[31] Fix | Delete
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
[32] Fix | Delete
/******/ })();
[33] Fix | Delete
/******/
[34] Fix | Delete
/******/ /* webpack/runtime/make namespace object */
[35] Fix | Delete
/******/ (() => {
[36] Fix | Delete
/******/ // define __esModule on exports
[37] Fix | Delete
/******/ __webpack_require__.r = (exports) => {
[38] Fix | Delete
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
[39] Fix | Delete
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
[40] Fix | Delete
/******/ }
[41] Fix | Delete
/******/ Object.defineProperty(exports, '__esModule', { value: true });
[42] Fix | Delete
/******/ };
[43] Fix | Delete
/******/ })();
[44] Fix | Delete
/******/
[45] Fix | Delete
/************************************************************************/
[46] Fix | Delete
var __webpack_exports__ = {};
[47] Fix | Delete
// ESM COMPAT FLAG
[48] Fix | Delete
__webpack_require__.r(__webpack_exports__);
[49] Fix | Delete
[50] Fix | Delete
// EXPORTS
[51] Fix | Delete
__webpack_require__.d(__webpack_exports__, {
[52] Fix | Delete
store: () => (/* reexport */ store)
[53] Fix | Delete
});
[54] Fix | Delete
[55] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js
[56] Fix | Delete
var selectors_namespaceObject = {};
[57] Fix | Delete
__webpack_require__.r(selectors_namespaceObject);
[58] Fix | Delete
__webpack_require__.d(selectors_namespaceObject, {
[59] Fix | Delete
getDownloadableBlocks: () => (getDownloadableBlocks),
[60] Fix | Delete
getErrorNoticeForBlock: () => (getErrorNoticeForBlock),
[61] Fix | Delete
getErrorNotices: () => (getErrorNotices),
[62] Fix | Delete
getInstalledBlockTypes: () => (getInstalledBlockTypes),
[63] Fix | Delete
getNewBlockTypes: () => (getNewBlockTypes),
[64] Fix | Delete
getUnusedBlockTypes: () => (getUnusedBlockTypes),
[65] Fix | Delete
isInstalling: () => (isInstalling),
[66] Fix | Delete
isRequestingDownloadableBlocks: () => (isRequestingDownloadableBlocks)
[67] Fix | Delete
});
[68] Fix | Delete
[69] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/actions.js
[70] Fix | Delete
var actions_namespaceObject = {};
[71] Fix | Delete
__webpack_require__.r(actions_namespaceObject);
[72] Fix | Delete
__webpack_require__.d(actions_namespaceObject, {
[73] Fix | Delete
addInstalledBlockType: () => (addInstalledBlockType),
[74] Fix | Delete
clearErrorNotice: () => (clearErrorNotice),
[75] Fix | Delete
fetchDownloadableBlocks: () => (fetchDownloadableBlocks),
[76] Fix | Delete
installBlockType: () => (installBlockType),
[77] Fix | Delete
receiveDownloadableBlocks: () => (receiveDownloadableBlocks),
[78] Fix | Delete
removeInstalledBlockType: () => (removeInstalledBlockType),
[79] Fix | Delete
setErrorNotice: () => (setErrorNotice),
[80] Fix | Delete
setIsInstalling: () => (setIsInstalling),
[81] Fix | Delete
uninstallBlockType: () => (uninstallBlockType)
[82] Fix | Delete
});
[83] Fix | Delete
[84] Fix | Delete
// NAMESPACE OBJECT: ./node_modules/@wordpress/block-directory/build-module/store/resolvers.js
[85] Fix | Delete
var resolvers_namespaceObject = {};
[86] Fix | Delete
__webpack_require__.r(resolvers_namespaceObject);
[87] Fix | Delete
__webpack_require__.d(resolvers_namespaceObject, {
[88] Fix | Delete
getDownloadableBlocks: () => (resolvers_getDownloadableBlocks)
[89] Fix | Delete
});
[90] Fix | Delete
[91] Fix | Delete
;// CONCATENATED MODULE: external ["wp","plugins"]
[92] Fix | Delete
const external_wp_plugins_namespaceObject = window["wp"]["plugins"];
[93] Fix | Delete
;// CONCATENATED MODULE: external ["wp","hooks"]
[94] Fix | Delete
const external_wp_hooks_namespaceObject = window["wp"]["hooks"];
[95] Fix | Delete
;// CONCATENATED MODULE: external ["wp","blocks"]
[96] Fix | Delete
const external_wp_blocks_namespaceObject = window["wp"]["blocks"];
[97] Fix | Delete
;// CONCATENATED MODULE: external ["wp","data"]
[98] Fix | Delete
const external_wp_data_namespaceObject = window["wp"]["data"];
[99] Fix | Delete
;// CONCATENATED MODULE: external ["wp","element"]
[100] Fix | Delete
const external_wp_element_namespaceObject = window["wp"]["element"];
[101] Fix | Delete
;// CONCATENATED MODULE: external ["wp","editor"]
[102] Fix | Delete
const external_wp_editor_namespaceObject = window["wp"]["editor"];
[103] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/reducer.js
[104] Fix | Delete
/**
[105] Fix | Delete
* WordPress dependencies
[106] Fix | Delete
*/
[107] Fix | Delete
[108] Fix | Delete
[109] Fix | Delete
/**
[110] Fix | Delete
* Reducer returning an array of downloadable blocks.
[111] Fix | Delete
*
[112] Fix | Delete
* @param {Object} state Current state.
[113] Fix | Delete
* @param {Object} action Dispatched action.
[114] Fix | Delete
*
[115] Fix | Delete
* @return {Object} Updated state.
[116] Fix | Delete
*/
[117] Fix | Delete
const downloadableBlocks = (state = {}, action) => {
[118] Fix | Delete
switch (action.type) {
[119] Fix | Delete
case 'FETCH_DOWNLOADABLE_BLOCKS':
[120] Fix | Delete
return {
[121] Fix | Delete
...state,
[122] Fix | Delete
[action.filterValue]: {
[123] Fix | Delete
isRequesting: true
[124] Fix | Delete
}
[125] Fix | Delete
};
[126] Fix | Delete
case 'RECEIVE_DOWNLOADABLE_BLOCKS':
[127] Fix | Delete
return {
[128] Fix | Delete
...state,
[129] Fix | Delete
[action.filterValue]: {
[130] Fix | Delete
results: action.downloadableBlocks,
[131] Fix | Delete
isRequesting: false
[132] Fix | Delete
}
[133] Fix | Delete
};
[134] Fix | Delete
}
[135] Fix | Delete
return state;
[136] Fix | Delete
};
[137] Fix | Delete
[138] Fix | Delete
/**
[139] Fix | Delete
* Reducer managing the installation and deletion of blocks.
[140] Fix | Delete
*
[141] Fix | Delete
* @param {Object} state Current state.
[142] Fix | Delete
* @param {Object} action Dispatched action.
[143] Fix | Delete
*
[144] Fix | Delete
* @return {Object} Updated state.
[145] Fix | Delete
*/
[146] Fix | Delete
const blockManagement = (state = {
[147] Fix | Delete
installedBlockTypes: [],
[148] Fix | Delete
isInstalling: {}
[149] Fix | Delete
}, action) => {
[150] Fix | Delete
switch (action.type) {
[151] Fix | Delete
case 'ADD_INSTALLED_BLOCK_TYPE':
[152] Fix | Delete
return {
[153] Fix | Delete
...state,
[154] Fix | Delete
installedBlockTypes: [...state.installedBlockTypes, action.item]
[155] Fix | Delete
};
[156] Fix | Delete
case 'REMOVE_INSTALLED_BLOCK_TYPE':
[157] Fix | Delete
return {
[158] Fix | Delete
...state,
[159] Fix | Delete
installedBlockTypes: state.installedBlockTypes.filter(blockType => blockType.name !== action.item.name)
[160] Fix | Delete
};
[161] Fix | Delete
case 'SET_INSTALLING_BLOCK':
[162] Fix | Delete
return {
[163] Fix | Delete
...state,
[164] Fix | Delete
isInstalling: {
[165] Fix | Delete
...state.isInstalling,
[166] Fix | Delete
[action.blockId]: action.isInstalling
[167] Fix | Delete
}
[168] Fix | Delete
};
[169] Fix | Delete
}
[170] Fix | Delete
return state;
[171] Fix | Delete
};
[172] Fix | Delete
[173] Fix | Delete
/**
[174] Fix | Delete
* Reducer returning an object of error notices.
[175] Fix | Delete
*
[176] Fix | Delete
* @param {Object} state Current state.
[177] Fix | Delete
* @param {Object} action Dispatched action.
[178] Fix | Delete
*
[179] Fix | Delete
* @return {Object} Updated state.
[180] Fix | Delete
*/
[181] Fix | Delete
const errorNotices = (state = {}, action) => {
[182] Fix | Delete
switch (action.type) {
[183] Fix | Delete
case 'SET_ERROR_NOTICE':
[184] Fix | Delete
return {
[185] Fix | Delete
...state,
[186] Fix | Delete
[action.blockId]: {
[187] Fix | Delete
message: action.message,
[188] Fix | Delete
isFatal: action.isFatal
[189] Fix | Delete
}
[190] Fix | Delete
};
[191] Fix | Delete
case 'CLEAR_ERROR_NOTICE':
[192] Fix | Delete
const {
[193] Fix | Delete
[action.blockId]: blockId,
[194] Fix | Delete
...restState
[195] Fix | Delete
} = state;
[196] Fix | Delete
return restState;
[197] Fix | Delete
}
[198] Fix | Delete
return state;
[199] Fix | Delete
};
[200] Fix | Delete
/* harmony default export */ const reducer = ((0,external_wp_data_namespaceObject.combineReducers)({
[201] Fix | Delete
downloadableBlocks,
[202] Fix | Delete
blockManagement,
[203] Fix | Delete
errorNotices
[204] Fix | Delete
}));
[205] Fix | Delete
[206] Fix | Delete
;// CONCATENATED MODULE: external ["wp","blockEditor"]
[207] Fix | Delete
const external_wp_blockEditor_namespaceObject = window["wp"]["blockEditor"];
[208] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/has-block-type.js
[209] Fix | Delete
/**
[210] Fix | Delete
* Check if a block list contains a specific block type. Recursively searches
[211] Fix | Delete
* through `innerBlocks` if they exist.
[212] Fix | Delete
*
[213] Fix | Delete
* @param {Object} blockType A block object to search for.
[214] Fix | Delete
* @param {Object[]} blocks The list of blocks to look through.
[215] Fix | Delete
*
[216] Fix | Delete
* @return {boolean} Whether the blockType is found.
[217] Fix | Delete
*/
[218] Fix | Delete
function hasBlockType(blockType, blocks = []) {
[219] Fix | Delete
if (!blocks.length) {
[220] Fix | Delete
return false;
[221] Fix | Delete
}
[222] Fix | Delete
if (blocks.some(({
[223] Fix | Delete
name
[224] Fix | Delete
}) => name === blockType.name)) {
[225] Fix | Delete
return true;
[226] Fix | Delete
}
[227] Fix | Delete
for (let i = 0; i < blocks.length; i++) {
[228] Fix | Delete
if (hasBlockType(blockType, blocks[i].innerBlocks)) {
[229] Fix | Delete
return true;
[230] Fix | Delete
}
[231] Fix | Delete
}
[232] Fix | Delete
return false;
[233] Fix | Delete
}
[234] Fix | Delete
[235] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/selectors.js
[236] Fix | Delete
/**
[237] Fix | Delete
* WordPress dependencies
[238] Fix | Delete
*/
[239] Fix | Delete
[240] Fix | Delete
[241] Fix | Delete
[242] Fix | Delete
/**
[243] Fix | Delete
* Internal dependencies
[244] Fix | Delete
*/
[245] Fix | Delete
[246] Fix | Delete
[247] Fix | Delete
/**
[248] Fix | Delete
* Returns true if application is requesting for downloadable blocks.
[249] Fix | Delete
*
[250] Fix | Delete
* @param {Object} state Global application state.
[251] Fix | Delete
* @param {string} filterValue Search string.
[252] Fix | Delete
*
[253] Fix | Delete
* @return {boolean} Whether a request is in progress for the blocks list.
[254] Fix | Delete
*/
[255] Fix | Delete
function isRequestingDownloadableBlocks(state, filterValue) {
[256] Fix | Delete
var _state$downloadableBl;
[257] Fix | Delete
return (_state$downloadableBl = state.downloadableBlocks[filterValue]?.isRequesting) !== null && _state$downloadableBl !== void 0 ? _state$downloadableBl : false;
[258] Fix | Delete
}
[259] Fix | Delete
[260] Fix | Delete
/**
[261] Fix | Delete
* Returns the available uninstalled blocks.
[262] Fix | Delete
*
[263] Fix | Delete
* @param {Object} state Global application state.
[264] Fix | Delete
* @param {string} filterValue Search string.
[265] Fix | Delete
*
[266] Fix | Delete
* @return {Array} Downloadable blocks.
[267] Fix | Delete
*/
[268] Fix | Delete
function getDownloadableBlocks(state, filterValue) {
[269] Fix | Delete
var _state$downloadableBl2;
[270] Fix | Delete
return (_state$downloadableBl2 = state.downloadableBlocks[filterValue]?.results) !== null && _state$downloadableBl2 !== void 0 ? _state$downloadableBl2 : [];
[271] Fix | Delete
}
[272] Fix | Delete
[273] Fix | Delete
/**
[274] Fix | Delete
* Returns the block types that have been installed on the server in this
[275] Fix | Delete
* session.
[276] Fix | Delete
*
[277] Fix | Delete
* @param {Object} state Global application state.
[278] Fix | Delete
*
[279] Fix | Delete
* @return {Array} Block type items
[280] Fix | Delete
*/
[281] Fix | Delete
function getInstalledBlockTypes(state) {
[282] Fix | Delete
return state.blockManagement.installedBlockTypes;
[283] Fix | Delete
}
[284] Fix | Delete
[285] Fix | Delete
/**
[286] Fix | Delete
* Returns block types that have been installed on the server and used in the
[287] Fix | Delete
* current post.
[288] Fix | Delete
*
[289] Fix | Delete
* @param {Object} state Global application state.
[290] Fix | Delete
*
[291] Fix | Delete
* @return {Array} Block type items.
[292] Fix | Delete
*/
[293] Fix | Delete
const getNewBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => state => {
[294] Fix | Delete
const usedBlockTree = select(external_wp_blockEditor_namespaceObject.store).getBlocks();
[295] Fix | Delete
const installedBlockTypes = getInstalledBlockTypes(state);
[296] Fix | Delete
return installedBlockTypes.filter(blockType => hasBlockType(blockType, usedBlockTree));
[297] Fix | Delete
});
[298] Fix | Delete
[299] Fix | Delete
/**
[300] Fix | Delete
* Returns the block types that have been installed on the server but are not
[301] Fix | Delete
* used in the current post.
[302] Fix | Delete
*
[303] Fix | Delete
* @param {Object} state Global application state.
[304] Fix | Delete
*
[305] Fix | Delete
* @return {Array} Block type items.
[306] Fix | Delete
*/
[307] Fix | Delete
const getUnusedBlockTypes = (0,external_wp_data_namespaceObject.createRegistrySelector)(select => state => {
[308] Fix | Delete
const usedBlockTree = select(external_wp_blockEditor_namespaceObject.store).getBlocks();
[309] Fix | Delete
const installedBlockTypes = getInstalledBlockTypes(state);
[310] Fix | Delete
return installedBlockTypes.filter(blockType => !hasBlockType(blockType, usedBlockTree));
[311] Fix | Delete
});
[312] Fix | Delete
[313] Fix | Delete
/**
[314] Fix | Delete
* Returns true if a block plugin install is in progress.
[315] Fix | Delete
*
[316] Fix | Delete
* @param {Object} state Global application state.
[317] Fix | Delete
* @param {string} blockId Id of the block.
[318] Fix | Delete
*
[319] Fix | Delete
* @return {boolean} Whether this block is currently being installed.
[320] Fix | Delete
*/
[321] Fix | Delete
function isInstalling(state, blockId) {
[322] Fix | Delete
return state.blockManagement.isInstalling[blockId] || false;
[323] Fix | Delete
}
[324] Fix | Delete
[325] Fix | Delete
/**
[326] Fix | Delete
* Returns all block error notices.
[327] Fix | Delete
*
[328] Fix | Delete
* @param {Object} state Global application state.
[329] Fix | Delete
*
[330] Fix | Delete
* @return {Object} Object with error notices.
[331] Fix | Delete
*/
[332] Fix | Delete
function getErrorNotices(state) {
[333] Fix | Delete
return state.errorNotices;
[334] Fix | Delete
}
[335] Fix | Delete
[336] Fix | Delete
/**
[337] Fix | Delete
* Returns the error notice for a given block.
[338] Fix | Delete
*
[339] Fix | Delete
* @param {Object} state Global application state.
[340] Fix | Delete
* @param {string} blockId The ID of the block plugin. eg: my-block
[341] Fix | Delete
*
[342] Fix | Delete
* @return {string|boolean} The error text, or false if no error.
[343] Fix | Delete
*/
[344] Fix | Delete
function getErrorNoticeForBlock(state, blockId) {
[345] Fix | Delete
return state.errorNotices[blockId];
[346] Fix | Delete
}
[347] Fix | Delete
[348] Fix | Delete
;// CONCATENATED MODULE: external ["wp","i18n"]
[349] Fix | Delete
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
[350] Fix | Delete
;// CONCATENATED MODULE: external ["wp","apiFetch"]
[351] Fix | Delete
const external_wp_apiFetch_namespaceObject = window["wp"]["apiFetch"];
[352] Fix | Delete
var external_wp_apiFetch_default = /*#__PURE__*/__webpack_require__.n(external_wp_apiFetch_namespaceObject);
[353] Fix | Delete
;// CONCATENATED MODULE: external ["wp","notices"]
[354] Fix | Delete
const external_wp_notices_namespaceObject = window["wp"]["notices"];
[355] Fix | Delete
;// CONCATENATED MODULE: external ["wp","url"]
[356] Fix | Delete
const external_wp_url_namespaceObject = window["wp"]["url"];
[357] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/load-assets.js
[358] Fix | Delete
/**
[359] Fix | Delete
* WordPress dependencies
[360] Fix | Delete
*/
[361] Fix | Delete
[362] Fix | Delete
[363] Fix | Delete
/**
[364] Fix | Delete
* Load an asset for a block.
[365] Fix | Delete
*
[366] Fix | Delete
* This function returns a Promise that will resolve once the asset is loaded,
[367] Fix | Delete
* or in the case of Stylesheets and Inline JavaScript, will resolve immediately.
[368] Fix | Delete
*
[369] Fix | Delete
* @param {HTMLElement} el A HTML Element asset to inject.
[370] Fix | Delete
*
[371] Fix | Delete
* @return {Promise} Promise which will resolve when the asset is loaded.
[372] Fix | Delete
*/
[373] Fix | Delete
const loadAsset = el => {
[374] Fix | Delete
return new Promise((resolve, reject) => {
[375] Fix | Delete
/*
[376] Fix | Delete
* Reconstruct the passed element, this is required as inserting the Node directly
[377] Fix | Delete
* won't always fire the required onload events, even if the asset wasn't already loaded.
[378] Fix | Delete
*/
[379] Fix | Delete
const newNode = document.createElement(el.nodeName);
[380] Fix | Delete
['id', 'rel', 'src', 'href', 'type'].forEach(attr => {
[381] Fix | Delete
if (el[attr]) {
[382] Fix | Delete
newNode[attr] = el[attr];
[383] Fix | Delete
}
[384] Fix | Delete
});
[385] Fix | Delete
[386] Fix | Delete
// Append inline <script> contents.
[387] Fix | Delete
if (el.innerHTML) {
[388] Fix | Delete
newNode.appendChild(document.createTextNode(el.innerHTML));
[389] Fix | Delete
}
[390] Fix | Delete
newNode.onload = () => resolve(true);
[391] Fix | Delete
newNode.onerror = () => reject(new Error('Error loading asset.'));
[392] Fix | Delete
document.body.appendChild(newNode);
[393] Fix | Delete
[394] Fix | Delete
// Resolve Stylesheets and Inline JavaScript immediately.
[395] Fix | Delete
if ('link' === newNode.nodeName.toLowerCase() || 'script' === newNode.nodeName.toLowerCase() && !newNode.src) {
[396] Fix | Delete
resolve();
[397] Fix | Delete
}
[398] Fix | Delete
});
[399] Fix | Delete
};
[400] Fix | Delete
[401] Fix | Delete
/**
[402] Fix | Delete
* Load the asset files for a block
[403] Fix | Delete
*/
[404] Fix | Delete
async function loadAssets() {
[405] Fix | Delete
/*
[406] Fix | Delete
* Fetch the current URL (post-new.php, or post.php?post=1&action=edit) and compare the
[407] Fix | Delete
* JavaScript and CSS assets loaded between the pages. This imports the required assets
[408] Fix | Delete
* for the block into the current page while not requiring that we know them up-front.
[409] Fix | Delete
* In the future this can be improved by reliance upon block.json and/or a script-loader
[410] Fix | Delete
* dependency API.
[411] Fix | Delete
*/
[412] Fix | Delete
const response = await external_wp_apiFetch_default()({
[413] Fix | Delete
url: document.location.href,
[414] Fix | Delete
parse: false
[415] Fix | Delete
});
[416] Fix | Delete
const data = await response.text();
[417] Fix | Delete
const doc = new window.DOMParser().parseFromString(data, 'text/html');
[418] Fix | Delete
const newAssets = Array.from(doc.querySelectorAll('link[rel="stylesheet"],script')).filter(asset => asset.id && !document.getElementById(asset.id));
[419] Fix | Delete
[420] Fix | Delete
/*
[421] Fix | Delete
* Load each asset in order, as they may depend upon an earlier loaded script.
[422] Fix | Delete
* Stylesheets and Inline Scripts will resolve immediately upon insertion.
[423] Fix | Delete
*/
[424] Fix | Delete
for (const newAsset of newAssets) {
[425] Fix | Delete
await loadAsset(newAsset);
[426] Fix | Delete
}
[427] Fix | Delete
}
[428] Fix | Delete
[429] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/utils/get-plugin-url.js
[430] Fix | Delete
/**
[431] Fix | Delete
* Get the plugin's direct API link out of a block-directory response.
[432] Fix | Delete
*
[433] Fix | Delete
* @param {Object} block The block object
[434] Fix | Delete
*
[435] Fix | Delete
* @return {string} The plugin URL, if exists.
[436] Fix | Delete
*/
[437] Fix | Delete
function getPluginUrl(block) {
[438] Fix | Delete
if (!block) {
[439] Fix | Delete
return false;
[440] Fix | Delete
}
[441] Fix | Delete
const link = block.links['wp:plugin'] || block.links.self;
[442] Fix | Delete
if (link && link.length) {
[443] Fix | Delete
return link[0].href;
[444] Fix | Delete
}
[445] Fix | Delete
return false;
[446] Fix | Delete
}
[447] Fix | Delete
[448] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-directory/build-module/store/actions.js
[449] Fix | Delete
/**
[450] Fix | Delete
* WordPress dependencies
[451] Fix | Delete
*/
[452] Fix | Delete
[453] Fix | Delete
[454] Fix | Delete
[455] Fix | Delete
[456] Fix | Delete
[457] Fix | Delete
[458] Fix | Delete
/**
[459] Fix | Delete
* Internal dependencies
[460] Fix | Delete
*/
[461] Fix | Delete
[462] Fix | Delete
[463] Fix | Delete
[464] Fix | Delete
/**
[465] Fix | Delete
* Returns an action object used in signalling that the downloadable blocks
[466] Fix | Delete
* have been requested and are loading.
[467] Fix | Delete
*
[468] Fix | Delete
* @param {string} filterValue Search string.
[469] Fix | Delete
*
[470] Fix | Delete
* @return {Object} Action object.
[471] Fix | Delete
*/
[472] Fix | Delete
function fetchDownloadableBlocks(filterValue) {
[473] Fix | Delete
return {
[474] Fix | Delete
type: 'FETCH_DOWNLOADABLE_BLOCKS',
[475] Fix | Delete
filterValue
[476] Fix | Delete
};
[477] Fix | Delete
}
[478] Fix | Delete
[479] Fix | Delete
/**
[480] Fix | Delete
* Returns an action object used in signalling that the downloadable blocks
[481] Fix | Delete
* have been updated.
[482] Fix | Delete
*
[483] Fix | Delete
* @param {Array} downloadableBlocks Downloadable blocks.
[484] Fix | Delete
* @param {string} filterValue Search string.
[485] Fix | Delete
*
[486] Fix | Delete
* @return {Object} Action object.
[487] Fix | Delete
*/
[488] Fix | Delete
function receiveDownloadableBlocks(downloadableBlocks, filterValue) {
[489] Fix | Delete
return {
[490] Fix | Delete
type: 'RECEIVE_DOWNLOADABLE_BLOCKS',
[491] Fix | Delete
downloadableBlocks,
[492] Fix | Delete
filterValue
[493] Fix | Delete
};
[494] Fix | Delete
}
[495] Fix | Delete
[496] Fix | Delete
/**
[497] Fix | Delete
* Action triggered to install a block plugin.
[498] Fix | Delete
*
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function