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
onIsResponsiveChange,
[65500] Fix | Delete
renderDefaultControl,
[65501] Fix | Delete
renderResponsiveControls,
[65502] Fix | Delete
isResponsive = false,
[65503] Fix | Delete
defaultLabel = {
[65504] Fix | Delete
id: 'all',
[65505] Fix | Delete
label: (0,external_wp_i18n_namespaceObject._x)('All', 'screen sizes')
[65506] Fix | Delete
},
[65507] Fix | Delete
viewports = [{
[65508] Fix | Delete
id: 'small',
[65509] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Small screens')
[65510] Fix | Delete
}, {
[65511] Fix | Delete
id: 'medium',
[65512] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Medium screens')
[65513] Fix | Delete
}, {
[65514] Fix | Delete
id: 'large',
[65515] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Large screens')
[65516] Fix | Delete
}]
[65517] Fix | Delete
} = props;
[65518] Fix | Delete
if (!title || !property || !renderDefaultControl) {
[65519] Fix | Delete
return null;
[65520] Fix | Delete
}
[65521] Fix | Delete
const toggleControlLabel = toggleLabel || (0,external_wp_i18n_namespaceObject.sprintf)( /* translators: %s: Property value for the control (eg: margin, padding, etc.). */
[65522] Fix | Delete
(0,external_wp_i18n_namespaceObject.__)('Use the same %s on all screen sizes.'), property);
[65523] Fix | Delete
const toggleHelpText = (0,external_wp_i18n_namespaceObject.__)('Toggle between using the same value for all screen sizes or using a unique value per screen size.');
[65524] Fix | Delete
const defaultControl = renderDefaultControl( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResponsiveBlockControlLabel, {
[65525] Fix | Delete
property: property,
[65526] Fix | Delete
viewport: defaultLabel
[65527] Fix | Delete
}), defaultLabel);
[65528] Fix | Delete
const defaultResponsiveControls = () => {
[65529] Fix | Delete
return viewports.map(viewport => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_element_namespaceObject.Fragment, {
[65530] Fix | Delete
children: renderDefaultControl( /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(ResponsiveBlockControlLabel, {
[65531] Fix | Delete
property: property,
[65532] Fix | Delete
viewport: viewport
[65533] Fix | Delete
}), viewport)
[65534] Fix | Delete
}, viewport.id));
[65535] Fix | Delete
};
[65536] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("fieldset", {
[65537] Fix | Delete
className: "block-editor-responsive-block-control",
[65538] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("legend", {
[65539] Fix | Delete
className: "block-editor-responsive-block-control__title",
[65540] Fix | Delete
children: title
[65541] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[65542] Fix | Delete
className: "block-editor-responsive-block-control__inner",
[65543] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToggleControl, {
[65544] Fix | Delete
__nextHasNoMarginBottom: true,
[65545] Fix | Delete
className: "block-editor-responsive-block-control__toggle",
[65546] Fix | Delete
label: toggleControlLabel,
[65547] Fix | Delete
checked: !isResponsive,
[65548] Fix | Delete
onChange: onIsResponsiveChange,
[65549] Fix | Delete
help: toggleHelpText
[65550] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[65551] Fix | Delete
className: dist_clsx('block-editor-responsive-block-control__group', {
[65552] Fix | Delete
'is-responsive': isResponsive
[65553] Fix | Delete
}),
[65554] Fix | Delete
children: [!isResponsive && defaultControl, isResponsive && (renderResponsiveControls ? renderResponsiveControls(viewports) : defaultResponsiveControls())]
[65555] Fix | Delete
})]
[65556] Fix | Delete
})]
[65557] Fix | Delete
});
[65558] Fix | Delete
}
[65559] Fix | Delete
/* harmony default export */ const responsive_block_control = (ResponsiveBlockControl);
[65560] Fix | Delete
[65561] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/shortcut.js
[65562] Fix | Delete
/**
[65563] Fix | Delete
* WordPress dependencies
[65564] Fix | Delete
*/
[65565] Fix | Delete
[65566] Fix | Delete
[65567] Fix | Delete
[65568] Fix | Delete
/**
[65569] Fix | Delete
* Internal dependencies
[65570] Fix | Delete
*/
[65571] Fix | Delete
[65572] Fix | Delete
function RichTextShortcut({
[65573] Fix | Delete
character,
[65574] Fix | Delete
type,
[65575] Fix | Delete
onUse
[65576] Fix | Delete
}) {
[65577] Fix | Delete
const keyboardShortcuts = (0,external_wp_element_namespaceObject.useContext)(keyboardShortcutContext);
[65578] Fix | Delete
const onUseRef = (0,external_wp_element_namespaceObject.useRef)();
[65579] Fix | Delete
onUseRef.current = onUse;
[65580] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[65581] Fix | Delete
function callback(event) {
[65582] Fix | Delete
if (external_wp_keycodes_namespaceObject.isKeyboardEvent[type](event, character)) {
[65583] Fix | Delete
onUseRef.current();
[65584] Fix | Delete
event.preventDefault();
[65585] Fix | Delete
}
[65586] Fix | Delete
}
[65587] Fix | Delete
keyboardShortcuts.current.add(callback);
[65588] Fix | Delete
return () => {
[65589] Fix | Delete
keyboardShortcuts.current.delete(callback);
[65590] Fix | Delete
};
[65591] Fix | Delete
}, [character, type]);
[65592] Fix | Delete
return null;
[65593] Fix | Delete
}
[65594] Fix | Delete
[65595] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/toolbar-button.js
[65596] Fix | Delete
/**
[65597] Fix | Delete
* WordPress dependencies
[65598] Fix | Delete
*/
[65599] Fix | Delete
[65600] Fix | Delete
[65601] Fix | Delete
[65602] Fix | Delete
function RichTextToolbarButton({
[65603] Fix | Delete
name,
[65604] Fix | Delete
shortcutType,
[65605] Fix | Delete
shortcutCharacter,
[65606] Fix | Delete
...props
[65607] Fix | Delete
}) {
[65608] Fix | Delete
let shortcut;
[65609] Fix | Delete
let fillName = 'RichText.ToolbarControls';
[65610] Fix | Delete
if (name) {
[65611] Fix | Delete
fillName += `.${name}`;
[65612] Fix | Delete
}
[65613] Fix | Delete
if (shortcutType && shortcutCharacter) {
[65614] Fix | Delete
shortcut = external_wp_keycodes_namespaceObject.displayShortcut[shortcutType](shortcutCharacter);
[65615] Fix | Delete
}
[65616] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Fill, {
[65617] Fix | Delete
name: fillName,
[65618] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.ToolbarButton, {
[65619] Fix | Delete
...props,
[65620] Fix | Delete
shortcut: shortcut
[65621] Fix | Delete
})
[65622] Fix | Delete
});
[65623] Fix | Delete
}
[65624] Fix | Delete
[65625] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/rich-text/input-event.js
[65626] Fix | Delete
/**
[65627] Fix | Delete
* WordPress dependencies
[65628] Fix | Delete
*/
[65629] Fix | Delete
[65630] Fix | Delete
[65631] Fix | Delete
/**
[65632] Fix | Delete
* Internal dependencies
[65633] Fix | Delete
*/
[65634] Fix | Delete
[65635] Fix | Delete
function __unstableRichTextInputEvent({
[65636] Fix | Delete
inputType,
[65637] Fix | Delete
onInput
[65638] Fix | Delete
}) {
[65639] Fix | Delete
const callbacks = (0,external_wp_element_namespaceObject.useContext)(inputEventContext);
[65640] Fix | Delete
const onInputRef = (0,external_wp_element_namespaceObject.useRef)();
[65641] Fix | Delete
onInputRef.current = onInput;
[65642] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[65643] Fix | Delete
function callback(event) {
[65644] Fix | Delete
if (event.inputType === inputType) {
[65645] Fix | Delete
onInputRef.current();
[65646] Fix | Delete
event.preventDefault();
[65647] Fix | Delete
}
[65648] Fix | Delete
}
[65649] Fix | Delete
callbacks.current.add(callback);
[65650] Fix | Delete
return () => {
[65651] Fix | Delete
callbacks.current.delete(callback);
[65652] Fix | Delete
};
[65653] Fix | Delete
}, [inputType]);
[65654] Fix | Delete
return null;
[65655] Fix | Delete
}
[65656] Fix | Delete
[65657] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/tool-selector/index.js
[65658] Fix | Delete
/**
[65659] Fix | Delete
* WordPress dependencies
[65660] Fix | Delete
*/
[65661] Fix | Delete
[65662] Fix | Delete
[65663] Fix | Delete
[65664] Fix | Delete
[65665] Fix | Delete
[65666] Fix | Delete
[65667] Fix | Delete
/**
[65668] Fix | Delete
* Internal dependencies
[65669] Fix | Delete
*/
[65670] Fix | Delete
[65671] Fix | Delete
[65672] Fix | Delete
[65673] Fix | Delete
[65674] Fix | Delete
const selectIcon = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.SVG, {
[65675] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[65676] Fix | Delete
width: "24",
[65677] Fix | Delete
height: "24",
[65678] Fix | Delete
viewBox: "0 0 24 24",
[65679] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Path, {
[65680] Fix | Delete
d: "M9.4 20.5L5.2 3.8l14.6 9-2 .3c-.2 0-.4.1-.7.1-.9.2-1.6.3-2.2.5-.8.3-1.4.5-1.8.8-.4.3-.8.8-1.3 1.5-.4.5-.8 1.2-1.2 2l-.3.6-.9 1.9zM7.6 7.1l2.4 9.3c.2-.4.5-.8.7-1.1.6-.8 1.1-1.4 1.6-1.8.5-.4 1.3-.8 2.2-1.1l1.2-.3-8.1-5z"
[65681] Fix | Delete
})
[65682] Fix | Delete
});
[65683] Fix | Delete
function ToolSelector(props, ref) {
[65684] Fix | Delete
const mode = (0,external_wp_data_namespaceObject.useSelect)(select => select(store).__unstableGetEditorMode(), []);
[65685] Fix | Delete
const {
[65686] Fix | Delete
__unstableSetEditorMode
[65687] Fix | Delete
} = (0,external_wp_data_namespaceObject.useDispatch)(store);
[65688] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Dropdown, {
[65689] Fix | Delete
renderToggle: ({
[65690] Fix | Delete
isOpen,
[65691] Fix | Delete
onToggle
[65692] Fix | Delete
}) => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[65693] Fix | Delete
...props,
[65694] Fix | Delete
ref: ref,
[65695] Fix | Delete
icon: mode === 'navigation' ? selectIcon : edit,
[65696] Fix | Delete
"aria-expanded": isOpen,
[65697] Fix | Delete
"aria-haspopup": "true",
[65698] Fix | Delete
onClick: onToggle
[65699] Fix | Delete
/* translators: button label text should, if possible, be under 16 characters. */,
[65700] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Tools')
[65701] Fix | Delete
}),
[65702] Fix | Delete
popoverProps: {
[65703] Fix | Delete
placement: 'bottom-start'
[65704] Fix | Delete
},
[65705] Fix | Delete
renderContent: () => /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[65706] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.NavigableMenu, {
[65707] Fix | Delete
role: "menu",
[65708] Fix | Delete
"aria-label": (0,external_wp_i18n_namespaceObject.__)('Tools'),
[65709] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.MenuItemsChoice, {
[65710] Fix | Delete
value: mode === 'navigation' ? 'navigation' : 'edit',
[65711] Fix | Delete
onSelect: __unstableSetEditorMode,
[65712] Fix | Delete
choices: [{
[65713] Fix | Delete
value: 'edit',
[65714] Fix | Delete
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[65715] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(build_module_icon, {
[65716] Fix | Delete
icon: edit
[65717] Fix | Delete
}), (0,external_wp_i18n_namespaceObject.__)('Edit')]
[65718] Fix | Delete
})
[65719] Fix | Delete
}, {
[65720] Fix | Delete
value: 'navigation',
[65721] Fix | Delete
label: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)(external_ReactJSXRuntime_namespaceObject.Fragment, {
[65722] Fix | Delete
children: [selectIcon, (0,external_wp_i18n_namespaceObject.__)('Select')]
[65723] Fix | Delete
})
[65724] Fix | Delete
}]
[65725] Fix | Delete
})
[65726] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("div", {
[65727] Fix | Delete
className: "block-editor-tool-selector__help",
[65728] Fix | Delete
children: (0,external_wp_i18n_namespaceObject.__)('Tools provide different interactions for selecting, navigating, and editing blocks. Toggle between select and edit by pressing Escape and Enter.')
[65729] Fix | Delete
})]
[65730] Fix | Delete
})
[65731] Fix | Delete
});
[65732] Fix | Delete
}
[65733] Fix | Delete
/* harmony default export */ const tool_selector = ((0,external_wp_element_namespaceObject.forwardRef)(ToolSelector));
[65734] Fix | Delete
[65735] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/unit-control/index.js
[65736] Fix | Delete
/**
[65737] Fix | Delete
* WordPress dependencies
[65738] Fix | Delete
*/
[65739] Fix | Delete
[65740] Fix | Delete
[65741] Fix | Delete
/**
[65742] Fix | Delete
* Internal dependencies
[65743] Fix | Delete
*/
[65744] Fix | Delete
[65745] Fix | Delete
[65746] Fix | Delete
function UnitControl({
[65747] Fix | Delete
units: unitsProp,
[65748] Fix | Delete
...props
[65749] Fix | Delete
}) {
[65750] Fix | Delete
const [availableUnits] = use_settings_useSettings('spacing.units');
[65751] Fix | Delete
const units = (0,external_wp_components_namespaceObject.__experimentalUseCustomUnits)({
[65752] Fix | Delete
availableUnits: availableUnits || ['%', 'px', 'em', 'rem', 'vw'],
[65753] Fix | Delete
units: unitsProp
[65754] Fix | Delete
});
[65755] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.__experimentalUnitControl, {
[65756] Fix | Delete
units: units,
[65757] Fix | Delete
...props
[65758] Fix | Delete
});
[65759] Fix | Delete
}
[65760] Fix | Delete
[65761] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/arrow-left.js
[65762] Fix | Delete
/**
[65763] Fix | Delete
* WordPress dependencies
[65764] Fix | Delete
*/
[65765] Fix | Delete
[65766] Fix | Delete
[65767] Fix | Delete
const arrowLeft = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[65768] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[65769] Fix | Delete
viewBox: "0 0 24 24",
[65770] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[65771] Fix | Delete
d: "M20 11.2H6.8l3.7-3.7-1-1L3.9 12l5.6 5.5 1-1-3.7-3.7H20z"
[65772] Fix | Delete
})
[65773] Fix | Delete
});
[65774] Fix | Delete
/* harmony default export */ const arrow_left = (arrowLeft);
[65775] Fix | Delete
[65776] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-input/button.js
[65777] Fix | Delete
/**
[65778] Fix | Delete
* WordPress dependencies
[65779] Fix | Delete
*/
[65780] Fix | Delete
[65781] Fix | Delete
[65782] Fix | Delete
[65783] Fix | Delete
[65784] Fix | Delete
[65785] Fix | Delete
/**
[65786] Fix | Delete
* Internal dependencies
[65787] Fix | Delete
*/
[65788] Fix | Delete
[65789] Fix | Delete
[65790] Fix | Delete
[65791] Fix | Delete
class URLInputButton extends external_wp_element_namespaceObject.Component {
[65792] Fix | Delete
constructor() {
[65793] Fix | Delete
super(...arguments);
[65794] Fix | Delete
this.toggle = this.toggle.bind(this);
[65795] Fix | Delete
this.submitLink = this.submitLink.bind(this);
[65796] Fix | Delete
this.state = {
[65797] Fix | Delete
expanded: false
[65798] Fix | Delete
};
[65799] Fix | Delete
}
[65800] Fix | Delete
toggle() {
[65801] Fix | Delete
this.setState({
[65802] Fix | Delete
expanded: !this.state.expanded
[65803] Fix | Delete
});
[65804] Fix | Delete
}
[65805] Fix | Delete
submitLink(event) {
[65806] Fix | Delete
event.preventDefault();
[65807] Fix | Delete
this.toggle();
[65808] Fix | Delete
}
[65809] Fix | Delete
render() {
[65810] Fix | Delete
const {
[65811] Fix | Delete
url,
[65812] Fix | Delete
onChange
[65813] Fix | Delete
} = this.props;
[65814] Fix | Delete
const {
[65815] Fix | Delete
expanded
[65816] Fix | Delete
} = this.state;
[65817] Fix | Delete
const buttonLabel = url ? (0,external_wp_i18n_namespaceObject.__)('Edit link') : (0,external_wp_i18n_namespaceObject.__)('Insert link');
[65818] Fix | Delete
return /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[65819] Fix | Delete
className: "block-editor-url-input__button",
[65820] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[65821] Fix | Delete
icon: library_link,
[65822] Fix | Delete
label: buttonLabel,
[65823] Fix | Delete
onClick: this.toggle,
[65824] Fix | Delete
className: "components-toolbar__control",
[65825] Fix | Delete
isPressed: !!url
[65826] Fix | Delete
}), expanded && /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)("form", {
[65827] Fix | Delete
className: "block-editor-url-input__button-modal",
[65828] Fix | Delete
onSubmit: this.submitLink,
[65829] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsxs)("div", {
[65830] Fix | Delete
className: "block-editor-url-input__button-modal-line",
[65831] Fix | Delete
children: [/*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[65832] Fix | Delete
className: "block-editor-url-input__back",
[65833] Fix | Delete
icon: arrow_left,
[65834] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Close'),
[65835] Fix | Delete
onClick: this.toggle
[65836] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(url_input, {
[65837] Fix | Delete
__nextHasNoMarginBottom: true,
[65838] Fix | Delete
value: url || '',
[65839] Fix | Delete
onChange: onChange
[65840] Fix | Delete
}), /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_components_namespaceObject.Button, {
[65841] Fix | Delete
icon: keyboard_return,
[65842] Fix | Delete
label: (0,external_wp_i18n_namespaceObject.__)('Submit'),
[65843] Fix | Delete
type: "submit"
[65844] Fix | Delete
})]
[65845] Fix | Delete
})
[65846] Fix | Delete
})]
[65847] Fix | Delete
});
[65848] Fix | Delete
}
[65849] Fix | Delete
}
[65850] Fix | Delete
[65851] Fix | Delete
/**
[65852] Fix | Delete
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/url-input/README.md
[65853] Fix | Delete
*/
[65854] Fix | Delete
/* harmony default export */ const url_input_button = (URLInputButton);
[65855] Fix | Delete
[65856] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/icons/build-module/library/image.js
[65857] Fix | Delete
/**
[65858] Fix | Delete
* WordPress dependencies
[65859] Fix | Delete
*/
[65860] Fix | Delete
[65861] Fix | Delete
[65862] Fix | Delete
const image_image = /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.SVG, {
[65863] Fix | Delete
viewBox: "0 0 24 24",
[65864] Fix | Delete
xmlns: "http://www.w3.org/2000/svg",
[65865] Fix | Delete
children: /*#__PURE__*/(0,external_ReactJSXRuntime_namespaceObject.jsx)(external_wp_primitives_namespaceObject.Path, {
[65866] Fix | Delete
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5 4.5h14c.3 0 .5.2.5.5v8.4l-3-2.9c-.3-.3-.8-.3-1 0L11.9 14 9 12c-.3-.2-.6-.2-.8 0l-3.6 2.6V5c-.1-.3.1-.5.4-.5zm14 15H5c-.3 0-.5-.2-.5-.5v-2.4l4.1-3 3 1.9c.3.2.7.2.9-.1L16 12l3.5 3.4V19c0 .3-.2.5-.5.5z"
[65867] Fix | Delete
})
[65868] Fix | Delete
});
[65869] Fix | Delete
/* harmony default export */ const library_image = (image_image);
[65870] Fix | Delete
[65871] Fix | Delete
;// CONCATENATED MODULE: ./node_modules/@wordpress/block-editor/build-module/components/url-popover/image-url-input-ui.js
[65872] Fix | Delete
/**
[65873] Fix | Delete
* WordPress dependencies
[65874] Fix | Delete
*/
[65875] Fix | Delete
[65876] Fix | Delete
[65877] Fix | Delete
[65878] Fix | Delete
[65879] Fix | Delete
[65880] Fix | Delete
[65881] Fix | Delete
/**
[65882] Fix | Delete
* Internal dependencies
[65883] Fix | Delete
*/
[65884] Fix | Delete
[65885] Fix | Delete
[65886] Fix | Delete
[65887] Fix | Delete
[65888] Fix | Delete
const LINK_DESTINATION_NONE = 'none';
[65889] Fix | Delete
const LINK_DESTINATION_CUSTOM = 'custom';
[65890] Fix | Delete
const LINK_DESTINATION_MEDIA = 'media';
[65891] Fix | Delete
const LINK_DESTINATION_ATTACHMENT = 'attachment';
[65892] Fix | Delete
const NEW_TAB_REL = ['noreferrer', 'noopener'];
[65893] Fix | Delete
const ImageURLInputUI = ({
[65894] Fix | Delete
linkDestination,
[65895] Fix | Delete
onChangeUrl,
[65896] Fix | Delete
url,
[65897] Fix | Delete
mediaType = 'image',
[65898] Fix | Delete
mediaUrl,
[65899] Fix | Delete
mediaLink,
[65900] Fix | Delete
linkTarget,
[65901] Fix | Delete
linkClass,
[65902] Fix | Delete
rel,
[65903] Fix | Delete
showLightboxSetting,
[65904] Fix | Delete
lightboxEnabled,
[65905] Fix | Delete
onSetLightbox,
[65906] Fix | Delete
resetLightbox
[65907] Fix | Delete
}) => {
[65908] Fix | Delete
const [isOpen, setIsOpen] = (0,external_wp_element_namespaceObject.useState)(false);
[65909] Fix | Delete
// Use internal state instead of a ref to make sure that the component
[65910] Fix | Delete
// re-renders when the popover's anchor updates.
[65911] Fix | Delete
const [popoverAnchor, setPopoverAnchor] = (0,external_wp_element_namespaceObject.useState)(null);
[65912] Fix | Delete
const openLinkUI = () => {
[65913] Fix | Delete
setIsOpen(true);
[65914] Fix | Delete
};
[65915] Fix | Delete
const [isEditingLink, setIsEditingLink] = (0,external_wp_element_namespaceObject.useState)(false);
[65916] Fix | Delete
const [urlInput, setUrlInput] = (0,external_wp_element_namespaceObject.useState)(null);
[65917] Fix | Delete
const autocompleteRef = (0,external_wp_element_namespaceObject.useRef)(null);
[65918] Fix | Delete
const wrapperRef = (0,external_wp_element_namespaceObject.useRef)();
[65919] Fix | Delete
(0,external_wp_element_namespaceObject.useEffect)(() => {
[65920] Fix | Delete
if (!wrapperRef.current) {
[65921] Fix | Delete
return;
[65922] Fix | Delete
}
[65923] Fix | Delete
const nextFocusTarget = external_wp_dom_namespaceObject.focus.focusable.find(wrapperRef.current)[0] || wrapperRef.current;
[65924] Fix | Delete
nextFocusTarget.focus();
[65925] Fix | Delete
}, [isEditingLink, url, lightboxEnabled]);
[65926] Fix | Delete
const startEditLink = () => {
[65927] Fix | Delete
if (linkDestination === LINK_DESTINATION_MEDIA || linkDestination === LINK_DESTINATION_ATTACHMENT) {
[65928] Fix | Delete
setUrlInput('');
[65929] Fix | Delete
}
[65930] Fix | Delete
setIsEditingLink(true);
[65931] Fix | Delete
};
[65932] Fix | Delete
const stopEditLink = () => {
[65933] Fix | Delete
setIsEditingLink(false);
[65934] Fix | Delete
};
[65935] Fix | Delete
const closeLinkUI = () => {
[65936] Fix | Delete
setUrlInput(null);
[65937] Fix | Delete
stopEditLink();
[65938] Fix | Delete
setIsOpen(false);
[65939] Fix | Delete
};
[65940] Fix | Delete
const getUpdatedLinkTargetSettings = value => {
[65941] Fix | Delete
const newLinkTarget = value ? '_blank' : undefined;
[65942] Fix | Delete
let updatedRel;
[65943] Fix | Delete
if (newLinkTarget) {
[65944] Fix | Delete
const rels = (rel !== null && rel !== void 0 ? rel : '').split(' ');
[65945] Fix | Delete
NEW_TAB_REL.forEach(relVal => {
[65946] Fix | Delete
if (!rels.includes(relVal)) {
[65947] Fix | Delete
rels.push(relVal);
[65948] Fix | Delete
}
[65949] Fix | Delete
});
[65950] Fix | Delete
updatedRel = rels.join(' ');
[65951] Fix | Delete
} else {
[65952] Fix | Delete
const rels = (rel !== null && rel !== void 0 ? rel : '').split(' ').filter(relVal => NEW_TAB_REL.includes(relVal) === false);
[65953] Fix | Delete
updatedRel = rels.length ? rels.join(' ') : undefined;
[65954] Fix | Delete
}
[65955] Fix | Delete
return {
[65956] Fix | Delete
linkTarget: newLinkTarget,
[65957] Fix | Delete
rel: updatedRel
[65958] Fix | Delete
};
[65959] Fix | Delete
};
[65960] Fix | Delete
const onFocusOutside = () => {
[65961] Fix | Delete
return event => {
[65962] Fix | Delete
// The autocomplete suggestions list renders in a separate popover (in a portal),
[65963] Fix | Delete
// so onFocusOutside fails to detect that a click on a suggestion occurred in the
[65964] Fix | Delete
// LinkContainer. Detect clicks on autocomplete suggestions using a ref here, and
[65965] Fix | Delete
// return to avoid the popover being closed.
[65966] Fix | Delete
const autocompleteElement = autocompleteRef.current;
[65967] Fix | Delete
if (autocompleteElement && autocompleteElement.contains(event.target)) {
[65968] Fix | Delete
return;
[65969] Fix | Delete
}
[65970] Fix | Delete
setIsOpen(false);
[65971] Fix | Delete
setUrlInput(null);
[65972] Fix | Delete
stopEditLink();
[65973] Fix | Delete
};
[65974] Fix | Delete
};
[65975] Fix | Delete
const onSubmitLinkChange = () => {
[65976] Fix | Delete
return event => {
[65977] Fix | Delete
if (urlInput) {
[65978] Fix | Delete
// It is possible the entered URL actually matches a named link destination.
[65979] Fix | Delete
// This check will ensure our link destination is correct.
[65980] Fix | Delete
const selectedDestination = getLinkDestinations().find(destination => destination.url === urlInput)?.linkDestination || LINK_DESTINATION_CUSTOM;
[65981] Fix | Delete
onChangeUrl({
[65982] Fix | Delete
href: urlInput,
[65983] Fix | Delete
linkDestination: selectedDestination,
[65984] Fix | Delete
lightbox: {
[65985] Fix | Delete
enabled: false
[65986] Fix | Delete
}
[65987] Fix | Delete
});
[65988] Fix | Delete
}
[65989] Fix | Delete
stopEditLink();
[65990] Fix | Delete
setUrlInput(null);
[65991] Fix | Delete
event.preventDefault();
[65992] Fix | Delete
};
[65993] Fix | Delete
};
[65994] Fix | Delete
const onLinkRemove = () => {
[65995] Fix | Delete
onChangeUrl({
[65996] Fix | Delete
linkDestination: LINK_DESTINATION_NONE,
[65997] Fix | Delete
href: ''
[65998] Fix | Delete
});
[65999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function