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

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: block-editor.js
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[68000] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
[68001] Fix | Delete
label: (0,external_wp_i18n_namespaceObject._x)('Settings', 'Image settings'),
[68002] Fix | Delete
resetAll: resetLightbox,
[68003] Fix | Delete
panelId: panelId,
[68004] Fix | Delete
dropdownMenuProps: dropdownMenuProps,
[68005] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem
[68006] Fix | Delete
// We use the `userSettings` prop instead of `settings`, because `settings`
[68007] Fix | Delete
// contains the core/theme values for the lightbox and we want to show the
[68008] Fix | Delete
// "RESET" button ONLY when the user has explicitly set a value in the
[68009] Fix | Delete
// Global Styles.
[68010] Fix | Delete
, {
[68011] Fix | Delete
hasValue: () => !!value?.lightbox,
[68012] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Expand on click'),
[68013] Fix | Delete
onDeselect: resetLightbox,
[68014] Fix | Delete
isShownByDefault: true,
[68015] Fix | Delete
panelId: panelId,
[68016] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
[68017] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Expand on click'),
[68018] Fix | Delete
checked: lightboxChecked,
[68019] Fix | Delete
onChange: onChangeLightbox
[68020] Fix | Delete
})
[68021] Fix | Delete
})
[68022] Fix | Delete
})
[68023] Fix | Delete
});
[68024] Fix | Delete
}
[68025] Fix | Delete
[68026] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/global-styles/advanced-panel.js
[68027] Fix | Delete
/**
[68028] Fix | Delete
* WordPress dependencies
[68029] Fix | Delete
*/
[68030] Fix | Delete
[68031] Fix | Delete
[68032] Fix | Delete
[68033] Fix | Delete
[68034] Fix | Delete
/**
[68035] Fix | Delete
* Internal dependencies
[68036] Fix | Delete
*/
[68037] Fix | Delete
[68038] Fix | Delete
[68039] Fix | Delete
[68040] Fix | Delete
function AdvancedPanel({
[68041] Fix | Delete
value,
[68042] Fix | Delete
onChange,
[68043] Fix | Delete
inheritedValue = value
[68044] Fix | Delete
}) {
[68045] Fix | Delete
// Custom CSS
[68046] Fix | Delete
const [cssError, setCSSError] = (0,external_wp_element_namespaceObject.useState)(null);
[68047] Fix | Delete
const customCSS = inheritedValue?.css;
[68048] Fix | Delete
function handleOnChange(newValue) {
[68049] Fix | Delete
onChange({
[68050] Fix | Delete
...value,
[68051] Fix | Delete
css: newValue
[68052] Fix | Delete
});
[68053] Fix | Delete
if (cssError) {
[68054] Fix | Delete
// Check if the new value is valid CSS, and pass a wrapping selector
[68055] Fix | Delete
// to ensure that `transformStyles` validates the CSS. Note that the
[68056] Fix | Delete
// wrapping selector here is not used in the actual output of any styles.
[68057] Fix | Delete
const [transformed] = transform_styles([{
[68058] Fix | Delete
css: newValue
[68059] Fix | Delete
}], '.for-validation-only');
[68060] Fix | Delete
if (transformed) {
[68061] Fix | Delete
setCSSError(null);
[68062] Fix | Delete
}
[68063] Fix | Delete
}
[68064] Fix | Delete
}
[68065] Fix | Delete
function handleOnBlur(event) {
[68066] Fix | Delete
if (!event?.target?.value) {
[68067] Fix | Delete
setCSSError(null);
[68068] Fix | Delete
return;
[68069] Fix | Delete
}
[68070] Fix | Delete
[68071] Fix | Delete
// Check if the new value is valid CSS, and pass a wrapping selector
[68072] Fix | Delete
// to ensure that `transformStyles` validates the CSS. Note that the
[68073] Fix | Delete
// wrapping selector here is not used in the actual output of any styles.
[68074] Fix | Delete
const [transformed] = transform_styles([{
[68075] Fix | Delete
css: event.target.value
[68076] Fix | Delete
}], '.for-validation-only');
[68077] Fix | Delete
setCSSError(transformed === null ? (0,external_wp_i18n_namespaceObject.__)('There is an error with your CSS structure.') : null);
[68078] Fix | Delete
}
[68079] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[68080] Fix | Delete
spacing: 3,
[68081] Fix | Delete
children: [cssError && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Notice, {
[68082] Fix | Delete
status: "error",
[68083] Fix | Delete
onRemove: () => setCSSError(null),
[68084] Fix | Delete
children: cssError
[68085] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextareaControl, {
[68086] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Additional CSS'),
[68087] Fix | Delete
__nextHasNoMarginBottom: true,
[68088] Fix | Delete
value: customCSS,
[68089] Fix | Delete
onChange: newValue => handleOnChange(newValue),
[68090] Fix | Delete
onBlur: handleOnBlur,
[68091] Fix | Delete
className: "block-editor-global-styles-advanced-panel__custom-css-input",
[68092] Fix | Delete
spellCheck: false
[68093] Fix | Delete
})]
[68094] Fix | Delete
});
[68095] Fix | Delete
}
[68096] Fix | Delete
[68097] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/memize/dist/index.js
[68098] Fix | Delete
/**
[68099] Fix | Delete
* Memize options object.
[68100] Fix | Delete
*
[68101] Fix | Delete
* @typedef MemizeOptions
[68102] Fix | Delete
*
[68103] Fix | Delete
* @property {number} [maxSize] Maximum size of the cache.
[68104] Fix | Delete
*/
[68105] Fix | Delete
[68106] Fix | Delete
/**
[68107] Fix | Delete
* Internal cache entry.
[68108] Fix | Delete
*
[68109] Fix | Delete
* @typedef MemizeCacheNode
[68110] Fix | Delete
*
[68111] Fix | Delete
* @property {?MemizeCacheNode|undefined} [prev] Previous node.
[68112] Fix | Delete
* @property {?MemizeCacheNode|undefined} [next] Next node.
[68113] Fix | Delete
* @property {Array<*>} args Function arguments for cache
[68114] Fix | Delete
* entry.
[68115] Fix | Delete
* @property {*} val Function result.
[68116] Fix | Delete
*/
[68117] Fix | Delete
[68118] Fix | Delete
/**
[68119] Fix | Delete
* Properties of the enhanced function for controlling cache.
[68120] Fix | Delete
*
[68121] Fix | Delete
* @typedef MemizeMemoizedFunction
[68122] Fix | Delete
*
[68123] Fix | Delete
* @property {()=>void} clear Clear the cache.
[68124] Fix | Delete
*/
[68125] Fix | Delete
[68126] Fix | Delete
/**
[68127] Fix | Delete
* Accepts a function to be memoized, and returns a new memoized function, with
[68128] Fix | Delete
* optional options.
[68129] Fix | Delete
*
[68130] Fix | Delete
* @template {(...args: any[]) => any} F
[68131] Fix | Delete
*
[68132] Fix | Delete
* @param {F} fn Function to memoize.
[68133] Fix | Delete
* @param {MemizeOptions} [options] Options object.
[68134] Fix | Delete
*
[68135] Fix | Delete
* @return {((...args: Parameters<F>) => ReturnType<F>) & MemizeMemoizedFunction} Memoized function.
[68136] Fix | Delete
*/
[68137] Fix | Delete
function memize(fn, options) {
[68138] Fix | Delete
var size = 0;
[68139] Fix | Delete
[68140] Fix | Delete
/** @type {?MemizeCacheNode|undefined} */
[68141] Fix | Delete
var head;
[68142] Fix | Delete
[68143] Fix | Delete
/** @type {?MemizeCacheNode|undefined} */
[68144] Fix | Delete
var tail;
[68145] Fix | Delete
[68146] Fix | Delete
options = options || {};
[68147] Fix | Delete
[68148] Fix | Delete
function memoized(/* ...args */) {
[68149] Fix | Delete
var node = head,
[68150] Fix | Delete
len = arguments.length,
[68151] Fix | Delete
args,
[68152] Fix | Delete
i;
[68153] Fix | Delete
[68154] Fix | Delete
searchCache: while (node) {
[68155] Fix | Delete
// Perform a shallow equality test to confirm that whether the node
[68156] Fix | Delete
// under test is a candidate for the arguments passed. Two arrays
[68157] Fix | Delete
// are shallowly equal if their length matches and each entry is
[68158] Fix | Delete
// strictly equal between the two sets. Avoid abstracting to a
[68159] Fix | Delete
// function which could incur an arguments leaking deoptimization.
[68160] Fix | Delete
[68161] Fix | Delete
// Check whether node arguments match arguments length
[68162] Fix | Delete
if (node.args.length !== arguments.length) {
[68163] Fix | Delete
node = node.next;
[68164] Fix | Delete
continue;
[68165] Fix | Delete
}
[68166] Fix | Delete
[68167] Fix | Delete
// Check whether node arguments match arguments values
[68168] Fix | Delete
for (i = 0; i < len; i++) {
[68169] Fix | Delete
if (node.args[i] !== arguments[i]) {
[68170] Fix | Delete
node = node.next;
[68171] Fix | Delete
continue searchCache;
[68172] Fix | Delete
}
[68173] Fix | Delete
}
[68174] Fix | Delete
[68175] Fix | Delete
// At this point we can assume we've found a match
[68176] Fix | Delete
[68177] Fix | Delete
// Surface matched node to head if not already
[68178] Fix | Delete
if (node !== head) {
[68179] Fix | Delete
// As tail, shift to previous. Must only shift if not also
[68180] Fix | Delete
// head, since if both head and tail, there is no previous.
[68181] Fix | Delete
if (node === tail) {
[68182] Fix | Delete
tail = node.prev;
[68183] Fix | Delete
}
[68184] Fix | Delete
[68185] Fix | Delete
// Adjust siblings to point to each other. If node was tail,
[68186] Fix | Delete
// this also handles new tail's empty `next` assignment.
[68187] Fix | Delete
/** @type {MemizeCacheNode} */ (node.prev).next = node.next;
[68188] Fix | Delete
if (node.next) {
[68189] Fix | Delete
node.next.prev = node.prev;
[68190] Fix | Delete
}
[68191] Fix | Delete
[68192] Fix | Delete
node.next = head;
[68193] Fix | Delete
node.prev = null;
[68194] Fix | Delete
/** @type {MemizeCacheNode} */ (head).prev = node;
[68195] Fix | Delete
head = node;
[68196] Fix | Delete
}
[68197] Fix | Delete
[68198] Fix | Delete
// Return immediately
[68199] Fix | Delete
return node.val;
[68200] Fix | Delete
}
[68201] Fix | Delete
[68202] Fix | Delete
// No cached value found. Continue to insertion phase:
[68203] Fix | Delete
[68204] Fix | Delete
// Create a copy of arguments (avoid leaking deoptimization)
[68205] Fix | Delete
args = new Array(len);
[68206] Fix | Delete
for (i = 0; i < len; i++) {
[68207] Fix | Delete
args[i] = arguments[i];
[68208] Fix | Delete
}
[68209] Fix | Delete
[68210] Fix | Delete
node = {
[68211] Fix | Delete
args: args,
[68212] Fix | Delete
[68213] Fix | Delete
// Generate the result from original function
[68214] Fix | Delete
val: fn.apply(null, args),
[68215] Fix | Delete
};
[68216] Fix | Delete
[68217] Fix | Delete
// Don't need to check whether node is already head, since it would
[68218] Fix | Delete
// have been returned above already if it was
[68219] Fix | Delete
[68220] Fix | Delete
// Shift existing head down list
[68221] Fix | Delete
if (head) {
[68222] Fix | Delete
head.prev = node;
[68223] Fix | Delete
node.next = head;
[68224] Fix | Delete
} else {
[68225] Fix | Delete
// If no head, follows that there's no tail (at initial or reset)
[68226] Fix | Delete
tail = node;
[68227] Fix | Delete
}
[68228] Fix | Delete
[68229] Fix | Delete
// Trim tail if we're reached max size and are pending cache insertion
[68230] Fix | Delete
if (size === /** @type {MemizeOptions} */ (options).maxSize) {
[68231] Fix | Delete
tail = /** @type {MemizeCacheNode} */ (tail).prev;
[68232] Fix | Delete
/** @type {MemizeCacheNode} */ (tail).next = null;
[68233] Fix | Delete
} else {
[68234] Fix | Delete
size++;
[68235] Fix | Delete
}
[68236] Fix | Delete
[68237] Fix | Delete
head = node;
[68238] Fix | Delete
[68239] Fix | Delete
return node.val;
[68240] Fix | Delete
}
[68241] Fix | Delete
[68242] Fix | Delete
memoized.clear = function () {
[68243] Fix | Delete
head = null;
[68244] Fix | Delete
tail = null;
[68245] Fix | Delete
size = 0;
[68246] Fix | Delete
};
[68247] Fix | Delete
[68248] Fix | Delete
// Ignore reason: There's not a clear solution to create an intersection of
[68249] Fix | Delete
// the function with additional properties, where the goal is to retain the
[68250] Fix | Delete
// function signature of the incoming argument and add control properties
[68251] Fix | Delete
// on the return value.
[68252] Fix | Delete
[68253] Fix | Delete
// @ts-ignore
[68254] Fix | Delete
return memoized;
[68255] Fix | Delete
}
[68256] Fix | Delete
[68257] Fix | Delete
[68258] Fix | Delete
[68259] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/global-styles/get-global-styles-changes.js
[68260] Fix | Delete
/**
[68261] Fix | Delete
* External dependencies
[68262] Fix | Delete
*/
[68263] Fix | Delete
[68264] Fix | Delete
[68265] Fix | Delete
/**
[68266] Fix | Delete
* WordPress dependencies
[68267] Fix | Delete
*/
[68268] Fix | Delete
[68269] Fix | Delete
[68270] Fix | Delete
const globalStylesChangesCache = new Map();
[68271] Fix | Delete
const get_global_styles_changes_EMPTY_ARRAY = [];
[68272] Fix | Delete
const translationMap = {
[68273] Fix | Delete
caption: (0,external_wp_i18n_namespaceObject.__)('Caption'),
[68274] Fix | Delete
link: (0,external_wp_i18n_namespaceObject.__)('Link'),
[68275] Fix | Delete
button: (0,external_wp_i18n_namespaceObject.__)('Button'),
[68276] Fix | Delete
heading: (0,external_wp_i18n_namespaceObject.__)('Heading'),
[68277] Fix | Delete
h1: (0,external_wp_i18n_namespaceObject.__)('H1'),
[68278] Fix | Delete
h2: (0,external_wp_i18n_namespaceObject.__)('H2'),
[68279] Fix | Delete
h3: (0,external_wp_i18n_namespaceObject.__)('H3'),
[68280] Fix | Delete
h4: (0,external_wp_i18n_namespaceObject.__)('H4'),
[68281] Fix | Delete
h5: (0,external_wp_i18n_namespaceObject.__)('H5'),
[68282] Fix | Delete
h6: (0,external_wp_i18n_namespaceObject.__)('H6'),
[68283] Fix | Delete
'settings.color': (0,external_wp_i18n_namespaceObject.__)('Color'),
[68284] Fix | Delete
'settings.typography': (0,external_wp_i18n_namespaceObject.__)('Typography'),
[68285] Fix | Delete
'styles.color': (0,external_wp_i18n_namespaceObject.__)('Colors'),
[68286] Fix | Delete
'styles.spacing': (0,external_wp_i18n_namespaceObject.__)('Spacing'),
[68287] Fix | Delete
'styles.background': (0,external_wp_i18n_namespaceObject.__)('Background'),
[68288] Fix | Delete
'styles.typography': (0,external_wp_i18n_namespaceObject.__)('Typography')
[68289] Fix | Delete
};
[68290] Fix | Delete
const getBlockNames = memize(() => (0,external_wp_blocks_namespaceObject.getBlockTypes)().reduce((accumulator, {
[68291] Fix | Delete
name,
[68292] Fix | Delete
title
[68293] Fix | Delete
}) => {
[68294] Fix | Delete
accumulator[name] = title;
[68295] Fix | Delete
return accumulator;
[68296] Fix | Delete
}, {}));
[68297] Fix | Delete
const isObject = obj => obj !== null && typeof obj === 'object';
[68298] Fix | Delete
[68299] Fix | Delete
/**
[68300] Fix | Delete
* Get the translation for a given global styles key.
[68301] Fix | Delete
* @param {string} key A key representing a path to a global style property or setting.
[68302] Fix | Delete
* @return {string|undefined} A translated key or undefined if no translation exists.
[68303] Fix | Delete
*/
[68304] Fix | Delete
function getTranslation(key) {
[68305] Fix | Delete
if (translationMap[key]) {
[68306] Fix | Delete
return translationMap[key];
[68307] Fix | Delete
}
[68308] Fix | Delete
const keyArray = key.split('.');
[68309] Fix | Delete
if (keyArray?.[0] === 'blocks') {
[68310] Fix | Delete
const blockName = getBlockNames()?.[keyArray[1]];
[68311] Fix | Delete
return blockName || keyArray[1];
[68312] Fix | Delete
}
[68313] Fix | Delete
if (keyArray?.[0] === 'elements') {
[68314] Fix | Delete
return translationMap[keyArray[1]] || keyArray[1];
[68315] Fix | Delete
}
[68316] Fix | Delete
return undefined;
[68317] Fix | Delete
}
[68318] Fix | Delete
[68319] Fix | Delete
/**
[68320] Fix | Delete
* A deep comparison of two objects, optimized for comparing global styles.
[68321] Fix | Delete
* @param {Object} changedObject The changed object to compare.
[68322] Fix | Delete
* @param {Object} originalObject The original object to compare against.
[68323] Fix | Delete
* @param {string} parentPath A key/value pair object of block names and their rendered titles.
[68324] Fix | Delete
* @return {string[]} An array of paths whose values have changed.
[68325] Fix | Delete
*/
[68326] Fix | Delete
function deepCompare(changedObject, originalObject, parentPath = '') {
[68327] Fix | Delete
// We have two non-object values to compare.
[68328] Fix | Delete
if (!isObject(changedObject) && !isObject(originalObject)) {
[68329] Fix | Delete
/*
[68330] Fix | Delete
* Only return a path if the value has changed.
[68331] Fix | Delete
* And then only the path name up to 2 levels deep.
[68332] Fix | Delete
*/
[68333] Fix | Delete
return changedObject !== originalObject ? parentPath.split('.').slice(0, 2).join('.') : undefined;
[68334] Fix | Delete
}
[68335] Fix | Delete
[68336] Fix | Delete
// Enable comparison when an object doesn't have a corresponding property to compare.
[68337] Fix | Delete
changedObject = isObject(changedObject) ? changedObject : {};
[68338] Fix | Delete
originalObject = isObject(originalObject) ? originalObject : {};
[68339] Fix | Delete
const allKeys = new Set([...Object.keys(changedObject), ...Object.keys(originalObject)]);
[68340] Fix | Delete
let diffs = [];
[68341] Fix | Delete
for (const key of allKeys) {
[68342] Fix | Delete
const path = parentPath ? parentPath + '.' + key : key;
[68343] Fix | Delete
const changedPath = deepCompare(changedObject[key], originalObject[key], path);
[68344] Fix | Delete
if (changedPath) {
[68345] Fix | Delete
diffs = diffs.concat(changedPath);
[68346] Fix | Delete
}
[68347] Fix | Delete
}
[68348] Fix | Delete
return diffs;
[68349] Fix | Delete
}
[68350] Fix | Delete
[68351] Fix | Delete
/**
[68352] Fix | Delete
* Returns an array of translated summarized global styles changes.
[68353] Fix | Delete
* Results are cached using a Map() key of `JSON.stringify( { next, previous } )`.
[68354] Fix | Delete
*
[68355] Fix | Delete
* @param {Object} next The changed object to compare.
[68356] Fix | Delete
* @param {Object} previous The original object to compare against.
[68357] Fix | Delete
* @return {Array[]} A 2-dimensional array of tuples: [ "group", "translated change" ].
[68358] Fix | Delete
*/
[68359] Fix | Delete
function getGlobalStylesChangelist(next, previous) {
[68360] Fix | Delete
const cacheKey = JSON.stringify({
[68361] Fix | Delete
next,
[68362] Fix | Delete
previous
[68363] Fix | Delete
});
[68364] Fix | Delete
if (globalStylesChangesCache.has(cacheKey)) {
[68365] Fix | Delete
return globalStylesChangesCache.get(cacheKey);
[68366] Fix | Delete
}
[68367] Fix | Delete
[68368] Fix | Delete
/*
[68369] Fix | Delete
* Compare the two changesets with normalized keys.
[68370] Fix | Delete
* The order of these keys determines the order in which
[68371] Fix | Delete
* they'll appear in the results.
[68372] Fix | Delete
*/
[68373] Fix | Delete
const changedValueTree = deepCompare({
[68374] Fix | Delete
styles: {
[68375] Fix | Delete
background: next?.styles?.background,
[68376] Fix | Delete
color: next?.styles?.color,
[68377] Fix | Delete
typography: next?.styles?.typography,
[68378] Fix | Delete
spacing: next?.styles?.spacing
[68379] Fix | Delete
},
[68380] Fix | Delete
blocks: next?.styles?.blocks,
[68381] Fix | Delete
elements: next?.styles?.elements,
[68382] Fix | Delete
settings: next?.settings
[68383] Fix | Delete
}, {
[68384] Fix | Delete
styles: {
[68385] Fix | Delete
background: previous?.styles?.background,
[68386] Fix | Delete
color: previous?.styles?.color,
[68387] Fix | Delete
typography: previous?.styles?.typography,
[68388] Fix | Delete
spacing: previous?.styles?.spacing
[68389] Fix | Delete
},
[68390] Fix | Delete
blocks: previous?.styles?.blocks,
[68391] Fix | Delete
elements: previous?.styles?.elements,
[68392] Fix | Delete
settings: previous?.settings
[68393] Fix | Delete
});
[68394] Fix | Delete
if (!changedValueTree.length) {
[68395] Fix | Delete
globalStylesChangesCache.set(cacheKey, get_global_styles_changes_EMPTY_ARRAY);
[68396] Fix | Delete
return get_global_styles_changes_EMPTY_ARRAY;
[68397] Fix | Delete
}
[68398] Fix | Delete
[68399] Fix | Delete
// Remove duplicate results.
[68400] Fix | Delete
const result = [...new Set(changedValueTree)]
[68401] Fix | Delete
/*
[68402] Fix | Delete
* Translate the keys.
[68403] Fix | Delete
* Remove empty translations.
[68404] Fix | Delete
*/.reduce((acc, curr) => {
[68405] Fix | Delete
const translation = getTranslation(curr);
[68406] Fix | Delete
if (translation) {
[68407] Fix | Delete
acc.push([curr.split('.')[0], translation]);
[68408] Fix | Delete
}
[68409] Fix | Delete
return acc;
[68410] Fix | Delete
}, []);
[68411] Fix | Delete
globalStylesChangesCache.set(cacheKey, result);
[68412] Fix | Delete
return result;
[68413] Fix | Delete
}
[68414] Fix | Delete
[68415] Fix | Delete
/**
[68416] Fix | Delete
* From a getGlobalStylesChangelist() result, returns an array of translated global styles changes, grouped by type.
[68417] Fix | Delete
* The types are 'blocks', 'elements', 'settings', and 'styles'.
[68418] Fix | Delete
*
[68419] Fix | Delete
* @param {Object} next The changed object to compare.
[68420] Fix | Delete
* @param {Object} previous The original object to compare against.
[68421] Fix | Delete
* @param {{maxResults:number}} options Options. maxResults: results to return before truncating.
[68422] Fix | Delete
* @return {string[]} An array of translated changes.
[68423] Fix | Delete
*/
[68424] Fix | Delete
function getGlobalStylesChanges(next, previous, options = {}) {
[68425] Fix | Delete
let changeList = getGlobalStylesChangelist(next, previous);
[68426] Fix | Delete
const changesLength = changeList.length;
[68427] Fix | Delete
const {
[68428] Fix | Delete
maxResults
[68429] Fix | Delete
} = options;
[68430] Fix | Delete
if (changesLength) {
[68431] Fix | Delete
// Truncate to `n` results if necessary.
[68432] Fix | Delete
if (!!maxResults && changesLength > maxResults) {
[68433] Fix | Delete
changeList = changeList.slice(0, maxResults);
[68434] Fix | Delete
}
[68435] Fix | Delete
return Object.entries(changeList.reduce((acc, curr) => {
[68436] Fix | Delete
const group = acc[curr[0]] || [];
[68437] Fix | Delete
if (!group.includes(curr[1])) {
[68438] Fix | Delete
acc[curr[0]] = [...group, curr[1]];
[68439] Fix | Delete
}
[68440] Fix | Delete
return acc;
[68441] Fix | Delete
}, {})).map(([key, changeValues]) => {
[68442] Fix | Delete
const changeValuesLength = changeValues.length;
[68443] Fix | Delete
const joinedChangesValue = changeValues.join((0,external_wp_i18n_namespaceObject.__)(', '));
[68444] Fix | Delete
switch (key) {
[68445] Fix | Delete
case 'blocks':
[68446] Fix | Delete
{
[68447] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[68448] Fix | Delete
// translators: %s: a list of block names separated by a comma.
[68449] Fix | Delete
(0,external_wp_i18n_namespaceObject._n)('%s block.', '%s blocks.', changeValuesLength), joinedChangesValue);
[68450] Fix | Delete
}
[68451] Fix | Delete
case 'elements':
[68452] Fix | Delete
{
[68453] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[68454] Fix | Delete
// translators: %s: a list of element names separated by a comma.
[68455] Fix | Delete
(0,external_wp_i18n_namespaceObject._n)('%s element.', '%s elements.', changeValuesLength), joinedChangesValue);
[68456] Fix | Delete
}
[68457] Fix | Delete
case 'settings':
[68458] Fix | Delete
{
[68459] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[68460] Fix | Delete
// translators: %s: a list of theme.json setting labels separated by a comma.
[68461] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('%s settings.'), joinedChangesValue);
[68462] Fix | Delete
}
[68463] Fix | Delete
case 'styles':
[68464] Fix | Delete
{
[68465] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[68466] Fix | Delete
// translators: %s: a list of theme.json top-level styles labels separated by a comma.
[68467] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('%s styles.'), joinedChangesValue);
[68468] Fix | Delete
}
[68469] Fix | Delete
default:
[68470] Fix | Delete
{
[68471] Fix | Delete
return (0,external_wp_i18n_namespaceObject.sprintf)(
[68472] Fix | Delete
// translators: %s: a list of global styles changes separated by a comma.
[68473] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('%s.'), joinedChangesValue);
[68474] Fix | Delete
}
[68475] Fix | Delete
}
[68476] Fix | Delete
});
[68477] Fix | Delete
}
[68478] Fix | Delete
return get_global_styles_changes_EMPTY_ARRAY;
[68479] Fix | Delete
}
[68480] Fix | Delete
[68481] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/global-styles/index.js
[68482] Fix | Delete
[68483] Fix | Delete
[68484] Fix | Delete
[68485] Fix | Delete
[68486] Fix | Delete
[68487] Fix | Delete
[68488] Fix | Delete
[68489] Fix | Delete
[68490] Fix | Delete
[68491] Fix | Delete
[68492] Fix | Delete
[68493] Fix | Delete
[68494] Fix | Delete
[68495] Fix | Delete
[68496] Fix | Delete
[68497] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/get-rich-text-values.js
[68498] Fix | Delete
/**
[68499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function