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
disableCustomColors = !enableCustomColors
[60500] Fix | Delete
} = props;
[60501] Fix | Delete
const hasColorsToChoose = colors && colors.length > 0 || !disableCustomColors;
[60502] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(WrappedComponent, {
[60503] Fix | Delete
...props,
[60504] Fix | Delete
colors,
[60505] Fix | Delete
disableCustomColors,
[60506] Fix | Delete
hasColorsToChoose
[60507] Fix | Delete
});
[60508] Fix | Delete
};
[60509] Fix | Delete
}, 'withColorContext'));
[60510] Fix | Delete
[60511] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-palette/index.js
[60512] Fix | Delete
/**
[60513] Fix | Delete
* WordPress dependencies
[60514] Fix | Delete
*/
[60515] Fix | Delete
[60516] Fix | Delete
[60517] Fix | Delete
/**
[60518] Fix | Delete
* Internal dependencies
[60519] Fix | Delete
*/
[60520] Fix | Delete
[60521] Fix | Delete
/* harmony default export */ const color_palette = (with_color_context(external_wp_components_namespaceObject.ColorPalette));
[60522] Fix | Delete
[60523] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/color-palette/control.js
[60524] Fix | Delete
/**
[60525] Fix | Delete
* Internal dependencies
[60526] Fix | Delete
*/
[60527] Fix | Delete
[60528] Fix | Delete
[60529] Fix | Delete
function ColorPaletteControl({
[60530] Fix | Delete
onChange,
[60531] Fix | Delete
value,
[60532] Fix | Delete
...otherProps
[60533] Fix | Delete
}) {
[60534] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(control, {
[60535] Fix | Delete
...otherProps,
[60536] Fix | Delete
onColorChange: onChange,
[60537] Fix | Delete
colorValue: value,
[60538] Fix | Delete
gradients: [],
[60539] Fix | Delete
disableCustomGradients: true
[60540] Fix | Delete
});
[60541] Fix | Delete
}
[60542] Fix | Delete
[60543] Fix | Delete
;// CONCATENATED MODULE: external ["wp","date"]
[60544] Fix | Delete
const external_wp_date_namespaceObject = window["wp"]["date"];
[60545] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/date-format-picker/index.js
[60546] Fix | Delete
/**
[60547] Fix | Delete
* WordPress dependencies
[60548] Fix | Delete
*/
[60549] Fix | Delete
[60550] Fix | Delete
[60551] Fix | Delete
[60552] Fix | Delete
[60553] Fix | Delete
[60554] Fix | Delete
// So that we can illustrate the different formats in the dropdown properly,
[60555] Fix | Delete
// show a date that has a day greater than 12 and a month with more than three
[60556] Fix | Delete
// letters. Here we're using 2022-01-25 which is when WordPress 5.9 was
[60557] Fix | Delete
// released.
[60558] Fix | Delete
[60559] Fix | Delete
[60560] Fix | Delete
const EXAMPLE_DATE = new Date(2022, 0, 25);
[60561] Fix | Delete
[60562] Fix | Delete
/**
[60563] Fix | Delete
* The `DateFormatPicker` component renders controls that let the user choose a
[60564] Fix | Delete
* _date format_. That is, how they want their dates to be formatted.
[60565] Fix | Delete
*
[60566] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/date-format-picker/README.md
[60567] Fix | Delete
*
[60568] Fix | Delete
* @param {Object} props
[60569] Fix | Delete
* @param {string|null} props.format The selected date
[60570] Fix | Delete
* format. If
[60571] Fix | Delete
* `null`,
[60572] Fix | Delete
* _Default_ is
[60573] Fix | Delete
* selected.
[60574] Fix | Delete
* @param {string} props.defaultFormat The date format that
[60575] Fix | Delete
* will be used if the
[60576] Fix | Delete
* user selects
[60577] Fix | Delete
* 'Default'.
[60578] Fix | Delete
* @param {( format: string|null ) => void} props.onChange Called when a
[60579] Fix | Delete
* selection is
[60580] Fix | Delete
* made. If `null`,
[60581] Fix | Delete
* _Default_ is
[60582] Fix | Delete
* selected.
[60583] Fix | Delete
*/
[60584] Fix | Delete
function DateFormatPicker({
[60585] Fix | Delete
format,
[60586] Fix | Delete
defaultFormat,
[60587] Fix | Delete
onChange
[60588] Fix | Delete
}) {
[60589] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("fieldset", {
[60590] Fix | Delete
className: "block-editor-date-format-picker",
[60591] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.VisuallyHidden, {
[60592] Fix | Delete
as: "legend",
[60593] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Date format')
[60594] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
[60595] Fix | Delete
__nextHasNoMarginBottom: true,
[60596] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Default format'),
[60597] Fix | Delete
help: `${(0,external_wp_i18n_namespaceObject.__)('Example:')} ${(0,external_wp_date_namespaceObject.dateI18n)(defaultFormat, EXAMPLE_DATE)}`,
[60598] Fix | Delete
checked: !format,
[60599] Fix | Delete
onChange: checked => onChange(checked ? null : defaultFormat)
[60600] Fix | Delete
}), format && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(NonDefaultControls, {
[60601] Fix | Delete
format: format,
[60602] Fix | Delete
onChange: onChange
[60603] Fix | Delete
})]
[60604] Fix | Delete
});
[60605] Fix | Delete
}
[60606] Fix | Delete
function NonDefaultControls({
[60607] Fix | Delete
format,
[60608] Fix | Delete
onChange
[60609] Fix | Delete
}) {
[60610] Fix | Delete
var _suggestedOptions$fin;
[60611] Fix | Delete
// Suggest a short format, medium format, long format, and a standardised
[60612] Fix | Delete
// (YYYY-MM-DD) format. The short, medium, and long formats are localised as
[60613] Fix | Delete
// different languages have different ways of writing these. For example, 'F
[60614] Fix | Delete
// j, Y' (April 20, 2022) in American English (en_US) is 'j. F Y' (20. April
[60615] Fix | Delete
// 2022) in German (de). The resultant array is de-duplicated as some
[60616] Fix | Delete
// languages will use the same format string for short, medium, and long
[60617] Fix | Delete
// formats.
[60618] Fix | Delete
const suggestedFormats = [...new Set([/* translators: See https://www.php.net/manual/datetime.format.php */
[60619] Fix | Delete
'Y-m-d', /* translators: See https://www.php.net/manual/datetime.format.php */
[60620] Fix | Delete
(0,external_wp_i18n_namespaceObject._x)('n/j/Y', 'short date format'), /* translators: See https://www.php.net/manual/datetime.format.php */
[60621] Fix | Delete
(0,external_wp_i18n_namespaceObject._x)('n/j/Y g:i A', 'short date format with time'), /* translators: See https://www.php.net/manual/datetime.format.php */
[60622] Fix | Delete
(0,external_wp_i18n_namespaceObject._x)('M j, Y', 'medium date format'), /* translators: See https://www.php.net/manual/datetime.format.php */
[60623] Fix | Delete
(0,external_wp_i18n_namespaceObject._x)('M j, Y g:i A', 'medium date format with time'), /* translators: See https://www.php.net/manual/datetime.format.php */
[60624] Fix | Delete
(0,external_wp_i18n_namespaceObject._x)('F j, Y', 'long date format'), /* translators: See https://www.php.net/manual/datetime.format.php */
[60625] Fix | Delete
(0,external_wp_i18n_namespaceObject._x)('M j', 'short date format without the year')])];
[60626] Fix | Delete
const suggestedOptions = suggestedFormats.map((suggestedFormat, index) => ({
[60627] Fix | Delete
key: `suggested-${index}`,
[60628] Fix | Delete
name: (0,external_wp_date_namespaceObject.dateI18n)(suggestedFormat, EXAMPLE_DATE),
[60629] Fix | Delete
format: suggestedFormat
[60630] Fix | Delete
}));
[60631] Fix | Delete
const customOption = {
[60632] Fix | Delete
key: 'custom',
[60633] Fix | Delete
name: (0,external_wp_i18n_namespaceObject.__)('Custom'),
[60634] Fix | Delete
className: 'block-editor-date-format-picker__custom-format-select-control__custom-option',
[60635] Fix | Delete
__experimentalHint: (0,external_wp_i18n_namespaceObject.__)('Enter your own date format')
[60636] Fix | Delete
};
[60637] Fix | Delete
const [isCustom, setIsCustom] = (0,external_wp_element_namespaceObject.useState)(() => !!format && !suggestedFormats.includes(format));
[60638] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalVStack, {
[60639] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.CustomSelectControl, {
[60640] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Choose a format'),
[60641] Fix | Delete
options: [...suggestedOptions, customOption],
[60642] Fix | Delete
value: isCustom ? customOption : (_suggestedOptions$fin = suggestedOptions.find(option => option.format === format)) !== null && _suggestedOptions$fin !== void 0 ? _suggestedOptions$fin : customOption,
[60643] Fix | Delete
onChange: ({
[60644] Fix | Delete
selectedItem
[60645] Fix | Delete
}) => {
[60646] Fix | Delete
if (selectedItem === customOption) {
[60647] Fix | Delete
setIsCustom(true);
[60648] Fix | Delete
} else {
[60649] Fix | Delete
setIsCustom(false);
[60650] Fix | Delete
onChange(selectedItem.format);
[60651] Fix | Delete
}
[60652] Fix | Delete
}
[60653] Fix | Delete
}), isCustom && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.TextControl, {
[60654] Fix | Delete
__nextHasNoMarginBottom: true,
[60655] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Custom format'),
[60656] Fix | Delete
hideLabelFromVision: true,
[60657] Fix | Delete
help: (0,external_wp_element_namespaceObject.createInterpolateElement)((0,external_wp_i18n_namespaceObject.__)('Enter a date or time <Link>format string</Link>.'), {
[60658] Fix | Delete
Link: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ExternalLink, {
[60659] Fix | Delete
href: (0,external_wp_i18n_namespaceObject.__)('https://wordpress.org/documentation/article/customize-date-and-time-format/')
[60660] Fix | Delete
})
[60661] Fix | Delete
}),
[60662] Fix | Delete
value: format,
[60663] Fix | Delete
onChange: value => onChange(value)
[60664] Fix | Delete
})]
[60665] Fix | Delete
});
[60666] Fix | Delete
}
[60667] Fix | Delete
[60668] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/dropdown.js
[60669] Fix | Delete
/**
[60670] Fix | Delete
* External dependencies
[60671] Fix | Delete
*/
[60672] Fix | Delete
[60673] Fix | Delete
[60674] Fix | Delete
/**
[60675] Fix | Delete
* WordPress dependencies
[60676] Fix | Delete
*/
[60677] Fix | Delete
[60678] Fix | Delete
[60679] Fix | Delete
/**
[60680] Fix | Delete
* Internal dependencies
[60681] Fix | Delete
*/
[60682] Fix | Delete
[60683] Fix | Delete
[60684] Fix | Delete
// When the `ColorGradientSettingsDropdown` controls are being rendered to a
[60685] Fix | Delete
// `ToolsPanel` they must be wrapped in a `ToolsPanelItem`.
[60686] Fix | Delete
[60687] Fix | Delete
[60688] Fix | Delete
[60689] Fix | Delete
const WithToolsPanelItem = ({
[60690] Fix | Delete
setting,
[60691] Fix | Delete
children,
[60692] Fix | Delete
panelId,
[60693] Fix | Delete
...props
[60694] Fix | Delete
}) => {
[60695] Fix | Delete
const clearValue = () => {
[60696] Fix | Delete
if (setting.colorValue) {
[60697] Fix | Delete
setting.onColorChange();
[60698] Fix | Delete
} else if (setting.gradientValue) {
[60699] Fix | Delete
setting.onGradientChange();
[60700] Fix | Delete
}
[60701] Fix | Delete
};
[60702] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalToolsPanelItem, {
[60703] Fix | Delete
hasValue: () => {
[60704] Fix | Delete
return !!setting.colorValue || !!setting.gradientValue;
[60705] Fix | Delete
},
[60706] Fix | Delete
label: setting.label,
[60707] Fix | Delete
onDeselect: clearValue,
[60708] Fix | Delete
isShownByDefault: setting.isShownByDefault !== undefined ? setting.isShownByDefault : true,
[60709] Fix | Delete
...props,
[60710] Fix | Delete
className: "block-editor-tools-panel-color-gradient-settings__item",
[60711] Fix | Delete
panelId: panelId
[60712] Fix | Delete
// Pass resetAllFilter if supplied due to rendering via SlotFill
[60713] Fix | Delete
// into parent ToolsPanel.
[60714] Fix | Delete
,
[60715] Fix | Delete
resetAllFilter: setting.resetAllFilter,
[60716] Fix | Delete
children: children
[60717] Fix | Delete
});
[60718] Fix | Delete
};
[60719] Fix | Delete
const dropdown_LabeledColorIndicator = ({
[60720] Fix | Delete
colorValue,
[60721] Fix | Delete
label
[60722] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalHStack, {
[60723] Fix | Delete
justify: "flex-start",
[60724] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ColorIndicator, {
[60725] Fix | Delete
className: "block-editor-panel-color-gradient-settings__color-indicator",
[60726] Fix | Delete
colorValue: colorValue
[60727] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.FlexItem, {
[60728] Fix | Delete
className: "block-editor-panel-color-gradient-settings__color-name",
[60729] Fix | Delete
title: label,
[60730] Fix | Delete
children: label
[60731] Fix | Delete
})]
[60732] Fix | Delete
});
[60733] Fix | Delete
[60734] Fix | Delete
// Renders a color dropdown's toggle as an `Item` if it is within an `ItemGroup`
[60735] Fix | Delete
// or as a `Button` if it isn't e.g. the controls are being rendered in
[60736] Fix | Delete
// a `ToolsPanel`.
[60737] Fix | Delete
const renderToggle = settings => ({
[60738] Fix | Delete
onToggle,
[60739] Fix | Delete
isOpen
[60740] Fix | Delete
}) => {
[60741] Fix | Delete
const {
[60742] Fix | Delete
colorValue,
[60743] Fix | Delete
label
[60744] Fix | Delete
} = settings;
[60745] Fix | Delete
const toggleProps = {
[60746] Fix | Delete
onClick: onToggle,
[60747] Fix | Delete
className: dist_clsx('block-editor-panel-color-gradient-settings__dropdown', {
[60748] Fix | Delete
'is-open': isOpen
[60749] Fix | Delete
}),
[60750] Fix | Delete
'aria-expanded': isOpen
[60751] Fix | Delete
};
[60752] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[60753] Fix | Delete
...toggleProps,
[60754] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(dropdown_LabeledColorIndicator, {
[60755] Fix | Delete
colorValue: colorValue,
[60756] Fix | Delete
label: label
[60757] Fix | Delete
})
[60758] Fix | Delete
});
[60759] Fix | Delete
};
[60760] Fix | Delete
[60761] Fix | Delete
// Renders a collection of color controls as dropdowns. Depending upon the
[60762] Fix | Delete
// context in which these dropdowns are being rendered, they may be wrapped
[60763] Fix | Delete
// in an `ItemGroup` with each dropdown's toggle as an `Item`, or alternatively,
[60764] Fix | Delete
// the may be individually wrapped in a `ToolsPanelItem` with the toggle as
[60765] Fix | Delete
// a regular `Button`.
[60766] Fix | Delete
//
[60767] Fix | Delete
// For more context see: https://github.com/WordPress/gutenberg/pull/40084
[60768] Fix | Delete
function ColorGradientSettingsDropdown({
[60769] Fix | Delete
colors,
[60770] Fix | Delete
disableCustomColors,
[60771] Fix | Delete
disableCustomGradients,
[60772] Fix | Delete
enableAlpha,
[60773] Fix | Delete
gradients,
[60774] Fix | Delete
settings,
[60775] Fix | Delete
__experimentalIsRenderedInSidebar,
[60776] Fix | Delete
...props
[60777] Fix | Delete
}) {
[60778] Fix | Delete
let popoverProps;
[60779] Fix | Delete
if (__experimentalIsRenderedInSidebar) {
[60780] Fix | Delete
popoverProps = {
[60781] Fix | Delete
placement: 'left-start',
[60782] Fix | Delete
offset: 36,
[60783] Fix | Delete
shift: true
[60784] Fix | Delete
};
[60785] Fix | Delete
}
[60786] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[60787] Fix | Delete
children: settings.map((setting, index) => {
[60788] Fix | Delete
var _setting$gradientValu;
[60789] Fix | Delete
const controlProps = {
[60790] Fix | Delete
clearable: false,
[60791] Fix | Delete
colorValue: setting.colorValue,
[60792] Fix | Delete
colors,
[60793] Fix | Delete
disableCustomColors,
[60794] Fix | Delete
disableCustomGradients,
[60795] Fix | Delete
enableAlpha,
[60796] Fix | Delete
gradientValue: setting.gradientValue,
[60797] Fix | Delete
gradients,
[60798] Fix | Delete
label: setting.label,
[60799] Fix | Delete
onColorChange: setting.onColorChange,
[60800] Fix | Delete
onGradientChange: setting.onGradientChange,
[60801] Fix | Delete
showTitle: false,
[60802] Fix | Delete
__experimentalIsRenderedInSidebar,
[60803] Fix | Delete
...setting
[60804] Fix | Delete
};
[60805] Fix | Delete
const toggleSettings = {
[60806] Fix | Delete
colorValue: (_setting$gradientValu = setting.gradientValue) !== null && _setting$gradientValu !== void 0 ? _setting$gradientValu : setting.colorValue,
[60807] Fix | Delete
label: setting.label
[60808] Fix | Delete
};
[60809] Fix | Delete
return setting &&
[60810] Fix | Delete
/*#__PURE__*/
[60811] Fix | Delete
// If not in an `ItemGroup` wrap the dropdown in a
[60812] Fix | Delete
// `ToolsPanelItem`
[60813] Fix | Delete
(0,external_ReactJSXRuntime_namespaceObject.jsx)(WithToolsPanelItem, {
[60814] Fix | Delete
setting: setting,
[60815] Fix | Delete
...props,
[60816] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
[60817] Fix | Delete
popoverProps: popoverProps,
[60818] Fix | Delete
className: "block-editor-tools-panel-color-gradient-settings__dropdown",
[60819] Fix | Delete
renderToggle: renderToggle(toggleSettings),
[60820] Fix | Delete
renderContent: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalDropdownContentWrapper, {
[60821] Fix | Delete
paddingSize: "none",
[60822] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[60823] Fix | Delete
className: "block-editor-panel-color-gradient-settings__dropdown-content",
[60824] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(control, {
[60825] Fix | Delete
...controlProps
[60826] Fix | Delete
})
[60827] Fix | Delete
})
[60828] Fix | Delete
})
[60829] Fix | Delete
})
[60830] Fix | Delete
}, index);
[60831] Fix | Delete
})
[60832] Fix | Delete
});
[60833] Fix | Delete
}
[60834] Fix | Delete
[60835] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/colors-gradients/panel-color-gradient-settings.js
[60836] Fix | Delete
/**
[60837] Fix | Delete
* External dependencies
[60838] Fix | Delete
*/
[60839] Fix | Delete
[60840] Fix | Delete
[60841] Fix | Delete
/**
[60842] Fix | Delete
* WordPress dependencies
[60843] Fix | Delete
*/
[60844] Fix | Delete
[60845] Fix | Delete
[60846] Fix | Delete
[60847] Fix | Delete
[60848] Fix | Delete
/**
[60849] Fix | Delete
* Internal dependencies
[60850] Fix | Delete
*/
[60851] Fix | Delete
[60852] Fix | Delete
[60853] Fix | Delete
[60854] Fix | Delete
[60855] Fix | Delete
[60856] Fix | Delete
const panel_color_gradient_settings_colorsAndGradientKeys = ['colors', 'disableCustomColors', 'gradients', 'disableCustomGradients'];
[60857] Fix | Delete
const PanelColorGradientSettingsInner = ({
[60858] Fix | Delete
className,
[60859] Fix | Delete
colors,
[60860] Fix | Delete
gradients,
[60861] Fix | Delete
disableCustomColors,
[60862] Fix | Delete
disableCustomGradients,
[60863] Fix | Delete
children,
[60864] Fix | Delete
settings,
[60865] Fix | Delete
title,
[60866] Fix | Delete
showTitle = true,
[60867] Fix | Delete
__experimentalIsRenderedInSidebar,
[60868] Fix | Delete
enableAlpha
[60869] Fix | Delete
}) => {
[60870] Fix | Delete
const panelId = (0,external_wp_compose_namespaceObject.useInstanceId)(PanelColorGradientSettingsInner);
[60871] Fix | Delete
const {
[60872] Fix | Delete
batch
[60873] Fix | Delete
} = (0,external_wp_data_namespaceObject.useRegistry)();
[60874] Fix | Delete
if ((!colors || colors.length === 0) && (!gradients || gradients.length === 0) && disableCustomColors && disableCustomGradients && settings?.every(setting => (!setting.colors || setting.colors.length === 0) && (!setting.gradients || setting.gradients.length === 0) && (setting.disableCustomColors === undefined || setting.disableCustomColors) && (setting.disableCustomGradients === undefined || setting.disableCustomGradients))) {
[60875] Fix | Delete
return null;
[60876] Fix | Delete
}
[60877] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_wp_components_namespaceObject.__experimentalToolsPanel, {
[60878] Fix | Delete
className: dist_clsx('block-editor-panel-color-gradient-settings', className),
[60879] Fix | Delete
label: showTitle ? title : undefined,
[60880] Fix | Delete
resetAll: () => {
[60881] Fix | Delete
batch(() => {
[60882] Fix | Delete
settings.forEach(({
[60883] Fix | Delete
colorValue,
[60884] Fix | Delete
gradientValue,
[60885] Fix | Delete
onColorChange,
[60886] Fix | Delete
onGradientChange
[60887] Fix | Delete
}) => {
[60888] Fix | Delete
if (colorValue) {
[60889] Fix | Delete
onColorChange();
[60890] Fix | Delete
} else if (gradientValue) {
[60891] Fix | Delete
onGradientChange();
[60892] Fix | Delete
}
[60893] Fix | Delete
});
[60894] Fix | Delete
});
[60895] Fix | Delete
},
[60896] Fix | Delete
panelId: panelId,
[60897] Fix | Delete
__experimentalFirstVisibleItemClass: "first",
[60898] Fix | Delete
__experimentalLastVisibleItemClass: "last",
[60899] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ColorGradientSettingsDropdown, {
[60900] Fix | Delete
settings: settings,
[60901] Fix | Delete
panelId: panelId,
[60902] Fix | Delete
colors,
[60903] Fix | Delete
gradients,
[60904] Fix | Delete
disableCustomColors,
[60905] Fix | Delete
disableCustomGradients,
[60906] Fix | Delete
__experimentalIsRenderedInSidebar,
[60907] Fix | Delete
enableAlpha
[60908] Fix | Delete
}), !!children && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[60909] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalSpacer, {
[60910] Fix | Delete
marginY: 4
[60911] Fix | Delete
}), " ", children]
[60912] Fix | Delete
})]
[60913] Fix | Delete
});
[60914] Fix | Delete
};
[60915] Fix | Delete
const PanelColorGradientSettingsSelect = props => {
[60916] Fix | Delete
const colorGradientSettings = useMultipleOriginColorsAndGradients();
[60917] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PanelColorGradientSettingsInner, {
[60918] Fix | Delete
...colorGradientSettings,
[60919] Fix | Delete
...props
[60920] Fix | Delete
});
[60921] Fix | Delete
};
[60922] Fix | Delete
const PanelColorGradientSettings = props => {
[60923] Fix | Delete
if (panel_color_gradient_settings_colorsAndGradientKeys.every(key => props.hasOwnProperty(key))) {
[60924] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PanelColorGradientSettingsInner, {
[60925] Fix | Delete
...props
[60926] Fix | Delete
});
[60927] Fix | Delete
}
[60928] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(PanelColorGradientSettingsSelect, {
[60929] Fix | Delete
...props
[60930] Fix | Delete
});
[60931] Fix | Delete
};
[60932] Fix | Delete
/* harmony default export */ const panel_color_gradient_settings = (PanelColorGradientSettings);
[60933] Fix | Delete
[60934] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/aspect-ratio.js
[60935] Fix | Delete
/**
[60936] Fix | Delete
* WordPress dependencies
[60937] Fix | Delete
*/
[60938] Fix | Delete
[60939] Fix | Delete
[60940] Fix | Delete
const aspectRatio = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[60941] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[60942] Fix | Delete
viewBox: "0 0 24 24",
[60943] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[60944] Fix | Delete
d: "M18.5 5.5h-13c-1.1 0-2 .9-2 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2v-9c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5h-13c-.3 0-.5-.2-.5-.5v-9c0-.3.2-.5.5-.5h13c.3 0 .5.2.5.5v9zM6.5 12H8v-2h2V8.5H6.5V12zm9.5 2h-2v1.5h3.5V12H16v2z"
[60945] Fix | Delete
})
[60946] Fix | Delete
});
[60947] Fix | Delete
/* harmony default export */ const aspect_ratio = (aspectRatio);
[60948] Fix | Delete
[60949] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/image-editor/constants.js
[60950] Fix | Delete
const MIN_ZOOM = 100;
[60951] Fix | Delete
const MAX_ZOOM = 300;
[60952] Fix | Delete
const constants_POPOVER_PROPS = {
[60953] Fix | Delete
placement: 'bottom-start'
[60954] Fix | Delete
};
[60955] Fix | Delete
[60956] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/image-editor/use-save-image.js
[60957] Fix | Delete
/**
[60958] Fix | Delete
* WordPress dependencies
[60959] Fix | Delete
*/
[60960] Fix | Delete
// Disable Reason: Needs to be refactored.
[60961] Fix | Delete
// eslint-disable-next-line no-restricted-imports
[60962] Fix | Delete
[60963] Fix | Delete
[60964] Fix | Delete
[60965] Fix | Delete
[60966] Fix | Delete
[60967] Fix | Delete
[60968] Fix | Delete
function useSaveImage({
[60969] Fix | Delete
crop,
[60970] Fix | Delete
rotation,
[60971] Fix | Delete
url,
[60972] Fix | Delete
id,
[60973] Fix | Delete
onSaveImage,
[60974] Fix | Delete
onFinishEditing
[60975] Fix | Delete
}) {
[60976] Fix | Delete
const {
[60977] Fix | Delete
createErrorNotice
[60978] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(external_wp_notices_namespaceObject.store);
[60979] Fix | Delete
const [isInProgress, setIsInProgress] = (0,external_wp_element_namespaceObject.useState)(false);
[60980] Fix | Delete
const cancel = (0,external_wp_element_namespaceObject.useCallback)(() => {
[60981] Fix | Delete
setIsInProgress(false);
[60982] Fix | Delete
onFinishEditing();
[60983] Fix | Delete
}, [onFinishEditing]);
[60984] Fix | Delete
const apply = (0,external_wp_element_namespaceObject.useCallback)(() => {
[60985] Fix | Delete
setIsInProgress(true);
[60986] Fix | Delete
const modifiers = [];
[60987] Fix | Delete
if (rotation > 0) {
[60988] Fix | Delete
modifiers.push({
[60989] Fix | Delete
type: 'rotate',
[60990] Fix | Delete
args: {
[60991] Fix | Delete
angle: rotation
[60992] Fix | Delete
}
[60993] Fix | Delete
});
[60994] Fix | Delete
}
[60995] Fix | Delete
[60996] Fix | Delete
// The crop script may return some very small, sub-pixel values when the image was not cropped.
[60997] Fix | Delete
// Crop only when the new size has changed by more than 0.1%.
[60998] Fix | Delete
if (crop.width < 99.9 || crop.height < 99.9) {
[60999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function