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: customize-widgets.js
*/
[1000] Fix | Delete
[1001] Fix | Delete
[1002] Fix | Delete
[1003] Fix | Delete
[1004] Fix | Delete
[1005] Fix | Delete
function Header({
[1006] Fix | Delete
sidebar,
[1007] Fix | Delete
inserter,
[1008] Fix | Delete
isInserterOpened,
[1009] Fix | Delete
setIsInserterOpened,
[1010] Fix | Delete
isFixedToolbarActive
[1011] Fix | Delete
}) {
[1012] Fix | Delete
const [[hasUndo, hasRedo], setUndoRedo] = (0,external_wp_element_namespaceObject.useState)([sidebar.hasUndo(), sidebar.hasRedo()]);
[1013] Fix | Delete
const shortcut = (0,external_wp_keycodes_namespaceObject.isAppleOS)() ? external_wp_keycodes_namespaceObject.displayShortcut.primaryShift('z') : external_wp_keycodes_namespaceObject.displayShortcut.primary('y');
[1014] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1015] Fix | Delete
return sidebar.subscribeHistory(() => {
[1016] Fix | Delete
setUndoRedo([sidebar.hasUndo(), sidebar.hasRedo()]);
[1017] Fix | Delete
});
[1018] Fix | Delete
}, [sidebar]);
[1019] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[1020] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[1021] Fix | Delete
className: dist_clsx('customize-widgets-header', {
[1022] Fix | Delete
'is-fixed-toolbar-active': isFixedToolbarActive
[1023] Fix | Delete
}),
[1024] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_blockEditor_namespaceObject.NavigableToolbar, {
[1025] Fix | Delete
className: "customize-widgets-header-toolbar",
[1026] Fix | Delete
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Document tools'),
[1027] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
[1028] Fix | Delete
icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_undo : library_redo
[1029] Fix | Delete
/* translators: button label text should, if possible, be under 16 characters. */,
[1030] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Undo'),
[1031] Fix | Delete
shortcut: external_wp_keycodes_namespaceObject.displayShortcut.primary('z')
[1032] Fix | Delete
// If there are no undo levels we don't want to actually disable this
[1033] Fix | Delete
// button, because it will remove focus for keyboard users.
[1034] Fix | Delete
// See: https://github.com/WordPress/gutenberg/issues/3486
[1035] Fix | Delete
,
[1036] Fix | Delete
"aria-disabled": !hasUndo,
[1037] Fix | Delete
onClick: sidebar.undo,
[1038] Fix | Delete
className: "customize-widgets-editor-history-button undo-button"
[1039] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
[1040] Fix | Delete
icon: !(0,external_wp_i18n_namespaceObject.isRTL)() ? library_redo : library_undo
[1041] Fix | Delete
/* translators: button label text should, if possible, be under 16 characters. */,
[1042] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Redo'),
[1043] Fix | Delete
shortcut: shortcut
[1044] Fix | Delete
// If there are no undo levels we don't want to actually disable this
[1045] Fix | Delete
// button, because it will remove focus for keyboard users.
[1046] Fix | Delete
// See: https://github.com/WordPress/gutenberg/issues/3486
[1047] Fix | Delete
,
[1048] Fix | Delete
"aria-disabled": !hasRedo,
[1049] Fix | Delete
onClick: sidebar.redo,
[1050] Fix | Delete
className: "customize-widgets-editor-history-button redo-button"
[1051] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
[1052] Fix | Delete
className: "customize-widgets-header-toolbar__inserter-toggle",
[1053] Fix | Delete
isPressed: isInserterOpened,
[1054] Fix | Delete
variant: "primary",
[1055] Fix | Delete
icon: library_plus,
[1056] Fix | Delete
label: (0,external_wp_i18n_namespaceObject._x)('Add block', 'Generic label for block inserter button'),
[1057] Fix | Delete
onClick: () => {
[1058] Fix | Delete
setIsInserterOpened(isOpen => !isOpen);
[1059] Fix | Delete
}
[1060] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(MoreMenu, {})]
[1061] Fix | Delete
})
[1062] Fix | Delete
}), (0,external_wp_element_namespaceObject.createPortal)( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(components_inserter, {
[1063] Fix | Delete
setIsOpened: setIsInserterOpened
[1064] Fix | Delete
}), inserter.contentContainer[0])]
[1065] Fix | Delete
});
[1066] Fix | Delete
}
[1067] Fix | Delete
/* harmony default export */ const header = (Header);
[1068] Fix | Delete
[1069] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/inserter/use-inserter.js
[1070] Fix | Delete
/**
[1071] Fix | Delete
* WordPress dependencies
[1072] Fix | Delete
*/
[1073] Fix | Delete
[1074] Fix | Delete
[1075] Fix | Delete
[1076] Fix | Delete
/**
[1077] Fix | Delete
* Internal dependencies
[1078] Fix | Delete
*/
[1079] Fix | Delete
[1080] Fix | Delete
function useInserter(inserter) {
[1081] Fix | Delete
const isInserterOpened = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).isInserterOpened(), []);
[1082] Fix | Delete
const {
[1083] Fix | Delete
setIsInserterOpened
[1084] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[1085] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1086] Fix | Delete
if (isInserterOpened) {
[1087] Fix | Delete
inserter.open();
[1088] Fix | Delete
} else {
[1089] Fix | Delete
inserter.close();
[1090] Fix | Delete
}
[1091] Fix | Delete
}, [inserter, isInserterOpened]);
[1092] Fix | Delete
return [isInserterOpened, (0,external_wp_element_namespaceObject.useCallback)(updater => {
[1093] Fix | Delete
let isOpen = updater;
[1094] Fix | Delete
if (typeof updater === 'function') {
[1095] Fix | Delete
isOpen = updater((0,external_wp_data_namespaceObject.select)(store).isInserterOpened());
[1096] Fix | Delete
}
[1097] Fix | Delete
setIsInserterOpened(isOpen);
[1098] Fix | Delete
}, [setIsInserterOpened])];
[1099] Fix | Delete
}
[1100] Fix | Delete
[1101] Fix | Delete
// EXTERNAL MODULE: ./node_modules/fast-deep-equal/es6/index.js
[1102] Fix | Delete
var es6 = __webpack_require__(7734);
[1103] Fix | Delete
var es6_default = /*#__PURE__*/__webpack_require__.n(es6);
[1104] Fix | Delete
;// CONCATENATED MODULE: external ["wp","isShallowEqual"]
[1105] Fix | Delete
const external_wp_isShallowEqual_namespaceObject = window["wp"]["isShallowEqual"];
[1106] Fix | Delete
var external_wp_isShallowEqual_default = /*#__PURE__*/__webpack_require__.n(external_wp_isShallowEqual_namespaceObject);
[1107] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/utils.js
[1108] Fix | Delete
// @ts-check
[1109] Fix | Delete
/**
[1110] Fix | Delete
* WordPress dependencies
[1111] Fix | Delete
*/
[1112] Fix | Delete
[1113] Fix | Delete
[1114] Fix | Delete
[1115] Fix | Delete
/**
[1116] Fix | Delete
* Convert settingId to widgetId.
[1117] Fix | Delete
*
[1118] Fix | Delete
* @param {string} settingId The setting id.
[1119] Fix | Delete
* @return {string} The widget id.
[1120] Fix | Delete
*/
[1121] Fix | Delete
function settingIdToWidgetId(settingId) {
[1122] Fix | Delete
const matches = settingId.match(/^widget_(.+)(?:\[(\d+)\])$/);
[1123] Fix | Delete
if (matches) {
[1124] Fix | Delete
const idBase = matches[1];
[1125] Fix | Delete
const number = parseInt(matches[2], 10);
[1126] Fix | Delete
return `${idBase}-${number}`;
[1127] Fix | Delete
}
[1128] Fix | Delete
return settingId;
[1129] Fix | Delete
}
[1130] Fix | Delete
[1131] Fix | Delete
/**
[1132] Fix | Delete
* Transform a block to a customizable widget.
[1133] Fix | Delete
*
[1134] Fix | Delete
* @param {WPBlock} block The block to be transformed from.
[1135] Fix | Delete
* @param {Object} existingWidget The widget to be extended from.
[1136] Fix | Delete
* @return {Object} The transformed widget.
[1137] Fix | Delete
*/
[1138] Fix | Delete
function blockToWidget(block, existingWidget = null) {
[1139] Fix | Delete
let widget;
[1140] Fix | Delete
const isValidLegacyWidgetBlock = block.name === 'core/legacy-widget' && (block.attributes.id || block.attributes.instance);
[1141] Fix | Delete
if (isValidLegacyWidgetBlock) {
[1142] Fix | Delete
if (block.attributes.id) {
[1143] Fix | Delete
// Widget that does not extend WP_Widget.
[1144] Fix | Delete
widget = {
[1145] Fix | Delete
id: block.attributes.id
[1146] Fix | Delete
};
[1147] Fix | Delete
} else {
[1148] Fix | Delete
const {
[1149] Fix | Delete
encoded,
[1150] Fix | Delete
hash,
[1151] Fix | Delete
raw,
[1152] Fix | Delete
...rest
[1153] Fix | Delete
} = block.attributes.instance;
[1154] Fix | Delete
[1155] Fix | Delete
// Widget that extends WP_Widget.
[1156] Fix | Delete
widget = {
[1157] Fix | Delete
idBase: block.attributes.idBase,
[1158] Fix | Delete
instance: {
[1159] Fix | Delete
...existingWidget?.instance,
[1160] Fix | Delete
// Required only for the customizer.
[1161] Fix | Delete
is_widget_customizer_js_value: true,
[1162] Fix | Delete
encoded_serialized_instance: encoded,
[1163] Fix | Delete
instance_hash_key: hash,
[1164] Fix | Delete
raw_instance: raw,
[1165] Fix | Delete
...rest
[1166] Fix | Delete
}
[1167] Fix | Delete
};
[1168] Fix | Delete
}
[1169] Fix | Delete
} else {
[1170] Fix | Delete
const instance = {
[1171] Fix | Delete
content: (0,external_wp_blocks_namespaceObject.serialize)(block)
[1172] Fix | Delete
};
[1173] Fix | Delete
widget = {
[1174] Fix | Delete
idBase: 'block',
[1175] Fix | Delete
widgetClass: 'WP_Widget_Block',
[1176] Fix | Delete
instance: {
[1177] Fix | Delete
raw_instance: instance
[1178] Fix | Delete
}
[1179] Fix | Delete
};
[1180] Fix | Delete
}
[1181] Fix | Delete
const {
[1182] Fix | Delete
form,
[1183] Fix | Delete
rendered,
[1184] Fix | Delete
...restExistingWidget
[1185] Fix | Delete
} = existingWidget || {};
[1186] Fix | Delete
return {
[1187] Fix | Delete
...restExistingWidget,
[1188] Fix | Delete
...widget
[1189] Fix | Delete
};
[1190] Fix | Delete
}
[1191] Fix | Delete
[1192] Fix | Delete
/**
[1193] Fix | Delete
* Transform a widget to a block.
[1194] Fix | Delete
*
[1195] Fix | Delete
* @param {Object} widget The widget to be transformed from.
[1196] Fix | Delete
* @param {string} widget.id The widget id.
[1197] Fix | Delete
* @param {string} widget.idBase The id base of the widget.
[1198] Fix | Delete
* @param {number} widget.number The number/index of the widget.
[1199] Fix | Delete
* @param {Object} widget.instance The instance of the widget.
[1200] Fix | Delete
* @return {WPBlock} The transformed block.
[1201] Fix | Delete
*/
[1202] Fix | Delete
function widgetToBlock({
[1203] Fix | Delete
id,
[1204] Fix | Delete
idBase,
[1205] Fix | Delete
number,
[1206] Fix | Delete
instance
[1207] Fix | Delete
}) {
[1208] Fix | Delete
let block;
[1209] Fix | Delete
const {
[1210] Fix | Delete
encoded_serialized_instance: encoded,
[1211] Fix | Delete
instance_hash_key: hash,
[1212] Fix | Delete
raw_instance: raw,
[1213] Fix | Delete
...rest
[1214] Fix | Delete
} = instance;
[1215] Fix | Delete
if (idBase === 'block') {
[1216] Fix | Delete
var _raw$content;
[1217] Fix | Delete
const parsedBlocks = (0,external_wp_blocks_namespaceObject.parse)((_raw$content = raw.content) !== null && _raw$content !== void 0 ? _raw$content : '', {
[1218] Fix | Delete
__unstableSkipAutop: true
[1219] Fix | Delete
});
[1220] Fix | Delete
block = parsedBlocks.length ? parsedBlocks[0] : (0,external_wp_blocks_namespaceObject.createBlock)('core/paragraph', {});
[1221] Fix | Delete
} else if (number) {
[1222] Fix | Delete
// Widget that extends WP_Widget.
[1223] Fix | Delete
block = (0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', {
[1224] Fix | Delete
idBase,
[1225] Fix | Delete
instance: {
[1226] Fix | Delete
encoded,
[1227] Fix | Delete
hash,
[1228] Fix | Delete
raw,
[1229] Fix | Delete
...rest
[1230] Fix | Delete
}
[1231] Fix | Delete
});
[1232] Fix | Delete
} else {
[1233] Fix | Delete
// Widget that does not extend WP_Widget.
[1234] Fix | Delete
block = (0,external_wp_blocks_namespaceObject.createBlock)('core/legacy-widget', {
[1235] Fix | Delete
id
[1236] Fix | Delete
});
[1237] Fix | Delete
}
[1238] Fix | Delete
return (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(block, id);
[1239] Fix | Delete
}
[1240] Fix | Delete
[1241] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/use-sidebar-block-editor.js
[1242] Fix | Delete
/**
[1243] Fix | Delete
* External dependencies
[1244] Fix | Delete
*/
[1245] Fix | Delete
[1246] Fix | Delete
[1247] Fix | Delete
/**
[1248] Fix | Delete
* WordPress dependencies
[1249] Fix | Delete
*/
[1250] Fix | Delete
[1251] Fix | Delete
[1252] Fix | Delete
[1253] Fix | Delete
[1254] Fix | Delete
/**
[1255] Fix | Delete
* Internal dependencies
[1256] Fix | Delete
*/
[1257] Fix | Delete
[1258] Fix | Delete
function widgetsToBlocks(widgets) {
[1259] Fix | Delete
return widgets.map(widget => widgetToBlock(widget));
[1260] Fix | Delete
}
[1261] Fix | Delete
function useSidebarBlockEditor(sidebar) {
[1262] Fix | Delete
const [blocks, setBlocks] = (0,external_wp_element_namespaceObject.useState)(() => widgetsToBlocks(sidebar.getWidgets()));
[1263] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1264] Fix | Delete
return sidebar.subscribe((prevWidgets, nextWidgets) => {
[1265] Fix | Delete
setBlocks(prevBlocks => {
[1266] Fix | Delete
const prevWidgetsMap = new Map(prevWidgets.map(widget => [widget.id, widget]));
[1267] Fix | Delete
const prevBlocksMap = new Map(prevBlocks.map(block => [(0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block), block]));
[1268] Fix | Delete
const nextBlocks = nextWidgets.map(nextWidget => {
[1269] Fix | Delete
const prevWidget = prevWidgetsMap.get(nextWidget.id);
[1270] Fix | Delete
[1271] Fix | Delete
// Bail out updates.
[1272] Fix | Delete
if (prevWidget && prevWidget === nextWidget) {
[1273] Fix | Delete
return prevBlocksMap.get(nextWidget.id);
[1274] Fix | Delete
}
[1275] Fix | Delete
return widgetToBlock(nextWidget);
[1276] Fix | Delete
});
[1277] Fix | Delete
[1278] Fix | Delete
// Bail out updates.
[1279] Fix | Delete
if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) {
[1280] Fix | Delete
return prevBlocks;
[1281] Fix | Delete
}
[1282] Fix | Delete
return nextBlocks;
[1283] Fix | Delete
});
[1284] Fix | Delete
});
[1285] Fix | Delete
}, [sidebar]);
[1286] Fix | Delete
const onChangeBlocks = (0,external_wp_element_namespaceObject.useCallback)(nextBlocks => {
[1287] Fix | Delete
setBlocks(prevBlocks => {
[1288] Fix | Delete
if (external_wp_isShallowEqual_default()(prevBlocks, nextBlocks)) {
[1289] Fix | Delete
return prevBlocks;
[1290] Fix | Delete
}
[1291] Fix | Delete
const prevBlocksMap = new Map(prevBlocks.map(block => [(0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block), block]));
[1292] Fix | Delete
const nextWidgets = nextBlocks.map(nextBlock => {
[1293] Fix | Delete
const widgetId = (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(nextBlock);
[1294] Fix | Delete
[1295] Fix | Delete
// Update existing widgets.
[1296] Fix | Delete
if (widgetId && prevBlocksMap.has(widgetId)) {
[1297] Fix | Delete
const prevBlock = prevBlocksMap.get(widgetId);
[1298] Fix | Delete
const prevWidget = sidebar.getWidget(widgetId);
[1299] Fix | Delete
[1300] Fix | Delete
// Bail out updates by returning the previous widgets.
[1301] Fix | Delete
// Deep equality is necessary until the block editor's internals changes.
[1302] Fix | Delete
if (es6_default()(nextBlock, prevBlock) && prevWidget) {
[1303] Fix | Delete
return prevWidget;
[1304] Fix | Delete
}
[1305] Fix | Delete
return blockToWidget(nextBlock, prevWidget);
[1306] Fix | Delete
}
[1307] Fix | Delete
[1308] Fix | Delete
// Add a new widget.
[1309] Fix | Delete
return blockToWidget(nextBlock);
[1310] Fix | Delete
});
[1311] Fix | Delete
[1312] Fix | Delete
// Bail out updates if the updated widgets are the same.
[1313] Fix | Delete
if (external_wp_isShallowEqual_default()(sidebar.getWidgets(), nextWidgets)) {
[1314] Fix | Delete
return prevBlocks;
[1315] Fix | Delete
}
[1316] Fix | Delete
const addedWidgetIds = sidebar.setWidgets(nextWidgets);
[1317] Fix | Delete
return nextBlocks.reduce((updatedNextBlocks, nextBlock, index) => {
[1318] Fix | Delete
const addedWidgetId = addedWidgetIds[index];
[1319] Fix | Delete
if (addedWidgetId !== null) {
[1320] Fix | Delete
// Only create a new instance if necessary to prevent
[1321] Fix | Delete
// the whole editor from re-rendering on every edit.
[1322] Fix | Delete
if (updatedNextBlocks === nextBlocks) {
[1323] Fix | Delete
updatedNextBlocks = nextBlocks.slice();
[1324] Fix | Delete
}
[1325] Fix | Delete
updatedNextBlocks[index] = (0,external_wp_widgets_namespaceObject.addWidgetIdToBlock)(nextBlock, addedWidgetId);
[1326] Fix | Delete
}
[1327] Fix | Delete
return updatedNextBlocks;
[1328] Fix | Delete
}, nextBlocks);
[1329] Fix | Delete
});
[1330] Fix | Delete
}, [sidebar]);
[1331] Fix | Delete
return [blocks, onChangeBlocks, onChangeBlocks];
[1332] Fix | Delete
}
[1333] Fix | Delete
[1334] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/index.js
[1335] Fix | Delete
/**
[1336] Fix | Delete
* WordPress dependencies
[1337] Fix | Delete
*/
[1338] Fix | Delete
[1339] Fix | Delete
[1340] Fix | Delete
/**
[1341] Fix | Delete
* Internal dependencies
[1342] Fix | Delete
*/
[1343] Fix | Delete
[1344] Fix | Delete
[1345] Fix | Delete
const FocusControlContext = (0,external_wp_element_namespaceObject.createContext)();
[1346] Fix | Delete
function FocusControl({
[1347] Fix | Delete
api,
[1348] Fix | Delete
sidebarControls,
[1349] Fix | Delete
children
[1350] Fix | Delete
}) {
[1351] Fix | Delete
const [focusedWidgetIdRef, setFocusedWidgetIdRef] = (0,external_wp_element_namespaceObject.useState)({
[1352] Fix | Delete
current: null
[1353] Fix | Delete
});
[1354] Fix | Delete
const focusWidget = (0,external_wp_element_namespaceObject.useCallback)(widgetId => {
[1355] Fix | Delete
for (const sidebarControl of sidebarControls) {
[1356] Fix | Delete
const widgets = sidebarControl.setting.get();
[1357] Fix | Delete
if (widgets.includes(widgetId)) {
[1358] Fix | Delete
sidebarControl.sectionInstance.expand({
[1359] Fix | Delete
// Schedule it after the complete callback so that
[1360] Fix | Delete
// it won't be overridden by the "Back" button focus.
[1361] Fix | Delete
completeCallback() {
[1362] Fix | Delete
// Create a "ref-like" object every time to ensure
[1363] Fix | Delete
// the same widget id can also triggers the focus control.
[1364] Fix | Delete
setFocusedWidgetIdRef({
[1365] Fix | Delete
current: widgetId
[1366] Fix | Delete
});
[1367] Fix | Delete
}
[1368] Fix | Delete
});
[1369] Fix | Delete
break;
[1370] Fix | Delete
}
[1371] Fix | Delete
}
[1372] Fix | Delete
}, [sidebarControls]);
[1373] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1374] Fix | Delete
function handleFocus(settingId) {
[1375] Fix | Delete
const widgetId = settingIdToWidgetId(settingId);
[1376] Fix | Delete
focusWidget(widgetId);
[1377] Fix | Delete
}
[1378] Fix | Delete
let previewBound = false;
[1379] Fix | Delete
function handleReady() {
[1380] Fix | Delete
api.previewer.preview.bind('focus-control-for-setting', handleFocus);
[1381] Fix | Delete
previewBound = true;
[1382] Fix | Delete
}
[1383] Fix | Delete
api.previewer.bind('ready', handleReady);
[1384] Fix | Delete
return () => {
[1385] Fix | Delete
api.previewer.unbind('ready', handleReady);
[1386] Fix | Delete
if (previewBound) {
[1387] Fix | Delete
api.previewer.preview.unbind('focus-control-for-setting', handleFocus);
[1388] Fix | Delete
}
[1389] Fix | Delete
};
[1390] Fix | Delete
}, [api, focusWidget]);
[1391] Fix | Delete
const context = (0,external_wp_element_namespaceObject.useMemo)(() => [focusedWidgetIdRef, focusWidget], [focusedWidgetIdRef, focusWidget]);
[1392] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(FocusControlContext.Provider, {
[1393] Fix | Delete
value: context,
[1394] Fix | Delete
children: children
[1395] Fix | Delete
});
[1396] Fix | Delete
}
[1397] Fix | Delete
const useFocusControl = () => (0,external_wp_element_namespaceObject.useContext)(FocusControlContext);
[1398] Fix | Delete
[1399] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/focus-control/use-blocks-focus-control.js
[1400] Fix | Delete
/**
[1401] Fix | Delete
* WordPress dependencies
[1402] Fix | Delete
*/
[1403] Fix | Delete
[1404] Fix | Delete
[1405] Fix | Delete
[1406] Fix | Delete
[1407] Fix | Delete
[1408] Fix | Delete
/**
[1409] Fix | Delete
* Internal dependencies
[1410] Fix | Delete
*/
[1411] Fix | Delete
[1412] Fix | Delete
function useBlocksFocusControl(blocks) {
[1413] Fix | Delete
const {
[1414] Fix | Delete
selectBlock
[1415] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_blockEditor_namespaceObject.store);
[1416] Fix | Delete
const [focusedWidgetIdRef] = useFocusControl();
[1417] Fix | Delete
const blocksRef = (0,external_wp_element_namespaceObject.useRef)(blocks);
[1418] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1419] Fix | Delete
blocksRef.current = blocks;
[1420] Fix | Delete
}, [blocks]);
[1421] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[1422] Fix | Delete
if (focusedWidgetIdRef.current) {
[1423] Fix | Delete
const focusedBlock = blocksRef.current.find(block => (0,external_wp_widgets_namespaceObject.getWidgetIdFromBlock)(block) === focusedWidgetIdRef.current);
[1424] Fix | Delete
if (focusedBlock) {
[1425] Fix | Delete
selectBlock(focusedBlock.clientId);
[1426] Fix | Delete
// If the block is already being selected, the DOM node won't
[1427] Fix | Delete
// get focused again automatically.
[1428] Fix | Delete
// We select the DOM and focus it manually here.
[1429] Fix | Delete
const blockNode = document.querySelector(`[data-block="${focusedBlock.clientId}"]`);
[1430] Fix | Delete
blockNode?.focus();
[1431] Fix | Delete
}
[1432] Fix | Delete
}
[1433] Fix | Delete
}, [focusedWidgetIdRef, selectBlock]);
[1434] Fix | Delete
}
[1435] Fix | Delete
[1436] Fix | Delete
;// CONCATENATED MODULE: external ["wp","privateApis"]
[1437] Fix | Delete
const external_wp_privateApis_namespaceObject = window["wp"]["privateApis"];
[1438] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/lock-unlock.js
[1439] Fix | Delete
/**
[1440] Fix | Delete
* WordPress dependencies
[1441] Fix | Delete
*/
[1442] Fix | Delete
[1443] Fix | Delete
const {
[1444] Fix | Delete
lock,
[1445] Fix | Delete
unlock
[1446] Fix | Delete
} = (0,external_wp_privateApis_namespaceObject.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.', '@wordpress/customize-widgets');
[1447] Fix | Delete
[1448] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/sidebar-block-editor/sidebar-editor-provider.js
[1449] Fix | Delete
/**
[1450] Fix | Delete
* WordPress dependencies
[1451] Fix | Delete
*/
[1452] Fix | Delete
[1453] Fix | Delete
[1454] Fix | Delete
/**
[1455] Fix | Delete
* Internal dependencies
[1456] Fix | Delete
*/
[1457] Fix | Delete
[1458] Fix | Delete
[1459] Fix | Delete
[1460] Fix | Delete
[1461] Fix | Delete
const {
[1462] Fix | Delete
ExperimentalBlockEditorProvider
[1463] Fix | Delete
} = unlock(external_wp_blockEditor_namespaceObject.privateApis);
[1464] Fix | Delete
function SidebarEditorProvider({
[1465] Fix | Delete
sidebar,
[1466] Fix | Delete
settings,
[1467] Fix | Delete
children
[1468] Fix | Delete
}) {
[1469] Fix | Delete
const [blocks, onInput, onChange] = useSidebarBlockEditor(sidebar);
[1470] Fix | Delete
useBlocksFocusControl(blocks);
[1471] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ExperimentalBlockEditorProvider, {
[1472] Fix | Delete
value: blocks,
[1473] Fix | Delete
onInput: onInput,
[1474] Fix | Delete
onChange: onChange,
[1475] Fix | Delete
settings: settings,
[1476] Fix | Delete
useSubRegistry: false,
[1477] Fix | Delete
children: children
[1478] Fix | Delete
});
[1479] Fix | Delete
}
[1480] Fix | Delete
[1481] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/customize-widgets/build-module/components/welcome-guide/index.js
[1482] Fix | Delete
/**
[1483] Fix | Delete
* WordPress dependencies
[1484] Fix | Delete
*/
[1485] Fix | Delete
[1486] Fix | Delete
[1487] Fix | Delete
[1488] Fix | Delete
[1489] Fix | Delete
[1490] Fix | Delete
[1491] Fix | Delete
function WelcomeGuide({
[1492] Fix | Delete
sidebar
[1493] Fix | Delete
}) {
[1494] Fix | Delete
const {
[1495] Fix | Delete
toggle
[1496] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_preferences_namespaceObject.store);
[1497] Fix | Delete
const isEntirelyBlockWidgets = sidebar.getWidgets().every(widget => widget.id.startsWith('block-'));
[1498] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[1499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function